{"version":3,"sources":["../work/node_modules/browser-pack/_prelude.js","../work/node_modules/@hola.org/dashjs/dist/dash.mediaplayer.debug.js","../work/node_modules/@hola.org/videojs-contrib-ads/es5/cancelContentPlay.js","../work/node_modules/@hola.org/videojs-contrib-ads/es5/contentupdate.js","../work/node_modules/@hola.org/videojs-contrib-ads/es5/cueTextTracks.js","../work/node_modules/@hola.org/videojs-contrib-ads/es5/macros.js","../work/node_modules/@hola.org/videojs-contrib-ads/es5/plugin.js","../work/node_modules/@hola.org/videojs-contrib-ads/es5/redispatch.js","../work/node_modules/@hola.org/videojs-contrib-ads/es5/snapshot.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/es5/add-text-track-data.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/es5/codec-utils.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/es5/create-text-tracks-if-necessary.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/es5/flash-constants.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/es5/flash-media-source.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/es5/flash-source-buffer.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/es5/html-media-source.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/es5/remove-cues-from-track.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/es5/transmuxer-worker.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/es5/videojs-contrib-media-sources.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/es5/virtual-source-buffer.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/aac/index.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/codecs/adts.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/codecs/h264.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/codecs/index.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/flv/flv-tag.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/flv/index.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/flv/transmuxer.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/index.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/m2ts/caption-stream.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/m2ts/index.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/m2ts/m2ts.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/m2ts/metadata-stream.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/m2ts/stream-types.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/m2ts/timestamp-rollover-stream.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/mp4/index.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/mp4/mp4-generator.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/mp4/mp4-parser.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/mp4/transmuxer.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/tools/flv-inspector.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/tools/mp4-inspector.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/utils/exp-golomb.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/@hola.org/mux.js/lib/utils/stream.js","../work/node_modules/@hola.org/videojs-contrib-media-sources/node_modules/webworkify/index.js","../work/node_modules/@hola.org/videojs-hola-skin/src/js/videojs-hola-skin.js","../work/node_modules/@hola.org/videojs-ima/src/videojs.ima.js","../work/node_modules/@hola.org/videojs-osmf/dist/videojs-osmf.js","../work/node_modules/@hola.org/videojs-settings/src/videojs-settings.js","../work/node_modules/@hola.org/videojs-thumbnails/videojs.thumbnails.js","../work/node_modules/@hola.org/videojs-utils/src/videojs-utils.js","../work/node_modules/browser-resolve/empty.js","../work/node_modules/browserify-css/browser.js","../work/node_modules/clipboard/lib/clipboard-action.js","../work/node_modules/clipboard/lib/clipboard.js","../work/node_modules/delegate/src/closest.js","../work/node_modules/delegate/src/delegate.js","../work/node_modules/global/document.js","../work/node_modules/global/window.js","../work/node_modules/good-listener/src/is.js","../work/node_modules/good-listener/src/listen.js","../work/node_modules/lodash/_DataView.js","../work/node_modules/lodash/_Hash.js","../work/node_modules/lodash/_ListCache.js","../work/node_modules/lodash/_Map.js","../work/node_modules/lodash/_MapCache.js","../work/node_modules/lodash/_Promise.js","../work/node_modules/lodash/_Set.js","../work/node_modules/lodash/_SetCache.js","../work/node_modules/lodash/_Stack.js","../work/node_modules/lodash/_Symbol.js","../work/node_modules/lodash/_Uint8Array.js","../work/node_modules/lodash/_WeakMap.js","../work/node_modules/lodash/_addMapEntry.js","../work/node_modules/lodash/_addSetEntry.js","../work/node_modules/lodash/_apply.js","../work/node_modules/lodash/_arrayEach.js","../work/node_modules/lodash/_arrayFilter.js","../work/node_modules/lodash/_arrayLikeKeys.js","../work/node_modules/lodash/_arrayMap.js","../work/node_modules/lodash/_arrayPush.js","../work/node_modules/lodash/_arrayReduce.js","../work/node_modules/lodash/_arraySome.js","../work/node_modules/lodash/_assignValue.js","../work/node_modules/lodash/_assocIndexOf.js","../work/node_modules/lodash/_baseAssign.js","../work/node_modules/lodash/_baseAssignIn.js","../work/node_modules/lodash/_baseAssignValue.js","../work/node_modules/lodash/_baseClone.js","../work/node_modules/lodash/_baseCreate.js","../work/node_modules/lodash/_baseEach.js","../work/node_modules/lodash/_baseFindIndex.js","../work/node_modules/lodash/_baseFlatten.js","../work/node_modules/lodash/_baseFor.js","../work/node_modules/lodash/_baseForOwn.js","../work/node_modules/lodash/_baseGet.js","../work/node_modules/lodash/_baseGetAllKeys.js","../work/node_modules/lodash/_baseGetTag.js","../work/node_modules/lodash/_baseHasIn.js","../work/node_modules/lodash/_baseIsArguments.js","../work/node_modules/lodash/_baseIsEqual.js","../work/node_modules/lodash/_baseIsEqualDeep.js","../work/node_modules/lodash/_baseIsMatch.js","../work/node_modules/lodash/_baseIsNative.js","../work/node_modules/lodash/_baseIsTypedArray.js","../work/node_modules/lodash/_baseIteratee.js","../work/node_modules/lodash/_baseKeys.js","../work/node_modules/lodash/_baseKeysIn.js","../work/node_modules/lodash/_baseMap.js","../work/node_modules/lodash/_baseMatches.js","../work/node_modules/lodash/_baseMatchesProperty.js","../work/node_modules/lodash/_basePick.js","../work/node_modules/lodash/_basePickBy.js","../work/node_modules/lodash/_baseProperty.js","../work/node_modules/lodash/_basePropertyDeep.js","../work/node_modules/lodash/_baseSet.js","../work/node_modules/lodash/_baseSetToString.js","../work/node_modules/lodash/_baseSlice.js","../work/node_modules/lodash/_baseSome.js","../work/node_modules/lodash/_baseTimes.js","../work/node_modules/lodash/_baseToString.js","../work/node_modules/lodash/_baseUnary.js","../work/node_modules/lodash/_baseUnset.js","../work/node_modules/lodash/_cacheHas.js","../work/node_modules/lodash/_castPath.js","../work/node_modules/lodash/_cloneArrayBuffer.js","../work/node_modules/lodash/_cloneBuffer.js","../work/node_modules/lodash/_cloneDataView.js","../work/node_modules/lodash/_cloneMap.js","../work/node_modules/lodash/_cloneRegExp.js","../work/node_modules/lodash/_cloneSet.js","../work/node_modules/lodash/_cloneSymbol.js","../work/node_modules/lodash/_cloneTypedArray.js","../work/node_modules/lodash/_copyArray.js","../work/node_modules/lodash/_copyObject.js","../work/node_modules/lodash/_copySymbols.js","../work/node_modules/lodash/_copySymbolsIn.js","../work/node_modules/lodash/_coreJsData.js","../work/node_modules/lodash/_createBaseEach.js","../work/node_modules/lodash/_createBaseFor.js","../work/node_modules/lodash/_createFind.js","../work/node_modules/lodash/_customOmitClone.js","../work/node_modules/lodash/_defineProperty.js","../work/node_modules/lodash/_equalArrays.js","../work/node_modules/lodash/_equalByTag.js","../work/node_modules/lodash/_equalObjects.js","../work/node_modules/lodash/_flatRest.js","../work/node_modules/lodash/_freeGlobal.js","../work/node_modules/lodash/_getAllKeys.js","../work/node_modules/lodash/_getAllKeysIn.js","../work/node_modules/lodash/_getMapData.js","../work/node_modules/lodash/_getMatchData.js","../work/node_modules/lodash/_getNative.js","../work/node_modules/lodash/_getPrototype.js","../work/node_modules/lodash/_getRawTag.js","../work/node_modules/lodash/_getSymbols.js","../work/node_modules/lodash/_getSymbolsIn.js","../work/node_modules/lodash/_getTag.js","../work/node_modules/lodash/_getValue.js","../work/node_modules/lodash/_hasPath.js","../work/node_modules/lodash/_hashClear.js","../work/node_modules/lodash/_hashDelete.js","../work/node_modules/lodash/_hashGet.js","../work/node_modules/lodash/_hashHas.js","../work/node_modules/lodash/_hashSet.js","../work/node_modules/lodash/_initCloneArray.js","../work/node_modules/lodash/_initCloneByTag.js","../work/node_modules/lodash/_initCloneObject.js","../work/node_modules/lodash/_isFlattenable.js","../work/node_modules/lodash/_isIndex.js","../work/node_modules/lodash/_isIterateeCall.js","../work/node_modules/lodash/_isKey.js","../work/node_modules/lodash/_isKeyable.js","../work/node_modules/lodash/_isMasked.js","../work/node_modules/lodash/_isPrototype.js","../work/node_modules/lodash/_isStrictComparable.js","../work/node_modules/lodash/_listCacheClear.js","../work/node_modules/lodash/_listCacheDelete.js","../work/node_modules/lodash/_listCacheGet.js","../work/node_modules/lodash/_listCacheHas.js","../work/node_modules/lodash/_listCacheSet.js","../work/node_modules/lodash/_mapCacheClear.js","../work/node_modules/lodash/_mapCacheDelete.js","../work/node_modules/lodash/_mapCacheGet.js","../work/node_modules/lodash/_mapCacheHas.js","../work/node_modules/lodash/_mapCacheSet.js","../work/node_modules/lodash/_mapToArray.js","../work/node_modules/lodash/_matchesStrictComparable.js","../work/node_modules/lodash/_memoizeCapped.js","../work/node_modules/lodash/_nativeCreate.js","../work/node_modules/lodash/_nativeKeys.js","../work/node_modules/lodash/_nativeKeysIn.js","../work/node_modules/lodash/_nodeUtil.js","../work/node_modules/lodash/_objectToString.js","../work/node_modules/lodash/_overArg.js","../work/node_modules/lodash/_overRest.js","../work/node_modules/lodash/_parent.js","../work/node_modules/lodash/_root.js","../work/node_modules/lodash/_setCacheAdd.js","../work/node_modules/lodash/_setCacheHas.js","../work/node_modules/lodash/_setToArray.js","../work/node_modules/lodash/_setToString.js","../work/node_modules/lodash/_shortOut.js","../work/node_modules/lodash/_stackClear.js","../work/node_modules/lodash/_stackDelete.js","../work/node_modules/lodash/_stackGet.js","../work/node_modules/lodash/_stackHas.js","../work/node_modules/lodash/_stackSet.js","../work/node_modules/lodash/_stringToPath.js","../work/node_modules/lodash/_toKey.js","../work/node_modules/lodash/_toSource.js","../work/node_modules/lodash/constant.js","../work/node_modules/lodash/debounce.js","../work/node_modules/lodash/eq.js","../work/node_modules/lodash/find.js","../work/node_modules/lodash/findIndex.js","../work/node_modules/lodash/flatten.js","../work/node_modules/lodash/get.js","../work/node_modules/lodash/hasIn.js","../work/node_modules/lodash/identity.js","../work/node_modules/lodash/isArguments.js","../work/node_modules/lodash/isArray.js","../work/node_modules/lodash/isArrayLike.js","../work/node_modules/lodash/isBuffer.js","../work/node_modules/lodash/isFunction.js","../work/node_modules/lodash/isLength.js","../work/node_modules/lodash/isObject.js","../work/node_modules/lodash/isObjectLike.js","../work/node_modules/lodash/isPlainObject.js","../work/node_modules/lodash/isSymbol.js","../work/node_modules/lodash/isTypedArray.js","../work/node_modules/lodash/keys.js","../work/node_modules/lodash/keysIn.js","../work/node_modules/lodash/last.js","../work/node_modules/lodash/map.js","../work/node_modules/lodash/memoize.js","../work/node_modules/lodash/now.js","../work/node_modules/lodash/omit.js","../work/node_modules/lodash/pick.js","../work/node_modules/lodash/property.js","../work/node_modules/lodash/some.js","../work/node_modules/lodash/stubArray.js","../work/node_modules/lodash/stubFalse.js","../work/node_modules/lodash/throttle.js","../work/node_modules/lodash/toFinite.js","../work/node_modules/lodash/toInteger.js","../work/node_modules/lodash/toNumber.js","../work/node_modules/lodash/toString.js","../work/node_modules/punycode/punycode.js","../work/node_modules/querystring-es3/decode.js","../work/node_modules/querystring-es3/encode.js","../work/node_modules/querystring-es3/index.js","../work/node_modules/select/src/select.js","../work/node_modules/tiny-emitter/index.js","../work/node_modules/url/url.js","../work/node_modules/url/util.js","../work/node_modules/video.js/dist/alt/video.novtt.js","../work/node_modules/videojs-contrib-dash/es5/videojs-dash.js","../work/node_modules/videojs-vtt.js/lib/browser-index.js","../work/node_modules/videojs-vtt.js/lib/vtt.js","../work/node_modules/videojs-vtt.js/lib/vttcue-extended.js","../work/node_modules/videojs-vtt.js/lib/vttcue.js","../work/node_modules/videojs-vtt.js/lib/vttregion-extended.js","../work/node_modules/videojs-vtt.js/lib/vttregion.js","../work/node_modules/videojs-watermark/es5/plugin.js","../work/src/css/dvr.css","../work/src/css/next.css","../work/src/css/share.css","../work/src/css/videojs-contrib-ads.css","../work/src/css/videojs-hola-skin.css","../work/src/css/videojs-ima.css","../work/src/css/videojs-settings.css","../work/src/css/videojs-thumbnails.css","../work/src/css/videojs-watermark.css","../work/src/css/videojs.css","../work/src/dvr.js","../work/src/flashls_source_handler.js","../work/src/hola_player.patched.js","../work/src/id3.js","../work/src/mime.js","../work/src/next.js","../work/src/share.js","../work/src/util.js","../work/node_modules/@hola.org/hap.js/lib/conf.js","../work/node_modules/@hola.org/hap.js/lib/external_util.js","../work/node_modules/@hola.org/hap.js/lib/hola_videojs_hls.js","../work/node_modules/@hola.org/hap.js/lib/zdot_conf.js","../work/node_modules/@hola.org/hls.js/lib/controller/abr-controller.js","../work/node_modules/@hola.org/hls.js/lib/controller/buffer-controller.js","../work/node_modules/@hola.org/hls.js/lib/controller/cap-level-controller.js","../work/node_modules/@hola.org/hls.js/lib/controller/fps-controller.js","../work/node_modules/@hola.org/hls.js/lib/controller/level-controller.js","../work/node_modules/@hola.org/hls.js/lib/controller/stream-controller.js","../work/node_modules/@hola.org/hls.js/lib/controller/timeline-controller.js","../work/node_modules/@hola.org/hls.js/lib/crypt/aes.js","../work/node_modules/@hola.org/hls.js/lib/crypt/aes128-decrypter.js","../work/node_modules/@hola.org/hls.js/lib/crypt/decrypter.js","../work/node_modules/@hola.org/hls.js/lib/demux/aacdemuxer.js","../work/node_modules/@hola.org/hls.js/lib/demux/adts.js","../work/node_modules/@hola.org/hls.js/lib/demux/demuxer-inline.js","../work/node_modules/@hola.org/hls.js/lib/demux/demuxer-worker.js","../work/node_modules/@hola.org/hls.js/lib/demux/demuxer.js","../work/node_modules/@hola.org/hls.js/lib/demux/exp-golomb.js","../work/node_modules/@hola.org/hls.js/lib/demux/id3.js","../work/node_modules/@hola.org/hls.js/lib/demux/tsdemuxer.js","../work/node_modules/@hola.org/hls.js/lib/errors.js","../work/node_modules/@hola.org/hls.js/lib/event-handler.js","../work/node_modules/@hola.org/hls.js/lib/events.js","../work/node_modules/@hola.org/hls.js/lib/helper/aac.js","../work/node_modules/@hola.org/hls.js/lib/helper/buffer-helper.js","../work/node_modules/@hola.org/hls.js/lib/helper/level-helper.js","../work/node_modules/@hola.org/hls.js/lib/hls.js","../work/node_modules/@hola.org/hls.js/lib/loader/fragment-loader.js","../work/node_modules/@hola.org/hls.js/lib/loader/key-loader.js","../work/node_modules/@hola.org/hls.js/lib/loader/playlist-loader.js","../work/node_modules/@hola.org/hls.js/lib/remux/mp4-generator.js","../work/node_modules/@hola.org/hls.js/lib/remux/mp4-remuxer.js","../work/node_modules/@hola.org/hls.js/lib/remux/passthrough-remuxer.js","../work/node_modules/@hola.org/hls.js/lib/utils/attr-list.js","../work/node_modules/@hola.org/hls.js/lib/utils/binary-search.js","../work/node_modules/@hola.org/hls.js/lib/utils/browser.js","../work/node_modules/@hola.org/hls.js/lib/utils/cea-608-parser.js","../work/node_modules/@hola.org/hls.js/lib/utils/cues.js","../work/node_modules/@hola.org/hls.js/lib/utils/logger.js","../work/node_modules/@hola.org/hls.js/lib/utils/polyfill.js","../work/node_modules/@hola.org/hls.js/lib/utils/url.js","../work/node_modules/@hola.org/hls.js/lib/utils/xhr-loader.js","../work/node_modules/@hola.org/videojs5-hlsjs-source-handler/lib/videojs5-hlsjs-source-handler.js","../work/node_modules/events/events.js","../work/node_modules/webworkify/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC/v7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACpOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACxMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACldA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACtTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACtJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC5iBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrZA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClXA;AACA;AACA;AACA;AACA;AACA;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/bA;AACA;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9yBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7lCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACtNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC1zBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1tDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACziDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/DA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AChBA;AACA;AACA;AACA;AACA;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACrhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrFA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5tBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACx5sBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/HA;;ACAA;;ACAA;;ACAA;;ACAA;;ACAA;;ACAA;;ACAA;;ACAA;;ACAA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACptBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AxRnEA;AyRAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzmDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACh1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"hola_player.dash.dev.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o= minLevel) {\n console.log(this.time + \" [\" + severity + \"] \" + msg);\n }\n }\n };\n\n var numArrayToHexArray = function numArrayToHexArray(numArray) {\n var hexArray = [];\n for (var j = 0; j < numArray.length; j++) {\n hexArray.push(numArray[j].toString(16));\n }\n return hexArray;\n };\n\n /**\n * State of CEA-608 pen or character\n * @constructor\n */\n var PenState = function PenState(foreground, underline, italics, background, flash) {\n this.foreground = foreground || \"white\";\n this.underline = underline || false;\n this.italics = italics || false;\n this.background = background || \"black\";\n this.flash = flash || false;\n };\n\n PenState.prototype = {\n\n reset: function reset() {\n this.foreground = \"white\";\n this.underline = false;\n this.italics = false;\n this.background = \"black\";\n this.flash = false;\n },\n\n setStyles: function setStyles(styles) {\n var attribs = [\"foreground\", \"underline\", \"italics\", \"background\", \"flash\"];\n for (var i = 0; i < attribs.length; i++) {\n var style = attribs[i];\n if (styles.hasOwnProperty(style)) {\n this[style] = styles[style];\n }\n }\n },\n\n isDefault: function isDefault() {\n return this.foreground === \"white\" && !this.underline && !this.italics && this.background === \"black\" && !this.flash;\n },\n\n equals: function equals(other) {\n return this.foreground === other.foreground && this.underline === other.underline && this.italics === other.italics && this.background === other.background && this.flash === other.flash;\n },\n\n copy: function copy(newPenState) {\n this.foreground = newPenState.foreground;\n this.underline = newPenState.underline;\n this.italics = newPenState.italics;\n this.background = newPenState.background;\n this.flash = newPenState.flash;\n },\n\n toString: function toString() {\n return \"color=\" + this.foreground + \", underline=\" + this.underline + \", italics=\" + this.italics + \", background=\" + this.background + \", flash=\" + this.flash;\n }\n };\n\n /**\n * Unicode character with styling and background.\n * @constructor\n */\n var StyledUnicodeChar = function StyledUnicodeChar(uchar, foreground, underline, italics, background, flash) {\n this.uchar = uchar || ' '; // unicode character\n this.penState = new PenState(foreground, underline, italics, background, flash);\n };\n\n StyledUnicodeChar.prototype = {\n\n reset: function reset() {\n this.uchar = ' ';\n this.penState.reset();\n },\n\n setChar: function setChar(uchar, newPenState) {\n this.uchar = uchar;\n this.penState.copy(newPenState);\n },\n\n setPenState: function setPenState(newPenState) {\n this.penState.copy(newPenState);\n },\n\n equals: function equals(other) {\n return this.uchar === other.uchar && this.penState.equals(other.penState);\n },\n\n copy: function copy(newChar) {\n this.uchar = newChar.uchar;\n this.penState.copy(newChar.penState);\n },\n\n isEmpty: function isEmpty() {\n return this.uchar === ' ' && this.penState.isDefault();\n }\n };\n\n /**\n * CEA-608 row consisting of NR_COLS instances of StyledUnicodeChar.\n * @constructor\n */\n var Row = function Row() {\n this.chars = [];\n for (var i = 0; i < NR_COLS; i++) {\n this.chars.push(new StyledUnicodeChar());\n }\n this.pos = 0;\n this.currPenState = new PenState();\n };\n\n Row.prototype = {\n\n equals: function equals(other) {\n var equal = true;\n for (var i = 0; i < NR_COLS; i++) {\n if (!this.chars[i].equals(other.chars[i])) {\n equal = false;\n break;\n }\n }\n return equal;\n },\n\n copy: function copy(other) {\n for (var i = 0; i < NR_COLS; i++) {\n this.chars[i].copy(other.chars[i]);\n }\n },\n\n isEmpty: function isEmpty() {\n var empty = true;\n for (var i = 0; i < NR_COLS; i++) {\n if (!this.chars[i].isEmpty()) {\n empty = false;\n break;\n }\n }\n return empty;\n },\n\n /**\n * Set the cursor to a valid column.\n */\n setCursor: function setCursor(absPos) {\n if (this.pos !== absPos) {\n this.pos = absPos;\n }\n if (this.pos < 0) {\n logger.log(\"ERROR\", \"Negative cursor position \" + this.pos);\n this.pos = 0;\n } else if (this.pos > NR_COLS) {\n logger.log(\"ERROR\", \"Too large cursor position \" + this.pos);\n this.pos = NR_COLS;\n }\n },\n\n /** \n * Move the cursor relative to current position.\n */\n moveCursor: function moveCursor(relPos) {\n var newPos = this.pos + relPos;\n if (relPos > 1) {\n for (var i = this.pos + 1; i < newPos + 1; i++) {\n this.chars[i].setPenState(this.currPenState);\n }\n }\n this.setCursor(newPos);\n },\n\n /**\n * Backspace, move one step back and clear character.\n */\n backSpace: function backSpace() {\n this.moveCursor(-1);\n this.chars[this.pos].setChar(' ', this.currPenState);\n },\n\n insertChar: function insertChar(byte) {\n if (byte >= 0x90) {\n //Extended char\n this.backSpace();\n }\n var char = getCharForByte(byte);\n if (this.pos >= NR_COLS) {\n logger.log(\"ERROR\", \"Cannot insert \" + byte.toString(16) + \" (\" + char + \") at position \" + this.pos + \". Skipping it!\");\n return;\n }\n this.chars[this.pos].setChar(char, this.currPenState);\n this.moveCursor(1);\n },\n\n clearFromPos: function clearFromPos(startPos) {\n var i;\n for (i = startPos; i < NR_COLS; i++) {\n this.chars[i].reset();\n }\n },\n\n clear: function clear() {\n this.clearFromPos(0);\n this.pos = 0;\n this.currPenState.reset();\n },\n\n clearToEndOfRow: function clearToEndOfRow() {\n this.clearFromPos(this.pos);\n },\n\n getTextString: function getTextString() {\n var chars = [];\n var empty = true;\n for (var i = 0; i < NR_COLS; i++) {\n var char = this.chars[i].uchar;\n if (char !== \" \") {\n empty = false;\n }\n chars.push(char);\n }\n if (empty) {\n return \"\";\n } else {\n return chars.join(\"\");\n }\n },\n\n setPenStyles: function setPenStyles(styles) {\n this.currPenState.setStyles(styles);\n var currChar = this.chars[this.pos];\n currChar.setPenState(this.currPenState);\n }\n };\n\n /**\n * Keep a CEA-608 screen of 32x15 styled characters\n * @constructor\n */\n var CaptionScreen = function CaptionScreen() {\n\n this.rows = [];\n for (var i = 0; i < NR_ROWS; i++) {\n this.rows.push(new Row()); // Note that we use zero-based numbering (0-14)\n }\n this.currRow = NR_ROWS - 1;\n this.nrRollUpRows = null;\n this.reset();\n };\n\n CaptionScreen.prototype = {\n\n reset: function reset() {\n for (var i = 0; i < NR_ROWS; i++) {\n this.rows[i].clear();\n }\n this.currRow = NR_ROWS - 1;\n },\n\n equals: function equals(other) {\n var equal = true;\n for (var i = 0; i < NR_ROWS; i++) {\n if (!this.rows[i].equals(other.rows[i])) {\n equal = false;\n break;\n }\n }\n return equal;\n },\n\n copy: function copy(other) {\n for (var i = 0; i < NR_ROWS; i++) {\n this.rows[i].copy(other.rows[i]);\n }\n },\n\n isEmpty: function isEmpty() {\n var empty = true;\n for (var i = 0; i < NR_ROWS; i++) {\n if (!this.rows[i].isEmpty()) {\n empty = false;\n break;\n }\n }\n return empty;\n },\n\n backSpace: function backSpace() {\n var row = this.rows[this.currRow];\n row.backSpace();\n },\n\n clearToEndOfRow: function clearToEndOfRow() {\n var row = this.rows[this.currRow];\n row.clearToEndOfRow();\n },\n\n /**\n * Insert a character (without styling) in the current row.\n */\n insertChar: function insertChar(char) {\n var row = this.rows[this.currRow];\n row.insertChar(char);\n },\n\n setPen: function setPen(styles) {\n var row = this.rows[this.currRow];\n row.setPenStyles(styles);\n },\n\n moveCursor: function moveCursor(relPos) {\n var row = this.rows[this.currRow];\n row.moveCursor(relPos);\n },\n\n setCursor: function setCursor(absPos) {\n logger.log(\"INFO\", \"setCursor: \" + absPos);\n var row = this.rows[this.currRow];\n row.setCursor(absPos);\n },\n\n setPAC: function setPAC(pacData) {\n logger.log(\"INFO\", \"pacData = \" + JSON.stringify(pacData));\n var newRow = pacData.row - 1;\n if (this.nrRollUpRows && newRow < this.nrRollUpRows - 1) {\n newRow = this.nrRollUpRows - 1;\n }\n this.currRow = newRow;\n var row = this.rows[this.currRow];\n if (pacData.indent !== null) {\n var indent = pacData.indent;\n var prevPos = Math.max(indent - 1, 0);\n row.setCursor(pacData.indent);\n pacData.color = row.chars[prevPos].penState.foreground;\n }\n var styles = { foreground: pacData.color, underline: pacData.underline, italics: pacData.italics, background: 'black', flash: false };\n this.setPen(styles);\n },\n\n /**\n * Set background/extra foreground, but first do back_space, and then insert space (backwards compatibility).\n */\n setBkgData: function setBkgData(bkgData) {\n\n logger.log(\"INFO\", \"bkgData = \" + JSON.stringify(bkgData));\n this.backSpace();\n this.setPen(bkgData);\n this.insertChar(0x20); //Space\n },\n\n setRollUpRows: function setRollUpRows(nrRows) {\n this.nrRollUpRows = nrRows;\n },\n\n rollUp: function rollUp() {\n if (this.nrRollUpRows === null) {\n logger.log(\"DEBUG\", \"roll_up but nrRollUpRows not set yet\");\n return; //Not properly setup\n }\n logger.log(\"TEXT\", this.getDisplayText());\n var topRowIndex = this.currRow + 1 - this.nrRollUpRows;\n var topRow = this.rows.splice(topRowIndex, 1)[0];\n topRow.clear();\n this.rows.splice(this.currRow, 0, topRow);\n logger.log(\"INFO\", \"Rolling up\");\n //logger.log(\"TEXT\", this.get_display_text())\n },\n\n /**\n * Get all non-empty rows with as unicode text. \n */\n getDisplayText: function getDisplayText(asOneRow) {\n asOneRow = asOneRow || false;\n var displayText = [];\n var text = \"\";\n var rowNr = -1;\n for (var i = 0; i < NR_ROWS; i++) {\n var rowText = this.rows[i].getTextString();\n if (rowText) {\n rowNr = i + 1;\n if (asOneRow) {\n displayText.push(\"Row \" + rowNr + ': \"' + rowText + '\"');\n } else {\n displayText.push(rowText.trim());\n }\n }\n }\n if (displayText.length > 0) {\n if (asOneRow) {\n text = \"[\" + displayText.join(\" | \") + \"]\";\n } else {\n text = displayText.join(\"\\n\");\n }\n }\n return text;\n },\n\n getTextAndFormat: function getTextAndFormat() {\n return this.rows;\n }\n };\n\n /**\n * Handle a CEA-608 channel and send decoded data to outputFilter\n * @constructor\n * @param {Number} channelNumber (1 or 2)\n * @param {CueHandler} outputFilter Output from channel1 newCue(startTime, endTime, captionScreen)\n */\n var Cea608Channel = function Cea608Channel(channelNumber, outputFilter) {\n\n this.chNr = channelNumber;\n this.outputFilter = outputFilter;\n this.mode = null;\n this.verbose = 0;\n this.displayedMemory = new CaptionScreen();\n this.nonDisplayedMemory = new CaptionScreen();\n this.lastOutputScreen = new CaptionScreen();\n this.currRollUpRow = this.displayedMemory.rows[NR_ROWS - 1];\n this.writeScreen = this.displayedMemory;\n this.mode = null;\n this.cueStartTime = null; // Keeps track of where a cue started.\n };\n\n Cea608Channel.prototype = {\n\n modes: [\"MODE_ROLL-UP\", \"MODE_POP-ON\", \"MODE_PAINT-ON\", \"MODE_TEXT\"],\n\n reset: function reset() {\n this.mode = null;\n this.displayedMemory.reset();\n this.nonDisplayedMemory.reset();\n this.lastOutputScreen.reset();\n this.currRollUpRow = this.displayedMemory.rows[NR_ROWS - 1];\n this.writeScreen = this.displayedMemory;\n this.mode = null;\n this.cueStartTime = null;\n this.lastCueEndTime = null;\n },\n\n getHandler: function getHandler() {\n return this.outputFilter;\n },\n\n setHandler: function setHandler(newHandler) {\n this.outputFilter = newHandler;\n },\n\n setPAC: function setPAC(pacData) {\n this.writeScreen.setPAC(pacData);\n },\n\n setBkgData: function setBkgData(bkgData) {\n this.writeScreen.setBkgData(bkgData);\n },\n\n setMode: function setMode(newMode) {\n if (newMode === this.mode) {\n return;\n }\n this.mode = newMode;\n logger.log(\"INFO\", \"MODE=\" + newMode);\n if (this.mode == \"MODE_POP-ON\") {\n this.writeScreen = this.nonDisplayedMemory;\n } else {\n this.writeScreen = this.displayedMemory;\n this.writeScreen.reset();\n }\n if (this.mode !== \"MODE_ROLL-UP\") {\n this.displayedMemory.nrRollUpRows = null;\n this.nonDisplayedMemory.nrRollUpRows = null;\n }\n this.mode = newMode;\n },\n\n insertChars: function insertChars(chars) {\n for (var i = 0; i < chars.length; i++) {\n this.writeScreen.insertChar(chars[i]);\n }\n var screen = this.writeScreen === this.displayedMemory ? \"DISP\" : \"NON_DISP\";\n logger.log(\"INFO\", screen + \": \" + this.writeScreen.getDisplayText(true));\n if (this.mode === \"MODE_PAINT-ON\" || this.mode === \"MODE_ROLL-UP\") {\n logger.log(\"TEXT\", \"DISPLAYED: \" + this.displayedMemory.getDisplayText(true));\n this.outputDataUpdate();\n }\n },\n\n cc_RCL: function cc_RCL() {\n // Resume Caption Loading (switch mode to Pop On)\n logger.log(\"INFO\", \"RCL - Resume Caption Loading\");\n this.setMode(\"MODE_POP-ON\");\n },\n cc_BS: function cc_BS() {\n // BackSpace\n logger.log(\"INFO\", \"BS - BackSpace\");\n if (this.mode === \"MODE_TEXT\") {\n return;\n }\n this.writeScreen.backSpace();\n if (this.writeScreen === this.displayedMemory) {\n this.outputDataUpdate();\n }\n },\n cc_AOF: function cc_AOF() {\n // Reserved (formerly Alarm Off)\n return;\n },\n cc_AON: function cc_AON() {\n // Reserved (formerly Alarm On)\n return;\n },\n cc_DER: function cc_DER() {\n // Delete to End of Row\n logger.log(\"INFO\", \"DER- Delete to End of Row\");\n this.writeScreen.clearToEndOfRow();\n this.outputDataUpdate();\n },\n cc_RU: function cc_RU(nrRows) {\n //Roll-Up Captions-2,3,or 4 Rows\n logger.log(\"INFO\", \"RU(\" + nrRows + \") - Roll Up\");\n this.writeScreen = this.displayedMemory;\n this.setMode(\"MODE_ROLL-UP\");\n this.writeScreen.setRollUpRows(nrRows);\n },\n cc_FON: function cc_FON() {\n //Flash On\n logger.log(\"INFO\", \"FON - Flash On\");\n this.writeScreen.setPen({ flash: true });\n },\n cc_RDC: function cc_RDC() {\n // Resume Direct Captioning (switch mode to PaintOn)\n logger.log(\"INFO\", \"RDC - Resume Direct Captioning\");\n this.setMode(\"MODE_PAINT-ON\");\n },\n cc_TR: function cc_TR() {\n // Text Restart in text mode (not supported, however)\n logger.log(\"INFO\", \"TR\");\n this.setMode(\"MODE_TEXT\");\n },\n cc_RTD: function cc_RTD() {\n // Resume Text Display in Text mode (not supported, however)\n logger.log(\"INFO\", \"RTD\");\n this.setMode(\"MODE_TEXT\");\n },\n cc_EDM: function cc_EDM() {\n // Erase Displayed Memory\n logger.log(\"INFO\", \"EDM - Erase Displayed Memory\");\n this.displayedMemory.reset();\n this.outputDataUpdate();\n },\n cc_CR: function cc_CR() {\n // Carriage Return\n logger.log(\"CR - Carriage Return\");\n this.writeScreen.rollUp();\n this.outputDataUpdate();\n },\n cc_ENM: function cc_ENM() {\n //Erase Non-Displayed Memory\n logger.log(\"INFO\", \"ENM - Erase Non-displayed Memory\");\n this.nonDisplayedMemory.reset();\n },\n cc_EOC: function cc_EOC() {\n //End of Caption (Flip Memories)\n logger.log(\"INFO\", \"EOC - End Of Caption\");\n if (this.mode === \"MODE_POP-ON\") {\n var tmp = this.displayedMemory;\n this.displayedMemory = this.nonDisplayedMemory;\n this.nonDisplayedMemory = tmp;\n this.writeScreen = this.nonDisplayedMemory;\n logger.log(\"TEXT\", \"DISP: \" + this.displayedMemory.getDisplayText());\n }\n this.outputDataUpdate();\n },\n cc_TO: function cc_TO(nrCols) {\n // Tab Offset 1,2, or 3 columns\n logger.log(\"INFO\", \"TO(\" + nrCols + \") - Tab Offset\");\n this.writeScreen.moveCursor(nrCols);\n },\n cc_MIDROW: function cc_MIDROW(secondByte) {\n // Parse MIDROW command\n var styles = { flash: false };\n styles.underline = secondByte % 2 === 1;\n styles.italics = secondByte >= 0x2e;\n if (!styles.italics) {\n var colorIndex = Math.floor(secondByte / 2) - 0x10;\n var colors = [\"white\", \"green\", \"blue\", \"cyan\", \"red\", \"yellow\", \"magenta\"];\n styles.foreground = colors[colorIndex];\n } else {\n styles.foreground = \"white\";\n }\n logger.log(\"INFO\", \"MIDROW: \" + JSON.stringify(styles));\n this.writeScreen.setPen(styles);\n },\n\n outputDataUpdate: function outputDataUpdate() {\n var t = logger.time;\n if (t === null) {\n return;\n }\n if (this.outputFilter) {\n if (this.outputFilter.updateData) {\n this.outputFilter.updateData(t, this.displayedMemory);\n }\n if (this.cueStartTime === null && !this.displayedMemory.isEmpty()) {\n // Start of a new cue\n this.cueStartTime = t;\n } else {\n if (!this.displayedMemory.equals(this.lastOutputScreen)) {\n if (this.outputFilter.newCue) {\n this.outputFilter.newCue(this.cueStartTime, t, this.lastOutputScreen);\n }\n this.cueStartTime = this.displayedMemory.isEmpty() ? null : t;\n }\n }\n this.lastOutputScreen.copy(this.displayedMemory);\n }\n },\n\n cueSplitAtTime: function cueSplitAtTime(t) {\n if (this.outputFilter) {\n if (!this.displayedMemory.isEmpty()) {\n if (this.outputFilter.newCue) {\n this.outputFilter.newCue(this.cueStartTime, t, this.displayedMemory);\n }\n this.cueStartTime = t;\n }\n }\n }\n };\n\n /**\n * Parse CEA-608 data and send decoded data to out1 and out2.\n * @constructor\n * @param {Number} field CEA-608 field (1 or 2)\n * @param {CueHandler} out1 Output from channel1 newCue(startTime, endTime, captionScreen)\n * @param {CueHandler} out2 Output from channel2 newCue(startTime, endTime, captionScreen)\n */\n var Cea608Parser = function Cea608Parser(field, out1, out2) {\n this.field = field || 1;\n this.outputs = [out1, out2];\n this.channels = [new Cea608Channel(1, out1), new Cea608Channel(2, out2)];\n this.currChNr = -1; // Will be 1 or 2\n this.lastCmdA = null; // First byte of last command\n this.lastCmdB = null; // Second byte of last command\n this.bufferedData = [];\n this.startTime = null;\n this.lastTime = null;\n this.dataCounters = { 'padding': 0, 'char': 0, 'cmd': 0, 'other': 0 };\n };\n\n Cea608Parser.prototype = {\n\n getHandler: function getHandler(index) {\n return this.channels[index].getHandler();\n },\n\n setHandler: function setHandler(index, newHandler) {\n this.channels[index].setHandler(newHandler);\n },\n\n /**\n * Add data for time t in forms of list of bytes (unsigned ints). The bytes are treated as pairs.\n */\n addData: function addData(t, byteList) {\n var cmdFound,\n a,\n b,\n charsFound = false;\n\n this.lastTime = t;\n logger.setTime(t);\n\n for (var i = 0; i < byteList.length; i += 2) {\n a = byteList[i] & 0x7f;\n b = byteList[i + 1] & 0x7f;\n if (a === 0 && b === 0) {\n this.dataCounters.padding += 2;\n continue;\n } else {\n logger.log(\"DATA\", \"[\" + numArrayToHexArray([byteList[i], byteList[i + 1]]) + \"] -> (\" + numArrayToHexArray([a, b]) + \")\");\n }\n cmdFound = this.parseCmd(a, b);\n if (!cmdFound) {\n cmdFound = this.parseMidrow(a, b);\n }\n if (!cmdFound) {\n cmdFound = this.parsePAC(a, b);\n }\n if (!cmdFound) {\n cmdFound = this.parseBackgroundAttributes(a, b);\n }\n if (!cmdFound) {\n charsFound = this.parseChars(a, b);\n if (charsFound) {\n if (this.currChNr && this.currChNr >= 0) {\n var channel = this.channels[this.currChNr - 1];\n channel.insertChars(charsFound);\n } else {\n logger.log(\"WARNING\", \"No channel found yet. TEXT-MODE?\");\n }\n }\n }\n if (cmdFound) {\n this.dataCounters.cmd += 2;\n } else if (charsFound) {\n this.dataCounters.char += 2;\n } else {\n this.dataCounters.other += 2;\n logger.log(\"WARNING\", \"Couldn't parse cleaned data \" + numArrayToHexArray([a, b]) + \" orig: \" + numArrayToHexArray([byteList[i], byteList[i + 1]]));\n }\n }\n },\n\n /**\n * Parse Command.\n * @returns {Boolean} Tells if a command was found\n */\n parseCmd: function parseCmd(a, b) {\n var chNr = null;\n\n var cond1 = (a === 0x14 || a === 0x1C) && 0x20 <= b && b <= 0x2F;\n var cond2 = (a === 0x17 || a === 0x1F) && 0x21 <= b && b <= 0x23;\n if (!(cond1 || cond2)) {\n return false;\n }\n\n if (a === this.lastCmdA && b === this.lastCmdB) {\n this.lastCmdA = null;\n this.lastCmdB = null; // Repeated commands are dropped (once)\n logger.log(\"DEBUG\", \"Repeated command (\" + numArrayToHexArray([a, b]) + \") is dropped\");\n return true;\n }\n\n if (a === 0x14 || a === 0x17) {\n chNr = 1;\n } else {\n chNr = 2; // (a === 0x1C || a=== 0x1f)\n }\n\n var channel = this.channels[chNr - 1];\n\n if (a === 0x14 || a === 0x1C) {\n if (b === 0x20) {\n channel.cc_RCL();\n } else if (b === 0x21) {\n channel.cc_BS();\n } else if (b === 0x22) {\n channel.cc_AOF();\n } else if (b === 0x23) {\n channel.cc_AON();\n } else if (b === 0x24) {\n channel.cc_DER();\n } else if (b === 0x25) {\n channel.cc_RU(2);\n } else if (b === 0x26) {\n channel.cc_RU(3);\n } else if (b === 0x27) {\n channel.cc_RU(4);\n } else if (b === 0x28) {\n channel.cc_FON();\n } else if (b === 0x29) {\n channel.cc_RDC();\n } else if (b === 0x2A) {\n channel.cc_TR();\n } else if (b === 0x2B) {\n channel.cc_RTD();\n } else if (b === 0x2C) {\n channel.cc_EDM();\n } else if (b === 0x2D) {\n channel.cc_CR();\n } else if (b === 0x2E) {\n channel.cc_ENM();\n } else if (b === 0x2F) {\n channel.cc_EOC();\n }\n } else {\n //a == 0x17 || a == 0x1F\n channel.cc_TO(b - 0x20);\n }\n this.lastCmdA = a;\n this.lastCmdB = b;\n this.currChNr = chNr;\n return true;\n },\n\n /**\n * Parse midrow styling command\n * @returns {Boolean}\n */\n parseMidrow: function parseMidrow(a, b) {\n var chNr = null;\n\n if ((a === 0x11 || a === 0x19) && 0x20 <= b && b <= 0x2f) {\n if (a === 0x11) {\n chNr = 1;\n } else {\n chNr = 2;\n }\n if (chNr !== this.currChNr) {\n logger.log(\"ERROR\", \"Mismatch channel in midrow parsing\");\n return false;\n }\n var channel = this.channels[chNr - 1];\n channel.cc_MIDROW(b);\n logger.log(\"DEBUG\", \"MIDROW (\" + numArrayToHexArray([a, b]) + \")\");\n return true;\n }\n return false;\n },\n /**\n * Parse Preable Access Codes (Table 53).\n * @returns {Boolean} Tells if PAC found\n */\n parsePAC: function parsePAC(a, b) {\n\n var chNr = null;\n var row = null;\n\n var case1 = (0x11 <= a && a <= 0x17 || 0x19 <= a && a <= 0x1F) && 0x40 <= b && b <= 0x7F;\n var case2 = (a === 0x10 || a === 0x18) && 0x40 <= b && b <= 0x5F;\n if (!(case1 || case2)) {\n return false;\n }\n\n if (a === this.lastCmdA && b === this.lastCmdB) {\n this.lastCmdA = null;\n this.lastCmdB = null;\n return true; // Repeated commands are dropped (once)\n }\n\n chNr = a <= 0x17 ? 1 : 2;\n\n if (0x40 <= b && b <= 0x5F) {\n row = chNr === 1 ? rowsLowCh1[a] : rowsLowCh2[a];\n } else {\n // 0x60 <= b <= 0x7F\n row = chNr === 1 ? rowsHighCh1[a] : rowsHighCh2[a];\n }\n var pacData = this.interpretPAC(row, b);\n var channel = this.channels[chNr - 1];\n channel.setPAC(pacData);\n this.lastCmdA = a;\n this.lastCmdB = b;\n this.currChNr = chNr;\n return true;\n },\n\n /**\n * Interpret the second byte of the pac, and return the information.\n * @returns {Object} pacData with style parameters.\n */\n interpretPAC: function interpretPAC(row, byte) {\n var pacIndex = byte;\n var pacData = { color: null, italics: false, indent: null, underline: false, row: row };\n\n if (byte > 0x5F) {\n pacIndex = byte - 0x60;\n } else {\n pacIndex = byte - 0x40;\n }\n pacData.underline = (pacIndex & 1) === 1;\n if (pacIndex <= 0xd) {\n pacData.color = ['white', 'green', 'blue', 'cyan', 'red', 'yellow', 'magenta', 'white'][Math.floor(pacIndex / 2)];\n } else if (pacIndex <= 0xf) {\n pacData.italics = true;\n pacData.color = 'white';\n } else {\n pacData.indent = Math.floor((pacIndex - 0x10) / 2) * 4;\n }\n return pacData; // Note that row has zero offset. The spec uses 1.\n },\n\n /**\n * Parse characters.\n * @returns An array with 1 to 2 codes corresponding to chars, if found. null otherwise.\n */\n parseChars: function parseChars(a, b) {\n\n var channelNr = null,\n charCodes = null,\n charCode1 = null,\n charCode2 = null;\n\n if (a >= 0x19) {\n channelNr = 2;\n charCode1 = a - 8;\n } else {\n channelNr = 1;\n charCode1 = a;\n }\n if (0x11 <= charCode1 && charCode1 <= 0x13) {\n // Special character\n var oneCode = b;\n if (charCode1 === 0x11) {\n oneCode = b + 0x50;\n } else if (charCode1 === 0x12) {\n oneCode = b + 0x70;\n } else {\n oneCode = b + 0x90;\n }\n logger.log(\"INFO\", \"Special char '\" + getCharForByte(oneCode) + \"' in channel \" + channelNr);\n charCodes = [oneCode];\n } else if (0x20 <= a && a <= 0x7f) {\n charCodes = b === 0 ? [a] : [a, b];\n }\n if (charCodes) {\n var hexCodes = numArrayToHexArray(charCodes);\n logger.log(\"DEBUG\", \"Char codes = \" + hexCodes.join(\",\"));\n this.lastCmdA = null;\n this.lastCmdB = null;\n }\n return charCodes;\n },\n\n /**\n * Parse extended background attributes as well as new foreground color black.\n * @returns{Boolean} Tells if background attributes are found\n */\n parseBackgroundAttributes: function parseBackgroundAttributes(a, b) {\n var bkgData, index, chNr, channel;\n\n var case1 = (a === 0x10 || a === 0x18) && 0x20 <= b && b <= 0x2f;\n var case2 = (a === 0x17 || a === 0x1f) && 0x2d <= b && b <= 0x2f;\n if (!(case1 || case2)) {\n return false;\n }\n bkgData = {};\n if (a === 0x10 || a === 0x18) {\n index = Math.floor((b - 0x20) / 2);\n bkgData.background = backgroundColors[index];\n if (b % 2 === 1) {\n bkgData.background = bkgData.background + \"_semi\";\n }\n } else if (b === 0x2d) {\n bkgData.background = \"transparent\";\n } else {\n bkgData.foreground = \"black\";\n if (b === 0x2f) {\n bkgData.underline = true;\n }\n }\n chNr = a < 0x18 ? 1 : 2;\n channel = this.channels[chNr - 1];\n channel.setBkgData(bkgData);\n this.lastCmdA = null;\n this.lastCmdB = null;\n return true;\n },\n\n /**\n * Reset state of parser and its channels.\n */\n reset: function reset() {\n for (var i = 0; i < this.channels.length; i++) {\n if (this.channels[i]) {\n this.channels[i].reset();\n }\n }\n this.lastCmdA = null;\n this.lastCmdB = null;\n },\n\n /**\n * Trigger the generation of a cue, and the start of a new one if displayScreens are not empty.\n */\n cueSplitAtTime: function cueSplitAtTime(t) {\n for (var i = 0; i < this.channels.length; i++) {\n if (this.channels[i]) {\n this.channels[i].cueSplitAtTime(t);\n }\n }\n }\n };\n\n /**\n * Find ranges corresponding to SEA CEA-608 NALUS in sizeprepended NALU array.\n * @param {raw} dataView of binary data\n * @param {startPos} start position in raw\n * @param {size} total size of data in raw to consider\n * @returns \n */\n var findCea608Nalus = function findCea608Nalus(raw, startPos, size) {\n var nalSize = 0,\n cursor = startPos,\n nalType = 0,\n cea608NaluRanges = [],\n\n // Check SEI data according to ANSI-SCTE 128\n isCEA608SEI = function isCEA608SEI(payloadType, payloadSize, raw, pos) {\n if (payloadType !== 4 || payloadSize < 8) {\n return null;\n }\n var countryCode = raw.getUint8(pos);\n var providerCode = raw.getUint16(pos + 1);\n var userIdentifier = raw.getUint32(pos + 3);\n var userDataTypeCode = raw.getUint8(pos + 7);\n return countryCode == 0xB5 && providerCode == 0x31 && userIdentifier == 0x47413934 && userDataTypeCode == 0x3;\n };\n while (cursor < startPos + size) {\n nalSize = raw.getUint32(cursor);\n nalType = raw.getUint8(cursor + 4) & 0x1F;\n //console.log(time + \" NAL \" + nalType);\n if (nalType === 6) {\n // SEI NAL Unit. The NAL header is the first byte\n //console.log(\"SEI NALU of size \" + nalSize + \" at time \" + time);\n var pos = cursor + 5;\n var payloadType = -1;\n while (pos < cursor + 4 + nalSize - 1) {\n // The last byte should be rbsp_trailing_bits\n payloadType = 0;\n var b = 0xFF;\n while (b === 0xFF) {\n b = raw.getUint8(pos);\n payloadType += b;\n pos++;\n }\n var payloadSize = 0;\n b = 0xFF;\n while (b === 0xFF) {\n b = raw.getUint8(pos);\n payloadSize += b;\n pos++;\n }\n if (isCEA608SEI(payloadType, payloadSize, raw, pos)) {\n //console.log(\"CEA608 SEI \" + time + \" \" + payloadSize);\n cea608NaluRanges.push([pos, payloadSize]);\n }\n pos += payloadSize;\n }\n }\n cursor += nalSize + 4;\n }\n return cea608NaluRanges;\n };\n\n var extractCea608DataFromRange = function extractCea608DataFromRange(raw, cea608Range) {\n var pos = cea608Range[0];\n var fieldData = [[], []];\n\n pos += 8; // Skip the identifier up to userDataTypeCode\n var ccCount = raw.getUint8(pos) & 0x1f;\n pos += 2; // Advance 1 and skip reserved byte\n\n for (var i = 0; i < ccCount; i++) {\n var byte = raw.getUint8(pos);\n var ccValid = byte & 0x4;\n var ccType = byte & 0x3;\n pos++;\n var ccData1 = raw.getUint8(pos); // Keep parity bit\n pos++;\n var ccData2 = raw.getUint8(pos); // Keep parity bit\n pos++;\n if (ccValid && (ccData1 & 0x7f) + (ccData2 & 0x7f) !== 0) {\n //Check validity and non-empty data\n if (ccType === 0) {\n fieldData[0].push(ccData1);\n fieldData[0].push(ccData2);\n } else if (ccType === 1) {\n fieldData[1].push(ccData1);\n fieldData[1].push(ccData2);\n }\n }\n }\n return fieldData;\n };\n\n exports.logger = logger;\n exports.PenState = PenState;\n exports.CaptionScreen = CaptionScreen;\n exports.Cea608Parser = Cea608Parser;\n exports.findCea608Nalus = findCea608Nalus;\n exports.extractCea608DataFromRange = extractCea608DataFromRange;\n})(typeof exports === 'undefined' ? undefined.cea608parser = {} : exports);\n\n},{}],2:[function(_dereq_,module,exports){\n/*\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * author Digital Primates\n * copyright dash-if 2012\n */\n\n/*\n * var parent,\n * child,\n * properties = [\n {\n name: 'profiles',\n merge: false\n }\n ];\n *\n * parent = {};\n * parent.name = \"ParentNode\";\n * parent.isRoor = false;\n * parent.isArray = false;\n * parent.parent = null;\n * parent.children = [];\n * parent.properties = properties;\n *\n * child = {};\n * child.name = \"ChildNode\";\n * child.isRoor = false;\n * child.isArray = true;\n * child.parent = parent;\n * child.children = null;\n * child.properties = properties;\n * parent.children.push(child);\n *\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nfunction ObjectIron(map) {\n\n var lookup, len, i;\n\n // create a list of top level items to search for\n lookup = [];\n for (i = 0, len = map.length; i < len; i += 1) {\n if (map[i].isRoot) {\n lookup.push(\"root\");\n } else {\n lookup.push(map[i].name);\n }\n }\n\n var mergeValues = function mergeValues(parentItem, childItem) {\n var name, parentValue, childValue;\n\n if (parentItem === null || childItem === null) {\n return;\n }\n\n for (name in parentItem) {\n if (parentItem.hasOwnProperty(name)) {\n if (!childItem.hasOwnProperty(name)) {\n childItem[name] = parentItem[name];\n }\n }\n }\n },\n mapProperties = function mapProperties(properties, parent, child) {\n var i, len, property, parentValue, childValue;\n\n if (properties === null || properties.length === 0) {\n return;\n }\n\n for (i = 0, len = properties.length; i < len; i += 1) {\n property = properties[i];\n\n if (parent.hasOwnProperty(property.name)) {\n if (child.hasOwnProperty(property.name)) {\n // check to see if we should merge\n if (property.merge) {\n parentValue = parent[property.name];\n childValue = child[property.name];\n\n // complex objects; merge properties\n if (typeof parentValue === 'object' && typeof childValue === 'object') {\n mergeValues(parentValue, childValue);\n }\n // simple objects; merge them together\n else {\n if (property.mergeFunction != null) {\n child[property.name] = property.mergeFunction(parentValue, childValue);\n } else {\n child[property.name] = parentValue + childValue;\n }\n }\n }\n } else {\n // just add the property\n child[property.name] = parent[property.name];\n }\n }\n }\n },\n mapItem = function mapItem(obj, node) {\n var item = obj,\n i,\n len,\n v,\n len2,\n array,\n childItem,\n childNode,\n property;\n\n if (item.children === null || item.children.length === 0) {\n return;\n }\n\n for (i = 0, len = item.children.length; i < len; i += 1) {\n childItem = item.children[i];\n\n if (node.hasOwnProperty(childItem.name)) {\n if (childItem.isArray) {\n array = node[childItem.name + \"_asArray\"];\n for (v = 0, len2 = array.length; v < len2; v += 1) {\n childNode = array[v];\n mapProperties(item.properties, node, childNode);\n mapItem(childItem, childNode);\n }\n } else {\n childNode = node[childItem.name];\n mapProperties(item.properties, node, childNode);\n mapItem(childItem, childNode);\n }\n }\n }\n },\n performMapping = function performMapping(source) {\n var i, len, pi, pp, item, node, array;\n\n if (source === null) {\n return source;\n }\n\n if (typeof source !== 'object') {\n return source;\n }\n\n // first look to see if anything cares about the root node\n for (i = 0, len = lookup.length; i < len; i += 1) {\n if (lookup[i] === \"root\") {\n item = map[i];\n node = source;\n mapItem(item, node);\n }\n }\n\n // iterate over the objects and look for any of the items we care about\n for (pp in source) {\n if (source.hasOwnProperty(pp) && pp != \"__children\") {\n pi = lookup.indexOf(pp);\n if (pi !== -1) {\n item = map[pi];\n\n if (item.isArray) {\n array = source[pp + \"_asArray\"];\n for (i = 0, len = array.length; i < len; i += 1) {\n node = array[i];\n mapItem(item, node);\n }\n } else {\n node = source[pp];\n mapItem(item, node);\n }\n }\n // now check this to see if he has any of the properties we care about\n performMapping(source[pp]);\n }\n }\n\n return source;\n };\n\n return {\n run: performMapping\n };\n}\n\nexports['default'] = ObjectIron;\nmodule.exports = exports['default'];\n\n},{}],3:[function(_dereq_,module,exports){\n/*\n Copyright 2011 Abdulla Abdurakhmanov\n Original sources are available at https://code.google.com/p/x2js/\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n */\n\n/*\n Modified to keep track of children nodes in order in attribute __children.\n*/\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nfunction X2JS(matchers, attrPrefix, ignoreRoot) {\n\tif (attrPrefix === null || attrPrefix === undefined) {\n\t\tattrPrefix = \"_\";\n\t}\n\n\tif (ignoreRoot === null || ignoreRoot === undefined) {\n\t\tignoreRoot = false;\n\t}\n\n\tvar VERSION = \"1.0.11\";\n\tvar escapeMode = false;\n\n\tvar DOMNodeTypes = {\n\t\tELEMENT_NODE: 1,\n\t\tTEXT_NODE: 3,\n\t\tCDATA_SECTION_NODE: 4,\n\t\tCOMMENT_NODE: 8,\n\t\tDOCUMENT_NODE: 9\n\t};\n\n\tfunction getNodeLocalName(node) {\n\t\tvar nodeLocalName = node.localName;\n\t\tif (nodeLocalName == null) // Yeah, this is IE!!\n\t\t\tnodeLocalName = node.baseName;\n\t\tif (nodeLocalName == null || nodeLocalName == \"\") // ==\"\" is IE too\n\t\t\tnodeLocalName = node.nodeName;\n\t\treturn nodeLocalName;\n\t}\n\n\tfunction getNodePrefix(node) {\n\t\treturn node.prefix;\n\t}\n\n\tfunction escapeXmlChars(str) {\n\t\tif (typeof str == \"string\") return str.replace(/&/g, '&').replace(//g, '>').replace(/\"/g, '"').replace(/'/g, ''').replace(/\\//g, '/');else return str;\n\t}\n\n\tfunction unescapeXmlChars(str) {\n\t\treturn str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '\"').replace(/'/g, \"'\").replace(///g, '\\/');\n\t}\n\n\tfunction parseDOMChildren(node) {\n\t\tif (node.nodeType == DOMNodeTypes.DOCUMENT_NODE) {\n\t\t\tvar result,\n\t\t\t child = node.firstChild,\n\t\t\t i,\n\t\t\t len;\n\n\t\t\t// get the first node that isn't a comment\n\t\t\tfor (i = 0, len = node.childNodes.length; i < len; i += 1) {\n\t\t\t\tif (node.childNodes[i].nodeType !== DOMNodeTypes.COMMENT_NODE) {\n\t\t\t\t\tchild = node.childNodes[i];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (ignoreRoot) {\n\t\t\t\tresult = parseDOMChildren(child);\n\t\t\t} else {\n\t\t\t\tresult = {};\n\t\t\t\tvar childName = getNodeLocalName(child);\n\t\t\t\tresult[childName] = parseDOMChildren(child);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t} else if (node.nodeType == DOMNodeTypes.ELEMENT_NODE) {\n\t\t\tvar result = new Object();\n\t\t\tresult.__cnt = 0;\n\n\t\t\tvar children = [];\n\n\t\t\tvar nodeChildren = node.childNodes;\n\n\t\t\t// Children nodes\n\t\t\tfor (var cidx = 0; cidx < nodeChildren.length; cidx++) {\n\t\t\t\tvar child = nodeChildren.item(cidx); // nodeChildren[cidx];\n\t\t\t\tvar childName = getNodeLocalName(child);\n\n\t\t\t\tresult.__cnt++;\n\t\t\t\tif (result[childName] == null) {\n\t\t\t\t\tvar c = parseDOMChildren(child);\n\t\t\t\t\tif (childName != \"#text\" || /[^\\s]/.test(c)) {\n\t\t\t\t\t\tvar o = {};\n\t\t\t\t\t\to[childName] = c;\n\t\t\t\t\t\tchildren.push(o);\n\t\t\t\t\t}\n\t\t\t\t\tresult[childName] = c;\n\t\t\t\t\tresult[childName + \"_asArray\"] = new Array(1);\n\t\t\t\t\tresult[childName + \"_asArray\"][0] = result[childName];\n\t\t\t\t} else {\n\t\t\t\t\tif (result[childName] != null) {\n\t\t\t\t\t\tif (!(result[childName] instanceof Array)) {\n\t\t\t\t\t\t\tvar tmpObj = result[childName];\n\t\t\t\t\t\t\tresult[childName] = new Array();\n\t\t\t\t\t\t\tresult[childName][0] = tmpObj;\n\n\t\t\t\t\t\t\tresult[childName + \"_asArray\"] = result[childName];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvar aridx = 0;\n\t\t\t\t\twhile (result[childName][aridx] != null) aridx++;\n\n\t\t\t\t\tvar c = parseDOMChildren(child);\n\t\t\t\t\tif (childName != \"#text\" || /[^\\s]/.test(c)) {\n\t\t\t\t\t\t// Don't add white-space text nodes\n\t\t\t\t\t\tvar o = {};\n\t\t\t\t\t\to[childName] = c;\n\t\t\t\t\t\tchildren.push(o);\n\t\t\t\t\t}\n\t\t\t\t\tresult[childName][aridx] = c;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresult.__children = children;\n\n\t\t\t// Attributes\n\t\t\tfor (var aidx = 0; aidx < node.attributes.length; aidx++) {\n\t\t\t\tvar attr = node.attributes.item(aidx); // [aidx];\n\t\t\t\tresult.__cnt++;\n\n\t\t\t\tvar value2 = attr.value;\n\t\t\t\tfor (var m = 0, ml = matchers.length; m < ml; m++) {\n\t\t\t\t\tvar matchobj = matchers[m];\n\t\t\t\t\tif (matchobj.test.call(this, attr)) value2 = matchobj.converter.call(this, attr.value);\n\t\t\t\t}\n\n\t\t\t\tresult[attrPrefix + attr.name] = value2;\n\t\t\t}\n\n\t\t\t// Node namespace prefix\n\t\t\tvar nodePrefix = getNodePrefix(node);\n\t\t\tif (nodePrefix != null && nodePrefix != \"\") {\n\t\t\t\tresult.__cnt++;\n\t\t\t\tresult.__prefix = nodePrefix;\n\t\t\t}\n\n\t\t\tif (result.__cnt == 1 && result[\"#text\"] != null) {\n\t\t\t\tresult = result[\"#text\"];\n\t\t\t}\n\n\t\t\tif (result[\"#text\"] != null) {\n\t\t\t\tresult.__text = result[\"#text\"];\n\t\t\t\tif (escapeMode) result.__text = unescapeXmlChars(result.__text);\n\t\t\t\tdelete result[\"#text\"];\n\t\t\t\tdelete result[\"#text_asArray\"];\n\t\t\t}\n\t\t\tif (result[\"#cdata-section\"] != null) {\n\t\t\t\tresult.__cdata = result[\"#cdata-section\"];\n\t\t\t\tdelete result[\"#cdata-section\"];\n\t\t\t\tdelete result[\"#cdata-section_asArray\"];\n\t\t\t}\n\n\t\t\tif (result.__text != null || result.__cdata != null) {\n\t\t\t\tresult.toString = function () {\n\t\t\t\t\treturn (this.__text != null ? this.__text : '') + (this.__cdata != null ? this.__cdata : '');\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn result;\n\t\t} else if (node.nodeType == DOMNodeTypes.TEXT_NODE || node.nodeType == DOMNodeTypes.CDATA_SECTION_NODE) {\n\t\t\treturn node.nodeValue;\n\t\t} else if (node.nodeType == DOMNodeTypes.COMMENT_NODE) {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\tfunction startTag(jsonObj, element, attrList, closed) {\n\t\tvar resultStr = \"<\" + (jsonObj != null && jsonObj.__prefix != null ? jsonObj.__prefix + \":\" : \"\") + element;\n\t\tif (attrList != null) {\n\t\t\tfor (var aidx = 0; aidx < attrList.length; aidx++) {\n\t\t\t\tvar attrName = attrList[aidx];\n\t\t\t\tvar attrVal = jsonObj[attrName];\n\t\t\t\tresultStr += \" \" + attrName.substr(1) + \"='\" + attrVal + \"'\";\n\t\t\t}\n\t\t}\n\t\tif (!closed) resultStr += \">\";else resultStr += \"/>\";\n\t\treturn resultStr;\n\t}\n\n\tfunction endTag(jsonObj, elementName) {\n\t\treturn \"\";\n\t}\n\n\tfunction endsWith(str, suffix) {\n\t\treturn str.indexOf(suffix, str.length - suffix.length) !== -1;\n\t}\n\n\tfunction jsonXmlSpecialElem(jsonObj, jsonObjField) {\n\t\tif (endsWith(jsonObjField.toString(), \"_asArray\") || jsonObjField.toString().indexOf(\"_\") == 0 || jsonObj[jsonObjField] instanceof Function) return true;else return false;\n\t}\n\n\tfunction jsonXmlElemCount(jsonObj) {\n\t\tvar elementsCnt = 0;\n\t\tif (jsonObj instanceof Object) {\n\t\t\tfor (var it in jsonObj) {\n\t\t\t\tif (jsonXmlSpecialElem(jsonObj, it)) continue;\n\t\t\t\telementsCnt++;\n\t\t\t}\n\t\t}\n\t\treturn elementsCnt;\n\t}\n\n\tfunction parseJSONAttributes(jsonObj) {\n\t\tvar attrList = [];\n\t\tif (jsonObj instanceof Object) {\n\t\t\tfor (var ait in jsonObj) {\n\t\t\t\tif (ait.toString().indexOf(\"__\") == -1 && ait.toString().indexOf(\"_\") == 0) {\n\t\t\t\t\tattrList.push(ait);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn attrList;\n\t}\n\n\tfunction parseJSONTextAttrs(jsonTxtObj) {\n\t\tvar result = \"\";\n\n\t\tif (jsonTxtObj.__cdata != null) {\n\t\t\tresult += \"\";\n\t\t}\n\n\t\tif (jsonTxtObj.__text != null) {\n\t\t\tif (escapeMode) result += escapeXmlChars(jsonTxtObj.__text);else result += jsonTxtObj.__text;\n\t\t}\n\t\treturn result;\n\t}\n\n\tfunction parseJSONTextObject(jsonTxtObj) {\n\t\tvar result = \"\";\n\n\t\tif (jsonTxtObj instanceof Object) {\n\t\t\tresult += parseJSONTextAttrs(jsonTxtObj);\n\t\t} else if (jsonTxtObj != null) {\n\t\t\tif (escapeMode) result += escapeXmlChars(jsonTxtObj);else result += jsonTxtObj;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tfunction parseJSONArray(jsonArrRoot, jsonArrObj, attrList) {\n\t\tvar result = \"\";\n\t\tif (jsonArrRoot.length == 0) {\n\t\t\tresult += startTag(jsonArrRoot, jsonArrObj, attrList, true);\n\t\t} else {\n\t\t\tfor (var arIdx = 0; arIdx < jsonArrRoot.length; arIdx++) {\n\t\t\t\tresult += startTag(jsonArrRoot[arIdx], jsonArrObj, parseJSONAttributes(jsonArrRoot[arIdx]), false);\n\t\t\t\tresult += parseJSONObject(jsonArrRoot[arIdx]);\n\t\t\t\tresult += endTag(jsonArrRoot[arIdx], jsonArrObj);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tfunction parseJSONObject(jsonObj) {\n\t\tvar result = \"\";\n\n\t\tvar elementsCnt = jsonXmlElemCount(jsonObj);\n\n\t\tif (elementsCnt > 0) {\n\t\t\tfor (var it in jsonObj) {\n\n\t\t\t\tif (jsonXmlSpecialElem(jsonObj, it)) continue;\n\n\t\t\t\tvar subObj = jsonObj[it];\n\n\t\t\t\tvar attrList = parseJSONAttributes(subObj);\n\n\t\t\t\tif (subObj == null || subObj == undefined) {\n\t\t\t\t\tresult += startTag(subObj, it, attrList, true);\n\t\t\t\t} else if (subObj instanceof Object) {\n\n\t\t\t\t\tif (subObj instanceof Array) {\n\t\t\t\t\t\tresult += parseJSONArray(subObj, it, attrList);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar subObjElementsCnt = jsonXmlElemCount(subObj);\n\t\t\t\t\t\tif (subObjElementsCnt > 0 || subObj.__text != null || subObj.__cdata != null) {\n\t\t\t\t\t\t\tresult += startTag(subObj, it, attrList, false);\n\t\t\t\t\t\t\tresult += parseJSONObject(subObj);\n\t\t\t\t\t\t\tresult += endTag(subObj, it);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresult += startTag(subObj, it, attrList, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tresult += startTag(subObj, it, attrList, false);\n\t\t\t\t\tresult += parseJSONTextObject(subObj);\n\t\t\t\t\tresult += endTag(subObj, it);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tresult += parseJSONTextObject(jsonObj);\n\n\t\treturn result;\n\t}\n\n\tthis.parseXmlString = function (xmlDocStr) {\n\t\tvar xmlDoc, parser, ns;\n\n\t\tif (window.DOMParser) {\n\t\t\tparser = new window.DOMParser();\n\n\t\t\ttry {\n\t\t\t\tns = parser.parseFromString('<', 'text/xml').getElementsByTagName(\"parsererror\")[0].namespaceURI;\n\t\t\t} catch (e) {\n\t\t\t\t// IE11 will definitely throw SyntaxError here\n\t\t\t\t// ns will be undefined\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\txmlDoc = parser.parseFromString(xmlDocStr, \"text/xml\");\n\n\t\t\t\tif (ns) {\n\t\t\t\t\tif (xmlDoc.getElementsByTagNameNS(ns, 'parsererror').length) {\n\t\t\t\t\t\txmlDoc = undefined;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\t// IE11 may throw SyntaxError here if xmlDocStr is\n\t\t\t\t// not well formed. xmlDoc will be undefined\n\t\t\t}\n\t\t} else {\n\t\t\t\t// IE :(\n\t\t\t\tif (xmlDocStr.indexOf(\"\") + 2);\n\t\t\t\t}\n\t\t\t\txmlDoc = new ActiveXObject(\"Microsoft.XMLDOM\");\n\t\t\t\txmlDoc.async = \"false\";\n\t\t\t\txmlDoc.loadXML(xmlDocStr);\n\t\t\t}\n\t\treturn xmlDoc;\n\t};\n\n\tthis.xml2json = function (xmlDoc) {\n\t\treturn parseDOMChildren(xmlDoc);\n\t};\n\n\tthis.xml_str2json = function (xmlDocStr) {\n\t\tvar xmlDoc = this.parseXmlString(xmlDocStr);\n\t\treturn xmlDoc ? this.xml2json(xmlDoc) : undefined;\n\t};\n\n\tthis.json2xml_str = function (jsonObj) {\n\t\treturn parseJSONObject(jsonObj);\n\t};\n\n\tthis.json2xml = function (jsonObj) {\n\t\tvar xmlDocStr = this.json2xml_str(jsonObj);\n\t\treturn this.parseXmlString(xmlDocStr);\n\t};\n\n\tthis.getVersion = function () {\n\t\treturn VERSION;\n\t};\n\n\tthis.escapeMode = function (enabled) {\n\t\tescapeMode = enabled;\n\t};\n}\nexports[\"default\"] = X2JS;\nmodule.exports = exports[\"default\"];\n\n},{}],4:[function(_dereq_,module,exports){\n/*! codem-isoboxer v0.2.8 https://github.com/madebyhiro/codem-isoboxer/blob/master/LICENSE.txt */\nvar ISOBoxer = {};\n\nISOBoxer.parseBuffer = function(arrayBuffer) {\n return new ISOFile(arrayBuffer).parse();\n};\n\nISOBoxer.addBoxParser = function(type, parser) {\n if (typeof type !== 'string' || typeof parser !== 'function') {\n return;\n }\n ISOBox.prototype._boxParsers[type] = parser;\n};\n\nISOBoxer.Utils = {};\nISOBoxer.Utils.dataViewToString = function(dataView, encoding) {\n var impliedEncoding = encoding || 'utf-8';\n if (typeof TextDecoder !== 'undefined') {\n return new TextDecoder(impliedEncoding).decode(dataView);\n }\n var a = [];\n var i = 0;\n\n if (impliedEncoding === 'utf-8') {\n /* The following algorithm is essentially a rewrite of the UTF8.decode at\n http://bannister.us/weblog/2007/simple-base64-encodedecode-javascript/\n */\n\n while (i < dataView.byteLength) {\n var c = dataView.getUint8(i++);\n if (c < 0x80) {\n // 1-byte character (7 bits)\n } else if (c < 0xe0) {\n // 2-byte character (11 bits)\n c = (c & 0x1f) << 6;\n c |= (dataView.getUint8(i++) & 0x3f);\n } else if (c < 0xf0) {\n // 3-byte character (16 bits)\n c = (c & 0xf) << 12;\n c |= (dataView.getUint8(i++) & 0x3f) << 6;\n c |= (dataView.getUint8(i++) & 0x3f);\n } else {\n // 4-byte character (21 bits)\n c = (c & 0x7) << 18;\n c |= (dataView.getUint8(i++) & 0x3f) << 12;\n c |= (dataView.getUint8(i++) & 0x3f) << 6;\n c |= (dataView.getUint8(i++) & 0x3f);\n }\n a.push(String.fromCharCode(c));\n }\n } else { // Just map byte-by-byte (probably wrong)\n while (i < dataView.byteLength) {\n a.push(String.fromCharCode(dataView.getUint8(i++)));\n }\n }\n return a.join('');\n};\n\nif (typeof exports !== 'undefined') {\n exports.parseBuffer = ISOBoxer.parseBuffer;\n exports.addBoxParser = ISOBoxer.addBoxParser;\n exports.Utils = ISOBoxer.Utils;\n};\nISOBoxer.Cursor = function(initialOffset) {\n this.offset = (typeof initialOffset == 'undefined' ? 0 : initialOffset);\n};;\nvar ISOFile = function(arrayBuffer) {\n this._raw = new DataView(arrayBuffer);\n this._cursor = new ISOBoxer.Cursor();\n this.boxes = [];\n};\n\nISOFile.prototype.fetch = function(type) {\n var result = this.fetchAll(type, true);\n return (result.length ? result[0] : null);\n};\n\nISOFile.prototype.fetchAll = function(type, returnEarly) {\n var result = [];\n ISOFile._sweep.call(this, type, result, returnEarly);\n return result;\n};\n\nISOFile.prototype.parse = function() {\n this._cursor.offset = 0;\n this.boxes = [];\n while (this._cursor.offset < this._raw.byteLength) {\n var box = ISOBox.parse(this);\n\n // Box could not be parsed\n if (typeof box.type === 'undefined') break;\n\n this.boxes.push(box);\n }\n return this;\n};\n\nISOFile._sweep = function(type, result, returnEarly) {\n if (this.type && this.type == type) result.push(this);\n for (var box in this.boxes) {\n if (result.length && returnEarly) return;\n ISOFile._sweep.call(this.boxes[box], type, result, returnEarly);\n }\n};;\nvar ISOBox = function() {\n this._cursor = new ISOBoxer.Cursor();\n};\n\nISOBox.parse = function(parent) {\n var newBox = new ISOBox();\n newBox._offset = parent._cursor.offset;\n newBox._root = (parent._root ? parent._root : parent);\n newBox._raw = parent._raw;\n newBox._parent = parent;\n newBox._parseBox();\n parent._cursor.offset = newBox._raw.byteOffset + newBox._raw.byteLength;\n return newBox;\n};\n\nISOBox.prototype._readInt = function(size) {\n var result = null;\n switch(size) {\n case 8:\n result = this._raw.getInt8(this._cursor.offset - this._raw.byteOffset);\n break;\n case 16:\n result = this._raw.getInt16(this._cursor.offset - this._raw.byteOffset);\n break;\n case 32:\n result = this._raw.getInt32(this._cursor.offset - this._raw.byteOffset);\n break;\n case 64:\n // Warning: JavaScript cannot handle 64-bit integers natively.\n // This will give unexpected results for integers >= 2^53\n var s1 = this._raw.getInt32(this._cursor.offset - this._raw.byteOffset);\n var s2 = this._raw.getInt32(this._cursor.offset - this._raw.byteOffset + 4);\n result = (s1 * Math.pow(2,32)) + s2;\n break;\n }\n this._cursor.offset += (size >> 3);\n return result;\n};\n\nISOBox.prototype._readUint = function(size) {\n var result = null,\n s1, s2;\n switch(size) {\n case 8:\n result = this._raw.getUint8(this._cursor.offset - this._raw.byteOffset);\n break;\n case 16:\n result = this._raw.getUint16(this._cursor.offset - this._raw.byteOffset);\n break;\n case 24:\n s1 = this._raw.getUint16(this._cursor.offset - this._raw.byteOffset);\n s2 = this._raw.getUint8(this._cursor.offset - this._raw.byteOffset + 2);\n result = (s1 << 8) + s2;\n break;\n case 32:\n result = this._raw.getUint32(this._cursor.offset - this._raw.byteOffset);\n break;\n case 64:\n // Warning: JavaScript cannot handle 64-bit integers natively.\n // This will give unexpected results for integers >= 2^53\n s1 = this._raw.getUint32(this._cursor.offset - this._raw.byteOffset);\n s2 = this._raw.getUint32(this._cursor.offset - this._raw.byteOffset + 4);\n result = (s1 * Math.pow(2,32)) + s2;\n break;\n }\n this._cursor.offset += (size >> 3);\n return result;\n};\n\nISOBox.prototype._readString = function(length) {\n var str = '';\n for (var c = 0; c < length; c++) {\n var char = this._readUint(8);\n str += String.fromCharCode(char);\n }\n return str;\n};\n\nISOBox.prototype._readTerminatedString = function() {\n var str = '';\n while (this._cursor.offset - this._offset < this._raw.byteLength) {\n var char = this._readUint(8);\n if (char === 0) break;\n str += String.fromCharCode(char);\n }\n return str;\n};\n\nISOBox.prototype._readTemplate = function(size) {\n var pre = this._readUint(size / 2);\n var post = this._readUint(size / 2);\n return pre + (post / Math.pow(2, size / 2));\n};\n\nISOBox.prototype._readData = function(size) {\n var length = (size > 0) ? size : (this._raw.byteLength - (this._cursor.offset - this._offset));\n var data = new DataView(this._raw.buffer, this._cursor.offset, length);\n this._cursor.offset += length;\n return data;\n};\n\nISOBox.prototype._parseBox = function() {\n this._cursor.offset = this._offset;\n\n // return immediately if there are not enough bytes to read the header\n if (this._offset + 8 > this._raw.buffer.byteLength) {\n this._root._incomplete = true;\n return;\n }\n\n this.size = this._readUint(32);\n this.type = this._readString(4);\n\n if (this.size == 1) { this.largesize = this._readUint(64); }\n if (this.type == 'uuid') { this.usertype = this._readString(16); }\n\n switch(this.size) {\n case 0:\n this._raw = new DataView(this._raw.buffer, this._offset, (this._raw.byteLength - this._cursor.offset));\n break;\n case 1:\n if (this._offset + this.size > this._raw.buffer.byteLength) {\n this._incomplete = true;\n this._root._incomplete = true;\n } else {\n this._raw = new DataView(this._raw.buffer, this._offset, this.largesize);\n }\n break;\n default:\n if (this._offset + this.size > this._raw.buffer.byteLength) {\n this._incomplete = true;\n this._root._incomplete = true;\n } else {\n this._raw = new DataView(this._raw.buffer, this._offset, this.size);\n }\n }\n\n // additional parsing\n if (!this._incomplete && this._boxParsers[this.type]) this._boxParsers[this.type].call(this);\n};\n\nISOBox.prototype._parseFullBox = function() {\n this.version = this._readUint(8);\n this.flags = this._readUint(24);\n};\n\nISOBox.prototype._boxParsers = {};;\n// ISO/IEC 14496-15:2014 - avc1 box\nISOBox.prototype._boxParsers['avc1'] = function() {\n // SampleEntry fields\n this.reserved1 = [\n this._readUint(8),\n this._readUint(8),\n this._readUint(8),\n this._readUint(8),\n this._readUint(8),\n this._readUint(8)\n ];\n this.data_reference_index = this._readUint(16);\n // VisualSampleEntry fields\n this.pre_defined1 = this._readUint(16);\n this.reserved2 = this._readUint(16);\n this.pre_defined2 = [\n this._readUint(32),\n this._readUint(32),\n this._readUint(32)\n ];\n this.width = this._readUint(16);\n this.height = this._readUint(16);\n this.horizresolution = this._readTemplate(32);\n this.vertresolution = this._readTemplate(32);\n this.reserved3 = this._readUint(32);\n this.frame_count = this._readUint(16);\n var length = this._readUint(8);\n this.compressorname = this._readString(length);\n for (var i = 0; i < (31 - length); i++) {\n this._readUint(8);\n }\n this.depth = this._readUint(16);\n this.pre_defined3 = this._readInt(16);\n // AVCSampleEntry fields\n this.config = this._readData();\n};;\n// Simple container boxes, all from ISO/IEC 14496-12:2012 except vttc which is from 14496-30.\n[\n 'moov', 'trak', 'tref', 'mdia', 'minf', 'stbl', 'edts', 'dinf',\n 'mvex', 'moof', 'traf', 'mfra', 'udta', 'meco', 'strk', 'vttc'\n].forEach(function(boxType) {\n ISOBox.prototype._boxParsers[boxType] = function() {\n this.boxes = [];\n while (this._cursor.offset - this._raw.byteOffset < this._raw.byteLength) {\n this.boxes.push(ISOBox.parse(this));\n }\n };\n});\n;\n// ISO/IEC 14496-12:2012 - 8.6.6 Edit List Box\nISOBox.prototype._boxParsers['elst'] = function() {\n this._parseFullBox();\n this.entry_count = this._readUint(32);\n this.entries = [];\n\n for (var i=1; i <= this.entry_count; i++) {\n var entry = {};\n if (this.version == 1) {\n entry.segment_duration = this._readUint(64);\n entry.media_time = this._readInt(64);\n } else {\n entry.segment_duration = this._readUint(32);\n entry.media_time = this._readInt(32);\n }\n entry.media_rate_integer = this._readInt(16);\n entry.media_rate_fraction = this._readInt(16);\n this.entries.push(entry);\n }\n};;\n// ISO/IEC 23009-1:2014 - 5.10.3.3 Event Message Box\nISOBox.prototype._boxParsers['emsg'] = function() {\n this._parseFullBox();\n this.scheme_id_uri = this._readTerminatedString();\n this.value = this._readTerminatedString();\n this.timescale = this._readUint(32);\n this.presentation_time_delta = this._readUint(32);\n this.event_duration = this._readUint(32);\n this.id = this._readUint(32);\n this.message_data = new DataView(this._raw.buffer, this._cursor.offset, this._raw.byteLength - (this._cursor.offset - this._offset));\n};;\n// ISO/IEC 14496-12:2012 - 8.1.2 Free Space Box\nISOBox.prototype._boxParsers['free'] = ISOBox.prototype._boxParsers['skip'] = function() {\n this.data = new DataView(this._raw.buffer, this._cursor.offset, this._raw.byteLength - (this._cursor.offset - this._offset));\n};;\n// ISO/IEC 14496-12:2012 - 4.3 File Type Box / 8.16.2 Segment Type Box\nISOBox.prototype._boxParsers['ftyp'] = ISOBox.prototype._boxParsers['styp'] = function() {\n this.major_brand = this._readString(4);\n this.minor_version = this._readUint(32);\n this.compatible_brands = [];\n\n while (this._cursor.offset - this._raw.byteOffset < this._raw.byteLength) {\n this.compatible_brands.push(this._readString(4));\n }\n};;\n// ISO/IEC 14496-12:2012 - 8.4.3 Handler Reference Box\nISOBox.prototype._boxParsers['hdlr'] = function() {\n this._parseFullBox();\n this.pre_defined = this._readUint(32);\n this.handler_type = this._readString(4);\n this.reserved = [this._readUint(32), this._readUint(32), this._readUint(32)];\n this.name = this._readTerminatedString();\n};;\n// ISO/IEC 14496-12:2012 - 8.1.1 Media Data Box\nISOBox.prototype._boxParsers['mdat'] = function() {\n this.data = this._readData();\n};;\n// ISO/IEC 14496-12:2012 - 8.4.2 Media Header Box\nISOBox.prototype._boxParsers['mdhd'] = function() {\n this._parseFullBox();\n if (this.version == 1) {\n this.creation_time = this._readUint(64);\n this.modification_time = this._readUint(64);\n this.timescale = this._readUint(32);\n this.duration = this._readUint(64);\n } else {\n this.creation_time = this._readUint(32);\n this.modification_time = this._readUint(32);\n this.timescale = this._readUint(32);\n this.duration = this._readUint(32);\n }\n var language = this._readUint(16);\n this.pad = (language >> 15);\n this.language = String.fromCharCode(\n ((language >> 10) & 0x1F) + 0x60,\n ((language >> 5) & 0x1F) + 0x60,\n (language & 0x1F) + 0x60\n );\n this.pre_defined = this._readUint(16);\n};;\n// ISO/IEC 14496-12:2012 - 8.8.2 Movie Extends Header Box\nISOBox.prototype._boxParsers['mehd'] = function() {\n this._parseFullBox();\n\n if (this.version == 1) {\n this.fragment_duration = this._readUint(64);\n } else { // version==0\n this.fragment_duration = this._readUint(32);\n }\n};;\n// ISO/IEC 14496-12:2012 - 8.8.5 Movie Fragment Header Box\nISOBox.prototype._boxParsers['mfhd'] = function() {\n this._parseFullBox();\n this.sequence_number = this._readUint(32);\n};;\n// ISO/IEC 14496-12:2012 - 8.8.11 Movie Fragment Random Access Box\nISOBox.prototype._boxParsers['mfro'] = function() {\n this._parseFullBox();\n this.mfra_size = this._readUint(32); // Called mfra_size to distinguish from the normal \"size\" attribute of a box\n};\n;\n// ISO/IEC 14496-12:2012 - 8.5.2.2 mp4a box (use AudioSampleEntry definition and naming)\nISOBox.prototype._boxParsers['mp4a'] = function() {\n // SampleEntry fields\n this.reserved1 = [\n this._readUint(8),\n this._readUint(8),\n this._readUint(8),\n this._readUint(8),\n this._readUint(8),\n this._readUint(8)\n ];\n this.data_reference_index = this._readUint(16);\n // AudioSampleEntry fields\n this.reserved2 = [this._readUint(32), this._readUint(32)];\n this.channelcount = this._readUint(16);\n this.samplesize = this._readUint(16);\n this.pre_defined = this._readUint(16);\n this.reserved3 = this._readUint(16);\n this.samplerate = this._readTemplate(32);\n // ESDescriptor fields\n this.esds = this._readData();\n};;\n// ISO/IEC 14496-12:2012 - 8.2.2 Movie Header Box\nISOBox.prototype._boxParsers['mvhd'] = function() {\n this._parseFullBox();\n var i;\n\n if (this.version == 1) {\n this.creation_time = this._readUint(64);\n this.modification_time = this._readUint(64);\n this.timescale = this._readUint(32);\n this.duration = this._readUint(64);\n } else {\n this.creation_time = this._readUint(32);\n this.modification_time = this._readUint(32);\n this.timescale = this._readUint(32);\n this.duration = this._readUint(32);\n }\n\n this.rate = this._readTemplate(32);\n this.volume = this._readTemplate(16);\n this.reserved1 = this._readUint(16);\n this.reserved2 = [ this._readUint(32), this._readUint(32) ];\n this.matrix = [];\n for (i=0; i<9; i++) {\n this.matrix.push(this._readTemplate(32));\n }\n this.pre_defined = [];\n for (i=0; i<6; i++) {\n this.pre_defined.push(this._readUint(32));\n }\n this.next_track_ID = this._readUint(32);\n};;\n// ISO/IEC 14496-30:2014 - WebVTT Cue Payload Box.\nISOBox.prototype._boxParsers['payl'] = function() {\n var cue_text_raw = new DataView(this._raw.buffer, this._cursor.offset, this._raw.byteLength - (this._cursor.offset - this._offset));\n this.cue_text = ISOBoxer.Utils.dataViewToString(cue_text_raw);\n};\n;\n// ISO/IEC 14496-12:2012 - 8.16.3 Segment Index Box\nISOBox.prototype._boxParsers['sidx'] = function() {\n this._parseFullBox();\n this.reference_ID = this._readUint(32);\n this.timescale = this._readUint(32);\n if (this.version === 0) {\n this.earliest_presentation_time = this._readUint(32);\n this.first_offset = this._readUint(32);\n } else {\n this.earliest_presentation_time = this._readUint(64);\n this.first_offset = this._readUint(64);\n }\n this.reserved = this._readUint(16);\n this.reference_count = this._readUint(16);\n this.references = [];\n for (var i=0; i> 31) & 0x1;\n ref.referenced_size = reference & 0x7FFFFFFF;\n ref.subsegment_duration = this._readUint(32);\n var sap = this._readUint(32);\n ref.starts_with_SAP = (sap >> 31) & 0x1;\n ref.SAP_type = (sap >> 28) & 0x7;\n ref.SAP_delta_time = sap & 0xFFFFFFF;\n this.references.push(ref);\n }\n};;\n// ISO/IEC 14496-12:2012 - 8.16.4 Subsegment Index Box\nISOBox.prototype._boxParsers['ssix'] = function() {\n this._parseFullBox();\n this.subsegment_count = this._readUint(32);\n this.subsegments = [];\n\n for (var i=0; i 0) {\n var sample = {'nr': sample_nr, 'subsamples': [] };\n for (var j = 0; j < subsample_count; j++) {\n var subsample = {};\n if (this.version & 0x1) {\n subsample.size = this._readUint(32);\n } else {\n subsample.size = this._readUint(16);\n }\n subsample.priority = this._readUint(8);\n subsample.discardable = this._readUint(8);\n subsample.codec_specific_parameters = this._readUint(32);\n sample.subsamples.push(subsample);\n }\n this.samples_with_subsamples.push(sample);\n }\n }\n};;\n// ISO/IEC 14496-12:2012 - 8.8.12 Track Fragmnent Decode Time\nISOBox.prototype._boxParsers['tfdt'] = function() {\n this._parseFullBox();\n if (this.version == 1) {\n this.baseMediaDecodeTime = this._readUint(64);\n } else {\n this.baseMediaDecodeTime = this._readUint(32);\n }\n};;\n// ISO/IEC 14496-12:2012 - 8.8.7 Track Fragment Header Box\nISOBox.prototype._boxParsers['tfhd'] = function() {\n this._parseFullBox();\n this.track_ID = this._readUint(32);\n if (this.flags & 0x1) this.base_data_offset = this._readUint(64);\n if (this.flags & 0x2) this.sample_description_offset = this._readUint(32);\n if (this.flags & 0x8) this.default_sample_duration = this._readUint(32);\n if (this.flags & 0x10) this.default_sample_size = this._readUint(32);\n if (this.flags & 0x20) this.default_sample_flags = this._readUint(32);\n};;\n// ISO/IEC 14496-12:2012 - 8.8.10 Track Fragment Random Access Box\nISOBox.prototype._boxParsers['tfra'] = function() {\n this._parseFullBox();\n this.track_ID = this._readUint(32);\n this._packed = this._readUint(32);\n\n this.reserved = this._packed >>> 6;\n\n this.length_size_of_traf_num = (this._packed && 0xFFFF00000000) >>> 4;\n this.length_size_of_trun_num = (this._packed && 0xFFFF0000) >>> 2;\n this.length_size_of_sample_num = this._packed && 0xFF;\n\n this.number_of_entry = this._readUint(32);\n\n this.entries = [];\n\n for (var i = 0; i < this.number_of_entry ; i++){\n var entry = {};\n\n if(this.version==1){\n entry.time = this._readUint(64);\n entry.moof_offset = this._readUint(64);\n }else{\n entry.time = this._readUint(32);\n entry.moof_offset = this._readUint(32);\n }\n\n entry.traf_number = this._readUint((this.length_size_of_traf_num + 1) * 8);\n entry.trun_number = this._readUint((this.length_size_of_trun_num + 1) * 8);\n entry.sample_number = this._readUint((this.length_size_of_sample_num + 1) * 8);\n\n this.entries.push(entry);\n }\n};\n;\n// ISO/IEC 14496-12:2012 - 8.3.2 Track Header Box\nISOBox.prototype._boxParsers['tkhd'] = function() {\n this._parseFullBox();\n\n if (this.version == 1) {\n this.creation_time = this._readUint(64);\n this.modification_time = this._readUint(64);\n this.track_ID = this._readUint(32);\n this.reserved1 = this._readUint(32);\n this.duration = this._readUint(64);\n } else {\n this.creation_time = this._readUint(32);\n this.modification_time = this._readUint(32);\n this.track_ID = this._readUint(32);\n this.reserved1 = this._readUint(32);\n this.duration = this._readUint(32);\n }\n\n this.reserved2 = [\n this._readUint(32),\n this._readUint(32)\n ];\n this.layer = this._readUint(16);\n this.alternate_group = this._readUint(16);\n this.volume = this._readTemplate(16);\n this.reserved3 = this._readUint(16);\n this.matrix = [];\n for (var i=0; i<9; i++) {\n this.matrix.push(this._readTemplate(32));\n }\n this.width = this._readTemplate(32);\n this.height = this._readTemplate(32);\n};;\n// ISO/IEC 14496-12:2012 - 8.8.3 Track Extends Box\nISOBox.prototype._boxParsers['trex'] = function() {\n this._parseFullBox();\n\n this.track_ID = this._readUint(32);\n this.default_sample_description_index = this._readUint(32);\n this.default_sample_duration = this._readUint(32);\n this.default_sample_size = this._readUint(32);\n this.default_sample_flags = this._readUint(32);\n};;\n// ISO/IEC 14496-12:2012 - 8.8.8 Track Run Box\n// Note: the 'trun' box has a direct relation to the 'tfhd' box for defaults.\n// These defaults are not set explicitly here, but are left to resolve for the user.\nISOBox.prototype._boxParsers['trun'] = function() {\n this._parseFullBox();\n this.sample_count = this._readUint(32);\n if (this.flags & 0x1) this.data_offset = this._readInt(32);\n if (this.flags & 0x4) this.first_sample_flags = this._readUint(32);\n this.samples = [];\n for (var i=0; i 0) {\n message += ' ';\n }\n\n Array.apply(null, arguments).forEach(function (item) {\n message += item + ' ';\n });\n\n if (logToBrowserConsole) {\n console.log(message);\n }\n\n eventBus.trigger(_eventsEventsJs2['default'].LOG, { message: message });\n }\n\n instance = {\n log: log,\n setLogTimestampVisible: setLogTimestampVisible,\n setLogToBrowserConsole: setLogToBrowserConsole,\n getLogToBrowserConsole: getLogToBrowserConsole\n };\n\n setup();\n\n return instance;\n}\n\nDebug.__dashjs_factory_name = 'Debug';\nexports['default'] = _FactoryMakerJs2['default'].getSingletonFactory(Debug);\nmodule.exports = exports['default'];\n\n},{\"./EventBus.js\":6,\"./FactoryMaker.js\":7,\"./events/Events.js\":9}],6:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _FactoryMakerJs = _dereq_('./FactoryMaker.js');\n\nvar _FactoryMakerJs2 = _interopRequireDefault(_FactoryMakerJs);\n\nfunction EventBus() {\n\n var instance = undefined;\n var handlers = {};\n\n function on(type, listener, scope) {\n if (!type) {\n throw new Error('event type cannot be null or undefined');\n }\n\n if (!listener || typeof listener !== 'function') {\n throw new Error('listener must be a function: ' + listener);\n }\n\n if (getHandlerIdx(type, listener, scope) >= 0) return;\n\n var handler = {\n callback: listener,\n scope: scope\n };\n\n handlers[type] = handlers[type] || [];\n handlers[type].push(handler);\n }\n\n function off(type, listener, scope) {\n if (!type || !listener || !handlers[type]) return;\n\n var idx = getHandlerIdx(type, listener, scope);\n\n if (idx < 0) return;\n\n handlers[type].splice(idx, 1);\n }\n\n function trigger(type, args) {\n if (!type || !handlers[type]) return;\n\n args = args || {};\n\n if (args.hasOwnProperty('type')) {\n throw new Error('\\'type\\' is a reserved word for event dispatching');\n }\n\n args.type = type;\n\n handlers[type].forEach(function (handler) {\n handler.callback.call(handler.scope, args);\n });\n }\n\n function reset() {\n handlers = {};\n }\n\n function getHandlerIdx(type, listener, scope) {\n var handlersForType = handlers[type];\n var result = -1;\n\n if (!handlersForType || handlersForType.length === 0) return result;\n\n for (var i = 0; i < handlersForType.length; i++) {\n if (handlersForType[i].callback === listener && (!scope || scope === handlersForType[i].scope)) return i;\n }\n\n return result;\n }\n\n instance = {\n on: on,\n off: off,\n trigger: trigger,\n reset: reset\n };\n\n return instance;\n}\n\nEventBus.__dashjs_factory_name = 'EventBus';\nexports['default'] = _FactoryMakerJs2['default'].getSingletonFactory(EventBus);\nmodule.exports = exports['default'];\n\n},{\"./FactoryMaker.js\":7}],7:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @Module FactoryMaker\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar FactoryMaker = (function () {\n\n var instance = undefined;\n var extensions = [];\n var singletonContexts = [];\n\n function extend(name, childInstance, override, context) {\n var extensionContext = getExtensionContext(context);\n if (!extensionContext[name] && childInstance) {\n extensionContext[name] = { instance: childInstance, override: override };\n }\n }\n\n /**\n * Use this method from your extended object. this.factory is injected into your object.\n * this.factory.getSingletonInstance(this.context, 'VideoModel')\n * will return the video model for use in the extended object.\n *\n * @param context {Object} injected into extended object as this.context\n * @param className {String} string name found in all dash.js objects\n * with name __dashjs_factory_name Will be at the bottom. Will be the same as the object's name.\n * @returns {*} Context aware instance of specified singleton name.\n * @memberof module:FactoryMaker\n * @instance\n */\n function getSingletonInstance(context, className) {\n for (var i in singletonContexts) {\n var obj = singletonContexts[i];\n if (obj.context === context && obj.name === className) {\n return obj.instance;\n }\n }\n return null;\n }\n\n /**\n * Use this method to add an singleton instance to the system. Useful for unit testing to mock objects etc.\n *\n * @param context\n * @param className\n * @param instance\n * @memberof module:FactoryMaker\n * @instance\n */\n function setSingletonInstance(context, className, instance) {\n for (var i in singletonContexts) {\n var obj = singletonContexts[i];\n if (obj.context === context && obj.name === className) {\n singletonContexts[i].instance = instance;\n return;\n }\n }\n singletonContexts.push({ name: className, context: context, instance: instance });\n }\n\n function getClassFactory(classConstructor) {\n return function (context) {\n if (context === undefined) {\n context = {};\n }\n return {\n create: function create() {\n return merge(classConstructor.__dashjs_factory_name, classConstructor.apply({ context: context }, arguments), context, arguments);\n }\n };\n };\n }\n\n function getSingletonFactory(classConstructor) {\n return function (context) {\n var instance = undefined;\n if (context === undefined) {\n context = {};\n }\n return {\n getInstance: function getInstance() {\n // If we don't have an instance yet check for one on the context\n if (!instance) {\n instance = getSingletonInstance(context, classConstructor.__dashjs_factory_name);\n }\n // If there's no instance on the context then create one\n if (!instance) {\n instance = merge(classConstructor.__dashjs_factory_name, classConstructor.apply({ context: context }, arguments), context, arguments);\n singletonContexts.push({ name: classConstructor.__dashjs_factory_name, context: context, instance: instance });\n }\n return instance;\n }\n };\n };\n }\n\n function merge(name, classConstructor, context, args) {\n var extensionContext = getExtensionContext(context);\n var extensionObject = extensionContext[name];\n if (extensionObject) {\n var extension = extensionObject.instance;\n if (extensionObject.override) {\n //Override public methods in parent but keep parent.\n extension = extension.apply({ context: context, factory: instance, parent: classConstructor }, args);\n for (var prop in extension) {\n if (classConstructor.hasOwnProperty(prop)) {\n classConstructor[prop] = extension[prop];\n }\n }\n } else {\n //replace parent object completely with new object. Same as dijon.\n return extension.apply({ context: context, factory: instance }, args);\n }\n }\n return classConstructor;\n }\n\n function getExtensionContext(context) {\n var extensionContext = undefined;\n extensions.forEach(function (obj) {\n if (obj === context) {\n extensionContext = obj;\n }\n });\n if (!extensionContext) {\n extensionContext = extensions.push(context);\n }\n return extensionContext;\n }\n\n instance = {\n extend: extend,\n getSingletonInstance: getSingletonInstance,\n setSingletonInstance: setSingletonInstance,\n getSingletonFactory: getSingletonFactory,\n getClassFactory: getClassFactory\n };\n\n return instance;\n})();\n\nexports[\"default\"] = FactoryMaker;\nmodule.exports = exports[\"default\"];\n\n},{}],8:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _EventsBaseJs = _dereq_('./EventsBase.js');\n\nvar _EventsBaseJs2 = _interopRequireDefault(_EventsBaseJs);\n\n/**\n * @class\n * @ignore\n */\n\nvar CoreEvents = (function (_EventsBase) {\n _inherits(CoreEvents, _EventsBase);\n\n function CoreEvents() {\n _classCallCheck(this, CoreEvents);\n\n _get(Object.getPrototypeOf(CoreEvents.prototype), 'constructor', this).call(this);\n this.AST_IN_FUTURE = 'astinfuture';\n this.BUFFERING_COMPLETED = 'bufferingCompleted';\n this.BUFFER_CLEARED = 'bufferCleared';\n this.BUFFER_LEVEL_UPDATED = 'bufferLevelUpdated';\n this.BYTES_APPENDED = 'bytesAppended';\n this.CHECK_FOR_EXISTENCE_COMPLETED = 'checkForExistenceCompleted';\n this.CHUNK_APPENDED = 'chunkAppended';\n this.CURRENT_TRACK_CHANGED = 'currenttrackchanged';\n this.DATA_UPDATE_COMPLETED = 'dataUpdateCompleted';\n this.DATA_UPDATE_STARTED = 'dataUpdateStarted';\n this.FRAGMENT_LOADING_COMPLETED = 'fragmentLoadingCompleted';\n this.FRAGMENT_LOADING_STARTED = 'fragmentLoadingStarted';\n this.INITIALIZATION_LOADED = 'initializationLoaded';\n this.INIT_FRAGMENT_LOADED = 'initFragmentLoaded';\n this.INIT_REQUESTED = 'initRequested';\n this.INTERNAL_MANIFEST_LOADED = 'internalManifestLoaded';\n this.LIVE_EDGE_SEARCH_COMPLETED = 'liveEdgeSearchCompleted';\n this.LOADING_COMPLETED = 'loadingCompleted';\n this.LOADING_PROGRESS = 'loadingProgress';\n this.MANIFEST_UPDATED = 'manifestUpdated';\n this.MEDIA_FRAGMENT_LOADED = 'mediaFragmentLoaded';\n this.QUALITY_CHANGED = 'qualityChanged';\n this.QUOTA_EXCEEDED = 'quotaExceeded';\n this.REPRESENTATION_UPDATED = 'representationUpdated';\n this.SEGMENTS_LOADED = 'segmentsLoaded';\n this.SERVICE_LOCATION_BLACKLIST_CHANGED = 'serviceLocationBlacklistChanged';\n this.SOURCEBUFFER_APPEND_COMPLETED = 'sourceBufferAppendCompleted';\n this.SOURCEBUFFER_REMOVE_COMPLETED = 'sourceBufferRemoveCompleted';\n this.STREAMS_COMPOSED = 'streamsComposed';\n this.STREAM_BUFFERING_COMPLETED = 'streamBufferingCompleted';\n this.STREAM_COMPLETED = 'streamCompleted';\n this.STREAM_INITIALIZED = 'streaminitialized';\n this.STREAM_TEARDOWN_COMPLETE = 'streamTeardownComplete';\n this.TIMED_TEXT_REQUESTED = 'timedTextRequested';\n this.TIME_SYNCHRONIZATION_COMPLETED = 'timeSynchronizationComplete';\n this.URL_RESOLUTION_FAILED = 'urlResolutionFailed';\n this.WALLCLOCK_TIME_UPDATED = 'wallclockTimeUpdated';\n this.XLINK_ALL_ELEMENTS_LOADED = 'xlinkAllElementsLoaded';\n this.XLINK_ELEMENT_LOADED = 'xlinkElementLoaded';\n this.XLINK_READY = 'xlinkReady';\n }\n\n return CoreEvents;\n})(_EventsBaseJs2['default']);\n\nexports['default'] = CoreEvents;\nmodule.exports = exports['default'];\n\n},{\"./EventsBase.js\":10}],9:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _CoreEventsJs = _dereq_('./CoreEvents.js');\n\nvar _CoreEventsJs2 = _interopRequireDefault(_CoreEventsJs);\n\nvar Events = (function (_CoreEvents) {\n _inherits(Events, _CoreEvents);\n\n function Events() {\n _classCallCheck(this, Events);\n\n _get(Object.getPrototypeOf(Events.prototype), 'constructor', this).apply(this, arguments);\n }\n\n return Events;\n})(_CoreEventsJs2['default']);\n\nvar events = new Events();\nexports['default'] = events;\nmodule.exports = exports['default'];\n\n},{\"./CoreEvents.js\":8}],10:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar EventsBase = (function () {\n function EventsBase() {\n _classCallCheck(this, EventsBase);\n }\n\n _createClass(EventsBase, [{\n key: 'extend',\n value: function extend(events, config) {\n if (!events) return;\n\n var override = config ? config.override : false;\n var publicOnly = config ? config.publicOnly : false;\n\n for (var evt in events) {\n if (!events.hasOwnProperty(evt) || this[evt] && !override) continue;\n if (publicOnly && events[evt].indexOf('public_') === -1) continue;\n this[evt] = events[evt];\n }\n }\n }]);\n\n return EventsBase;\n})();\n\nexports['default'] = EventsBase;\nmodule.exports = exports['default'];\n\n},{}],11:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _streamingVoTrackInfoJs = _dereq_('../streaming/vo/TrackInfo.js');\n\nvar _streamingVoTrackInfoJs2 = _interopRequireDefault(_streamingVoTrackInfoJs);\n\nvar _streamingVoMediaInfoJs = _dereq_('../streaming/vo/MediaInfo.js');\n\nvar _streamingVoMediaInfoJs2 = _interopRequireDefault(_streamingVoMediaInfoJs);\n\nvar _streamingVoStreamInfoJs = _dereq_('../streaming/vo/StreamInfo.js');\n\nvar _streamingVoStreamInfoJs2 = _interopRequireDefault(_streamingVoStreamInfoJs);\n\nvar _streamingVoManifestInfoJs = _dereq_('../streaming/vo/ManifestInfo.js');\n\nvar _streamingVoManifestInfoJs2 = _interopRequireDefault(_streamingVoManifestInfoJs);\n\nvar _voEventJs = _dereq_('./vo/Event.js');\n\nvar _voEventJs2 = _interopRequireDefault(_voEventJs);\n\nvar _coreFactoryMakerJs = _dereq_('../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _externalsCea608ParserJs = _dereq_('../../externals/cea608-parser.js');\n\nvar _externalsCea608ParserJs2 = _interopRequireDefault(_externalsCea608ParserJs);\n\nvar METRIC_LIST = {\n //TODO need to refactor all that reference to be able to export like all other const on factory object.\n TCP_CONNECTION: 'TcpList',\n HTTP_REQUEST: 'HttpList',\n TRACK_SWITCH: 'RepSwitchList',\n BUFFER_LEVEL: 'BufferLevel',\n BUFFER_STATE: 'BufferState',\n DVR_INFO: 'DVRInfo',\n DROPPED_FRAMES: 'DroppedFrames',\n SCHEDULING_INFO: 'SchedulingInfo',\n REQUESTS_QUEUE: 'RequestsQueue',\n MANIFEST_UPDATE: 'ManifestUpdate',\n MANIFEST_UPDATE_STREAM_INFO: 'ManifestUpdatePeriodInfo',\n MANIFEST_UPDATE_TRACK_INFO: 'ManifestUpdateRepresentationInfo',\n PLAY_LIST: 'PlayList',\n DVB_ERRORS: 'DVBErrors'\n};\n\nfunction DashAdapter() {\n\n //let context = this.context;\n\n var instance = undefined,\n dashManifestModel = undefined,\n periods = undefined,\n adaptations = undefined;\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.dashManifestModel) {\n dashManifestModel = config.dashManifestModel;\n }\n }\n\n function initialize() {\n periods = [];\n adaptations = {};\n }\n\n function getRepresentationForTrackInfo(trackInfo, representationController) {\n return representationController.getRepresentationForQuality(trackInfo.quality);\n }\n\n function getAdaptationForMediaInfo(mediaInfo) {\n return adaptations[mediaInfo.streamInfo.id][mediaInfo.index];\n }\n\n function getPeriodForStreamInfo(streamInfo) {\n var ln = periods.length;\n\n for (var i = 0; i < ln; i++) {\n var period = periods[i];\n\n if (streamInfo.id === period.id) return period;\n }\n\n return null;\n }\n\n function convertRepresentationToTrackInfo(manifest, representation) {\n var trackInfo = new _streamingVoTrackInfoJs2['default']();\n var a = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index];\n var r = dashManifestModel.getRepresentationFor(representation.index, a);\n\n trackInfo.id = representation.id;\n trackInfo.quality = representation.index;\n trackInfo.bandwidth = dashManifestModel.getBandwidth(r);\n trackInfo.DVRWindow = representation.segmentAvailabilityRange;\n trackInfo.fragmentDuration = representation.segmentDuration || (representation.segments && representation.segments.length > 0 ? representation.segments[0].duration : NaN);\n trackInfo.MSETimeOffset = representation.MSETimeOffset;\n trackInfo.useCalculatedLiveEdgeTime = representation.useCalculatedLiveEdgeTime;\n trackInfo.mediaInfo = convertAdaptationToMediaInfo(manifest, representation.adaptation);\n\n return trackInfo;\n }\n\n function convertAdaptationToMediaInfo(manifest, adaptation) {\n var mediaInfo = new _streamingVoMediaInfoJs2['default']();\n var a = adaptation.period.mpd.manifest.Period_asArray[adaptation.period.index].AdaptationSet_asArray[adaptation.index];\n var viewpoint;\n\n mediaInfo.id = adaptation.id;\n mediaInfo.index = adaptation.index;\n mediaInfo.type = adaptation.type;\n mediaInfo.streamInfo = convertPeriodToStreamInfo(manifest, adaptation.period);\n mediaInfo.representationCount = dashManifestModel.getRepresentationCount(a);\n mediaInfo.lang = dashManifestModel.getLanguageForAdaptation(a);\n viewpoint = dashManifestModel.getViewpointForAdaptation(a);\n mediaInfo.viewpoint = viewpoint ? viewpoint.value : undefined;\n mediaInfo.accessibility = dashManifestModel.getAccessibilityForAdaptation(a).map(function (accessibility) {\n var accessibilityValue = accessibility.value;\n var accessibilityData = accessibilityValue;\n if (accessibility.schemeIdUri && accessibility.schemeIdUri.search('cea-608') >= 0 && typeof _externalsCea608ParserJs2['default'] !== 'undefined') {\n if (accessibilityValue) {\n accessibilityData = 'cea-608:' + accessibilityValue;\n } else {\n accessibilityData = 'cea-608';\n }\n mediaInfo.embeddedCaptions = true;\n }\n return accessibilityData;\n });\n mediaInfo.audioChannelConfiguration = dashManifestModel.getAudioChannelConfigurationForAdaptation(a).map(function (audioChannelConfiguration) {\n return audioChannelConfiguration.value;\n });\n mediaInfo.roles = dashManifestModel.getRolesForAdaptation(a).map(function (role) {\n return role.value;\n });\n mediaInfo.codec = dashManifestModel.getCodec(a);\n mediaInfo.mimeType = dashManifestModel.getMimeType(a);\n mediaInfo.contentProtection = dashManifestModel.getContentProtectionData(a);\n mediaInfo.bitrateList = dashManifestModel.getBitrateListForAdaptation(a);\n\n if (mediaInfo.contentProtection) {\n mediaInfo.contentProtection.forEach(function (item) {\n item.KID = dashManifestModel.getKID(item);\n });\n }\n\n mediaInfo.isText = dashManifestModel.getIsTextTrack(mediaInfo.mimeType);\n\n return mediaInfo;\n }\n\n function convertVideoInfoToEmbeddedTextInfo(mediaInfo, channel, lang) {\n mediaInfo.id = channel; // CC1, CC2, CC3, or CC4\n mediaInfo.index = 100 + parseInt(channel.substring(2, 3));\n mediaInfo.type = 'embeddedText';\n mediaInfo.codec = 'cea-608-in-SEI';\n mediaInfo.isText = true;\n mediaInfo.isEmbedded = true;\n mediaInfo.lang = channel + ' ' + lang;\n mediaInfo.roles = ['caption'];\n }\n\n function convertPeriodToStreamInfo(manifest, period) {\n var streamInfo = new _streamingVoStreamInfoJs2['default']();\n var THRESHOLD = 1;\n\n streamInfo.id = period.id;\n streamInfo.index = period.index;\n streamInfo.start = period.start;\n streamInfo.duration = period.duration;\n streamInfo.manifestInfo = convertMpdToManifestInfo(manifest, period.mpd);\n streamInfo.isLast = manifest.Period_asArray.length === 1 || Math.abs(streamInfo.start + streamInfo.duration - streamInfo.manifestInfo.duration) < THRESHOLD;\n streamInfo.isFirst = manifest.Period_asArray.length === 1 || dashManifestModel.getRegularPeriods(manifest, dashManifestModel.getMpd(manifest))[0].id === period.id;\n\n return streamInfo;\n }\n\n function convertMpdToManifestInfo(manifest, mpd) {\n var manifestInfo = new _streamingVoManifestInfoJs2['default']();\n\n manifestInfo.DVRWindowSize = mpd.timeShiftBufferDepth;\n manifestInfo.loadedTime = mpd.manifest.loadedTime;\n manifestInfo.availableFrom = mpd.availabilityStartTime;\n manifestInfo.minBufferTime = mpd.manifest.minBufferTime;\n manifestInfo.maxFragmentDuration = mpd.maxSegmentDuration;\n manifestInfo.duration = dashManifestModel.getDuration(manifest);\n manifestInfo.isDynamic = dashManifestModel.getIsDynamic(manifest);\n\n return manifestInfo;\n }\n\n function getMediaInfoForType(manifest, streamInfo, type) {\n var periodInfo = getPeriodForStreamInfo(streamInfo);\n var periodId = periodInfo.id;\n var data = dashManifestModel.getAdaptationForType(manifest, streamInfo.index, type);\n var idx;\n\n if (!data) return null;\n\n idx = dashManifestModel.getIndexForAdaptation(data, manifest, streamInfo.index);\n\n adaptations[periodId] = adaptations[periodId] || dashManifestModel.getAdaptationsForPeriod(manifest, periodInfo);\n\n return convertAdaptationToMediaInfo(manifest, adaptations[periodId][idx]);\n }\n\n function getAllMediaInfoForType(manifest, streamInfo, type) {\n var periodInfo = getPeriodForStreamInfo(streamInfo);\n var periodId = periodInfo.id;\n var adaptationsForType = dashManifestModel.getAdaptationsForType(manifest, streamInfo.index, type !== 'embeddedText' ? type : 'video');\n\n var mediaArr = [];\n\n var data, media, idx, i, j, ln;\n\n if (!adaptationsForType) return mediaArr;\n\n adaptations[periodId] = adaptations[periodId] || dashManifestModel.getAdaptationsForPeriod(manifest, periodInfo);\n\n for (i = 0, ln = adaptationsForType.length; i < ln; i++) {\n data = adaptationsForType[i];\n idx = dashManifestModel.getIndexForAdaptation(data, manifest, streamInfo.index);\n media = convertAdaptationToMediaInfo(manifest, adaptations[periodId][idx]);\n\n if (type === 'embeddedText') {\n var accessibilityLength = media.accessibility.length;\n for (j = 0; j < accessibilityLength; j++) {\n if (!media) {\n continue;\n }\n var accessibility = media.accessibility[j];\n if (accessibility.indexOf('cea-608:') === 0) {\n var value = accessibility.substring(8);\n var parts = value.split(';');\n if (parts[0].substring(0, 2) === 'CC') {\n for (j = 0; j < parts.length; j++) {\n if (!media) {\n media = convertAdaptationToMediaInfo.call(this, manifest, adaptations[periodId][idx]);\n }\n convertVideoInfoToEmbeddedTextInfo(media, parts[j].substring(0, 3), parts[j].substring(4));\n mediaArr.push(media);\n media = null;\n }\n } else {\n for (j = 0; j < parts.length; j++) {\n // Only languages for CC1, CC2, ...\n if (!media) {\n media = convertAdaptationToMediaInfo.call(this, manifest, adaptations[periodId][idx]);\n }\n convertVideoInfoToEmbeddedTextInfo(media, 'CC' + (j + 1), parts[j]);\n mediaArr.push(media);\n media = null;\n }\n }\n } else if (accessibility.indexOf('cea-608') === 0) {\n // Nothing known. We interpret it as CC1=eng\n convertVideoInfoToEmbeddedTextInfo(media, 'CC1', 'eng');\n mediaArr.push(media);\n media = null;\n }\n }\n }\n if (media && type !== 'embeddedText') {\n mediaArr.push(media);\n }\n }\n\n return mediaArr;\n }\n\n function getStreamsInfo(manifest) {\n var streams = [];\n var mpd, ln, i;\n\n if (!manifest) return null;\n\n mpd = dashManifestModel.getMpd(manifest);\n periods = dashManifestModel.getRegularPeriods(manifest, mpd);\n mpd.checkTime = dashManifestModel.getCheckTime(manifest, periods[0]);\n adaptations = {};\n ln = periods.length;\n\n for (i = 0; i < ln; i++) {\n streams.push(convertPeriodToStreamInfo(manifest, periods[i]));\n }\n\n return streams;\n }\n\n function getManifestInfo(manifest) {\n var mpd = dashManifestModel.getMpd(manifest);\n\n return convertMpdToManifestInfo(manifest, mpd);\n }\n\n function getInitRequest(streamProcessor, quality) {\n var representation = streamProcessor.getRepresentationController().getRepresentationForQuality(quality);\n return streamProcessor.getIndexHandler().getInitRequest(representation);\n }\n\n function getNextFragmentRequest(streamProcessor, trackInfo) {\n var representation = getRepresentationForTrackInfo(trackInfo, streamProcessor.getRepresentationController());\n return streamProcessor.getIndexHandler().getNextSegmentRequest(representation);\n }\n\n function getFragmentRequestForTime(streamProcessor, trackInfo, time, options) {\n var representation = getRepresentationForTrackInfo(trackInfo, streamProcessor.getRepresentationController());\n return streamProcessor.getIndexHandler().getSegmentRequestForTime(representation, time, options);\n }\n\n function generateFragmentRequestForTime(streamProcessor, trackInfo, time) {\n var representation = getRepresentationForTrackInfo(trackInfo, streamProcessor.getRepresentationController());\n return streamProcessor.getIndexHandler().generateSegmentRequestForTime(representation, time);\n }\n\n function getIndexHandlerTime(streamProcessor) {\n return streamProcessor.getIndexHandler().getCurrentTime();\n }\n\n function setIndexHandlerTime(streamProcessor, value) {\n return streamProcessor.getIndexHandler().setCurrentTime(value);\n }\n\n function updateData(manifest, streamProcessor) {\n var periodInfo = getPeriodForStreamInfo(streamProcessor.getStreamInfo());\n var mediaInfo = streamProcessor.getMediaInfo();\n var adaptation = getAdaptationForMediaInfo(mediaInfo);\n var type = streamProcessor.getType();\n\n var id, data;\n\n id = mediaInfo.id;\n data = id ? dashManifestModel.getAdaptationForId(id, manifest, periodInfo.index) : dashManifestModel.getAdaptationForIndex(mediaInfo.index, manifest, periodInfo.index);\n streamProcessor.getRepresentationController().updateData(data, adaptation, type);\n }\n\n function getRepresentationInfoForQuality(manifest, representationController, quality) {\n var representation = representationController.getRepresentationForQuality(quality);\n return representation ? convertRepresentationToTrackInfo(manifest, representation) : null;\n }\n\n function getCurrentRepresentationInfo(manifest, representationController) {\n var representation = representationController.getCurrentRepresentation();\n return representation ? convertRepresentationToTrackInfo(manifest, representation) : null;\n }\n\n function getEvent(eventBox, eventStreams, startTime) {\n var event = new _voEventJs2['default']();\n var schemeIdUri = eventBox.scheme_id_uri;\n var value = eventBox.value;\n var timescale = eventBox.timescale;\n var presentationTimeDelta = eventBox.presentation_time_delta;\n var duration = eventBox.event_duration;\n var id = eventBox.id;\n var messageData = eventBox.message_data;\n var presentationTime = startTime * timescale + presentationTimeDelta;\n\n if (!eventStreams[schemeIdUri]) return null;\n\n event.eventStream = eventStreams[schemeIdUri];\n event.eventStream.value = value;\n event.eventStream.timescale = timescale;\n event.duration = duration;\n event.id = id;\n event.presentationTime = presentationTime;\n event.messageData = messageData;\n event.presentationTimeDelta = presentationTimeDelta;\n\n return event;\n }\n\n function getEventsFor(manifest, info, streamProcessor) {\n var events = [];\n\n if (info instanceof _streamingVoStreamInfoJs2['default']) {\n events = dashManifestModel.getEventsForPeriod(manifest, getPeriodForStreamInfo(info));\n } else if (info instanceof _streamingVoMediaInfoJs2['default']) {\n events = dashManifestModel.getEventStreamForAdaptationSet(manifest, getAdaptationForMediaInfo(info));\n } else if (info instanceof _streamingVoTrackInfoJs2['default']) {\n events = dashManifestModel.getEventStreamForRepresentation(manifest, getRepresentationForTrackInfo(info, streamProcessor.getRepresentationController()));\n }\n\n return events;\n }\n\n function reset() {\n periods = [];\n adaptations = {};\n }\n\n instance = {\n initialize: initialize,\n convertDataToTrack: convertRepresentationToTrackInfo,\n convertDataToMedia: convertAdaptationToMediaInfo,\n convertDataToStream: convertPeriodToStreamInfo,\n getDataForTrack: getRepresentationForTrackInfo,\n getDataForMedia: getAdaptationForMediaInfo,\n getDataForStream: getPeriodForStreamInfo,\n getStreamsInfo: getStreamsInfo,\n getManifestInfo: getManifestInfo,\n getMediaInfoForType: getMediaInfoForType,\n getAllMediaInfoForType: getAllMediaInfoForType,\n getCurrentRepresentationInfo: getCurrentRepresentationInfo,\n getRepresentationInfoForQuality: getRepresentationInfoForQuality,\n updateData: updateData,\n getInitRequest: getInitRequest,\n getNextFragmentRequest: getNextFragmentRequest,\n getFragmentRequestForTime: getFragmentRequestForTime,\n generateFragmentRequestForTime: generateFragmentRequestForTime,\n getIndexHandlerTime: getIndexHandlerTime,\n setIndexHandlerTime: setIndexHandlerTime,\n getEventsFor: getEventsFor,\n getEvent: getEvent,\n setConfig: setConfig,\n reset: reset,\n metricsList: METRIC_LIST\n };\n\n return instance;\n}\n\nDashAdapter.__dashjs_factory_name = 'DashAdapter';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(DashAdapter);\nmodule.exports = exports['default'];\n\n},{\"../../externals/cea608-parser.js\":1,\"../core/FactoryMaker.js\":7,\"../streaming/vo/ManifestInfo.js\":104,\"../streaming/vo/MediaInfo.js\":105,\"../streaming/vo/StreamInfo.js\":107,\"../streaming/vo/TrackInfo.js\":110,\"./vo/Event.js\":27}],12:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _streamingVoFragmentRequestJs = _dereq_('../streaming/vo/FragmentRequest.js');\n\nvar _streamingVoFragmentRequestJs2 = _interopRequireDefault(_streamingVoFragmentRequestJs);\n\nvar _streamingVoErrorJs = _dereq_('../streaming/vo/Error.js');\n\nvar _streamingVoErrorJs2 = _interopRequireDefault(_streamingVoErrorJs);\n\nvar _streamingVoMetricsHTTPRequestJs = _dereq_('../streaming/vo/metrics/HTTPRequest.js');\n\nvar _streamingVoMetricsHTTPRequestJs2 = _interopRequireDefault(_streamingVoMetricsHTTPRequestJs);\n\nvar _coreEventsEventsJs = _dereq_('../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreEventBusJs = _dereq_('../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreFactoryMakerJs = _dereq_('../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreDebugJs = _dereq_('../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nvar _streamingUtilsURLUtilsJs = _dereq_('../streaming/utils/URLUtils.js');\n\nvar _streamingUtilsURLUtilsJs2 = _interopRequireDefault(_streamingUtilsURLUtilsJs);\n\nvar _utilsSegmentsUtilsJs = _dereq_('./utils/SegmentsUtils.js');\n\nvar _utilsSegmentsGetterJs = _dereq_('./utils/SegmentsGetter.js');\n\nvar _utilsSegmentsGetterJs2 = _interopRequireDefault(_utilsSegmentsGetterJs);\n\nvar SEGMENTS_UNAVAILABLE_ERROR_CODE = 1;\n\nfunction DashHandler(config) {\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n var urlUtils = (0, _streamingUtilsURLUtilsJs2['default'])(context).getInstance();\n\n var segmentBaseLoader = config.segmentBaseLoader;\n var timelineConverter = config.timelineConverter;\n var dashMetrics = config.dashMetrics;\n var metricsModel = config.metricsModel;\n var baseURLController = config.baseURLController;\n\n var instance = undefined,\n index = undefined,\n requestedTime = undefined,\n isDynamic = undefined,\n type = undefined,\n currentTime = undefined,\n earliestTime = undefined,\n streamProcessor = undefined,\n segmentsGetter = undefined;\n\n function setup() {\n index = -1;\n currentTime = 0;\n earliestTime = NaN;\n eventBus.on(_coreEventsEventsJs2['default'].INITIALIZATION_LOADED, onInitializationLoaded, instance);\n eventBus.on(_coreEventsEventsJs2['default'].SEGMENTS_LOADED, onSegmentsLoaded, instance);\n }\n\n function initialize(StreamProcessor) {\n streamProcessor = StreamProcessor;\n type = streamProcessor.getType();\n isDynamic = streamProcessor.isDynamic();\n\n segmentsGetter = (0, _utilsSegmentsGetterJs2['default'])(context).create(config, isDynamic);\n }\n\n function getStreamProcessor() {\n return streamProcessor;\n }\n\n function setCurrentTime(value) {\n currentTime = value;\n }\n\n function getCurrentTime() {\n return currentTime;\n }\n\n function getCurrentIndex() {\n return index;\n }\n\n function getEarliestTime() {\n return earliestTime;\n }\n\n function reset() {\n segmentsGetter = null;\n currentTime = 0;\n earliestTime = NaN;\n requestedTime = NaN;\n index = -1;\n isDynamic = null;\n type = null;\n streamProcessor = null;\n eventBus.off(_coreEventsEventsJs2['default'].INITIALIZATION_LOADED, onInitializationLoaded, instance);\n eventBus.off(_coreEventsEventsJs2['default'].SEGMENTS_LOADED, onSegmentsLoaded, instance);\n }\n\n function unescapeDollarsInTemplate(url) {\n return url.split('$$').join('$');\n }\n\n function replaceIDForTemplate(url, value) {\n if (value === null || url.indexOf('$RepresentationID$') === -1) {\n return url;\n }\n var v = value.toString();\n return url.split('$RepresentationID$').join(v);\n }\n\n function setRequestUrl(request, destination, representation) {\n var baseURL = baseURLController.resolve(representation.path);\n var url;\n var serviceLocation;\n\n if (!baseURL || destination === baseURL.url || !urlUtils.isRelative(destination)) {\n url = destination;\n } else {\n url = baseURL.url + destination;\n serviceLocation = baseURL.serviceLocation;\n }\n\n if (urlUtils.isRelative(url)) {\n return false;\n }\n\n request.url = url;\n request.serviceLocation = serviceLocation;\n\n return true;\n }\n\n function generateInitRequest(representation, mediaType) {\n var request = new _streamingVoFragmentRequestJs2['default']();\n var period, presentationStartTime;\n\n period = representation.adaptation.period;\n\n request.mediaType = mediaType;\n request.type = _streamingVoMetricsHTTPRequestJs2['default'].INIT_SEGMENT_TYPE;\n request.range = representation.range;\n presentationStartTime = period.start;\n request.availabilityStartTime = timelineConverter.calcAvailabilityStartTimeFromPresentationTime(presentationStartTime, representation.adaptation.period.mpd, isDynamic);\n request.availabilityEndTime = timelineConverter.calcAvailabilityEndTimeFromPresentationTime(presentationStartTime + period.duration, period.mpd, isDynamic);\n request.quality = representation.index;\n request.mediaInfo = streamProcessor.getMediaInfo();\n\n if (setRequestUrl(request, representation.initialization, representation)) {\n return request;\n }\n }\n\n function getInitRequest(representation) {\n var request;\n\n if (!representation) return null;\n\n request = generateInitRequest(representation, type);\n\n //log(\"Got an initialization.\");\n\n return request;\n }\n\n function isMediaFinished(representation) {\n var period = representation.adaptation.period;\n var segmentInfoType = representation.segmentInfoType;\n\n var isFinished = false;\n\n var sDuration, seg, fTime;\n\n if (index < 0) {\n isFinished = false;\n } else if (isDynamic || index < representation.availableSegmentsNumber) {\n seg = (0, _utilsSegmentsUtilsJs.getSegmentByIndex)(index, representation);\n\n if (seg) {\n fTime = seg.presentationStartTime - period.start;\n sDuration = representation.adaptation.period.duration;\n log(representation.segmentInfoType + ': ' + fTime + ' / ' + sDuration);\n isFinished = segmentInfoType === 'SegmentTimeline' && isDynamic ? false : fTime >= sDuration;\n }\n } else {\n isFinished = true;\n }\n\n return isFinished;\n }\n\n function updateSegments(representation) {\n return segmentsGetter.getSegments(representation, requestedTime, index, onSegmentListUpdated);\n }\n\n function onSegmentListUpdated(representation, segments) {\n\n representation.segments = segments;\n\n if (segments && segments.length > 0) {\n earliestTime = isNaN(earliestTime) ? segments[0].presentationStartTime : Math.min(segments[0].presentationStartTime, earliestTime);\n }\n\n if (isDynamic && isNaN(timelineConverter.getExpectedLiveEdge())) {\n var lastIdx = segments.length - 1;\n var lastSegment = segments[lastIdx];\n var liveEdge = lastSegment.presentationStartTime;\n var metrics = metricsModel.getMetricsFor('stream');\n // the last segment is supposed to be a live edge\n timelineConverter.setExpectedLiveEdge(liveEdge);\n metricsModel.updateManifestUpdateInfo(dashMetrics.getCurrentManifestUpdate(metrics), { presentationStartTime: liveEdge });\n }\n }\n\n function updateSegmentList(representation) {\n\n if (!representation) {\n throw new _streamingVoErrorJs2['default']('no representation');\n }\n\n representation.segments = null;\n\n updateSegments(representation);\n\n return representation;\n }\n\n function updateRepresentation(representation, keepIdx, skipLoad) {\n var hasInitialization = representation.initialization;\n var hasSegments = representation.segmentInfoType !== 'BaseURL' && representation.segmentInfoType !== 'SegmentBase';\n var error;\n\n if (!representation.segmentDuration && !representation.segments) {\n updateSegmentList(representation);\n }\n\n representation.segmentAvailabilityRange = null;\n representation.segmentAvailabilityRange = timelineConverter.calcSegmentAvailabilityRange(representation, isDynamic);\n\n if (representation.segmentAvailabilityRange.end < representation.segmentAvailabilityRange.start && !representation.useCalculatedLiveEdgeTime) {\n error = new _streamingVoErrorJs2['default'](SEGMENTS_UNAVAILABLE_ERROR_CODE, 'no segments are available yet', { availabilityDelay: representation.segmentAvailabilityRange.start - representation.segmentAvailabilityRange.end });\n eventBus.trigger(_coreEventsEventsJs2['default'].REPRESENTATION_UPDATED, { sender: this, representation: representation, error: error });\n return;\n }\n\n if (!keepIdx) index = -1;\n\n if (representation.segmentDuration) {\n updateSegmentList(representation);\n }\n\n if (!hasInitialization && !skipLoad) {\n segmentBaseLoader.loadInitialization(representation);\n }\n\n if (!hasSegments && !skipLoad) {\n segmentBaseLoader.loadSegments(representation, type, representation.indexRange);\n }\n\n if (hasInitialization && hasSegments) {\n eventBus.trigger(_coreEventsEventsJs2['default'].REPRESENTATION_UPDATED, { sender: this, representation: representation });\n }\n }\n\n function getIndexForSegments(time, representation, timeThreshold) {\n var segments = representation.segments;\n var ln = segments ? segments.length : null;\n\n var idx = -1;\n var epsilon, frag, ft, fd, i;\n\n if (segments && ln > 0) {\n for (i = 0; i < ln; i++) {\n frag = segments[i];\n ft = frag.presentationStartTime;\n fd = frag.duration;\n epsilon = timeThreshold === undefined || timeThreshold === null ? fd / 2 : timeThreshold;\n if (time + epsilon >= ft && time - epsilon < ft + fd) {\n idx = frag.availabilityIdx;\n break;\n }\n }\n }\n\n return idx;\n }\n\n function getRequestForSegment(segment) {\n if (segment === null || segment === undefined) {\n return null;\n }\n\n var request = new _streamingVoFragmentRequestJs2['default']();\n var representation = segment.representation;\n var bandwidth = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].bandwidth;\n var url = segment.media;\n\n url = (0, _utilsSegmentsUtilsJs.replaceTokenForTemplate)(url, 'Number', segment.replacementNumber);\n url = (0, _utilsSegmentsUtilsJs.replaceTokenForTemplate)(url, 'Time', segment.replacementTime);\n url = (0, _utilsSegmentsUtilsJs.replaceTokenForTemplate)(url, 'Bandwidth', bandwidth);\n url = replaceIDForTemplate(url, representation.id);\n url = unescapeDollarsInTemplate(url);\n\n request.mediaType = type;\n request.type = _streamingVoMetricsHTTPRequestJs2['default'].MEDIA_SEGMENT_TYPE;\n request.range = segment.mediaRange;\n request.startTime = segment.presentationStartTime;\n request.duration = segment.duration;\n request.timescale = representation.timescale;\n request.availabilityStartTime = segment.availabilityStartTime;\n request.availabilityEndTime = segment.availabilityEndTime;\n request.wallStartTime = segment.wallStartTime;\n request.quality = representation.index;\n request.index = segment.availabilityIdx;\n request.mediaInfo = streamProcessor.getMediaInfo();\n request.adaptationIndex = representation.adaptation.index;\n\n if (setRequestUrl(request, url, representation)) {\n return request;\n }\n }\n\n function getSegmentRequestForTime(representation, time, options) {\n var request, segment, finished;\n\n var idx = index;\n\n var keepIdx = options ? options.keepIdx : false;\n var timeThreshold = options ? options.timeThreshold : null;\n var ignoreIsFinished = options && options.ignoreIsFinished ? true : false;\n\n if (!representation) {\n return null;\n }\n\n if (requestedTime !== time) {\n // When playing at live edge with 0 delay we may loop back with same time and index until it is available. Reduces verboseness of logs.\n requestedTime = time;\n log('Getting the request for ' + type + ' time : ' + time);\n }\n\n index = getIndexForSegments(time, representation, timeThreshold);\n //Index may be -1 if getSegments needs to update. So after getSegments is called and updated then try to get index again.\n updateSegments(representation);\n if (index < 0) {\n index = getIndexForSegments(time, representation, timeThreshold);\n }\n\n if (index > 0) {\n log('Index for ' + type + ' time ' + time + ' is ' + index);\n }\n\n finished = !ignoreIsFinished ? isMediaFinished(representation) : false;\n if (finished) {\n request = new _streamingVoFragmentRequestJs2['default']();\n request.action = _streamingVoFragmentRequestJs2['default'].ACTION_COMPLETE;\n request.index = index;\n request.mediaType = type;\n request.mediaInfo = streamProcessor.getMediaInfo();\n log('Signal complete.', request);\n } else {\n segment = (0, _utilsSegmentsUtilsJs.getSegmentByIndex)(index, representation);\n request = getRequestForSegment(segment);\n }\n\n if (keepIdx && idx >= 0) {\n index = representation.segmentInfoType === 'SegmentTimeline' && isDynamic ? index : idx;\n }\n\n return request;\n }\n\n function generateSegmentRequestForTime(representation, time) {\n var step = (representation.segmentAvailabilityRange.end - representation.segmentAvailabilityRange.start) / 2;\n\n representation.segments = null;\n representation.segmentAvailabilityRange = { start: time - step, end: time + step };\n return getSegmentRequestForTime(representation, time, { keepIdx: false, ignoreIsFinished: true });\n }\n\n function getNextSegmentRequest(representation) {\n var request, segment, finished;\n\n if (!representation || index === -1) {\n return null;\n }\n\n requestedTime = null;\n index++;\n\n log('Getting the next request at index: ' + index);\n\n finished = isMediaFinished(representation);\n if (finished) {\n request = new _streamingVoFragmentRequestJs2['default']();\n request.action = _streamingVoFragmentRequestJs2['default'].ACTION_COMPLETE;\n request.index = index;\n request.mediaType = type;\n request.mediaInfo = streamProcessor.getMediaInfo();\n log('Signal complete.');\n } else {\n updateSegments(representation);\n segment = (0, _utilsSegmentsUtilsJs.getSegmentByIndex)(index, representation);\n request = getRequestForSegment(segment);\n if (!segment && isDynamic) {\n /*\n Sometimes when playing dynamic streams with 0 fragment delay at live edge we ask for\n an index before it is available so we decrement index back and send null request\n which triggers the validate loop to rerun and the next time the segment should be\n available.\n */\n index--;\n }\n }\n\n return request;\n }\n\n function onInitializationLoaded(e) {\n var representation = e.representation;\n //log(\"Got an initialization.\");\n if (!representation.segments) return;\n\n eventBus.trigger(_coreEventsEventsJs2['default'].REPRESENTATION_UPDATED, { sender: this, representation: representation });\n }\n\n function onSegmentsLoaded(e) {\n if (e.error || type !== e.mediaType) return;\n\n var fragments = e.segments;\n var representation = e.representation;\n var segments = [];\n var count = 0;\n\n var i, len, s, seg;\n\n for (i = 0, len = fragments.length; i < len; i++) {\n s = fragments[i];\n\n seg = (0, _utilsSegmentsUtilsJs.getTimeBasedSegment)(timelineConverter, isDynamic, representation, s.startTime, s.duration, s.timescale, s.media, s.mediaRange, count);\n\n segments.push(seg);\n seg = null;\n count++;\n }\n\n representation.segmentAvailabilityRange = { start: segments[0].presentationStartTime, end: segments[len - 1].presentationStartTime };\n representation.availableSegmentsNumber = len;\n\n onSegmentListUpdated(representation, segments);\n\n if (!representation.initialization) return;\n\n eventBus.trigger(_coreEventsEventsJs2['default'].REPRESENTATION_UPDATED, { sender: this, representation: representation });\n }\n\n instance = {\n initialize: initialize,\n getStreamProcessor: getStreamProcessor,\n getInitRequest: getInitRequest,\n getSegmentRequestForTime: getSegmentRequestForTime,\n getNextSegmentRequest: getNextSegmentRequest,\n generateSegmentRequestForTime: generateSegmentRequestForTime,\n updateRepresentation: updateRepresentation,\n setCurrentTime: setCurrentTime,\n getCurrentTime: getCurrentTime,\n getCurrentIndex: getCurrentIndex,\n getEarliestTime: getEarliestTime,\n reset: reset\n };\n\n setup();\n\n return instance;\n}\n\nDashHandler.__dashjs_factory_name = 'DashHandler';\nvar factory = _coreFactoryMakerJs2['default'].getClassFactory(DashHandler);\nfactory.SEGMENTS_UNAVAILABLE_ERROR_CODE = SEGMENTS_UNAVAILABLE_ERROR_CODE;\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../core/Debug.js\":5,\"../core/EventBus.js\":6,\"../core/FactoryMaker.js\":7,\"../core/events/Events.js\":9,\"../streaming/utils/URLUtils.js\":96,\"../streaming/vo/Error.js\":100,\"../streaming/vo/FragmentRequest.js\":101,\"../streaming/vo/metrics/HTTPRequest.js\":117,\"./utils/SegmentsGetter.js\":20,\"./utils/SegmentsUtils.js\":21}],13:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _streamingVoMetricsHTTPRequestJs = _dereq_('../streaming/vo/metrics/HTTPRequest.js');\n\nvar _streamingVoMetricsHTTPRequestJs2 = _interopRequireDefault(_streamingVoMetricsHTTPRequestJs);\n\nvar _streamingControllersAbrControllerJs = _dereq_('../streaming/controllers/AbrController.js');\n\nvar _streamingControllersAbrControllerJs2 = _interopRequireDefault(_streamingControllersAbrControllerJs);\n\nvar _streamingModelsManifestModelJs = _dereq_('../streaming/models/ManifestModel.js');\n\nvar _streamingModelsManifestModelJs2 = _interopRequireDefault(_streamingModelsManifestModelJs);\n\nvar _modelsDashManifestModelJs = _dereq_('./models/DashManifestModel.js');\n\nvar _modelsDashManifestModelJs2 = _interopRequireDefault(_modelsDashManifestModelJs);\n\nvar _coreFactoryMakerJs = _dereq_('../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\n/**\n * @Module DashMetrics\n */\nfunction DashMetrics() {\n\n var instance = undefined;\n var context = this.context;\n var manifestModel = (0, _streamingModelsManifestModelJs2['default'])(context).getInstance(); //TODO Need to pass this in not bake in\n\n function getBandwidthForRepresentation(representationId, periodId) {\n var representation;\n var manifest = manifestModel.getValue();\n var period = manifest.Period_asArray[periodId];\n\n representation = findRepresentation(period, representationId);\n\n if (representation === null) {\n return null;\n }\n\n return representation.bandwidth;\n }\n\n /**\n *\n * @param representationId\n * @param periodIdx\n * @returns {*}\n */\n function getIndexForRepresentation(representationId, periodIdx) {\n var representationIndex;\n var manifest = manifestModel.getValue();\n var period = manifest.Period_asArray[periodIdx];\n\n representationIndex = findRepresentationIndex(period, representationId);\n return representationIndex;\n }\n\n /**\n * This method returns the current max index based on what is defined in the MPD.\n *\n * @param bufferType - String 'audio' or 'video',\n * @param periodIdx - Make sure this is the period index not id\n * @return int\n * @memberof module:DashMetrics\n * @instance\n */\n function getMaxIndexForBufferType(bufferType, periodIdx) {\n var maxIndex;\n var manifest = manifestModel.getValue();\n var period = manifest.Period_asArray[periodIdx];\n\n maxIndex = findMaxBufferIndex(period, bufferType);\n return maxIndex;\n }\n\n /**\n * This method returns the current max index correlated to the max allowed bitrate\n * explicitly set via the MediaPlayer's API setMaxAllowedBitrateFor.\n *\n * @param bufferType - String 'audio' or 'video',\n * @param periodId - Make sure this is the period id not index.\n * @return int\n * @see {@link module:MediaPlayer#setMaxAllowedBitrateFor setMaxAllowedBitrateFor()}\n * @see {@link DashMetrics#getMaxIndexForBufferType getMaxIndexForBufferType()}\n * @memberof module:DashMetrics\n * @instance\n */\n function getMaxAllowedIndexForBufferType(bufferType, periodId) {\n var idx = 0;\n var abrController = (0, _streamingControllersAbrControllerJs2['default'])(context).getInstance();\n\n if (abrController) {\n idx = abrController.getTopQualityIndexFor(bufferType, periodId);\n }\n\n return idx;\n }\n\n /**\n * @param metrics\n * @returns {*}\n * @memberof module:DashMetrics\n * @instance\n */\n function getCurrentRepresentationSwitch(metrics) {\n if (metrics === null) {\n return null;\n }\n\n var repSwitch = metrics.RepSwitchList;\n var repSwitchLength, repSwitchLastIndex, currentRepSwitch;\n\n if (repSwitch === null || repSwitch.length <= 0) {\n return null;\n }\n\n repSwitchLength = repSwitch.length;\n repSwitchLastIndex = repSwitchLength - 1;\n\n currentRepSwitch = repSwitch[repSwitchLastIndex];\n return currentRepSwitch;\n }\n\n /**\n * @param metrics\n * @returns {*}\n * @memberof module:DashMetrics\n * @instance\n */\n function getLatestBufferLevelVO(metrics) {\n if (metrics === null) {\n return null;\n }\n\n var bufferLevel = metrics.BufferLevel;\n if (bufferLevel === null || bufferLevel.length <= 0) {\n return null;\n }\n\n return bufferLevel[bufferLevel.length - 1];\n }\n\n /**\n * @param metrics\n * @returns {number}\n * @memberof module:DashMetrics\n * @instance\n */\n function getCurrentBufferLevel(metrics) {\n if (metrics === null) {\n return 0;\n }\n\n var bufferLevel = metrics.BufferLevel;\n if (bufferLevel === null || bufferLevel.length <= 0) {\n return 0;\n }\n\n return bufferLevel[bufferLevel.length - 1].level / 1000;\n }\n\n /**\n * @param metrics\n * @returns {null|*|vo}\n * @memberof module:DashMetrics\n * @instance\n */\n function getRequestsQueue(metrics) {\n return metrics.RequestsQueue;\n }\n\n /**\n * @param metrics\n * @returns {*}\n * @memberof module:DashMetrics\n * @instance\n */\n function getCurrentHttpRequest(metrics) {\n if (metrics === null) {\n return null;\n }\n\n var httpList = metrics.HttpList;\n var currentHttpList = null;\n\n var httpListLength, httpListLastIndex;\n\n if (httpList === null || httpList.length <= 0) {\n return null;\n }\n\n httpListLength = httpList.length;\n httpListLastIndex = httpListLength - 1;\n\n while (httpListLastIndex >= 0) {\n if (httpList[httpListLastIndex].responsecode) {\n currentHttpList = httpList[httpListLastIndex];\n break;\n }\n httpListLastIndex--;\n }\n return currentHttpList;\n }\n\n /**\n * @param metrics\n * @returns {*}\n * @memberof module:DashMetrics\n * @instance\n */\n function getHttpRequests(metrics) {\n if (metrics === null) {\n return [];\n }\n\n return !!metrics.HttpList ? metrics.HttpList : [];\n }\n\n /**\n * @param metrics\n * @returns {*}\n * @memberof module:DashMetrics\n * @instance\n */\n function getCurrentDroppedFrames(metrics) {\n if (metrics === null) {\n return null;\n }\n\n var droppedFrames = metrics.DroppedFrames;\n var droppedFramesLength, droppedFramesLastIndex, currentDroppedFrames;\n\n if (droppedFrames === null || droppedFrames.length <= 0) {\n return null;\n }\n\n droppedFramesLength = droppedFrames.length;\n droppedFramesLastIndex = droppedFramesLength - 1;\n currentDroppedFrames = droppedFrames[droppedFramesLastIndex];\n\n return currentDroppedFrames;\n }\n\n /**\n * @param metrics\n * @returns {*}\n * @memberof module:DashMetrics\n * @instance\n */\n function getCurrentSchedulingInfo(metrics) {\n if (metrics === null) return null;\n\n var schedulingInfo = metrics.SchedulingInfo;\n var ln, lastIdx, currentSchedulingInfo;\n\n if (schedulingInfo === null || schedulingInfo.length <= 0) {\n return null;\n }\n\n ln = schedulingInfo.length;\n lastIdx = ln - 1;\n\n currentSchedulingInfo = schedulingInfo[lastIdx];\n\n return currentSchedulingInfo;\n }\n\n /**\n * @param metrics\n * @returns {*}\n * @memberof module:DashMetrics\n * @instance\n */\n function getCurrentManifestUpdate(metrics) {\n if (metrics === null) return null;\n\n var manifestUpdate = metrics.ManifestUpdate;\n var ln, lastIdx, currentManifestUpdate;\n\n if (manifestUpdate === null || manifestUpdate.length <= 0) {\n return null;\n }\n\n ln = manifestUpdate.length;\n lastIdx = ln - 1;\n\n currentManifestUpdate = manifestUpdate[lastIdx];\n\n return currentManifestUpdate;\n }\n\n /**\n * @param metrics\n * @returns {*}\n * @memberof module:DashMetrics\n * @instance\n */\n function getCurrentDVRInfo(metrics) {\n\n if (metrics === null) {\n return null;\n }\n\n var dvrInfo = metrics.DVRInfo;\n var dvrInfoLastIndex, currentDVRInfo;\n\n if (dvrInfo === null || dvrInfo.length <= 0) {\n return null;\n }\n\n dvrInfoLastIndex = dvrInfo.length - 1;\n currentDVRInfo = dvrInfo[dvrInfoLastIndex];\n\n return currentDVRInfo;\n }\n\n /**\n * @param metrics\n * @param id\n * @returns {*}\n * @memberof module:DashMetrics\n * @instance\n */\n function getLatestMPDRequestHeaderValueByID(metrics, id) {\n var headers = {};\n var httpRequestList, httpRequest, i;\n\n if (metrics === null) {\n return null;\n }\n\n httpRequestList = getHttpRequests(metrics);\n\n for (i = httpRequestList.length - 1; i >= 0; i--) {\n httpRequest = httpRequestList[i];\n\n if (httpRequest.type === _streamingVoMetricsHTTPRequestJs2['default'].MPD_TYPE) {\n headers = parseResponseHeaders(httpRequest._responseHeaders);\n break;\n }\n }\n\n return headers[id] === undefined ? null : headers[id];\n }\n\n /**\n * @param metrics\n * @param id\n * @returns {*}\n * @memberof module:DashMetrics\n * @instance\n */\n function getLatestFragmentRequestHeaderValueByID(metrics, id) {\n\n if (metrics === null) return null;\n\n var httpRequest = getCurrentHttpRequest(metrics);\n var headers;\n\n if (httpRequest === null || httpRequest._responseHeaders === null) return null;\n\n headers = parseResponseHeaders(httpRequest._responseHeaders);\n return headers[id] === undefined ? null : headers[id];\n }\n\n function parseResponseHeaders(headerStr) {\n var headers = {};\n if (!headerStr) {\n return headers;\n }\n var headerPairs = headerStr.split('\\r\\n');\n for (var i = 0, ilen = headerPairs.length; i < ilen; i++) {\n var headerPair = headerPairs[i];\n var index = headerPair.indexOf(': ');\n if (index > 0) {\n headers[headerPair.substring(0, index)] = headerPair.substring(index + 2);\n }\n }\n return headers;\n }\n\n function findRepresentationIndex(period, representationId) {\n var adaptationSet, adaptationSetArray, representation, representationArray, adaptationSetArrayIndex, representationArrayIndex;\n\n adaptationSetArray = period.AdaptationSet_asArray;\n for (adaptationSetArrayIndex = 0; adaptationSetArrayIndex < adaptationSetArray.length; adaptationSetArrayIndex = adaptationSetArrayIndex + 1) {\n adaptationSet = adaptationSetArray[adaptationSetArrayIndex];\n representationArray = adaptationSet.Representation_asArray;\n for (representationArrayIndex = 0; representationArrayIndex < representationArray.length; representationArrayIndex = representationArrayIndex + 1) {\n representation = representationArray[representationArrayIndex];\n if (representationId === representation.id) {\n return representationArrayIndex;\n }\n }\n }\n\n return -1;\n }\n\n function findRepresentation(period, representationId) {\n var adaptationSet, adaptationSetArray, representation, representationArray, adaptationSetArrayIndex, representationArrayIndex;\n\n adaptationSetArray = period.AdaptationSet_asArray;\n for (adaptationSetArrayIndex = 0; adaptationSetArrayIndex < adaptationSetArray.length; adaptationSetArrayIndex = adaptationSetArrayIndex + 1) {\n adaptationSet = adaptationSetArray[adaptationSetArrayIndex];\n representationArray = adaptationSet.Representation_asArray;\n for (representationArrayIndex = 0; representationArrayIndex < representationArray.length; representationArrayIndex = representationArrayIndex + 1) {\n representation = representationArray[representationArrayIndex];\n if (representationId === representation.id) {\n return representation;\n }\n }\n }\n\n return null;\n }\n\n function adaptationIsType(adaptation, bufferType) {\n return (0, _modelsDashManifestModelJs2['default'])(context).getInstance().getIsTypeOf(adaptation, bufferType);\n }\n\n function findMaxBufferIndex(period, bufferType) {\n var adaptationSet, adaptationSetArray, representationArray, adaptationSetArrayIndex;\n\n if (!period || !bufferType) return -1;\n\n adaptationSetArray = period.AdaptationSet_asArray;\n for (adaptationSetArrayIndex = 0; adaptationSetArrayIndex < adaptationSetArray.length; adaptationSetArrayIndex = adaptationSetArrayIndex + 1) {\n adaptationSet = adaptationSetArray[adaptationSetArrayIndex];\n representationArray = adaptationSet.Representation_asArray;\n if (adaptationIsType(adaptationSet, bufferType)) {\n return representationArray.length;\n }\n }\n\n return -1;\n }\n\n instance = {\n getBandwidthForRepresentation: getBandwidthForRepresentation,\n getIndexForRepresentation: getIndexForRepresentation,\n getMaxIndexForBufferType: getMaxIndexForBufferType,\n getMaxAllowedIndexForBufferType: getMaxAllowedIndexForBufferType,\n getCurrentRepresentationSwitch: getCurrentRepresentationSwitch,\n getLatestBufferLevelVO: getLatestBufferLevelVO,\n getCurrentBufferLevel: getCurrentBufferLevel,\n getCurrentHttpRequest: getCurrentHttpRequest,\n getHttpRequests: getHttpRequests,\n getCurrentDroppedFrames: getCurrentDroppedFrames,\n getCurrentSchedulingInfo: getCurrentSchedulingInfo,\n getCurrentDVRInfo: getCurrentDVRInfo,\n getCurrentManifestUpdate: getCurrentManifestUpdate,\n getLatestFragmentRequestHeaderValueByID: getLatestFragmentRequestHeaderValueByID,\n getLatestMPDRequestHeaderValueByID: getLatestMPDRequestHeaderValueByID,\n getRequestsQueue: getRequestsQueue\n };\n\n return instance;\n}\n\nDashMetrics.__dashjs_factory_name = 'DashMetrics';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(DashMetrics);\nmodule.exports = exports['default'];\n\n},{\"../core/FactoryMaker.js\":7,\"../streaming/controllers/AbrController.js\":46,\"../streaming/models/ManifestModel.js\":63,\"../streaming/vo/metrics/HTTPRequest.js\":117,\"./models/DashManifestModel.js\":17}],14:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _streamingUtilsErrorHandlerJs = _dereq_('../streaming/utils/ErrorHandler.js');\n\nvar _streamingUtilsErrorHandlerJs2 = _interopRequireDefault(_streamingUtilsErrorHandlerJs);\n\nvar _coreFactoryMakerJs = _dereq_('../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreDebugJs = _dereq_('../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nvar _externalsObjectironJs = _dereq_('../../externals/objectiron.js');\n\nvar _externalsObjectironJs2 = _interopRequireDefault(_externalsObjectironJs);\n\nvar _externalsXml2jsonJs = _dereq_('../../externals/xml2json.js');\n\nvar _externalsXml2jsonJs2 = _interopRequireDefault(_externalsXml2jsonJs);\n\nfunction DashParser() /*config*/{\n\n var SECONDS_IN_YEAR = 365 * 24 * 60 * 60;\n var SECONDS_IN_MONTH = 30 * 24 * 60 * 60;\n var SECONDS_IN_DAY = 24 * 60 * 60;\n var SECONDS_IN_HOUR = 60 * 60;\n var SECONDS_IN_MIN = 60;\n var MINUTES_IN_HOUR = 60;\n var MILLISECONDS_IN_SECONDS = 1000;\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n\n var instance = undefined,\n durationRegex = undefined,\n datetimeRegex = undefined,\n numericRegex = undefined,\n httpOrHttpsRegex = undefined,\n originRegex = undefined,\n matchers = undefined;\n\n function setup() {\n\n durationRegex = /^([-])?P(([\\d.]*)Y)?(([\\d.]*)M)?(([\\d.]*)D)?T?(([\\d.]*)H)?(([\\d.]*)M)?(([\\d.]*)S)?/;\n datetimeRegex = /^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\\.[0-9]*)?)?(?:([+-])([0-9]{2})([0-9]{2}))?/;\n numericRegex = /^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/;\n httpOrHttpsRegex = /^https?:\\/\\//i;\n originRegex = /^(https?:\\/\\/[^\\/]+)\\/?/i;\n //TODO-Refactor clean this up and move into its own util or somewhere else.\n matchers = [{\n type: 'duration',\n test: function test(attr) {\n\n var attributeList = ['minBufferTime', 'mediaPresentationDuration', 'minimumUpdatePeriod', 'timeShiftBufferDepth', 'maxSegmentDuration', 'maxSubsegmentDuration', 'suggestedPresentationDelay', 'start', 'starttime', 'duration'];\n var len = attributeList.length;\n\n for (var i = 0; i < len; i++) {\n if (attr.nodeName === attributeList[i]) {\n return durationRegex.test(attr.value);\n }\n }\n return false;\n },\n converter: function converter(str) {\n //str = \"P10Y10M10DT10H10M10.1S\";\n var match = durationRegex.exec(str);\n var result = parseFloat(match[2] || 0) * SECONDS_IN_YEAR + parseFloat(match[4] || 0) * SECONDS_IN_MONTH + parseFloat(match[6] || 0) * SECONDS_IN_DAY + parseFloat(match[8] || 0) * SECONDS_IN_HOUR + parseFloat(match[10] || 0) * SECONDS_IN_MIN + parseFloat(match[12] || 0);\n\n if (match[1] !== undefined) {\n result = -result;\n }\n\n return result;\n }\n }, {\n type: 'datetime',\n test: function test(attr) {\n return datetimeRegex.test(attr.value);\n },\n converter: function converter(str) {\n var match = datetimeRegex.exec(str);\n var utcDate;\n // If the string does not contain a timezone offset different browsers can interpret it either\n // as UTC or as a local time so we have to parse the string manually to normalize the given date value for\n // all browsers\n utcDate = Date.UTC(parseInt(match[1], 10), parseInt(match[2], 10) - 1, // months start from zero\n parseInt(match[3], 10), parseInt(match[4], 10), parseInt(match[5], 10), match[6] && parseInt(match[6], 10) || 0, match[7] && parseFloat(match[7]) * MILLISECONDS_IN_SECONDS || 0);\n // If the date has timezone offset take it into account as well\n if (match[9] && match[10]) {\n var timezoneOffset = parseInt(match[9], 10) * MINUTES_IN_HOUR + parseInt(match[10], 10);\n utcDate += (match[8] === '+' ? -1 : +1) * timezoneOffset * SECONDS_IN_MIN * MILLISECONDS_IN_SECONDS;\n }\n\n return new Date(utcDate);\n }\n }, {\n type: 'numeric',\n test: function test(attr) {\n return numericRegex.test(attr.value);\n },\n converter: function converter(str) {\n return parseFloat(str);\n }\n }];\n }\n\n function getCommonValuesMap() {\n var adaptationSet, representation, subRepresentation, common;\n\n common = [{\n name: 'profiles',\n merge: false\n }, {\n name: 'width',\n merge: false\n }, {\n name: 'height',\n merge: false\n }, {\n name: 'sar',\n merge: false\n }, {\n name: 'frameRate',\n merge: false\n }, {\n name: 'audioSamplingRate',\n merge: false\n }, {\n name: 'mimeType',\n merge: false\n }, {\n name: 'segmentProfiles',\n merge: false\n }, {\n name: 'codecs',\n merge: false\n }, {\n name: 'maximumSAPPeriod',\n merge: false\n }, {\n name: 'startsWithSap',\n merge: false\n }, {\n name: 'maxPlayoutRate',\n merge: false\n }, {\n name: 'codingDependency',\n merge: false\n }, {\n name: 'scanType',\n merge: false\n }, {\n name: 'FramePacking',\n merge: true\n }, {\n name: 'AudioChannelConfiguration',\n merge: true\n }, {\n name: 'ContentProtection',\n merge: true\n }];\n\n adaptationSet = {};\n adaptationSet.name = 'AdaptationSet';\n adaptationSet.isRoot = false;\n adaptationSet.isArray = true;\n adaptationSet.parent = null;\n adaptationSet.children = [];\n adaptationSet.properties = common;\n\n representation = {};\n representation.name = 'Representation';\n representation.isRoot = false;\n representation.isArray = true;\n representation.parent = adaptationSet;\n representation.children = [];\n representation.properties = common;\n adaptationSet.children.push(representation);\n\n subRepresentation = {};\n subRepresentation.name = 'SubRepresentation';\n subRepresentation.isRoot = false;\n subRepresentation.isArray = true;\n subRepresentation.parent = representation;\n subRepresentation.children = [];\n subRepresentation.properties = common;\n representation.children.push(subRepresentation);\n\n return adaptationSet;\n }\n\n function getSegmentValuesMap() {\n var period, adaptationSet, representation, common;\n\n common = [{\n name: 'SegmentBase',\n merge: true\n }, {\n name: 'SegmentTemplate',\n merge: true\n }, {\n name: 'SegmentList',\n merge: true\n }];\n\n period = {};\n period.name = 'Period';\n period.isRoot = false;\n period.isArray = true;\n period.parent = null;\n period.children = [];\n period.properties = common;\n\n adaptationSet = {};\n adaptationSet.name = 'AdaptationSet';\n adaptationSet.isRoot = false;\n adaptationSet.isArray = true;\n adaptationSet.parent = period;\n adaptationSet.children = [];\n adaptationSet.properties = common;\n period.children.push(adaptationSet);\n\n representation = {};\n representation.name = 'Representation';\n representation.isRoot = false;\n representation.isArray = true;\n representation.parent = adaptationSet;\n representation.children = [];\n representation.properties = common;\n adaptationSet.children.push(representation);\n\n return period;\n }\n\n function getDashMap() {\n var result = [];\n\n result.push(getCommonValuesMap());\n result.push(getSegmentValuesMap());\n\n return result;\n }\n\n function parse(data, xlinkController) {\n\n var converter = new _externalsXml2jsonJs2['default'](matchers, '', true);\n var iron = new _externalsObjectironJs2['default'](getDashMap());\n var start = new Date();\n\n var manifest;\n var json = null;\n var ironed = null;\n\n try {\n //log(\"Converting from XML.\");\n manifest = converter.xml_str2json(data);\n\n if (!manifest) {\n throw 'parser error';\n }\n\n json = new Date();\n\n if (manifest.hasOwnProperty('Location')) {\n // for now, do not support multiple Locations -\n // just set Location to the first Location.\n manifest.Location = manifest.Location_asArray[0];\n }\n\n //log(\"Flatten manifest properties.\");\n iron.run(manifest);\n ironed = new Date();\n\n xlinkController.setMatchers(matchers);\n xlinkController.setIron(iron);\n\n log('Parsing complete: ( xml2json: ' + (json.getTime() - start.getTime()) + 'ms, objectiron: ' + (ironed.getTime() - json.getTime()) + 'ms, total: ' + (ironed.getTime() - start.getTime()) / 1000 + 's)');\n } catch (err) {\n (0, _streamingUtilsErrorHandlerJs2['default'])(context).getInstance().manifestError('parsing the manifest failed', 'parse', data);\n return null;\n }\n return manifest;\n }\n\n instance = {\n parse: parse\n };\n\n setup();\n return instance;\n}\n\nDashParser.__dashjs_factory_name = 'DashParser';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(DashParser);\nmodule.exports = exports['default'];\n\n},{\"../../externals/objectiron.js\":2,\"../../externals/xml2json.js\":3,\"../core/Debug.js\":5,\"../core/FactoryMaker.js\":7,\"../streaming/utils/ErrorHandler.js\":90}],15:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _streamingUtilsRequestModifierJs = _dereq_('../streaming/utils/RequestModifier.js');\n\nvar _streamingUtilsRequestModifierJs2 = _interopRequireDefault(_streamingUtilsRequestModifierJs);\n\nvar _voSegmentJs = _dereq_('./vo/Segment.js');\n\nvar _voSegmentJs2 = _interopRequireDefault(_voSegmentJs);\n\nvar _streamingVoErrorJs = _dereq_('../streaming/vo/Error.js');\n\nvar _streamingVoErrorJs2 = _interopRequireDefault(_streamingVoErrorJs);\n\nvar _streamingUtilsErrorHandlerJs = _dereq_('../streaming/utils/ErrorHandler.js');\n\nvar _streamingUtilsErrorHandlerJs2 = _interopRequireDefault(_streamingUtilsErrorHandlerJs);\n\nvar _coreEventsEventsJs = _dereq_('../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreEventBusJs = _dereq_('../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _streamingUtilsBoxParserJs = _dereq_('../streaming/utils/BoxParser.js');\n\nvar _streamingUtilsBoxParserJs2 = _interopRequireDefault(_streamingUtilsBoxParserJs);\n\nvar _coreFactoryMakerJs = _dereq_('../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreDebugJs = _dereq_('../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nfunction SegmentBaseLoader() {\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var instance = undefined,\n errHandler = undefined,\n boxParser = undefined,\n requestModifier = undefined,\n baseURLController = undefined;\n\n function initialize() {\n errHandler = (0, _streamingUtilsErrorHandlerJs2['default'])(context).getInstance();\n boxParser = (0, _streamingUtilsBoxParserJs2['default'])(context).getInstance();\n requestModifier = (0, _streamingUtilsRequestModifierJs2['default'])(context).getInstance();\n }\n\n function setConfig(config) {\n if (config.baseURLController) {\n baseURLController = config.baseURLController;\n }\n }\n\n function loadInitialization(representation, loadingInfo) {\n var needFailureReport = true;\n var initRange = null;\n var isoFile = null;\n var request = window.hola_cdn && window.hola_cdn.api && window.hola_cdn.api.new_http_request && window.hola_cdn.api.new_http_request({}) || new XMLHttpRequest();\n var baseUrl = baseURLController.resolve(representation.path);\n var info = loadingInfo || {\n url: baseUrl ? baseUrl.url : undefined,\n range: {\n start: 0,\n end: 1500\n },\n searching: false,\n bytesLoaded: 0,\n bytesToLoad: 1500,\n request: request\n };\n\n log('Start searching for initialization.');\n\n request.onload = function () {\n if (request.status < 200 || request.status > 299) return;\n\n needFailureReport = false;\n\n info.bytesLoaded = info.range.end;\n isoFile = boxParser.parse(request.response);\n initRange = findInitRange(isoFile);\n\n if (initRange) {\n representation.range = initRange;\n representation.initialization = info.url;\n eventBus.trigger(_coreEventsEventsJs2['default'].INITIALIZATION_LOADED, { representation: representation });\n } else {\n info.range.end = info.bytesLoaded + info.bytesToLoad;\n loadInitialization(representation, info);\n }\n };\n\n request.onloadend = request.onerror = function () {\n if (!needFailureReport) return;\n needFailureReport = false;\n\n errHandler.downloadError('initialization', info.url, request);\n eventBus.trigger(_coreEventsEventsJs2['default'].INITIALIZATION_LOADED, { representation: representation });\n };\n\n sendRequest(request, info);\n log('Perform init search: ' + info.url);\n }\n\n function loadSegments(representation, type, range, loadingInfo, callback) {\n if (range && (range.start === undefined || range.end === undefined)) {\n var parts = range ? range.toString().split('-') : null;\n range = parts ? { start: parseFloat(parts[0]), end: parseFloat(parts[1]) } : null;\n }\n\n callback = !callback ? onLoaded : callback;\n var needFailureReport = true;\n var isoFile = null;\n var sidx = null;\n var hasRange = !!range;\n var request = window.hola_cdn && window.hola_cdn.api && window.hola_cdn.api.new_http_request && window.hola_cdn.api.new_http_request({}) || new XMLHttpRequest();\n var baseUrl = baseURLController.resolve(representation.path);\n var info = {\n url: baseUrl ? baseUrl.url : undefined,\n range: hasRange ? range : { start: 0, end: 1500 },\n searching: !hasRange,\n bytesLoaded: loadingInfo ? loadingInfo.bytesLoaded : 0,\n bytesToLoad: 1500,\n request: request\n };\n\n request.onload = function () {\n if (request.status < 200 || request.status > 299) return;\n\n var extraBytes = info.bytesToLoad;\n var loadedLength = request.response.byteLength;\n\n needFailureReport = false;\n info.bytesLoaded = info.range.end - info.range.start;\n isoFile = boxParser.parse(request.response);\n sidx = isoFile.getBox('sidx');\n\n if (!sidx || !sidx.isComplete) {\n if (sidx) {\n info.range.start = sidx.offset || info.range.start;\n info.range.end = info.range.start + (sidx.size || extraBytes);\n } else if (loadedLength < info.bytesLoaded) {\n // if we have reached a search limit or if we have reached the end of the file we have to stop trying to find sidx\n callback(null, representation, type);\n return;\n } else {\n var lastBox = isoFile.getLastBox();\n\n if (lastBox && lastBox.size) {\n info.range.start = lastBox.offset + lastBox.size;\n info.range.end = info.range.start + extraBytes;\n } else {\n info.range.end += extraBytes;\n }\n }\n loadSegments(representation, type, info.range, info, callback);\n } else {\n var ref = sidx.references;\n var loadMultiSidx, segments;\n\n if (ref !== null && ref !== undefined && ref.length > 0) {\n loadMultiSidx = ref[0].reference_type === 1;\n }\n\n if (loadMultiSidx) {\n log('Initiate multiple SIDX load.');\n info.range.end = info.range.start + sidx.size;\n\n var j, len, ss, se, r;\n var segs = [];\n var count = 0;\n var offset = (sidx.offset || info.range.start) + sidx.size;\n var tmpCallback = function tmpCallback(result) {\n if (result) {\n segs = segs.concat(result);\n count++;\n\n if (count >= len) {\n callback(segs, representation, type);\n }\n } else {\n callback(null, representation, type);\n }\n };\n\n for (j = 0, len = ref.length; j < len; j++) {\n ss = offset;\n se = offset + ref[j].referenced_size - 1;\n offset = offset + ref[j].referenced_size;\n r = { start: ss, end: se };\n loadSegments(representation, null, r, info, tmpCallback);\n }\n } else {\n log('Parsing segments from SIDX.');\n segments = getSegmentsForSidx(sidx, info);\n callback(segments, representation, type);\n }\n }\n };\n\n request.onloadend = request.onerror = function () {\n if (!needFailureReport) return;\n\n needFailureReport = false;\n errHandler.downloadError('SIDX', info.url, request);\n callback(null, representation, type);\n };\n\n sendRequest(request, info);\n log('Perform SIDX load: ' + info.url);\n }\n\n function reset() {\n errHandler = null;\n boxParser = null;\n requestModifier = null;\n log = null;\n }\n\n function getSegmentsForSidx(sidx, info) {\n\n var refs = sidx.references;\n var len = refs.length;\n var timescale = sidx.timescale;\n var time = sidx.earliest_presentation_time;\n var start = info.range.start + sidx.first_offset + sidx.size;\n var segments = [];\n var segment, end, duration, size;\n\n for (var i = 0; i < len; i++) {\n duration = refs[i].subsegment_duration;\n size = refs[i].referenced_size;\n\n segment = new _voSegmentJs2['default']();\n segment.duration = duration;\n segment.media = info.url;\n segment.startTime = time;\n segment.timescale = timescale;\n end = start + size - 1;\n segment.mediaRange = start + '-' + end;\n segments.push(segment);\n time += duration;\n start += size;\n }\n\n return segments;\n }\n\n function findInitRange(isoFile) {\n var ftyp = isoFile.getBox('ftyp');\n var moov = isoFile.getBox('moov');\n\n var initRange = null;\n var start, end;\n\n log('Searching for initialization.');\n\n if (moov && moov.isComplete) {\n start = ftyp ? ftyp.offset : moov.offset;\n end = moov.offset + moov.size - 1;\n initRange = start + '-' + end;\n\n log('Found the initialization. Range: ' + initRange);\n }\n\n return initRange;\n }\n\n function sendRequest(request, info) {\n if (!info.url) {\n return;\n }\n\n request.open('GET', requestModifier.modifyRequestURL(info.url));\n request.responseType = 'arraybuffer';\n request.setRequestHeader('Range', 'bytes=' + info.range.start + '-' + info.range.end);\n request = requestModifier.modifyRequestHeader(request);\n request.send(null);\n }\n\n function onLoaded(segments, representation, type) {\n if (segments) {\n eventBus.trigger(_coreEventsEventsJs2['default'].SEGMENTS_LOADED, { segments: segments, representation: representation, mediaType: type });\n } else {\n eventBus.trigger(_coreEventsEventsJs2['default'].SEGMENTS_LOADED, { segments: null, representation: representation, mediaType: type, error: new _streamingVoErrorJs2['default'](null, 'error loading segments', null) });\n }\n }\n\n instance = {\n setConfig: setConfig,\n initialize: initialize,\n loadInitialization: loadInitialization,\n loadSegments: loadSegments,\n reset: reset\n };\n\n return instance;\n}\n\nSegmentBaseLoader.__dashjs_factory_name = 'SegmentBaseLoader';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(SegmentBaseLoader);\nmodule.exports = exports['default'];\n\n},{\"../core/Debug.js\":5,\"../core/EventBus.js\":6,\"../core/FactoryMaker.js\":7,\"../core/events/Events.js\":9,\"../streaming/utils/BoxParser.js\":86,\"../streaming/utils/ErrorHandler.js\":90,\"../streaming/utils/RequestModifier.js\":94,\"../streaming/vo/Error.js\":100,\"./vo/Segment.js\":32}],16:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _modelsDashManifestModelJs = _dereq_('../models/DashManifestModel.js');\n\nvar _modelsDashManifestModelJs2 = _interopRequireDefault(_modelsDashManifestModelJs);\n\nvar _DashMetricsJs = _dereq_('../DashMetrics.js');\n\nvar _DashMetricsJs2 = _interopRequireDefault(_DashMetricsJs);\n\nvar _utilsTimelineConverterJs = _dereq_('../utils/TimelineConverter.js');\n\nvar _utilsTimelineConverterJs2 = _interopRequireDefault(_utilsTimelineConverterJs);\n\nvar _streamingControllersAbrControllerJs = _dereq_('../../streaming/controllers/AbrController.js');\n\nvar _streamingControllersAbrControllerJs2 = _interopRequireDefault(_streamingControllersAbrControllerJs);\n\nvar _streamingControllersPlaybackControllerJs = _dereq_('../../streaming/controllers/PlaybackController.js');\n\nvar _streamingControllersPlaybackControllerJs2 = _interopRequireDefault(_streamingControllersPlaybackControllerJs);\n\nvar _streamingControllersStreamControllerJs = _dereq_('../../streaming/controllers/StreamController.js');\n\nvar _streamingControllersStreamControllerJs2 = _interopRequireDefault(_streamingControllersStreamControllerJs);\n\nvar _streamingModelsManifestModelJs = _dereq_('../../streaming/models/ManifestModel.js');\n\nvar _streamingModelsManifestModelJs2 = _interopRequireDefault(_streamingModelsManifestModelJs);\n\nvar _streamingModelsMetricsModelJs = _dereq_('../../streaming/models/MetricsModel.js');\n\nvar _streamingModelsMetricsModelJs2 = _interopRequireDefault(_streamingModelsMetricsModelJs);\n\nvar _streamingModelsMediaPlayerModelJs = _dereq_('../../streaming/models/MediaPlayerModel.js');\n\nvar _streamingModelsMediaPlayerModelJs2 = _interopRequireDefault(_streamingModelsMediaPlayerModelJs);\n\nvar _streamingUtilsDOMStorageJs = _dereq_('../../streaming/utils/DOMStorage.js');\n\nvar _streamingUtilsDOMStorageJs2 = _interopRequireDefault(_streamingUtilsDOMStorageJs);\n\nvar _streamingVoErrorJs = _dereq_('../../streaming/vo/Error.js');\n\nvar _streamingVoErrorJs2 = _interopRequireDefault(_streamingVoErrorJs);\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction RepresentationController() {\n\n var SEGMENTS_UPDATE_FAILED_ERROR_CODE = 1;\n\n var context = this.context;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var instance = undefined,\n data = undefined,\n dataIndex = undefined,\n updating = undefined,\n availableRepresentations = undefined,\n currentRepresentation = undefined,\n streamProcessor = undefined,\n abrController = undefined,\n indexHandler = undefined,\n streamController = undefined,\n playbackController = undefined,\n manifestModel = undefined,\n metricsModel = undefined,\n domStorage = undefined,\n timelineConverter = undefined,\n dashManifestModel = undefined,\n dashMetrics = undefined,\n mediaPlayerModel = undefined;\n\n function setup() {\n data = null;\n dataIndex = -1;\n updating = true;\n availableRepresentations = [];\n\n abrController = (0, _streamingControllersAbrControllerJs2['default'])(context).getInstance();\n streamController = (0, _streamingControllersStreamControllerJs2['default'])(context).getInstance();\n playbackController = (0, _streamingControllersPlaybackControllerJs2['default'])(context).getInstance();\n manifestModel = (0, _streamingModelsManifestModelJs2['default'])(context).getInstance();\n metricsModel = (0, _streamingModelsMetricsModelJs2['default'])(context).getInstance();\n domStorage = (0, _streamingUtilsDOMStorageJs2['default'])(context).getInstance();\n timelineConverter = (0, _utilsTimelineConverterJs2['default'])(context).getInstance();\n dashManifestModel = (0, _modelsDashManifestModelJs2['default'])(context).getInstance();\n dashMetrics = (0, _DashMetricsJs2['default'])(context).getInstance();\n mediaPlayerModel = (0, _streamingModelsMediaPlayerModelJs2['default'])(context).getInstance();\n\n eventBus.on(_coreEventsEventsJs2['default'].QUALITY_CHANGED, onQualityChanged, instance);\n eventBus.on(_coreEventsEventsJs2['default'].REPRESENTATION_UPDATED, onRepresentationUpdated, instance);\n eventBus.on(_coreEventsEventsJs2['default'].WALLCLOCK_TIME_UPDATED, onWallclockTimeUpdated, instance);\n eventBus.on(_coreEventsEventsJs2['default'].BUFFER_LEVEL_UPDATED, onBufferLevelUpdated, instance);\n eventBus.on(_coreEventsEventsJs2['default'].LIVE_EDGE_SEARCH_COMPLETED, onLiveEdgeSearchCompleted, instance);\n }\n\n function setConfig(config) {\n // allow the abrController created in setup to be overidden\n if (config.abrController) {\n abrController = config.abrController;\n }\n }\n\n function initialize(StreamProcessor) {\n streamProcessor = StreamProcessor;\n indexHandler = streamProcessor.getIndexHandler();\n }\n\n function getStreamProcessor() {\n return streamProcessor;\n }\n\n function getData() {\n return data;\n }\n\n function getDataIndex() {\n return dataIndex;\n }\n\n function isUpdating() {\n return updating;\n }\n\n function getCurrentRepresentation() {\n return currentRepresentation;\n }\n\n function reset() {\n\n eventBus.off(_coreEventsEventsJs2['default'].QUALITY_CHANGED, onQualityChanged, instance);\n eventBus.off(_coreEventsEventsJs2['default'].REPRESENTATION_UPDATED, onRepresentationUpdated, instance);\n eventBus.off(_coreEventsEventsJs2['default'].WALLCLOCK_TIME_UPDATED, onWallclockTimeUpdated, instance);\n eventBus.off(_coreEventsEventsJs2['default'].BUFFER_LEVEL_UPDATED, onBufferLevelUpdated, instance);\n eventBus.off(_coreEventsEventsJs2['default'].LIVE_EDGE_SEARCH_COMPLETED, onLiveEdgeSearchCompleted, instance);\n\n data = null;\n dataIndex = -1;\n updating = true;\n availableRepresentations = [];\n abrController = null;\n streamController = null;\n playbackController = null;\n manifestModel = null;\n metricsModel = null;\n domStorage = null;\n timelineConverter = null;\n dashManifestModel = null;\n dashMetrics = null;\n mediaPlayerModel = null;\n }\n\n function updateData(dataValue, adaptation, type) {\n var quality, averageThroughput;\n\n var bitrate = null;\n var streamInfo = streamProcessor.getStreamInfo();\n var maxQuality = abrController.getTopQualityIndexFor(type, streamInfo.id);\n\n updating = true;\n eventBus.trigger(_coreEventsEventsJs2['default'].DATA_UPDATE_STARTED, { sender: this });\n\n availableRepresentations = updateRepresentations(adaptation);\n\n if (data === null && type !== 'fragmentedText') {\n averageThroughput = abrController.getAverageThroughput(type);\n bitrate = averageThroughput || abrController.getInitialBitrateFor(type, streamInfo);\n quality = abrController.getQualityForBitrate(streamProcessor.getMediaInfo(), bitrate);\n } else {\n quality = abrController.getQualityFor(type, streamInfo);\n }\n\n if (quality > maxQuality) {\n quality = maxQuality;\n }\n\n currentRepresentation = getRepresentationForQuality(quality);\n data = dataValue;\n\n if (type !== 'video' && type !== 'audio' && type !== 'fragmentedText') {\n updating = false;\n eventBus.trigger(_coreEventsEventsJs2['default'].DATA_UPDATE_COMPLETED, { sender: this, data: data, currentRepresentation: currentRepresentation });\n return;\n }\n\n for (var i = 0; i < availableRepresentations.length; i++) {\n indexHandler.updateRepresentation(availableRepresentations[i], true);\n }\n }\n\n function addRepresentationSwitch() {\n var now = new Date();\n var currentRepresentation = getCurrentRepresentation();\n var currentVideoTimeMs = playbackController.getTime() * 1000;\n\n metricsModel.addRepresentationSwitch(currentRepresentation.adaptation.type, now, currentVideoTimeMs, currentRepresentation.id);\n }\n\n function addDVRMetric() {\n var range = timelineConverter.calcSegmentAvailabilityRange(currentRepresentation, streamProcessor.isDynamic());\n metricsModel.addDVRInfo(streamProcessor.getType(), playbackController.getTime(), streamProcessor.getStreamInfo().manifestInfo, range);\n }\n\n function getRepresentationForQuality(quality) {\n return availableRepresentations[quality];\n }\n\n function getQualityForRepresentation(representation) {\n return availableRepresentations.indexOf(representation);\n }\n\n function isAllRepresentationsUpdated() {\n for (var i = 0, ln = availableRepresentations.length; i < ln; i++) {\n var segmentInfoType = availableRepresentations[i].segmentInfoType;\n if (availableRepresentations[i].segmentAvailabilityRange === null || availableRepresentations[i].initialization === null || (segmentInfoType === 'SegmentBase' || segmentInfoType === 'BaseURL') && !availableRepresentations[i].segments) {\n return false;\n }\n }\n\n return true;\n }\n\n function updateRepresentations(adaptation) {\n var reps;\n var manifest = manifestModel.getValue();\n\n dataIndex = dashManifestModel.getIndexForAdaptation(data, manifest, adaptation.period.index);\n reps = dashManifestModel.getRepresentationsForAdaptation(manifest, adaptation);\n\n return reps;\n }\n\n function updateAvailabilityWindow(isDynamic) {\n var rep;\n\n for (var i = 0, ln = availableRepresentations.length; i < ln; i++) {\n rep = availableRepresentations[i];\n rep.segmentAvailabilityRange = timelineConverter.calcSegmentAvailabilityRange(rep, isDynamic);\n }\n }\n\n function resetAvailabilityWindow() {\n availableRepresentations.forEach(function (rep) {\n rep.segmentAvailabilityRange = null;\n });\n }\n\n function postponeUpdate(postponeTimePeriod) {\n var delay = postponeTimePeriod;\n var update = function update() {\n if (isUpdating()) return;\n\n updating = true;\n eventBus.trigger(_coreEventsEventsJs2['default'].DATA_UPDATE_STARTED, { sender: instance });\n\n // clear the segmentAvailabilityRange for all reps.\n // this ensures all are updated before the live edge search starts\n resetAvailabilityWindow();\n\n for (var i = 0; i < availableRepresentations.length; i++) {\n indexHandler.updateRepresentation(availableRepresentations[i], true);\n }\n };\n\n updating = false;\n eventBus.trigger(_coreEventsEventsJs2['default'].AST_IN_FUTURE, { delay: delay });\n setTimeout(update, delay);\n }\n\n function onRepresentationUpdated(e) {\n if (e.sender.getStreamProcessor() !== streamProcessor || !isUpdating()) return;\n\n var r = e.representation;\n var streamMetrics = metricsModel.getMetricsFor('stream');\n var metrics = metricsModel.getMetricsFor(getCurrentRepresentation().adaptation.type);\n var manifestUpdateInfo = dashMetrics.getCurrentManifestUpdate(streamMetrics);\n\n var repInfo, err, repSwitch;\n var alreadyAdded = false;\n\n var postponeTimePeriod = 0;\n\n if (r.adaptation.period.mpd.manifest.type == 'dynamic') {\n var segmentAvailabilityTimePeriod = r.segmentAvailabilityRange.end - r.segmentAvailabilityRange.start;\n // We must put things to sleep unless till e.g. the startTime calculation in ScheduleController.onLiveEdgeSearchCompleted fall after the segmentAvailabilityRange.start\n var liveDelay = mediaPlayerModel.getLiveDelay() || currentRepresentation.segmentDuration * mediaPlayerModel.getLiveDelayFragmentCount();\n postponeTimePeriod = (liveDelay - segmentAvailabilityTimePeriod) * 1000;\n }\n\n if (postponeTimePeriod > 0) {\n addDVRMetric();\n postponeUpdate(postponeTimePeriod);\n err = new _streamingVoErrorJs2['default'](SEGMENTS_UPDATE_FAILED_ERROR_CODE, 'Segments update failed', null);\n eventBus.trigger(_coreEventsEventsJs2['default'].DATA_UPDATE_COMPLETED, { sender: this, data: data, currentRepresentation: currentRepresentation, error: err });\n\n return;\n }\n\n if (manifestUpdateInfo) {\n for (var i = 0; i < manifestUpdateInfo.trackInfo.length; i++) {\n repInfo = manifestUpdateInfo.trackInfo[i];\n if (repInfo.index === r.index && repInfo.mediaType === streamProcessor.getType()) {\n alreadyAdded = true;\n break;\n }\n }\n\n if (!alreadyAdded) {\n metricsModel.addManifestUpdateRepresentationInfo(manifestUpdateInfo, r.id, r.index, r.adaptation.period.index, streamProcessor.getType(), r.presentationTimeOffset, r.startNumber, r.segmentInfoType);\n }\n }\n\n if (isAllRepresentationsUpdated()) {\n updating = false;\n abrController.setPlaybackQuality(streamProcessor.getType(), streamProcessor.getStreamInfo(), getQualityForRepresentation(currentRepresentation));\n metricsModel.updateManifestUpdateInfo(manifestUpdateInfo, { latency: currentRepresentation.segmentAvailabilityRange.end - playbackController.getTime() });\n\n repSwitch = dashMetrics.getCurrentRepresentationSwitch(metrics);\n\n if (!repSwitch) {\n addRepresentationSwitch();\n }\n\n eventBus.trigger(_coreEventsEventsJs2['default'].DATA_UPDATE_COMPLETED, { sender: this, data: data, currentRepresentation: currentRepresentation });\n }\n }\n\n function onWallclockTimeUpdated(e) {\n if (e.isDynamic) {\n updateAvailabilityWindow(e.isDynamic);\n }\n }\n\n function onLiveEdgeSearchCompleted(e) {\n if (e.error) return;\n\n updateAvailabilityWindow(true);\n indexHandler.updateRepresentation(currentRepresentation, false);\n\n // we need to update checkTime after we have found the live edge because its initial value\n // does not take into account clientServerTimeShift\n var manifest = manifestModel.getValue();\n var period = currentRepresentation.adaptation.period;\n var streamInfo = streamController.getActiveStreamInfo();\n\n if (streamInfo.isLast) {\n period.mpd.checkTime = dashManifestModel.getCheckTime(manifest, period);\n period.duration = dashManifestModel.getEndTimeForLastPeriod(manifestModel.getValue(), period) - period.start;\n streamInfo.duration = period.duration;\n }\n }\n\n function onBufferLevelUpdated(e) {\n if (e.sender.getStreamProcessor() !== streamProcessor) return;\n addDVRMetric();\n }\n\n function onQualityChanged(e) {\n if (e.mediaType !== streamProcessor.getType() || streamProcessor.getStreamInfo().id !== e.streamInfo.id) return;\n\n if (e.oldQuality !== e.newQuality) {\n currentRepresentation = getRepresentationForQuality(e.newQuality);\n domStorage.setSavedBitrateSettings(e.mediaType, currentRepresentation.bandwidth);\n addRepresentationSwitch();\n }\n }\n\n instance = {\n initialize: initialize,\n setConfig: setConfig,\n getData: getData,\n getDataIndex: getDataIndex,\n isUpdating: isUpdating,\n updateData: updateData,\n getStreamProcessor: getStreamProcessor,\n getCurrentRepresentation: getCurrentRepresentation,\n getRepresentationForQuality: getRepresentationForQuality,\n reset: reset\n };\n\n setup();\n return instance;\n}\n\nRepresentationController.__dashjs_factory_name = 'RepresentationController';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(RepresentationController);\nmodule.exports = exports['default'];\n\n},{\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7,\"../../core/events/Events.js\":9,\"../../streaming/controllers/AbrController.js\":46,\"../../streaming/controllers/PlaybackController.js\":54,\"../../streaming/controllers/StreamController.js\":57,\"../../streaming/models/ManifestModel.js\":63,\"../../streaming/models/MediaPlayerModel.js\":64,\"../../streaming/models/MetricsModel.js\":65,\"../../streaming/utils/DOMStorage.js\":89,\"../../streaming/vo/Error.js\":100,\"../DashMetrics.js\":13,\"../models/DashManifestModel.js\":17,\"../utils/TimelineConverter.js\":23}],17:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _voRepresentationJs = _dereq_('../vo/Representation.js');\n\nvar _voRepresentationJs2 = _interopRequireDefault(_voRepresentationJs);\n\nvar _voAdaptationSetJs = _dereq_('../vo/AdaptationSet.js');\n\nvar _voAdaptationSetJs2 = _interopRequireDefault(_voAdaptationSetJs);\n\nvar _voPeriodJs = _dereq_('../vo/Period.js');\n\nvar _voPeriodJs2 = _interopRequireDefault(_voPeriodJs);\n\nvar _voMpdJs = _dereq_('../vo/Mpd.js');\n\nvar _voMpdJs2 = _interopRequireDefault(_voMpdJs);\n\nvar _voUTCTimingJs = _dereq_('../vo/UTCTiming.js');\n\nvar _voUTCTimingJs2 = _interopRequireDefault(_voUTCTimingJs);\n\nvar _utilsTimelineConverterJs = _dereq_('../utils/TimelineConverter.js');\n\nvar _utilsTimelineConverterJs2 = _interopRequireDefault(_utilsTimelineConverterJs);\n\nvar _voEventJs = _dereq_('../vo/Event.js');\n\nvar _voEventJs2 = _interopRequireDefault(_voEventJs);\n\nvar _voBaseURLJs = _dereq_('../vo/BaseURL.js');\n\nvar _voBaseURLJs2 = _interopRequireDefault(_voBaseURLJs);\n\nvar _voEventStreamJs = _dereq_('../vo/EventStream.js');\n\nvar _voEventStreamJs2 = _interopRequireDefault(_voEventStreamJs);\n\nvar _streamingUtilsURLUtilsJs = _dereq_('../../streaming/utils/URLUtils.js');\n\nvar _streamingUtilsURLUtilsJs2 = _interopRequireDefault(_streamingUtilsURLUtilsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction DashManifestModel() {\n\n var instance = undefined;\n var context = this.context;\n var timelineConverter = (0, _utilsTimelineConverterJs2['default'])(context).getInstance(); //TODO Need to pass this in not bake in\n var urlUtils = (0, _streamingUtilsURLUtilsJs2['default'])(context).getInstance();\n\n function getIsTypeOf(adaptation, type) {\n\n var i, len, representation;\n var result = false;\n var found = false;\n\n var col = adaptation.ContentComponent_asArray;\n var mimeTypeRegEx = type !== 'text' ? new RegExp(type) : new RegExp('(vtt|ttml)');\n\n if (adaptation.Representation_asArray.length > 0 && adaptation.Representation_asArray[0].hasOwnProperty('codecs')) {\n var codecs = adaptation.Representation_asArray[0].codecs;\n if (codecs === 'stpp' || codecs === 'wvtt') {\n return type === 'fragmentedText';\n }\n }\n\n if (col) {\n if (col.length > 1) {\n return type == 'muxed';\n } else if (col[0] && col[0].contentType === type) {\n result = true;\n found = true;\n }\n }\n\n if (adaptation.hasOwnProperty('mimeType')) {\n result = mimeTypeRegEx.test(adaptation.mimeType);\n found = true;\n }\n\n // couldn't find on adaptationset, so check a representation\n if (!found) {\n i = 0;\n len = adaptation.Representation_asArray.length;\n while (!found && i < len) {\n representation = adaptation.Representation_asArray[i];\n\n if (representation.hasOwnProperty('mimeType')) {\n result = mimeTypeRegEx.test(representation.mimeType);\n found = true;\n }\n\n i++;\n }\n }\n\n return result;\n }\n\n function getIsAudio(adaptation) {\n return getIsTypeOf(adaptation, 'audio');\n }\n\n function getIsVideo(adaptation) {\n return getIsTypeOf(adaptation, 'video');\n }\n\n function getIsFragmentedText(adaptation) {\n return getIsTypeOf(adaptation, 'fragmentedText');\n }\n\n function getIsText(adaptation) {\n return getIsTypeOf(adaptation, 'text');\n }\n\n function getIsMuxed(adaptation) {\n return getIsTypeOf(adaptation, 'muxed');\n }\n\n function getIsTextTrack(type) {\n return type === 'text/vtt' || type === 'application/ttml+xml';\n }\n\n function getLanguageForAdaptation(adaptation) {\n var lang = '';\n\n if (adaptation.hasOwnProperty('lang')) {\n //Filter out any other characters not allowed according to RFC5646\n lang = adaptation.lang.replace(/[^A-Za-z0-9-]/g, '');\n }\n\n return lang;\n }\n\n function getViewpointForAdaptation(adaptation) {\n return adaptation.hasOwnProperty('Viewpoint') ? adaptation.Viewpoint : null;\n }\n\n function getRolesForAdaptation(adaptation) {\n return adaptation.hasOwnProperty('Role_asArray') ? adaptation.Role_asArray : [];\n }\n\n function getAccessibilityForAdaptation(adaptation) {\n return adaptation.hasOwnProperty('Accessibility_asArray') ? adaptation.Accessibility_asArray : [];\n }\n\n function getAudioChannelConfigurationForAdaptation(adaptation) {\n return adaptation.hasOwnProperty('AudioChannelConfiguration_asArray') ? adaptation.AudioChannelConfiguration_asArray : [];\n }\n\n function getIsMain(adaptation) {\n return getRolesForAdaptation(adaptation).filter(function (role) {\n return role.value === 'main';\n })[0];\n }\n\n function getRepresentationSortFunction() {\n return function (a, b) {\n return a.bandwidth - b.bandwidth;\n };\n }\n\n function processAdaptation(adaptation) {\n if (adaptation.Representation_asArray !== undefined && adaptation.Representation_asArray !== null) {\n adaptation.Representation_asArray.sort(getRepresentationSortFunction());\n }\n\n return adaptation;\n }\n\n function getAdaptationForId(id, manifest, periodIndex) {\n\n var adaptations = manifest.Period_asArray[periodIndex].AdaptationSet_asArray;\n var i, len;\n\n for (i = 0, len = adaptations.length; i < len; i++) {\n if (adaptations[i].hasOwnProperty('id') && adaptations[i].id === id) {\n return adaptations[i];\n }\n }\n\n return null;\n }\n\n function getAdaptationForIndex(index, manifest, periodIndex) {\n var adaptations = manifest.Period_asArray[periodIndex].AdaptationSet_asArray;\n return adaptations[index];\n }\n\n function getIndexForAdaptation(adaptation, manifest, periodIndex) {\n\n var adaptations = manifest.Period_asArray[periodIndex].AdaptationSet_asArray;\n var i, len;\n\n for (i = 0, len = adaptations.length; i < len; i++) {\n if (adaptations[i] === adaptation) {\n return i;\n }\n }\n\n return -1;\n }\n\n function getAdaptationsForType(manifest, periodIndex, type) {\n\n var adaptationSet = manifest.Period_asArray[periodIndex].AdaptationSet_asArray;\n var i, len;\n var adaptations = [];\n\n for (i = 0, len = adaptationSet.length; i < len; i++) {\n if (getIsTypeOf(adaptationSet[i], type)) {\n adaptations.push(processAdaptation(adaptationSet[i]));\n }\n }\n\n return adaptations;\n }\n\n function getAdaptationForType(manifest, periodIndex, type) {\n var i, len, adaptations;\n\n adaptations = getAdaptationsForType(manifest, periodIndex, type);\n\n if (!adaptations || adaptations.length === 0) return null;\n\n for (i = 0, len = adaptations.length; i < len; i++) {\n if (getIsMain(adaptations[i])) return adaptations[i];\n }\n\n return adaptations[0];\n }\n\n function getCodec(adaptation) {\n var representation = adaptation.Representation_asArray[0];\n return representation.mimeType + ';codecs=\"' + representation.codecs + '\"';\n }\n\n function getMimeType(adaptation) {\n return adaptation.Representation_asArray[0].mimeType;\n }\n\n function getKID(adaptation) {\n if (!adaptation || !adaptation.hasOwnProperty('cenc:default_KID')) {\n return null;\n }\n return adaptation['cenc:default_KID'];\n }\n\n function getContentProtectionData(adaptation) {\n if (!adaptation || !adaptation.hasOwnProperty('ContentProtection_asArray') || adaptation.ContentProtection_asArray.length === 0) {\n return null;\n }\n return adaptation.ContentProtection_asArray;\n }\n\n function getIsDynamic(manifest) {\n var isDynamic = false;\n if (manifest.hasOwnProperty('type')) {\n isDynamic = manifest.type === 'dynamic';\n }\n return isDynamic;\n }\n\n function getIsDVR(manifest) {\n var isDynamic = getIsDynamic(manifest);\n var containsDVR, isDVR;\n\n containsDVR = !isNaN(manifest.timeShiftBufferDepth);\n isDVR = isDynamic && containsDVR;\n\n return isDVR;\n }\n\n function hasProfile(manifest, profile) {\n var has = false;\n\n if (manifest.profiles && manifest.profiles.length > 0) {\n has = manifest.profiles.indexOf(profile) !== -1;\n }\n\n return has;\n }\n\n function getIsOnDemand(manifest) {\n return hasProfile(manifest, 'urn:mpeg:dash:profile:isoff-on-demand:2011');\n }\n\n function getIsDVB(manifest) {\n return hasProfile(manifest, 'urn:dvb:dash:profile:dvb-dash:2014');\n }\n\n function getDuration(manifest) {\n var mpdDuration;\n //@mediaPresentationDuration specifies the duration of the entire Media Presentation.\n //If the attribute is not present, the duration of the Media Presentation is unknown.\n if (manifest.hasOwnProperty('mediaPresentationDuration')) {\n mpdDuration = manifest.mediaPresentationDuration;\n } else {\n mpdDuration = Number.MAX_VALUE;\n }\n\n return mpdDuration;\n }\n\n function getBandwidth(representation) {\n return representation.bandwidth;\n }\n\n function getRefreshDelay(manifest) {\n var delay = NaN;\n var minDelay = 2;\n\n if (manifest.hasOwnProperty('minimumUpdatePeriod')) {\n delay = Math.max(parseFloat(manifest.minimumUpdatePeriod), minDelay);\n }\n\n return delay;\n }\n\n function getRepresentationCount(adaptation) {\n return adaptation.Representation_asArray.length;\n }\n\n function getBitrateListForAdaptation(adaptation) {\n if (!adaptation || !adaptation.Representation_asArray || !adaptation.Representation_asArray.length) return null;\n\n var a = processAdaptation(adaptation);\n var reps = a.Representation_asArray;\n var ln = reps.length;\n var bitrateList = [];\n\n for (var i = 0; i < ln; i++) {\n bitrateList.push({\n bandwidth: reps[i].bandwidth,\n width: reps[i].width || 0,\n height: reps[i].height || 0\n });\n }\n\n return bitrateList;\n }\n\n function getRepresentationFor(index, adaptation) {\n return adaptation.Representation_asArray[index];\n }\n\n function getRepresentationsForAdaptation(manifest, adaptation) {\n var a = processAdaptation(manifest.Period_asArray[adaptation.period.index].AdaptationSet_asArray[adaptation.index]);\n var representations = [];\n var representation, initialization, segmentInfo, r, s;\n\n for (var i = 0; i < a.Representation_asArray.length; i++) {\n r = a.Representation_asArray[i];\n representation = new _voRepresentationJs2['default']();\n representation.index = i;\n representation.adaptation = adaptation;\n\n if (r.hasOwnProperty('id')) {\n representation.id = r.id;\n }\n\n if (r.hasOwnProperty('bandwidth')) {\n representation.bandwidth = r.bandwidth;\n }\n if (r.hasOwnProperty('maxPlayoutRate')) {\n representation.maxPlayoutRate = r.maxPlayoutRate;\n }\n if (r.hasOwnProperty('SegmentBase')) {\n segmentInfo = r.SegmentBase;\n representation.segmentInfoType = 'SegmentBase';\n } else if (r.hasOwnProperty('SegmentList')) {\n segmentInfo = r.SegmentList;\n representation.segmentInfoType = 'SegmentList';\n representation.useCalculatedLiveEdgeTime = true;\n } else if (r.hasOwnProperty('SegmentTemplate')) {\n segmentInfo = r.SegmentTemplate;\n\n if (segmentInfo.hasOwnProperty('SegmentTimeline')) {\n representation.segmentInfoType = 'SegmentTimeline';\n s = segmentInfo.SegmentTimeline.S_asArray[segmentInfo.SegmentTimeline.S_asArray.length - 1];\n if (!s.hasOwnProperty('r') || s.r >= 0) {\n representation.useCalculatedLiveEdgeTime = true;\n }\n } else {\n representation.segmentInfoType = 'SegmentTemplate';\n }\n\n if (segmentInfo.hasOwnProperty('initialization')) {\n representation.initialization = segmentInfo.initialization.split('$Bandwidth$').join(r.bandwidth).split('$RepresentationID$').join(r.id);\n }\n } else {\n segmentInfo = r.BaseURL;\n representation.segmentInfoType = 'BaseURL';\n }\n\n if (segmentInfo.hasOwnProperty('Initialization')) {\n initialization = segmentInfo.Initialization;\n if (initialization.hasOwnProperty('sourceURL')) {\n representation.initialization = initialization.sourceURL;\n } else if (initialization.hasOwnProperty('range')) {\n representation.range = initialization.range;\n }\n } else if (r.hasOwnProperty('mimeType') && getIsTextTrack(r.mimeType)) {\n representation.range = 0;\n }\n\n if (segmentInfo.hasOwnProperty('timescale')) {\n representation.timescale = segmentInfo.timescale;\n }\n if (segmentInfo.hasOwnProperty('duration')) {\n // TODO according to the spec @maxSegmentDuration specifies the maximum duration of any Segment in any Representation in the Media Presentation\n // It is also said that for a SegmentTimeline any @d value shall not exceed the value of MPD@maxSegmentDuration, but nothing is said about\n // SegmentTemplate @duration attribute. We need to find out if @maxSegmentDuration should be used instead of calculated duration if the the duration\n // exceeds @maxSegmentDuration\n //representation.segmentDuration = Math.min(segmentInfo.duration / representation.timescale, adaptation.period.mpd.maxSegmentDuration);\n representation.segmentDuration = segmentInfo.duration / representation.timescale;\n }\n if (segmentInfo.hasOwnProperty('startNumber')) {\n representation.startNumber = segmentInfo.startNumber;\n }\n if (segmentInfo.hasOwnProperty('indexRange')) {\n representation.indexRange = segmentInfo.indexRange;\n }\n if (segmentInfo.hasOwnProperty('presentationTimeOffset')) {\n representation.presentationTimeOffset = segmentInfo.presentationTimeOffset / representation.timescale;\n }\n\n representation.MSETimeOffset = timelineConverter.calcMSETimeOffset(representation);\n\n representation.path = [adaptation.period.index, adaptation.index, i];\n\n representations.push(representation);\n }\n\n return representations;\n }\n\n function getAdaptationsForPeriod(manifest, period) {\n var p = manifest.Period_asArray[period.index];\n var adaptations = [];\n var adaptationSet, a;\n\n for (var i = 0; i < p.AdaptationSet_asArray.length; i++) {\n a = p.AdaptationSet_asArray[i];\n adaptationSet = new _voAdaptationSetJs2['default']();\n\n if (a.hasOwnProperty('id')) {\n adaptationSet.id = a.id;\n }\n\n adaptationSet.index = i;\n adaptationSet.period = period;\n\n if (getIsMuxed(a)) {\n adaptationSet.type = 'muxed';\n } else if (getIsAudio(a)) {\n adaptationSet.type = 'audio';\n } else if (getIsVideo(a)) {\n adaptationSet.type = 'video';\n } else if (getIsFragmentedText(a)) {\n adaptationSet.type = 'fragmentedText';\n } else {\n adaptationSet.type = 'text';\n }\n\n adaptations.push(adaptationSet);\n }\n\n return adaptations;\n }\n\n function getRegularPeriods(manifest, mpd) {\n var isDynamic = getIsDynamic(manifest);\n var periods = [];\n var p1 = null;\n var p = null;\n var vo1 = null;\n var vo = null;\n var len, i;\n\n for (i = 0, len = manifest.Period_asArray.length; i < len; i++) {\n p = manifest.Period_asArray[i];\n\n // If the attribute @start is present in the Period, then the\n // Period is a regular Period and the PeriodStart is equal\n // to the value of this attribute.\n if (p.hasOwnProperty('start')) {\n vo = new _voPeriodJs2['default']();\n vo.start = p.start;\n }\n // If the @start attribute is absent, but the previous Period\n // element contains a @duration attribute then then this new\n // Period is also a regular Period. The start time of the new\n // Period PeriodStart is the sum of the start time of the previous\n // Period PeriodStart and the value of the attribute @duration\n // of the previous Period.\n else if (p1 !== null && p.hasOwnProperty('duration') && vo1 !== null) {\n vo = new _voPeriodJs2['default']();\n vo.start = vo1.start + vo1.duration;\n vo.duration = p.duration;\n }\n // If (i) @start attribute is absent, and (ii) the Period element\n // is the first in the MPD, and (iii) the MPD@type is 'static',\n // then the PeriodStart time shall be set to zero.\n else if (i === 0 && !isDynamic) {\n vo = new _voPeriodJs2['default']();\n vo.start = 0;\n }\n\n // The Period extends until the PeriodStart of the next Period.\n // The difference between the PeriodStart time of a Period and\n // the PeriodStart time of the following Period.\n if (vo1 !== null && isNaN(vo1.duration)) {\n vo1.duration = vo.start - vo1.start;\n }\n\n if (vo !== null) {\n vo.id = getPeriodId(p);\n }\n\n if (vo !== null && p.hasOwnProperty('duration')) {\n vo.duration = p.duration;\n }\n\n if (vo !== null) {\n vo.index = i;\n vo.mpd = mpd;\n periods.push(vo);\n p1 = p;\n vo1 = vo;\n }\n\n p = null;\n vo = null;\n }\n\n if (periods.length === 0) {\n return periods;\n }\n\n // The last Period extends until the end of the Media Presentation.\n // The difference between the PeriodStart time of the last Period\n // and the mpd duration\n if (vo1 !== null && isNaN(vo1.duration)) {\n vo1.duration = getEndTimeForLastPeriod(manifest, vo1) - vo1.start;\n }\n\n return periods;\n }\n\n function getPeriodId(p) {\n if (!p) {\n throw new Error('Period cannot be null or undefined');\n }\n\n var id = _voPeriodJs2['default'].DEFAULT_ID;\n\n if (p.hasOwnProperty('id') && p.id !== '__proto__') {\n id = p.id;\n }\n\n return id;\n }\n\n function getMpd(manifest) {\n var mpd = new _voMpdJs2['default']();\n\n mpd.manifest = manifest;\n\n if (manifest.hasOwnProperty('availabilityStartTime')) {\n mpd.availabilityStartTime = new Date(manifest.availabilityStartTime.getTime());\n } else {\n mpd.availabilityStartTime = new Date(manifest.loadedTime.getTime());\n }\n\n if (manifest.hasOwnProperty('availabilityEndTime')) {\n mpd.availabilityEndTime = new Date(manifest.availabilityEndTime.getTime());\n }\n\n if (manifest.hasOwnProperty('suggestedPresentationDelay')) {\n mpd.suggestedPresentationDelay = manifest.suggestedPresentationDelay;\n }\n\n if (manifest.hasOwnProperty('timeShiftBufferDepth')) {\n mpd.timeShiftBufferDepth = manifest.timeShiftBufferDepth;\n }\n\n if (manifest.hasOwnProperty('maxSegmentDuration')) {\n mpd.maxSegmentDuration = manifest.maxSegmentDuration;\n }\n\n return mpd;\n }\n\n function getFetchTime(manifest, period) {\n // FetchTime is defined as the time at which the server processes the request for the MPD from the client.\n // TODO The client typically should not use the time at which it actually successfully received the MPD, but should\n // take into account delay due to MPD delivery and processing. The fetch is considered successful fetching\n // either if the client obtains an updated MPD or the client verifies that the MPD has not been updated since the previous fetching.\n\n return timelineConverter.calcPresentationTimeFromWallTime(manifest.loadedTime, period);\n }\n\n function getCheckTime(manifest, period) {\n var checkTime = NaN;\n var fetchTime;\n\n // If the MPD@minimumUpdatePeriod attribute in the client is provided, then the check time is defined as the\n // sum of the fetch time of this operating MPD and the value of this attribute,\n // i.e. CheckTime = FetchTime + MPD@minimumUpdatePeriod.\n if (manifest.hasOwnProperty('minimumUpdatePeriod')) {\n fetchTime = getFetchTime(manifest, period);\n checkTime = fetchTime + manifest.minimumUpdatePeriod;\n }\n // TODO If the MPD@minimumUpdatePeriod attribute in the client is not provided, external means are used to\n // determine CheckTime, such as a priori knowledge, or HTTP cache headers, etc.\n\n return checkTime;\n }\n\n function getEndTimeForLastPeriod(manifest, period) {\n var periodEnd;\n var checkTime = getCheckTime(manifest, period);\n\n // if the MPD@mediaPresentationDuration attribute is present, then PeriodEndTime is defined as the end time of the Media Presentation.\n // if the MPD@mediaPresentationDuration attribute is not present, then PeriodEndTime is defined as FetchTime + MPD@minimumUpdatePeriod\n\n if (manifest.mediaPresentationDuration) {\n periodEnd = manifest.mediaPresentationDuration;\n } else if (!isNaN(checkTime)) {\n // in this case the Period End Time should match CheckTime\n periodEnd = checkTime;\n } else {\n throw new Error('Must have @mediaPresentationDuration or @minimumUpdatePeriod on MPD or an explicit @duration on the last period.');\n }\n\n return periodEnd;\n }\n\n function getEventsForPeriod(manifest, period) {\n\n var periodArray = manifest.Period_asArray;\n var eventStreams = periodArray[period.index].EventStream_asArray;\n var events = [];\n\n if (eventStreams) {\n for (var i = 0; i < eventStreams.length; i++) {\n var eventStream = new _voEventStreamJs2['default']();\n eventStream.period = period;\n eventStream.timescale = 1;\n\n if (eventStreams[i].hasOwnProperty('schemeIdUri')) {\n eventStream.schemeIdUri = eventStreams[i].schemeIdUri;\n } else {\n throw 'Invalid EventStream. SchemeIdUri has to be set';\n }\n if (eventStreams[i].hasOwnProperty('timescale')) {\n eventStream.timescale = eventStreams[i].timescale;\n }\n if (eventStreams[i].hasOwnProperty('value')) {\n eventStream.value = eventStreams[i].value;\n }\n for (var j = 0; j < eventStreams[i].Event_asArray.length; j++) {\n var event = new _voEventJs2['default']();\n event.presentationTime = 0;\n event.eventStream = eventStream;\n\n if (eventStreams[i].Event_asArray[j].hasOwnProperty('presentationTime')) {\n event.presentationTime = eventStreams[i].Event_asArray[j].presentationTime;\n }\n if (eventStreams[i].Event_asArray[j].hasOwnProperty('duration')) {\n event.duration = eventStreams[i].Event_asArray[j].duration;\n }\n if (eventStreams[i].Event_asArray[j].hasOwnProperty('id')) {\n event.id = eventStreams[i].Event_asArray[j].id;\n }\n events.push(event);\n }\n }\n }\n\n return events;\n }\n\n function getEventStreams(inbandStreams, representation) {\n var eventStreams = [];\n\n if (!inbandStreams) return eventStreams;\n\n for (var i = 0; i < inbandStreams.length; i++) {\n var eventStream = new _voEventStreamJs2['default']();\n eventStream.timescale = 1;\n eventStream.representation = representation;\n\n if (inbandStreams[i].hasOwnProperty('schemeIdUri')) {\n eventStream.schemeIdUri = inbandStreams[i].schemeIdUri;\n } else {\n throw 'Invalid EventStream. SchemeIdUri has to be set';\n }\n if (inbandStreams[i].hasOwnProperty('timescale')) {\n eventStream.timescale = inbandStreams[i].timescale;\n }\n if (inbandStreams[i].hasOwnProperty('value')) {\n eventStream.value = inbandStreams[i].value;\n }\n eventStreams.push(eventStream);\n }\n\n return eventStreams;\n }\n\n function getEventStreamForAdaptationSet(manifest, adaptation) {\n var inbandStreams = manifest.Period_asArray[adaptation.period.index].AdaptationSet_asArray[adaptation.index].InbandEventStream_asArray;\n\n return getEventStreams(inbandStreams, null);\n }\n\n function getEventStreamForRepresentation(manifest, representation) {\n var inbandStreams = manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].InbandEventStream_asArray;\n\n return getEventStreams(inbandStreams, representation);\n }\n\n function getUTCTimingSources(manifest) {\n\n var isDynamic = getIsDynamic(manifest);\n var hasAST = manifest.hasOwnProperty('availabilityStartTime');\n var utcTimingsArray = manifest.UTCTiming_asArray;\n var utcTimingEntries = [];\n\n // do not bother synchronizing the clock unless MPD is live,\n // or it is static and has availabilityStartTime attribute\n if (isDynamic || hasAST) {\n if (utcTimingsArray) {\n // the order is important here - 23009-1 states that the order\n // in the manifest \"indicates relative preference, first having\n // the highest, and the last the lowest priority\".\n utcTimingsArray.forEach(function (utcTiming) {\n var entry = new _voUTCTimingJs2['default']();\n\n if (utcTiming.hasOwnProperty('schemeIdUri')) {\n entry.schemeIdUri = utcTiming.schemeIdUri;\n } else {\n // entries of type DescriptorType with no schemeIdUri\n // are meaningless. let's just ignore this entry and\n // move on.\n return;\n }\n\n // this is (incorrectly) interpreted as a number - schema\n // defines it as a string\n if (utcTiming.hasOwnProperty('value')) {\n entry.value = utcTiming.value.toString();\n } else {\n // without a value, there's not a lot we can do with\n // this entry. let's just ignore this one and move on\n return;\n }\n\n // we're not interested in the optional id or any other\n // attributes which might be attached to the entry\n\n utcTimingEntries.push(entry);\n });\n }\n }\n\n return utcTimingEntries;\n }\n\n function getBaseURLsFromElement(node) {\n var baseUrls = [];\n var entries = node.BaseURL_asArray || [node.baseUri] || [];\n\n entries.some(function (entry) {\n if (entry) {\n var baseUrl = new _voBaseURLJs2['default']();\n var text = entry.__text || entry;\n\n baseUrl.url = text;\n\n // serviceLocation is optional, but we need it in order\n // to blacklist correctly. if it's not available, use\n // anything unique since there's no relationship to any\n // other BaseURL and, in theory, the url should be\n // unique so use this instead.\n if (entry.hasOwnProperty('serviceLocation') && entry.serviceLocation.length) {\n baseUrl.serviceLocation = entry.serviceLocation;\n } else {\n baseUrl.serviceLocation = text;\n }\n\n if (entry.hasOwnProperty('dvb:priority')) {\n baseUrl.dvb_priority = entry['dvb:priority'];\n }\n\n if (entry.hasOwnProperty('dvb:weight')) {\n baseUrl.dvb_weight = entry['dvb:weight'];\n }\n\n /* NOTE: byteRange, availabilityTimeOffset,\n * availabilityTimeComplete currently unused\n */\n\n baseUrls.push(baseUrl);\n\n if (urlUtils.isRelative(text)) {\n // it doesn't really make sense to have relative and\n // absolute URLs at the same level, or multiple\n // relative URLs at the same level, so assume we are\n // done from this level of the MPD\n return true;\n }\n }\n });\n\n return baseUrls;\n }\n\n instance = {\n getIsTypeOf: getIsTypeOf,\n getIsAudio: getIsAudio,\n getIsVideo: getIsVideo,\n getIsText: getIsText,\n getIsMuxed: getIsMuxed,\n getIsTextTrack: getIsTextTrack,\n getIsFragmentedText: getIsFragmentedText,\n getIsMain: getIsMain,\n getLanguageForAdaptation: getLanguageForAdaptation,\n getViewpointForAdaptation: getViewpointForAdaptation,\n getRolesForAdaptation: getRolesForAdaptation,\n getAccessibilityForAdaptation: getAccessibilityForAdaptation,\n getAudioChannelConfigurationForAdaptation: getAudioChannelConfigurationForAdaptation,\n processAdaptation: processAdaptation,\n getAdaptationForIndex: getAdaptationForIndex,\n getIndexForAdaptation: getIndexForAdaptation,\n getAdaptationForId: getAdaptationForId,\n getAdaptationsForType: getAdaptationsForType,\n getAdaptationForType: getAdaptationForType,\n getCodec: getCodec,\n getMimeType: getMimeType,\n getKID: getKID,\n getContentProtectionData: getContentProtectionData,\n getIsDynamic: getIsDynamic,\n getIsDVR: getIsDVR,\n getIsOnDemand: getIsOnDemand,\n getIsDVB: getIsDVB,\n getDuration: getDuration,\n getBandwidth: getBandwidth,\n getRefreshDelay: getRefreshDelay,\n getRepresentationCount: getRepresentationCount,\n getBitrateListForAdaptation: getBitrateListForAdaptation,\n getRepresentationFor: getRepresentationFor,\n getRepresentationsForAdaptation: getRepresentationsForAdaptation,\n getAdaptationsForPeriod: getAdaptationsForPeriod,\n getRegularPeriods: getRegularPeriods,\n getPeriodId: getPeriodId,\n getMpd: getMpd,\n getFetchTime: getFetchTime,\n getCheckTime: getCheckTime,\n getEndTimeForLastPeriod: getEndTimeForLastPeriod,\n getEventsForPeriod: getEventsForPeriod,\n getEventStreams: getEventStreams,\n getEventStreamForAdaptationSet: getEventStreamForAdaptationSet,\n getEventStreamForRepresentation: getEventStreamForRepresentation,\n getUTCTimingSources: getUTCTimingSources,\n getBaseURLsFromElement: getBaseURLsFromElement,\n getRepresentationSortFunction: getRepresentationSortFunction\n };\n\n return instance;\n}\n\nDashManifestModel.__dashjs_factory_name = 'DashManifestModel';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(DashManifestModel);\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7,\"../../streaming/utils/URLUtils.js\":96,\"../utils/TimelineConverter.js\":23,\"../vo/AdaptationSet.js\":25,\"../vo/BaseURL.js\":26,\"../vo/Event.js\":27,\"../vo/EventStream.js\":28,\"../vo/Mpd.js\":29,\"../vo/Period.js\":30,\"../vo/Representation.js\":31,\"../vo/UTCTiming.js\":33}],18:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction FragmentedTextBoxParser() {\n\n var instance = undefined,\n boxParser = undefined;\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.boxParser) {\n boxParser = config.boxParser;\n }\n }\n\n function getSamplesInfo(ab) {\n var isoFile = boxParser.parse(ab);\n var tfhdBox = isoFile.getBox('tfhd');\n var tfdtBox = isoFile.getBox('tfdt');\n var trunBox = isoFile.getBox('trun');\n var moofBox = isoFile.getBox('moof');\n var mfhdBox = isoFile.getBox('mfhd');\n\n var sampleDuration, sampleCompositionTimeOffset, sampleCount, sampleSize, sampleDts, sampleList, sample, i, dataOffset, sequenceNumber, totalDuration;\n\n sequenceNumber = mfhdBox.sequence_number;\n sampleCount = trunBox.sample_count;\n sampleDts = tfdtBox.baseMediaDecodeTime;\n dataOffset = (tfhdBox.base_data_offset || 0) + (trunBox.data_offset || 0);\n\n sampleList = [];\n for (i = 0; i < sampleCount; i++) {\n sample = trunBox.samples[i];\n sampleDuration = sample.sample_duration !== undefined ? sample.sample_duration : tfhdBox.default_sample_duration;\n sampleSize = sample.sample_size !== undefined ? sample.sample_size : tfhdBox.default_sample_size;\n sampleCompositionTimeOffset = sample.sample_composition_time_offset !== undefined ? sample.sample_composition_time_offset : 0;\n\n sampleList.push({ 'dts': sampleDts,\n 'cts': sampleDts + sampleCompositionTimeOffset,\n 'duration': sampleDuration,\n 'offset': moofBox.offset + dataOffset,\n 'size': sampleSize });\n dataOffset += sampleSize;\n sampleDts += sampleDuration;\n }\n totalDuration = sampleDts - tfdtBox.baseMediaDecodeTime;\n return { sampleList: sampleList, sequenceNumber: sequenceNumber, totalDuration: totalDuration };\n }\n\n function getMediaTimescaleFromMoov(ab) {\n var isoFile = boxParser.parse(ab);\n var mdhdBox = isoFile.getBox('mdhd');\n\n return mdhdBox ? mdhdBox.timescale : NaN;\n }\n\n instance = {\n getSamplesInfo: getSamplesInfo,\n getMediaTimescaleFromMoov: getMediaTimescaleFromMoov,\n setConfig: setConfig\n };\n\n return instance;\n}\n\nFragmentedTextBoxParser.__dashjs_factory_name = 'FragmentedTextBoxParser';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(FragmentedTextBoxParser);\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7}],19:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _SegmentsUtilsJs = _dereq_('./SegmentsUtils.js');\n\nfunction ListSegmentsGetter(config, isDynamic) {\n\n var timelineConverter = config.timelineConverter;\n\n var instance = undefined;\n\n function getSegmentsFromList(representation, requestedTime, index, availabilityUpperLimit) {\n var list = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentList;\n var baseURL = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].BaseURL;\n var len = list.SegmentURL_asArray.length;\n\n var segments = [];\n\n var periodSegIdx, seg, s, range, startIdx, endIdx, start;\n\n start = representation.startNumber;\n\n range = (0, _SegmentsUtilsJs.decideSegmentListRangeForTemplate)(timelineConverter, isDynamic, representation, requestedTime, index, availabilityUpperLimit);\n startIdx = Math.max(range.start, 0);\n endIdx = Math.min(range.end, list.SegmentURL_asArray.length - 1);\n\n for (periodSegIdx = startIdx; periodSegIdx <= endIdx; periodSegIdx++) {\n s = list.SegmentURL_asArray[periodSegIdx];\n\n seg = (0, _SegmentsUtilsJs.getIndexBasedSegment)(timelineConverter, isDynamic, representation, periodSegIdx);\n seg.replacementTime = (start + periodSegIdx - 1) * representation.segmentDuration;\n seg.media = s.media ? s.media : baseURL;\n seg.mediaRange = s.mediaRange;\n seg.index = s.index;\n seg.indexRange = s.indexRange;\n\n segments.push(seg);\n seg = null;\n }\n\n representation.availableSegmentsNumber = len;\n\n return segments;\n }\n\n instance = {\n getSegments: getSegmentsFromList\n };\n\n return instance;\n}\n\nListSegmentsGetter.__dashjs_factory_name = 'ListSegmentsGetter';\nvar factory = _coreFactoryMakerJs2['default'].getClassFactory(ListSegmentsGetter);\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7,\"./SegmentsUtils.js\":21}],20:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _TimelineSegmentsGetterJs = _dereq_('./TimelineSegmentsGetter.js');\n\nvar _TimelineSegmentsGetterJs2 = _interopRequireDefault(_TimelineSegmentsGetterJs);\n\nvar _TemplateSegmentsGetterJs = _dereq_('./TemplateSegmentsGetter.js');\n\nvar _TemplateSegmentsGetterJs2 = _interopRequireDefault(_TemplateSegmentsGetterJs);\n\nvar _ListSegmentsGetterJs = _dereq_('./ListSegmentsGetter.js');\n\nvar _ListSegmentsGetterJs2 = _interopRequireDefault(_ListSegmentsGetterJs);\n\nfunction SegmentsGetter(config, isDynamic) {\n\n var context = this.context;\n\n var instance = undefined,\n timelineSegmentsGetter = undefined,\n templateSegmentsGetter = undefined,\n listSegmentsGetter = undefined;\n\n function setup() {\n timelineSegmentsGetter = (0, _TimelineSegmentsGetterJs2['default'])(context).create(config, isDynamic);\n templateSegmentsGetter = (0, _TemplateSegmentsGetterJs2['default'])(context).create(config, isDynamic);\n listSegmentsGetter = (0, _ListSegmentsGetterJs2['default'])(context).create(config, isDynamic);\n }\n\n function getSegments(representation, requestedTime, index, onSegmentListUpdatedCallback, availabilityUpperLimit) {\n var segments;\n var type = representation.segmentInfoType;\n\n // Already figure out the segments.\n if (type === 'SegmentBase' || type === 'BaseURL' || !isSegmentListUpdateRequired(representation, index)) {\n segments = representation.segments;\n } else {\n if (type === 'SegmentTimeline') {\n segments = timelineSegmentsGetter.getSegments(representation, requestedTime, index, availabilityUpperLimit);\n } else if (type === 'SegmentTemplate') {\n segments = templateSegmentsGetter.getSegments(representation, requestedTime, index, availabilityUpperLimit);\n } else if (type === 'SegmentList') {\n segments = listSegmentsGetter.getSegments(representation, requestedTime, index, availabilityUpperLimit);\n }\n\n if (onSegmentListUpdatedCallback) {\n onSegmentListUpdatedCallback(representation, segments);\n }\n }\n\n return segments;\n }\n\n function isSegmentListUpdateRequired(representation, index) {\n var segments = representation.segments;\n var updateRequired = false;\n\n var upperIdx, lowerIdx;\n\n if (!segments || segments.length === 0) {\n updateRequired = true;\n } else {\n lowerIdx = segments[0].availabilityIdx;\n upperIdx = segments[segments.length - 1].availabilityIdx;\n updateRequired = index < lowerIdx || index > upperIdx;\n }\n\n return updateRequired;\n }\n\n instance = {\n getSegments: getSegments\n };\n\n setup();\n\n return instance;\n}\n\nSegmentsGetter.__dashjs_factory_name = 'SegmentsGetter';\nvar factory = _coreFactoryMakerJs2['default'].getClassFactory(SegmentsGetter);\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7,\"./ListSegmentsGetter.js\":19,\"./TemplateSegmentsGetter.js\":22,\"./TimelineSegmentsGetter.js\":24}],21:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.replaceTokenForTemplate = replaceTokenForTemplate;\nexports.getIndexBasedSegment = getIndexBasedSegment;\nexports.getTimeBasedSegment = getTimeBasedSegment;\nexports.getSegmentByIndex = getSegmentByIndex;\nexports.decideSegmentListRangeForTimeline = decideSegmentListRangeForTimeline;\nexports.decideSegmentListRangeForTemplate = decideSegmentListRangeForTemplate;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _voSegmentJs = _dereq_('./../vo/Segment.js');\n\nvar _voSegmentJs2 = _interopRequireDefault(_voSegmentJs);\n\nfunction zeroPadToLength(numStr, minStrLength) {\n while (numStr.length < minStrLength) {\n numStr = '0' + numStr;\n }\n return numStr;\n}\n\nfunction getNumberForSegment(segment, segmentIndex) {\n return segment.representation.startNumber + segmentIndex;\n}\n\nfunction replaceTokenForTemplate(url, token, value) {\n var formatTag = '%0';\n\n var startPos, endPos, formatTagPos, specifier, width, paddedValue;\n\n var tokenLen = token.length;\n var formatTagLen = formatTag.length;\n\n // keep looping round until all instances of have been\n // replaced. once that has happened, startPos below will be -1\n // and the completed url will be returned.\n while (true) {\n\n // check if there is a valid $...$ identifier\n // if not, return the url as is.\n startPos = url.indexOf('$' + token);\n if (startPos < 0) {\n return url;\n }\n\n // the next '$' must be the end of the identifier\n // if there isn't one, return the url as is.\n endPos = url.indexOf('$', startPos + tokenLen);\n if (endPos < 0) {\n return url;\n }\n\n // now see if there is an additional format tag suffixed to\n // the identifier within the enclosing '$' characters\n formatTagPos = url.indexOf(formatTag, startPos + tokenLen);\n if (formatTagPos > startPos && formatTagPos < endPos) {\n\n specifier = url.charAt(endPos - 1);\n width = parseInt(url.substring(formatTagPos + formatTagLen, endPos - 1), 10);\n\n // support the minimum specifiers required by IEEE 1003.1\n // (d, i , o, u, x, and X) for completeness\n switch (specifier) {\n // treat all int types as uint,\n // hence deliberate fallthrough\n case 'd':\n case 'i':\n case 'u':\n paddedValue = zeroPadToLength(value.toString(), width);\n break;\n case 'x':\n paddedValue = zeroPadToLength(value.toString(16), width);\n break;\n case 'X':\n paddedValue = zeroPadToLength(value.toString(16), width).toUpperCase();\n break;\n case 'o':\n paddedValue = zeroPadToLength(value.toString(8), width);\n break;\n default:\n //TODO: commented out logging to supress jshint warning -- `log` is undefined here\n //log('Unsupported/invalid IEEE 1003.1 format identifier string in URL');\n return url;\n }\n } else {\n paddedValue = value;\n }\n\n url = url.substring(0, startPos) + paddedValue + url.substring(endPos + 1);\n }\n}\n\nfunction getIndexBasedSegment(timelineConverter, isDynamic, representation, index) {\n var seg, duration, presentationStartTime, presentationEndTime;\n\n duration = representation.segmentDuration;\n\n /*\n * From spec - If neither @duration attribute nor SegmentTimeline element is present, then the Representation\n * shall contain exactly one Media Segment. The MPD start time is 0 and the MPD duration is obtained\n * in the same way as for the last Media Segment in the Representation.\n */\n if (isNaN(duration)) {\n duration = representation.adaptation.period.duration;\n }\n\n presentationStartTime = representation.adaptation.period.start + index * duration;\n presentationEndTime = presentationStartTime + duration;\n\n seg = new _voSegmentJs2['default']();\n\n seg.representation = representation;\n seg.duration = duration;\n seg.presentationStartTime = presentationStartTime;\n\n seg.mediaStartTime = timelineConverter.calcMediaTimeFromPresentationTime(seg.presentationStartTime, representation);\n\n seg.availabilityStartTime = timelineConverter.calcAvailabilityStartTimeFromPresentationTime(seg.presentationStartTime, representation.adaptation.period.mpd, isDynamic);\n seg.availabilityEndTime = timelineConverter.calcAvailabilityEndTimeFromPresentationTime(presentationEndTime, representation.adaptation.period.mpd, isDynamic);\n\n // at this wall clock time, the video element currentTime should be seg.presentationStartTime\n seg.wallStartTime = timelineConverter.calcWallTimeForSegment(seg, isDynamic);\n\n seg.replacementNumber = getNumberForSegment(seg, index);\n seg.availabilityIdx = index;\n\n return seg;\n}\n\nfunction getTimeBasedSegment(timelineConverter, isDynamic, representation, time, duration, fTimescale, url, range, index) {\n var scaledTime = time / fTimescale;\n var scaledDuration = Math.min(duration / fTimescale, representation.adaptation.period.mpd.maxSegmentDuration);\n\n var presentationStartTime, presentationEndTime, seg;\n\n presentationStartTime = timelineConverter.calcPresentationTimeFromMediaTime(scaledTime, representation);\n presentationEndTime = presentationStartTime + scaledDuration;\n\n seg = new _voSegmentJs2['default']();\n\n seg.representation = representation;\n seg.duration = scaledDuration;\n seg.mediaStartTime = scaledTime;\n\n seg.presentationStartTime = presentationStartTime;\n\n // For SegmentTimeline every segment is available at loadedTime\n seg.availabilityStartTime = representation.adaptation.period.mpd.manifest.loadedTime;\n seg.availabilityEndTime = timelineConverter.calcAvailabilityEndTimeFromPresentationTime(presentationEndTime, representation.adaptation.period.mpd, isDynamic);\n\n // at this wall clock time, the video element currentTime should be seg.presentationStartTime\n seg.wallStartTime = timelineConverter.calcWallTimeForSegment(seg, isDynamic);\n\n seg.replacementTime = time;\n\n seg.replacementNumber = getNumberForSegment(seg, index);\n\n url = replaceTokenForTemplate(url, 'Number', seg.replacementNumber);\n url = replaceTokenForTemplate(url, 'Time', seg.replacementTime);\n seg.media = url;\n seg.mediaRange = range;\n seg.availabilityIdx = index;\n\n return seg;\n}\n\nfunction getSegmentByIndex(index, representation) {\n if (!representation || !representation.segments) return null;\n\n var ln = representation.segments.length;\n var seg, i;\n\n if (index < ln) {\n seg = representation.segments[index];\n if (seg && seg.availabilityIdx === index) {\n return seg;\n }\n }\n\n for (i = 0; i < ln; i++) {\n seg = representation.segments[i];\n\n if (seg && seg.availabilityIdx === index) {\n return seg;\n }\n }\n\n return null;\n}\n\nfunction decideSegmentListRangeForTimeline(timelineConverter, isDynamic, requestedTime, index, givenAvailabilityUpperLimit) {\n var availabilityLowerLimit = 2;\n var availabilityUpperLimit = givenAvailabilityUpperLimit || 10;\n var firstIdx = 0;\n var lastIdx = Number.POSITIVE_INFINITY;\n\n var start, end, range;\n\n if (isDynamic && !timelineConverter.isTimeSyncCompleted()) {\n range = { start: firstIdx, end: lastIdx };\n return range;\n }\n\n if (!isDynamic && requestedTime || index < 0) return null;\n\n // segment list should not be out of the availability window range\n start = Math.max(index - availabilityLowerLimit, firstIdx);\n end = Math.min(index + availabilityUpperLimit, lastIdx);\n\n range = { start: start, end: end };\n\n return range;\n}\n\nfunction decideSegmentListRangeForTemplate(timelineConverter, isDynamic, representation, requestedTime, index, givenAvailabilityUpperLimit) {\n var duration = representation.segmentDuration;\n var minBufferTime = representation.adaptation.period.mpd.manifest.minBufferTime;\n var availabilityWindow = representation.segmentAvailabilityRange;\n var periodRelativeRange = {\n start: timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(representation, availabilityWindow.start),\n end: timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(representation, availabilityWindow.end)\n };\n var currentSegmentList = representation.segments;\n var availabilityLowerLimit = 2 * duration;\n var availabilityUpperLimit = givenAvailabilityUpperLimit || Math.max(2 * minBufferTime, 10 * duration);\n\n var originAvailabilityTime = NaN;\n var originSegment = null;\n\n var start, end, range;\n\n periodRelativeRange.start = Math.max(periodRelativeRange.start, 0);\n\n if (isDynamic && !timelineConverter.isTimeSyncCompleted()) {\n start = Math.floor(periodRelativeRange.start / duration);\n end = Math.floor(periodRelativeRange.end / duration);\n range = { start: start, end: end };\n return range;\n }\n\n // if segments exist we should try to find the latest buffered time, which is the presentation time of the\n // segment for the current index\n if (currentSegmentList && currentSegmentList.length > 0) {\n originSegment = getSegmentByIndex(index, representation);\n if (originSegment) {\n originAvailabilityTime = timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(representation, originSegment.presentationStartTime);\n } else {\n originAvailabilityTime = index > 0 ? index * duration : timelineConverter.calcPeriodRelativeTimeFromMpdRelativeTime(representation, requestedTime);\n }\n } else {\n // If no segments exist, but index > 0, it means that we switch to the other representation, so\n // we should proceed from this time.\n // Otherwise we should start from the beginning for static mpds or from the end (live edge) for dynamic mpds\n originAvailabilityTime = index > 0 ? index * duration : isDynamic ? periodRelativeRange.end : periodRelativeRange.start;\n }\n\n // segment list should not be out of the availability window range\n start = Math.floor(Math.max(originAvailabilityTime - availabilityLowerLimit, periodRelativeRange.start) / duration);\n end = Math.floor(Math.min(start + availabilityUpperLimit / duration, periodRelativeRange.end / duration));\n\n range = { start: start, end: end };\n\n return range;\n}\n\n},{\"./../vo/Segment.js\":32}],22:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _SegmentsUtilsJs = _dereq_('./SegmentsUtils.js');\n\nfunction TemplateSegmentsGetter(config, isDynamic) {\n\n var timelineConverter = config.timelineConverter;\n\n var instance = undefined;\n\n function getSegmentsFromTemplate(representation, requestedTime, index, availabilityUpperLimit) {\n var template = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentTemplate;\n var duration = representation.segmentDuration;\n var availabilityWindow = representation.segmentAvailabilityRange;\n\n var segments = [];\n var url = null;\n var seg = null;\n\n var segmentRange, periodSegIdx, startIdx, endIdx, start;\n\n start = representation.startNumber;\n\n if (isNaN(duration) && !isDynamic) {\n segmentRange = { start: start, end: start };\n } else {\n segmentRange = (0, _SegmentsUtilsJs.decideSegmentListRangeForTemplate)(timelineConverter, isDynamic, representation, requestedTime, index, availabilityUpperLimit);\n }\n\n startIdx = segmentRange.start;\n endIdx = segmentRange.end;\n\n for (periodSegIdx = startIdx; periodSegIdx <= endIdx; periodSegIdx++) {\n\n seg = (0, _SegmentsUtilsJs.getIndexBasedSegment)(timelineConverter, isDynamic, representation, periodSegIdx);\n seg.replacementTime = (start + periodSegIdx - 1) * representation.segmentDuration;\n url = template.media;\n url = (0, _SegmentsUtilsJs.replaceTokenForTemplate)(url, 'Number', seg.replacementNumber);\n url = (0, _SegmentsUtilsJs.replaceTokenForTemplate)(url, 'Time', seg.replacementTime);\n seg.media = url;\n\n segments.push(seg);\n seg = null;\n }\n\n if (isNaN(duration)) {\n representation.availableSegmentsNumber = 1;\n } else {\n representation.availableSegmentsNumber = Math.ceil((availabilityWindow.end - availabilityWindow.start) / duration);\n }\n\n return segments;\n }\n\n instance = {\n getSegments: getSegmentsFromTemplate\n };\n\n return instance;\n}\n\nTemplateSegmentsGetter.__dashjs_factory_name = 'TemplateSegmentsGetter';\nvar factory = _coreFactoryMakerJs2['default'].getClassFactory(TemplateSegmentsGetter);\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7,\"./SegmentsUtils.js\":21}],23:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction TimelineConverter() {\n\n var context = this.context;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var instance = undefined,\n clientServerTimeShift = undefined,\n isClientServerTimeSyncCompleted = undefined,\n expectedLiveEdge = undefined;\n\n function initialize() {\n\n clientServerTimeShift = 0;\n isClientServerTimeSyncCompleted = false;\n expectedLiveEdge = NaN;\n\n eventBus.on(_coreEventsEventsJs2['default'].LIVE_EDGE_SEARCH_COMPLETED, onLiveEdgeSearchCompleted, this);\n eventBus.on(_coreEventsEventsJs2['default'].TIME_SYNCHRONIZATION_COMPLETED, onTimeSyncComplete, this);\n }\n\n function isTimeSyncCompleted() {\n return isClientServerTimeSyncCompleted;\n }\n\n function setTimeSyncCompleted(value) {\n isClientServerTimeSyncCompleted = value;\n }\n\n function getClientTimeOffset() {\n return clientServerTimeShift;\n }\n\n function getExpectedLiveEdge() {\n return expectedLiveEdge;\n }\n\n function setExpectedLiveEdge(value) {\n expectedLiveEdge = value;\n }\n\n function calcAvailabilityTimeFromPresentationTime(presentationTime, mpd, isDynamic, calculateEnd) {\n var availabilityTime = NaN;\n\n if (calculateEnd) {\n //@timeShiftBufferDepth specifies the duration of the time shifting buffer that is guaranteed\n // to be available for a Media Presentation with type 'dynamic'.\n // When not present, the value is infinite.\n if (isDynamic && mpd.timeShiftBufferDepth != Number.POSITIVE_INFINITY) {\n availabilityTime = new Date(mpd.availabilityStartTime.getTime() + (presentationTime + mpd.timeShiftBufferDepth) * 1000);\n } else {\n availabilityTime = mpd.availabilityEndTime;\n }\n } else {\n if (isDynamic) {\n availabilityTime = new Date(mpd.availabilityStartTime.getTime() + (presentationTime - clientServerTimeShift) * 1000);\n } else {\n // in static mpd, all segments are available at the same time\n availabilityTime = mpd.availabilityStartTime;\n }\n }\n\n return availabilityTime;\n }\n\n function calcAvailabilityStartTimeFromPresentationTime(presentationTime, mpd, isDynamic) {\n return calcAvailabilityTimeFromPresentationTime.call(this, presentationTime, mpd, isDynamic);\n }\n\n function calcAvailabilityEndTimeFromPresentationTime(presentationTime, mpd, isDynamic) {\n return calcAvailabilityTimeFromPresentationTime.call(this, presentationTime, mpd, isDynamic, true);\n }\n\n function calcPresentationTimeFromWallTime(wallTime, period) {\n return (wallTime.getTime() - period.mpd.availabilityStartTime.getTime() + clientServerTimeShift * 1000) / 1000;\n }\n\n function calcPresentationTimeFromMediaTime(mediaTime, representation) {\n var periodStart = representation.adaptation.period.start;\n var presentationOffset = representation.presentationTimeOffset;\n\n return mediaTime + (periodStart - presentationOffset);\n }\n\n function calcMediaTimeFromPresentationTime(presentationTime, representation) {\n var periodStart = representation.adaptation.period.start;\n var presentationOffset = representation.presentationTimeOffset;\n\n return presentationTime - periodStart + presentationOffset;\n }\n\n function calcWallTimeForSegment(segment, isDynamic) {\n var suggestedPresentationDelay, displayStartTime, wallTime;\n\n if (isDynamic) {\n suggestedPresentationDelay = segment.representation.adaptation.period.mpd.suggestedPresentationDelay;\n displayStartTime = segment.presentationStartTime + suggestedPresentationDelay;\n wallTime = new Date(segment.availabilityStartTime.getTime() + displayStartTime * 1000);\n }\n\n return wallTime;\n }\n\n function calcSegmentAvailabilityRange(representation, isDynamic) {\n var start = representation.adaptation.period.start;\n var end = start + representation.adaptation.period.duration;\n var range = { start: start, end: end };\n var d = representation.segmentDuration || (representation.segments && representation.segments.length ? representation.segments[representation.segments.length - 1].duration : 0);\n\n var checkTime, now;\n\n if (!isDynamic) return range;\n\n if (!isClientServerTimeSyncCompleted && representation.segmentAvailabilityRange) {\n return representation.segmentAvailabilityRange;\n }\n\n checkTime = representation.adaptation.period.mpd.checkTime;\n now = calcPresentationTimeFromWallTime(new Date(), representation.adaptation.period);\n //the Media Segment list is further restricted by the CheckTime together with the MPD attribute\n // MPD@timeShiftBufferDepth such that only Media Segments for which the sum of the start time of the\n // Media Segment and the Period start time falls in the interval [NOW- MPD@timeShiftBufferDepth - @duration, min(CheckTime, NOW)] are included.\n start = Math.max(now - representation.adaptation.period.mpd.timeShiftBufferDepth, representation.adaptation.period.start);\n var timeAnchor = isNaN(checkTime) ? now : Math.min(checkTime, now);\n var periodEnd = representation.adaptation.period.start + representation.adaptation.period.duration;\n end = (timeAnchor >= periodEnd && timeAnchor - d < periodEnd ? periodEnd : timeAnchor) - d;\n //end = (isNaN(checkTime) ? now : Math.min(checkTime, now)) - d;\n range = { start: start, end: end };\n\n return range;\n }\n\n function calcPeriodRelativeTimeFromMpdRelativeTime(representation, mpdRelativeTime) {\n var periodStartTime = representation.adaptation.period.start;\n return mpdRelativeTime - periodStartTime;\n }\n\n function calcMpdRelativeTimeFromPeriodRelativeTime(representation, periodRelativeTime) {\n var periodStartTime = representation.adaptation.period.start;\n\n return periodRelativeTime + periodStartTime;\n }\n\n function onLiveEdgeSearchCompleted(e) {\n if (isClientServerTimeSyncCompleted || e.error) return;\n\n // the difference between expected and actual live edge time is supposed to be a difference between client\n // and server time as well\n clientServerTimeShift += e.liveEdge - (expectedLiveEdge + e.searchTime);\n isClientServerTimeSyncCompleted = true;\n }\n\n function onTimeSyncComplete(e) {\n if (isClientServerTimeSyncCompleted || e.error) {\n return;\n }\n\n clientServerTimeShift = e.offset / 1000;\n\n isClientServerTimeSyncCompleted = true;\n }\n\n function calcMSETimeOffset(representation) {\n // The MSEOffset is offset from AST for media. It is Period@start - presentationTimeOffset\n var presentationOffset = representation.presentationTimeOffset;\n var periodStart = representation.adaptation.period.start;\n return periodStart - presentationOffset;\n }\n\n function reset() {\n eventBus.off(_coreEventsEventsJs2['default'].LIVE_EDGE_SEARCH_COMPLETED, onLiveEdgeSearchCompleted, this);\n eventBus.off(_coreEventsEventsJs2['default'].TIME_SYNCHRONIZATION_COMPLETED, onTimeSyncComplete, this);\n clientServerTimeShift = 0;\n isClientServerTimeSyncCompleted = false;\n expectedLiveEdge = NaN;\n }\n\n instance = {\n initialize: initialize,\n isTimeSyncCompleted: isTimeSyncCompleted,\n setTimeSyncCompleted: setTimeSyncCompleted,\n getClientTimeOffset: getClientTimeOffset,\n getExpectedLiveEdge: getExpectedLiveEdge,\n setExpectedLiveEdge: setExpectedLiveEdge,\n calcAvailabilityStartTimeFromPresentationTime: calcAvailabilityStartTimeFromPresentationTime,\n calcAvailabilityEndTimeFromPresentationTime: calcAvailabilityEndTimeFromPresentationTime,\n calcPresentationTimeFromWallTime: calcPresentationTimeFromWallTime,\n calcPresentationTimeFromMediaTime: calcPresentationTimeFromMediaTime,\n calcPeriodRelativeTimeFromMpdRelativeTime: calcPeriodRelativeTimeFromMpdRelativeTime,\n calcMpdRelativeTimeFromPeriodRelativeTime: calcMpdRelativeTimeFromPeriodRelativeTime,\n calcMediaTimeFromPresentationTime: calcMediaTimeFromPresentationTime,\n calcSegmentAvailabilityRange: calcSegmentAvailabilityRange,\n calcWallTimeForSegment: calcWallTimeForSegment,\n calcMSETimeOffset: calcMSETimeOffset,\n reset: reset\n };\n\n return instance;\n}\n\nTimelineConverter.__dashjs_factory_name = 'TimelineConverter';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(TimelineConverter);\nmodule.exports = exports['default'];\n\n},{\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7,\"../../core/events/Events.js\":9}],24:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _SegmentsUtilsJs = _dereq_('./SegmentsUtils.js');\n\nfunction TimelineSegmentsGetter(config, isDynamic) {\n\n var timelineConverter = config.timelineConverter;\n\n var instance = undefined;\n\n function getSegmentsFromTimeline(representation, requestedTime, index, availabilityUpperLimit) {\n var template = representation.adaptation.period.mpd.manifest.Period_asArray[representation.adaptation.period.index].AdaptationSet_asArray[representation.adaptation.index].Representation_asArray[representation.index].SegmentTemplate;\n var timeline = template.SegmentTimeline;\n var isAvailableSegmentNumberCalculated = representation.availableSegmentsNumber > 0;\n\n var maxSegmentsAhead = 10;\n var time = 0;\n var scaledTime = 0;\n var availabilityIdx = -1;\n var segments = [];\n var isStartSegmentForRequestedTimeFound = false;\n\n var fragments, frag, i, len, j, repeat, repeatEndTime, nextFrag, calculatedRange, hasEnoughSegments, requiredMediaTime, startIdx, endIdx, fTimescale;\n\n var createSegment = function createSegment(s) {\n return (0, _SegmentsUtilsJs.getTimeBasedSegment)(timelineConverter, isDynamic, representation, time, s.d, fTimescale, template.media, s.mediaRange, availabilityIdx);\n };\n\n fTimescale = representation.timescale;\n\n fragments = timeline.S_asArray;\n\n calculatedRange = (0, _SegmentsUtilsJs.decideSegmentListRangeForTimeline)(timelineConverter, isDynamic, requestedTime, index, availabilityUpperLimit);\n\n // if calculatedRange exists we should generate segments that belong to this range.\n // Otherwise generate maxSegmentsAhead segments ahead of the requested time\n if (calculatedRange) {\n startIdx = calculatedRange.start;\n endIdx = calculatedRange.end;\n } else {\n requiredMediaTime = timelineConverter.calcMediaTimeFromPresentationTime(requestedTime || 0, representation);\n }\n\n for (i = 0, len = fragments.length; i < len; i++) {\n frag = fragments[i];\n repeat = 0;\n if (frag.hasOwnProperty('r')) {\n repeat = frag.r;\n }\n\n //For a repeated S element, t belongs only to the first segment\n if (frag.hasOwnProperty('t')) {\n time = frag.t;\n scaledTime = time / fTimescale;\n }\n\n //This is a special case: \"A negative value of the @r attribute of the S element indicates that the duration indicated in @d attribute repeats until the start of the next S element, the end of the Period or until the\n // next MPD update.\"\n if (repeat < 0) {\n nextFrag = fragments[i + 1];\n\n if (nextFrag && nextFrag.hasOwnProperty('t')) {\n repeatEndTime = nextFrag.t / fTimescale;\n } else {\n var availabilityEnd = representation.segmentAvailabilityRange ? representation.segmentAvailabilityRange.end : timelineConverter.calcSegmentAvailabilityRange(representation, isDynamic).end;\n repeatEndTime = timelineConverter.calcMediaTimeFromPresentationTime(availabilityEnd, representation);\n representation.segmentDuration = frag.d / fTimescale;\n }\n\n repeat = Math.ceil((repeatEndTime - scaledTime) / (frag.d / fTimescale)) - 1;\n }\n\n // if we have enough segments in the list, but we have not calculated the total number of the segments yet we\n // should continue the loop and calc the number. Once it is calculated, we can break the loop.\n if (hasEnoughSegments) {\n if (isAvailableSegmentNumberCalculated) break;\n availabilityIdx += repeat + 1;\n continue;\n }\n\n for (j = 0; j <= repeat; j++) {\n availabilityIdx++;\n\n if (calculatedRange) {\n if (availabilityIdx > endIdx) {\n hasEnoughSegments = true;\n if (isAvailableSegmentNumberCalculated) break;\n continue;\n }\n\n if (availabilityIdx >= startIdx) {\n segments.push(createSegment(frag));\n }\n } else {\n if (segments.length > maxSegmentsAhead) {\n hasEnoughSegments = true;\n if (isAvailableSegmentNumberCalculated) break;\n continue;\n }\n\n // In some cases when requiredMediaTime = actual end time of the last segment\n // it is possible that this time a bit exceeds the declared end time of the last segment.\n // in this case we still need to include the last segment in the segment list. to do this we\n // use a correction factor = 1.5. This number is used because the largest possible deviation is\n // is 50% of segment duration.\n if (isStartSegmentForRequestedTimeFound) {\n segments.push(createSegment(frag));\n } else if (scaledTime >= requiredMediaTime - frag.d / fTimescale * 1.5) {\n isStartSegmentForRequestedTimeFound = true;\n segments.push(createSegment(frag));\n }\n }\n\n time += frag.d;\n scaledTime = time / fTimescale;\n }\n }\n\n if (!isAvailableSegmentNumberCalculated) {\n representation.availableSegmentsNumber = availabilityIdx + 1;\n }\n\n return segments;\n }\n\n instance = {\n getSegments: getSegmentsFromTimeline\n };\n\n return instance;\n}\n\nTimelineSegmentsGetter.__dashjs_factory_name = 'TimelineSegmentsGetter';\nvar factory = _coreFactoryMakerJs2['default'].getClassFactory(TimelineSegmentsGetter);\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7,\"./SegmentsUtils.js\":21}],25:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar AdaptationSet = function AdaptationSet() {\n _classCallCheck(this, AdaptationSet);\n\n this.period = null;\n this.index = -1;\n this.type = null;\n};\n\nexports[\"default\"] = AdaptationSet;\nmodule.exports = exports[\"default\"];\n\n},{}],26:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar DEFAULT_DVB_PRIORITY = 1;\nvar DEFAULT_DVB_WEIGHT = 1;\n\nvar BaseURL = function BaseURL(url, serviceLocation, priority, weight) {\n _classCallCheck(this, BaseURL);\n\n this.url = url || '';\n this.serviceLocation = serviceLocation || url || '';\n\n // DVB extensions\n this.dvb_priority = priority || DEFAULT_DVB_PRIORITY;\n this.dvb_weight = weight || DEFAULT_DVB_WEIGHT;\n\n /* currently unused:\n * byteRange,\n * availabilityTimeOffset,\n * availabilityTimeComplete\n */\n};\n\nBaseURL.DEFAULT_DVB_PRIORITY = DEFAULT_DVB_PRIORITY;\nBaseURL.DEFAULT_DVB_WEIGHT = DEFAULT_DVB_WEIGHT;\n\nexports['default'] = BaseURL;\nmodule.exports = exports['default'];\n\n},{}],27:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar Event = function Event() {\n _classCallCheck(this, Event);\n\n this.duration = NaN;\n this.presentationTime = NaN;\n this.id = NaN;\n this.messageData = '';\n this.eventStream = null;\n this.presentationTimeDelta = NaN; // Specific EMSG Box parameter\n};\n\nexports['default'] = Event;\nmodule.exports = exports['default'];\n\n},{}],28:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar EventStream = function EventStream() {\n _classCallCheck(this, EventStream);\n\n this.adaptionSet = null;\n this.representation = null;\n this.period = null;\n this.timescale = 1;\n this.value = '';\n this.schemeIdUri = '';\n};\n\nexports['default'] = EventStream;\nmodule.exports = exports['default'];\n\n},{}],29:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Mpd = function Mpd() {\n _classCallCheck(this, Mpd);\n\n this.manifest = null;\n this.suggestedPresentationDelay = 0;\n this.availabilityStartTime = null;\n this.availabilityEndTime = Number.POSITIVE_INFINITY;\n this.timeShiftBufferDepth = Number.POSITIVE_INFINITY;\n this.maxSegmentDuration = Number.POSITIVE_INFINITY;\n this.checkTime = NaN;\n this.clientServerTimeShift = 0;\n this.isClientServerTimeSyncCompleted = false;\n};\n\nexports[\"default\"] = Mpd;\nmodule.exports = exports[\"default\"];\n\n},{}],30:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar Period = function Period() {\n _classCallCheck(this, Period);\n\n this.id = null;\n this.index = -1;\n this.duration = NaN;\n this.start = NaN;\n this.mpd = null;\n};\n\nPeriod.DEFAULT_ID = 'defaultId';\n\nexports['default'] = Period;\nmodule.exports = exports['default'];\n\n},{}],31:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Representation = function Representation() {\n _classCallCheck(this, Representation);\n\n this.id = null;\n this.index = -1;\n this.adaptation = null;\n this.segmentInfoType = null;\n this.initialization = null;\n this.segmentDuration = NaN;\n this.timescale = 1;\n this.startNumber = 1;\n this.indexRange = null;\n this.range = null;\n this.presentationTimeOffset = 0;\n // Set the source buffer timeOffset to this\n this.MSETimeOffset = NaN;\n this.segmentAvailabilityRange = null;\n this.availableSegmentsNumber = 0;\n this.bandwidth = NaN;\n this.maxPlayoutRate = NaN;\n};\n\nexports[\"default\"] = Representation;\nmodule.exports = exports[\"default\"];\n\n},{}],32:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Segment = function Segment() {\n _classCallCheck(this, Segment);\n\n this.indexRange = null;\n this.index = null;\n this.mediaRange = null;\n this.media = null;\n this.duration = NaN;\n // this is the time that should be inserted into the media url\n this.replacementTime = null;\n // this is the number that should be inserted into the media url\n this.replacementNumber = NaN;\n // This is supposed to match the time encoded in the media Segment\n this.mediaStartTime = NaN;\n // When the source buffer timeOffset is set to MSETimeOffset this is the\n // time that will match the seekTarget and video.currentTime\n this.presentationStartTime = NaN;\n // Do not schedule this segment until\n this.availabilityStartTime = NaN;\n // Ignore and discard this segment after\n this.availabilityEndTime = NaN;\n // The index of the segment inside the availability window\n this.availabilityIdx = NaN;\n // For dynamic mpd's, this is the wall clock time that the video\n // element currentTime should be presentationStartTime\n this.wallStartTime = NaN;\n this.representation = null;\n};\n\nexports[\"default\"] = Segment;\nmodule.exports = exports[\"default\"];\n\n},{}],33:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar UTCTiming = function UTCTiming() {\n _classCallCheck(this, UTCTiming);\n\n // UTCTiming is a DescriptorType and doesn't have any additional fields\n this.schemeIdUri = '';\n this.value = '';\n};\n\nexports['default'] = UTCTiming;\nmodule.exports = exports['default'];\n\n},{}],34:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _XHRLoaderJs = _dereq_('./XHRLoader.js');\n\nvar _XHRLoaderJs2 = _interopRequireDefault(_XHRLoaderJs);\n\nvar _voHeadRequestJs = _dereq_('./vo/HeadRequest.js');\n\nvar _voHeadRequestJs2 = _interopRequireDefault(_voHeadRequestJs);\n\nvar _voErrorJs = _dereq_('./vo/Error.js');\n\nvar _voErrorJs2 = _interopRequireDefault(_voErrorJs);\n\nvar _coreEventBusJs = _dereq_('./../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('./../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar FRAGMENT_LOADER_ERROR_LOADING_FAILURE = 1;\nvar FRAGMENT_LOADER_ERROR_NULL_REQUEST = 2;\nvar FRAGMENT_LOADER_MESSAGE_NULL_REQUEST = 'request is null';\n\nfunction FragmentLoader(config) {\n\n var context = this.context;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var instance = undefined,\n xhrLoader = undefined;\n\n function setup() {\n xhrLoader = (0, _XHRLoaderJs2['default'])(context).create({\n errHandler: config.errHandler,\n metricsModel: config.metricsModel,\n requestModifier: config.requestModifier\n });\n }\n\n function checkForExistence(request) {\n var report = function report(success) {\n eventBus.trigger(_coreEventsEventsJs2['default'].CHECK_FOR_EXISTENCE_COMPLETED, {\n request: request,\n exists: success\n });\n };\n\n if (request) {\n var headRequest = new _voHeadRequestJs2['default'](request.url);\n\n xhrLoader.load({\n request: headRequest,\n success: function success() {\n report(true);\n },\n error: function error() {\n report(false);\n }\n });\n } else {\n report(false);\n }\n }\n\n function load(request) {\n var report = function report(data, error) {\n eventBus.trigger(_coreEventsEventsJs2['default'].LOADING_COMPLETED, {\n request: request,\n response: data || null,\n error: error || null,\n sender: instance\n });\n };\n\n if (request) {\n xhrLoader.load({\n request: request,\n progress: function progress() {\n eventBus.trigger(_coreEventsEventsJs2['default'].LOADING_PROGRESS, {\n request: request\n });\n },\n success: function success(data) {\n report(data);\n },\n error: function error(xhr, statusText, errorText) {\n report(undefined, new _voErrorJs2['default'](FRAGMENT_LOADER_ERROR_LOADING_FAILURE, errorText, statusText));\n }\n });\n } else {\n report(undefined, new _voErrorJs2['default'](FRAGMENT_LOADER_ERROR_NULL_REQUEST, FRAGMENT_LOADER_MESSAGE_NULL_REQUEST));\n }\n }\n\n function abort() {\n if (xhrLoader) {\n xhrLoader.abort();\n }\n }\n\n function reset() {\n if (xhrLoader) {\n xhrLoader.abort();\n xhrLoader = null;\n }\n }\n\n instance = {\n checkForExistence: checkForExistence,\n load: load,\n abort: abort,\n reset: reset\n };\n\n setup();\n\n return instance;\n}\n\nFragmentLoader.__dashjs_factory_name = 'FragmentLoader';\n\nvar factory = _coreFactoryMakerJs2['default'].getClassFactory(FragmentLoader);\nfactory.FRAGMENT_LOADER_ERROR_LOADING_FAILURE = FRAGMENT_LOADER_ERROR_LOADING_FAILURE;\nfactory.FRAGMENT_LOADER_ERROR_NULL_REQUEST = FRAGMENT_LOADER_ERROR_NULL_REQUEST;\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../core/FactoryMaker.js\":7,\"./../core/EventBus.js\":6,\"./../core/events/Events.js\":9,\"./XHRLoader.js\":44,\"./vo/Error.js\":100,\"./vo/HeadRequest.js\":102}],35:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _controllersXlinkControllerJs = _dereq_('./controllers/XlinkController.js');\n\nvar _controllersXlinkControllerJs2 = _interopRequireDefault(_controllersXlinkControllerJs);\n\nvar _XHRLoaderJs = _dereq_('./XHRLoader.js');\n\nvar _XHRLoaderJs2 = _interopRequireDefault(_XHRLoaderJs);\n\nvar _utilsURLUtilsJs = _dereq_('./utils/URLUtils.js');\n\nvar _utilsURLUtilsJs2 = _interopRequireDefault(_utilsURLUtilsJs);\n\nvar _voTextRequestJs = _dereq_('./vo/TextRequest.js');\n\nvar _voTextRequestJs2 = _interopRequireDefault(_voTextRequestJs);\n\nvar _voErrorJs = _dereq_('./vo/Error.js');\n\nvar _voErrorJs2 = _interopRequireDefault(_voErrorJs);\n\nvar _voMetricsHTTPRequestJs = _dereq_('./vo/metrics/HTTPRequest.js');\n\nvar _voMetricsHTTPRequestJs2 = _interopRequireDefault(_voMetricsHTTPRequestJs);\n\nvar _coreEventBusJs = _dereq_('../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar MANIFEST_LOADER_ERROR_PARSING_FAILURE = 1;\nvar MANIFEST_LOADER_ERROR_LOADING_FAILURE = 2;\nvar MANIFEST_LOADER_MESSAGE_PARSING_FAILURE = 'parsing failed';\n\nfunction ManifestLoader(config) {\n\n var context = this.context;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n var urlUtils = (0, _utilsURLUtilsJs2['default'])(context).getInstance();\n var parser = config.parser;\n\n var instance = undefined,\n xhrLoader = undefined,\n xlinkController = undefined;\n\n function setup() {\n eventBus.on(_coreEventsEventsJs2['default'].XLINK_READY, onXlinkReady, instance);\n\n xhrLoader = (0, _XHRLoaderJs2['default'])(context).create({\n errHandler: config.errHandler,\n metricsModel: config.metricsModel,\n requestModifier: config.requestModifier\n });\n\n xlinkController = (0, _controllersXlinkControllerJs2['default'])(context).create({\n errHandler: config.errHandler,\n metricsModel: config.metricsModel,\n requestModifier: config.requestModifier\n });\n }\n\n function onXlinkReady(event) {\n eventBus.trigger(_coreEventsEventsJs2['default'].INTERNAL_MANIFEST_LOADED, {\n manifest: event.manifest\n });\n }\n\n function load(url) {\n var request = new _voTextRequestJs2['default'](url, _voMetricsHTTPRequestJs2['default'].MPD_TYPE);\n\n xhrLoader.load({\n request: request,\n success: function success(data, textStatus, xhr) {\n var actualUrl;\n var baseUri;\n\n // Handle redirects for the MPD - as per RFC3986 Section 5.1.3\n if (xhr.responseURL && xhr.responseURL !== url) {\n baseUri = urlUtils.parseBaseUrl(xhr.responseURL);\n actualUrl = xhr.responseURL;\n } else {\n baseUri = urlUtils.parseBaseUrl(url);\n }\n\n var manifest = parser.parse(data, xlinkController);\n\n if (manifest) {\n manifest.url = actualUrl || url;\n\n // URL from which the MPD was originally retrieved (MPD updates will not change this value)\n if (!manifest.originalUrl) {\n manifest.originalUrl = manifest.url;\n }\n\n manifest.baseUri = baseUri;\n manifest.loadedTime = new Date();\n xlinkController.resolveManifestOnLoad(manifest);\n } else {\n eventBus.trigger(_coreEventsEventsJs2['default'].INTERNAL_MANIFEST_LOADED, {\n manifest: null,\n error: new _voErrorJs2['default'](MANIFEST_LOADER_ERROR_PARSING_FAILURE, MANIFEST_LOADER_MESSAGE_PARSING_FAILURE)\n });\n }\n },\n error: function error(xhr, statusText, errorText) {\n eventBus.trigger(_coreEventsEventsJs2['default'].INTERNAL_MANIFEST_LOADED, {\n manifest: null,\n error: new _voErrorJs2['default'](MANIFEST_LOADER_ERROR_LOADING_FAILURE, 'Failed loading manifest: ' + url + ', ' + errorText)\n });\n }\n });\n }\n\n function reset() {\n eventBus.off(_coreEventsEventsJs2['default'].XLINK_READY, onXlinkReady, instance);\n\n if (xlinkController) {\n xlinkController.reset();\n xlinkController = null;\n }\n\n if (xhrLoader) {\n xhrLoader.abort();\n xhrLoader = null;\n }\n }\n\n instance = {\n load: load,\n reset: reset\n };\n\n setup();\n\n return instance;\n}\n\nManifestLoader.__dashjs_factory_name = 'ManifestLoader';\n\nvar factory = _coreFactoryMakerJs2['default'].getClassFactory(ManifestLoader);\nfactory.MANIFEST_LOADER_ERROR_PARSING_FAILURE = MANIFEST_LOADER_ERROR_PARSING_FAILURE;\nfactory.MANIFEST_LOADER_ERROR_LOADING_FAILURE = MANIFEST_LOADER_ERROR_LOADING_FAILURE;\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../core/EventBus.js\":6,\"../core/FactoryMaker.js\":7,\"../core/events/Events.js\":9,\"./XHRLoader.js\":44,\"./controllers/XlinkController.js\":60,\"./utils/URLUtils.js\":96,\"./vo/Error.js\":100,\"./vo/TextRequest.js\":108,\"./vo/metrics/HTTPRequest.js\":117}],36:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreEventBusJs = _dereq_('../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreDebugJs = _dereq_('../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nfunction ManifestUpdater() {\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var instance = undefined,\n refreshDelay = undefined,\n refreshTimer = undefined,\n isStopped = undefined,\n isUpdating = undefined,\n manifestLoader = undefined,\n manifestModel = undefined,\n dashManifestModel = undefined;\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.manifestModel) {\n manifestModel = config.manifestModel;\n }\n if (config.dashManifestModel) {\n dashManifestModel = config.dashManifestModel;\n }\n }\n\n function initialize(loader) {\n manifestLoader = loader;\n refreshDelay = NaN;\n refreshTimer = null;\n isUpdating = false;\n isStopped = true;\n\n eventBus.on(_coreEventsEventsJs2['default'].STREAMS_COMPOSED, onStreamsComposed, this);\n eventBus.on(_coreEventsEventsJs2['default'].PLAYBACK_STARTED, onPlaybackStarted, this);\n eventBus.on(_coreEventsEventsJs2['default'].PLAYBACK_PAUSED, onPlaybackPaused, this);\n eventBus.on(_coreEventsEventsJs2['default'].INTERNAL_MANIFEST_LOADED, onManifestLoaded, this);\n }\n\n function setManifest(manifest) {\n update(manifest);\n }\n\n function getManifestLoader() {\n return manifestLoader;\n }\n\n function reset() {\n eventBus.off(_coreEventsEventsJs2['default'].PLAYBACK_STARTED, onPlaybackStarted, this);\n eventBus.off(_coreEventsEventsJs2['default'].PLAYBACK_PAUSED, onPlaybackPaused, this);\n eventBus.off(_coreEventsEventsJs2['default'].STREAMS_COMPOSED, onStreamsComposed, this);\n eventBus.off(_coreEventsEventsJs2['default'].INTERNAL_MANIFEST_LOADED, onManifestLoaded, this);\n\n isStopped = true;\n isUpdating = false;\n clear();\n refreshDelay = NaN;\n }\n\n function clear() {\n if (refreshTimer !== null) {\n clearInterval(refreshTimer);\n refreshTimer = null;\n }\n }\n\n function startManifestRefreshTimer() {\n clear();\n if (!isNaN(refreshDelay)) {\n log('Refresh manifest in ' + refreshDelay + ' seconds.');\n refreshTimer = setTimeout(onRefreshTimer, Math.min(refreshDelay * 1000, Math.pow(2, 31) - 1), this);\n }\n }\n\n function update(manifest) {\n var delay, timeSinceLastUpdate;\n\n var date = new Date();\n\n manifestModel.setValue(manifest);\n log('Manifest has been refreshed at ' + date + '[' + date.getTime() / 1000 + '] ');\n\n delay = dashManifestModel.getRefreshDelay(manifest);\n timeSinceLastUpdate = (new Date().getTime() - manifest.loadedTime.getTime()) / 1000;\n refreshDelay = Math.max(delay - timeSinceLastUpdate, 0);\n\n eventBus.trigger(_coreEventsEventsJs2['default'].MANIFEST_UPDATED, { manifest: manifest });\n\n if (!isStopped) {\n startManifestRefreshTimer();\n }\n }\n\n function onRefreshTimer() {\n var manifest, url;\n\n if (isStopped || isUpdating) return;\n\n isUpdating = true;\n manifest = manifestModel.getValue();\n url = manifest.url;\n\n if (manifest.hasOwnProperty('Location')) {\n url = manifest.Location;\n }\n\n //log(\"Refresh manifest @ \" + url);\n\n manifestLoader.load(url);\n }\n\n function onManifestLoaded(e) {\n if (!e.error) {\n update(e.manifest);\n }\n }\n\n function onPlaybackStarted() /*e*/{\n isStopped = false;\n startManifestRefreshTimer();\n }\n\n function onPlaybackPaused() /*e*/{\n isStopped = true;\n clear();\n }\n\n function onStreamsComposed() /*e*/{\n // When streams are ready we can consider manifest update completed. Resolve the update promise.\n isUpdating = false;\n }\n\n instance = {\n initialize: initialize,\n setManifest: setManifest,\n getManifestLoader: getManifestLoader,\n setConfig: setConfig,\n reset: reset\n };\n\n return instance;\n}\nManifestUpdater.__dashjs_factory_name = 'ManifestUpdater';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(ManifestUpdater);\nmodule.exports = exports['default'];\n\n},{\"../core/Debug.js\":5,\"../core/EventBus.js\":6,\"../core/FactoryMaker.js\":7,\"../core/events/Events.js\":9}],37:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _dashVoUTCTimingJs = _dereq_('../dash/vo/UTCTiming.js');\n\nvar _dashVoUTCTimingJs2 = _interopRequireDefault(_dashVoUTCTimingJs);\n\nvar _controllersPlaybackControllerJs = _dereq_('./controllers/PlaybackController.js');\n\nvar _controllersPlaybackControllerJs2 = _interopRequireDefault(_controllersPlaybackControllerJs);\n\nvar _controllersStreamControllerJs = _dereq_('./controllers/StreamController.js');\n\nvar _controllersStreamControllerJs2 = _interopRequireDefault(_controllersStreamControllerJs);\n\nvar _controllersMediaControllerJs = _dereq_('./controllers/MediaController.js');\n\nvar _controllersMediaControllerJs2 = _interopRequireDefault(_controllersMediaControllerJs);\n\nvar _ManifestLoaderJs = _dereq_('./ManifestLoader.js');\n\nvar _ManifestLoaderJs2 = _interopRequireDefault(_ManifestLoaderJs);\n\nvar _utilsLiveEdgeFinderJs = _dereq_('./utils/LiveEdgeFinder.js');\n\nvar _utilsLiveEdgeFinderJs2 = _interopRequireDefault(_utilsLiveEdgeFinderJs);\n\nvar _utilsErrorHandlerJs = _dereq_('./utils/ErrorHandler.js');\n\nvar _utilsErrorHandlerJs2 = _interopRequireDefault(_utilsErrorHandlerJs);\n\nvar _utilsCapabilitiesJs = _dereq_('./utils/Capabilities.js');\n\nvar _utilsCapabilitiesJs2 = _interopRequireDefault(_utilsCapabilitiesJs);\n\nvar _TextTracksJs = _dereq_('./TextTracks.js');\n\nvar _TextTracksJs2 = _interopRequireDefault(_TextTracksJs);\n\nvar _controllersSourceBufferControllerJs = _dereq_('./controllers/SourceBufferController.js');\n\nvar _controllersSourceBufferControllerJs2 = _interopRequireDefault(_controllersSourceBufferControllerJs);\n\nvar _VirtualBufferJs = _dereq_('./VirtualBuffer.js');\n\nvar _VirtualBufferJs2 = _interopRequireDefault(_VirtualBufferJs);\n\nvar _utilsRequestModifierJs = _dereq_('./utils/RequestModifier.js');\n\nvar _utilsRequestModifierJs2 = _interopRequireDefault(_utilsRequestModifierJs);\n\nvar _TextSourceBufferJs = _dereq_('./TextSourceBuffer.js');\n\nvar _TextSourceBufferJs2 = _interopRequireDefault(_TextSourceBufferJs);\n\nvar _modelsURIQueryAndFragmentModelJs = _dereq_('./models/URIQueryAndFragmentModel.js');\n\nvar _modelsURIQueryAndFragmentModelJs2 = _interopRequireDefault(_modelsURIQueryAndFragmentModelJs);\n\nvar _modelsManifestModelJs = _dereq_('./models/ManifestModel.js');\n\nvar _modelsManifestModelJs2 = _interopRequireDefault(_modelsManifestModelJs);\n\nvar _modelsMediaPlayerModelJs = _dereq_('./models/MediaPlayerModel.js');\n\nvar _modelsMediaPlayerModelJs2 = _interopRequireDefault(_modelsMediaPlayerModelJs);\n\nvar _modelsMetricsModelJs = _dereq_('./models/MetricsModel.js');\n\nvar _modelsMetricsModelJs2 = _interopRequireDefault(_modelsMetricsModelJs);\n\nvar _controllersAbrControllerJs = _dereq_('./controllers/AbrController.js');\n\nvar _controllersAbrControllerJs2 = _interopRequireDefault(_controllersAbrControllerJs);\n\nvar _controllersTimeSyncControllerJs = _dereq_('./controllers/TimeSyncController.js');\n\nvar _controllersTimeSyncControllerJs2 = _interopRequireDefault(_controllersTimeSyncControllerJs);\n\nvar _rulesAbrABRRulesCollectionJs = _dereq_('./rules/abr/ABRRulesCollection.js');\n\nvar _rulesAbrABRRulesCollectionJs2 = _interopRequireDefault(_rulesAbrABRRulesCollectionJs);\n\nvar _modelsVideoModelJs = _dereq_('./models/VideoModel.js');\n\nvar _modelsVideoModelJs2 = _interopRequireDefault(_modelsVideoModelJs);\n\nvar _rulesRulesControllerJs = _dereq_('./rules/RulesController.js');\n\nvar _rulesRulesControllerJs2 = _interopRequireDefault(_rulesRulesControllerJs);\n\nvar _rulesSynchronizationSynchronizationRulesCollectionJs = _dereq_('./rules/synchronization/SynchronizationRulesCollection.js');\n\nvar _rulesSynchronizationSynchronizationRulesCollectionJs2 = _interopRequireDefault(_rulesSynchronizationSynchronizationRulesCollectionJs);\n\nvar _controllersMediaSourceControllerJs = _dereq_('./controllers/MediaSourceController.js');\n\nvar _controllersMediaSourceControllerJs2 = _interopRequireDefault(_controllersMediaSourceControllerJs);\n\nvar _controllersBaseURLControllerJs = _dereq_('./controllers/BaseURLController.js');\n\nvar _controllersBaseURLControllerJs2 = _interopRequireDefault(_controllersBaseURLControllerJs);\n\nvar _coreDebugJs = _dereq_('./../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nvar _coreEventBusJs = _dereq_('./../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('./../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _MediaPlayerEventsJs = _dereq_('./MediaPlayerEvents.js');\n\nvar _MediaPlayerEventsJs2 = _interopRequireDefault(_MediaPlayerEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\n//Dash\n\nvar _dashDashAdapterJs = _dereq_('../dash/DashAdapter.js');\n\nvar _dashDashAdapterJs2 = _interopRequireDefault(_dashDashAdapterJs);\n\nvar _dashDashParserJs = _dereq_('../dash/DashParser.js');\n\nvar _dashDashParserJs2 = _interopRequireDefault(_dashDashParserJs);\n\nvar _dashModelsDashManifestModelJs = _dereq_('../dash/models/DashManifestModel.js');\n\nvar _dashModelsDashManifestModelJs2 = _interopRequireDefault(_dashModelsDashManifestModelJs);\n\nvar _dashDashMetricsJs = _dereq_('../dash/DashMetrics.js');\n\nvar _dashDashMetricsJs2 = _interopRequireDefault(_dashDashMetricsJs);\n\nvar _dashUtilsTimelineConverterJs = _dereq_('../dash/utils/TimelineConverter.js');\n\nvar _dashUtilsTimelineConverterJs2 = _interopRequireDefault(_dashUtilsTimelineConverterJs);\n\n/**\n * @Module MediaPlayer\n * @description The MediaPlayer is the primary dash.js Module and a Facade to build your player around.\n * It will allow you access to all the important dash.js properties/methods via the public API and all the\n * events to build a robust DASH media player.\n */\nfunction MediaPlayer() {\n\n var VERSION = '2.1.0-1';\n var PLAYBACK_NOT_INITIALIZED_ERROR = 'You must first call play() to init playback before calling this method';\n var ELEMENT_NOT_ATTACHED_ERROR = 'You must first call attachView() to set the video element before calling this method';\n var SOURCE_NOT_ATTACHED_ERROR = 'You must first call attachSource() with a valid source before calling this method';\n var MEDIA_PLAYER_NOT_INITIALIZED_ERROR = 'MediaPlayer not initialized!';\n\n var context = this.context;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n var debug = (0, _coreDebugJs2['default'])(context).getInstance();\n var log = debug.log;\n\n var instance = undefined,\n source = undefined,\n protectionData = undefined,\n mediaPlayerInitialized = undefined,\n playbackInitialized = undefined,\n autoPlay = undefined,\n abrController = undefined,\n mediaController = undefined,\n protectionController = undefined,\n metricsReportingController = undefined,\n adapter = undefined,\n metricsModel = undefined,\n mediaPlayerModel = undefined,\n errHandler = undefined,\n capabilities = undefined,\n streamController = undefined,\n rulesController = undefined,\n playbackController = undefined,\n dashMetrics = undefined,\n dashManifestModel = undefined,\n manifestModel = undefined,\n videoModel = undefined,\n textSourceBuffer = undefined;\n\n function setup() {\n mediaPlayerInitialized = false;\n playbackInitialized = false;\n autoPlay = true;\n protectionController = null;\n protectionData = null;\n adapter = null;\n _coreEventsEventsJs2['default'].extend(_MediaPlayerEventsJs2['default']);\n mediaPlayerModel = (0, _modelsMediaPlayerModelJs2['default'])(context).getInstance();\n if (window.hola_cdn && window.hola_cdn.api && window.hola_cdn.api.dashjs_message) window.hola_cdn.api.dashjs_message(instance);\n }\n\n /**\n * Upon creating the MediaPlayer you must call initialize before you call anything else.\n * There is one exception to this rule. It is crucial to call {@link module:MediaPlayer#extend extend()}\n * with all your extensions prior to calling initialize.\n *\n * ALL arguments are optional and there are individual methods to set each argument later on.\n * The args in this method are just for convenience and should only be used for a simple player setup.\n *\n * @param {HTML5MediaElement} view - Optional arg to set the video element. {@link module:MediaPlayer#attachView attachView()}\n * @param {string} source - Optional arg to set the media source. {@link module:MediaPlayer#attachSource attachSource()}\n * @param {boolean} AutoPlay - Optional arg to set auto play. {@link module:MediaPlayer#setAutoPlay setAutoPlay()}\n * @see {@link module:MediaPlayer#attachView attachView()}\n * @see {@link module:MediaPlayer#attachSource attachSource()}\n * @see {@link module:MediaPlayer#setAutoPlay setAutoPlay()}\n * @memberof module:MediaPlayer\n * @instance\n */\n function initialize(view, source, AutoPlay) {\n\n capabilities = (0, _utilsCapabilitiesJs2['default'])(context).getInstance();\n errHandler = (0, _utilsErrorHandlerJs2['default'])(context).getInstance();\n\n if (!capabilities.supportsMediaSource()) {\n errHandler.capabilityError('mediasource');\n return;\n }\n\n if (mediaPlayerInitialized) return;\n mediaPlayerInitialized = true;\n\n abrController = (0, _controllersAbrControllerJs2['default'])(context).getInstance();\n\n playbackController = (0, _controllersPlaybackControllerJs2['default'])(context).getInstance();\n mediaController = (0, _controllersMediaControllerJs2['default'])(context).getInstance();\n mediaController.initialize();\n manifestModel = (0, _modelsManifestModelJs2['default'])(context).getInstance();\n dashManifestModel = (0, _dashModelsDashManifestModelJs2['default'])(context).getInstance();\n dashMetrics = (0, _dashDashMetricsJs2['default'])(context).getInstance();\n metricsModel = (0, _modelsMetricsModelJs2['default'])(context).getInstance();\n metricsModel.setConfig({ adapter: createAdaptor() });\n\n restoreDefaultUTCTimingSources();\n setAutoPlay(AutoPlay !== undefined ? AutoPlay : true);\n\n if (view) {\n attachView(view);\n }\n\n if (source) {\n attachSource(source);\n }\n\n log('[dash.js ' + VERSION + '] ' + 'MediaPlayer has been initialized');\n }\n\n /**\n * The ready state of the MediaPlayer based on both the video element and MPD source being defined.\n *\n * @returns {boolean} The current ready state of the MediaPlayer\n * @see {@link module:MediaPlayer#attachView attachView()}\n * @see {@link module:MediaPlayer#attachSource attachSource()}\n * @memberof module:MediaPlayer\n * @instance\n */\n function isReady() {\n return !!videoModel && !!source;\n }\n\n /**\n * The play method initiates playback of the media defined by the {@link module:MediaPlayer#attachSource attachSource()} method.\n * This method will call play on the native Video Element.\n *\n * @see {@link module:MediaPlayer#attachSource attachSource()}\n * @memberof module:MediaPlayer\n * @instance\n */\n function play() {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR;\n }\n if (!autoPlay || isPaused() && playbackInitialized) {\n playbackController.play();\n }\n }\n\n /**\n * This method will call pause on the native Video Element.\n *\n * @memberof module:MediaPlayer\n * @instance\n */\n function pause() {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR;\n }\n playbackController.pause();\n }\n\n /**\n * Returns a Boolean that indicates whether the Video Element is paused.\n * @return {boolean}\n * @memberof module:MediaPlayer\n * @instance\n */\n function isPaused() {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR;\n }\n return playbackController.isPaused();\n }\n\n /**\n * Returns a Boolean that indicates whether the media is in the process of seeking to a new position.\n * @return {boolean}\n * @memberof module:MediaPlayer\n * @instance\n */\n function isSeeking() {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR;\n }\n return playbackController.isSeeking();\n }\n\n /**\n * Use this method to set the native Video Element's muted state. Takes a Boolean that determines whether audio is muted. true if the audio is muted and false otherwise.\n * @param {boolean} value\n * @memberof module:MediaPlayer\n * @instance\n */\n function setMute(value) {\n if (!videoModel) {\n throw ELEMENT_NOT_ATTACHED_ERROR;\n }\n getVideoElement().muted = value;\n }\n\n /**\n * A Boolean that determines whether audio is muted.\n * @returns {boolean}\n * @memberof module:MediaPlayer\n * @instance\n */\n function isMuted() {\n if (!videoModel) {\n throw ELEMENT_NOT_ATTACHED_ERROR;\n }\n return getVideoElement().muted;\n }\n\n /**\n * A double indicating the audio volume, from 0.0 (silent) to 1.0 (loudest).\n * @param {number} value\n * @memberof module:MediaPlayer\n * @instance\n */\n function setVolume(value) {\n if (!videoModel) {\n throw ELEMENT_NOT_ATTACHED_ERROR;\n }\n getVideoElement().volume = value;\n }\n\n /**\n * Returns the current audio volume, from 0.0 (silent) to 1.0 (loudest).\n * @returns {number}\n * @memberof module:MediaPlayer\n * @instance\n */\n function getVolume() {\n if (!videoModel) {\n throw ELEMENT_NOT_ATTACHED_ERROR;\n }\n return getVideoElement().volume;\n }\n\n /**\n * The length of the buffer for a given media type, in seconds. Valid media types are \"video\", \"audio\" and \"fragmentedText\". If no type\n * is passed in, then the minimum of the video and the audio buffer length is returned. The value is returned to a precision of two decimal places.\n * NaN is returned if an invalid type is requested, or if the presentation does not contain that type or if no arguments are passed and the\n * presentation doers not include any audio or video adaption sets.\n *\n * @returns {number} The length of the buffer for the given media type, in seconds.\n * @memberof module:MediaPlayer\n * @instance\n */\n function getBufferLength(type) {\n\n if (!type) {\n var videoBuffer = getTracksFor('video').length > 0 ? getDashMetrics().getCurrentBufferLevel(getMetricsFor('video')) : Number.MAX_SAFE_INTEGER;\n var audioBuffer = getTracksFor('audio').length > 0 ? getDashMetrics().getCurrentBufferLevel(getMetricsFor('audio')) : Number.MAX_SAFE_INTEGER;\n var textBuffer = getTracksFor('fragmentedText').length > 0 ? getDashMetrics().getCurrentBufferLevel(getMetricsFor('fragmentedText')) : Number.MAX_SAFE_INTEGER;\n return Math.min(videoBuffer, audioBuffer, textBuffer).toPrecision(3);\n } else {\n if (type === 'video' || type === 'audio' || type === 'fragmentedText') {\n var buffer = getDashMetrics().getCurrentBufferLevel(getMetricsFor(type));\n return buffer ? buffer.toPrecision(3) : NaN;\n } else {\n log('Warning - getBufferLength requested for invalid type');\n return NaN;\n }\n }\n }\n\n /**\n * The timeShiftBufferLength (DVR Window), in seconds.\n *\n * @returns {number} The window of allowable play time behind the live point of a live stream.\n * @memberof module:MediaPlayer\n * @instance\n */\n function getDVRWindowSize() {\n var metric = getDVRInfoMetric();\n if (!metric) {\n return 0;\n }\n return metric.manifestInfo.DVRWindowSize;\n }\n\n /**\n * This method should only be used with a live stream that has a valid timeShiftBufferLength (DVR Window).\n * NOTE - If you do not need the raw offset value (i.e. media analytics, tracking, etc) consider using the {@link module:MediaPlayer#seek seek()} method\n * which will calculate this value for you and set the video element's currentTime property all in one simple call.\n *\n * @param value {number} A relative time, in seconds, based on the return value of the {@link module:MediaPlayer#duration duration()} method is expected.\n * @returns {number} A value that is relative the available range within the timeShiftBufferLength (DVR Window).\n * @see {@link module:MediaPlayer#seek seek()}\n * @memberof module:MediaPlayer\n * @instance\n */\n function getDVRSeekOffset(value) {\n var metric = getDVRInfoMetric();\n\n if (!metric) {\n return 0;\n }\n\n var val = metric.range.start + value;\n\n if (val > metric.range.end) {\n val = metric.range.end;\n }\n\n return val;\n }\n\n /**\n * Sets the currentTime property of the attached video element. If it is a live stream with a\n * timeShiftBufferLength, then the DVR window offset will be automatically calculated.\n *\n * @param value {number} A relative time, in seconds, based on the return value of the {@link module:MediaPlayer#duration duration()} method is expected\n * @see {@link module:MediaPlayer#getDVRSeekOffset getDVRSeekOffset()}\n * @memberof module:MediaPlayer\n * @instance\n */\n function seek(value) {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR;\n }\n var s = playbackController.getIsDynamic() ? getDVRSeekOffset(value) : value;\n playbackController.seek(s);\n }\n\n /**\n * Current time of the playhead, in seconds.\n *\n * If called with no arguments then the returned time value is time elapsed since the start point of the first stream.\n * However if a stream ID is supplied then time is relative to the start of that stream, or is null if there is no such stream id in the manifest.\n *\n * @param streamId The ID of a stream that the returned playhead time must be relative to the start of. If undefined, then playhead time is relative to the first stream.\n * @returns {number} The current playhead time of the media, or null.\n * @memberof module:MediaPlayer\n * @instance\n */\n function time(streamId) {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR;\n }\n var t = getVideoElement().currentTime;\n\n if (streamId !== undefined) {\n t = streamController.getTimeRelativeToStreamId(t, streamId);\n }\n\n if (playbackController.getIsDynamic()) {\n var metric = getDVRInfoMetric();\n t = metric === null ? 0 : duration() - (metric.range.end - metric.time);\n }\n return t;\n }\n\n /**\n * Duration of the media's playback, in seconds.\n *\n * @returns {number} The current duration of the media.\n * @memberof module:MediaPlayer\n * @instance\n */\n function duration() {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR;\n }\n var d = getVideoElement().duration;\n\n if (playbackController.getIsDynamic()) {\n\n var metric = getDVRInfoMetric();\n var range;\n\n if (!metric) {\n return 0;\n }\n\n range = metric.range.end - metric.range.start;\n d = range < metric.manifestInfo.DVRWindowSize ? range : metric.manifestInfo.DVRWindowSize;\n }\n return d;\n }\n\n /**\n * Use this method to get the current playhead time as an absolute value, the time in seconds since midnight UTC, Jan 1 1970.\n * Note - this property only has meaning for live streams. If called before play() has begun, it will return a value of NaN.\n *\n * @returns {number} The current playhead time as UTC timestamp.\n * @memberof module:MediaPlayer\n * @instance\n */\n function timeAsUTC() {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR;\n }\n if (time() < 0) {\n return NaN;\n }\n return getAsUTC(time());\n }\n\n /**\n * Use this method to get the current duration as an absolute value, the time in seconds since midnight UTC, Jan 1 1970.\n * Note - this property only has meaning for live streams.\n *\n * @returns {number} The current duration as UTC timestamp.\n * @memberof module:MediaPlayer\n * @instance\n */\n function durationAsUTC() {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR;\n }\n return getAsUTC(duration());\n }\n\n /**\n * A utility methods which converts UTC timestamp value into a valid time and date string.\n *\n * @param {number} time - UTC timestamp to be converted into date and time.\n * @param {string} locales - a region identifier (i.e. en_US).\n * @param {boolean} hour12 - 12 vs 24 hour. Set to true for 12 hour time formatting.\n * @returns {string} A formatted time and date string.\n * @memberof module:MediaPlayer\n * @instance\n */\n function formatUTC(time, locales, hour12) {\n var dt = new Date(time * 1000);\n var d = dt.toLocaleDateString(locales);\n var t = dt.toLocaleTimeString(locales, { hour12: hour12 });\n return t + ' ' + d;\n }\n\n /**\n * A utility method which converts seconds into TimeCode (i.e. 300 --> 05:00).\n *\n * @param value {number} A number in seconds to be converted into a formatted time code.\n * @returns {string} A formatted time code string.\n * @memberof module:MediaPlayer\n * @instance\n */\n function convertToTimeCode(value) {\n value = Math.max(value, 0);\n\n var h = Math.floor(value / 3600);\n var m = Math.floor(value % 3600 / 60);\n var s = Math.floor(value % 3600 % 60);\n return (h === 0 ? '' : h < 10 ? '0' + h.toString() + ':' : h.toString() + ':') + (m < 10 ? '0' + m.toString() : m.toString()) + ':' + (s < 10 ? '0' + s.toString() : s.toString());\n }\n\n /**\n * This method should be used to extend or replace internal dash.js objects.\n * There are two ways to extend dash.js (determined by the override argument):\n *
    \n *
  1. If you set override to true any public method or property in your custom object will\n * override the dash.js parent object's property(ies) and will be used instead but the\n * dashj.s parent module will still be created.
  2. \n *\n *
  3. If you set override to false your object will completely replace the dash.js object.\n * (Note: This is how it was in 1.x of Dash.js with Dijon).
  4. \n *
\n * When you extend you get access to this.context, this.factory and this.parent to operate with in your custom object.\n *
    \n *
  • this.context - can be used to pass context for singleton access.
  • \n *
  • this.factory - can be used to call factory.getSingletonInstance().
  • \n *
  • this.parent - is the reference of the parent object to call other public methods. (this.parent is excluded if you extend with override set to false or option 2)
  • \n *
\n * You must call extend before you call initialize\n * @see {@link module:MediaPlayer#initialize initialize()}\n * @memberof module:MediaPlayer\n * @instance\n */\n function extend(parentNameString, childInstance, override) {\n _coreFactoryMakerJs2['default'].extend(parentNameString, childInstance, override, context);\n }\n\n /**\n * Use the on method to listen for public events found in MediaPlayer.events. {@link MediaPlayerEvents}\n *\n * @param {String} type - {@link MediaPlayerEvents}\n * @param {Function} listener - callback method when the event fires.\n * @param {Object} scope - context of the listener so it can be removed properly.\n * @memberof module:MediaPlayer\n * @instance\n */\n function on(type, listener, scope) {\n eventBus.on(type, listener, scope);\n }\n\n /**\n * Use the off method to remove listeners for public events found in MediaPlayer.events. {@link MediaPlayerEvents}\n *\n * @param {String} type - {@link MediaPlayerEvents}\n * @param {Function} listener - callback method when the event fires.\n * @param {Object} scope - context of the listener so it can be removed properly.\n * @memberof module:MediaPlayer\n * @instance\n */\n function off(type, listener, scope) {\n eventBus.off(type, listener, scope);\n }\n\n /**\n * Current version of Dash.js\n * @returns {string} the current dash.js version string.\n * @memberof module:MediaPlayer\n * @instance\n */\n function getVersion() {\n return VERSION;\n }\n\n /**\n * Use this method to access the dash.js logging class.\n *\n * @returns {@link module:Debug}\n * @memberof module:MediaPlayer\n * @instance\n */\n function getDebug() {\n return debug;\n }\n\n /**\n * @deprecated Since version 2.1.0. Instead use:\n *
    \n *
  • {@link module:MediaPlayer#getVideoElement getVideoElement()}
  • \n *
  • {@link module:MediaPlayer#getSource getSource()}
  • \n *
  • {@link module:MediaPlayer#getVideoContainer getVideoContainer()}
  • \n *
  • {@link module:MediaPlayer#getTTMLRenderingDiv getTTMLRenderingDiv()}
  • \n *
\n *\n * @returns {@link VideoModel}\n * @memberof module:MediaPlayer\n * @instance\n */\n function getVideoModel() {\n if (!videoModel) {\n throw ELEMENT_NOT_ATTACHED_ERROR;\n }\n return videoModel;\n }\n\n /**\n *

Changing this value will lower or increase live stream latency. The detected segment duration will be multiplied by this value\n * to define a time in seconds to delay a live stream from the live edge.

\n *

Lowering this value will lower latency but may decrease the player's ability to build a stable buffer.

\n *\n * @param value {int} Represents how many segment durations to delay the live stream.\n * @default 4\n * @memberof module:MediaPlayer\n * @see {@link module:MediaPlayer#useSuggestedPresentationDelay useSuggestedPresentationDelay()}\n * @instance\n */\n function setLiveDelayFragmentCount(value) {\n mediaPlayerModel.setLiveDelayFragmentCount(value);\n }\n\n /**\n *

Equivalent in seconds of setLiveDelayFragmentCount

\n *

Lowering this value will lower latency but may decrease the player's ability to build a stable buffer.

\n *

This value should be less than the manifest duration by a couple of segment durations to avoid playback issues

\n *

If set, this parameter will take precedence over setLiveDelayFragmentCount and manifest info

\n *\n * @param value {int} Represents how many seconds to delay the live stream.\n * @default undefined\n * @memberof module:MediaPlayer\n * @see {@link module:MediaPlayer#useSuggestedPresentationDelay useSuggestedPresentationDelay()}\n * @instance\n */\n function setLiveDelay(value) {\n mediaPlayerModel.setLiveDelay(value);\n }\n\n /**\n *

Set to true if you would like to override the default live delay and honor the SuggestedPresentationDelay attribute in by the manifest.

\n * @param value {boolean}\n * @default false\n * @memberof module:MediaPlayer\n * @see {@link module:MediaPlayer#setLiveDelayFragmentCount setLiveDelayFragmentCount()}\n * @instance\n */\n function useSuggestedPresentationDelay(value) {\n mediaPlayerModel.setUseSuggestedPresentationDelay(value);\n }\n\n /**\n * Set to false if you would like to disable the last known bit rate from being stored during playback and used\n * to set the initial bit rate for subsequent playback within the expiration window.\n *\n * The default expiration is one hour, defined in milliseconds. If expired, the default initial bit rate (closest to 1000 kbps) will be used\n * for that session and a new bit rate will be stored during that session.\n *\n * @param enable - Boolean - Will toggle if feature is enabled. True to enable, False to disable.\n * @param ttl Number - (Optional) A value defined in milliseconds representing how long to cache the bit rate for. Time to live.\n * @default enable = True, ttl = 360000 (1 hour)\n * @memberof module:MediaPlayer\n * @instance\n *\n */\n function enableLastBitrateCaching(enable, ttl) {\n mediaPlayerModel.setLastBitrateCachingInfo(enable, ttl);\n }\n\n /**\n * Set to false if you would like to disable the last known lang for audio (or camera angle for video) from being stored during playback and used\n * to set the initial settings for subsequent playback within the expiration window.\n *\n * The default expiration is one hour, defined in milliseconds. If expired, the default settings will be used\n * for that session and a new settings will be stored during that session.\n *\n * @param enable - Boolean - Will toggle if feature is enabled. True to enable, False to disable.\n * @param ttl Number - (Optional) A value defined in milliseconds representing how long to cache the settings for. Time to live.\n * @default enable = True, ttl = 360000 (1 hour)\n * @memberof module:MediaPlayer\n * @instance\n *\n */\n function enableLastMediaSettingsCaching(enable, ttl) {\n mediaPlayerModel.setLastMediaSettingsCachingInfo(enable, ttl);\n }\n\n /**\n * When switching multi-bitrate content (auto or manual mode) this property specifies the maximum bitrate allowed.\n * If you set this property to a value lower than that currently playing, the switching engine will switch down to\n * satisfy this requirement. If you set it to a value that is lower than the lowest bitrate, it will still play\n * that lowest bitrate.\n *\n * You can set or remove this bitrate cap at anytime before or during playback. To clear this setting you must use the API\n * and set the value param to NaN.\n *\n * This feature is typically used to reserve higher bitrates for playback only when the player is in large or full-screen format.\n *\n * @param type {String} 'video' or 'audio' are the type options.\n * @param value {int} Value in kbps representing the maximum bitrate allowed.\n * @memberof module:MediaPlayer\n * @instance\n */\n function setMaxAllowedBitrateFor(type, value) {\n abrController.setMaxAllowedBitrateFor(type, value);\n }\n\n /**\n * @param type {string} 'video' or 'audio' are the type options.\n * @memberof module:MediaPlayer\n * @see {@link module:MediaPlayer#setMaxAllowedBitrateFor setMaxAllowedBitrateFor()}\n * @instance\n */\n function getMaxAllowedBitrateFor(type) {\n return abrController.getMaxAllowedBitrateFor(type);\n }\n\n /**\n * When switching multi-bitrate content (auto or manual mode) this property specifies the maximum representation allowed,\n * as a proportion of the size of the representation set.\n *\n * You can set or remove this cap at anytime before or during playback. To clear this setting you must use the API\n * and set the value param to NaN.\n *\n * If both this and maxAllowedBitrate are defined, maxAllowedBitrate is evaluated first, then maxAllowedRepresentation,\n * i.e. the lowest value from executing these rules is used.\n *\n * This feature is typically used to reserve higher representations for playback only when connected over a fast connection.\n *\n * @param type String 'video' or 'audio' are the type options.\n * @param value number between 0 and 1, where 1 is allow all representations, and 0 is allow only the lowest.\n * @memberof module:MediaPlayer\n * @instance\n */\n function setMaxAllowedRepresentationRatioFor(type, value) {\n abrController.setMaxAllowedRepresentationRatioFor(type, value);\n }\n\n /**\n * @param type String 'video' or 'audio' are the type options.\n * @returns {number} The current representation ratio cap.\n * @memberof module:MediaPlayer\n * @see {@link MediaPlayer#setMaxAllowedRepresentationRatioFor setMaxAllowedRepresentationRatioFor()}\n * @instance\n */\n function getMaxAllowedRepresentationRatioFor(type) {\n return abrController.getMaxAllowedRepresentationRatioFor(type);\n }\n\n /**\n *

Set to false to prevent stream from auto-playing when the view is attached.

\n *\n * @param value {boolean}\n * @default true\n * @memberof module:MediaPlayer\n * @see {@link module:MediaPlayer#attachView attachView()}\n * @instance\n *\n */\n function setAutoPlay(value) {\n autoPlay = value;\n }\n\n /**\n * @returns {boolean} The current autoPlay state.\n * @memberof module:MediaPlayer\n * @instance\n */\n function getAutoPlay() {\n return autoPlay;\n }\n\n /**\n * Set to true if you would like dash.js to keep downloading fragments in the background\n * when the video element is paused.\n *\n * @default false\n * @param value\n * @memberof module:MediaPlayer\n * @instance\n */\n function setScheduleWhilePaused(value) {\n mediaPlayerModel.setScheduleWhilePaused(value);\n }\n\n /**\n * Returns a boolean of the current state of ScheduleWhilePaused.\n * @returns {boolean}\n * @see {@link module:MediaPlayer#setScheduleWhilePaused setScheduleWhilePaused()}\n * @memberof module:MediaPlayer\n * @instance\n */\n function getScheduleWhilePaused() {\n return mediaPlayerModel.getScheduleWhilePaused();\n }\n\n /**\n * Returns the DashMetrics.js Module. You use this Module to get access to all the public metrics\n * stored in dash.js\n *\n * @see {@link module:DashMetrics}\n * @returns {object}\n * @memberof module:MediaPlayer\n * @instance\n */\n function getDashMetrics() {\n return dashMetrics;\n }\n\n /**\n *\n * @param type\n * @returns {object}\n * @memberof module:MediaPlayer\n * @instance\n */\n function getMetricsFor(type) {\n return metricsModel.getReadOnlyMetricsFor(type);\n }\n\n /**\n * @param type\n * @returns {object}\n * @memberof module:MediaPlayer\n * @instance\n */\n function getQualityFor(type) {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR;\n }\n return abrController.getQualityFor(type, streamController.getActiveStreamInfo());\n }\n\n /**\n * Sets the current quality for media type instead of letting the ABR Heuristics automatically selecting it..\n *\n * @param type\n * @param value\n * @memberof module:MediaPlayer\n * @instance\n */\n function setQualityFor(type, value) {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR;\n }\n abrController.setPlaybackQuality(type, streamController.getActiveStreamInfo(), value);\n }\n\n /**\n * @memberof module:MediaPlayer\n * @instance\n */\n function getLimitBitrateByPortal() {\n return abrController.getLimitBitrateByPortal();\n }\n\n /**\n * Sets whether to limit the representation used based on the size of the playback area\n *\n * @param value\n * @memberof module:MediaPlayer\n * @instance\n */\n function setLimitBitrateByPortal(value) {\n abrController.setLimitBitrateByPortal(value);\n }\n\n /**\n * Use this method to change the current text track for both external time text files and fragmented text tracks. There is no need to\n * set the track mode on the video object to switch a track when using this method.\n *\n * @param idx - Index of track based on the order of the order the tracks are added Use -1 to disable all tracks. (turn captions off). Use module:MediaPlayer#dashjs.MediaPlayer.events.TEXT_TRACK_ADDED.\n * @see {@link module:MediaPlayer#dashjs.MediaPlayer.events.TEXT_TRACK_ADDED}\n * @memberof module:MediaPlayer\n * @instance\n */\n function setTextTrack(idx) {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR;\n }\n //For external time text file, the only action needed to change a track is marking the track mode to showing.\n // Fragmented text tracks need the additional step of calling textSourceBuffer.setTextTrack();\n if (textSourceBuffer === undefined) {\n textSourceBuffer = (0, _TextSourceBufferJs2['default'])(context).getInstance();\n }\n\n var tracks = getVideoElement().textTracks;\n var ln = tracks.length;\n\n for (var i = 0; i < ln; i++) {\n var track = tracks[i];\n var mode = idx === i ? 'showing' : 'hidden';\n\n if (track.mode !== mode) {\n //checking that mode is not already set by 3rd Party player frameworks that set mode to prevent event retrigger.\n track.mode = mode;\n }\n }\n\n textSourceBuffer.setTextTrack();\n }\n\n /**\n * @param type\n * @returns {Array}\n * @memberof module:MediaPlayer\n * @instance\n */\n function getBitrateInfoListFor(type) {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR;\n }\n var stream = getActiveStream();\n return stream ? stream.getBitrateListFor(type) : [];\n }\n\n /**\n * Use this method to explicitly set the starting bitrate for audio | video\n *\n * @param type\n * @param {number} value A value of the initial bitrate, kbps\n * @memberof module:MediaPlayer\n * @instance\n */\n function setInitialBitrateFor(type, value) {\n abrController.setInitialBitrateFor(type, value);\n }\n\n /**\n * @param type\n * @returns {number} A value of the initial bitrate, kbps\n * @memberof module:MediaPlayer\n * @instance\n */\n function getInitialBitrateFor(type) {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR; //abrController.getInitialBitrateFor is overloaded with ratioDict logic that needs manifest force it to not be callable pre play.\n }\n return abrController.getInitialBitrateFor(type);\n }\n\n /**\n * @param type\n * @param {number} value A value of the initial Representation Ratio\n * @memberof module:MediaPlayer\n * @instance\n */\n function setInitialRepresentationRatioFor(type, value) {\n abrController.setInitialRepresentationRatioFor(type, value);\n }\n\n /**\n * @param type\n * @returns {number} A value of the initial Representation Ratio\n * @memberof module:MediaPlayer\n * @instance\n */\n function getInitialRepresentationRatioFor(type) {\n return abrController.getInitialRepresentationRatioFor(type);\n }\n\n /**\n * This method returns the list of all available streams from a given manifest\n * @param manifest\n * @returns {Array} list of {@link StreamInfo}\n * @memberof module:MediaPlayer\n * @instance\n */\n function getStreamsFromManifest(manifest) {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR;\n }\n return adapter.getStreamsInfo(manifest);\n }\n\n /**\n * This method returns the list of all available tracks for a given media type\n * @param type\n * @returns {Array} list of {@link MediaInfo}\n * @memberof module:MediaPlayer\n * @instance\n */\n function getTracksFor(type) {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR;\n }\n var streamInfo = streamController.getActiveStreamInfo();\n if (!streamInfo) return [];\n return mediaController.getTracksFor(type, streamInfo);\n }\n\n /**\n * This method returns the list of all available tracks for a given media type and streamInfo from a given manifest\n * @param type\n * @param manifest\n * @param streamInfo\n * @returns {Array} list of {@link MediaInfo}\n * @memberof module:MediaPlayer\n * @instance\n */\n function getTracksForTypeFromManifest(type, manifest, streamInfo) {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR;\n }\n\n streamInfo = streamInfo || adapter.getStreamsInfo(manifest)[0];\n\n return streamInfo ? adapter.getAllMediaInfoForType(manifest, streamInfo, type) : [];\n }\n\n /**\n * @param type\n * @returns {Object} {@link MediaInfo}\n * @memberof module:MediaPlayer\n * @instance\n */\n function getCurrentTrackFor(type) {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR;\n }\n var streamInfo = streamController.getActiveStreamInfo();\n\n if (!streamInfo) return null;\n\n return mediaController.getCurrentTrackFor(type, streamInfo);\n }\n\n /**\n * This method allows to set media settings that will be used to pick the initial track. Format of the settings\n * is following:\n * {lang: langValue,\n * viewpoint: viewpointValue,\n * audioChannelConfiguration: audioChannelConfigurationValue,\n * accessibility: accessibilityValue,\n * role: roleValue}\n *\n *\n * @param type\n * @param value {Object}\n * @memberof module:MediaPlayer\n * @instance\n */\n function setInitialMediaSettingsFor(type, value) {\n mediaController.setInitialSettings(type, value);\n }\n\n /**\n * This method returns media settings that is used to pick the initial track. Format of the settings\n * is following:\n * {lang: langValue,\n * viewpoint: viewpointValue,\n * audioChannelConfiguration: audioChannelConfigurationValue,\n * accessibility: accessibilityValue,\n * role: roleValue}\n * @param type\n * @returns {Object}\n * @memberof module:MediaPlayer\n * @instance\n */\n function getInitialMediaSettingsFor(type) {\n return mediaController.getInitialSettings(type);\n }\n\n /**\n * @param track instance of {@link MediaInfo}\n * @memberof module:MediaPlayer\n * @instance\n */\n function setCurrentTrack(track) {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR;\n }\n mediaController.setTrack(track);\n }\n\n /**\n * This method returns the current track switch mode.\n *\n * @param type\n * @returns mode\n * @memberof module:MediaPlayer\n * @instance\n */\n function getTrackSwitchModeFor(type) {\n return mediaController.getSwitchMode(type);\n }\n\n /**\n * This method sets the current track switch mode. Available options are:\n *\n * MediaController.TRACK_SWITCH_MODE_NEVER_REPLACE\n * (used to forbid clearing the buffered data (prior to current playback position) after track switch. Default for video)\n *\n * MediaController.TRACK_SWITCH_MODE_ALWAYS_REPLACE\n * (used to clear the buffered data (prior to current playback position) after track switch. Default for audio)\n *\n * @param type\n * @param mode\n * @memberof module:MediaPlayer\n * @instance\n */\n function setTrackSwitchModeFor(type, mode) {\n mediaController.setSwitchMode(type, mode);\n }\n\n /**\n * This method sets the selection mode for the initial track. This mode defines how the initial track will be selected\n * if no initial media settings are set. If initial media settings are set this parameter will be ignored. Available options are:\n *\n * MediaPlayer.dependencies.MediaController.trackSelectionModes.HIGHEST_BITRATE\n * this mode makes the player select the track with a highest bitrate. This mode is a default mode.\n *\n * MediaPlayer.dependencies.MediaController.trackSelectionModes.WIDEST_RANGE\n * this mode makes the player select the track with a widest range of bitrates\n *\n * @param mode\n * @memberof module:MediaPlayer\n * @instance\n */\n function setSelectionModeForInitialTrack(mode) {\n mediaController.setSelectionModeForInitialTrack(mode);\n }\n\n /**\n * This method returns the track selection mode.\n *\n * @returns mode\n * @memberof module:MediaPlayer\n * @instance\n */\n function getSelectionModeForInitialTrack() {\n return mediaController.getSelectionModeForInitialTrack();\n }\n\n /**\n * @deprecated since version 2.0 Instead use {@link module:MediaPlayer#getAutoSwitchQualityFor getAutoSwitchQualityFor()}.\n * @returns {boolean} Current state of adaptive bitrate switching\n * @memberof module:MediaPlayer\n * @instance\n */\n function getAutoSwitchQuality() {\n return abrController.getAutoSwitchBitrateFor('video') || abrController.getAutoSwitchBitrateFor('audio');\n }\n\n /**\n * Set to false to switch off adaptive bitrate switching.\n *\n * @deprecated since version 2.0 Instead use {@link module:MediaPlayer#setAutoSwitchQualityFor setAutoSwitchQualityFor()}.\n * @param value {boolean}\n * @default {boolean} true\n * @memberof module:MediaPlayer\n * @instance\n */\n function setAutoSwitchQuality(value) {\n abrController.setAutoSwitchBitrateFor('video', value);\n abrController.setAutoSwitchBitrateFor('audio', value);\n }\n\n /**\n * @param type {string} 'audio' | 'video'\n * @returns {boolean} Current state of adaptive bitrate switching\n * @memberof module:MediaPlayer\n * @instance\n */\n function getAutoSwitchQualityFor(type) {\n return abrController.getAutoSwitchBitrateFor(type);\n }\n\n /**\n * Set to false to switch off adaptive bitrate switching.\n *\n * @param type {string} 'audio' | 'video'\n * @param value {boolean}\n * @default {boolean} true\n * @memberof module:MediaPlayer\n * @instance\n */\n function setAutoSwitchQualityFor(type, value) {\n abrController.setAutoSwitchBitrateFor(type, value);\n }\n\n /**\n * Enabling buffer-occupancy ABR will switch to the *experimental* implementation of BOLA,\n * replacing the throughput-based ABR rule set (ThroughputRule, BufferOccupancyRule,\n * InsufficientBufferRule and AbandonRequestsRule) with the buffer-occupancy-based\n * BOLA rule set (BolaRule, BolaAbandonRule).\n *\n * @see {@link http://arxiv.org/abs/1601.06748 BOLA WhitePaper.}\n * @see {@link https://github.com/Dash-Industry-Forum/dash.js/wiki/BOLA-status More details about the implementation status.}\n * @param value {boolean}\n * @default false\n * @memberof module:MediaPlayer\n * @instance\n */\n function enableBufferOccupancyABR(value) {\n mediaPlayerModel.setBufferOccupancyABREnabled(value);\n }\n\n /**\n * Allows application to retrieve a manifest. Manifest loading is asynchro\n * nous and\n * requires the app-provided callback function\n *\n * @param url {string} url the manifest url\n * @param callback {function} A Callback function provided when retrieving manifests\n * @memberof module:MediaPlayer\n * @instance\n */\n function retrieveManifest(url, callback) {\n var manifestLoader = createManifestLoader();\n var self = this;\n\n var handler = function handler(e) {\n if (!e.error) {\n callback(e.manifest);\n } else {\n callback(null, e.error);\n }\n eventBus.off(_coreEventsEventsJs2['default'].INTERNAL_MANIFEST_LOADED, handler, self);\n manifestLoader.reset();\n };\n\n eventBus.on(_coreEventsEventsJs2['default'].INTERNAL_MANIFEST_LOADED, handler, self);\n\n var uriQueryFragModel = (0, _modelsURIQueryAndFragmentModelJs2['default'])(context).getInstance();\n uriQueryFragModel.initialize();\n manifestLoader.load(uriQueryFragModel.parseURI(url));\n }\n\n /**\n *

Allows you to set a scheme and server source for UTC live edge detection for dynamic streams.\n * If UTCTiming is defined in the manifest, it will take precedence over any time source manually added.

\n *

If you have exposed the Date header, use the method {@link module:MediaPlayer#clearDefaultUTCTimingSources clearDefaultUTCTimingSources()}.\n * This will allow the date header on the manifest to be used instead of a time server

\n * @param {string} schemeIdUri -\n *
    \n *
  • urn:mpeg:dash:utc:http-head:2014
  • \n *
  • urn:mpeg:dash:utc:http-xsdate:2014
  • \n *
  • urn:mpeg:dash:utc:http-iso:2014
  • \n *
  • urn:mpeg:dash:utc:direct:2014
  • \n *
\n *

Some specs referencing early ISO23009-1 drafts incorrectly use\n * 2012 in the URI, rather than 2014. support these for now.

\n *
    \n *
  • urn:mpeg:dash:utc:http-head:2012
  • \n *
  • urn:mpeg:dash:utc:http-xsdate:2012
  • \n *
  • urn:mpeg:dash:utc:http-iso:2012
  • \n *
  • urn:mpeg:dash:utc:direct:2012
  • \n *
\n * @param {string} value - Path to a time source.\n * @default\n *
    \n *
  • schemeIdUri:urn:mpeg:dash:utc:http-xsdate:2014
  • \n *
  • value:http://time.akamai.com
  • \n *
\n * @memberof module:MediaPlayer\n * @see {@link module:MediaPlayer#removeUTCTimingSource removeUTCTimingSource()}\n * @instance\n */\n function addUTCTimingSource(schemeIdUri, value) {\n removeUTCTimingSource(schemeIdUri, value); //check if it already exists and remove if so.\n var vo = new _dashVoUTCTimingJs2['default']();\n vo.schemeIdUri = schemeIdUri;\n vo.value = value;\n mediaPlayerModel.getUTCTimingSources().push(vo);\n }\n\n /**\n *

Allows you to remove a UTC time source. Both schemeIdUri and value need to match the Dash.vo.UTCTiming properties in order for the\n * entry to be removed from the array

\n * @param {string} schemeIdUri - see {@link module:MediaPlayer#addUTCTimingSource addUTCTimingSource()}\n * @param {string} value - see {@link module:MediaPlayer#addUTCTimingSource addUTCTimingSource()}\n * @memberof module:MediaPlayer\n * @see {@link module:MediaPlayer#clearDefaultUTCTimingSources clearDefaultUTCTimingSources()}\n * @instance\n */\n function removeUTCTimingSource(schemeIdUri, value) {\n var UTCTimingSources = mediaPlayerModel.getUTCTimingSources();\n UTCTimingSources.forEach(function (obj, idx) {\n if (obj.schemeIdUri === schemeIdUri && obj.value === value) {\n UTCTimingSources.splice(idx, 1);\n }\n });\n }\n\n /**\n *

Allows you to clear the stored array of time sources.

\n *

Example use: If you have exposed the Date header, calling this method\n * will allow the date header on the manifest to be used instead of the time server.

\n *

Example use: Calling this method, assuming there is not an exposed date header on the manifest, will default back\n * to using a binary search to discover the live edge

\n *\n * @memberof module:MediaPlayer\n * @see {@link module:MediaPlayer#restoreDefaultUTCTimingSources restoreDefaultUTCTimingSources()}\n * @instance\n */\n function clearDefaultUTCTimingSources() {\n mediaPlayerModel.setUTCTimingSources([]);\n }\n\n /**\n *

Allows you to restore the default time sources after calling {@link module:MediaPlayer#clearDefaultUTCTimingSources clearDefaultUTCTimingSources()}

\n *\n * @default\n *
    \n *
  • schemeIdUri:urn:mpeg:dash:utc:http-xsdate:2014
  • \n *
  • value:http://time.akamai.com
  • \n *
\n *\n * @memberof module:MediaPlayer\n * @see {@link module:MediaPlayer#addUTCTimingSource addUTCTimingSource()}\n * @instance\n */\n function restoreDefaultUTCTimingSources() {\n addUTCTimingSource(_modelsMediaPlayerModelJs2['default'].DEFAULT_UTC_TIMING_SOURCE.scheme, _modelsMediaPlayerModelJs2['default'].DEFAULT_UTC_TIMING_SOURCE.value);\n }\n\n /**\n *

Allows you to enable the use of the Date Header, if exposed with CORS, as a timing source for live edge detection. The\n * use of the date header will happen only after the other timing source that take precedence fail or are omitted as described.\n * {@link module:MediaPlayer#clearDefaultUTCTimingSources clearDefaultUTCTimingSources()}

\n *\n * @default {boolean} True\n * @memberof module:MediaPlayer\n * @see {@link module:MediaPlayer#addUTCTimingSource addUTCTimingSource()}\n * @instance\n */\n function enableManifestDateHeaderTimeSource(value) {\n mediaPlayerModel.setUseManifestDateHeaderTimeSource(value);\n }\n\n /**\n * This value influences the buffer pruning logic.\n * Allows you to modify the buffer that is kept in source buffer in seconds.\n * 0|-----------bufferToPrune-----------|-----bufferToKeep-----|currentTime|\n *\n * @default 30 seconds\n * @param {int} value\n * @memberof module:MediaPlayer\n * @instance\n */\n function setBufferToKeep(value) {\n mediaPlayerModel.setBufferToKeep(value);\n }\n\n /**\n * This value influences the buffer pruning logic.\n * Allows you to modify the interval of pruning buffer in seconds.\n *\n * @default 30 seconds\n * @param {int} value\n * @memberof module:MediaPlayer\n * @instance\n */\n function setBufferPruningInterval(value) {\n mediaPlayerModel.setBufferPruningInterval(value);\n }\n\n /**\n * The time that the internal buffer target will be set to post startup/seeks (NOT top quality).\n *\n * When the time is set higher than the default you will have to wait longer\n * to see automatic bitrate switches but will have a larger buffer which\n * will increase stability.\n *\n * @default 12 seconds.\n * @param {int} value\n * @memberof module:MediaPlayer\n * @instance\n */\n function setStableBufferTime(value) {\n mediaPlayerModel.setStableBufferTime(value);\n }\n\n /**\n * The time that the internal buffer target will be set to once playing the top quality.\n * If there are multiple bitrates in your adaptation, and the media is playing at the highest\n * bitrate, then we try to build a larger buffer at the top quality to increase stability\n * and to maintain media quality.\n *\n * @default 30 seconds.\n * @param {int} value\n * @memberof module:MediaPlayer\n * @instance\n */\n function setBufferTimeAtTopQuality(value) {\n mediaPlayerModel.setBufferTimeAtTopQuality(value);\n }\n\n /**\n * The time that the internal buffer target will be set to once playing the top quality for long form content.\n *\n * @default 60 seconds.\n * @see {@link module:MediaPlayer#setLongFormContentDurationThreshold setLongFormContentDurationThreshold()}\n * @see {@link module:MediaPlayer#setBufferTimeAtTopQuality setBufferTimeAtTopQuality()}\n * @param {int} value\n * @memberof module:MediaPlayer\n * @instance\n */\n function setBufferTimeAtTopQualityLongForm(value) {\n mediaPlayerModel.setBufferTimeAtTopQualityLongForm(value);\n }\n\n /**\n * The threshold which defines if the media is considered long form content.\n * This will directly affect the buffer targets when playing back at the top quality.\n *\n * @see {@link module:MediaPlayer#setBufferTimeAtTopQualityLongForm setBufferTimeAtTopQualityLongForm()}\n * @default 600 seconds (10 minutes).\n * @param value\n * @memberof module:MediaPlayer\n * @instance\n */\n function setLongFormContentDurationThreshold(value) {\n mediaPlayerModel.setLongFormContentDurationThreshold(value);\n }\n\n /**\n * A threshold, in seconds, of when dashjs abr becomes less conservative since we have a\n * larger \"rich\" buffer.\n * The BufferOccupancyRule.js rule will override the ThroughputRule's decision when the\n * buffer level surpasses this value and while it remains greater than this value.\n *\n * @default 20 seconds\n * @param value\n * @memberof module:MediaPlayer\n * @instance\n */\n function setRichBufferThreshold(value) {\n mediaPlayerModel.setRichBufferThreshold(value);\n }\n\n /**\n * A percentage between 0.0 and 1 to reduce the measured throughput calculations.\n * The default is 0.9. The lower the value the more conservative and restricted the\n * measured throughput calculations will be. please use carefully. This will directly\n * affect the ABR logic in dash.js\n *\n * @param value\n * @memberof module:MediaPlayer\n * @instance\n */\n function setBandwidthSafetyFactor(value) {\n mediaPlayerModel.setBandwidthSafetyFactor(value);\n }\n\n /**\n * Returns the number of the current BandwidthSafetyFactor\n *\n * @return {number} value\n * @see {@link module:MediaPlayer#setBandwidthSafetyFactor setBandwidthSafetyFactor()}\n * @memberof module:MediaPlayer\n * @instance\n */\n function getBandwidthSafetyFactor() {\n return mediaPlayerModel.getBandwidthSafetyFactor();\n }\n\n /**\n * A timeout value in seconds, which during the ABRController will block switch-up events.\n * This will only take effect after an abandoned fragment event occurs.\n *\n * @default 10 seconds\n * @param {int} value\n * @memberof module:MediaPlayer\n * @instance\n */\n function setAbandonLoadTimeout(value) {\n mediaPlayerModel.setAbandonLoadTimeout(value);\n }\n\n /**\n * Total number of retry attempts that will occur on a fragment load before it fails.\n * Increase this value to a maximum in order to achieve an automatic playback resume\n * in case of completely lost internet connection.\n *\n * @default 3\n * @param {int} value\n * @memberof module:MediaPlayer\n * @instance\n */\n function setFragmentLoaderRetryAttempts(value) {\n mediaPlayerModel.setFragmentRetryAttempts(value);\n }\n\n /**\n * Time in milliseconds of which to reload a failed fragment load attempt.\n *\n * @default 1000 milliseconds\n * @param {int} value\n * @memberof module:MediaPlayer\n * @instance\n */\n function setFragmentLoaderRetryInterval(value) {\n mediaPlayerModel.setFragmentRetryInterval(value);\n }\n\n /**\n * Detects if Protection is included and returns an instance of ProtectionController.js\n * @memberof module:MediaPlayer\n * @instance\n */\n function getProtectionController() {\n return detectProtection();\n }\n\n /**\n * Will override dash.js protection controller.\n * @param {ProtectionController} [value] valid protection controller instance.\n * @memberof module:MediaPlayer\n * @instance\n */\n function attachProtectionController(value) {\n protectionController = value;\n }\n\n /**\n * @param {ProtectionData} [value] object containing\n * property names corresponding to key system name strings and associated\n * values being instances of.\n * @memberof module:MediaPlayer\n * @instance\n */\n function setProtectionData(value) {\n protectionData = value;\n }\n\n /**\n * This method serves to control captions z-index value. If 'true' is passed, the captions will have the highest z-index and be\n * displayed on top of other html elements. Default value is 'false' (z-index is not set).\n * @param value {Boolean}\n * @memberof module:MediaPlayer\n * @instance\n */\n function displayCaptionsOnTop(value) {\n var textTracks = (0, _TextTracksJs2['default'])(context).getInstance();\n textTracks.setConfig({ videoModel: videoModel });\n textTracks.initialize();\n textTracks.displayCConTop(value);\n }\n\n /**\n * Returns instance of Video Container that was attached by calling attachVideoContainer()\n * @returns {@link object}\n * @memberof module:MediaPlayer\n * @instance\n */\n function getVideoContainer() {\n return videoModel ? videoModel.getVideoContainer() : null;\n }\n\n /**\n * Use this method to attach an HTML5 element that wraps the video element.\n *\n * @param container The HTML5 element containing the video element.\n * @memberof module:MediaPlayer\n * @instance\n */\n function attachVideoContainer(container) {\n if (!videoModel) {\n throw ELEMENT_NOT_ATTACHED_ERROR;\n }\n videoModel.setVideoContainer(container);\n }\n\n /**\n * Returns instance of Video Element that was attached by calling attachView()\n * @returns {object}\n * @memberof module:MediaPlayer\n * @instance\n */\n function getVideoElement() {\n if (!videoModel) {\n throw ELEMENT_NOT_ATTACHED_ERROR;\n }\n return videoModel.getElement();\n }\n\n /**\n * Use this method to attach an HTML5 VideoElement for dash.js to operate upon.\n *\n * @param view An HTML5 VideoElement that has already been defined in the DOM.\n * @memberof module:MediaPlayer\n * @instance\n */\n function attachView(element) {\n if (!mediaPlayerInitialized) {\n throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;\n }\n videoModel = null;\n if (element) {\n videoModel = (0, _modelsVideoModelJs2['default'])(context).getInstance();\n videoModel.initialize();\n videoModel.setElement(element);\n detectProtection();\n detectMetricsReporting();\n }\n resetAndInitializePlayback();\n }\n\n /**\n * Returns instance of Div that was attached by calling attachTTMLRenderingDiv()\n * @returns {@link object}\n * @memberof module:MediaPlayer\n * @instance\n */\n function getTTMLRenderingDiv() {\n return videoModel ? videoModel.getTTMLRenderingDiv() : null;\n }\n\n /**\n * Use this method to attach an HTML5 div for dash.js to render rich TTML subtitles.\n *\n * @param div An unstyled div placed after the video element. It will be styled to match the video size and overlay z-order.\n * @memberof module:MediaPlayer\n * @instance\n */\n function attachTTMLRenderingDiv(div) {\n if (!videoModel) {\n throw ELEMENT_NOT_ATTACHED_ERROR;\n }\n videoModel.setTTMLRenderingDiv(div);\n }\n\n /**\n * Returns the source string or manifest that was attached by calling attachSource()\n * @returns {string | manifest}\n * @memberof module:MediaPlayer\n * @instance\n */\n function getSource() {\n if (!source) {\n throw SOURCE_NOT_ATTACHED_ERROR;\n }\n return source;\n }\n\n /**\n * Use this method to set a source URL to a valid MPD manifest file OR\n * a previously downloaded and parsed manifest object. Optionally, can\n * also provide protection information\n *\n * @param {string | object} urlOrManifest A URL to a valid MPD manifest file, or a\n * parsed manifest object.\n *\n *\n * @throw \"MediaPlayer not initialized!\"\n *\n * @memberof module:MediaPlayer\n * @instance\n */\n function attachSource(urlOrManifest) {\n if (!mediaPlayerInitialized) {\n throw MEDIA_PLAYER_NOT_INITIALIZED_ERROR;\n }\n\n if (typeof urlOrManifest === 'string') {\n var uriQueryFragModel = (0, _modelsURIQueryAndFragmentModelJs2['default'])(context).getInstance();\n uriQueryFragModel.initialize();\n source = uriQueryFragModel.parseURI(urlOrManifest);\n } else {\n source = urlOrManifest;\n }\n\n resetAndInitializePlayback();\n }\n\n /**\n * Sets the MPD source and the video element to null. You can also reset the MediaPlayer by\n * calling attachSource with a new source file.\n *\n * @memberof module:MediaPlayer\n * @instance\n */\n function reset() {\n attachSource(null);\n attachView(null);\n }\n\n //***********************************\n // PRIVATE METHODS\n //***********************************\n\n function resetAndInitializePlayback() {\n if (playbackInitialized) {\n playbackInitialized = false;\n adapter.reset();\n streamController.reset();\n playbackController.reset();\n abrController.reset();\n rulesController.reset();\n mediaController.reset();\n streamController = null;\n metricsReportingController = null;\n protectionController = null;\n protectionData = null;\n if (isReady()) {\n initializePlayback();\n }\n } else if (isReady()) {\n initializePlayback();\n }\n }\n\n function createControllers() {\n\n var synchronizationRulesCollection = (0, _rulesSynchronizationSynchronizationRulesCollectionJs2['default'])(context).getInstance();\n synchronizationRulesCollection.initialize();\n\n var abrRulesCollection = (0, _rulesAbrABRRulesCollectionJs2['default'])(context).getInstance();\n abrRulesCollection.initialize();\n\n //let scheduleRulesCollection = ScheduleRulesCollection(context).getInstance();\n //scheduleRulesCollection.initialize();\n\n var sourceBufferController = (0, _controllersSourceBufferControllerJs2['default'])(context).getInstance();\n sourceBufferController.setConfig({ dashManifestModel: dashManifestModel });\n\n var virtualBuffer = (0, _VirtualBufferJs2['default'])(context).getInstance();\n virtualBuffer.setConfig({\n sourceBufferController: sourceBufferController\n });\n\n mediaController.initialize();\n mediaController.setConfig({\n errHandler: errHandler\n });\n\n rulesController = (0, _rulesRulesControllerJs2['default'])(context).getInstance();\n rulesController.initialize();\n rulesController.setConfig({\n abrRulesCollection: abrRulesCollection,\n synchronizationRulesCollection: synchronizationRulesCollection\n });\n\n streamController = (0, _controllersStreamControllerJs2['default'])(context).getInstance();\n streamController.setConfig({\n capabilities: capabilities,\n manifestLoader: createManifestLoader(),\n manifestModel: manifestModel,\n dashManifestModel: dashManifestModel,\n protectionController: protectionController,\n adapter: adapter,\n metricsModel: metricsModel,\n dashMetrics: dashMetrics,\n liveEdgeFinder: (0, _utilsLiveEdgeFinderJs2['default'])(context).getInstance(),\n mediaSourceController: (0, _controllersMediaSourceControllerJs2['default'])(context).getInstance(),\n timeSyncController: (0, _controllersTimeSyncControllerJs2['default'])(context).getInstance(),\n baseURLController: (0, _controllersBaseURLControllerJs2['default'])(context).getInstance(),\n virtualBuffer: virtualBuffer,\n errHandler: errHandler,\n timelineConverter: (0, _dashUtilsTimelineConverterJs2['default'])(context).getInstance()\n });\n streamController.initialize(autoPlay, protectionData);\n\n abrController.setConfig({\n abrRulesCollection: abrRulesCollection,\n rulesController: rulesController,\n streamController: streamController\n });\n }\n\n function createManifestLoader() {\n return (0, _ManifestLoaderJs2['default'])(context).create({\n errHandler: errHandler,\n parser: createManifestParser(),\n metricsModel: metricsModel,\n requestModifier: (0, _utilsRequestModifierJs2['default'])(context).getInstance()\n });\n }\n\n function createManifestParser() {\n //TODO-Refactor Need to be able to switch this create out so will need API to set which parser to use?\n return (0, _dashDashParserJs2['default'])(context).create();\n }\n\n function createAdaptor() {\n //TODO-Refactor Need to be able to switch this create out so will need API to set which adapter to use? Handler is created is inside streamProcessor so need to figure that out as well\n adapter = (0, _dashDashAdapterJs2['default'])(context).getInstance();\n adapter.initialize();\n adapter.setConfig({ dashManifestModel: dashManifestModel });\n return adapter;\n }\n\n function detectProtection() {\n if (protectionController) {\n return protectionController;\n }\n // do not require Protection as dependencies as this is optional and intended to be loaded separately\n var Protection = dashjs.Protection; /* jshint ignore:line */\n if (typeof Protection == 'function') {\n //TODO need a better way to register/detect plugin components\n var protection = Protection(context).create();\n _coreEventsEventsJs2['default'].extend(Protection.events);\n _MediaPlayerEventsJs2['default'].extend(Protection.events, { publicOnly: true });\n protectionController = protection.createProtectionSystem({\n log: log,\n videoModel: videoModel,\n capabilities: capabilities,\n eventBus: eventBus,\n adapter: adapter\n });\n return protectionController;\n }\n\n return null;\n }\n\n function detectMetricsReporting() {\n if (metricsReportingController) {\n return metricsReportingController;\n }\n // do not require MetricsReporting as dependencies as this is optional and intended to be loaded separately\n var MetricsReporting = dashjs.MetricsReporting; /* jshint ignore:line */\n if (typeof MetricsReporting === 'function') {\n //TODO need a better way to register/detect plugin components\n var metricsReporting = MetricsReporting(context).create();\n\n metricsReportingController = metricsReporting.createMetricsReporting({\n log: log,\n eventBus: eventBus,\n mediaElement: getVideoElement(),\n dashManifestModel: dashManifestModel,\n metricsModel: metricsModel\n });\n\n return metricsReportingController;\n }\n\n return null;\n }\n\n function getDVRInfoMetric() {\n var metric = metricsModel.getReadOnlyMetricsFor('video') || metricsModel.getReadOnlyMetricsFor('audio');\n return dashMetrics.getCurrentDVRInfo(metric);\n }\n\n function getAsUTC(valToConvert) {\n var metric = getDVRInfoMetric();\n var availableFrom, utcValue;\n\n if (!metric) {\n return 0;\n }\n availableFrom = metric.manifestInfo.availableFrom.getTime() / 1000;\n utcValue = valToConvert + (availableFrom + metric.range.start);\n return utcValue;\n }\n\n function getActiveStream() {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR;\n }\n var streamInfo = streamController.getActiveStreamInfo();\n return streamInfo ? streamController.getStreamById(streamInfo.id) : null;\n }\n\n function getRepresentationListForActiveAdaptations(skipLoad) {\n if (!playbackInitialized) {\n throw PLAYBACK_NOT_INITIALIZED_ERROR;\n }\n var manifest = manifestModel.getValue();\n var s_info = streamController.getActiveStreamInfo();\n var p_idx = s_info.index;\n var periods = dashManifestModel.getRegularPeriods(manifest, dashManifestModel.getMpd(manifest));\n var adapts = [];\n var res = [];\n streamController.getStreamById(s_info.id).getProcessors().forEach(function (proc) {\n var m_info = proc.getMediaInfo();\n var a_idx = m_info.index;\n var adapt = dashManifestModel.getAdaptationForIndex(a_idx, manifest, p_idx);\n var adapt_s = { period: periods[p_idx], index: a_idx, proc: proc,\n type: dashManifestModel.getIsMuxed(adapt) ? 'muxed' : dashManifestModel.getIsVideo(adapt) ? 'video' : 'other' };\n adapts.push(adapt_s);\n });\n adapts.forEach(function (adapt) {\n var rs = dashManifestModel.getRepresentationsForAdaptation(manifest, adapt);\n rs.forEach(function (repr) {\n adapt.proc.getIndexHandler().updateRepresentation(repr, false, skipLoad);\n res.push(repr);\n });\n });\n return res;\n }\n\n function initializePlayback() {\n if (!playbackInitialized) {\n playbackInitialized = true;\n log('Playback Initialized');\n createControllers();\n if (typeof source === 'string') {\n streamController.load(source);\n } else {\n streamController.loadWithManifest(source);\n }\n }\n }\n\n instance = {\n initialize: initialize,\n on: on,\n off: off,\n extend: extend,\n attachView: attachView,\n attachSource: attachSource,\n isReady: isReady,\n play: play,\n isPaused: isPaused,\n pause: pause,\n isSeeking: isSeeking,\n seek: seek,\n setMute: setMute,\n isMuted: isMuted,\n setVolume: setVolume,\n getVolume: getVolume,\n time: time,\n duration: duration,\n timeAsUTC: timeAsUTC,\n durationAsUTC: durationAsUTC,\n getActiveStream: getActiveStream,\n getDVRWindowSize: getDVRWindowSize,\n getDVRSeekOffset: getDVRSeekOffset,\n convertToTimeCode: convertToTimeCode,\n formatUTC: formatUTC,\n getVersion: getVersion,\n getDebug: getDebug,\n getBufferLength: getBufferLength,\n getVideoModel: getVideoModel,\n getVideoContainer: getVideoContainer,\n getTTMLRenderingDiv: getTTMLRenderingDiv,\n getVideoElement: getVideoElement,\n getSource: getSource,\n setLiveDelayFragmentCount: setLiveDelayFragmentCount,\n setLiveDelay: setLiveDelay,\n useSuggestedPresentationDelay: useSuggestedPresentationDelay,\n enableLastBitrateCaching: enableLastBitrateCaching,\n enableLastMediaSettingsCaching: enableLastMediaSettingsCaching,\n setMaxAllowedBitrateFor: setMaxAllowedBitrateFor,\n getMaxAllowedBitrateFor: getMaxAllowedBitrateFor,\n setMaxAllowedRepresentationRatioFor: setMaxAllowedRepresentationRatioFor,\n getMaxAllowedRepresentationRatioFor: getMaxAllowedRepresentationRatioFor,\n setAutoPlay: setAutoPlay,\n getAutoPlay: getAutoPlay,\n setScheduleWhilePaused: setScheduleWhilePaused,\n getScheduleWhilePaused: getScheduleWhilePaused,\n getDashMetrics: getDashMetrics,\n getMetricsFor: getMetricsFor,\n getQualityFor: getQualityFor,\n setQualityFor: setQualityFor,\n getLimitBitrateByPortal: getLimitBitrateByPortal,\n setLimitBitrateByPortal: setLimitBitrateByPortal,\n setTextTrack: setTextTrack,\n getBitrateInfoListFor: getBitrateInfoListFor,\n setInitialBitrateFor: setInitialBitrateFor,\n getInitialBitrateFor: getInitialBitrateFor,\n setInitialRepresentationRatioFor: setInitialRepresentationRatioFor,\n getInitialRepresentationRatioFor: getInitialRepresentationRatioFor,\n getStreamsFromManifest: getStreamsFromManifest,\n getTracksFor: getTracksFor,\n getTracksForTypeFromManifest: getTracksForTypeFromManifest,\n getCurrentTrackFor: getCurrentTrackFor,\n setInitialMediaSettingsFor: setInitialMediaSettingsFor,\n getInitialMediaSettingsFor: getInitialMediaSettingsFor,\n setCurrentTrack: setCurrentTrack,\n getTrackSwitchModeFor: getTrackSwitchModeFor,\n setTrackSwitchModeFor: setTrackSwitchModeFor,\n setSelectionModeForInitialTrack: setSelectionModeForInitialTrack,\n getSelectionModeForInitialTrack: getSelectionModeForInitialTrack,\n getAutoSwitchQuality: getAutoSwitchQuality,\n setAutoSwitchQuality: setAutoSwitchQuality,\n getAutoSwitchQualityFor: getAutoSwitchQualityFor,\n setAutoSwitchQualityFor: setAutoSwitchQualityFor,\n enableBufferOccupancyABR: enableBufferOccupancyABR,\n setBandwidthSafetyFactor: setBandwidthSafetyFactor,\n getBandwidthSafetyFactor: getBandwidthSafetyFactor,\n setAbandonLoadTimeout: setAbandonLoadTimeout,\n retrieveManifest: retrieveManifest,\n addUTCTimingSource: addUTCTimingSource,\n removeUTCTimingSource: removeUTCTimingSource,\n clearDefaultUTCTimingSources: clearDefaultUTCTimingSources,\n restoreDefaultUTCTimingSources: restoreDefaultUTCTimingSources,\n setBufferToKeep: setBufferToKeep,\n setBufferPruningInterval: setBufferPruningInterval,\n setStableBufferTime: setStableBufferTime,\n setBufferTimeAtTopQuality: setBufferTimeAtTopQuality,\n setFragmentLoaderRetryAttempts: setFragmentLoaderRetryAttempts,\n setFragmentLoaderRetryInterval: setFragmentLoaderRetryInterval,\n setBufferTimeAtTopQualityLongForm: setBufferTimeAtTopQualityLongForm,\n setLongFormContentDurationThreshold: setLongFormContentDurationThreshold,\n setRichBufferThreshold: setRichBufferThreshold,\n getProtectionController: getProtectionController,\n attachProtectionController: attachProtectionController,\n setProtectionData: setProtectionData,\n enableManifestDateHeaderTimeSource: enableManifestDateHeaderTimeSource,\n displayCaptionsOnTop: displayCaptionsOnTop,\n attachVideoContainer: attachVideoContainer,\n attachTTMLRenderingDiv: attachTTMLRenderingDiv,\n getRepresentationListForActiveAdaptations: getRepresentationListForActiveAdaptations,\n reset: reset\n };\n\n setup();\n\n return instance;\n}\n\nMediaPlayer.__dashjs_factory_name = 'MediaPlayer';\nvar factory = _coreFactoryMakerJs2['default'].getClassFactory(MediaPlayer);\nfactory.events = _MediaPlayerEventsJs2['default'];\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../core/FactoryMaker.js\":7,\"../dash/DashAdapter.js\":11,\"../dash/DashMetrics.js\":13,\"../dash/DashParser.js\":14,\"../dash/models/DashManifestModel.js\":17,\"../dash/utils/TimelineConverter.js\":23,\"../dash/vo/UTCTiming.js\":33,\"./../core/Debug.js\":5,\"./../core/EventBus.js\":6,\"./../core/events/Events.js\":9,\"./ManifestLoader.js\":35,\"./MediaPlayerEvents.js\":38,\"./TextSourceBuffer.js\":41,\"./TextTracks.js\":42,\"./VirtualBuffer.js\":43,\"./controllers/AbrController.js\":46,\"./controllers/BaseURLController.js\":47,\"./controllers/MediaController.js\":52,\"./controllers/MediaSourceController.js\":53,\"./controllers/PlaybackController.js\":54,\"./controllers/SourceBufferController.js\":56,\"./controllers/StreamController.js\":57,\"./controllers/TimeSyncController.js\":59,\"./models/ManifestModel.js\":63,\"./models/MediaPlayerModel.js\":64,\"./models/MetricsModel.js\":65,\"./models/URIQueryAndFragmentModel.js\":66,\"./models/VideoModel.js\":67,\"./rules/RulesController.js\":69,\"./rules/abr/ABRRulesCollection.js\":71,\"./rules/synchronization/SynchronizationRulesCollection.js\":84,\"./utils/Capabilities.js\":87,\"./utils/ErrorHandler.js\":90,\"./utils/LiveEdgeFinder.js\":92,\"./utils/RequestModifier.js\":94}],38:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _coreEventsEventsBaseJs = _dereq_('../core/events/EventsBase.js');\n\nvar _coreEventsEventsBaseJs2 = _interopRequireDefault(_coreEventsEventsBaseJs);\n\n/**\n * @Class\n *\n */\n\nvar MediaPlayerEvents = (function (_EventsBase) {\n _inherits(MediaPlayerEvents, _EventsBase);\n\n /**\n * @description Public facing external events to be used when developing a player that implements dash.js.\n */\n\n function MediaPlayerEvents() {\n _classCallCheck(this, MediaPlayerEvents);\n\n _get(Object.getPrototypeOf(MediaPlayerEvents.prototype), 'constructor', this).call(this);\n /**\n * Triggered when the video element's buffer state changes to stalled.\n * Check mediaType in payload to determine type (Video, Audio, FragmentedText).\n * @event MediaPlayerEvents#BUFFER_EMPTY\n */\n this.BUFFER_EMPTY = 'bufferstalled';\n /**\n * Triggered when the video element's buffer state changes to loaded.\n * Check mediaType in payload to determine type (Video, Audio, FragmentedText).\n * @event MediaPlayerEvents#BUFFER_LOADED\n */\n this.BUFFER_LOADED = 'bufferloaded';\n\n /**\n * Triggered when the video element's buffer state changes, either stalled or loaded. Check payload for state.\n * @event MediaPlayerEvents#BUFFER_LOADED\n */\n this.BUFFER_LEVEL_STATE_CHANGED = 'bufferStateChanged';\n\n /**\n * Triggered when\n * @event MediaPlayerEvents#ERROR\n */\n this.ERROR = 'error';\n /**\n * Triggered when {@link module:Debug} log method is called.\n * @event MediaPlayerEvents#LOG\n */\n this.LOG = 'log';\n //TODO refactor with internal event\n /**\n * Triggered when the manifest load is complete\n * @event MediaPlayerEvents#MANIFEST_LOADED\n */\n this.MANIFEST_LOADED = 'manifestloaded';\n /**\n * Triggered anytime there is a change to the overall metrics.\n * @event MediaPlayerEvents#METRICS_CHANGED\n */\n this.METRICS_CHANGED = 'metricschanged';\n /**\n * Triggered when an individual metric is added, updated or cleared.\n * @event MediaPlayerEvents#METRIC_CHANGED\n */\n this.METRIC_CHANGED = 'metricchanged';\n /**\n * Triggered every time a new metric is added.\n * @event MediaPlayerEvents#METRIC_ADDED\n */\n this.METRIC_ADDED = 'metricadded';\n /**\n * Triggered every time a metric is updated.\n * @event MediaPlayerEvents#METRIC_UPDATED\n */\n this.METRIC_UPDATED = 'metricupdated';\n /**\n * Triggered at the stream end of a period.\n * @event MediaPlayerEvents#PERIOD_SWITCH_COMPLETED\n */\n this.PERIOD_SWITCH_COMPLETED = 'streamswitchcompleted';\n /**\n * Triggered when a new period starts.\n * @event MediaPlayerEvents#PERIOD_SWITCH_STARTED\n */\n this.PERIOD_SWITCH_STARTED = 'streamswitchstarted';\n /**\n * Triggered when the stream is setup and ready.\n * @event MediaPlayerEvents#STREAM_INITIALIZED\n */\n this.STREAM_INITIALIZED = 'streaminitialized';\n /**\n * Triggered once all text tracks detected in the MPD are added to the video element.\n * @event MediaPlayerEvents#TEXT_TRACKS_ADDED\n */\n this.TEXT_TRACKS_ADDED = 'alltexttracksadded';\n /**\n * Triggered when a text track is added to the video element's TextTrackList\n * @event MediaPlayerEvents#TEXT_TRACK_ADDED\n */\n this.TEXT_TRACK_ADDED = 'texttrackadded';\n\n /**\n * Sent when enough data is available that the media can be played,\n * at least for a couple of frames. This corresponds to the\n * HAVE_ENOUGH_DATA readyState.\n * @event MediaPlayerEvents#CAN_PLAY\n */\n this.CAN_PLAY = 'canPlay';\n\n /**\n * Sent when playback completes.\n * @event MediaPlayerEvents#PLAYBACK_ENDED\n */\n this.PLAYBACK_ENDED = 'playbackEnded';\n\n /**\n * Sent when an error occurs. The element's error\n * attribute contains more information.\n * @event MediaPlayerEvents#PLAYBACK_ERROR\n */\n this.PLAYBACK_ERROR = 'playbackError';\n /**\n * The media's metadata has finished loading; all attributes now\n * contain as much useful information as they're going to.\n * @event MediaPlayerEvents#PLAYBACK_METADATA_LOADED\n */\n this.PLAYBACK_METADATA_LOADED = 'playbackMetaDataLoaded';\n /**\n * Sent when playback is paused.\n * @event MediaPlayerEvents#PLAYBACK_PAUSED\n */\n this.PLAYBACK_PAUSED = 'playbackPaused';\n /**\n * Sent when the media begins to play (either for the first time, after having been paused,\n * or after ending and then restarting).\n *\n * @event MediaPlayerEvents#PLAYBACK_PLAYING\n */\n this.PLAYBACK_PLAYING = 'playbackPlaying';\n /**\n * Sent periodically to inform interested parties of progress downloading\n * the media. Information about the current amount of the media that has\n * been downloaded is available in the media element's buffered attribute.\n * @event MediaPlayerEvents#PLAYBACK_PROGRESS\n */\n this.PLAYBACK_PROGRESS = 'playbackProgress';\n /**\n * Sent when the playback speed changes.\n * @event MediaPlayerEvents#PLAYBACK_RATE_CHANGED\n */\n this.PLAYBACK_RATE_CHANGED = 'playbackRateChanged';\n /**\n * Sent when a seek operation completes.\n * @event MediaPlayerEvents#PLAYBACK_SEEKED\n */\n this.PLAYBACK_SEEKED = 'playbackSeeked';\n /**\n * Sent when a seek operation begins.\n * @event MediaPlayerEvents#PLAYBACK_SEEKING\n */\n this.PLAYBACK_SEEKING = 'playbackSeeking';\n /**\n * Sent when playback of the media starts after having been paused;\n * that is, when playback is resumed after a prior pause event.\n *\n * @event MediaPlayerEvents#PLAYBACK_STARTED\n */\n this.PLAYBACK_STARTED = 'playbackStarted';\n /**\n * The time indicated by the element's currentTime attribute has changed.\n * @event MediaPlayerEvents#PLAYBACK_TIME_UPDATED\n */\n this.PLAYBACK_TIME_UPDATED = 'playbackTimeUpdated';\n this.SEGMENT_SYNC_SAMPLES = 'segmentSyncSamples';\n }\n\n return MediaPlayerEvents;\n})(_coreEventsEventsBaseJs2['default']);\n\nvar mediaPlayerEvents = new MediaPlayerEvents();\nexports['default'] = mediaPlayerEvents;\nmodule.exports = exports['default'];\n\n},{\"../core/events/EventsBase.js\":10}],39:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _utilsLiveEdgeFinderJs = _dereq_('./utils/LiveEdgeFinder.js');\n\nvar _utilsLiveEdgeFinderJs2 = _interopRequireDefault(_utilsLiveEdgeFinderJs);\n\nvar _StreamProcessorJs = _dereq_('./StreamProcessor.js');\n\nvar _StreamProcessorJs2 = _interopRequireDefault(_StreamProcessorJs);\n\nvar _controllersMediaControllerJs = _dereq_('./controllers/MediaController.js');\n\nvar _controllersMediaControllerJs2 = _interopRequireDefault(_controllersMediaControllerJs);\n\nvar _controllersEventControllerJs = _dereq_('./controllers/EventController.js');\n\nvar _controllersEventControllerJs2 = _interopRequireDefault(_controllersEventControllerJs);\n\nvar _controllersFragmentControllerJs = _dereq_('./controllers/FragmentController.js');\n\nvar _controllersFragmentControllerJs2 = _interopRequireDefault(_controllersFragmentControllerJs);\n\nvar _controllersAbrControllerJs = _dereq_('./controllers/AbrController.js');\n\nvar _controllersAbrControllerJs2 = _interopRequireDefault(_controllersAbrControllerJs);\n\nvar _modelsVideoModelJs = _dereq_('./models/VideoModel.js');\n\nvar _modelsVideoModelJs2 = _interopRequireDefault(_modelsVideoModelJs);\n\nvar _modelsMetricsModelJs = _dereq_('./models/MetricsModel.js');\n\nvar _modelsMetricsModelJs2 = _interopRequireDefault(_modelsMetricsModelJs);\n\nvar _controllersPlaybackControllerJs = _dereq_('./controllers/PlaybackController.js');\n\nvar _controllersPlaybackControllerJs2 = _interopRequireDefault(_controllersPlaybackControllerJs);\n\nvar _dashDashHandlerJs = _dereq_('../dash/DashHandler.js');\n\nvar _dashDashHandlerJs2 = _interopRequireDefault(_dashDashHandlerJs);\n\nvar _dashSegmentBaseLoaderJs = _dereq_('../dash/SegmentBaseLoader.js');\n\nvar _dashSegmentBaseLoaderJs2 = _interopRequireDefault(_dashSegmentBaseLoaderJs);\n\nvar _dashDashMetricsJs = _dereq_('../dash/DashMetrics.js');\n\nvar _dashDashMetricsJs2 = _interopRequireDefault(_dashDashMetricsJs);\n\nvar _coreEventBusJs = _dereq_('../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreDebugJs = _dereq_('../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nvar _coreFactoryMakerJs = _dereq_('../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _TextSourceBufferJs = _dereq_('./TextSourceBuffer.js');\n\nvar _TextSourceBufferJs2 = _interopRequireDefault(_TextSourceBufferJs);\n\nfunction Stream(config) {\n\n var DATA_UPDATE_FAILED_ERROR_CODE = 1;\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var manifestModel = config.manifestModel;\n var manifestUpdater = config.manifestUpdater;\n var adapter = config.adapter;\n var capabilities = config.capabilities;\n var errHandler = config.errHandler;\n var timelineConverter = config.timelineConverter;\n var baseURLController = config.baseURLController;\n\n var instance = undefined,\n streamProcessors = undefined,\n isStreamActivated = undefined,\n isMediaInitialized = undefined,\n streamInfo = undefined,\n updateError = undefined,\n isUpdating = undefined,\n initialized = undefined,\n protectionController = undefined,\n liveEdgeFinder = undefined,\n playbackController = undefined,\n mediaController = undefined,\n fragmentController = undefined,\n eventController = undefined,\n abrController = undefined,\n textSourceBuffer = undefined;\n\n function setup() {\n streamProcessors = [];\n isStreamActivated = false;\n isMediaInitialized = false;\n streamInfo = null;\n updateError = {};\n isUpdating = false;\n initialized = false;\n\n liveEdgeFinder = (0, _utilsLiveEdgeFinderJs2['default'])(context).getInstance();\n playbackController = (0, _controllersPlaybackControllerJs2['default'])(context).getInstance();\n abrController = (0, _controllersAbrControllerJs2['default'])(context).getInstance();\n mediaController = (0, _controllersMediaControllerJs2['default'])(context).getInstance();\n fragmentController = (0, _controllersFragmentControllerJs2['default'])(context).create();\n textSourceBuffer = (0, _TextSourceBufferJs2['default'])(context).getInstance();\n\n eventBus.on(_coreEventsEventsJs2['default'].BUFFERING_COMPLETED, onBufferingCompleted, instance);\n eventBus.on(_coreEventsEventsJs2['default'].DATA_UPDATE_COMPLETED, onDataUpdateCompleted, instance);\n }\n\n function initialize(StreamInfo, ProtectionController) {\n streamInfo = StreamInfo;\n protectionController = ProtectionController;\n if (protectionController) {\n eventBus.on(_coreEventsEventsJs2['default'].KEY_ERROR, onProtectionError, instance);\n eventBus.on(_coreEventsEventsJs2['default'].SERVER_CERTIFICATE_UPDATED, onProtectionError, instance);\n eventBus.on(_coreEventsEventsJs2['default'].LICENSE_REQUEST_COMPLETE, onProtectionError, instance);\n eventBus.on(_coreEventsEventsJs2['default'].KEY_SYSTEM_SELECTED, onProtectionError, instance);\n eventBus.on(_coreEventsEventsJs2['default'].KEY_SESSION_CREATED, onProtectionError, instance);\n }\n }\n\n /**\n * Activates Stream by re-initializing some of its components\n * @param mediaSource {MediaSource}\n * @memberof Stream#\n */\n function activate(mediaSource) {\n if (!isStreamActivated) {\n eventBus.on(_coreEventsEventsJs2['default'].CURRENT_TRACK_CHANGED, onCurrentTrackChanged, instance);\n initializeMedia(mediaSource);\n } else {\n createBuffers();\n }\n }\n\n /**\n * Partially resets some of the Stream elements\n * @memberof Stream#\n */\n function deactivate() {\n var ln = streamProcessors.length;\n for (var i = 0; i < ln; i++) {\n streamProcessors[i].reset();\n }\n streamProcessors = [];\n isStreamActivated = false;\n isMediaInitialized = false;\n clearEventController();\n eventBus.off(_coreEventsEventsJs2['default'].CURRENT_TRACK_CHANGED, onCurrentTrackChanged, instance);\n }\n\n function reset() {\n\n if (playbackController) {\n playbackController.pause();\n playbackController = null;\n }\n\n if (fragmentController) {\n fragmentController.reset();\n fragmentController = null;\n }\n\n liveEdgeFinder.abortSearch();\n deactivate();\n\n mediaController = null;\n abrController = null;\n manifestUpdater = null;\n manifestModel = null;\n adapter = null;\n capabilities = null;\n log = null;\n errHandler = null;\n isUpdating = false;\n initialized = false;\n updateError = {};\n\n eventBus.off(_coreEventsEventsJs2['default'].DATA_UPDATE_COMPLETED, onDataUpdateCompleted, instance);\n eventBus.off(_coreEventsEventsJs2['default'].BUFFERING_COMPLETED, onBufferingCompleted, instance);\n eventBus.off(_coreEventsEventsJs2['default'].KEY_ERROR, onProtectionError, instance);\n eventBus.off(_coreEventsEventsJs2['default'].SERVER_CERTIFICATE_UPDATED, onProtectionError, instance);\n eventBus.off(_coreEventsEventsJs2['default'].LICENSE_REQUEST_COMPLETE, onProtectionError, instance);\n eventBus.off(_coreEventsEventsJs2['default'].KEY_SYSTEM_SELECTED, onProtectionError, instance);\n eventBus.off(_coreEventsEventsJs2['default'].KEY_SESSION_CREATED, onProtectionError, instance);\n }\n\n function getDuration() {\n return streamInfo.duration;\n }\n\n function getStartTime() {\n return streamInfo.start;\n }\n\n function getStreamIndex() {\n return streamInfo.index;\n }\n\n function getId() {\n return streamInfo.id;\n }\n\n function getStreamInfo() {\n return streamInfo;\n }\n\n function hasMedia(type) {\n return getMediaInfo(type) !== null;\n }\n\n /**\n * @param type\n * @returns {Array}\n * @memberof Stream#\n */\n function getBitrateListFor(type) {\n var mediaInfo = getMediaInfo(type);\n return abrController.getBitrateList(mediaInfo);\n }\n\n function startEventController() {\n if (eventController) {\n eventController.start();\n }\n }\n\n function clearEventController() {\n if (eventController) {\n eventController.clear();\n }\n }\n\n function isActivated() {\n return isStreamActivated;\n }\n\n function isInitialized() {\n return initialized;\n }\n\n function onProtectionError(event) {\n if (event.error) {\n errHandler.mediaKeySessionError(event.error);\n log(event.error);\n reset();\n }\n }\n\n function getMimeTypeOrType(mediaInfo) {\n return mediaInfo.type === 'text' ? mediaInfo.mimeType : mediaInfo.type;\n }\n\n function isMediaSupported(mediaInfo, mediaSource, manifest) {\n var type = mediaInfo.type;\n var codec, msg;\n\n if (type === 'muxed' && mediaInfo) {\n msg = 'Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines';\n log(msg);\n errHandler.manifestError(msg, 'multiplexedrep', manifestModel.getValue());\n return false;\n }\n\n if (type === 'text' || type === 'fragmentedText' || type === 'embeddedText') return true;\n\n codec = mediaInfo.codec;\n log(type + ' codec: ' + codec);\n\n if (!!mediaInfo.contentProtection && !capabilities.supportsEncryptedMedia()) {\n errHandler.capabilityError('encryptedmedia');\n } else if (!capabilities.supportsCodec((0, _modelsVideoModelJs2['default'])(context).getInstance().getElement(), codec)) {\n msg = type + 'Codec (' + codec + ') is not supported.';\n errHandler.manifestError(msg, 'codec', manifest);\n log(msg);\n return false;\n }\n\n return true;\n }\n\n function onCurrentTrackChanged(e) {\n if (e.newMediaInfo.streamInfo.id !== streamInfo.id) return;\n\n var processor = getProcessorForMediaInfo(e.oldMediaInfo);\n if (!processor) return;\n\n var currentTime = playbackController.getTime();\n var buffer = processor.getBuffer();\n var mediaInfo = e.newMediaInfo;\n var manifest = manifestModel.getValue();\n var idx = streamProcessors.indexOf(processor);\n var mediaSource = processor.getMediaSource();\n\n if (mediaInfo.type !== 'fragmentedText') {\n processor.reset(true);\n createStreamProcessor(mediaInfo, manifest, mediaSource, { buffer: buffer, replaceIdx: idx, currentTime: currentTime });\n playbackController.seek(playbackController.getTime());\n } else {\n processor.updateMediaInfo(manifest, mediaInfo);\n }\n }\n\n function createIndexHandler() {\n\n var segmentBaseLoader = (0, _dashSegmentBaseLoaderJs2['default'])(context).getInstance();\n segmentBaseLoader.setConfig({\n baseURLController: baseURLController\n });\n segmentBaseLoader.initialize();\n\n var handler = (0, _dashDashHandlerJs2['default'])(context).create({\n segmentBaseLoader: segmentBaseLoader,\n timelineConverter: timelineConverter,\n dashMetrics: (0, _dashDashMetricsJs2['default'])(context).getInstance(),\n metricsModel: (0, _modelsMetricsModelJs2['default'])(context).getInstance(),\n baseURLController: baseURLController\n });\n\n return handler;\n }\n\n function createStreamProcessor(mediaInfo, manifest, mediaSource, optionalSettings) {\n var streamProcessor = (0, _StreamProcessorJs2['default'])(context).create({\n indexHandler: createIndexHandler(),\n timelineConverter: timelineConverter,\n adapter: adapter,\n manifestModel: manifestModel\n });\n\n var allMediaForType = adapter.getAllMediaInfoForType(manifest, streamInfo, mediaInfo.type);\n streamProcessor.initialize(getMimeTypeOrType(mediaInfo), fragmentController, mediaSource, instance, eventController);\n abrController.updateTopQualityIndex(mediaInfo);\n\n if (optionalSettings) {\n streamProcessor.setBuffer(optionalSettings.buffer);\n streamProcessors[optionalSettings.replaceIdx] = streamProcessor;\n } else {\n streamProcessors.push(streamProcessor);\n }\n\n if (mediaInfo.type === 'text' || mediaInfo.type === 'fragmentedText') {\n var idx;\n for (var i = 0; i < allMediaForType.length; i++) {\n if (allMediaForType[i].index === mediaInfo.index) {\n idx = i;\n }\n streamProcessor.updateMediaInfo(manifest, allMediaForType[i]); //creates text tracks for all adaptations in one stream processor\n }\n if (mediaInfo.type === 'fragmentedText') {\n streamProcessor.updateMediaInfo(manifest, allMediaForType[idx]); //sets the initial media info\n }\n } else {\n streamProcessor.updateMediaInfo(manifest, mediaInfo);\n }\n\n return streamProcessor;\n }\n\n function initializeMediaForType(type, mediaSource) {\n var manifest = manifestModel.getValue();\n var allMediaForType = adapter.getAllMediaInfoForType(manifest, streamInfo, type);\n\n var mediaInfo = null;\n var initialMediaInfo;\n\n if (!allMediaForType || allMediaForType.length === 0) {\n log('No ' + type + ' data.');\n return;\n }\n\n for (var i = 0, ln = allMediaForType.length; i < ln; i++) {\n mediaInfo = allMediaForType[i];\n\n if (type === 'embeddedText') {\n textSourceBuffer.addEmbeddedTrack(mediaInfo);\n } else {\n if (!isMediaSupported(mediaInfo, mediaSource, manifest)) continue;\n\n if (mediaController.isMultiTrackSupportedByType(mediaInfo.type)) {\n mediaController.addTrack(mediaInfo, streamInfo);\n }\n }\n }\n\n if (type === 'embeddedText' || mediaController.getTracksFor(type, streamInfo).length === 0) {\n return;\n }\n\n mediaController.checkInitialMediaSettingsForType(type, streamInfo);\n initialMediaInfo = mediaController.getCurrentTrackFor(type, streamInfo);\n\n // TODO : How to tell index handler live/duration?\n // TODO : Pass to controller and then pass to each method on handler?\n\n createStreamProcessor(initialMediaInfo, manifest, mediaSource);\n }\n\n function initializeMedia(mediaSource) {\n var manifest = manifestModel.getValue();\n var events;\n\n eventController = (0, _controllersEventControllerJs2['default'])(context).getInstance();\n eventController.initialize();\n eventController.setConfig({\n manifestModel: manifestModel,\n manifestUpdater: manifestUpdater\n });\n events = adapter.getEventsFor(manifest, streamInfo);\n eventController.addInlineEvents(events);\n\n isUpdating = true;\n initializeMediaForType('video', mediaSource);\n initializeMediaForType('audio', mediaSource);\n initializeMediaForType('text', mediaSource);\n initializeMediaForType('fragmentedText', mediaSource);\n initializeMediaForType('embeddedText', mediaSource);\n initializeMediaForType('muxed', mediaSource);\n\n createBuffers();\n\n //TODO. Consider initialization of TextSourceBuffer here if embeddedText, but no sideloadedText.\n\n isMediaInitialized = true;\n isUpdating = false;\n\n if (streamProcessors.length === 0) {\n var msg = 'No streams to play.';\n errHandler.manifestError(msg, 'nostreams', manifest);\n log(msg);\n } else {\n liveEdgeFinder.initialize(timelineConverter, streamProcessors[0]);\n //log(\"Playback initialized!\");\n checkIfInitializationCompleted();\n }\n }\n\n function checkIfInitializationCompleted() {\n var ln = streamProcessors.length;\n var hasError = !!updateError.audio || !!updateError.video;\n var error = hasError ? new Error(DATA_UPDATE_FAILED_ERROR_CODE, 'Data update failed', null) : null;\n var i = 0;\n\n for (i; i < ln; i++) {\n if (streamProcessors[i].isUpdating() || isUpdating) return;\n }\n\n initialized = true;\n isStreamActivated = true;\n if (!isMediaInitialized) return;\n if (protectionController) {\n protectionController.initialize(manifestModel.getValue(), getMediaInfo('audio'), getMediaInfo('video'));\n }\n eventBus.trigger(_coreEventsEventsJs2['default'].STREAM_INITIALIZED, { streamInfo: streamInfo, error: error });\n }\n\n function getMediaInfo(type) {\n var ln = streamProcessors.length;\n var mediaCtrl = null;\n\n for (var i = 0; i < ln; i++) {\n mediaCtrl = streamProcessors[i];\n\n if (mediaCtrl.getType() === type) return mediaCtrl.getMediaInfo();\n }\n\n return null;\n }\n\n function createBuffers() {\n for (var i = 0, ln = streamProcessors.length; i < ln; i++) {\n streamProcessors[i].createBuffer();\n }\n }\n\n function onBufferingCompleted(e) {\n if (e.streamInfo !== streamInfo) return;\n\n var processors = getProcessors();\n var ln = processors.length;\n var i = 0;\n\n // if there is at least one buffer controller that has not completed buffering yet do nothing\n for (i; i < ln; i++) {\n if (!processors[i].isBufferingCompleted()) return;\n }\n\n eventBus.trigger(_coreEventsEventsJs2['default'].STREAM_BUFFERING_COMPLETED, { streamInfo: streamInfo });\n }\n\n function onDataUpdateCompleted(e) {\n var sp = e.sender.getStreamProcessor();\n\n if (sp.getStreamInfo() !== streamInfo) return;\n\n updateError[sp.getType()] = e.error;\n checkIfInitializationCompleted();\n }\n\n function getProcessorForMediaInfo(mediaInfo) {\n if (!mediaInfo) return false;\n\n var processors = getProcessors();\n\n return processors.filter(function (processor) {\n return processor.getType() === mediaInfo.type;\n })[0];\n }\n\n function getProcessors() {\n var ln = streamProcessors.length;\n var arr = [];\n var i = 0;\n\n var type, controller;\n\n for (i; i < ln; i++) {\n controller = streamProcessors[i];\n type = controller.getType();\n\n if (type === 'audio' || type === 'video' || type === 'fragmentedText') {\n arr.push(controller);\n }\n }\n\n return arr;\n }\n\n function updateData(updatedStreamInfo) {\n var ln = streamProcessors.length;\n var manifest = manifestModel.getValue();\n\n var i = 0;\n var mediaInfo, events, controller;\n\n isStreamActivated = false;\n streamInfo = updatedStreamInfo;\n log('Manifest updated... set new data on buffers.');\n\n if (eventController) {\n events = adapter.getEventsFor(manifest, streamInfo);\n eventController.addInlineEvents(events);\n }\n\n isUpdating = true;\n initialized = false;\n\n for (i; i < ln; i++) {\n controller = streamProcessors[i];\n mediaInfo = adapter.getMediaInfoForType(manifest, streamInfo, controller.getType());\n abrController.updateTopQualityIndex(mediaInfo);\n controller.updateMediaInfo(manifest, mediaInfo);\n }\n\n isUpdating = false;\n checkIfInitializationCompleted();\n }\n\n instance = {\n initialize: initialize,\n activate: activate,\n deactivate: deactivate,\n getDuration: getDuration,\n getStartTime: getStartTime,\n getStreamIndex: getStreamIndex,\n getId: getId,\n getStreamInfo: getStreamInfo,\n hasMedia: hasMedia,\n getBitrateListFor: getBitrateListFor,\n startEventController: startEventController,\n isActivated: isActivated,\n isInitialized: isInitialized,\n updateData: updateData,\n reset: reset,\n getProcessors: getProcessors\n };\n\n setup();\n return instance;\n}\n\nStream.__dashjs_factory_name = 'Stream';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(Stream);\nmodule.exports = exports['default'];\n\n},{\"../core/Debug.js\":5,\"../core/EventBus.js\":6,\"../core/FactoryMaker.js\":7,\"../core/events/Events.js\":9,\"../dash/DashHandler.js\":12,\"../dash/DashMetrics.js\":13,\"../dash/SegmentBaseLoader.js\":15,\"./StreamProcessor.js\":40,\"./TextSourceBuffer.js\":41,\"./controllers/AbrController.js\":46,\"./controllers/EventController.js\":50,\"./controllers/FragmentController.js\":51,\"./controllers/MediaController.js\":52,\"./controllers/PlaybackController.js\":54,\"./models/MetricsModel.js\":65,\"./models/VideoModel.js\":67,\"./utils/LiveEdgeFinder.js\":92}],40:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _controllersAbrControllerJs = _dereq_('./controllers/AbrController.js');\n\nvar _controllersAbrControllerJs2 = _interopRequireDefault(_controllersAbrControllerJs);\n\nvar _controllersBufferControllerJs = _dereq_('./controllers/BufferController.js');\n\nvar _controllersBufferControllerJs2 = _interopRequireDefault(_controllersBufferControllerJs);\n\nvar _controllersStreamControllerJs = _dereq_('./controllers/StreamController.js');\n\nvar _controllersStreamControllerJs2 = _interopRequireDefault(_controllersStreamControllerJs);\n\nvar _controllersMediaControllerJs = _dereq_('./controllers/MediaController.js');\n\nvar _controllersMediaControllerJs2 = _interopRequireDefault(_controllersMediaControllerJs);\n\nvar _controllersTextControllerJs = _dereq_('./controllers/TextController.js');\n\nvar _controllersTextControllerJs2 = _interopRequireDefault(_controllersTextControllerJs);\n\nvar _controllersScheduleControllerJs = _dereq_('./controllers/ScheduleController.js');\n\nvar _controllersScheduleControllerJs2 = _interopRequireDefault(_controllersScheduleControllerJs);\n\nvar _rulesRulesControllerJs = _dereq_('./rules/RulesController.js');\n\nvar _rulesRulesControllerJs2 = _interopRequireDefault(_rulesRulesControllerJs);\n\nvar _modelsMediaPlayerModelJs = _dereq_('./models/MediaPlayerModel.js');\n\nvar _modelsMediaPlayerModelJs2 = _interopRequireDefault(_modelsMediaPlayerModelJs);\n\nvar _modelsMetricsModelJs = _dereq_('./models/MetricsModel.js');\n\nvar _modelsMetricsModelJs2 = _interopRequireDefault(_modelsMetricsModelJs);\n\nvar _FragmentLoaderJs = _dereq_('./FragmentLoader.js');\n\nvar _FragmentLoaderJs2 = _interopRequireDefault(_FragmentLoaderJs);\n\nvar _utilsRequestModifierJs = _dereq_('./utils/RequestModifier.js');\n\nvar _utilsRequestModifierJs2 = _interopRequireDefault(_utilsRequestModifierJs);\n\nvar _controllersSourceBufferController = _dereq_('./controllers/SourceBufferController');\n\nvar _controllersSourceBufferController2 = _interopRequireDefault(_controllersSourceBufferController);\n\nvar _TextSourceBufferJs = _dereq_('./TextSourceBuffer.js');\n\nvar _TextSourceBufferJs2 = _interopRequireDefault(_TextSourceBufferJs);\n\nvar _VirtualBufferJs = _dereq_('./VirtualBuffer.js');\n\nvar _VirtualBufferJs2 = _interopRequireDefault(_VirtualBufferJs);\n\nvar _controllersMediaSourceControllerJs = _dereq_('./controllers/MediaSourceController.js');\n\nvar _controllersMediaSourceControllerJs2 = _interopRequireDefault(_controllersMediaSourceControllerJs);\n\nvar _dashModelsDashManifestModelJs = _dereq_('../dash/models/DashManifestModel.js');\n\nvar _dashModelsDashManifestModelJs2 = _interopRequireDefault(_dashModelsDashManifestModelJs);\n\nvar _dashDashMetricsJs = _dereq_('../dash/DashMetrics.js');\n\nvar _dashDashMetricsJs2 = _interopRequireDefault(_dashDashMetricsJs);\n\nvar _dashControllersRepresentationControllerJs = _dereq_('../dash/controllers/RepresentationController.js');\n\nvar _dashControllersRepresentationControllerJs2 = _interopRequireDefault(_dashControllersRepresentationControllerJs);\n\nvar _utilsErrorHandlerJs = _dereq_('./utils/ErrorHandler.js');\n\nvar _utilsErrorHandlerJs2 = _interopRequireDefault(_utilsErrorHandlerJs);\n\nvar _coreFactoryMakerJs = _dereq_('../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction StreamProcessor(config) {\n\n var context = this.context;\n\n var indexHandler = config.indexHandler;\n var timelineConverter = config.timelineConverter;\n var adapter = config.adapter;\n var manifestModel = config.manifestModel;\n\n var instance = undefined,\n dynamic = undefined,\n mediaInfo = undefined,\n type = undefined,\n mediaInfoArr = undefined,\n stream = undefined,\n eventController = undefined,\n abrController = undefined,\n bufferController = undefined,\n scheduleController = undefined,\n representationController = undefined,\n fragmentController = undefined,\n fragmentLoader = undefined,\n fragmentModel = undefined;\n\n function setup() {\n mediaInfoArr = [];\n }\n\n function initialize(Type, FragmentController, mediaSource, Stream, EventController) {\n\n type = Type;\n stream = Stream;\n eventController = EventController;\n fragmentController = FragmentController;\n dynamic = stream.getStreamInfo().manifestInfo.isDynamic;\n\n indexHandler.initialize(this);\n\n abrController = (0, _controllersAbrControllerJs2['default'])(context).getInstance();\n abrController.initialize(type, this);\n\n bufferController = createBufferControllerForType(Type);\n bufferController.initialize(type, mediaSource, this);\n\n scheduleController = (0, _controllersScheduleControllerJs2['default'])(context).create({\n metricsModel: (0, _modelsMetricsModelJs2['default'])(context).getInstance(),\n manifestModel: manifestModel,\n adapter: adapter,\n dashMetrics: (0, _dashDashMetricsJs2['default'])(context).getInstance(),\n dashManifestModel: (0, _dashModelsDashManifestModelJs2['default'])(context).getInstance(),\n timelineConverter: timelineConverter,\n rulesController: (0, _rulesRulesControllerJs2['default'])(context).getInstance(),\n mediaPlayerModel: (0, _modelsMediaPlayerModelJs2['default'])(context).getInstance()\n });\n\n scheduleController.initialize(type, this);\n\n fragmentLoader = (0, _FragmentLoaderJs2['default'])(context).create({\n metricsModel: (0, _modelsMetricsModelJs2['default'])(context).getInstance(),\n errHandler: (0, _utilsErrorHandlerJs2['default'])(context).getInstance(),\n requestModifier: (0, _utilsRequestModifierJs2['default'])(context).getInstance()\n });\n\n representationController = (0, _dashControllersRepresentationControllerJs2['default'])(context).create();\n representationController.initialize(this);\n\n fragmentModel = scheduleController.getFragmentModel();\n fragmentModel.setLoader(fragmentLoader);\n }\n\n function reset(errored) {\n if (fragmentModel) {\n fragmentModel.reset();\n fragmentModel = null;\n }\n\n indexHandler.reset();\n\n if (bufferController) {\n bufferController.reset(errored);\n bufferController = null;\n }\n\n if (scheduleController) {\n scheduleController.reset();\n scheduleController = null;\n }\n\n if (representationController) {\n representationController.reset();\n representationController = null;\n }\n\n fragmentController = null;\n fragmentLoader = null;\n\n eventController = null;\n stream = null;\n dynamic = null;\n mediaInfo = null;\n mediaInfoArr = [];\n type = null;\n }\n\n function isUpdating() {\n return representationController.isUpdating();\n }\n\n function getType() {\n return type;\n }\n\n function getABRController() {\n return abrController;\n }\n\n function getRepresentationController() {\n return representationController;\n }\n\n function getFragmentLoader() {\n return fragmentLoader;\n }\n\n function getIndexHandler() {\n return indexHandler;\n }\n\n function getFragmentController() {\n return fragmentController;\n }\n\n function getBuffer() {\n return bufferController.getBuffer();\n }\n\n function setBuffer(buffer) {\n bufferController.setBuffer(buffer);\n }\n\n function getBufferController() {\n return bufferController;\n }\n\n function getFragmentModel() {\n return fragmentModel;\n }\n\n function getStreamInfo() {\n return stream.getStreamInfo();\n }\n\n function updateMediaInfo(manifest, newMediaInfo) {\n if (newMediaInfo !== mediaInfo && (!newMediaInfo || !mediaInfo || newMediaInfo.type === mediaInfo.type)) {\n mediaInfo = newMediaInfo;\n }\n if (mediaInfoArr.indexOf(newMediaInfo) === -1) {\n mediaInfoArr.push(newMediaInfo);\n }\n adapter.updateData(manifest, this);\n }\n\n function getMediaInfoArr() {\n return mediaInfoArr;\n }\n\n function getMediaInfo() {\n return mediaInfo;\n }\n\n function getMediaSource() {\n return bufferController.getMediaSource();\n }\n\n function getScheduleController() {\n return scheduleController;\n }\n\n function getEventController() {\n return eventController;\n }\n\n function start() {\n scheduleController.start();\n }\n\n function stop() {\n scheduleController.stop();\n }\n\n function getCurrentRepresentationInfo() {\n return adapter.getCurrentRepresentationInfo(manifestModel.getValue(), representationController);\n }\n\n function getRepresentationInfoForQuality(quality) {\n return adapter.getRepresentationInfoForQuality(manifestModel.getValue(), representationController, quality);\n }\n\n function isBufferingCompleted() {\n return bufferController.getIsBufferingCompleted();\n }\n\n function createBuffer() {\n return bufferController.getBuffer() || bufferController.createBuffer(mediaInfo);\n }\n\n function isDynamic() {\n return dynamic;\n }\n\n function createBufferControllerForType(type) {\n var controller = null;\n\n if (type === 'video' || type === 'audio' || type === 'fragmentedText') {\n controller = (0, _controllersBufferControllerJs2['default'])(context).create({\n metricsModel: (0, _modelsMetricsModelJs2['default'])(context).getInstance(),\n manifestModel: manifestModel,\n sourceBufferController: (0, _controllersSourceBufferController2['default'])(context).getInstance(),\n errHandler: (0, _utilsErrorHandlerJs2['default'])(context).getInstance(),\n mediaSourceController: (0, _controllersMediaSourceControllerJs2['default'])(context).getInstance(),\n streamController: (0, _controllersStreamControllerJs2['default'])(context).getInstance(),\n mediaController: (0, _controllersMediaControllerJs2['default'])(context).getInstance(),\n adapter: adapter,\n virtualBuffer: (0, _VirtualBufferJs2['default'])(context).getInstance(),\n textSourceBuffer: (0, _TextSourceBufferJs2['default'])(context).getInstance()\n });\n } else {\n controller = (0, _controllersTextControllerJs2['default'])(context).create({\n errHandler: (0, _utilsErrorHandlerJs2['default'])(context).getInstance(),\n sourceBufferController: (0, _controllersSourceBufferController2['default'])(context).getInstance()\n });\n }\n\n return controller;\n }\n\n instance = {\n initialize: initialize,\n isUpdating: isUpdating,\n getType: getType,\n getBufferController: getBufferController,\n getABRController: getABRController,\n getFragmentLoader: getFragmentLoader,\n getFragmentModel: getFragmentModel,\n getScheduleController: getScheduleController,\n getEventController: getEventController,\n getFragmentController: getFragmentController,\n getRepresentationController: getRepresentationController,\n getIndexHandler: getIndexHandler,\n getCurrentRepresentationInfo: getCurrentRepresentationInfo,\n getRepresentationInfoForQuality: getRepresentationInfoForQuality,\n isBufferingCompleted: isBufferingCompleted,\n createBuffer: createBuffer,\n getStreamInfo: getStreamInfo,\n updateMediaInfo: updateMediaInfo,\n getMediaInfoArr: getMediaInfoArr,\n getMediaInfo: getMediaInfo,\n getMediaSource: getMediaSource,\n getBuffer: getBuffer,\n setBuffer: setBuffer,\n start: start,\n stop: stop,\n isDynamic: isDynamic,\n reset: reset\n };\n\n setup();\n return instance;\n}\nStreamProcessor.__dashjs_factory_name = 'StreamProcessor';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(StreamProcessor);\nmodule.exports = exports['default'];\n\n},{\"../core/FactoryMaker.js\":7,\"../dash/DashMetrics.js\":13,\"../dash/controllers/RepresentationController.js\":16,\"../dash/models/DashManifestModel.js\":17,\"./FragmentLoader.js\":34,\"./TextSourceBuffer.js\":41,\"./VirtualBuffer.js\":43,\"./controllers/AbrController.js\":46,\"./controllers/BufferController.js\":49,\"./controllers/MediaController.js\":52,\"./controllers/MediaSourceController.js\":53,\"./controllers/ScheduleController.js\":55,\"./controllers/SourceBufferController\":56,\"./controllers/StreamController.js\":57,\"./controllers/TextController.js\":58,\"./models/MediaPlayerModel.js\":64,\"./models/MetricsModel.js\":65,\"./rules/RulesController.js\":69,\"./utils/ErrorHandler.js\":90,\"./utils/RequestModifier.js\":94}],41:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _voTextTrackInfoJs = _dereq_('./vo/TextTrackInfo.js');\n\nvar _voTextTrackInfoJs2 = _interopRequireDefault(_voTextTrackInfoJs);\n\nvar _dashUtilsFragmentedTextBoxParserJs = _dereq_('../dash/utils/FragmentedTextBoxParser.js');\n\nvar _dashUtilsFragmentedTextBoxParserJs2 = _interopRequireDefault(_dashUtilsFragmentedTextBoxParserJs);\n\nvar _utilsBoxParserJs = _dereq_('./utils/BoxParser.js');\n\nvar _utilsBoxParserJs2 = _interopRequireDefault(_utilsBoxParserJs);\n\nvar _utilsCustomTimeRangesJs = _dereq_('./utils/CustomTimeRanges.js');\n\nvar _utilsCustomTimeRangesJs2 = _interopRequireDefault(_utilsCustomTimeRangesJs);\n\nvar _coreFactoryMakerJs = _dereq_('../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreDebugJs = _dereq_('../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nvar _modelsVideoModelJs = _dereq_('./models/VideoModel.js');\n\nvar _modelsVideoModelJs2 = _interopRequireDefault(_modelsVideoModelJs);\n\nvar _TextTracksJs = _dereq_('./TextTracks.js');\n\nvar _TextTracksJs2 = _interopRequireDefault(_TextTracksJs);\n\nvar _codemIsoboxer = _dereq_('codem-isoboxer');\n\nvar _codemIsoboxer2 = _interopRequireDefault(_codemIsoboxer);\n\nvar _externalsCea608ParserJs = _dereq_('../../externals/cea608-parser.js');\n\nvar _externalsCea608ParserJs2 = _interopRequireDefault(_externalsCea608ParserJs);\n\nfunction TextSourceBuffer() {\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n var embeddedInitialized = false;\n var captionId = 0;\n\n var instance = undefined,\n boxParser = undefined,\n errHandler = undefined,\n adapter = undefined,\n dashManifestModel = undefined,\n mediaController = undefined,\n allTracksAreDisabled = undefined,\n parser = undefined,\n VTTParser = undefined,\n TTMLParser = undefined,\n fragmentedTextBoxParser = undefined,\n mediaInfos = undefined,\n textTracks = undefined,\n isFragmented = undefined,\n fragmentModel = undefined,\n initializationSegmentReceived = undefined,\n timescale = undefined,\n fragmentedTracks = undefined,\n videoModel = undefined,\n streamController = undefined,\n firstSubtitleStart = undefined,\n currFragmentedTrackIdx = undefined,\n embeddedTracks = undefined,\n embeddedInitializationSegmentReceived = undefined,\n embeddedTimescale = undefined,\n embeddedLastSequenceNumber = undefined,\n embeddedSequenceNumbers = undefined,\n embeddedCea608FieldParsers = undefined;\n\n function initialize(type, bufferController) {\n allTracksAreDisabled = false;\n parser = null;\n fragmentModel = null;\n initializationSegmentReceived = false;\n timescale = NaN;\n fragmentedTracks = [];\n firstSubtitleStart = null;\n\n if (!embeddedInitialized) {\n initEmbedded();\n }\n\n var streamProcessor = bufferController.getStreamProcessor();\n\n mediaInfos = streamProcessor.getMediaInfoArr();\n textTracks.setConfig({ videoModel: videoModel });\n textTracks.initialize();\n isFragmented = !dashManifestModel.getIsTextTrack(type);\n boxParser = (0, _utilsBoxParserJs2['default'])(context).getInstance();\n fragmentedTextBoxParser = (0, _dashUtilsFragmentedTextBoxParserJs2['default'])(context).getInstance();\n fragmentedTextBoxParser.setConfig({ boxParser: boxParser });\n\n if (isFragmented) {\n fragmentModel = streamProcessor.getFragmentModel();\n this.buffered = (0, _utilsCustomTimeRangesJs2['default'])(context).create();\n fragmentedTracks = mediaController.getTracksFor('fragmentedText', streamController.getActiveStreamInfo());\n var currFragTrack = mediaController.getCurrentTrackFor('fragmentedText', streamController.getActiveStreamInfo());\n for (var i = 0; i < fragmentedTracks.length; i++) {\n if (fragmentedTracks[i] === currFragTrack) {\n currFragmentedTrackIdx = i;\n break;\n }\n }\n }\n }\n\n function initEmbedded() {\n embeddedTracks = [];\n mediaInfos = [];\n videoModel = (0, _modelsVideoModelJs2['default'])(context).getInstance();\n textTracks = (0, _TextTracksJs2['default'])(context).getInstance();\n textTracks.setConfig({ videoModel: videoModel });\n textTracks.initialize();\n boxParser = (0, _utilsBoxParserJs2['default'])(context).getInstance();\n fragmentedTextBoxParser = (0, _dashUtilsFragmentedTextBoxParserJs2['default'])(context).getInstance();\n fragmentedTextBoxParser.setConfig({ boxParser: boxParser });\n isFragmented = false;\n currFragmentedTrackIdx = null;\n embeddedInitializationSegmentReceived = false;\n embeddedTimescale = 0;\n embeddedCea608FieldParsers = [];\n embeddedSequenceNumbers = [];\n embeddedLastSequenceNumber = null;\n embeddedInitialized = true;\n }\n\n function append(bytes, chunk) {\n var result, sampleList, i, samplesInfo, ccContent;\n var mediaInfo = chunk.mediaInfo;\n var mediaType = mediaInfo.type;\n var mimeType = mediaInfo.mimeType;\n var codecType = mediaInfo.codec || mimeType;\n if (!codecType) {\n log('No text type defined');\n return;\n }\n\n function createTextTrackFromMediaInfo(captionData, mediaInfo) {\n var textTrackInfo = new _voTextTrackInfoJs2['default']();\n var trackKindMap = { subtitle: 'subtitles', caption: 'captions' }; //Dash Spec has no \"s\" on end of KIND but HTML needs plural.\n var getKind = function getKind() {\n var kind = mediaInfo.roles.length > 0 ? trackKindMap[mediaInfo.roles[0]] : trackKindMap.caption;\n kind = kind === trackKindMap.caption || kind === trackKindMap.subtitle ? kind : trackKindMap.caption;\n return kind;\n };\n\n var checkTTML = function checkTTML() {\n var ttml = false;\n if (mediaInfo.codec && mediaInfo.codec.search('stpp') >= 0) {\n ttml = true;\n }\n if (mediaInfo.mimeType && mediaInfo.mimeType.search('ttml') >= 0) {\n ttml = true;\n }\n return ttml;\n };\n\n textTrackInfo.captionData = captionData;\n textTrackInfo.lang = mediaInfo.lang;\n textTrackInfo.label = mediaInfo.id; // AdaptationSet id (an unsigned int)\n textTrackInfo.index = mediaInfo.index; // AdaptationSet index in manifest\n textTrackInfo.isTTML = checkTTML();\n textTrackInfo.video = videoModel.getElement();\n textTrackInfo.defaultTrack = getIsDefault(mediaInfo);\n textTrackInfo.isFragmented = isFragmented;\n textTrackInfo.isEmbedded = mediaInfo.isEmbedded ? true : false;\n textTrackInfo.kind = getKind();\n var totalNrTracks = (mediaInfos ? mediaInfos.length : 0) + embeddedTracks.length;\n textTracks.addTextTrack(textTrackInfo, totalNrTracks);\n }\n\n if (mediaType === 'fragmentedText') {\n if (!initializationSegmentReceived) {\n initializationSegmentReceived = true;\n for (i = 0; i < mediaInfos.length; i++) {\n createTextTrackFromMediaInfo(null, mediaInfos[i]);\n }\n timescale = fragmentedTextBoxParser.getMediaTimescaleFromMoov(bytes);\n } else {\n samplesInfo = fragmentedTextBoxParser.getSamplesInfo(bytes);\n sampleList = samplesInfo.sampleList;\n if (!firstSubtitleStart && sampleList.length > 0) {\n firstSubtitleStart = sampleList[0].cts - chunk.start * timescale;\n }\n if (codecType.search('stpp') >= 0) {\n parser = parser !== null ? parser : getParser(codecType);\n for (i = 0; i < sampleList.length; i++) {\n var _sample = sampleList[i];\n var sampleStart = _sample.cts;\n var sampleRelStart = sampleStart - firstSubtitleStart;\n this.buffered.add(sampleRelStart / timescale, (sampleRelStart + _sample.duration) / timescale);\n var dataView = new DataView(bytes, _sample.offset, _sample.size);\n ccContent = _codemIsoboxer2['default'].Utils.dataViewToString(dataView, 'utf-8');\n try {\n result = parser.parse(ccContent, sampleStart / timescale, (sampleStart + _sample.duration) / timescale);\n textTracks.addCaptions(currFragmentedTrackIdx, firstSubtitleStart / timescale, result);\n } catch (e) {\n log('TTML parser error: ' + e.message);\n }\n }\n } else {\n // WebVTT case\n var captionArray = [];\n for (i = 0; i < sampleList.length; i++) {\n var sample = sampleList[i];\n sample.cts -= firstSubtitleStart;\n this.buffered.add(sample.cts / timescale, (sample.cts + sample.duration) / timescale);\n var sampleData = bytes.slice(sample.offset, sample.offset + sample.size);\n // There are boxes inside the sampleData, so we need a ISOBoxer to get at it.\n var sampleBoxes = _codemIsoboxer2['default'].parseBuffer(sampleData);\n\n for (var j = 0; j < sampleBoxes.boxes.length; j++) {\n var box1 = sampleBoxes.boxes[j];\n log('VTT box1: ' + box1.type);\n if (box1.type === 'vtte') {\n continue; //Empty box\n }\n if (box1.type === 'vttc') {\n log('VTT vttc boxes.length = ' + box1.boxes.length);\n for (var k = 0; k < box1.boxes.length; k++) {\n var box2 = box1.boxes[k];\n log('VTT box2: ' + box2.type);\n if (box2.type === 'payl') {\n var cue_text = box2.cue_text;\n log('VTT cue_text = ' + cue_text);\n var start_time = sample.cts / timescale;\n var end_time = (sample.cts + sample.duration) / timescale;\n captionArray.push({\n start: start_time,\n end: end_time,\n data: cue_text,\n styles: {}\n });\n log('VTT ' + start_time + '-' + end_time + ' : ' + cue_text);\n }\n }\n }\n }\n }\n if (captionArray.length > 0) {\n textTracks.addCaptions(currFragmentedTrackIdx, 0, captionArray);\n }\n }\n }\n } else if (mediaType === 'text') {\n var dataView = new DataView(bytes, 0, bytes.byteLength);\n ccContent = _codemIsoboxer2['default'].Utils.dataViewToString(dataView, 'utf-8');\n\n try {\n result = getParser(codecType).parse(ccContent);\n createTextTrackFromMediaInfo(result, mediaInfo);\n } catch (e) {\n errHandler.timedTextError(e, 'parse', ccContent);\n }\n } else if (mediaType === 'video') {\n //embedded text\n if (chunk.segmentType === 'InitializationSegment') {\n if (embeddedTimescale === 0) {\n embeddedTimescale = fragmentedTextBoxParser.getMediaTimescaleFromMoov(bytes);\n for (i = 0; i < embeddedTracks.length; i++) {\n createTextTrackFromMediaInfo(null, embeddedTracks[i]);\n }\n }\n } else {\n // MediaSegment\n if (embeddedTimescale === 0) {\n log('CEA-608: No timescale for embeddedTextTrack yet');\n return;\n }\n var makeCueAdderForIndex = function makeCueAdderForIndex(self, trackIndex) {\n function newCue(startTime, endTime, captionScreen) {\n var captionsArray = null;\n if (videoModel.getTTMLRenderingDiv()) {\n captionsArray = createHTMLCaptionsFromScreen(videoModel.getElement(), startTime, endTime, captionScreen);\n } else {\n var text = captionScreen.getDisplayText();\n //log(\"CEA text: \" + startTime + \"-\" + endTime + \" '\" + text + \"'\");\n captionsArray = [{ start: startTime, end: endTime, data: text, styles: {} }];\n }\n if (captionsArray) {\n textTracks.addCaptions(trackIndex, 0, captionsArray);\n }\n }\n return newCue;\n };\n\n samplesInfo = fragmentedTextBoxParser.getSamplesInfo(bytes);\n var sequenceNumber = samplesInfo.sequenceNumber;\n\n if (!embeddedCea608FieldParsers[0] && !embeddedCea608FieldParsers[1]) {\n // Time to setup the CEA-608 parsing\n var field = undefined,\n handler = undefined,\n trackIdx = undefined;\n for (i = 0; i < embeddedTracks.length; i++) {\n if (embeddedTracks[i].id === 'CC1') {\n field = 0;\n trackIdx = textTracks.getTrackIdxForId('CC1');\n } else if (embeddedTracks[i].id === 'CC3') {\n field = 1;\n trackIdx = textTracks.getTrackIdxForId('CC3');\n }\n if (trackIdx === -1) {\n log('CEA-608: data before track is ready.');\n return;\n }\n handler = makeCueAdderForIndex(this, trackIdx);\n embeddedCea608FieldParsers[i] = new _externalsCea608ParserJs2['default'].Cea608Parser(i, { 'newCue': handler }, null);\n }\n }\n\n if (embeddedTimescale && embeddedSequenceNumbers.indexOf(sequenceNumber) == -1) {\n if (embeddedLastSequenceNumber !== null && sequenceNumber !== embeddedLastSequenceNumber + 1) {\n for (i = 0; i < embeddedCea608FieldParsers.length; i++) {\n if (embeddedCea608FieldParsers[i]) {\n embeddedCea608FieldParsers[i].reset();\n }\n }\n }\n var allCcData = extractCea608Data(bytes);\n\n for (var fieldNr = 0; fieldNr < embeddedCea608FieldParsers.length; fieldNr++) {\n var ccData = allCcData.fields[fieldNr];\n var fieldParser = embeddedCea608FieldParsers[fieldNr];\n if (fieldParser) {\n /*if (ccData.length > 0 ) {\n log(\"CEA-608 adding Data to field \" + fieldNr + \" \" + ccData.length + \"bytes\");\n }*/\n for (i = 0; i < ccData.length; i++) {\n fieldParser.addData(ccData[i][0] / embeddedTimescale, ccData[i][1]);\n }\n if (allCcData.endTime) {\n fieldParser.cueSplitAtTime(allCcData.endTime / embeddedTimescale);\n }\n }\n }\n embeddedLastSequenceNumber = sequenceNumber;\n embeddedSequenceNumbers.push(sequenceNumber);\n }\n }\n }\n }\n /**\n * Extract CEA-608 data from a buffer of data.\n * @parameter(data) ArrayBuffer of data\n * @returns ccData corresponding to one segment.\n */\n function extractCea608Data(data) {\n\n /** Insert [time, data] pairs in order into array. */\n var insertInOrder = function insertInOrder(arr, time, data) {\n var len = arr.length;\n if (len > 0) {\n if (time >= arr[len - 1][0]) {\n arr.push([time, data]);\n } else {\n for (var pos = len - 1; pos >= 0; pos--) {\n if (time < arr[pos][0]) {\n arr.splice(pos, 0, [time, data]);\n break;\n }\n }\n }\n } else {\n arr.push([time, data]);\n }\n };\n\n var isoFile = boxParser.parse(data);\n var moof = isoFile.getBox('moof');\n var tfdt = isoFile.getBox('tfdt');\n //var tfhd = isoFile.getBox('tfhd'); //Can have a base_data_offset and other default values\n //log(\"tfhd: \" + tfhd);\n //var saio = isoFile.getBox('saio'); // Offset possibly\n //var saiz = isoFile.getBox('saiz'); // Possible sizes\n var truns = isoFile.getBoxes('trun'); //\n var trun = null;\n\n if (truns.length === 0) {\n return null;\n }\n trun = truns[0];\n if (truns.length > 1) {\n log('Warning: Too many truns');\n }\n var baseOffset = moof.offset + trun.data_offset;\n //Doublecheck that trun.offset == moof.size + 8\n var sampleCount = trun.sample_count;\n var startPos = baseOffset;\n var baseSampleTime = tfdt.baseMediaDecodeTime;\n var raw = new DataView(data);\n var allCcData = { 'startTime': null, 'endTime': null, fields: [[], []] };\n var accDuration = 0;\n for (var i = 0; i < sampleCount; i++) {\n var sample = trun.samples[i];\n var sampleTime = baseSampleTime + accDuration + sample.sample_composition_time_offset;\n var cea608Ranges = _externalsCea608ParserJs2['default'].findCea608Nalus(raw, startPos, sample.sample_size);\n for (var j = 0; j < cea608Ranges.length; j++) {\n var ccData = _externalsCea608ParserJs2['default'].extractCea608DataFromRange(raw, cea608Ranges[j]);\n for (var k = 0; k < 2; k++) {\n if (ccData[k].length > 0) {\n insertInOrder(allCcData.fields[k], sampleTime, ccData[k]);\n }\n }\n }\n\n accDuration += sample.sample_duration;\n startPos += sample.sample_size;\n }\n var endSampleTime = baseSampleTime + accDuration;\n allCcData.startTime = baseSampleTime;\n allCcData.endTime = endSampleTime;\n return allCcData;\n }\n\n /* HTML Rendering functions */\n function checkIndent(chars) {\n var line = '';\n\n for (var c = 0; c < chars.length; ++c) {\n var uc = chars[c];\n line += uc.uchar;\n }\n\n var l = line.length;\n var ll = line.replace(/^\\s+/, '').length;\n return l - ll;\n }\n\n function getRegionProperties(region) {\n return 'left: ' + region.x * 3.125 + '%; top: ' + region.y1 * 6.66 + '%; width: ' + (100 - region.x * 3.125) + '%; height: ' + Math.max(region.y2 - 1 - region.y1, 1) * 6.66 + '%; align-items: flex-start; overflow: visible; -webkit-writing-mode: horizontal-tb;';\n }\n\n function createRGB(color) {\n if (color == 'red') {\n return 'rgb(255, 0, 0)';\n } else if (color == 'green') {\n return 'rgb(0, 255, 0)';\n } else if (color == 'blue') {\n return 'rgb(0, 0, 255)';\n } else if (color == 'cyan') {\n return 'rgb(0, 255, 255)';\n } else if (color == 'magenta') {\n return 'rgb(255, 0, 255)';\n } else if (color == 'yellow') {\n return 'rgb(255, 255, 0)';\n } else if (color == 'white') {\n return 'rgb(255, 255, 255)';\n } else if (color == 'black') {\n return 'rgb(0, 0, 0)';\n }\n return color;\n }\n\n function getStyle(videoElement, style) {\n var fontSize = videoElement.videoHeight / 15.0;\n if (style) {\n return 'font-size: ' + fontSize + 'px; font-family: Menlo, Consolas, \\'Cutive Mono\\', monospace; color: ' + (style.foreground ? createRGB(style.foreground) : 'rgb(255, 255, 255)') + '; font-style: ' + (style.italics ? 'italic' : 'normal') + '; text-decoration: ' + (style.underline ? 'underline' : 'none') + '; white-space: pre; background-color: ' + (style.background ? createRGB(style.background) : 'transparent') + ';';\n } else {\n return 'font-size: ' + fontSize + 'px; font-family: Menlo, Consolas, \\'Cutive Mono\\', monospace; justify-content: flex-start; text-align: left; color: rgb(255, 255, 255); font-style: normal; white-space: pre; line-height: normal; font-weight: normal; text-decoration: none; width: 100%; display: flex;';\n }\n }\n\n function ltrim(s) {\n var trimmed = s.replace(/^\\s+/g, '');\n return trimmed;\n }\n function rtrim(s) {\n var trimmed = s.replace(/\\s+$/g, '');\n return trimmed;\n }\n\n function createHTMLCaptionsFromScreen(videoElement, startTime, endTime, captionScreen) {\n\n var currRegion = null;\n var existingRegion = null;\n var lastRowHasText = false;\n var lastRowIndentL = -1;\n var currP = { start: startTime, end: endTime, spans: [] };\n var currentStyle = 'style_cea608_white_black';\n var seenRegions = {};\n var styleStates = {};\n var regions = [];\n var r = undefined,\n s = undefined;\n\n for (r = 0; r < 15; ++r) {\n var row = captionScreen.rows[r];\n var line = '';\n var prevPenState = null;\n\n if (false === row.isEmpty()) {\n /* Row is not empty */\n\n /* Get indentation of this row */\n var rowIndent = checkIndent(row.chars);\n\n /* Create a new region is there is none */\n if (currRegion === null) {\n currRegion = { x: rowIndent, y1: r, y2: r + 1, p: [] };\n }\n\n /* Check if indentation has changed and we had text of last row */\n if (rowIndent !== lastRowIndentL && lastRowHasText) {\n currRegion.p.push(currP);\n currP = { start: startTime, end: endTime, spans: [] };\n currRegion.y2 = r;\n currRegion.name = 'region_' + currRegion.x + '_' + currRegion.y1 + '_' + currRegion.y2;\n if (false === seenRegions.hasOwnProperty(currRegion.name)) {\n regions.push(currRegion);\n seenRegions[currRegion.name] = currRegion;\n } else {\n existingRegion = seenRegions[currRegion.name];\n existingRegion.p.contat(currRegion.p);\n }\n\n currRegion = { x: rowIndent, y1: r, y2: r + 1, p: [] };\n }\n\n for (var c = 0; c < row.chars.length; ++c) {\n var uc = row.chars[c];\n var currPenState = uc.penState;\n if (prevPenState === null || !currPenState.equals(prevPenState)) {\n if (line.trim().length > 0) {\n currP.spans.push({ name: currentStyle, line: line, row: r });\n line = '';\n }\n\n var currPenStateString = 'style_cea608_' + currPenState.foreground + '_' + currPenState.background;\n if (currPenState.underline) {\n currPenStateString += '_underline';\n }\n if (currPenState.italics) {\n currPenStateString += '_italics';\n }\n\n if (!styleStates.hasOwnProperty(currPenStateString)) {\n styleStates[currPenStateString] = JSON.parse(JSON.stringify(currPenState));\n }\n\n prevPenState = currPenState;\n\n currentStyle = currPenStateString;\n }\n\n line += uc.uchar;\n }\n\n if (line.trim().length > 0) {\n currP.spans.push({ name: currentStyle, line: line, row: r });\n }\n\n lastRowHasText = true;\n lastRowIndentL = rowIndent;\n } else {\n /* Row is empty */\n lastRowHasText = false;\n lastRowIndentL = -1;\n\n if (currRegion) {\n currRegion.p.push(currP);\n currP = { start: startTime, end: endTime, spans: [] };\n currRegion.y2 = r;\n currRegion.name = 'region_' + currRegion.x + '_' + currRegion.y1 + '_' + currRegion.y2;\n if (false === seenRegions.hasOwnProperty(currRegion.name)) {\n regions.push(currRegion);\n seenRegions[currRegion.name] = currRegion;\n } else {\n existingRegion = seenRegions[currRegion.name];\n existingRegion.p.contat(currRegion.p);\n }\n\n currRegion = null;\n }\n }\n }\n\n if (currRegion) {\n currRegion.p.push(currP);\n currRegion.y2 = r + 1;\n currRegion.name = 'region_' + currRegion.x + '_' + currRegion.y1 + '_' + currRegion.y2;\n if (false === seenRegions.hasOwnProperty(currRegion.name)) {\n regions.push(currRegion);\n seenRegions[currRegion.name] = currRegion;\n } else {\n existingRegion = seenRegions[currRegion.name];\n existingRegion.p.contat(currRegion.p);\n }\n\n currRegion = null;\n }\n\n //log(styleStates);\n //log(regions);\n\n var captionsArray = [];\n\n /* Loop thru regions */\n for (r = 0; r < regions.length; ++r) {\n var region = regions[r];\n\n var cueID = 'sub_' + captionId++;\n var finalDiv = document.createElement('div');\n finalDiv.id = 'subtitle_' + cueID;\n var cueRegionProperties = getRegionProperties(region);\n finalDiv.style.cssText = 'position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;' + cueRegionProperties;\n\n var bodyDiv = document.createElement('div');\n bodyDiv.className = 'paragraph bodyStyle';\n bodyDiv.style.cssText = getStyle(videoElement);\n\n var cueUniWrapper = document.createElement('div');\n cueUniWrapper.className = 'cueUniWrapper';\n cueUniWrapper.style.cssText = 'unicode-bidi: normal; direction: ltr;';\n\n for (var p = 0; p < region.p.length; ++p) {\n var ptag = region.p[p];\n var lastSpanRow = 0;\n for (s = 0; s < ptag.spans.length; ++s) {\n var span = ptag.spans[s];\n if (span.line.length > 0) {\n if (s !== 0 && lastSpanRow != span.row) {\n var brElement = document.createElement('br');\n brElement.className = 'lineBreak';\n cueUniWrapper.appendChild(brElement);\n }\n var sameRow = false;\n if (lastSpanRow === span.row) {\n sameRow = true;\n }\n lastSpanRow = span.row;\n var spanStyle = styleStates[span.name];\n var spanElement = document.createElement('span');\n spanElement.className = 'spanPadding ' + span.name + ' customSpanColor';\n spanElement.style.cssText = getStyle(videoElement, spanStyle);\n if (s !== 0 && sameRow) {\n if (s === ptag.spans.length - 1) {\n spanElement.textContent = rtrim(span.line);\n } else {\n spanElement.textContent = span.line;\n }\n } else {\n if (s === 0) {\n if (ptag.spans.length > 1) {\n /* Check if next text is on same row */\n if (span.row === ptag.spans[1].row) {\n /* Next element on same row, trim start */\n spanElement.textContent = ltrim(span.line);\n } else {\n /* Different rows, trim */\n spanElement.textContent = span.line.trim();\n }\n } else {\n spanElement.textContent = span.line.trim();\n }\n } else {\n spanElement.textContent = span.line.trim();\n }\n }\n cueUniWrapper.appendChild(spanElement);\n }\n }\n }\n\n bodyDiv.appendChild(cueUniWrapper);\n\n finalDiv.appendChild(bodyDiv);\n\n var fontSize = { 'bodyStyle': 90 };\n for (s in styleStates) {\n if (styleStates.hasOwnProperty(s)) {\n fontSize[s] = 90;\n }\n }\n\n captionsArray.push({ type: 'html',\n start: startTime,\n end: endTime,\n cueHTMLElement: finalDiv,\n cueID: cueID,\n cellResolution: [32, 15],\n isFromCEA608: true,\n regions: regions,\n regionID: region.name,\n videoHeight: videoElement.videoHeight,\n videoWidth: videoElement.videoWidth,\n fontSize: fontSize || {\n defaultFontSize: '100'\n },\n lineHeight: {},\n linePadding: {}\n });\n }\n return captionsArray;\n }\n\n function abort() {\n textTracks.deleteAllTextTracks();\n allTracksAreDisabled = false;\n parser = null;\n fragmentedTextBoxParser = null;\n mediaInfos = null;\n textTracks = null;\n isFragmented = false;\n fragmentModel = null;\n initializationSegmentReceived = false;\n timescale = NaN;\n fragmentedTracks = [];\n videoModel = null;\n streamController = null;\n embeddedInitialized = false;\n embeddedTracks = null;\n }\n\n function addEmbeddedTrack(mediaInfo) {\n if (!embeddedInitialized) {\n initEmbedded();\n }\n if (mediaInfo.id === 'CC1' || mediaInfo.id === 'CC3') {\n embeddedTracks.push(mediaInfo);\n } else {\n log('Warning: Embedded track ' + mediaInfo.id + ' not supported!');\n }\n }\n\n function resetEmbedded() {\n embeddedInitialized = false;\n embeddedTracks = [];\n embeddedCea608FieldParsers = [null, null];\n embeddedSequenceNumbers = [];\n embeddedLastSequenceNumber = null;\n }\n\n function getAllTracksAreDisabled() {\n return allTracksAreDisabled;\n }\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.errHandler) {\n errHandler = config.errHandler;\n }\n if (config.adapter) {\n adapter = config.adapter;\n }\n if (config.dashManifestModel) {\n dashManifestModel = config.dashManifestModel;\n }\n if (config.mediaController) {\n mediaController = config.mediaController;\n }\n if (config.videoModel) {\n videoModel = config.videoModel;\n }\n if (config.streamController) {\n streamController = config.streamController;\n }\n if (config.textTracks) {\n textTracks = config.textTracks;\n }\n if (config.VTTParser) {\n VTTParser = config.VTTParser;\n }\n if (config.TTMLParser) {\n TTMLParser = config.TTMLParser;\n }\n }\n\n function setTextTrack() {\n\n var el = videoModel.getElement();\n var tracks = el.textTracks;\n var ln = tracks.length;\n var nrNonEmbeddedTracks = ln - embeddedTracks.length;\n var oldTrackIdx = textTracks.getCurrentTrackIdx();\n\n for (var i = 0; i < ln; i++) {\n var track = tracks[i];\n allTracksAreDisabled = track.mode !== 'showing';\n if (track.mode === 'showing') {\n if (oldTrackIdx !== i) {\n // do not reset track if already the current track. This happens when all captions get turned off via UI and then turned on again and with videojs.\n textTracks.setCurrentTrackIdx(i);\n textTracks.addCaptions(i, 0, null); // Make sure that previously queued captions are added as cues\n if (isFragmented && i < nrNonEmbeddedTracks) {\n var currentFragTrack = mediaController.getCurrentTrackFor('fragmentedText', streamController.getActiveStreamInfo());\n var newFragTrack = fragmentedTracks[i];\n if (newFragTrack !== currentFragTrack) {\n fragmentModel.abortRequests();\n textTracks.deleteTrackCues(currentFragTrack);\n mediaController.setTrack(newFragTrack);\n currFragmentedTrackIdx = i;\n }\n }\n }\n break;\n }\n }\n\n if (allTracksAreDisabled) {\n textTracks.setCurrentTrackIdx(-1);\n }\n }\n\n function getIsDefault(mediaInfo) {\n //TODO How to tag default. currently same order as listed in manifest.\n // Is there a way to mark a text adaptation set as the default one? DASHIF meeting talk about using role which is being used for track KIND\n // Eg subtitles etc. You can have multiple role tags per adaptation Not defined in the spec yet.\n var isDefault = false;\n if (embeddedTracks.length > 1) {\n isDefault = mediaInfo.id && mediaInfo.id === 'CC1'; // CC1 if both CC1 and CC3 exist\n } else if (embeddedTracks.length === 1) {\n if (mediaInfo.id && mediaInfo.id.substring(0, 2) === 'CC') {\n // Either CC1 or CC3\n isDefault = true;\n }\n } else {\n isDefault = mediaInfo.index === mediaInfos[0].index;\n }\n return isDefault;\n }\n\n function getParser(codecType) {\n var parser;\n if (codecType.search('vtt') >= 0) {\n parser = VTTParser;\n } else if (codecType.search('ttml') >= 0 || codecType.search('stpp') >= 0) {\n parser = TTMLParser;\n parser.setConfig({ videoModel: videoModel });\n }\n return parser;\n }\n\n instance = {\n initialize: initialize,\n append: append,\n abort: abort,\n getAllTracksAreDisabled: getAllTracksAreDisabled,\n setTextTrack: setTextTrack,\n setConfig: setConfig,\n addEmbeddedTrack: addEmbeddedTrack,\n resetEmbedded: resetEmbedded\n };\n\n return instance;\n}\n\nTextSourceBuffer.__dashjs_factory_name = 'TextSourceBuffer';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(TextSourceBuffer);\nmodule.exports = exports['default'];\n\n},{\"../../externals/cea608-parser.js\":1,\"../core/Debug.js\":5,\"../core/FactoryMaker.js\":7,\"../dash/utils/FragmentedTextBoxParser.js\":18,\"./TextTracks.js\":42,\"./models/VideoModel.js\":67,\"./utils/BoxParser.js\":86,\"./utils/CustomTimeRanges.js\":88,\"./vo/TextTrackInfo.js\":109,\"codem-isoboxer\":4}],42:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreEventBusJs = _dereq_('../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreDebugJs = _dereq_('../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nfunction TextTracks() {\n\n var context = this.context;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n\n var instance = undefined,\n Cue = undefined,\n videoModel = undefined,\n video = undefined,\n textTrackQueue = undefined,\n trackElementArr = undefined,\n currentTrackIdx = undefined,\n actualVideoLeft = undefined,\n actualVideoTop = undefined,\n actualVideoWidth = undefined,\n actualVideoHeight = undefined,\n captionContainer = undefined,\n videoSizeCheckInterval = undefined,\n isChrome = undefined,\n fullscreenAttribute = undefined,\n displayCCOnTop = undefined,\n topZIndex = undefined;\n\n function initialize() {\n Cue = window.VTTCue || window.TextTrackCue;\n textTrackQueue = [];\n trackElementArr = [];\n currentTrackIdx = -1;\n actualVideoLeft = 0;\n actualVideoTop = 0;\n actualVideoWidth = 0;\n actualVideoHeight = 0;\n captionContainer = null;\n videoSizeCheckInterval = null;\n displayCCOnTop = false;\n topZIndex = 2147483647;\n\n //TODO Check if IE has resolved issues: Then revert to not using the addTextTrack API for all browsers.\n // https://connect.microsoft.com/IE/feedbackdetail/view/1660701/text-tracks-do-not-fire-change-addtrack-or-removetrack-events\n // https://connect.microsoft.com/IE/feedback/details/1573380/htmltrackelement-track-addcue-throws-invalidstateerror-when-adding-new-cue\n // Same issue with Firefox.\n //isIE11orEdge = !!navigator.userAgent.match(/Trident.*rv[ :]*11\\./) || navigator.userAgent.match(/Edge/);\n //isFirefox = !!navigator.userAgent.match(/Firefox/);\n isChrome = !!navigator.userAgent.match(/Chrome/) && !navigator.userAgent.match(/Edge/);\n if (document.fullscreenElement !== undefined) {\n fullscreenAttribute = 'fullscreenElement'; // Standard and Edge\n } else if (document.webkitIsFullScreen !== undefined) {\n fullscreenAttribute = 'webkitIsFullScreen'; // Chrome and Safari (and Edge)\n } else if (document.msFullscreenElement) {\n // IE11\n fullscreenAttribute = 'msFullscreenElement';\n } else if (document.mozFullScreen) {\n // Firefox\n fullscreenAttribute = 'mozFullScreen';\n }\n }\n\n function createTrackForUserAgent(i) {\n var kind = textTrackQueue[i].kind;\n var label = textTrackQueue[i].label !== undefined ? textTrackQueue[i].label : textTrackQueue[i].lang;\n var lang = textTrackQueue[i].lang;\n var track = isChrome ? document.createElement('track') : video.addTextTrack(kind, label, lang);\n\n if (isChrome) {\n track.kind = kind;\n track.label = label;\n track.srclang = lang;\n }\n\n return track;\n }\n\n function displayCConTop(value) {\n displayCCOnTop = value;\n if (!captionContainer || document[fullscreenAttribute]) return;\n captionContainer.style.zIndex = value ? topZIndex : null;\n }\n\n function addTextTrack(textTrackInfoVO, totalTextTracks) {\n\n if (textTrackQueue.length === totalTextTracks) {\n log('Trying to add too many tracks.');\n return;\n }\n\n textTrackQueue.push(textTrackInfoVO);\n if (video === undefined) {\n video = textTrackInfoVO.video;\n }\n\n if (textTrackQueue.length === totalTextTracks) {\n textTrackQueue.sort(function (a, b) {\n //Sort in same order as in manifest\n return a.index - b.index;\n });\n captionContainer = videoModel.getTTMLRenderingDiv();\n var defaultIndex = -1;\n for (var i = 0; i < textTrackQueue.length; i++) {\n var track = createTrackForUserAgent.call(this, i);\n trackElementArr.push(track); //used to remove tracks from video element when added manually\n\n if (textTrackQueue[i].defaultTrack) {\n // track.default is an object property identifier that is a reserved word\n // The following jshint directive is used to suppressed the warning \"Expected an identifier and instead saw 'default' (a reserved word)\"\n /*jshint -W024 */\n track['default'] = true;\n defaultIndex = i;\n }\n if (isChrome) {\n video.appendChild(track);\n }\n var textTrack = video.textTracks[i];\n textTrack.nonAddedCues = [];\n if (captionContainer && (textTrackQueue[i].isTTML || textTrackQueue[i].isEmbedded)) {\n textTrack.renderingType = 'html';\n } else {\n textTrack.renderingType = 'default';\n }\n this.addCaptions(i, 0, textTrackQueue[i].captionData);\n eventBus.trigger(_coreEventsEventsJs2['default'].TEXT_TRACK_ADDED);\n }\n setCurrentTrackIdx.call(this, defaultIndex);\n if (defaultIndex >= 0) {\n video.textTracks[defaultIndex].mode = 'showing';\n this.addCaptions(defaultIndex, 0, null);\n }\n eventBus.trigger(_coreEventsEventsJs2['default'].TEXT_TRACKS_ADDED, { index: currentTrackIdx, tracks: textTrackQueue }); //send default idx.\n }\n }\n\n function getVideoVisibleVideoSize(viewWidth, viewHeight, videoWidth, videoHeight, aspectRatio, use80Percent) {\n var viewAspectRatio = viewWidth / viewHeight;\n var videoAspectRatio = videoWidth / videoHeight;\n\n var videoPictureX = 0;\n var videoPictureY = 0;\n var videoPictureWidth = 0;\n var videoPictureHeight = 0;\n\n if (viewAspectRatio > videoAspectRatio) {\n videoPictureHeight = viewHeight;\n videoPictureWidth = videoPictureHeight / videoHeight * videoWidth;\n videoPictureX = (viewWidth - videoPictureWidth) / 2;\n videoPictureY = 0;\n } else {\n videoPictureWidth = viewWidth;\n videoPictureHeight = videoPictureWidth / videoWidth * videoHeight;\n videoPictureX = 0;\n videoPictureY = (viewHeight - videoPictureHeight) / 2;\n }\n\n var videoPictureXAspect = 0;\n var videoPictureYAspect = 0;\n var videoPictureWidthAspect = 0;\n var videoPictureHeightAspect = 0;\n var videoPictureAspect = videoPictureWidth / videoPictureHeight;\n\n if (videoPictureAspect > aspectRatio) {\n videoPictureHeightAspect = videoPictureHeight;\n videoPictureWidthAspect = videoPictureHeight / (1 / aspectRatio);\n videoPictureXAspect = (viewWidth - videoPictureWidthAspect) / 2;\n videoPictureYAspect = 0;\n } else {\n videoPictureWidthAspect = videoPictureWidth;\n videoPictureHeightAspect = videoPictureWidth / aspectRatio;\n videoPictureXAspect = 0;\n videoPictureYAspect = (viewHeight - videoPictureHeightAspect) / 2;\n }\n\n if (use80Percent) {\n return { x: videoPictureXAspect + videoPictureWidthAspect * 0.1,\n y: videoPictureYAspect + videoPictureHeightAspect * 0.1,\n w: videoPictureWidthAspect * 0.8,\n h: videoPictureHeightAspect * 0.8 }; /* Maximal picture size in videos aspect ratio */\n } else {\n return { x: videoPictureXAspect,\n y: videoPictureYAspect,\n w: videoPictureWidthAspect,\n h: videoPictureHeightAspect }; /* Maximal picture size in videos aspect ratio */\n }\n }\n\n function checkVideoSize() {\n var track = this.getCurrentTextTrack();\n if (track && track.renderingType === 'html') {\n // Create aspect ratio from cellResolutions\n var aspectRatio = 1;\n if (track.cellResolution) {\n aspectRatio = track.cellResolution[0] / track.cellResolution[1];\n }\n var use80Percent = false;\n if (track.isFromCEA608) {\n // If this is CEA608 then use predefined aspect ratio\n aspectRatio = 3.5 / 3.0;\n use80Percent = true;\n }\n\n var realVideoSize = getVideoVisibleVideoSize.call(this, video.clientWidth, video.clientHeight, video.videoWidth, video.videoHeight, aspectRatio, use80Percent);\n\n var newVideoWidth = realVideoSize.w;\n var newVideoHeight = realVideoSize.h;\n\n if (newVideoWidth != actualVideoWidth || newVideoHeight != actualVideoHeight) {\n actualVideoLeft = realVideoSize.x;\n actualVideoTop = realVideoSize.y;\n actualVideoWidth = newVideoWidth;\n actualVideoHeight = newVideoHeight;\n captionContainer.style.left = actualVideoLeft + 'px';\n captionContainer.style.top = actualVideoTop + 'px';\n captionContainer.style.width = actualVideoWidth + 'px';\n captionContainer.style.height = actualVideoHeight + 'px';\n\n // Video view has changed size, so resize any active cues\n for (var i = 0; track.activeCues && i < track.activeCues.length; ++i) {\n var cue = track.activeCues[i];\n cue.scaleCue(cue);\n }\n\n if (fullscreenAttribute && document[fullscreenAttribute] || displayCCOnTop) {\n captionContainer.style.zIndex = topZIndex;\n } else {\n captionContainer.style.zIndex = null;\n }\n }\n }\n }\n\n function scaleCue(activeCue) {\n var videoWidth = actualVideoWidth;\n var videoHeight = actualVideoHeight;\n var key, replaceValue, elements;\n\n var cellUnit = [videoWidth / activeCue.cellResolution[0], videoHeight / activeCue.cellResolution[1]];\n\n if (activeCue.linePadding) {\n for (key in activeCue.linePadding) {\n if (activeCue.linePadding.hasOwnProperty(key)) {\n var valueLinePadding = activeCue.linePadding[key];\n replaceValue = (valueLinePadding * cellUnit[0]).toString();\n // Compute the CellResolution unit in order to process properties using sizing (fontSize, linePadding, etc).\n var elementsSpan = document.getElementsByClassName('spanPadding');\n for (var i = 0; i < elementsSpan.length; i++) {\n elementsSpan[i].style.cssText = elementsSpan[i].style.cssText.replace(/(padding-left\\s*:\\s*)[\\d.,]+(?=\\s*px)/gi, '$1' + replaceValue);\n elementsSpan[i].style.cssText = elementsSpan[i].style.cssText.replace(/(padding-right\\s*:\\s*)[\\d.,]+(?=\\s*px)/gi, '$1' + replaceValue);\n }\n }\n }\n }\n\n if (activeCue.fontSize) {\n for (key in activeCue.fontSize) {\n if (activeCue.fontSize.hasOwnProperty(key)) {\n var valueFontSize = activeCue.fontSize[key] / 100;\n replaceValue = (valueFontSize * cellUnit[1]).toString();\n\n if (key !== 'defaultFontSize') {\n elements = document.getElementsByClassName(key);\n } else {\n elements = document.getElementsByClassName('paragraph');\n }\n\n for (var j = 0; j < elements.length; j++) {\n elements[j].style.cssText = elements[j].style.cssText.replace(/(font-size\\s*:\\s*)[\\d.,]+(?=\\s*px)/gi, '$1' + replaceValue);\n }\n }\n }\n }\n\n if (activeCue.lineHeight) {\n for (key in activeCue.lineHeight) {\n if (activeCue.lineHeight.hasOwnProperty(key)) {\n var valueLineHeight = activeCue.lineHeight[key] / 100;\n replaceValue = (valueLineHeight * cellUnit[1]).toString();\n elements = document.getElementsByClassName(key);\n for (var k = 0; k < elements.length; k++) {\n elements[k].style.cssText = elements[k].style.cssText.replace(/(line-height\\s*:\\s*)[\\d.,]+(?=\\s*px)/gi, '$1' + replaceValue);\n }\n }\n }\n }\n }\n\n /**\n * Add captions to track, store for later adding, or add captions added before\n */\n function addCaptions(trackIdx, timeOffset, captionData) {\n var track = trackIdx >= 0 ? video.textTracks[trackIdx] : null;\n var self = this;\n\n if (!track) return;\n if (track.mode !== 'showing') {\n if (captionData && captionData.length > 0) {\n track.nonAddedCues = track.nonAddedCues.concat(captionData);\n }\n return;\n }\n\n if (!captionData) {\n captionData = track.nonAddedCues;\n track.nonAddedCues = [];\n }\n\n if (!captionData || captionData.length === 0) {\n return;\n }\n\n for (var item in captionData) {\n var cue;\n var currentItem = captionData[item];\n\n track.cellResolution = currentItem.cellResolution;\n track.isFromCEA608 = currentItem.isFromCEA608;\n\n if (!videoSizeCheckInterval && currentItem.type == 'html') {\n videoSizeCheckInterval = setInterval(checkVideoSize.bind(this), 500);\n }\n\n //image subtitle extracted from TTML\n if (currentItem.type == 'image') {\n cue = new Cue(currentItem.start - timeOffset, currentItem.end - timeOffset, '');\n cue.image = currentItem.data;\n cue.id = currentItem.id;\n cue.size = 0; //discard the native display for this subtitles\n cue.type = 'image'; // active image overlay\n cue.onenter = function () {\n var img = new Image();\n img.id = 'ttmlImage_' + this.id;\n img.src = this.image;\n img.className = 'cue-image';\n if (captionContainer) {\n captionContainer.appendChild(img);\n } else {\n video.parentNode.appendChild(img);\n }\n };\n\n cue.onexit = function () {\n var container, i, imgs;\n if (captionContainer) {\n container = captionContainer;\n } else {\n container = video.parentNode;\n }\n imgs = container.childNodes;\n for (i = 0; i < imgs.length; i++) {\n if (imgs[i].id == 'ttmlImage_' + this.id) {\n container.removeChild(imgs[i]);\n }\n }\n };\n } else if (currentItem.type === 'html') {\n cue = new Cue(currentItem.start - timeOffset, currentItem.end - timeOffset, '');\n cue.cueHTMLElement = currentItem.cueHTMLElement;\n cue.regions = currentItem.regions;\n cue.regionID = currentItem.regionID;\n cue.cueID = currentItem.cueID;\n cue.videoWidth = currentItem.videoWidth;\n cue.videoHeight = currentItem.videoHeight;\n cue.cellResolution = currentItem.cellResolution;\n cue.fontSize = currentItem.fontSize;\n cue.lineHeight = currentItem.lineHeight;\n cue.linePadding = currentItem.linePadding;\n cue.scaleCue = scaleCue.bind(self);\n captionContainer.style.left = actualVideoLeft + 'px';\n captionContainer.style.top = actualVideoTop + 'px';\n captionContainer.style.width = actualVideoWidth + 'px';\n captionContainer.style.height = actualVideoHeight + 'px';\n\n cue.onenter = function () {\n if (track.mode == 'showing') {\n captionContainer.appendChild(this.cueHTMLElement);\n scaleCue.call(self, this);\n }\n };\n\n cue.onexit = function () {\n var divs = captionContainer.childNodes;\n for (var i = 0; i < divs.length; ++i) {\n if (divs[i].id == 'subtitle_' + this.cueID) {\n captionContainer.removeChild(divs[i]);\n }\n }\n };\n } else {\n cue = new Cue(currentItem.start - timeOffset, currentItem.end - timeOffset, currentItem.data);\n if (currentItem.styles) {\n if (currentItem.styles.align !== undefined && cue.hasOwnProperty('align')) {\n cue.align = currentItem.styles.align;\n }\n if (currentItem.styles.line !== undefined && cue.hasOwnProperty('line')) {\n cue.line = currentItem.styles.line;\n }\n if (currentItem.styles.position !== undefined && cue.hasOwnProperty('position')) {\n cue.position = currentItem.styles.position;\n }\n if (currentItem.styles.size !== undefined && cue.hasOwnProperty('size')) {\n cue.size = currentItem.styles.size;\n }\n }\n }\n\n track.addCue(cue);\n }\n }\n\n function getCurrentTextTrack() {\n return currentTrackIdx >= 0 ? video.textTracks[currentTrackIdx] : null;\n }\n\n function getCurrentTrackIdx() {\n return currentTrackIdx;\n }\n\n function getTrackIdxForId(trackId) {\n var idx = -1;\n for (var i = 0; i < video.textTracks.length; i++) {\n if (video.textTracks[i].label === trackId) {\n idx = i;\n break;\n }\n }\n return idx;\n }\n\n function setCurrentTrackIdx(idx) {\n currentTrackIdx = idx;\n clearCues.call(this);\n if (idx >= 0) {\n var track = video.textTracks[idx];\n if (track.renderingType === 'html') {\n setNativeCueStyle.call(this);\n } else {\n removeNativeCueStyle.call(this);\n }\n } else {\n removeNativeCueStyle.call(this);\n }\n }\n\n function getTextTrack(idx) {\n return video.textTracks[idx];\n }\n\n function deleteTrackCues(track) {\n if (track.cues) {\n var cues = track.cues;\n var lastIdx = cues.length - 1;\n\n for (var r = lastIdx; r >= 0; r--) {\n track.removeCue(cues[r]);\n }\n\n track.mode = 'disabled';\n }\n }\n\n function deleteAllTextTracks() {\n var ln = trackElementArr.length;\n for (var i = 0; i < ln; i++) {\n if (isChrome) {\n video.removeChild(trackElementArr[i]);\n } else {\n var track = getTextTrack.call(this, i);\n track.nonAddedCues = [];\n deleteTrackCues.call(this, track);\n }\n }\n trackElementArr = [];\n textTrackQueue = [];\n if (videoSizeCheckInterval) {\n clearInterval(videoSizeCheckInterval);\n videoSizeCheckInterval = null;\n }\n clearCues.call(this);\n }\n\n function deleteTextTrack(idx) {\n video.removeChild(trackElementArr[idx]);\n trackElementArr.splice(idx, 1);\n }\n\n /* Set native cue style to transparent background to avoid it being displayed. */\n function setNativeCueStyle() {\n if (!isChrome) return;\n var styleElement = document.getElementById('native-cue-style');\n if (styleElement) return; //Already set\n\n styleElement = document.createElement('style');\n styleElement.id = 'native-cue-style';\n document.head.appendChild(styleElement);\n var stylesheet = styleElement.sheet;\n if (video.id) {\n stylesheet.insertRule('#' + video.id + '::cue {background: transparent}', 0);\n } else if (video.classList.length !== 0) {\n stylesheet.insertRule('.' + video.className + '::cue {background: transparent}', 0);\n } else {\n stylesheet.insertRule('video::cue {background: transparent}', 0);\n }\n }\n\n /* Remove the extra cue style with transparent background for native cues. */\n function removeNativeCueStyle() {\n if (!isChrome) return;\n var styleElement = document.getElementById('native-cue-style');\n if (styleElement) {\n document.head.removeChild(styleElement);\n }\n }\n\n function clearCues() {\n if (captionContainer) {\n while (captionContainer.firstChild) {\n captionContainer.removeChild(captionContainer.firstChild);\n }\n }\n }\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.videoModel) {\n videoModel = config.videoModel;\n }\n }\n\n instance = {\n initialize: initialize,\n displayCConTop: displayCConTop,\n addTextTrack: addTextTrack,\n addCaptions: addCaptions,\n getTextTrack: getTextTrack,\n getCurrentTextTrack: getCurrentTextTrack,\n getCurrentTrackIdx: getCurrentTrackIdx,\n setCurrentTrackIdx: setCurrentTrackIdx,\n getTrackIdxForId: getTrackIdxForId,\n deleteTrackCues: deleteTrackCues,\n deleteAllTextTracks: deleteAllTextTracks,\n deleteTextTrack: deleteTextTrack,\n setConfig: setConfig\n };\n\n return instance;\n}\n\nTextTracks.__dashjs_factory_name = 'TextTracks';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(TextTracks);\nmodule.exports = exports['default'];\n\n},{\"../core/Debug.js\":5,\"../core/EventBus.js\":6,\"../core/FactoryMaker.js\":7,\"../core/events/Events.js\":9}],43:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n * Represents data structure to keep and drive {@link DataChunk}\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _controllersMediaControllerJs = _dereq_('./controllers/MediaController.js');\n\nvar _controllersMediaControllerJs2 = _interopRequireDefault(_controllersMediaControllerJs);\n\nvar _utilsCustomTimeRangesJs = _dereq_('./utils/CustomTimeRanges.js');\n\nvar _utilsCustomTimeRangesJs2 = _interopRequireDefault(_utilsCustomTimeRangesJs);\n\nvar _voMetricsHTTPRequestJs = _dereq_('./vo/metrics/HTTPRequest.js');\n\nvar _voMetricsHTTPRequestJs2 = _interopRequireDefault(_voMetricsHTTPRequestJs);\n\nvar _coreEventBusJs = _dereq_('../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction VirtualBuffer() {\n\n var context = this.context;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var instance = undefined,\n data = undefined,\n sourceBufferController = undefined;\n\n function setup() {\n data = {};\n }\n\n /**\n * Adds DataChunk to array of chunks\n * @param {@link DataChunk}\n * @memberof VirtualBuffer#\n */\n function append(chunk) {\n var streamId = chunk.streamId;\n var mediaType = chunk.mediaInfo.type;\n var segmentType = chunk.segmentType;\n var start = chunk.start;\n var end = chunk.end;\n\n data[streamId] = data[streamId] || createDataStorage();\n data[streamId][mediaType][segmentType].push(chunk);\n sortArrayByProperty(data[streamId][mediaType][segmentType], 'index');\n\n if (!isNaN(start) && !isNaN(end)) {\n data[streamId][mediaType].calculatedBufferedRanges.add(start, end);\n eventBus.trigger(_coreEventsEventsJs2['default'].CHUNK_APPENDED, { chunk: chunk, sender: this });\n }\n }\n\n /**\n * Adds DataChunk to array of appended chunks and updates virual ranges of appended chunks\n * @param {@link DataChunk}\n * @param buffer {SourceBuffer}\n * @memberof VirtualBuffer#\n */\n function storeAppendedChunk(chunk, buffer) {\n if (!chunk || !buffer) return;\n\n // after the media segment has bee appended we check how the buffered ranges of SourceBuffer have been change. The\n // difference is the actual buffered range of the appended segment.\n // We need to update actualBufferedRanges so that it reflects SourceBuffer ranges.\n // Also we store the appended chunk so that any BufferController has access to the list\n // of appended chunks.\n var streamId = chunk.streamId;\n var mediaType = chunk.mediaInfo.type;\n var bufferedRanges = data[streamId][mediaType].actualBufferedRanges;\n var oldChunk = getChunks({ streamId: streamId, mediaType: mediaType, appended: true, start: chunk.start })[0];\n\n var diff, idx;\n\n if (oldChunk) {\n idx = data[streamId][mediaType].appended.indexOf(oldChunk);\n data[streamId][mediaType].appended[idx] = chunk;\n } else {\n data[streamId][mediaType].appended.push(chunk);\n }\n\n sortArrayByProperty(data[streamId][mediaType].appended, 'start');\n diff = sourceBufferController.getRangeDifference(bufferedRanges, buffer);\n\n if (!diff) {\n if (oldChunk) {\n chunk.bufferedRange = oldChunk.bufferedRange;\n } else {\n //TODO this is dirty fix for a case when segments are not aligned across representations and thus oldChunk is not found\n // We should not use a calculated range here, only actual one should be used, but we don't know yet how to find it.\n chunk.bufferedRange = { start: chunk.start, end: chunk.end };\n }\n return;\n }\n\n chunk.bufferedRange = diff;\n bufferedRanges.add(diff.start, diff.end);\n\n if (!oldChunk) return;\n\n // if there is an old chunk already appended for the same index, we may need to adjust bufferedRange of a new chunk, because\n // it may be not valid.\n //\n // Example:\n //\n // Before appending the old chunk\n //\n // 0|-----Range-------|4\n // 0|--occupied space-|4\n //\n // After appending the old chunk\n //\n // 0|-----------------Range----------------|10\n // 0|-occupied space-4|-------Old chunk----|10\n //\n // After clearing the buffer from 7s to 10s\n //\n // 0|-----------------Range----|7\n // 0|-occupied space-4|OldChunk|7\n //\n // Since the old chunk has been cut only partially, after appending the new chunk its range will be detected as\n //\n // |-----------------Range-----------------|10\n // |----occupied space--------7|-New chunk-|10\n // This is not a valid value because the actual range of a new chunk is the same as the original range of\n // the old chunk, so we do the following adjustment\n chunk.bufferedRange.start = Math.min(oldChunk.bufferedRange.start, diff.start);\n chunk.bufferedRange.end = Math.max(oldChunk.bufferedRange.end, diff.end);\n }\n\n /**\n * Updates virual ranges of appended chunks according to the given ranges\n * @param filter\n * @param ranges\n * @memberof VirtualBuffer#\n */\n function updateBufferedRanges(filter, ranges) {\n if (!filter) return;\n\n var streamId = filter.streamId;\n var mediaType = filter.mediaType;\n var appendedChunks = getChunks({ streamId: streamId, mediaType: mediaType, appended: true });\n\n var remainingChunks = [];\n var start, end;\n\n data[streamId][mediaType].actualBufferedRanges = (0, _utilsCustomTimeRangesJs2['default'])(context).create();\n\n if (!ranges || ranges.length === 0) {\n data[streamId][mediaType].appended = [];\n return;\n }\n\n for (var i = 0, ln = ranges.length; i < ln; i++) {\n start = ranges.start(i);\n end = ranges.end(i);\n data[streamId][mediaType].actualBufferedRanges.add(start, end);\n // we need to select chunks that belong only to the new ranges\n remainingChunks = remainingChunks.concat(findChunksForRange(appendedChunks, { start: start, end: end }, true));\n }\n\n data[streamId][mediaType].appended = remainingChunks;\n }\n\n /**\n * Finds and returns {@link DataChunk} that satisfies filtering options\n * @param filter - an object that contains properties by which the method search for chunks\n * @returns {Array}\n * @memberof VirtualBuffer#\n */\n function getChunks(filter) {\n var originData = findData(filter);\n var segmentType = filter.segmentType;\n var appended = filter.appended;\n var removeOrigin = filter.removeOrigin;\n var limit = filter.limit || Number.POSITIVE_INFINITY;\n var mediaController = (0, _controllersMediaControllerJs2['default'])(context).getInstance();\n\n var ln = 0;\n var result = [];\n var sourceArr;\n\n if (!originData) return result;\n\n delete filter.streamId;\n delete filter.mediaType;\n delete filter.segmentType;\n delete filter.removeOrigin;\n delete filter.limit;\n delete filter.appended;\n\n sourceArr = appended ? originData.appended : segmentType ? originData[segmentType] : [];\n\n result = sourceArr.filter(function (item, idx, arr) {\n if (ln >= limit) return false;\n\n for (var prop in filter) {\n if (prop === 'mediaInfo') {\n return mediaController.isTracksEqual(item[prop], filter[prop]);\n }\n\n if (filter.hasOwnProperty(prop) && item[prop] != filter[prop]) return false;\n }\n\n if (removeOrigin) {\n originData.calculatedBufferedRanges.remove(item.start, item.end);\n arr.splice(idx, 1);\n }\n\n ln++;\n\n return true;\n });\n\n if (filter.forRange) {\n result = findChunksForRange(result, filter.forRange, false);\n }\n\n return result;\n }\n\n /**\n * Finds and returns {@link DataChunk} that satisfies filtering options. Filtered chunks are removed\n * from the original array\n * @param filter - an object that contains properties by which the method search for chunks\n * @returns {Array}\n * @memberof VirtualBuffer#\n */\n function extract(filter) {\n filter.removeOrigin = true;\n return getChunks(filter);\n }\n\n /**\n * Calculates total buffer size across all Periods\n * @param {@link MediaInfo}\n * @returns {Number}\n * @memberof VirtualBuffer#\n */\n function getTotalBufferLevel(mediaInfo) {\n var mediaType = mediaInfo.type;\n var level = 0;\n\n for (var streamId in data) {\n if (data.hasOwnProperty(streamId)) {\n level += sourceBufferController.getTotalBufferedTime({ buffered: data[streamId][mediaType].calculatedBufferedRanges });\n }\n }\n\n return level;\n }\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.sourceBufferController) {\n sourceBufferController = config.sourceBufferController;\n }\n }\n\n /**\n * @memberof VirtualBuffer#\n */\n function reset() {\n data = {};\n }\n\n function sortArrayByProperty(array, sortProp) {\n var compare = function compare(obj1, obj2) {\n if (obj1[sortProp] < obj2[sortProp]) return -1;\n if (obj1[sortProp] > obj2[sortProp]) return 1;\n return 0;\n };\n\n array.sort(compare);\n }\n\n function findData(filter) {\n var streamId = filter.streamId;\n var mediaType = filter.mediaType;\n\n if (!data[streamId]) return null;\n\n return data[streamId][mediaType];\n }\n\n function findChunksForRange(chunks, range, truncateChunk) {\n var rangeStart = range.start;\n var rangeEnd = range.end;\n var chunksForRange = [];\n\n var chunkStart, chunkEnd, isStartIncluded, isEndIncluded;\n\n chunks.forEach(function (chunk) {\n chunkStart = chunk.bufferedRange.start;\n chunkEnd = chunk.bufferedRange.end;\n isStartIncluded = chunkStart >= rangeStart && chunkStart < rangeEnd;\n isEndIncluded = chunkEnd > rangeStart && chunkEnd <= rangeEnd;\n\n // if a segment has been partially removed from SourceBuffer we select it as well, but we\n // need to update its bufferedRange\n //\n // Example 1:\n // |-----------------Range----------------|\n // |----Chunk-----|\n // becomes\n // |-----------------Range----------------|\n // |----Chunk--|\n // Example 2:\n // |-----------------Range----------------|\n // |-------Chunk-----|\n // becomes\n // |-----------------Range----------------|\n // |-Chunk-----|\n\n if (isStartIncluded || isEndIncluded) {\n chunksForRange.push(chunk);\n\n if (truncateChunk) {\n chunk.bufferedRange.start = isStartIncluded ? chunkStart : rangeStart;\n chunk.bufferedRange.end = isEndIncluded ? chunkEnd : rangeEnd;\n }\n }\n });\n\n return chunksForRange;\n }\n\n function createDataStorage() {\n var data = {};\n\n data.audio = { calculatedBufferedRanges: (0, _utilsCustomTimeRangesJs2['default'])(context).create(),\n actualBufferedRanges: (0, _utilsCustomTimeRangesJs2['default'])(context).create(),\n appended: [] };\n data.audio[_voMetricsHTTPRequestJs2['default'].MEDIA_SEGMENT_TYPE] = [];\n data.audio[_voMetricsHTTPRequestJs2['default'].INIT_SEGMENT_TYPE] = [];\n data.video = { calculatedBufferedRanges: (0, _utilsCustomTimeRangesJs2['default'])(context).create(),\n actualBufferedRanges: (0, _utilsCustomTimeRangesJs2['default'])(context).create(),\n appended: [] };\n data.video[_voMetricsHTTPRequestJs2['default'].MEDIA_SEGMENT_TYPE] = [];\n data.video[_voMetricsHTTPRequestJs2['default'].INIT_SEGMENT_TYPE] = [];\n data.fragmentedText = { calculatedBufferedRanges: (0, _utilsCustomTimeRangesJs2['default'])(context).create(),\n actualBufferedRanges: (0, _utilsCustomTimeRangesJs2['default'])(context).create(),\n appended: [] };\n data.fragmentedText[_voMetricsHTTPRequestJs2['default'].MEDIA_SEGMENT_TYPE] = [];\n data.fragmentedText[_voMetricsHTTPRequestJs2['default'].INIT_SEGMENT_TYPE] = [];\n\n return data;\n }\n\n instance = {\n append: append,\n extract: extract,\n getChunks: getChunks,\n storeAppendedChunk: storeAppendedChunk,\n updateBufferedRanges: updateBufferedRanges,\n getTotalBufferLevel: getTotalBufferLevel,\n setConfig: setConfig,\n reset: reset\n };\n\n setup();\n return instance;\n}\nVirtualBuffer.__dashjs_factory_name = 'VirtualBuffer';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(VirtualBuffer);\nmodule.exports = exports['default'];\n\n},{\"../core/EventBus.js\":6,\"../core/FactoryMaker.js\":7,\"../core/events/Events.js\":9,\"./controllers/MediaController.js\":52,\"./utils/CustomTimeRanges.js\":88,\"./vo/metrics/HTTPRequest.js\":117}],44:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _voMetricsHTTPRequestJs = _dereq_('./vo/metrics/HTTPRequest.js');\n\nvar _voMetricsHTTPRequestJs2 = _interopRequireDefault(_voMetricsHTTPRequestJs);\n\nvar _coreFactoryMakerJs = _dereq_('../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _modelsMediaPlayerModelJs = _dereq_('./models/MediaPlayerModel.js');\n\nvar _modelsMediaPlayerModelJs2 = _interopRequireDefault(_modelsMediaPlayerModelJs);\n\n/**\n * @Module XHRLoader\n * @description Manages download of resources via HTTP.\n */\nfunction XHRLoader(cfg) {\n var context = this.context;\n\n //const log = Debug(context).getInstance().log;\n var mediaPlayerModel = (0, _modelsMediaPlayerModelJs2['default'])(context).getInstance();\n\n var errHandler = cfg.errHandler;\n var metricsModel = cfg.metricsModel;\n var requestModifier = cfg.requestModifier;\n\n var instance = undefined;\n var xhrs = undefined;\n var delayedXhrs = undefined;\n var retryTimers = undefined;\n var downloadErrorToRequestTypeMap = undefined;\n\n function setup() {\n var _downloadErrorToRequestTypeMap;\n\n xhrs = [];\n delayedXhrs = [];\n retryTimers = [];\n\n downloadErrorToRequestTypeMap = (_downloadErrorToRequestTypeMap = {}, _defineProperty(_downloadErrorToRequestTypeMap, _voMetricsHTTPRequestJs2['default'].MPD_TYPE, errHandler.DOWNLOAD_ERROR_ID_MANIFEST), _defineProperty(_downloadErrorToRequestTypeMap, _voMetricsHTTPRequestJs2['default'].XLINK_EXPANSION_TYPE, errHandler.DOWNLOAD_ERROR_ID_XLINK), _defineProperty(_downloadErrorToRequestTypeMap, _voMetricsHTTPRequestJs2['default'].INIT_SEGMENT_TYPE, errHandler.DOWNLOAD_ERROR_ID_CONTENT), _defineProperty(_downloadErrorToRequestTypeMap, _voMetricsHTTPRequestJs2['default'].MEDIA_SEGMENT_TYPE, errHandler.DOWNLOAD_ERROR_ID_CONTENT), _defineProperty(_downloadErrorToRequestTypeMap, _voMetricsHTTPRequestJs2['default'].INDEX_SEGMENT_TYPE, errHandler.DOWNLOAD_ERROR_ID_CONTENT), _defineProperty(_downloadErrorToRequestTypeMap, _voMetricsHTTPRequestJs2['default'].BITSTREAM_SWITCHING_SEGMENT_TYPE, errHandler.DOWNLOAD_ERROR_ID_CONTENT), _defineProperty(_downloadErrorToRequestTypeMap, _voMetricsHTTPRequestJs2['default'].OTHER_TYPE, errHandler.DOWNLOAD_ERROR_ID_CONTENT), _downloadErrorToRequestTypeMap);\n }\n\n function internalLoad(config, remainingAttempts) {\n\n var request = config.request;\n var xhr = ['audio', 'video', 'muxed'].indexOf(request.mediaType) > -1 && window.hola_cdn && window.hola_cdn.api && window.hola_cdn.api.new_http_request && window.hola_cdn.api.new_http_request(request) || new XMLHttpRequest();\n var traces = [];\n var firstProgress = true;\n var needFailureReport = true;\n var requestStartTime = new Date();\n var lastTraceTime = requestStartTime;\n var lastTraceReceivedCount = 0;\n\n var handleLoaded = function handleLoaded(success) {\n needFailureReport = false;\n\n request.requestStartDate = requestStartTime;\n request.requestEndDate = new Date();\n request.firstByteDate = request.firstByteDate || requestStartTime;\n\n if (!request.checkExistenceOnly) {\n metricsModel.addHttpRequest(request.mediaType, null, request.type, request.url, xhr.responseURL || null, request.serviceLocation || null, request.range || null, request.requestStartDate, request.firstByteDate, request.requestEndDate, xhr.status, request.duration, xhr.getAllResponseHeaders(), success ? traces : null);\n }\n };\n\n var onloadend = function onloadend() {\n if (xhrs.indexOf(xhr) === -1) {\n return;\n } else {\n xhrs.splice(xhrs.indexOf(xhr), 1);\n }\n\n if (needFailureReport) {\n handleLoaded(false);\n\n if (remainingAttempts > 0) {\n remainingAttempts--;\n retryTimers.push(setTimeout(function () {\n internalLoad(config, remainingAttempts);\n }, mediaPlayerModel.getRetryIntervalForType(request.type)));\n } else {\n errHandler.downloadError(downloadErrorToRequestTypeMap[request.type], request.url, request);\n\n if (config.error) {\n config.error(request, 'error', xhr.statusText);\n }\n\n if (config.complete) {\n config.complete(request, xhr.statusText);\n }\n }\n }\n };\n\n var progress = function progress(event) {\n var currentTime = new Date();\n\n if (firstProgress) {\n firstProgress = false;\n if (!event.lengthComputable || event.lengthComputable && event.total !== event.loaded) {\n request.firstByteDate = currentTime;\n }\n }\n\n if (event.lengthComputable) {\n request.bytesLoaded = event.loaded;\n request.bytesTotal = event.total;\n }\n\n traces.push({\n s: lastTraceTime,\n d: currentTime.getTime() - lastTraceTime.getTime(),\n b: [event.loaded ? event.loaded - lastTraceReceivedCount : 0]\n });\n\n lastTraceTime = currentTime;\n lastTraceReceivedCount = event.loaded;\n\n if (config.progress) {\n config.progress();\n }\n };\n\n var onload = function onload() {\n if (xhr.status >= 200 && xhr.status <= 299) {\n handleLoaded(true);\n\n if (config.success) {\n config.success(xhr.response, xhr.statusText, request);\n }\n\n if (config.complete) {\n config.complete(request, xhr.statusText);\n }\n }\n };\n\n try {\n var modifiedUrl = requestModifier.modifyRequestURL(request.url);\n var verb = request.checkExistenceOnly ? 'HEAD' : 'GET';\n\n xhr.open(verb, modifiedUrl, true);\n\n if (request.responseType) {\n xhr.responseType = request.responseType;\n }\n\n if (request.range) {\n xhr.setRequestHeader('Range', 'bytes=' + request.range);\n }\n\n if (!request.requestStartDate) {\n request.requestStartDate = requestStartTime;\n }\n\n xhr = requestModifier.modifyRequestHeader(xhr);\n\n xhr.onload = onload;\n xhr.onloadend = onloadend;\n xhr.onerror = onloadend;\n xhr.onprogress = progress;\n\n // Adds the ability to delay single fragment loading time to control buffer.\n var now = new Date().getTime();\n if (isNaN(request.delayLoadingTime) || now >= request.delayLoadingTime) {\n // no delay - just send xhr\n\n xhrs.push(xhr);\n xhr.send();\n } else {\n (function () {\n // delay\n var delayedXhr = { xhr: xhr };\n delayedXhrs.push(delayedXhr);\n delayedXhr.delayTimeout = setTimeout(function () {\n if (delayedXhrs.indexOf(delayedXhr) === -1) {\n return;\n } else {\n delayedXhrs.splice(delayedXhrs.indexOf(delayedXhr), 1);\n }\n try {\n xhrs.push(delayedXhr.xhr);\n delayedXhr.xhr.send();\n } catch (e) {\n delayedXhr.xhr.onerror();\n }\n }, request.delayLoadingTime - now);\n })();\n }\n } catch (e) {\n xhr.onerror();\n }\n }\n\n /**\n * Initiates a download of the resource described by config.request\n * @param {Object} config - contains request (FragmentRequest or derived type), and callbacks\n * @memberof module:XHRLoader\n * @instance\n */\n function load(config) {\n if (config.request) {\n internalLoad(config, mediaPlayerModel.getRetryAttemptsForType(config.request.type));\n }\n }\n\n /**\n * Aborts any inflight downloads\n * @memberof module:XHRLoader\n * @instance\n */\n function abort() {\n retryTimers.forEach(function (t) {\n return clearTimeout(t);\n });\n retryTimers = [];\n\n delayedXhrs.forEach(function (x) {\n return clearTimeout(x.delayTimeout);\n });\n delayedXhrs = [];\n\n xhrs.forEach(function (x) {\n // abort will trigger onloadend which we don't want\n // when deliberately aborting inflight requests -\n // set them to undefined so they are not called\n x.onloadend = x.onerror = undefined;\n x.abort();\n });\n xhrs = [];\n }\n\n instance = {\n load: load,\n abort: abort\n };\n\n setup();\n\n return instance;\n}\n\nXHRLoader.__dashjs_factory_name = 'XHRLoader';\n\nvar factory = _coreFactoryMakerJs2['default'].getClassFactory(XHRLoader);\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../core/FactoryMaker.js\":7,\"./models/MediaPlayerModel.js\":64,\"./vo/metrics/HTTPRequest.js\":117}],45:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _voErrorJs = _dereq_('./vo/Error.js');\n\nvar _voErrorJs2 = _interopRequireDefault(_voErrorJs);\n\nvar _XHRLoaderJs = _dereq_('./XHRLoader.js');\n\nvar _XHRLoaderJs2 = _interopRequireDefault(_XHRLoaderJs);\n\nvar _voMetricsHTTPRequestJs = _dereq_('./vo/metrics/HTTPRequest.js');\n\nvar _voMetricsHTTPRequestJs2 = _interopRequireDefault(_voMetricsHTTPRequestJs);\n\nvar _voTextRequestJs = _dereq_('./vo/TextRequest.js');\n\nvar _voTextRequestJs2 = _interopRequireDefault(_voTextRequestJs);\n\nvar _coreEventBusJs = _dereq_('../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar XLINK_LOADER_ERROR_LOADING_FAILURE = 1;\n\nfunction XlinkLoader(config) {\n\n var RESOLVE_TO_ZERO = 'urn:mpeg:dash:resolve-to-zero:2013';\n\n var context = this.context;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var xhrLoader = (0, _XHRLoaderJs2['default'])(context).create({\n errHandler: config.errHandler,\n metricsModel: config.metricsModel,\n requestModifier: config.requestModifier\n });\n\n var instance = undefined;\n\n function load(url, element, resolveObject) {\n var report = function report(content, resolveToZero) {\n element.resolved = true;\n element.resolvedContent = content ? content : null;\n\n eventBus.trigger(_coreEventsEventsJs2['default'].XLINK_ELEMENT_LOADED, {\n element: element,\n resolveObject: resolveObject,\n error: content || resolveToZero ? null : new _voErrorJs2['default'](XLINK_LOADER_ERROR_LOADING_FAILURE, 'Failed loading Xlink element: ' + url)\n });\n };\n\n if (url === RESOLVE_TO_ZERO) {\n report(null, true);\n } else {\n var request = new _voTextRequestJs2['default'](url, _voMetricsHTTPRequestJs2['default'].XLINK_TYPE);\n\n xhrLoader.load({\n request: request,\n success: function success(data) {\n report(data);\n },\n error: function error() {\n report(null);\n }\n });\n }\n }\n\n function reset() {\n if (xhrLoader) {\n xhrLoader.abort();\n xhrLoader = null;\n }\n }\n\n instance = {\n load: load,\n reset: reset\n };\n\n return instance;\n}\n\nXlinkLoader.__dashjs_factory_name = 'XlinkLoader';\n\nvar factory = _coreFactoryMakerJs2['default'].getClassFactory(XlinkLoader);\nfactory.XLINK_LOADER_ERROR_LOADING_FAILURE = XLINK_LOADER_ERROR_LOADING_FAILURE;\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../core/EventBus.js\":6,\"../core/FactoryMaker.js\":7,\"../core/events/Events.js\":9,\"./XHRLoader.js\":44,\"./vo/Error.js\":100,\"./vo/TextRequest.js\":108,\"./vo/metrics/HTTPRequest.js\":117}],46:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _rulesSwitchRequest = _dereq_('../rules/SwitchRequest');\n\nvar _rulesSwitchRequest2 = _interopRequireDefault(_rulesSwitchRequest);\n\nvar _voBitrateInfoJs = _dereq_('../vo/BitrateInfo.js');\n\nvar _voBitrateInfoJs2 = _interopRequireDefault(_voBitrateInfoJs);\n\nvar _utilsDOMStorageJs = _dereq_('../utils/DOMStorage.js');\n\nvar _utilsDOMStorageJs2 = _interopRequireDefault(_utilsDOMStorageJs);\n\nvar _rulesAbrABRRulesCollectionJs = _dereq_('../rules/abr/ABRRulesCollection.js');\n\nvar _rulesAbrABRRulesCollectionJs2 = _interopRequireDefault(_rulesAbrABRRulesCollectionJs);\n\nvar _modelsMediaPlayerModelJs = _dereq_('../models/MediaPlayerModel.js');\n\nvar _modelsMediaPlayerModelJs2 = _interopRequireDefault(_modelsMediaPlayerModelJs);\n\nvar _modelsFragmentModelJs = _dereq_('../models/FragmentModel.js');\n\nvar _modelsFragmentModelJs2 = _interopRequireDefault(_modelsFragmentModelJs);\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _modelsManifestModelJs = _dereq_('../models/ManifestModel.js');\n\nvar _modelsManifestModelJs2 = _interopRequireDefault(_modelsManifestModelJs);\n\nvar _dashModelsDashManifestModelJs = _dereq_('../../dash/models/DashManifestModel.js');\n\nvar _dashModelsDashManifestModelJs2 = _interopRequireDefault(_dashModelsDashManifestModelJs);\n\nvar _modelsVideoModelJs = _dereq_('../models/VideoModel.js');\n\nvar _modelsVideoModelJs2 = _interopRequireDefault(_modelsVideoModelJs);\n\nvar ABANDON_LOAD = 'abandonload';\nvar ALLOW_LOAD = 'allowload';\nvar DEFAULT_VIDEO_BITRATE = 1000;\nvar DEFAULT_AUDIO_BITRATE = 100;\n\nfunction AbrController() {\n\n var context = this.context;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var instance = undefined,\n abrRulesCollection = undefined,\n rulesController = undefined,\n streamController = undefined,\n autoSwitchBitrate = undefined,\n topQualities = undefined,\n qualityDict = undefined,\n confidenceDict = undefined,\n bitrateDict = undefined,\n ratioDict = undefined,\n averageThroughputDict = undefined,\n streamProcessorDict = undefined,\n abandonmentStateDict = undefined,\n abandonmentTimeout = undefined,\n limitBitrateByPortal = undefined,\n manifestModel = undefined,\n dashManifestModel = undefined,\n videoModel = undefined,\n mediaPlayerModel = undefined,\n domStorage = undefined;\n\n function setup() {\n autoSwitchBitrate = { video: true, audio: true };\n topQualities = {};\n qualityDict = {};\n confidenceDict = {};\n bitrateDict = {};\n ratioDict = {};\n averageThroughputDict = {};\n abandonmentStateDict = {};\n streamProcessorDict = {};\n limitBitrateByPortal = false;\n domStorage = (0, _utilsDOMStorageJs2['default'])(context).getInstance();\n mediaPlayerModel = (0, _modelsMediaPlayerModelJs2['default'])(context).getInstance();\n manifestModel = (0, _modelsManifestModelJs2['default'])(context).getInstance();\n dashManifestModel = (0, _dashModelsDashManifestModelJs2['default'])(context).getInstance();\n videoModel = (0, _modelsVideoModelJs2['default'])(context).getInstance();\n }\n\n function initialize(type, streamProcessor) {\n streamProcessorDict[type] = streamProcessor;\n abandonmentStateDict[type] = abandonmentStateDict[type] || {};\n abandonmentStateDict[type].state = ALLOW_LOAD;\n eventBus.on(_coreEventsEventsJs2['default'].LOADING_PROGRESS, onFragmentLoadProgress, this);\n }\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.abrRulesCollection) {\n abrRulesCollection = config.abrRulesCollection;\n }\n if (config.rulesController) {\n rulesController = config.rulesController;\n }\n if (config.streamController) {\n streamController = config.streamController;\n }\n }\n\n function getTopQualityIndexFor(type, id) {\n var idx;\n topQualities[id] = topQualities[id] || {};\n\n if (!topQualities[id].hasOwnProperty(type)) {\n topQualities[id][type] = 0;\n }\n\n idx = checkMaxBitrate(topQualities[id][type], type);\n idx = checkMaxRepresentationRatio(idx, type, topQualities[id][type]);\n idx = checkPortalSize(idx, type);\n return idx;\n }\n\n /**\n * @param type\n * @returns {number} A value of the initial bitrate, kbps\n * @memberof AbrController#\n */\n function getInitialBitrateFor(type) {\n\n var savedBitrate = domStorage.getSavedBitrateSettings(type);\n\n if (!bitrateDict.hasOwnProperty(type)) {\n if (ratioDict.hasOwnProperty(type)) {\n var manifest = manifestModel.getValue();\n var representation = dashManifestModel.getAdaptationForType(manifest, 0, type).Representation;\n\n if (Array.isArray(representation)) {\n bitrateDict[type] = representation[Math.round(representation.length * ratioDict[type]) - 1].bandwidth;\n } else {\n bitrateDict[type] = 0;\n }\n } else if (!isNaN(savedBitrate)) {\n bitrateDict[type] = savedBitrate;\n } else {\n bitrateDict[type] = type === 'video' ? DEFAULT_VIDEO_BITRATE : DEFAULT_AUDIO_BITRATE;\n }\n }\n\n return bitrateDict[type];\n }\n\n /**\n * @param type\n * @param {number} value A value of the initial bitrate, kbps\n * @memberof AbrController#\n */\n function setInitialBitrateFor(type, value) {\n bitrateDict[type] = value;\n }\n\n function getInitialRepresentationRatioFor(type) {\n if (!ratioDict.hasOwnProperty(type)) {\n return null;\n }\n\n return ratioDict[type];\n }\n\n function setInitialRepresentationRatioFor(type, value) {\n ratioDict[type] = value;\n }\n\n function getMaxAllowedBitrateFor(type) {\n if (bitrateDict.hasOwnProperty('max') && bitrateDict.max.hasOwnProperty(type)) {\n return bitrateDict.max[type];\n }\n return NaN;\n }\n\n //TODO change bitrateDict structure to hold one object for video and audio with initial and max values internal.\n // This means you need to update all the logic around initial bitrate DOMStorage, RebController etc...\n function setMaxAllowedBitrateFor(type, value) {\n bitrateDict.max = bitrateDict.max || {};\n bitrateDict.max[type] = value;\n }\n\n function getMaxAllowedRepresentationRatioFor(type) {\n if (ratioDict.hasOwnProperty('max') && ratioDict.max.hasOwnProperty(type)) {\n return ratioDict.max[type];\n }\n return 1;\n }\n\n function setMaxAllowedRepresentationRatioFor(type, value) {\n ratioDict.max = ratioDict.max || {};\n ratioDict.max[type] = value;\n }\n\n function getAutoSwitchBitrateFor(type) {\n return autoSwitchBitrate[type];\n }\n\n function setAutoSwitchBitrateFor(type, value) {\n autoSwitchBitrate[type] = value;\n }\n\n function getLimitBitrateByPortal() {\n return limitBitrateByPortal;\n }\n\n function setLimitBitrateByPortal(value) {\n limitBitrateByPortal = value;\n }\n\n function getPlaybackQuality(streamProcessor, completedCallback) {\n var type = streamProcessor.getType();\n var streamInfo = streamProcessor.getStreamInfo();\n var streamId = streamInfo.id;\n var quality, oldQuality, rules, confidence;\n var callback = function callback(res) {\n var topQualityIdx = getTopQualityIndexFor(type, streamId);\n\n quality = res.value;\n confidence = res.confidence;\n\n // be sure the quality valid!\n if (quality < 0) {\n quality = 0;\n }\n // zero based\n if (quality > topQualityIdx) {\n quality = topQualityIdx;\n }\n\n oldQuality = getQualityFor(type, streamInfo);\n if (quality !== oldQuality && (abandonmentStateDict[type].state === ALLOW_LOAD || quality > oldQuality)) {\n setInternalQuality(type, streamId, quality);\n setConfidenceFor(type, streamId, confidence);\n eventBus.trigger(_coreEventsEventsJs2['default'].QUALITY_CHANGED, { mediaType: type, streamInfo: streamProcessor.getStreamInfo(), oldQuality: oldQuality, newQuality: quality });\n }\n if (completedCallback) {\n completedCallback();\n }\n };\n\n quality = getQualityFor(type, streamInfo);\n confidence = getConfidenceFor(type, streamId);\n\n //log(\"ABR enabled? (\" + autoSwitchBitrate + \")\");\n if (!getAutoSwitchBitrateFor(type)) {\n if (completedCallback) {\n completedCallback();\n }\n } else {\n rules = abrRulesCollection.getRules(_rulesAbrABRRulesCollectionJs2['default'].QUALITY_SWITCH_RULES);\n rulesController.applyRules(rules, streamProcessor, callback, quality, function (currentValue, newValue) {\n currentValue = currentValue === _rulesSwitchRequest2['default'].NO_CHANGE ? 0 : currentValue;\n return Math.max(currentValue, newValue);\n });\n }\n }\n\n function setPlaybackQuality(type, streamInfo, newPlaybackQuality) {\n var id = streamInfo.id;\n var quality = getQualityFor(type, streamInfo);\n var isInt = newPlaybackQuality !== null && !isNaN(newPlaybackQuality) && newPlaybackQuality % 1 === 0;\n\n if (!isInt) throw 'argument is not an integer';\n\n if (newPlaybackQuality !== quality && newPlaybackQuality >= 0 && newPlaybackQuality <= getTopQualityIndexFor(type, id)) {\n setInternalQuality(type, id, newPlaybackQuality);\n eventBus.trigger(_coreEventsEventsJs2['default'].QUALITY_CHANGED, { mediaType: type, streamInfo: streamInfo, oldQuality: quality, newQuality: newPlaybackQuality });\n }\n }\n\n function setAbandonmentStateFor(type, state) {\n abandonmentStateDict[type].state = state;\n }\n\n function getAbandonmentStateFor(type) {\n return abandonmentStateDict[type].state;\n }\n\n /**\n * @param mediaInfo\n * @param bitrate A bitrate value, kbps\n * @returns {number} A quality index <= for the given bitrate\n * @memberof AbrController#\n */\n function getQualityForBitrate(mediaInfo, bitrate) {\n\n var bitrateList = getBitrateList(mediaInfo);\n var bitrateInfo = undefined;\n\n if (!bitrateList || bitrateList.length === 0) {\n return -1;\n }\n\n for (var i = bitrateList.length - 1; i >= 0; i--) {\n bitrateInfo = bitrateList[i];\n if (bitrate * 1000 >= bitrateInfo.bitrate) {\n return i;\n }\n }\n return 0;\n }\n\n /**\n * @param mediaInfo\n * @returns {Array} A list of {@link BitrateInfo} objects\n * @memberof AbrController#\n */\n function getBitrateList(mediaInfo) {\n if (!mediaInfo || !mediaInfo.bitrateList) return null;\n\n var bitrateList = mediaInfo.bitrateList;\n var type = mediaInfo.type;\n\n var infoList = [];\n var bitrateInfo;\n\n for (var i = 0, ln = bitrateList.length; i < ln; i++) {\n bitrateInfo = new _voBitrateInfoJs2['default']();\n bitrateInfo.mediaType = type;\n bitrateInfo.qualityIndex = i;\n bitrateInfo.bitrate = bitrateList[i].bandwidth;\n bitrateInfo.width = bitrateList[i].width;\n bitrateInfo.height = bitrateList[i].height;\n infoList.push(bitrateInfo);\n }\n\n return infoList;\n }\n\n function setAverageThroughput(type, value) {\n averageThroughputDict[type] = value;\n }\n\n function getAverageThroughput(type) {\n return averageThroughputDict[type];\n }\n\n function updateTopQualityIndex(mediaInfo) {\n var type = mediaInfo.type;\n var streamId = mediaInfo.streamInfo.id;\n var max = mediaInfo.representationCount - 1;\n\n setTopQualityIndex(type, streamId, max);\n\n return max;\n }\n\n function isPlayingAtTopQuality(streamInfo) {\n var isAtTop;\n var streamId = streamInfo.id;\n var audioQuality = getQualityFor('audio', streamInfo);\n var videoQuality = getQualityFor('video', streamInfo);\n\n isAtTop = audioQuality === getTopQualityIndexFor('audio', streamId) && videoQuality === getTopQualityIndexFor('video', streamId);\n\n return isAtTop;\n }\n\n function reset() {\n eventBus.off(_coreEventsEventsJs2['default'].LOADING_PROGRESS, onFragmentLoadProgress, this);\n clearTimeout(abandonmentTimeout);\n abandonmentTimeout = null;\n setup();\n }\n\n function getQualityFor(type, streamInfo) {\n var id = streamInfo.id;\n var quality;\n\n qualityDict[id] = qualityDict[id] || {};\n\n if (!qualityDict[id].hasOwnProperty(type)) {\n qualityDict[id][type] = 0;\n }\n\n quality = qualityDict[id][type];\n return quality;\n }\n\n function setInternalQuality(type, id, value) {\n qualityDict[id] = qualityDict[id] || {};\n qualityDict[id][type] = value;\n }\n\n function getConfidenceFor(type, id) {\n var confidence;\n\n confidenceDict[id] = confidenceDict[id] || {};\n\n if (!confidenceDict[id].hasOwnProperty(type)) {\n confidenceDict[id][type] = 0;\n }\n\n confidence = confidenceDict[id][type];\n\n return confidence;\n }\n\n function setConfidenceFor(type, id, value) {\n confidenceDict[id] = confidenceDict[id] || {};\n confidenceDict[id][type] = value;\n }\n\n function setTopQualityIndex(type, id, value) {\n topQualities[id] = topQualities[id] || {};\n topQualities[id][type] = value;\n }\n\n function checkMaxBitrate(idx, type) {\n var maxBitrate = getMaxAllowedBitrateFor(type);\n if (isNaN(maxBitrate) || !streamProcessorDict[type]) {\n return idx;\n }\n var maxIdx = getQualityForBitrate(streamProcessorDict[type].getMediaInfo(), maxBitrate);\n return Math.min(idx, maxIdx);\n }\n\n function checkMaxRepresentationRatio(idx, type, maxIdx) {\n var maxRepresentationRatio = getMaxAllowedRepresentationRatioFor(type);\n if (isNaN(maxRepresentationRatio) || maxRepresentationRatio >= 1 || maxRepresentationRatio < 0) {\n return idx;\n }\n return Math.min(idx, Math.round(maxIdx * maxRepresentationRatio));\n }\n\n function checkPortalSize(idx, type) {\n if (type !== 'video' || !limitBitrateByPortal || !streamProcessorDict[type]) {\n return idx;\n }\n\n var element = videoModel.getElement();\n var elementWidth = element.clientWidth;\n var elementHeight = element.clientHeight;\n var manifest = manifestModel.getValue();\n var representation = dashManifestModel.getAdaptationForType(manifest, 0, type).Representation;\n var newIdx = idx;\n\n if (elementWidth > 0 && elementHeight > 0) {\n while (newIdx > 0 && representation[newIdx] && elementWidth < representation[newIdx].width && elementWidth - representation[newIdx - 1].width < representation[newIdx].width - elementWidth) {\n newIdx = newIdx - 1;\n }\n\n if (representation.length - 2 >= newIdx && representation[newIdx].width === representation[newIdx + 1].width) {\n newIdx = Math.min(idx, newIdx + 1);\n }\n }\n\n return newIdx;\n }\n\n function onFragmentLoadProgress(e) {\n var type = e.request.mediaType;\n if (getAutoSwitchBitrateFor(type)) {\n //check to see if we are in manual or auto switch mode.\n\n var rules = abrRulesCollection.getRules(_rulesAbrABRRulesCollectionJs2['default'].ABANDON_FRAGMENT_RULES);\n var scheduleController = streamProcessorDict[type].getScheduleController();\n\n // There may be a fragment load in progress when we switch periods and recreated some controllers.\n // so return if that is the case.\n if (!scheduleController) return;\n\n var fragmentModel = scheduleController.getFragmentModel();\n var callback = function callback(switchRequest) {\n\n function setupTimeout(type) {\n abandonmentTimeout = setTimeout(function () {\n setAbandonmentStateFor(type, ALLOW_LOAD);\n }, mediaPlayerModel.getAbandonLoadTimeout());\n }\n\n if (switchRequest.confidence === _rulesSwitchRequest2['default'].STRONG) {\n\n var requests = fragmentModel.getRequests({ state: _modelsFragmentModelJs2['default'].FRAGMENT_MODEL_LOADING });\n var newQuality = switchRequest.value;\n var currentQuality = getQualityFor(type, streamController.getActiveStreamInfo());\n\n if (newQuality < currentQuality) {\n\n fragmentModel.abortRequests();\n setAbandonmentStateFor(type, ABANDON_LOAD);\n setPlaybackQuality(type, streamController.getActiveStreamInfo(), newQuality);\n scheduleController.replaceCanceledRequests(requests);\n setupTimeout(type);\n }\n }\n };\n\n rulesController.applyRules(rules, streamProcessorDict[type], callback, e, function (currentValue, newValue) {\n return newValue;\n });\n }\n }\n\n instance = {\n isPlayingAtTopQuality: isPlayingAtTopQuality,\n updateTopQualityIndex: updateTopQualityIndex,\n getAverageThroughput: getAverageThroughput,\n getBitrateList: getBitrateList,\n getQualityForBitrate: getQualityForBitrate,\n getMaxAllowedBitrateFor: getMaxAllowedBitrateFor,\n setMaxAllowedBitrateFor: setMaxAllowedBitrateFor,\n getMaxAllowedRepresentationRatioFor: getMaxAllowedRepresentationRatioFor,\n setMaxAllowedRepresentationRatioFor: setMaxAllowedRepresentationRatioFor,\n getInitialBitrateFor: getInitialBitrateFor,\n setInitialBitrateFor: setInitialBitrateFor,\n getInitialRepresentationRatioFor: getInitialRepresentationRatioFor,\n setInitialRepresentationRatioFor: setInitialRepresentationRatioFor,\n setAutoSwitchBitrateFor: setAutoSwitchBitrateFor,\n getAutoSwitchBitrateFor: getAutoSwitchBitrateFor,\n setLimitBitrateByPortal: setLimitBitrateByPortal,\n getLimitBitrateByPortal: getLimitBitrateByPortal,\n getConfidenceFor: getConfidenceFor,\n getQualityFor: getQualityFor,\n getAbandonmentStateFor: getAbandonmentStateFor,\n setAbandonmentStateFor: setAbandonmentStateFor,\n setPlaybackQuality: setPlaybackQuality,\n getPlaybackQuality: getPlaybackQuality,\n setAverageThroughput: setAverageThroughput,\n getTopQualityIndexFor: getTopQualityIndexFor,\n initialize: initialize,\n setConfig: setConfig,\n reset: reset\n };\n\n setup();\n\n return instance;\n}\n\nAbrController.__dashjs_factory_name = 'AbrController';\nvar factory = _coreFactoryMakerJs2['default'].getSingletonFactory(AbrController);\nfactory.ABANDON_LOAD = ABANDON_LOAD;\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7,\"../../core/events/Events.js\":9,\"../../dash/models/DashManifestModel.js\":17,\"../models/FragmentModel.js\":62,\"../models/ManifestModel.js\":63,\"../models/MediaPlayerModel.js\":64,\"../models/VideoModel.js\":67,\"../rules/SwitchRequest\":70,\"../rules/abr/ABRRulesCollection.js\":71,\"../utils/DOMStorage.js\":89,\"../vo/BitrateInfo.js\":98}],47:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _modelsBaseURLTreeModelJs = _dereq_('../models/BaseURLTreeModel.js');\n\nvar _modelsBaseURLTreeModelJs2 = _interopRequireDefault(_modelsBaseURLTreeModelJs);\n\nvar _utilsBaseURLSelectorJs = _dereq_('../utils/BaseURLSelector.js');\n\nvar _utilsBaseURLSelectorJs2 = _interopRequireDefault(_utilsBaseURLSelectorJs);\n\nvar _utilsURLUtilsJs = _dereq_('../utils/URLUtils.js');\n\nvar _utilsURLUtilsJs2 = _interopRequireDefault(_utilsURLUtilsJs);\n\nvar _dashVoBaseURLJs = _dereq_('../../dash/vo/BaseURL.js');\n\nvar _dashVoBaseURLJs2 = _interopRequireDefault(_dashVoBaseURLJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nfunction BaseURLController() {\n\n var instance = undefined;\n\n var context = this.context;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n var urlUtils = (0, _utilsURLUtilsJs2['default'])(context).getInstance();\n\n var baseURLTreeModel = undefined,\n baseURLSelector = undefined;\n\n function onBlackListChanged(e) {\n baseURLTreeModel.invalidateSelectedIndexes(e.entry);\n }\n\n function setup() {\n baseURLTreeModel = (0, _modelsBaseURLTreeModelJs2['default'])(context).create();\n baseURLSelector = (0, _utilsBaseURLSelectorJs2['default'])(context).create();\n\n eventBus.on(_coreEventsEventsJs2['default'].SERVICE_LOCATION_BLACKLIST_CHANGED, onBlackListChanged, instance);\n }\n\n function update(manifest) {\n baseURLTreeModel.update(manifest);\n baseURLSelector.chooseSelectorFromManifest(manifest);\n }\n\n function resolve(path) {\n var baseUrls = baseURLTreeModel.getForPath(path);\n\n var baseUrl = baseUrls.reduce(function (p, c) {\n var b = baseURLSelector.select(c);\n\n if (b) {\n if (!urlUtils.isRelative(b.url)) {\n p.url = b.url;\n p.serviceLocation = b.serviceLocation;\n } else {\n p.url += b.url;\n }\n }\n\n return p;\n }, new _dashVoBaseURLJs2['default']());\n\n if (!urlUtils.isRelative(baseUrl.url)) {\n return baseUrl;\n }\n }\n\n function reset() {\n baseURLTreeModel.reset();\n baseURLSelector.reset();\n }\n\n function initialize(data) {\n update(data);\n }\n\n instance = {\n reset: reset,\n initialize: initialize,\n resolve: resolve\n };\n\n setup();\n\n return instance;\n}\n\nBaseURLController.__dashjs_factory_name = 'BaseURLController';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(BaseURLController);\nmodule.exports = exports['default'];\n\n},{\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7,\"../../core/events/Events.js\":9,\"../../dash/vo/BaseURL.js\":26,\"../models/BaseURLTreeModel.js\":61,\"../utils/BaseURLSelector.js\":85,\"../utils/URLUtils.js\":96}],48:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nfunction BlackListController(config) {\n\n var blacklist = [];\n\n var eventBus = (0, _coreEventBusJs2['default'])(this.context).getInstance();\n var updateEventName = config.updateEventName;\n var loadFailedEventName = config.loadFailedEventName;\n\n function contains(query) {\n if (!blacklist.length || !query || !query.length) {\n return false;\n }\n\n return blacklist.indexOf(query) !== -1;\n }\n\n function add(entry) {\n if (blacklist.indexOf(entry) !== -1) {\n return;\n }\n\n blacklist.push(entry);\n\n eventBus.trigger(updateEventName, {\n entry: entry\n });\n }\n\n function onLoadFailed(e) {\n if (e.error) {\n add(e.request.serviceLocation);\n }\n }\n\n function setup() {\n if (loadFailedEventName) {\n eventBus.on(loadFailedEventName, onLoadFailed, this);\n }\n }\n\n function reset() {\n blacklist = [];\n }\n\n setup();\n\n return {\n add: add,\n contains: contains,\n reset: reset\n };\n}\n\nBlackListController.__dashjs_factory_name = 'BlackListController';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(BlackListController);\nmodule.exports = exports['default'];\n\n},{\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7}],49:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _modelsFragmentModelJs = _dereq_('../models/FragmentModel.js');\n\nvar _modelsFragmentModelJs2 = _interopRequireDefault(_modelsFragmentModelJs);\n\nvar _modelsMediaPlayerModelJs = _dereq_('../models/MediaPlayerModel.js');\n\nvar _modelsMediaPlayerModelJs2 = _interopRequireDefault(_modelsMediaPlayerModelJs);\n\nvar _voMetricsHTTPRequestJs = _dereq_('../vo/metrics/HTTPRequest.js');\n\nvar _voMetricsHTTPRequestJs2 = _interopRequireDefault(_voMetricsHTTPRequestJs);\n\nvar _SourceBufferControllerJs = _dereq_('./SourceBufferController.js');\n\nvar _SourceBufferControllerJs2 = _interopRequireDefault(_SourceBufferControllerJs);\n\nvar _AbrControllerJs = _dereq_('./AbrController.js');\n\nvar _AbrControllerJs2 = _interopRequireDefault(_AbrControllerJs);\n\nvar _PlaybackControllerJs = _dereq_('./PlaybackController.js');\n\nvar _PlaybackControllerJs2 = _interopRequireDefault(_PlaybackControllerJs);\n\nvar _MediaControllerJs = _dereq_('./MediaController.js');\n\nvar _MediaControllerJs2 = _interopRequireDefault(_MediaControllerJs);\n\nvar _utilsCustomTimeRangesJs = _dereq_('../utils/CustomTimeRanges.js');\n\nvar _utilsCustomTimeRangesJs2 = _interopRequireDefault(_utilsCustomTimeRangesJs);\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _utilsBoxParserJs = _dereq_('../utils/BoxParser.js');\n\nvar _utilsBoxParserJs2 = _interopRequireDefault(_utilsBoxParserJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreDebugJs = _dereq_('../../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nvar BUFFER_LOADED = 'bufferLoaded';\nvar BUFFER_EMPTY = 'bufferStalled';\nvar STALL_THRESHOLD = 0.5;\n\nfunction BufferController(config) {\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var metricsModel = config.metricsModel;\n var manifestModel = config.manifestModel;\n var sourceBufferController = config.sourceBufferController;\n var errHandler = config.errHandler;\n var mediaSourceController = config.mediaSourceController;\n var streamController = config.streamController;\n var mediaController = config.mediaController;\n var adapter = config.adapter;\n var virtualBuffer = config.virtualBuffer;\n var textSourceBuffer = config.textSourceBuffer;\n\n var instance = undefined,\n requiredQuality = undefined,\n currentQuality = undefined,\n isBufferingCompleted = undefined,\n bufferLevel = undefined,\n bufferTarget = undefined,\n criticalBufferLevel = undefined,\n mediaSource = undefined,\n maxAppendedIndex = undefined,\n lastIndex = undefined,\n type = undefined,\n buffer = undefined,\n bufferState = undefined,\n appendedBytesInfo = undefined,\n wallclockTicked = undefined,\n appendingMediaChunk = undefined,\n isAppendingInProgress = undefined,\n isPruningInProgress = undefined,\n inbandEventFound = undefined,\n playbackController = undefined,\n streamProcessor = undefined,\n abrController = undefined,\n fragmentController = undefined,\n scheduleController = undefined,\n mediaPlayerModel = undefined,\n clearBufferTimeout = undefined,\n extraData = undefined;\n\n function setup() {\n requiredQuality = -1;\n currentQuality = -1;\n isBufferingCompleted = false;\n bufferLevel = 0;\n bufferTarget = 0;\n criticalBufferLevel = Number.POSITIVE_INFINITY;\n maxAppendedIndex = -1;\n lastIndex = -1;\n buffer = null;\n bufferState = BUFFER_EMPTY;\n wallclockTicked = 0;\n appendingMediaChunk = false;\n isAppendingInProgress = false;\n isPruningInProgress = false;\n inbandEventFound = false;\n clearBufferTimeout = null;\n }\n\n function initialize(Type, Source, StreamProcessor) {\n type = Type;\n setMediaSource(Source);\n streamProcessor = StreamProcessor;\n mediaPlayerModel = (0, _modelsMediaPlayerModelJs2['default'])(context).getInstance();\n playbackController = (0, _PlaybackControllerJs2['default'])(context).getInstance();\n abrController = (0, _AbrControllerJs2['default'])(context).getInstance();\n fragmentController = streamProcessor.getFragmentController();\n scheduleController = streamProcessor.getScheduleController();\n requiredQuality = abrController.getQualityFor(type, streamProcessor.getStreamInfo());\n\n eventBus.on(_coreEventsEventsJs2['default'].DATA_UPDATE_COMPLETED, onDataUpdateCompleted, this);\n eventBus.on(_coreEventsEventsJs2['default'].INIT_FRAGMENT_LOADED, onInitFragmentLoaded, this);\n eventBus.on(_coreEventsEventsJs2['default'].MEDIA_FRAGMENT_LOADED, onMediaFragmentLoaded, this);\n eventBus.on(_coreEventsEventsJs2['default'].QUALITY_CHANGED, onQualityChanged, this);\n eventBus.on(_coreEventsEventsJs2['default'].STREAM_COMPLETED, onStreamCompleted, this);\n eventBus.on(_coreEventsEventsJs2['default'].PLAYBACK_PROGRESS, onPlaybackProgression, this);\n eventBus.on(_coreEventsEventsJs2['default'].PLAYBACK_TIME_UPDATED, onPlaybackProgression, this);\n eventBus.on(_coreEventsEventsJs2['default'].PLAYBACK_RATE_CHANGED, onPlaybackRateChanged, this);\n eventBus.on(_coreEventsEventsJs2['default'].PLAYBACK_SEEKING, onPlaybackSeeking, this);\n eventBus.on(_coreEventsEventsJs2['default'].WALLCLOCK_TIME_UPDATED, onWallclockTimeUpdated, this);\n eventBus.on(_coreEventsEventsJs2['default'].CURRENT_TRACK_CHANGED, onCurrentTrackChanged, this);\n eventBus.on(_coreEventsEventsJs2['default'].SOURCEBUFFER_APPEND_COMPLETED, onAppended, this);\n eventBus.on(_coreEventsEventsJs2['default'].SOURCEBUFFER_REMOVE_COMPLETED, onRemoved, this);\n eventBus.on(_coreEventsEventsJs2['default'].CHUNK_APPENDED, onChunkAppended, this);\n }\n\n function createBuffer(mediaInfo) {\n if (!mediaInfo || !mediaSource || !streamProcessor) return null;\n\n var sourceBuffer = null;\n\n try {\n sourceBuffer = sourceBufferController.createSourceBuffer(mediaSource, mediaInfo);\n\n if (sourceBuffer && sourceBuffer.hasOwnProperty('initialize')) {\n sourceBuffer.initialize(type, this);\n }\n } catch (e) {\n errHandler.mediaSourceError('Error creating ' + type + ' source buffer.');\n }\n\n setBuffer(sourceBuffer);\n updateBufferTimestampOffset(streamProcessor.getRepresentationInfoForQuality(requiredQuality).MSETimeOffset);\n // We may already have some segments in a virtual buffer by this moment. Let's try to append them to the real one.\n appendNext();\n\n return sourceBuffer;\n }\n\n function isActive() {\n var thisStreamId = streamProcessor.getStreamInfo().id;\n var activeStreamId = streamController.getActiveStreamInfo().id;\n\n return thisStreamId === activeStreamId;\n }\n\n function onInitFragmentLoaded(e) {\n // We received a new init chunk.\n // We just want to cache it in the virtual buffer here.\n // Then pass control to appendNext() to handle any other logic.\n\n var chunk;\n\n if (e.fragmentModel !== streamProcessor.getFragmentModel()) return;\n\n log('Initialization finished loading');\n chunk = e.chunk;\n // cache the initialization data to use it next time the quality has changed\n virtualBuffer.append(chunk);\n switchInitData(getStreamId(), requiredQuality);\n\n if (chunk.mediaInfo.type === 'video') {\n extraData = (0, _utilsBoxParserJs2['default'])(context).getInstance().avccExtraData(chunk.bytes);\n }\n }\n\n function onMediaFragmentLoaded(e) {\n if (e.fragmentModel !== streamProcessor.getFragmentModel()) return;\n\n var events;\n var chunk = e.chunk;\n var bytes = chunk.bytes;\n var quality = chunk.quality;\n var index = chunk.index;\n var request = streamProcessor.getFragmentModel().getRequests({ state: _modelsFragmentModelJs2['default'].FRAGMENT_MODEL_EXECUTED, quality: quality, index: index })[0];\n var currentRepresentation = streamProcessor.getRepresentationInfoForQuality(quality);\n var manifest = manifestModel.getValue();\n var eventStreamMedia = adapter.getEventsFor(manifest, currentRepresentation.mediaInfo, streamProcessor);\n var eventStreamTrack = adapter.getEventsFor(manifest, currentRepresentation, streamProcessor);\n\n if (eventStreamMedia.length > 0 || eventStreamTrack.length > 0) {\n events = handleInbandEvents(bytes, request, eventStreamMedia, eventStreamTrack);\n streamProcessor.getEventController().addInbandEvents(events);\n }\n\n if (mediaController.getInitialSettings('checkEncoding') && request.mediaType === 'video') {\n var samples = (0, _utilsBoxParserJs2['default'])(context).getInstance().getSyncSamples(extraData, bytes);\n eventBus.trigger(_coreEventsEventsJs2['default'].SEGMENT_SYNC_SAMPLES, { index: index, quality: quality, samples: samples });\n }\n\n chunk.bytes = deleteInbandEvents(bytes);\n\n virtualBuffer.append(chunk);\n appendNext();\n }\n\n function appendNext() {\n // If we have an appendingMediaChunk in progress, process it.\n // Otherwise, try to get a media chunk from the virtual buffer.\n // If we have no media chunk available, do nothing - return.\n // If the media chunk we have matches currentQuality, append the media chunk to the source buffer.\n // Otherwise, leave the media chunk in appendingMediaChunk and check the init chunk corresponding to the media chunk.\n // If we have the corresponding init chunk, append the init chunk to the source buffer; appendingMediaChunk will be processed shortly through onAppended().\n // Otherwise, fire the Events.INIT_REQUESTED event.\n if (!buffer || isAppendingInProgress || !hasEnoughSpaceToAppend()) return;\n\n var streamId = getStreamId();\n var chunk;\n\n if (appendingMediaChunk) {\n chunk = appendingMediaChunk;\n } else {\n\n chunk = virtualBuffer.extract({ streamId: streamId, mediaType: type, segmentType: _voMetricsHTTPRequestJs2['default'].MEDIA_SEGMENT_TYPE, limit: 1 })[0];\n if (!chunk) {\n return;\n }\n\n appendingMediaChunk = chunk;\n }\n\n if (chunk.quality === currentQuality) {\n appendingMediaChunk = false;\n appendToBuffer(chunk);\n } else {\n // we need to change currentQuality by init data\n switchInitData(streamId, appendingMediaChunk.quality);\n }\n }\n\n function switchInitData(streamId, quality) {\n\n var filter = { streamId: streamId, mediaType: type, segmentType: _voMetricsHTTPRequestJs2['default'].INIT_SEGMENT_TYPE, quality: quality };\n var chunk = virtualBuffer.getChunks(filter)[0];\n\n if (chunk) {\n if (!buffer) return;\n\n appendToBuffer(chunk);\n } else {\n // if we have not loaded the init fragment for the current quality, do it\n eventBus.trigger(_coreEventsEventsJs2['default'].INIT_REQUESTED, { sender: instance, requiredQuality: quality });\n }\n }\n\n function appendToBuffer(chunk) {\n isAppendingInProgress = true;\n appendedBytesInfo = chunk;\n sourceBufferController.append(buffer, chunk);\n\n if (chunk.mediaInfo.type === 'video') {\n if (chunk.mediaInfo.embeddedCaptions) {\n textSourceBuffer.append(chunk.bytes, chunk);\n }\n }\n }\n\n function onAppended(e) {\n if (buffer !== e.buffer) return;\n\n onPlaybackProgression();\n\n if (isBufferingCompleted && streamProcessor.getStreamInfo().isLast) {\n mediaSourceController.signalEndOfStream(mediaSource);\n }\n\n var ranges;\n\n if (e.error) {\n // if the append has failed because the buffer is full we should store the data\n // that has not been appended and stop request scheduling. We also need to store\n // the promise for this append because the next data can be appended only after\n // this promise is resolved.\n if (e.error.code === _SourceBufferControllerJs2['default'].QUOTA_EXCEEDED_ERROR_CODE) {\n virtualBuffer.append(appendedBytesInfo);\n criticalBufferLevel = sourceBufferController.getTotalBufferedTime(buffer) * 0.8;\n eventBus.trigger(_coreEventsEventsJs2['default'].QUOTA_EXCEEDED, { sender: instance, criticalBufferLevel: criticalBufferLevel });\n clearBuffer(getClearRange());\n }\n isAppendingInProgress = false;\n return;\n }\n\n if (!hasEnoughSpaceToAppend()) {\n eventBus.trigger(_coreEventsEventsJs2['default'].QUOTA_EXCEEDED, { sender: instance, criticalBufferLevel: criticalBufferLevel });\n clearBuffer(getClearRange());\n }\n\n ranges = sourceBufferController.getAllRanges(buffer);\n\n if (ranges) {\n //log(\"Append complete: \" + ranges.length);\n if (ranges.length > 0) {\n var i, len;\n\n //log(\"Number of buffered ranges: \" + ranges.length);\n for (i = 0, len = ranges.length; i < len; i++) {\n log('Buffered Range: ' + ranges.start(i) + ' - ' + ranges.end(i));\n }\n }\n }\n\n //finish appending\n isAppendingInProgress = false;\n if (!isNaN(appendedBytesInfo.index)) {\n virtualBuffer.storeAppendedChunk(appendedBytesInfo, buffer);\n removeOldTrackData();\n maxAppendedIndex = Math.max(appendedBytesInfo.index, maxAppendedIndex);\n checkIfBufferingCompleted();\n } else {\n currentQuality = appendedBytesInfo.quality;\n if (!streamProcessor.isDynamic()) {\n appendNext();\n }\n }\n\n eventBus.trigger(_coreEventsEventsJs2['default'].BYTES_APPENDED, { sender: instance, quality: appendedBytesInfo.quality, startTime: appendedBytesInfo.start, index: appendedBytesInfo.index, bufferedRanges: ranges });\n }\n\n function onQualityChanged(e) {\n var newQuality = e.newQuality;\n if (requiredQuality === newQuality || type !== e.mediaType || streamProcessor.getStreamInfo().id !== e.streamInfo.id) return;\n\n updateBufferTimestampOffset(streamProcessor.getRepresentationInfoForQuality(newQuality).MSETimeOffset);\n requiredQuality = newQuality;\n }\n\n //**********************************************************************\n // START Buffer Level, State & Sufficiency Handling.\n //**********************************************************************\n function onPlaybackSeeking() {\n isAppendingInProgress = false;\n onPlaybackProgression();\n }\n\n function onPlaybackProgression() {\n updateBufferLevel();\n addBufferMetrics();\n }\n\n function updateBufferLevel() {\n var currentTime = playbackController.getTime();\n\n bufferLevel = sourceBufferController.getBufferLength(buffer, currentTime);\n eventBus.trigger(_coreEventsEventsJs2['default'].BUFFER_LEVEL_UPDATED, { sender: instance, bufferLevel: bufferLevel });\n checkIfSufficientBuffer();\n }\n\n function addBufferMetrics() {\n if (!isActive()) return;\n\n //TODO will need to fix how we get bufferTarget... since we ony load one at a time. but do it in the addBufferMetrics call not here\n //bufferTarget = fragmentsToLoad > 0 ? (fragmentsToLoad * fragmentDuration) + bufferLevel : bufferTarget;\n metricsModel.addBufferState(type, bufferState, bufferTarget);\n\n //TODO may be needed for MULTIPERIOD PLEASE CHECK Turning this off for now... not really needed since we load sync...\n //var level = bufferLevel,\n // virtualLevel;\n //virtualLevel = virtualBuffer.getTotalBufferLevel(streamProcessor.getMediaInfo());\n //if (virtualLevel) {\n // level += virtualLevel;\n //}\n\n metricsModel.addBufferLevel(type, new Date(), bufferLevel * 1000);\n }\n\n function checkIfBufferingCompleted() {\n var isLastIdxAppended = maxAppendedIndex === lastIndex - 1;\n\n if (!isLastIdxAppended || isBufferingCompleted) return;\n\n isBufferingCompleted = true;\n eventBus.trigger(_coreEventsEventsJs2['default'].BUFFERING_COMPLETED, { sender: instance, streamInfo: streamProcessor.getStreamInfo() });\n }\n\n function checkIfSufficientBuffer() {\n if (bufferLevel < STALL_THRESHOLD && !isBufferingCompleted) {\n notifyBufferStateChanged(BUFFER_EMPTY);\n } else {\n notifyBufferStateChanged(BUFFER_LOADED);\n }\n }\n\n function notifyBufferStateChanged(state) {\n if (bufferState === state || type === 'fragmentedText' && textSourceBuffer.getAllTracksAreDisabled()) return;\n\n bufferState = state;\n addBufferMetrics();\n eventBus.trigger(_coreEventsEventsJs2['default'].BUFFER_LEVEL_STATE_CHANGED, { sender: instance, state: state, mediaType: type, streamInfo: streamProcessor.getStreamInfo() });\n var eventType = state === BUFFER_LOADED ? _coreEventsEventsJs2['default'].BUFFER_LOADED : _coreEventsEventsJs2['default'].BUFFER_EMPTY;\n eventBus.trigger(eventType, { mediaType: type });\n log(state === BUFFER_LOADED ? 'Got enough buffer to start.' : 'Waiting for more buffer before starting playback.');\n }\n\n function handleInbandEvents(data, request, mediaInbandEvents, trackInbandEvents) {\n var fragmentStarttime = Math.max(isNaN(request.startTime) ? 0 : request.startTime, 0);\n var eventStreams = [];\n var events = [];\n\n var eventBoxes, event, isoFile, inbandEvents;\n\n inbandEventFound = false;\n /* Extract the possible schemeIdUri : If a DASH client detects an event message box with a scheme that is not defined in MPD, the client is expected to ignore it */\n inbandEvents = mediaInbandEvents.concat(trackInbandEvents);\n for (var loop = 0; loop < inbandEvents.length; loop++) {\n eventStreams[inbandEvents[loop].schemeIdUri] = inbandEvents[loop];\n }\n\n isoFile = (0, _utilsBoxParserJs2['default'])(context).getInstance().parse(data);\n eventBoxes = isoFile.getBoxes('emsg');\n\n for (var i = 0, ln = eventBoxes.length; i < ln; i++) {\n event = adapter.getEvent(eventBoxes[i], eventStreams, fragmentStarttime);\n\n if (event) {\n events.push(event);\n }\n }\n\n return events;\n }\n\n function deleteInbandEvents(data) {\n\n if (!inbandEventFound) {\n return data;\n }\n\n var length = data.length;\n var expTwo = Math.pow(256, 2);\n var expThree = Math.pow(256, 3);\n var modData = new Uint8Array(data.length);\n\n var identifier, size;\n var i = 0;\n var j = 0;\n\n while (i < length) {\n\n identifier = String.fromCharCode(data[i + 4], data[i + 5], data[i + 6], data[i + 7]);\n size = data[i] * expThree + data[i + 1] * expTwo + data[i + 2] * 256 + data[i + 3] * 1;\n\n if (identifier != 'emsg') {\n for (var l = i; l < i + size; l++) {\n modData[j] = data[l];\n j++;\n }\n }\n i += size;\n }\n\n return modData.subarray(0, j);\n }\n\n function hasEnoughSpaceToAppend() {\n var totalBufferedTime = sourceBufferController.getTotalBufferedTime(buffer);\n return totalBufferedTime < criticalBufferLevel;\n }\n\n /* prune buffer on our own in background to avoid browsers pruning buffer silently */\n function pruneBuffer() {\n if (type === 'fragmentedText') return;\n\n log('try to prune buffer');\n\n var start = buffer.buffered.length ? buffer.buffered.start(0) : 0;\n var currentTime = playbackController.getTime();\n // we want to get rid off buffer that is more than x seconds behind current time\n var bufferToPrune = currentTime - start - mediaPlayerModel.getBufferToKeep();\n\n if (bufferToPrune > 0) {\n log('pruning buffer: ' + bufferToPrune + ' seconds.');\n isPruningInProgress = true;\n sourceBufferController.remove(buffer, 0, Math.round(start + bufferToPrune), mediaSource);\n }\n }\n\n function getClearRange() {\n var currentTime, removeStart, removeEnd, range, req;\n\n if (!buffer) return null;\n\n currentTime = playbackController.getTime();\n // we need to remove data that is more than one fragment before the video currentTime\n req = streamProcessor.getFragmentModel().getRequests({ state: _modelsFragmentModelJs2['default'].FRAGMENT_MODEL_EXECUTED, time: currentTime })[0];\n removeEnd = req && !isNaN(req.startTime) ? req.startTime : Math.floor(currentTime);\n\n range = sourceBufferController.getBufferRange(buffer, currentTime);\n\n if (range === null && buffer.buffered.length > 0) {\n removeEnd = buffer.buffered.end(buffer.buffered.length - 1);\n }\n\n removeStart = buffer.buffered.start(0);\n\n return { start: removeStart, end: removeEnd };\n }\n\n function clearBuffer(range) {\n if (!range || !buffer) return;\n\n var removeStart = range.start;\n var removeEnd = range.end;\n\n sourceBufferController.remove(buffer, removeStart, removeEnd, mediaSource);\n }\n\n function onRemoved(e) {\n if (buffer !== e.buffer) return;\n\n // After the buffer has been cleared we need to update the virtual range that reflects the actual ranges\n // of SourceBuffer. We also need to update the list of appended chunks\n if (isPruningInProgress) {\n isPruningInProgress = false;\n }\n virtualBuffer.updateBufferedRanges({ streamId: getStreamId(), mediaType: type }, sourceBufferController.getAllRanges(buffer));\n updateBufferLevel();\n eventBus.trigger(_coreEventsEventsJs2['default'].BUFFER_CLEARED, { sender: instance, from: e.from, to: e.to, hasEnoughSpaceToAppend: hasEnoughSpaceToAppend() });\n if (hasEnoughSpaceToAppend()) return;\n\n if (clearBufferTimeout === null) {\n clearBufferTimeout = setTimeout(function () {\n clearBufferTimeout = null;\n clearBuffer(getClearRange());\n }, streamProcessor.getStreamInfo().manifestInfo.minBufferTime * 1000);\n }\n }\n\n function updateBufferTimestampOffset(MSETimeOffset) {\n // each track can have its own @presentationTimeOffset, so we should set the offset\n // if it has changed after switching the quality or updating an mpd\n if (buffer && buffer.timestampOffset !== MSETimeOffset && !isNaN(MSETimeOffset)) {\n buffer.timestampOffset = MSETimeOffset;\n }\n }\n\n function getStreamId() {\n return streamProcessor.getStreamInfo().id;\n }\n\n function removeOldTrackData() {\n var allAppendedChunks = virtualBuffer.getChunks({ streamId: getStreamId(), mediaType: type, segmentType: _voMetricsHTTPRequestJs2['default'].MEDIA_SEGMENT_TYPE, appended: true });\n\n var customTimeRangesFactory = (0, _utilsCustomTimeRangesJs2['default'])(context);\n var rangesToClear = customTimeRangesFactory.create();\n var rangesToLeave = customTimeRangesFactory.create();\n\n var currentTime = playbackController.getTime();\n var safeBufferLength = streamProcessor.getCurrentRepresentationInfo().fragmentDuration * 2;\n\n var currentTrackBufferLength, ranges, range;\n\n allAppendedChunks.forEach(function (chunk) {\n ranges = mediaController.isCurrentTrack(chunk.mediaInfo) ? rangesToLeave : rangesToClear;\n ranges.add(chunk.bufferedRange.start, chunk.bufferedRange.end);\n });\n\n if (rangesToClear.length === 0 || rangesToLeave.length === 0) return;\n\n currentTrackBufferLength = sourceBufferController.getBufferLength({ buffered: rangesToLeave }, currentTime);\n\n if (currentTrackBufferLength < safeBufferLength) return;\n\n for (var i = 0, ln = rangesToClear.length; i < ln; i++) {\n range = { start: rangesToClear.start(i), end: rangesToClear.end(i) };\n if (mediaController.getSwitchMode(type) === _MediaControllerJs2['default'].TRACK_SWITCH_MODE_ALWAYS_REPLACE || range.start > currentTime) {\n clearBuffer(range);\n }\n }\n }\n\n function onDataUpdateCompleted(e) {\n if (e.sender.getStreamProcessor() !== streamProcessor) return;\n if (e.error) return;\n\n updateBufferTimestampOffset(e.currentRepresentation.MSETimeOffset);\n }\n\n function onStreamCompleted(e) {\n if (e.fragmentModel !== streamProcessor.getFragmentModel()) return;\n lastIndex = e.request.index;\n checkIfBufferingCompleted();\n }\n\n function onChunkAppended(e) {\n if (e.sender !== virtualBuffer) return;\n addBufferMetrics();\n }\n\n function onCurrentTrackChanged(e) {\n if (!buffer || e.newMediaInfo.type !== type || e.newMediaInfo.streamInfo.id !== streamProcessor.getStreamInfo().id) return;\n\n var newMediaInfo = e.newMediaInfo;\n var mediaType = newMediaInfo.type;\n var switchMode = e.switchMode;\n var currentTime = playbackController.getTime();\n var range = { start: 0, end: currentTime };\n\n if (type !== mediaType) return;\n\n switch (switchMode) {\n case _MediaControllerJs2['default'].TRACK_SWITCH_MODE_ALWAYS_REPLACE:\n clearBuffer(range);\n break;\n case _MediaControllerJs2['default'].TRACK_SWITCH_MODE_NEVER_REPLACE:\n break;\n default:\n log('track switch mode is not supported: ' + switchMode);\n }\n }\n\n function onWallclockTimeUpdated() {\n var secondsElapsed;\n //constantly prune buffer every x seconds\n wallclockTicked++;\n secondsElapsed = wallclockTicked * (mediaPlayerModel.getWallclockTimeUpdateInterval() / 1000);\n if (secondsElapsed >= mediaPlayerModel.getBufferPruningInterval() && !isAppendingInProgress) {\n wallclockTicked = 0;\n pruneBuffer();\n }\n }\n\n function onPlaybackRateChanged() {\n checkIfSufficientBuffer();\n }\n\n function getType() {\n return type;\n }\n\n function getStreamProcessor() {\n return streamProcessor;\n }\n\n function setStreamProcessor(value) {\n streamProcessor = value;\n }\n\n function getBuffer() {\n return buffer;\n }\n\n function setBuffer(value) {\n buffer = value;\n }\n\n function getBufferLevel() {\n return bufferLevel;\n }\n\n function getCriticalBufferLevel() {\n return criticalBufferLevel;\n }\n\n function setMediaSource(value) {\n mediaSource = value;\n }\n\n function getMediaSource() {\n return mediaSource;\n }\n\n function getIsBufferingCompleted() {\n return isBufferingCompleted;\n }\n\n function getIsAppendingInProgress() {\n return isAppendingInProgress;\n }\n\n function reset(errored) {\n\n eventBus.off(_coreEventsEventsJs2['default'].DATA_UPDATE_COMPLETED, onDataUpdateCompleted, this);\n eventBus.off(_coreEventsEventsJs2['default'].QUALITY_CHANGED, onQualityChanged, this);\n eventBus.off(_coreEventsEventsJs2['default'].INIT_FRAGMENT_LOADED, onInitFragmentLoaded, this);\n eventBus.off(_coreEventsEventsJs2['default'].MEDIA_FRAGMENT_LOADED, onMediaFragmentLoaded, this);\n eventBus.off(_coreEventsEventsJs2['default'].STREAM_COMPLETED, onStreamCompleted, this);\n eventBus.off(_coreEventsEventsJs2['default'].CURRENT_TRACK_CHANGED, onCurrentTrackChanged, this);\n eventBus.off(_coreEventsEventsJs2['default'].PLAYBACK_PROGRESS, onPlaybackProgression, this);\n eventBus.off(_coreEventsEventsJs2['default'].PLAYBACK_TIME_UPDATED, onPlaybackProgression, this);\n eventBus.off(_coreEventsEventsJs2['default'].PLAYBACK_RATE_CHANGED, onPlaybackRateChanged, this);\n eventBus.off(_coreEventsEventsJs2['default'].PLAYBACK_SEEKING, onPlaybackSeeking, this);\n eventBus.off(_coreEventsEventsJs2['default'].WALLCLOCK_TIME_UPDATED, onWallclockTimeUpdated, this);\n eventBus.off(_coreEventsEventsJs2['default'].SOURCEBUFFER_APPEND_COMPLETED, onAppended, this);\n eventBus.off(_coreEventsEventsJs2['default'].SOURCEBUFFER_REMOVE_COMPLETED, onRemoved, this);\n eventBus.off(_coreEventsEventsJs2['default'].CHUNK_APPENDED, onChunkAppended, this);\n\n clearTimeout(clearBufferTimeout);\n clearBufferTimeout = null;\n\n criticalBufferLevel = Number.POSITIVE_INFINITY;\n bufferState = BUFFER_EMPTY;\n currentQuality = -1;\n lastIndex = -1;\n maxAppendedIndex = -1;\n requiredQuality = 0;\n appendedBytesInfo = null;\n appendingMediaChunk = false;\n isBufferingCompleted = false;\n isAppendingInProgress = false;\n isPruningInProgress = false;\n playbackController = null;\n streamProcessor = null;\n abrController = null;\n fragmentController = null;\n scheduleController = null;\n\n if (!errored) {\n sourceBufferController.abort(mediaSource, buffer);\n sourceBufferController.removeSourceBuffer(mediaSource, buffer);\n }\n\n buffer = null;\n }\n\n instance = {\n initialize: initialize,\n createBuffer: createBuffer,\n getType: getType,\n getStreamProcessor: getStreamProcessor,\n setStreamProcessor: setStreamProcessor,\n getBuffer: getBuffer,\n setBuffer: setBuffer,\n getBufferLevel: getBufferLevel,\n getCriticalBufferLevel: getCriticalBufferLevel,\n setMediaSource: setMediaSource,\n getMediaSource: getMediaSource,\n getIsBufferingCompleted: getIsBufferingCompleted,\n getIsAppendingInProgress: getIsAppendingInProgress,\n reset: reset\n };\n\n setup();\n\n return instance;\n}\n\nBufferController.__dashjs_factory_name = 'BufferController';\nvar factory = _coreFactoryMakerJs2['default'].getClassFactory(BufferController);\nfactory.BUFFER_LOADED = BUFFER_LOADED;\nfactory.BUFFER_EMPTY = BUFFER_EMPTY;\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../../core/Debug.js\":5,\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7,\"../../core/events/Events.js\":9,\"../models/FragmentModel.js\":62,\"../models/MediaPlayerModel.js\":64,\"../utils/BoxParser.js\":86,\"../utils/CustomTimeRanges.js\":88,\"../vo/metrics/HTTPRequest.js\":117,\"./AbrController.js\":46,\"./MediaController.js\":52,\"./PlaybackController.js\":54,\"./SourceBufferController.js\":56}],50:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _controllersPlaybackControllerJs = _dereq_('../controllers/PlaybackController.js');\n\nvar _controllersPlaybackControllerJs2 = _interopRequireDefault(_controllersPlaybackControllerJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreDebugJs = _dereq_('../../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nfunction EventController() {\n\n var MPD_RELOAD_SCHEME = 'urn:mpeg:dash:event:2012';\n var MPD_RELOAD_VALUE = 1;\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var instance = undefined,\n inlineEvents = undefined,\n // Holds all Inline Events not triggered yet\n inbandEvents = undefined,\n // Holds all Inband Events not triggered yet\n activeEvents = undefined,\n // Holds all Events currently running\n eventInterval = undefined,\n // variable holding the setInterval\n refreshDelay = undefined,\n // refreshTime for the setInterval\n presentationTimeThreshold = undefined,\n manifestModel = undefined,\n manifestUpdater = undefined,\n playbackController = undefined,\n isStarted = undefined;\n\n function initialize() {\n isStarted = false;\n inlineEvents = {};\n inbandEvents = {};\n activeEvents = {};\n eventInterval = null;\n refreshDelay = 100;\n presentationTimeThreshold = refreshDelay / 1000;\n playbackController = (0, _controllersPlaybackControllerJs2['default'])(context).getInstance();\n }\n\n function clear() {\n if (eventInterval !== null && isStarted) {\n clearInterval(eventInterval);\n eventInterval = null;\n isStarted = false;\n }\n }\n\n function start() {\n log('Start Event Controller');\n if (!isStarted && !isNaN(refreshDelay)) {\n isStarted = true;\n eventInterval = setInterval(onEventTimer, refreshDelay);\n }\n }\n\n /**\n * Add events to the eventList. Events that are not in the mpd anymore but not triggered yet will still be deleted\n * @param values\n */\n function addInlineEvents(values) {\n inlineEvents = {};\n\n if (values) {\n for (var i = 0; i < values.length; i++) {\n var event = values[i];\n inlineEvents[event.id] = event;\n log('Add inline event with id ' + event.id);\n }\n }\n log('Added ' + values.length + ' inline events');\n }\n\n /**\n * i.e. processing of any one event message box with the same id is sufficient\n * @param values\n */\n function addInbandEvents(values) {\n for (var i = 0; i < values.length; i++) {\n var event = values[i];\n if (!(event.id in inbandEvents)) {\n inbandEvents[event.id] = event;\n log('Add inband event with id ' + event.id);\n } else {\n log('Repeated event with id ' + event.id);\n }\n }\n }\n\n /**\n * Remove events which are over from the list\n */\n function removeEvents() {\n if (activeEvents) {\n var currentVideoTime = playbackController.getTime();\n var eventIds = Object.keys(activeEvents);\n\n for (var i = 0; i < eventIds.length; i++) {\n var eventId = eventIds[i];\n var curr = activeEvents[eventId];\n if (curr !== null && (curr.duration + curr.presentationTime) / curr.eventStream.timescale < currentVideoTime) {\n log('Remove Event ' + eventId + ' at time ' + currentVideoTime);\n curr = null;\n delete activeEvents[eventId];\n }\n }\n }\n }\n\n /**\n * Iterate through the eventList and trigger/remove the events\n */\n function onEventTimer() {\n triggerEvents(inbandEvents);\n triggerEvents(inlineEvents);\n removeEvents();\n }\n\n function refreshManifest() {\n var manifest = manifestModel.getValue();\n var url = manifest.url;\n\n if (manifest.hasOwnProperty('Location')) {\n url = manifest.Location;\n }\n log('Refresh manifest @ ' + url);\n manifestUpdater.getManifestLoader().load(url);\n }\n\n function triggerEvents(events) {\n var currentVideoTime = playbackController.getTime();\n var presentationTime;\n\n /* == Trigger events that are ready == */\n if (events) {\n var eventIds = Object.keys(events);\n for (var i = 0; i < eventIds.length; i++) {\n var eventId = eventIds[i];\n var curr = events[eventId];\n\n if (curr !== undefined) {\n presentationTime = curr.presentationTime / curr.eventStream.timescale;\n if (presentationTime === 0 || presentationTime <= currentVideoTime && presentationTime + presentationTimeThreshold > currentVideoTime) {\n log('Start Event ' + eventId + ' at ' + currentVideoTime);\n if (curr.duration > 0) {\n activeEvents[eventId] = curr;\n }\n if (curr.eventStream.schemeIdUri == MPD_RELOAD_SCHEME && curr.eventStream.value == MPD_RELOAD_VALUE) {\n refreshManifest();\n } else {\n eventBus.trigger(curr.eventStream.schemeIdUri, { event: curr });\n }\n delete events[eventId];\n }\n }\n }\n }\n }\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.manifestModel) {\n manifestModel = config.manifestModel;\n }\n\n if (config.manifestUpdater) {\n manifestUpdater = config.manifestUpdater;\n }\n }\n\n function reset() {\n clear();\n inlineEvents = null;\n inbandEvents = null;\n activeEvents = null;\n playbackController = null;\n }\n\n instance = {\n initialize: initialize,\n addInlineEvents: addInlineEvents,\n addInbandEvents: addInbandEvents,\n clear: clear,\n start: start,\n setConfig: setConfig,\n reset: reset\n };\n\n return instance;\n}\n\nEventController.__dashjs_factory_name = 'EventController';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(EventController);\nmodule.exports = exports['default'];\n\n},{\"../../core/Debug.js\":5,\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7,\"../controllers/PlaybackController.js\":54}],51:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _voMetricsHTTPRequestJs = _dereq_('../vo/metrics/HTTPRequest.js');\n\nvar _voMetricsHTTPRequestJs2 = _interopRequireDefault(_voMetricsHTTPRequestJs);\n\nvar _voDataChunkJs = _dereq_('../vo/DataChunk.js');\n\nvar _voDataChunkJs2 = _interopRequireDefault(_voDataChunkJs);\n\nvar _modelsFragmentModelJs = _dereq_('../models/FragmentModel.js');\n\nvar _modelsFragmentModelJs2 = _interopRequireDefault(_modelsFragmentModelJs);\n\nvar _modelsMetricsModelJs = _dereq_('../models/MetricsModel.js');\n\nvar _modelsMetricsModelJs2 = _interopRequireDefault(_modelsMetricsModelJs);\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreDebugJs = _dereq_('../../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nfunction FragmentController() /*config*/{\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var instance = undefined,\n fragmentModels = undefined;\n\n function setup() {\n fragmentModels = [];\n eventBus.on(_coreEventsEventsJs2['default'].FRAGMENT_LOADING_COMPLETED, onFragmentLoadingCompleted, instance);\n }\n\n function process(bytes) {\n var result = null;\n\n if (bytes !== null && bytes !== undefined && bytes.byteLength > 0) {\n result = new Uint8Array(bytes);\n }\n\n return result;\n }\n\n function getModel(scheduleController) {\n if (!scheduleController) return null;\n // Wrap the buffer controller into model and store it to track the loading state and execute the requests\n var model = findModel(scheduleController);\n\n if (!model) {\n model = (0, _modelsFragmentModelJs2['default'])(context).create({ metricsModel: (0, _modelsMetricsModelJs2['default'])(context).getInstance() });\n model.setScheduleController(scheduleController);\n fragmentModels.push(model);\n }\n\n return model;\n }\n\n function detachModel(model) {\n var idx = fragmentModels.indexOf(model);\n // If we have the model for the given buffer just remove it from array\n if (idx > -1) {\n fragmentModels.splice(idx, 1);\n }\n }\n\n function isInitializationRequest(request) {\n return request && request.type && request.type === _voMetricsHTTPRequestJs2['default'].INIT_SEGMENT_TYPE;\n }\n\n function reset() {\n eventBus.off(_coreEventsEventsJs2['default'].FRAGMENT_LOADING_COMPLETED, onFragmentLoadingCompleted, this);\n fragmentModels = [];\n }\n\n function findModel(scheduleController) {\n var ln = fragmentModels.length;\n // We expect one-to-one relation between FragmentModel and context,\n // so just compare the given context object with the one that stored in the model to find the model for it\n for (var i = 0; i < ln; i++) {\n if (fragmentModels[i].getScheduleController() == scheduleController) {\n return fragmentModels[i];\n }\n }\n\n return null;\n }\n\n function createDataChunk(bytes, request, streamId) {\n var chunk = new _voDataChunkJs2['default']();\n\n chunk.streamId = streamId;\n chunk.mediaInfo = request.mediaInfo;\n chunk.segmentType = request.type;\n chunk.start = request.startTime;\n chunk.duration = request.duration;\n chunk.end = chunk.start + chunk.duration;\n chunk.bytes = bytes;\n chunk.index = request.index;\n chunk.quality = request.quality;\n\n return chunk;\n }\n\n function onFragmentLoadingCompleted(e) {\n var scheduleController = e.sender.getScheduleController();\n if (!findModel(scheduleController)) return;\n\n var request = e.request;\n var bytes = e.response;\n var isInit = isInitializationRequest(request);\n var streamId = scheduleController.getStreamProcessor().getStreamInfo().id;\n var chunk = undefined;\n\n if (!bytes) {\n log('No ' + request.mediaType + ' bytes to push.');\n return;\n }\n\n chunk = createDataChunk(bytes, request, streamId);\n eventBus.trigger(isInit ? _coreEventsEventsJs2['default'].INIT_FRAGMENT_LOADED : _coreEventsEventsJs2['default'].MEDIA_FRAGMENT_LOADED, { chunk: chunk, fragmentModel: e.sender });\n }\n\n instance = {\n process: process,\n getModel: getModel,\n detachModel: detachModel,\n isInitializationRequest: isInitializationRequest,\n reset: reset\n };\n\n setup();\n\n return instance;\n}\n\nFragmentController.__dashjs_factory_name = 'FragmentController';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(FragmentController);\nmodule.exports = exports['default'];\n\n},{\"../../core/Debug.js\":5,\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7,\"../../core/events/Events.js\":9,\"../models/FragmentModel.js\":62,\"../models/MetricsModel.js\":65,\"../vo/DataChunk.js\":99,\"../vo/metrics/HTTPRequest.js\":117}],52:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreEventsEventsJs = _dereq_('../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreDebugJs = _dereq_('../../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nvar _TextSourceBufferJs = _dereq_('../TextSourceBuffer.js');\n\nvar _TextSourceBufferJs2 = _interopRequireDefault(_TextSourceBufferJs);\n\nvar _utilsDOMStorageJs = _dereq_('../utils/DOMStorage.js');\n\nvar _utilsDOMStorageJs2 = _interopRequireDefault(_utilsDOMStorageJs);\n\nvar TRACK_SWITCH_MODE_NEVER_REPLACE = 'neverReplace';\nvar TRACK_SWITCH_MODE_ALWAYS_REPLACE = 'alwaysReplace';\nvar TRACK_SELECTION_MODE_HIGHEST_BITRATE = 'highestBitrate';\nvar TRACK_SELECTION_MODE_WIDEST_RANGE = 'widestRange';\nvar DEFAULT_INIT_TRACK_SELECTION_MODE = TRACK_SELECTION_MODE_HIGHEST_BITRATE;\n\nfunction MediaController() {\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n var textSourceBuffer = (0, _TextSourceBufferJs2['default'])(context).getInstance();\n var domStorage = (0, _utilsDOMStorageJs2['default'])(context).getInstance();\n\n var instance = undefined,\n tracks = undefined,\n initialSettings = undefined,\n selectionMode = undefined,\n switchMode = undefined,\n errHandler = undefined;\n\n function initialize() {\n tracks = {};\n resetInitialSettings();\n resetSwitchMode();\n }\n\n /**\n * @param type\n * @param streamInfo\n * @memberof MediaController#\n */\n function checkInitialMediaSettingsForType(type, streamInfo) {\n var settings = getInitialSettings(type);\n var tracksForType = getTracksFor(type, streamInfo);\n var tracks = [];\n\n if (type === 'fragmentedText') {\n // Choose the first track\n setTrack(tracksForType[0]);\n return;\n }\n\n if (!settings) {\n settings = domStorage.getSavedMediaSettings(type);\n setInitialSettings(type, settings);\n }\n\n if (!tracksForType || tracksForType.length === 0) return;\n\n if (settings) {\n tracksForType.forEach(function (track) {\n if (matchSettings(settings, track)) {\n tracks.push(track);\n }\n });\n }\n\n if (tracks.length === 0) {\n setTrack(selectInitialTrack(tracksForType));\n } else {\n if (tracks.length > 1) {\n setTrack(selectInitialTrack(tracks));\n } else {\n setTrack(tracks[0]);\n }\n }\n }\n\n /**\n * @param track\n * @returns {Boolean}\n * @memberof MediaController#\n */\n function addTrack(track) {\n var mediaType = track ? track.type : null;\n var streamId = track ? track.streamInfo.id : null;\n var initSettings = getInitialSettings(mediaType);\n\n if (!track || !isMultiTrackSupportedByType(mediaType)) return false;\n\n tracks[streamId] = tracks[streamId] || createTrackInfo();\n\n if (tracks[streamId][mediaType].list.indexOf(track) >= 0) return false;\n\n tracks[streamId][mediaType].list.push(track);\n\n if (initSettings && matchSettings(initSettings, track) && !getCurrentTrackFor(mediaType, track.streamInfo)) {\n setTrack(track);\n }\n\n return true;\n }\n\n /**\n * @param type\n * @param streamInfo\n * @returns {Array}\n * @memberof MediaController#\n */\n function getTracksFor(type, streamInfo) {\n if (!type || !streamInfo) return [];\n\n var id = streamInfo.id;\n\n if (!tracks[id] || !tracks[id][type]) return [];\n\n return tracks[id][type].list;\n }\n\n /**\n * @param type\n * @param streamInfo\n * @returns {Object}\n * @memberof MediaController#\n */\n function getCurrentTrackFor(type, streamInfo) {\n if (!type || !streamInfo) return null;\n\n return tracks[streamInfo.id][type].current;\n }\n\n /**\n * @param track\n * @returns {Boolean}\n * @memberof MediaController#\n */\n function isCurrentTrack(track) {\n var type = track.type;\n var id = track.streamInfo.id;\n\n return tracks[id] && tracks[id][type] && isTracksEqual(tracks[id][type].current, track);\n }\n\n /**\n * @param track\n * @memberof MediaController#\n */\n function setTrack(track) {\n if (!track) return;\n\n var type = track.type;\n var streamInfo = track.streamInfo;\n var id = streamInfo.id;\n var current = getCurrentTrackFor(type, streamInfo);\n\n if (!tracks[id] || !tracks[id][type] || current && isTracksEqual(track, current)) return;\n\n tracks[id][type].current = track;\n\n if (current) {\n eventBus.trigger(_coreEventsEventsJs2['default'].CURRENT_TRACK_CHANGED, { oldMediaInfo: current, newMediaInfo: track, switchMode: switchMode[type] });\n }\n\n var settings = extractSettings(track);\n\n if (!settings || !tracks[id][type].storeLastSettings) return;\n\n if (settings.roles) {\n settings.role = settings.roles[0];\n delete settings.roles;\n }\n\n if (settings.accessibility) {\n settings.accessibility = settings.accessibility[0];\n }\n\n if (settings.audioChannelConfiguration) {\n settings.audioChannelConfiguration = settings.audioChannelConfiguration[0];\n }\n\n domStorage.setSavedMediaSettings(type, settings);\n }\n\n /**\n * @param type\n * @param {Object}\n * @memberof MediaController#\n */\n function setInitialSettings(type, value) {\n if (!type || value === undefined) return;\n\n initialSettings[type] = value;\n }\n\n /**\n * @param type\n * @returns {Object}\n * @memberof MediaController#\n */\n function getInitialSettings(type) {\n if (!type) return null;\n\n return initialSettings[type];\n }\n\n /**\n * @param type\n * @param mode\n * @memberof MediaController#\n */\n function setSwitchMode(type, mode) {\n var isModeSupported = !!MediaController[mode];\n\n if (!isModeSupported) {\n log('track switch mode is not supported: ' + mode);\n return;\n }\n\n switchMode[type] = mode;\n }\n\n /**\n * @param type\n * @returns mode\n * @memberof MediaController#\n */\n function getSwitchMode(type) {\n return switchMode[type];\n }\n\n /**\n * @param mode\n * @memberof MediaController#\n */\n function setSelectionModeForInitialTrack(mode) {\n var isModeSupported = !!MediaController.trackSelectionModes[mode];\n\n if (!isModeSupported) {\n log('track selection mode is not supported: ' + mode);\n return;\n }\n selectionMode = mode;\n }\n\n /**\n * @returns mode\n * @memberof MediaController#\n */\n function getSelectionModeForInitialTrack() {\n return selectionMode || DEFAULT_INIT_TRACK_SELECTION_MODE;\n }\n\n /**\n * @param type\n * @returns {Boolean}\n * @memberof MediaController#\n */\n function isMultiTrackSupportedByType(type) {\n return type === 'audio' || type === 'video' || type === 'text' || type === 'fragmentedText';\n }\n\n /**\n * @param t1 first track to compare\n * @param t2 second track to compare\n * @returns {Boolean}\n * @memberof MediaController#\n */\n function isTracksEqual(t1, t2) {\n var sameId = t1.id === t2.id;\n var sameViewpoint = t1.viewpoint === t2.viewpoint;\n var sameLang = t1.lang === t2.lang;\n var sameRoles = t1.roles.toString() == t2.roles.toString();\n var sameAccessibility = t1.accessibility.toString() == t2.accessibility.toString();\n var sameAudioChannelConfiguration = t1.audioChannelConfiguration.toString() == t2.audioChannelConfiguration.toString();\n\n return sameId && sameViewpoint && sameLang && sameRoles && sameAccessibility && sameAudioChannelConfiguration;\n }\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.errHandler) {\n errHandler = config.errHandler;\n }\n }\n\n /**\n * @memberof MediaController#\n */\n function reset() {\n initialize();\n textSourceBuffer.resetEmbedded();\n }\n\n function extractSettings(mediaInfo) {\n var settings = {\n lang: mediaInfo.lang,\n viewpoint: mediaInfo.viewpoint,\n roles: mediaInfo.roles,\n accessibility: mediaInfo.accessibility,\n audioChannelConfiguration: mediaInfo.audioChannelConfiguration\n };\n var notEmpty = settings.lang || settings.viewpoint || settings.role && settings.role.length > 0 || settings.accessibility && settings.accessibility.length > 0 || settings.audioChannelConfiguration && settings.audioChannelConfiguration.length > 0;\n\n return notEmpty ? settings : null;\n }\n\n function matchSettings(settings, track) {\n var matchLang = !settings.lang || settings.lang === track.lang;\n var matchViewPoint = !settings.viewpoint || settings.viewpoint === track.viewpoint;\n var matchRole = !settings.role || !!track.roles.filter(function (item) {\n return item === settings.role;\n })[0];\n var matchAccessibility = !settings.accessibility || !!track.accessibility.filter(function (item) {\n return item === settings.accessibility;\n })[0];\n var matchAudioChannelConfiguration = !settings.audioChannelConfiguration || !!track.audioChannelConfiguration.filter(function (item) {\n return item === settings.audioChannelConfiguration;\n })[0];\n\n return matchLang && matchViewPoint && matchRole && matchAccessibility && matchAudioChannelConfiguration;\n }\n\n function resetSwitchMode() {\n switchMode = {\n audio: TRACK_SWITCH_MODE_ALWAYS_REPLACE,\n video: TRACK_SWITCH_MODE_NEVER_REPLACE\n };\n }\n\n function resetInitialSettings() {\n initialSettings = {\n audio: null,\n video: null\n };\n }\n\n function selectInitialTrack(tracks) {\n var mode = getSelectionModeForInitialTrack();\n var tmpArr = [];\n var getTracksWithHighestBitrate = function getTracksWithHighestBitrate(trackArr) {\n var max = 0;\n var result = [];\n var tmp;\n\n trackArr.forEach(function (track) {\n tmp = Math.max.apply(Math, track.bitrateList.map(function (obj) {\n return obj.bandwidth;\n }));\n\n if (tmp > max) {\n max = tmp;\n result = [track];\n } else if (tmp === max) {\n result.push(track);\n }\n });\n\n return result;\n };\n var getTracksWithWidestRange = function getTracksWithWidestRange(trackArr) {\n var max = 0;\n var result = [];\n var tmp;\n\n trackArr.forEach(function (track) {\n tmp = track.representationCount;\n\n if (tmp > max) {\n max = tmp;\n result = [track];\n } else if (tmp === max) {\n result.push(track);\n }\n });\n\n return result;\n };\n\n switch (mode) {\n case TRACK_SELECTION_MODE_HIGHEST_BITRATE:\n tmpArr = getTracksWithHighestBitrate(tracks);\n\n if (tmpArr.length > 1) {\n tmpArr = getTracksWithWidestRange(tmpArr);\n }\n break;\n case TRACK_SELECTION_MODE_WIDEST_RANGE:\n tmpArr = getTracksWithWidestRange(tracks);\n\n if (tmpArr.length > 1) {\n tmpArr = getTracksWithHighestBitrate(tracks);\n }\n break;\n default:\n log('track selection mode is not supported: ' + mode);\n break;\n }\n\n return tmpArr[0];\n }\n\n function createTrackInfo() {\n return {\n audio: {\n list: [],\n storeLastSettings: true,\n current: null\n },\n video: {\n list: [],\n storeLastSettings: true,\n current: null\n },\n text: {\n list: [],\n storeLastSettings: true,\n current: null\n },\n fragmentedText: {\n list: [],\n storeLastSettings: true,\n current: null\n }\n };\n }\n\n instance = {\n initialize: initialize,\n checkInitialMediaSettingsForType: checkInitialMediaSettingsForType,\n addTrack: addTrack,\n getTracksFor: getTracksFor,\n getCurrentTrackFor: getCurrentTrackFor,\n isCurrentTrack: isCurrentTrack,\n setTrack: setTrack,\n setInitialSettings: setInitialSettings,\n getInitialSettings: getInitialSettings,\n setSwitchMode: setSwitchMode,\n getSwitchMode: getSwitchMode,\n setSelectionModeForInitialTrack: setSelectionModeForInitialTrack,\n getSelectionModeForInitialTrack: getSelectionModeForInitialTrack,\n isMultiTrackSupportedByType: isMultiTrackSupportedByType,\n isTracksEqual: isTracksEqual,\n setConfig: setConfig,\n reset: reset\n };\n\n return instance;\n}\n\nMediaController.__dashjs_factory_name = 'MediaController';\nvar factory = _coreFactoryMakerJs2['default'].getSingletonFactory(MediaController);\nfactory.TRACK_SWITCH_MODE_NEVER_REPLACE = TRACK_SWITCH_MODE_NEVER_REPLACE;\nfactory.TRACK_SWITCH_MODE_ALWAYS_REPLACE = TRACK_SWITCH_MODE_ALWAYS_REPLACE;\nfactory.TRACK_SELECTION_MODE_HIGHEST_BITRATE = TRACK_SELECTION_MODE_HIGHEST_BITRATE;\nfactory.TRACK_SELECTION_MODE_WIDEST_RANGE = TRACK_SELECTION_MODE_WIDEST_RANGE;\nfactory.DEFAULT_INIT_TRACK_SELECTION_MODE = DEFAULT_INIT_TRACK_SELECTION_MODE;\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../../core/Debug.js\":5,\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7,\"../../core/events/Events.js\":9,\"../TextSourceBuffer.js\":41,\"../utils/DOMStorage.js\":89}],53:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction MediaSourceController() {\n\n var instance = undefined;\n\n function createMediaSource() {\n\n var hasWebKit = ('WebKitMediaSource' in window);\n var hasMediaSource = ('MediaSource' in window);\n\n if (hasMediaSource) {\n return new MediaSource();\n } else if (hasWebKit) {\n return new WebKitMediaSource();\n }\n\n return null;\n }\n\n function attachMediaSource(source, videoModel) {\n\n var objectURL = window.URL.createObjectURL(source);\n\n videoModel.setSource(objectURL);\n\n return objectURL;\n }\n\n function detachMediaSource(videoModel) {\n videoModel.setSource(null);\n }\n\n function setDuration(source, value) {\n\n if (source.duration != value) source.duration = value;\n\n return source.duration;\n }\n\n function signalEndOfStream(source) {\n\n var buffers = source.sourceBuffers;\n var ln = buffers.length;\n var i = 0;\n\n if (source.readyState !== 'open') return;\n\n for (i; i < ln; i++) {\n if (buffers[i].updating) return;\n if (buffers[i].buffered.length === 0) return;\n }\n\n source.endOfStream();\n }\n\n instance = {\n createMediaSource: createMediaSource,\n attachMediaSource: attachMediaSource,\n detachMediaSource: detachMediaSource,\n setDuration: setDuration,\n signalEndOfStream: signalEndOfStream\n };\n\n return instance;\n}\n\nMediaSourceController.__dashjs_factory_name = 'MediaSourceController';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(MediaSourceController);\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7}],54:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _BufferControllerJs = _dereq_('./BufferController.js');\n\nvar _BufferControllerJs2 = _interopRequireDefault(_BufferControllerJs);\n\nvar _modelsURIQueryAndFragmentModelJs = _dereq_('../models/URIQueryAndFragmentModel.js');\n\nvar _modelsURIQueryAndFragmentModelJs2 = _interopRequireDefault(_modelsURIQueryAndFragmentModelJs);\n\nvar _streamingModelsMediaPlayerModelJs = _dereq_('../../streaming/models/MediaPlayerModel.js');\n\nvar _streamingModelsMediaPlayerModelJs2 = _interopRequireDefault(_streamingModelsMediaPlayerModelJs);\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreDebugJs = _dereq_('../../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nfunction PlaybackController() {\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var instance = undefined,\n element = undefined,\n streamController = undefined,\n timelineConverter = undefined,\n metricsModel = undefined,\n dashMetrics = undefined,\n manifestModel = undefined,\n dashManifestModel = undefined,\n adapter = undefined,\n videoModel = undefined,\n currentTime = undefined,\n liveStartTime = undefined,\n wallclockTimeIntervalId = undefined,\n commonEarliestTime = undefined,\n streamInfo = undefined,\n isDynamic = undefined,\n mediaPlayerModel = undefined,\n playOnceInitialized = undefined;\n\n function setup() {\n currentTime = 0;\n liveStartTime = NaN;\n wallclockTimeIntervalId = null;\n isDynamic = null;\n playOnceInitialized = false;\n commonEarliestTime = {};\n mediaPlayerModel = (0, _streamingModelsMediaPlayerModelJs2['default'])(context).getInstance();\n }\n\n function initialize(StreamInfo) {\n streamInfo = StreamInfo;\n element = videoModel.getElement();\n addAllListeners();\n isDynamic = streamInfo.manifestInfo.isDynamic;\n liveStartTime = streamInfo.start;\n eventBus.on(_coreEventsEventsJs2['default'].DATA_UPDATE_COMPLETED, onDataUpdateCompleted, this);\n eventBus.on(_coreEventsEventsJs2['default'].LIVE_EDGE_SEARCH_COMPLETED, onLiveEdgeSearchCompleted, this);\n eventBus.on(_coreEventsEventsJs2['default'].BYTES_APPENDED, onBytesAppended, this);\n eventBus.on(_coreEventsEventsJs2['default'].BUFFER_LEVEL_STATE_CHANGED, onBufferLevelStateChanged, this);\n eventBus.on(_coreEventsEventsJs2['default'].PERIOD_SWITCH_STARTED, onPeriodSwitchStarted, this);\n\n if (playOnceInitialized) {\n playOnceInitialized = false;\n play();\n }\n }\n\n function onPeriodSwitchStarted(e) {\n if (e.fromStreamInfo && commonEarliestTime[e.fromStreamInfo.id]) {\n delete commonEarliestTime[e.fromStreamInfo.id];\n }\n }\n\n function getTimeToStreamEnd() {\n return getStreamStartTime(true) + streamInfo.duration - getTime();\n }\n\n function isPlaybackStarted() {\n return getTime() > 0;\n }\n\n function getStreamId() {\n return streamInfo.id;\n }\n\n function getStreamDuration() {\n return streamInfo.duration;\n }\n\n function play() {\n if (element) {\n element.autoplay = true;\n element.play();\n } else {\n playOnceInitialized = true;\n }\n }\n\n function isPaused() {\n if (!element) return;\n return element.paused;\n }\n\n function pause() {\n if (!element) return;\n element.pause();\n element.autoplay = false;\n }\n\n function isSeeking() {\n if (!element) return;\n return element.seeking;\n }\n\n function seek(time) {\n if (!videoModel) return;\n log('Requesting seek to time: ' + time);\n videoModel.setCurrentTime(time);\n }\n\n function getTime() {\n if (!element) return;\n return element.currentTime;\n }\n\n function getPlaybackRate() {\n if (!element) return;\n return element.playbackRate;\n }\n\n function getPlayedRanges() {\n if (!element) return;\n return element.played;\n }\n\n function getEnded() {\n if (!element) return;\n return element.ended;\n }\n\n function getIsDynamic() {\n return isDynamic;\n }\n\n function setLiveStartTime(value) {\n liveStartTime = value;\n }\n\n function getLiveStartTime() {\n return liveStartTime;\n }\n\n /**\n * Computes the desirable delay for the live edge to avoid a risk of getting 404 when playing at the bleeding edge\n * @returns {Number} object\n * @memberof PlaybackController#\n * */\n function computeLiveDelay(fragmentDuration, dvrWindowSize) {\n var mpd = dashManifestModel.getMpd(manifestModel.getValue());\n\n var delay = undefined;\n var END_OF_PLAYLIST_PADDING = 10;\n\n if (mediaPlayerModel.getUseSuggestedPresentationDelay() && mpd.hasOwnProperty('suggestedPresentationDelay')) {\n delay = mpd.suggestedPresentationDelay;\n } else if (mediaPlayerModel.getLiveDelay()) {\n delay = mediaPlayerModel.getLiveDelay(); // If set by user, this value takes precedence\n } else if (!isNaN(fragmentDuration)) {\n delay = fragmentDuration * mediaPlayerModel.getLiveDelayFragmentCount();\n } else {\n delay = streamInfo.manifestInfo.minBufferTime * 2;\n }\n\n // cap target latency to:\n // - dvrWindowSize / 2 for short playlists\n // - dvrWindowSize - END_OF_PLAYLIST_PADDING for longer playlists\n var targetDelayCapping = Math.max(dvrWindowSize - END_OF_PLAYLIST_PADDING, dvrWindowSize / 2);\n\n return Math.min(delay, targetDelayCapping);\n }\n\n function reset() {\n if (videoModel && element) {\n eventBus.off(_coreEventsEventsJs2['default'].DATA_UPDATE_COMPLETED, onDataUpdateCompleted, this);\n eventBus.off(_coreEventsEventsJs2['default'].BUFFER_LEVEL_STATE_CHANGED, onBufferLevelStateChanged, this);\n eventBus.off(_coreEventsEventsJs2['default'].LIVE_EDGE_SEARCH_COMPLETED, onLiveEdgeSearchCompleted, this);\n eventBus.off(_coreEventsEventsJs2['default'].BYTES_APPENDED, onBytesAppended, this);\n stopUpdatingWallclockTime();\n removeAllListeners();\n }\n videoModel = null;\n streamInfo = null;\n element = null;\n isDynamic = null;\n setup();\n }\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.streamController) {\n streamController = config.streamController;\n }\n if (config.timelineConverter) {\n timelineConverter = config.timelineConverter;\n }\n if (config.metricsModel) {\n metricsModel = config.metricsModel;\n }\n if (config.dashMetrics) {\n dashMetrics = config.dashMetrics;\n }\n if (config.manifestModel) {\n manifestModel = config.manifestModel;\n }\n if (config.dashManifestModel) {\n dashManifestModel = config.dashManifestModel;\n }\n if (config.adapter) {\n adapter = config.adapter;\n }\n if (config.videoModel) {\n videoModel = config.videoModel;\n }\n }\n\n /**\n * @param streamInfo object\n * @returns {Number} object\n * @memberof PlaybackController#\n */\n function getStreamStartTime(ignoreStartOffset) {\n var presentationStartTime = undefined;\n var startTimeOffset = !ignoreStartOffset ? parseInt((0, _modelsURIQueryAndFragmentModelJs2['default'])(context).getInstance().getURIFragmentData().s, 10) : NaN;\n\n if (isDynamic) {\n if (!isNaN(startTimeOffset) && startTimeOffset > 1262304000) {\n\n presentationStartTime = startTimeOffset - streamInfo.manifestInfo.availableFrom.getTime() / 1000;\n\n if (presentationStartTime > liveStartTime || presentationStartTime < liveStartTime - streamInfo.manifestInfo.DVRWindowSize) {\n presentationStartTime = null;\n }\n }\n presentationStartTime = presentationStartTime || liveStartTime;\n } else {\n if (!isNaN(startTimeOffset) && startTimeOffset < Math.max(streamInfo.manifestInfo.duration, streamInfo.duration) && startTimeOffset >= 0) {\n presentationStartTime = startTimeOffset;\n } else {\n var earliestTime = commonEarliestTime[streamInfo.id]; //set by ready bufferStart after first onBytesAppended\n if (earliestTime === undefined) {\n earliestTime = streamController.getActiveStreamCommonEarliestTime(); //deal with calculated PST that is none 0 when streamInfo.start is 0\n }\n presentationStartTime = Math.max(earliestTime, streamInfo.start);\n }\n }\n\n return presentationStartTime;\n }\n\n function getActualPresentationTime(currentTime) {\n var metrics = metricsModel.getReadOnlyMetricsFor('video') || metricsModel.getReadOnlyMetricsFor('audio');\n var DVRMetrics = dashMetrics.getCurrentDVRInfo(metrics);\n var DVRWindow = DVRMetrics ? DVRMetrics.range : null;\n var actualTime;\n\n if (!DVRWindow) return NaN;\n\n if (currentTime >= DVRWindow.start && currentTime <= DVRWindow.end) {\n return currentTime;\n }\n\n actualTime = Math.max(DVRWindow.end - streamInfo.manifestInfo.minBufferTime * 2, DVRWindow.start);\n\n return actualTime;\n }\n\n function startUpdatingWallclockTime() {\n if (wallclockTimeIntervalId !== null) return;\n\n var tick = function tick() {\n onWallclockTime();\n };\n\n wallclockTimeIntervalId = setInterval(tick, mediaPlayerModel.getWallclockTimeUpdateInterval());\n }\n\n function stopUpdatingWallclockTime() {\n clearInterval(wallclockTimeIntervalId);\n wallclockTimeIntervalId = null;\n }\n\n function seekToStartTimeOffset() {\n var initialSeekTime = getStreamStartTime(false);\n if (initialSeekTime > 0) {\n seek(initialSeekTime);\n log('Starting playback at offset: ' + initialSeekTime);\n }\n }\n\n function updateCurrentTime() {\n if (isPaused() || !isDynamic || element.readyState === 0) return;\n var currentTime = getTime();\n var actualTime = getActualPresentationTime(currentTime);\n var timeChanged = !isNaN(actualTime) && actualTime !== currentTime;\n if (timeChanged) {\n seek(actualTime);\n }\n }\n\n function onDataUpdateCompleted(e) {\n if (e.error) return;\n\n var representationInfo = adapter.convertDataToTrack(manifestModel.getValue(), e.currentRepresentation);\n var info = representationInfo.mediaInfo.streamInfo;\n\n if (streamInfo.id !== info.id) return;\n streamInfo = info;\n\n updateCurrentTime();\n }\n\n function onLiveEdgeSearchCompleted(e) {\n //This is here to catch the case when live edge search takes longer than playback metadata\n if (e.error || element.readyState === 0) return;\n seekToStartTimeOffset();\n }\n\n function onCanPlay() {\n eventBus.trigger(_coreEventsEventsJs2['default'].CAN_PLAY);\n }\n\n function onPlaybackStart() {\n log('Native video element event: play');\n updateCurrentTime();\n startUpdatingWallclockTime();\n eventBus.trigger(_coreEventsEventsJs2['default'].PLAYBACK_STARTED, { startTime: getTime() });\n }\n\n function onPlaybackPlaying() {\n log('Native video element event: playing');\n eventBus.trigger(_coreEventsEventsJs2['default'].PLAYBACK_PLAYING, { playingTime: getTime() });\n }\n\n function onPlaybackPaused() {\n log('Native video element event: pause');\n eventBus.trigger(_coreEventsEventsJs2['default'].PLAYBACK_PAUSED, { ended: getEnded() });\n }\n\n function onPlaybackSeeking() {\n var seekTime = getTime();\n log('Seeking to: ' + seekTime);\n startUpdatingWallclockTime();\n eventBus.trigger(_coreEventsEventsJs2['default'].PLAYBACK_SEEKING, { seekTime: seekTime });\n }\n\n function onPlaybackSeeked() {\n log('Native video element event: seeked');\n eventBus.trigger(_coreEventsEventsJs2['default'].PLAYBACK_SEEKED);\n }\n\n function onPlaybackTimeUpdated() {\n //log(\"Native video element event: timeupdate\");\n var time = getTime();\n if (time === currentTime) return;\n currentTime = time;\n eventBus.trigger(_coreEventsEventsJs2['default'].PLAYBACK_TIME_UPDATED, { timeToEnd: getTimeToStreamEnd(), time: time });\n }\n\n function onPlaybackProgress() {\n //log(\"Native video element event: progress\");\n eventBus.trigger(_coreEventsEventsJs2['default'].PLAYBACK_PROGRESS);\n }\n\n function onPlaybackRateChanged() {\n var rate = getPlaybackRate();\n log('Native video element event: ratechange: ', rate);\n eventBus.trigger(_coreEventsEventsJs2['default'].PLAYBACK_RATE_CHANGED, { playbackRate: rate });\n }\n\n function onPlaybackMetaDataLoaded() {\n log('Native video element event: loadedmetadata');\n if (!isDynamic && streamInfo.isFirst || timelineConverter.isTimeSyncCompleted()) {\n seekToStartTimeOffset();\n }\n eventBus.trigger(_coreEventsEventsJs2['default'].PLAYBACK_METADATA_LOADED);\n startUpdatingWallclockTime();\n }\n\n function onPlaybackEnded() {\n log('Native video element event: ended');\n pause();\n stopUpdatingWallclockTime();\n eventBus.trigger(_coreEventsEventsJs2['default'].PLAYBACK_ENDED);\n }\n\n function onPlaybackError(event) {\n var target = event.target || event.srcElement;\n eventBus.trigger(_coreEventsEventsJs2['default'].PLAYBACK_ERROR, { error: target.error });\n }\n\n function onWallclockTime() {\n eventBus.trigger(_coreEventsEventsJs2['default'].WALLCLOCK_TIME_UPDATED, { isDynamic: isDynamic, time: new Date() });\n }\n\n function onBytesAppended(e) {\n var ranges = e.bufferedRanges;\n if (!ranges || !ranges.length) return;\n var bufferedStart = Math.max(ranges.start(0), streamInfo.start);\n var earliestTime = commonEarliestTime[streamInfo.id] === undefined ? bufferedStart : Math.max(commonEarliestTime[streamInfo.id], bufferedStart);\n if (earliestTime === commonEarliestTime[streamInfo.id]) return;\n if (!isDynamic && !streamInfo.isFirst && getStreamStartTime(true) < earliestTime) {\n seek(earliestTime);\n }\n commonEarliestTime[streamInfo.id] = earliestTime;\n }\n\n function onBufferLevelStateChanged(e) {\n // do not stall playback when get an event from Stream that is not active\n if (e.streamInfo.id !== streamInfo.id) return;\n videoModel.setStallState(e.mediaType, e.state === _BufferControllerJs2['default'].BUFFER_EMPTY);\n }\n\n function addAllListeners() {\n element.addEventListener('canplay', onCanPlay);\n element.addEventListener('play', onPlaybackStart);\n element.addEventListener('playing', onPlaybackPlaying);\n element.addEventListener('pause', onPlaybackPaused);\n element.addEventListener('error', onPlaybackError);\n element.addEventListener('seeking', onPlaybackSeeking);\n element.addEventListener('seeked', onPlaybackSeeked);\n element.addEventListener('timeupdate', onPlaybackTimeUpdated);\n element.addEventListener('progress', onPlaybackProgress);\n element.addEventListener('ratechange', onPlaybackRateChanged);\n element.addEventListener('loadedmetadata', onPlaybackMetaDataLoaded);\n element.addEventListener('ended', onPlaybackEnded);\n }\n\n function removeAllListeners() {\n element.removeEventListener('canplay', onCanPlay);\n element.removeEventListener('play', onPlaybackStart);\n element.removeEventListener('playing', onPlaybackPlaying);\n element.removeEventListener('pause', onPlaybackPaused);\n element.removeEventListener('error', onPlaybackError);\n element.removeEventListener('seeking', onPlaybackSeeking);\n element.removeEventListener('seeked', onPlaybackSeeked);\n element.removeEventListener('timeupdate', onPlaybackTimeUpdated);\n element.removeEventListener('progress', onPlaybackProgress);\n element.removeEventListener('ratechange', onPlaybackRateChanged);\n element.removeEventListener('loadedmetadata', onPlaybackMetaDataLoaded);\n element.removeEventListener('ended', onPlaybackEnded);\n }\n\n instance = {\n initialize: initialize,\n setConfig: setConfig,\n getStreamStartTime: getStreamStartTime,\n getTimeToStreamEnd: getTimeToStreamEnd,\n isPlaybackStarted: isPlaybackStarted,\n getStreamId: getStreamId,\n getStreamDuration: getStreamDuration,\n getTime: getTime,\n getPlaybackRate: getPlaybackRate,\n getPlayedRanges: getPlayedRanges,\n getEnded: getEnded,\n getIsDynamic: getIsDynamic,\n setLiveStartTime: setLiveStartTime,\n getLiveStartTime: getLiveStartTime,\n computeLiveDelay: computeLiveDelay,\n play: play,\n isPaused: isPaused,\n pause: pause,\n isSeeking: isSeeking,\n seek: seek,\n reset: reset\n };\n\n setup();\n\n return instance;\n}\n\nPlaybackController.__dashjs_factory_name = 'PlaybackController';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(PlaybackController);\nmodule.exports = exports['default'];\n\n},{\"../../core/Debug.js\":5,\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7,\"../../core/events/Events.js\":9,\"../../streaming/models/MediaPlayerModel.js\":64,\"../models/URIQueryAndFragmentModel.js\":66,\"./BufferController.js\":49}],55:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _voMetricsPlayListJs = _dereq_('../vo/metrics/PlayList.js');\n\nvar _voMetricsPlayListJs2 = _interopRequireDefault(_voMetricsPlayListJs);\n\nvar _PlaybackControllerJs = _dereq_('./PlaybackController.js');\n\nvar _PlaybackControllerJs2 = _interopRequireDefault(_PlaybackControllerJs);\n\nvar _AbrControllerJs = _dereq_('./AbrController.js');\n\nvar _AbrControllerJs2 = _interopRequireDefault(_AbrControllerJs);\n\nvar _BufferControllerJs = _dereq_('./BufferController.js');\n\nvar _BufferControllerJs2 = _interopRequireDefault(_BufferControllerJs);\n\nvar _rulesSchedulingBufferLevelRuleJs = _dereq_('../rules/scheduling/BufferLevelRule.js');\n\nvar _rulesSchedulingBufferLevelRuleJs2 = _interopRequireDefault(_rulesSchedulingBufferLevelRuleJs);\n\nvar _rulesSchedulingNextFragmentRequestRuleJs = _dereq_('../rules/scheduling/NextFragmentRequestRule.js');\n\nvar _rulesSchedulingNextFragmentRequestRuleJs2 = _interopRequireDefault(_rulesSchedulingNextFragmentRequestRuleJs);\n\nvar _TextSourceBufferJs = _dereq_('../TextSourceBuffer.js');\n\nvar _TextSourceBufferJs2 = _interopRequireDefault(_TextSourceBufferJs);\n\nvar _modelsMetricsModelJs = _dereq_('../models/MetricsModel.js');\n\nvar _modelsMetricsModelJs2 = _interopRequireDefault(_modelsMetricsModelJs);\n\nvar _dashDashMetricsJs = _dereq_('../../dash/DashMetrics.js');\n\nvar _dashDashMetricsJs2 = _interopRequireDefault(_dashDashMetricsJs);\n\nvar _dashDashAdapterJs = _dereq_('../../dash/DashAdapter.js');\n\nvar _dashDashAdapterJs2 = _interopRequireDefault(_dashDashAdapterJs);\n\nvar _controllersSourceBufferControllerJs = _dereq_('../controllers/SourceBufferController.js');\n\nvar _controllersSourceBufferControllerJs2 = _interopRequireDefault(_controllersSourceBufferControllerJs);\n\nvar _VirtualBufferJs = _dereq_('../VirtualBuffer.js');\n\nvar _VirtualBufferJs2 = _interopRequireDefault(_VirtualBufferJs);\n\nvar _utilsLiveEdgeFinderJs = _dereq_('../utils/LiveEdgeFinder.js');\n\nvar _utilsLiveEdgeFinderJs2 = _interopRequireDefault(_utilsLiveEdgeFinderJs);\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreDebugJs = _dereq_('../../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nfunction ScheduleController(config) {\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var metricsModel = config.metricsModel;\n var manifestModel = config.manifestModel;\n var adapter = config.adapter;\n var dashMetrics = config.dashMetrics;\n var dashManifestModel = config.dashManifestModel;\n var timelineConverter = config.timelineConverter;\n var mediaPlayerModel = config.mediaPlayerModel;\n\n var instance = undefined,\n type = undefined,\n ready = undefined,\n fragmentModel = undefined,\n isDynamic = undefined,\n currentRepresentationInfo = undefined,\n initialPlayback = undefined,\n isStopped = undefined,\n playListMetrics = undefined,\n playListTraceMetrics = undefined,\n playListTraceMetricsClosed = undefined,\n isFragmentLoading = undefined,\n timeToLoadDelay = undefined,\n validateTimeout = undefined,\n seekTarget = undefined,\n playbackController = undefined,\n abrController = undefined,\n streamProcessor = undefined,\n fragmentController = undefined,\n liveEdgeFinder = undefined,\n bufferController = undefined,\n bufferLevelRule = undefined,\n nextFragmentRequestRule = undefined,\n scheduleWhilePaused = undefined;\n\n function setup() {\n initialPlayback = true;\n isStopped = false;\n playListMetrics = null;\n playListTraceMetrics = null;\n playListTraceMetricsClosed = true;\n isFragmentLoading = false;\n timeToLoadDelay = 0;\n seekTarget = NaN;\n }\n\n function initialize(Type, StreamProcessor) {\n type = Type;\n streamProcessor = StreamProcessor;\n liveEdgeFinder = (0, _utilsLiveEdgeFinderJs2['default'])(context).getInstance();\n playbackController = (0, _PlaybackControllerJs2['default'])(context).getInstance();\n abrController = (0, _AbrControllerJs2['default'])(context).getInstance();\n fragmentController = streamProcessor.getFragmentController();\n bufferController = streamProcessor.getBufferController();\n fragmentModel = fragmentController.getModel(this);\n isDynamic = streamProcessor.isDynamic();\n scheduleWhilePaused = mediaPlayerModel.getScheduleWhilePaused();\n\n bufferLevelRule = (0, _rulesSchedulingBufferLevelRuleJs2['default'])(context).create({\n dashMetrics: (0, _dashDashMetricsJs2['default'])(context).getInstance(),\n metricsModel: (0, _modelsMetricsModelJs2['default'])(context).getInstance(),\n textSourceBuffer: (0, _TextSourceBufferJs2['default'])(context).getInstance()\n });\n\n nextFragmentRequestRule = (0, _rulesSchedulingNextFragmentRequestRuleJs2['default'])(context).create({\n adapter: (0, _dashDashAdapterJs2['default'])(context).getInstance(),\n sourceBufferController: (0, _controllersSourceBufferControllerJs2['default'])(context).getInstance(),\n virtualBuffer: (0, _VirtualBufferJs2['default'])(context).getInstance(),\n textSourceBuffer: (0, _TextSourceBufferJs2['default'])(context).getInstance()\n\n });\n\n if (dashManifestModel.getIsTextTrack(type)) {\n eventBus.on(_coreEventsEventsJs2['default'].TIMED_TEXT_REQUESTED, onTimedTextRequested, this);\n }\n\n eventBus.on(_coreEventsEventsJs2['default'].LIVE_EDGE_SEARCH_COMPLETED, onLiveEdgeSearchCompleted, this);\n eventBus.on(_coreEventsEventsJs2['default'].QUALITY_CHANGED, onQualityChanged, this);\n eventBus.on(_coreEventsEventsJs2['default'].DATA_UPDATE_STARTED, onDataUpdateStarted, this);\n eventBus.on(_coreEventsEventsJs2['default'].DATA_UPDATE_COMPLETED, onDataUpdateCompleted, this);\n eventBus.on(_coreEventsEventsJs2['default'].FRAGMENT_LOADING_COMPLETED, onFragmentLoadingCompleted, this);\n eventBus.on(_coreEventsEventsJs2['default'].STREAM_COMPLETED, onStreamCompleted, this);\n eventBus.on(_coreEventsEventsJs2['default'].STREAM_INITIALIZED, onStreamInitialized, this);\n eventBus.on(_coreEventsEventsJs2['default'].BUFFER_LEVEL_STATE_CHANGED, onBufferLevelStateChanged, this);\n eventBus.on(_coreEventsEventsJs2['default'].BUFFER_CLEARED, onBufferCleared, this);\n eventBus.on(_coreEventsEventsJs2['default'].BYTES_APPENDED, onBytesAppended, this);\n eventBus.on(_coreEventsEventsJs2['default'].INIT_REQUESTED, onInitRequested, this);\n eventBus.on(_coreEventsEventsJs2['default'].QUOTA_EXCEEDED, onQuotaExceeded, this);\n eventBus.on(_coreEventsEventsJs2['default'].BUFFER_LEVEL_STATE_CHANGED, onBufferLevelStateChanged, this);\n eventBus.on(_coreEventsEventsJs2['default'].PLAYBACK_STARTED, onPlaybackStarted, this);\n eventBus.on(_coreEventsEventsJs2['default'].PLAYBACK_SEEKING, onPlaybackSeeking, this);\n eventBus.on(_coreEventsEventsJs2['default'].PLAYBACK_RATE_CHANGED, onPlaybackRateChanged, this);\n eventBus.on(_coreEventsEventsJs2['default'].URL_RESOLUTION_FAILED, onURLResolutionFailed, this);\n }\n\n function clearPlayListTraceMetrics(endTime, stopreason) {\n var duration = 0;\n var startTime = null;\n\n if (playListMetrics && playListTraceMetricsClosed === false) {\n startTime = playListTraceMetrics.start;\n duration = endTime.getTime() - startTime.getTime();\n\n playListTraceMetrics.duration = duration;\n playListTraceMetrics.stopreason = stopreason;\n\n playListMetrics.trace.push(playListTraceMetrics);\n\n playListTraceMetricsClosed = true;\n }\n }\n\n function start() {\n if (!ready) return;\n addPlaylistTraceMetrics();\n isStopped = false;\n\n if (initialPlayback) {\n getInitRequest(currentRepresentationInfo.quality);\n } else {\n //Validate will be first called after the init segment is appended. But in the case where we stop and start\n //the ScheduleController E.g dateUpdate on manifest refresh for live streams. we need to start validate again.\n validate();\n }\n\n if (initialPlayback) {\n initialPlayback = false;\n }\n log('Schedule controller starting for ' + type);\n }\n\n function stop() {\n if (isStopped) return;\n isStopped = true;\n clearInterval(validateTimeout);\n log('Schedule controller stopping for ' + type);\n }\n\n function getInitRequest(quality) {\n var request = adapter.getInitRequest(streamProcessor, quality);\n\n if (request !== null) {\n fragmentModel.executeRequest(request);\n }\n\n return request;\n }\n\n function replaceCanceledRequests(canceledRequests) {\n var ln = canceledRequests.length;\n // EPSILON is used to avoid javascript floating point issue, e.g. if request.startTime = 19.2,\n // request.duration = 3.83, than request.startTime + request.startTime = 19.2 + 1.92 = 21.119999999999997\n var EPSILON = 0.1;\n var request, time, i;\n\n for (i = 0; i < ln; i++) {\n request = canceledRequests[i];\n time = request.startTime + request.duration / 2 + EPSILON;\n request = adapter.getFragmentRequestForTime(streamProcessor, currentRepresentationInfo, time, { timeThreshold: 0, ignoreIsFinished: true });\n if (request) {\n fragmentModel.executeRequest(request);\n }\n }\n }\n\n function validate() {\n if (isStopped || playbackController.isPaused() && !scheduleWhilePaused) return;\n //log(\"validating\", type);\n var readyToLoad = bufferLevelRule.execute(streamProcessor);\n if (readyToLoad && !isFragmentLoading && (dashManifestModel.getIsTextTrack(type) || !bufferController.getIsAppendingInProgress())) {\n isFragmentLoading = true;\n\n var getNextFragment = function getNextFragment() {\n var request = nextFragmentRequestRule.execute(streamProcessor);\n if (request) {\n fragmentModel.executeRequest(request); // we load\n } else {\n isFragmentLoading = false;\n startValidateTimer(1000); //we loop\n }\n };\n //Run ABR rules - let it callback to getNextFragment once it is done running.\n abrController.getPlaybackQuality(streamProcessor, getNextFragment);\n } else {\n startValidateTimer(1000); //we loop\n }\n }\n\n function startValidateTimer(value) {\n validateTimeout = setTimeout(validate, value);\n }\n\n function onQualityChanged(e) {\n if (type !== e.mediaType || streamProcessor.getStreamInfo().id !== e.streamInfo.id) return;\n\n currentRepresentationInfo = streamProcessor.getRepresentationInfoForQuality(e.newQuality);\n if (currentRepresentationInfo === null || currentRepresentationInfo === undefined) {\n throw 'Unexpected error! - currentRepresentationInfo is null or undefined';\n }\n\n clearPlayListTraceMetrics(new Date(), _voMetricsPlayListJs2['default'].Trace.REPRESENTATION_SWITCH_STOP_REASON);\n addPlaylistTraceMetrics();\n }\n\n function onDataUpdateCompleted(e) {\n if (e.error) return;\n currentRepresentationInfo = adapter.convertDataToTrack(manifestModel.getValue(), e.currentRepresentation);\n }\n\n function onStreamInitialized(e) {\n if (e.error) return;\n\n currentRepresentationInfo = streamProcessor.getCurrentRepresentationInfo();\n\n if (!isDynamic || liveEdgeFinder.getLiveEdge() !== null) {\n ready = true;\n }\n\n start();\n }\n\n function onStreamCompleted(e) {\n if (e.fragmentModel !== fragmentModel) return;\n stop();\n log('Stream is complete');\n }\n\n function onFragmentLoadingCompleted(e) {\n if (e.sender !== fragmentModel) return;\n\n if (!isNaN(e.request.index)) {\n isFragmentLoading = false;\n }\n\n if (e.error && e.serviceLocation && !isStopped) {\n replaceCanceledRequests([e.request]);\n }\n }\n\n function onBytesAppended(e) {\n if (e.sender.getStreamProcessor() !== streamProcessor) return;\n validate();\n }\n\n function onDataUpdateStarted(e) {\n if (e.sender.getStreamProcessor() !== streamProcessor) return;\n stop();\n }\n\n function onInitRequested(e) {\n if (e.sender.getStreamProcessor() !== streamProcessor) return;\n\n getInitRequest(e.requiredQuality);\n }\n\n function onBufferCleared(e) {\n if (e.sender.getStreamProcessor() !== streamProcessor) return;\n // after the data has been removed from the buffer we should remove the requests from the list of\n // the executed requests for which playback time is inside the time interval that has been removed from the buffer\n fragmentModel.removeExecutedRequestsBeforeTime(e.to);\n\n if (e.hasEnoughSpaceToAppend && !bufferController.getIsBufferingCompleted()) {\n start();\n }\n }\n\n function onBufferLevelStateChanged(e) {\n if (e.sender.getStreamProcessor() === streamProcessor && e.state === _BufferControllerJs2['default'].BUFFER_EMPTY && !playbackController.isSeeking()) {\n log('Stalling Buffer');\n clearPlayListTraceMetrics(new Date(), _voMetricsPlayListJs2['default'].Trace.REBUFFERING_REASON);\n }\n }\n\n function onQuotaExceeded(e) {\n if (e.sender.getStreamProcessor() !== streamProcessor) return;\n stop();\n }\n\n function onURLResolutionFailed() {\n fragmentModel.abortRequests();\n stop();\n }\n\n function addPlaylistTraceMetrics() {\n if (playListMetrics && playListTraceMetricsClosed === true && currentRepresentationInfo) {\n playListTraceMetricsClosed = false;\n\n playListTraceMetrics = new _voMetricsPlayListJs2['default'].Trace();\n playListTraceMetrics.representationid = currentRepresentationInfo.id;\n playListTraceMetrics.start = new Date();\n playListTraceMetrics.mstart = playbackController.getTime() * 1000;\n playListTraceMetrics.playbackspeed = playbackController.getPlaybackRate().toString();\n }\n }\n\n function onTimedTextRequested(e) {\n if (e.sender.getStreamProcessor() !== streamProcessor) return;\n getInitRequest(e.index);\n }\n\n function onPlaybackStarted() {\n start();\n }\n\n function onPlaybackSeeking(e) {\n\n seekTarget = e.seekTime;\n\n if (!initialPlayback) {\n isFragmentLoading = false;\n }\n if (isStopped) {\n start();\n }\n\n var metrics = metricsModel.getMetricsFor('stream');\n var manifestUpdateInfo = dashMetrics.getCurrentManifestUpdate(metrics);\n var latency = currentRepresentationInfo.DVRWindow ? currentRepresentationInfo.DVRWindow.end - playbackController.getTime() : NaN;\n metricsModel.updateManifestUpdateInfo(manifestUpdateInfo, { latency: latency });\n }\n\n function onPlaybackRateChanged(e) {\n if (playListTraceMetrics) {\n playListTraceMetrics.playbackspeed = e.playbackRate.toString();\n }\n }\n\n function onLiveEdgeSearchCompleted(e) {\n if (e.error) return;\n\n var liveEdgeTime = e.liveEdge;\n var manifestInfo = currentRepresentationInfo.mediaInfo.streamInfo.manifestInfo;\n var startTime = liveEdgeTime - playbackController.computeLiveDelay(currentRepresentationInfo.fragmentDuration, manifestInfo.DVRWindowSize / 2);\n var metrics = metricsModel.getMetricsFor('stream');\n var manifestUpdateInfo = dashMetrics.getCurrentManifestUpdate(metrics);\n var currentLiveStart = playbackController.getLiveStartTime();\n\n var request = undefined,\n actualStartTime = undefined;\n\n // get a request for a start time\n request = adapter.getFragmentRequestForTime(streamProcessor, currentRepresentationInfo, startTime, { ignoreIsFinished: true });\n actualStartTime = request.startTime;\n seekTarget = actualStartTime; //Setting seekTarget will allow NextFragmentRequestRule's first request time to be accurate.\n if (isNaN(currentLiveStart) || actualStartTime > currentLiveStart) {\n playbackController.setLiveStartTime(actualStartTime);\n }\n\n metricsModel.updateManifestUpdateInfo(manifestUpdateInfo, { currentTime: actualStartTime, presentationStartTime: liveEdgeTime, latency: liveEdgeTime - actualStartTime, clientTimeOffset: timelineConverter.getClientTimeOffset() });\n ready = true;\n start();\n }\n\n function getSeekTarget() {\n return seekTarget;\n }\n\n function setSeekTarget(value) {\n seekTarget = value;\n }\n\n function getFragmentModel() {\n return fragmentModel;\n }\n\n function setTimeToLoadDelay(value) {\n timeToLoadDelay = value;\n }\n\n function getTimeToLoadDelay() {\n return timeToLoadDelay;\n }\n\n function getStreamProcessor() {\n return streamProcessor;\n }\n\n function setPlayList(playList) {\n playListMetrics = playList;\n }\n\n function finalisePlayList(time, reason) {\n clearPlayListTraceMetrics(time, reason);\n playListMetrics = null;\n }\n\n function reset() {\n eventBus.off(_coreEventsEventsJs2['default'].LIVE_EDGE_SEARCH_COMPLETED, onLiveEdgeSearchCompleted, this);\n eventBus.off(_coreEventsEventsJs2['default'].DATA_UPDATE_STARTED, onDataUpdateStarted, this);\n eventBus.off(_coreEventsEventsJs2['default'].DATA_UPDATE_COMPLETED, onDataUpdateCompleted, this);\n eventBus.off(_coreEventsEventsJs2['default'].BUFFER_LEVEL_STATE_CHANGED, onBufferLevelStateChanged, this);\n eventBus.off(_coreEventsEventsJs2['default'].QUALITY_CHANGED, onQualityChanged, this);\n eventBus.off(_coreEventsEventsJs2['default'].FRAGMENT_LOADING_COMPLETED, onFragmentLoadingCompleted, this);\n eventBus.off(_coreEventsEventsJs2['default'].STREAM_COMPLETED, onStreamCompleted, this);\n eventBus.off(_coreEventsEventsJs2['default'].STREAM_INITIALIZED, onStreamInitialized, this);\n eventBus.off(_coreEventsEventsJs2['default'].QUOTA_EXCEEDED, onQuotaExceeded, this);\n eventBus.off(_coreEventsEventsJs2['default'].BYTES_APPENDED, onBytesAppended, this);\n eventBus.off(_coreEventsEventsJs2['default'].BUFFER_CLEARED, onBufferCleared, this);\n eventBus.off(_coreEventsEventsJs2['default'].INIT_REQUESTED, onInitRequested, this);\n eventBus.off(_coreEventsEventsJs2['default'].PLAYBACK_RATE_CHANGED, onPlaybackRateChanged, this);\n eventBus.off(_coreEventsEventsJs2['default'].PLAYBACK_SEEKING, onPlaybackSeeking, this);\n eventBus.off(_coreEventsEventsJs2['default'].PLAYBACK_STARTED, onPlaybackStarted, this);\n eventBus.off(_coreEventsEventsJs2['default'].URL_RESOLUTION_FAILED, onURLResolutionFailed, this);\n\n if (dashManifestModel.getIsTextTrack(type)) {\n eventBus.off(_coreEventsEventsJs2['default'].TIMED_TEXT_REQUESTED, onTimedTextRequested, this);\n }\n\n stop();\n fragmentController.detachModel(fragmentModel);\n isFragmentLoading = false;\n timeToLoadDelay = 0;\n seekTarget = NaN;\n playbackController = null;\n playListMetrics = null;\n }\n\n instance = {\n initialize: initialize,\n getStreamProcessor: getStreamProcessor,\n getSeekTarget: getSeekTarget,\n setSeekTarget: setSeekTarget,\n getFragmentModel: getFragmentModel,\n setTimeToLoadDelay: setTimeToLoadDelay,\n getTimeToLoadDelay: getTimeToLoadDelay,\n replaceCanceledRequests: replaceCanceledRequests,\n start: start,\n stop: stop,\n reset: reset,\n setPlayList: setPlayList,\n finalisePlayList: finalisePlayList\n };\n\n setup();\n\n return instance;\n}\n\nScheduleController.__dashjs_factory_name = 'ScheduleController';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(ScheduleController);\nmodule.exports = exports['default'];\n\n},{\"../../core/Debug.js\":5,\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7,\"../../core/events/Events.js\":9,\"../../dash/DashAdapter.js\":11,\"../../dash/DashMetrics.js\":13,\"../TextSourceBuffer.js\":41,\"../VirtualBuffer.js\":43,\"../controllers/SourceBufferController.js\":56,\"../models/MetricsModel.js\":65,\"../rules/scheduling/BufferLevelRule.js\":80,\"../rules/scheduling/NextFragmentRequestRule.js\":81,\"../utils/LiveEdgeFinder.js\":92,\"../vo/metrics/PlayList.js\":119,\"./AbrController.js\":46,\"./BufferController.js\":49,\"./PlaybackController.js\":54}],56:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _TextSourceBufferJs = _dereq_('../TextSourceBuffer.js');\n\nvar _TextSourceBufferJs2 = _interopRequireDefault(_TextSourceBufferJs);\n\nvar _MediaControllerJs = _dereq_('./MediaController.js');\n\nvar _MediaControllerJs2 = _interopRequireDefault(_MediaControllerJs);\n\nvar _dashDashAdapterJs = _dereq_('../../dash/DashAdapter.js');\n\nvar _dashDashAdapterJs2 = _interopRequireDefault(_dashDashAdapterJs);\n\nvar _utilsErrorHandlerJs = _dereq_('../utils/ErrorHandler.js');\n\nvar _utilsErrorHandlerJs2 = _interopRequireDefault(_utilsErrorHandlerJs);\n\nvar _StreamControllerJs = _dereq_('./StreamController.js');\n\nvar _StreamControllerJs2 = _interopRequireDefault(_StreamControllerJs);\n\nvar _TextTracksJs = _dereq_('../TextTracks.js');\n\nvar _TextTracksJs2 = _interopRequireDefault(_TextTracksJs);\n\nvar _utilsVTTParserJs = _dereq_('../utils/VTTParser.js');\n\nvar _utilsVTTParserJs2 = _interopRequireDefault(_utilsVTTParserJs);\n\nvar _utilsTTMLParserJs = _dereq_('../utils/TTMLParser.js');\n\nvar _utilsTTMLParserJs2 = _interopRequireDefault(_utilsTTMLParserJs);\n\nvar _modelsVideoModelJs = _dereq_('../models/VideoModel.js');\n\nvar _modelsVideoModelJs2 = _interopRequireDefault(_modelsVideoModelJs);\n\nvar _voErrorJs = _dereq_('../vo/Error.js');\n\nvar _voErrorJs2 = _interopRequireDefault(_voErrorJs);\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar QUOTA_EXCEEDED_ERROR_CODE = 22;\n\nfunction SourceBufferController() {\n\n var context = this.context;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var instance = undefined,\n dashManifestModel = undefined;\n\n function createSourceBuffer(mediaSource, mediaInfo) {\n\n var codec = mediaInfo.codec;\n var buffer = null;\n\n try {\n // Safari claims to support anything starting 'application/mp4'.\n // it definitely doesn't understand 'application/mp4;codecs=\"stpp\"'\n // - currently no browser does, so check for it and use our own\n // implementation. The same is true for codecs=\"wvtt\".\n if (codec.match(/application\\/mp4;\\s*codecs=\"(stpp|wvtt)\"/i)) {\n throw new _voErrorJs2['default']('not really supported');\n }\n\n buffer = mediaSource.addSourceBuffer(codec);\n } catch (ex) {\n if (mediaInfo.isText || codec.indexOf('codecs=\"stpp\"') !== -1 || codec.indexOf('codecs=\"wvtt\"') !== -1) {\n buffer = (0, _TextSourceBufferJs2['default'])(context).getInstance();\n buffer.setConfig({\n errHandler: (0, _utilsErrorHandlerJs2['default'])(context).getInstance(),\n adapter: (0, _dashDashAdapterJs2['default'])(context).getInstance(),\n dashManifestModel: dashManifestModel,\n mediaController: (0, _MediaControllerJs2['default'])(context).getInstance(),\n videoModel: (0, _modelsVideoModelJs2['default'])(context).getInstance(),\n streamController: (0, _StreamControllerJs2['default'])(context).getInstance(),\n textTracks: (0, _TextTracksJs2['default'])(context).getInstance(),\n VTTParser: (0, _utilsVTTParserJs2['default'])(context).getInstance(),\n TTMLParser: (0, _utilsTTMLParserJs2['default'])(context).getInstance()\n\n });\n } else {\n throw ex;\n }\n }\n\n return buffer;\n }\n\n function removeSourceBuffer(mediaSource, buffer) {\n try {\n mediaSource.removeSourceBuffer(buffer);\n } catch (ex) {}\n }\n\n function getBufferRange(buffer, time, tolerance) {\n var ranges = null;\n var start = 0;\n var end = 0;\n var firstStart = null;\n var lastEnd = null;\n var gap = 0;\n\n var len, i;\n\n var toler = tolerance || 0.15;\n\n try {\n ranges = buffer.buffered;\n } catch (ex) {\n return null;\n }\n\n if (ranges !== null && ranges !== undefined) {\n for (i = 0, len = ranges.length; i < len; i++) {\n start = ranges.start(i);\n end = ranges.end(i);\n if (firstStart === null) {\n gap = Math.abs(start - time);\n if (time >= start && time < end) {\n // start the range\n firstStart = start;\n lastEnd = end;\n } else if (gap <= toler) {\n // start the range even though the buffer does not contain time 0\n firstStart = start;\n lastEnd = end;\n }\n } else {\n gap = start - lastEnd;\n if (gap <= toler) {\n // the discontinuity is smaller than the tolerance, combine the ranges\n lastEnd = end;\n } else {\n break;\n }\n }\n }\n\n if (firstStart !== null) {\n return { start: firstStart, end: lastEnd };\n }\n }\n\n return null;\n }\n\n function getAllRanges(buffer) {\n var ranges = null;\n\n try {\n ranges = buffer.buffered;\n return ranges;\n } catch (ex) {\n return null;\n }\n }\n\n function getTotalBufferedTime(buffer) {\n var ranges = getAllRanges(buffer);\n var totalBufferedTime = 0;\n var ln, i;\n\n if (!ranges) return totalBufferedTime;\n\n for (i = 0, ln = ranges.length; i < ln; i++) {\n totalBufferedTime += ranges.end(i) - ranges.start(i);\n }\n\n return totalBufferedTime;\n }\n\n function getBufferLength(buffer, time, tolerance) {\n\n var range, length;\n\n range = getBufferRange(buffer, time, tolerance);\n\n if (range === null) {\n length = 0;\n } else {\n length = range.end - time;\n }\n\n return length;\n }\n\n function getRangeDifference(currentRanges, buffer) {\n if (!buffer) return null;\n\n //TODO we may need to look for a more elegant and robust method\n // The logic below checks that is the difference between currentRanges and actual SourceBuffer ranges\n\n var newRanges = getAllRanges(buffer);\n var newStart, newEnd, equalStart, equalEnd, currentRange, nextCurrentRange, nextNewRange, hasRange, diff;\n\n if (!newRanges) return null;\n\n for (var i = 0, ln = newRanges.length; i < ln; i++) {\n hasRange = currentRanges.length > i;\n currentRange = hasRange ? { start: currentRanges.start(i), end: currentRanges.end(i) } : null;\n newStart = newRanges.start(i);\n newEnd = newRanges.end(i);\n\n // if there is no range with the same index it means that a new range has been added. This range is\n // the difference we are looking for\n // Example\n // current ranges\n // 0|---range1---|4 8|--range2--|12\n // new ranges\n // 0|---range1---|4| 8|--range2--|12 16|--range3--|20\n\n if (!currentRange) {\n diff = { start: newStart, end: newEnd };\n return diff;\n }\n\n equalStart = currentRange.start === newStart;\n equalEnd = currentRange.end === newEnd;\n\n // if ranges are equal do nothing here and go the next ranges\n if (equalStart && equalEnd) continue;\n\n // start or/and end of the range has been changed\n if (equalStart) {\n diff = { start: currentRange.end, end: newEnd };\n } else if (equalEnd) {\n diff = { start: newStart, end: currentRange.start };\n } else {\n // new range has been added before the current one\n diff = { start: newStart, end: newEnd };\n return diff;\n }\n\n // if there is next current range but no next new range (it it is not equal the next current range) it means\n // that the ranges have been merged\n // Example 1\n // current ranges\n // 0|---range1---|4 8|--range2--|12 16|---range3---|\n // new ranges\n // 0|-----------range1-----------|12 16|---range3--|\n nextCurrentRange = currentRanges.length > i + 1 ? { start: currentRanges.start(i + 1), end: currentRanges.end(i + 1) } : null;\n nextNewRange = i + 1 < ln ? { start: newRanges.start(i + 1), end: newRanges.end(i + 1) } : null;\n\n if (nextCurrentRange && (!nextNewRange || nextNewRange.start !== nextCurrentRange.start || nextNewRange.end !== nextCurrentRange.end)) {\n diff.end = nextCurrentRange.start;\n }\n\n return diff;\n }\n\n return null;\n }\n\n function append(buffer, chunk) {\n var bytes = chunk.bytes;\n var appendMethod = 'append' in buffer ? 'append' : 'appendBuffer' in buffer ? 'appendBuffer' : null;\n // our user-defined sourcebuffer-like object has Object as its\n // prototype whereas built-in SourceBuffers will have something\n // more sensible. do not pass chunk to built-in append.\n var acceptsChunk = Object.prototype.toString.call(buffer).slice(8, -1) === 'Object';\n\n if (!appendMethod) return;\n\n try {\n waitForUpdateEnd(buffer, function () {\n if (acceptsChunk) {\n // chunk.start is used in calculations by TextSourceBuffer\n buffer[appendMethod](bytes, chunk);\n } else {\n buffer[appendMethod](bytes);\n }\n // updating is in progress, we should wait for it to complete before signaling that this operation is done\n waitForUpdateEnd(buffer, function () {\n eventBus.trigger(_coreEventsEventsJs2['default'].SOURCEBUFFER_APPEND_COMPLETED, { buffer: buffer, bytes: bytes });\n });\n });\n } catch (err) {\n eventBus.trigger(_coreEventsEventsJs2['default'].SOURCEBUFFER_APPEND_COMPLETED, { buffer: buffer, bytes: bytes, error: new _voErrorJs2['default'](err.code, err.message, null) });\n }\n }\n\n function remove(buffer, start, end, mediaSource) {\n\n try {\n // make sure that the given time range is correct. Otherwise we will get InvalidAccessError\n waitForUpdateEnd(buffer, function () {\n if (start >= 0 && end > start && mediaSource.readyState !== 'ended') {\n buffer.remove(start, end);\n }\n // updating is in progress, we should wait for it to complete before signaling that this operation is done\n waitForUpdateEnd(buffer, function () {\n eventBus.trigger(_coreEventsEventsJs2['default'].SOURCEBUFFER_REMOVE_COMPLETED, { buffer: buffer, from: start, to: end });\n });\n });\n } catch (err) {\n eventBus.trigger(_coreEventsEventsJs2['default'].SOURCEBUFFER_REMOVE_COMPLETED, { buffer: buffer, from: start, to: end, error: new _voErrorJs2['default'](err.code, err.message, null) });\n }\n }\n\n function abort(mediaSource, buffer) {\n try {\n if (mediaSource.readyState === 'open') {\n buffer.abort();\n }\n } catch (ex) {}\n }\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.dashManifestModel) {\n dashManifestModel = config.dashManifestModel;\n }\n }\n\n function waitForUpdateEnd(buffer, callback) {\n var intervalId;\n var CHECK_INTERVAL = 50;\n\n var checkIsUpdateEnded = function checkIsUpdateEnded() {\n // if updating is still in progress do nothing and wait for the next check again.\n if (buffer.updating) return;\n // updating is completed, now we can stop checking and resolve the promise\n clearInterval(intervalId);\n callback();\n };\n\n var updateEndHandler = function updateEndHandler() {\n if (buffer.updating) return;\n\n buffer.removeEventListener('updateend', updateEndHandler, false);\n callback();\n };\n\n if (!buffer.updating) {\n callback();\n return;\n }\n\n // use updateend event if possible\n if (typeof buffer.addEventListener === 'function') {\n try {\n buffer.addEventListener('updateend', updateEndHandler, false);\n } catch (err) {\n // use setInterval to periodically check if updating has been completed\n intervalId = setInterval(checkIsUpdateEnded, CHECK_INTERVAL);\n }\n } else {\n // use setInterval to periodically check if updating has been completed\n intervalId = setInterval(checkIsUpdateEnded, CHECK_INTERVAL);\n }\n }\n\n instance = {\n append: append,\n remove: remove,\n abort: abort,\n createSourceBuffer: createSourceBuffer,\n removeSourceBuffer: removeSourceBuffer,\n getBufferRange: getBufferRange,\n getAllRanges: getAllRanges,\n getTotalBufferedTime: getTotalBufferedTime,\n getBufferLength: getBufferLength,\n getRangeDifference: getRangeDifference,\n setConfig: setConfig\n };\n\n return instance;\n}\n\nSourceBufferController.__dashjs_factory_name = 'SourceBufferController';\nvar factory = _coreFactoryMakerJs2['default'].getSingletonFactory(SourceBufferController);\nfactory.QUOTA_EXCEEDED_ERROR_CODE = QUOTA_EXCEEDED_ERROR_CODE;\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7,\"../../core/events/Events.js\":9,\"../../dash/DashAdapter.js\":11,\"../TextSourceBuffer.js\":41,\"../TextTracks.js\":42,\"../models/VideoModel.js\":67,\"../utils/ErrorHandler.js\":90,\"../utils/TTMLParser.js\":95,\"../utils/VTTParser.js\":97,\"../vo/Error.js\":100,\"./MediaController.js\":52,\"./StreamController.js\":57}],57:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _PlaybackControllerJs = _dereq_('./PlaybackController.js');\n\nvar _PlaybackControllerJs2 = _interopRequireDefault(_PlaybackControllerJs);\n\nvar _StreamJs = _dereq_('../Stream.js');\n\nvar _StreamJs2 = _interopRequireDefault(_StreamJs);\n\nvar _ManifestUpdaterJs = _dereq_('../ManifestUpdater.js');\n\nvar _ManifestUpdaterJs2 = _interopRequireDefault(_ManifestUpdaterJs);\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _modelsURIQueryAndFragmentModelJs = _dereq_('../models/URIQueryAndFragmentModel.js');\n\nvar _modelsURIQueryAndFragmentModelJs2 = _interopRequireDefault(_modelsURIQueryAndFragmentModelJs);\n\nvar _modelsVideoModelJs = _dereq_('../models/VideoModel.js');\n\nvar _modelsVideoModelJs2 = _interopRequireDefault(_modelsVideoModelJs);\n\nvar _modelsMediaPlayerModelJs = _dereq_('../models/MediaPlayerModel.js');\n\nvar _modelsMediaPlayerModelJs2 = _interopRequireDefault(_modelsMediaPlayerModelJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _voMetricsPlayListJs = _dereq_('../vo/metrics/PlayList.js');\n\nvar _voMetricsPlayListJs2 = _interopRequireDefault(_voMetricsPlayListJs);\n\nvar _coreDebugJs = _dereq_('../../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nfunction StreamController() {\n\n var STREAM_END_THRESHOLD = 0.5;\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var instance = undefined,\n capabilities = undefined,\n manifestUpdater = undefined,\n manifestLoader = undefined,\n manifestModel = undefined,\n dashManifestModel = undefined,\n adapter = undefined,\n metricsModel = undefined,\n dashMetrics = undefined,\n liveEdgeFinder = undefined,\n mediaSourceController = undefined,\n timeSyncController = undefined,\n baseURLController = undefined,\n virtualBuffer = undefined,\n errHandler = undefined,\n timelineConverter = undefined,\n streams = undefined,\n activeStream = undefined,\n protectionController = undefined,\n protectionData = undefined,\n autoPlay = undefined,\n isStreamSwitchingInProgress = undefined,\n isUpdating = undefined,\n hasMediaError = undefined,\n hasInitialisationError = undefined,\n mediaSource = undefined,\n videoModel = undefined,\n playbackController = undefined,\n mediaPlayerModel = undefined,\n isPaused = undefined,\n initialPlayback = undefined,\n playListMetrics = undefined;\n\n function setup() {\n protectionController = null;\n streams = [];\n mediaPlayerModel = (0, _modelsMediaPlayerModelJs2['default'])(context).getInstance();\n autoPlay = true;\n isStreamSwitchingInProgress = false;\n isUpdating = false;\n isPaused = false;\n initialPlayback = true;\n playListMetrics = null;\n hasMediaError = false;\n hasInitialisationError = false;\n }\n\n function initialize(autoPl, protData) {\n autoPlay = autoPl;\n protectionData = protData;\n timelineConverter.initialize();\n\n manifestUpdater = (0, _ManifestUpdaterJs2['default'])(context).getInstance();\n manifestUpdater.setConfig({\n log: log,\n manifestModel: manifestModel,\n dashManifestModel: dashManifestModel\n });\n manifestUpdater.initialize(manifestLoader);\n\n videoModel = (0, _modelsVideoModelJs2['default'])(context).getInstance();\n playbackController = (0, _PlaybackControllerJs2['default'])(context).getInstance();\n playbackController.setConfig({\n streamController: instance,\n timelineConverter: timelineConverter,\n metricsModel: metricsModel,\n dashMetrics: dashMetrics,\n manifestModel: manifestModel,\n dashManifestModel: dashManifestModel,\n adapter: adapter,\n videoModel: videoModel\n });\n\n eventBus.on(_coreEventsEventsJs2['default'].TIME_SYNCHRONIZATION_COMPLETED, onTimeSyncCompleted, this);\n eventBus.on(_coreEventsEventsJs2['default'].PLAYBACK_SEEKING, onPlaybackSeeking, this);\n eventBus.on(_coreEventsEventsJs2['default'].PLAYBACK_TIME_UPDATED, onPlaybackTimeUpdated, this);\n eventBus.on(_coreEventsEventsJs2['default'].PLAYBACK_ENDED, onEnded, this);\n eventBus.on(_coreEventsEventsJs2['default'].PLAYBACK_ERROR, onPlaybackError, this);\n eventBus.on(_coreEventsEventsJs2['default'].PLAYBACK_STARTED, onPlaybackStarted, this);\n eventBus.on(_coreEventsEventsJs2['default'].PLAYBACK_PAUSED, onPlaybackPaused, this);\n eventBus.on(_coreEventsEventsJs2['default'].MANIFEST_UPDATED, onManifestUpdated, this);\n eventBus.on(_coreEventsEventsJs2['default'].STREAM_BUFFERING_COMPLETED, onStreamBufferingCompleted, this);\n }\n\n function flushPlaylistMetrics(reason, time) {\n time = time || new Date();\n\n if (playListMetrics) {\n if (activeStream) {\n activeStream.getProcessors().forEach(function (p) {\n var ctrlr = p.getScheduleController();\n if (ctrlr) {\n ctrlr.finalisePlayList(time, reason);\n }\n });\n }\n\n metricsModel.addPlayList(playListMetrics);\n\n playListMetrics = null;\n }\n }\n\n function addPlaylistMetrics(startReason) {\n playListMetrics = new _voMetricsPlayListJs2['default']();\n playListMetrics.start = new Date();\n playListMetrics.mstart = playbackController.getTime() * 1000;\n playListMetrics.starttype = startReason;\n\n if (activeStream) {\n activeStream.getProcessors().forEach(function (p) {\n var ctrlr = p.getScheduleController();\n if (ctrlr) {\n ctrlr.setPlayList(playListMetrics);\n }\n });\n }\n }\n /*\n * StreamController aggregates all streams defined in the manifest file\n * and implements corresponding logic to switch between them.\n */\n function fireSwitchEvent(eventType, fromStream, toStream) {\n eventBus.trigger(eventType, { fromStreamInfo: fromStream ? fromStream.getStreamInfo() : null, toStreamInfo: toStream.getStreamInfo() });\n }\n\n function startAutoPlay() {\n if (!activeStream.isActivated() || !initialPlayback) return;\n // only first stream must be played automatically during playback initialization\n if (activeStream.getStreamInfo().index === 0) {\n activeStream.startEventController();\n if (autoPlay) {\n playbackController.play();\n }\n }\n }\n\n function onPlaybackError(e) {\n var code = e.error ? e.error.code : 0;\n var msg = '';\n\n if (code === -1) {\n // not an error!\n return;\n }\n\n switch (code) {\n case 1:\n msg = 'MEDIA_ERR_ABORTED';\n break;\n case 2:\n msg = 'MEDIA_ERR_NETWORK';\n break;\n case 3:\n msg = 'MEDIA_ERR_DECODE';\n break;\n case 4:\n msg = 'MEDIA_ERR_SRC_NOT_SUPPORTED';\n break;\n case 5:\n msg = 'MEDIA_ERR_ENCRYPTED';\n break;\n default:\n msg = 'UNKNOWN';\n break;\n }\n\n hasMediaError = true;\n\n if (e.error.msExtendedCode) {\n msg += ' (0x' + (e.error.msExtendedCode >>> 0).toString(16).toUpperCase() + ')';\n }\n\n log('Video Element Error: ' + msg);\n if (e.error) {\n log(e.error);\n }\n errHandler.mediaSourceError(msg);\n reset();\n }\n\n /*\n * Called when current playback position is changed.\n * Used to determine the time current stream is finished and we should switch to the next stream.\n */\n function onPlaybackTimeUpdated(e) {\n var playbackQuality = videoModel.getPlaybackQuality();\n if (playbackQuality) {\n metricsModel.addDroppedFrames('video', playbackQuality);\n }\n\n // Sometimes after seeking timeUpdateHandler is called before seekingHandler and a new stream starts\n // from beginning instead of from a chosen position. So we do nothing if the player is in the seeking state\n if (playbackController.isSeeking()) return;\n\n // check if stream end is reached\n if (e.timeToEnd < STREAM_END_THRESHOLD) {\n mediaSourceController.signalEndOfStream(mediaSource);\n }\n }\n\n function onEnded() {\n\n var nextStream = getNextStream();\n\n if (nextStream) {\n switchStream(activeStream, nextStream, NaN);\n }\n\n flushPlaylistMetrics(nextStream ? _voMetricsPlayListJs2['default'].Trace.END_OF_PERIOD_STOP_REASON : _voMetricsPlayListJs2['default'].Trace.END_OF_CONTENT_STOP_REASON);\n }\n\n function onPlaybackSeeking(e) {\n var seekingStream = getStreamForTime(e.seekTime);\n\n if (seekingStream && seekingStream !== activeStream) {\n flushPlaylistMetrics(_voMetricsPlayListJs2['default'].Trace.END_OF_PERIOD_STOP_REASON);\n switchStream(activeStream, seekingStream, e.seekTime);\n } else {\n flushPlaylistMetrics(_voMetricsPlayListJs2['default'].Trace.USER_REQUEST_STOP_REASON);\n }\n\n addPlaylistMetrics(_voMetricsPlayListJs2['default'].SEEK_START_REASON);\n }\n\n function onPlaybackStarted() /*e*/{\n if (initialPlayback) {\n initialPlayback = false;\n addPlaylistMetrics(_voMetricsPlayListJs2['default'].INITIAL_PLAYOUT_START_REASON);\n } else {\n if (isPaused) {\n isPaused = false;\n addPlaylistMetrics(_voMetricsPlayListJs2['default'].RESUME_FROM_PAUSE_START_REASON);\n }\n }\n }\n\n function onPlaybackPaused(e) {\n if (!e.ended) {\n isPaused = true;\n flushPlaylistMetrics(_voMetricsPlayListJs2['default'].Trace.USER_REQUEST_STOP_REASON);\n }\n }\n\n /*\n * Handles the current stream buffering end moment to start the next stream buffering\n * Removing MP logic from this for now, we removing the complexity of buffering into next period for now.\n * this handler's logic caused Firefox and Safari to not period switch since the end event did not fire due to this.\n */\n function onStreamBufferingCompleted(e) {\n //var nextStream = getNextStream();\n var isLast = e.streamInfo.isLast;\n\n if (mediaSource && isLast) {\n mediaSourceController.signalEndOfStream(mediaSource);\n }\n //if (!nextStream) return;\n //nextStream.activate(mediaSource);\n }\n\n function getNextStream() {\n var start = activeStream.getStreamInfo().start;\n var duration = activeStream.getStreamInfo().duration;\n\n return streams.filter(function (stream) {\n return stream.getStreamInfo().start === start + duration;\n })[0];\n }\n\n function getStreamForTime(time) {\n var duration = 0;\n var stream = null;\n\n var ln = streams.length;\n\n if (ln > 0) {\n duration += streams[0].getStartTime();\n }\n\n for (var i = 0; i < ln; i++) {\n stream = streams[i];\n duration += stream.getDuration();\n\n if (time < duration) {\n return stream;\n }\n }\n\n return null;\n }\n\n /**\n * Returns a playhead time, in seconds, converted to be relative\n * to the start of an identified stream/period or null if no such stream\n */\n function getTimeRelativeToStreamId(time, id) {\n var stream = null;\n var baseStart = 0;\n var streamStart = 0;\n var streamDur = null;\n\n var ln = streams.length;\n\n for (var i = 0; i < ln; i++) {\n stream = streams[i];\n streamStart = stream.getStartTime();\n streamDur = stream.getDuration();\n\n // use start time, if not undefined or NaN or similar\n if (Number.isFinite(streamStart)) {\n baseStart = streamStart;\n }\n\n if (stream.getId() === id) {\n return time - baseStart;\n } else {\n // use duration if not undefined or NaN or similar\n if (Number.isFinite(streamDur)) {\n baseStart += streamDur;\n }\n }\n }\n\n return null;\n }\n\n function getActiveStreamCommonEarliestTime() {\n var commonEarliestTime = [];\n activeStream.getProcessors().forEach(function (p) {\n commonEarliestTime.push(p.getIndexHandler().getEarliestTime());\n });\n return Math.min.apply(Math, commonEarliestTime);\n }\n\n function switchStream(from, to, seekTime) {\n\n if (isStreamSwitchingInProgress || !from || !to || from === to) return;\n\n isStreamSwitchingInProgress = true;\n fireSwitchEvent(_coreEventsEventsJs2['default'].PERIOD_SWITCH_STARTED, from, to);\n\n function onMediaSourceReady() {\n if (!isNaN(seekTime)) {\n playbackController.seek(seekTime); //we only need to call seek here, IndexHandlerTime was set from seeking event\n } else {\n (function () {\n var startTime = playbackController.getStreamStartTime(true);\n activeStream.getProcessors().forEach(function (p) {\n adapter.setIndexHandlerTime(p, startTime);\n });\n playbackController.seek(startTime); //seek to period start time\n })();\n }\n playbackController.play();\n activeStream.startEventController();\n isStreamSwitchingInProgress = false;\n fireSwitchEvent(_coreEventsEventsJs2['default'].PERIOD_SWITCH_COMPLETED, from, to);\n }\n\n from.deactivate();\n activeStream = to;\n playbackController.initialize(activeStream.getStreamInfo());\n setupMediaSource(onMediaSourceReady);\n }\n\n function setupMediaSource(callback) {\n\n var sourceUrl = undefined;\n\n function onMediaSourceOpen() {\n log('MediaSource is open!');\n\n window.URL.revokeObjectURL(sourceUrl);\n mediaSource.removeEventListener('sourceopen', onMediaSourceOpen);\n mediaSource.removeEventListener('webkitsourceopen', onMediaSourceOpen);\n setMediaDuration();\n activeStream.activate(mediaSource);\n\n if (callback) {\n callback();\n }\n }\n\n if (!mediaSource) {\n mediaSource = mediaSourceController.createMediaSource();\n } else {\n mediaSourceController.detachMediaSource(videoModel);\n }\n\n mediaSource.addEventListener('sourceopen', onMediaSourceOpen, false);\n mediaSource.addEventListener('webkitsourceopen', onMediaSourceOpen, false);\n sourceUrl = mediaSourceController.attachMediaSource(mediaSource, videoModel);\n log('MediaSource attached to element. Waiting on open...');\n }\n\n function setMediaDuration() {\n var manifestDuration, mediaDuration;\n\n manifestDuration = activeStream.getStreamInfo().manifestInfo.duration;\n mediaDuration = mediaSourceController.setDuration(mediaSource, manifestDuration);\n log('Duration successfully set to: ' + mediaDuration);\n }\n\n function composeStreams() {\n var manifest = manifestModel.getValue();\n var metrics = metricsModel.getMetricsFor('stream');\n var manifestUpdateInfo = dashMetrics.getCurrentManifestUpdate(metrics);\n var remainingStreams = [];\n var streamInfo, pLen, sLen, pIdx, sIdx, streamsInfo, stream;\n\n if (!manifest) return;\n\n streamsInfo = adapter.getStreamsInfo(manifest);\n if (protectionController) {\n eventBus.trigger(_coreEventsEventsJs2['default'].PROTECTION_CREATED, { controller: protectionController, manifest: manifest });\n protectionController.setMediaElement(videoModel.getElement());\n if (protectionData) {\n protectionController.setProtectionData(protectionData);\n }\n }\n\n try {\n if (streamsInfo.length === 0) {\n throw new Error('There are no streams');\n }\n\n metricsModel.updateManifestUpdateInfo(manifestUpdateInfo, {\n currentTime: playbackController.getTime(),\n buffered: videoModel.getElement().buffered,\n presentationStartTime: streamsInfo[0].start,\n clientTimeOffset: timelineConverter.getClientTimeOffset()\n });\n\n isUpdating = true;\n\n for (pIdx = 0, pLen = streamsInfo.length; pIdx < pLen; pIdx++) {\n streamInfo = streamsInfo[pIdx];\n for (sIdx = 0, sLen = streams.length; sIdx < sLen; sIdx++) {\n // If the stream already exists we just need to update the values we got from the updated manifest\n if (streams[sIdx].getId() === streamInfo.id) {\n stream = streams[sIdx];\n remainingStreams.push(stream);\n stream.updateData(streamInfo);\n }\n }\n // If the Stream object does not exist we probably loaded the manifest the first time or it was\n // introduced in the updated manifest, so we need to create a new Stream and perform all the initialization operations\n if (!stream) {\n\n stream = (0, _StreamJs2['default'])(context).create({\n manifestModel: manifestModel,\n manifestUpdater: manifestUpdater,\n adapter: adapter,\n timelineConverter: timelineConverter,\n capabilities: capabilities,\n errHandler: errHandler,\n baseURLController: baseURLController\n });\n stream.initialize(streamInfo, protectionController);\n\n eventBus.on(_coreEventsEventsJs2['default'].STREAM_INITIALIZED, onStreamInitialized, this);\n remainingStreams.push(stream);\n\n if (activeStream) {\n stream.updateData(streamInfo);\n }\n }\n metricsModel.addManifestUpdateStreamInfo(manifestUpdateInfo, streamInfo.id, streamInfo.index, streamInfo.start, streamInfo.duration);\n stream = null;\n }\n\n streams = remainingStreams;\n\n // If the active stream has not been set up yet, let it be the first Stream in the list\n if (!activeStream) {\n activeStream = streams[0];\n fireSwitchEvent(_coreEventsEventsJs2['default'].PERIOD_SWITCH_STARTED, null, activeStream);\n playbackController.initialize(activeStream.getStreamInfo());\n fireSwitchEvent(_coreEventsEventsJs2['default'].PERIOD_SWITCH_COMPLETED, null, activeStream);\n }\n\n if (!mediaSource) {\n setupMediaSource();\n }\n\n isUpdating = false;\n checkIfUpdateCompleted();\n } catch (e) {\n errHandler.manifestError(e.message, 'nostreamscomposed', manifest);\n hasInitialisationError = true;\n reset();\n }\n }\n\n function checkIfUpdateCompleted() {\n if (isUpdating) return;\n\n var ln = streams.length;\n var i = 0;\n\n startAutoPlay();\n\n for (i; i < ln; i++) {\n if (!streams[i].isInitialized()) return;\n }\n\n eventBus.trigger(_coreEventsEventsJs2['default'].STREAMS_COMPOSED);\n }\n\n function onStreamInitialized() /*e*/{\n checkIfUpdateCompleted();\n }\n\n function onTimeSyncCompleted() /*e*/{\n composeStreams();\n }\n\n function onManifestUpdated(e) {\n if (!e.error) {\n //Since streams are not composed yet , need to manually look up useCalculatedLiveEdgeTime to detect if stream\n //is SegmentTimeline to avoid using time source\n var manifest = e.manifest;\n var streamInfo = adapter.getStreamsInfo(manifest)[0];\n var mediaInfo = adapter.getMediaInfoForType(manifest, streamInfo, 'video') || adapter.getMediaInfoForType(manifest, streamInfo, 'audio');\n\n var adaptation, useCalculatedLiveEdgeTime;\n\n if (mediaInfo) {\n adaptation = adapter.getDataForMedia(mediaInfo);\n useCalculatedLiveEdgeTime = dashManifestModel.getRepresentationsForAdaptation(manifest, adaptation)[0].useCalculatedLiveEdgeTime;\n\n if (useCalculatedLiveEdgeTime) {\n log('SegmentTimeline detected using calculated Live Edge Time');\n mediaPlayerModel.setUseManifestDateHeaderTimeSource(false);\n }\n }\n\n var manifestUTCTimingSources = dashManifestModel.getUTCTimingSources(e.manifest);\n var allUTCTimingSources = !dashManifestModel.getIsDynamic(manifest) || useCalculatedLiveEdgeTime ? manifestUTCTimingSources : manifestUTCTimingSources.concat(mediaPlayerModel.getUTCTimingSources());\n var isHTTPS = (0, _modelsURIQueryAndFragmentModelJs2['default'])(context).getInstance().isManifestHTTPS();\n\n //If https is detected on manifest then lets apply that protocol to only the default time source(s). In the future we may find the need to apply this to more then just default so left code at this level instead of in MediaPlayer.\n allUTCTimingSources.forEach(function (item) {\n if (item.value.replace(/.*?:\\/\\//g, '') === _modelsMediaPlayerModelJs2['default'].DEFAULT_UTC_TIMING_SOURCE.value.replace(/.*?:\\/\\//g, '')) {\n item.value = item.value.replace(isHTTPS ? new RegExp(/^(http:)?\\/\\//i) : new RegExp(/^(https:)?\\/\\//i), isHTTPS ? 'https://' : 'http://');\n log('Matching default timing source protocol to manifest protocol: ', item.value);\n }\n });\n\n baseURLController.initialize(manifest);\n\n timeSyncController.setConfig({\n metricsModel: metricsModel,\n dashMetrics: dashMetrics\n });\n timeSyncController.initialize(allUTCTimingSources, mediaPlayerModel.getUseManifestDateHeaderTimeSource());\n } else {\n hasInitialisationError = true;\n reset();\n }\n }\n\n function getAutoPlay() {\n return autoPlay;\n }\n\n function getActiveStreamInfo() {\n return activeStream ? activeStream.getStreamInfo() : null;\n }\n\n function isStreamActive(streamInfo) {\n return activeStream.getId() === streamInfo.id;\n }\n\n function getStreamById(id) {\n return streams.filter(function (item) {\n return item.getId() === id;\n })[0];\n }\n\n function load(url) {\n manifestLoader.load(url);\n }\n\n function loadWithManifest(manifest) {\n manifestUpdater.setManifest(manifest);\n }\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.capabilities) {\n capabilities = config.capabilities;\n }\n if (config.manifestLoader) {\n manifestLoader = config.manifestLoader;\n }\n if (config.manifestModel) {\n manifestModel = config.manifestModel;\n }\n if (config.dashManifestModel) {\n dashManifestModel = config.dashManifestModel;\n }\n if (config.protectionController) {\n protectionController = config.protectionController;\n }\n if (config.adapter) {\n adapter = config.adapter;\n }\n if (config.metricsModel) {\n metricsModel = config.metricsModel;\n }\n if (config.dashMetrics) {\n dashMetrics = config.dashMetrics;\n }\n if (config.liveEdgeFinder) {\n liveEdgeFinder = config.liveEdgeFinder;\n }\n if (config.mediaSourceController) {\n mediaSourceController = config.mediaSourceController;\n }\n if (config.timeSyncController) {\n timeSyncController = config.timeSyncController;\n }\n if (config.baseURLController) {\n baseURLController = config.baseURLController;\n }\n if (config.virtualBuffer) {\n virtualBuffer = config.virtualBuffer;\n }\n if (config.errHandler) {\n errHandler = config.errHandler;\n }\n if (config.timelineConverter) {\n timelineConverter = config.timelineConverter;\n }\n }\n\n function reset() {\n timeSyncController.reset();\n\n flushPlaylistMetrics(hasMediaError || hasInitialisationError ? _voMetricsPlayListJs2['default'].Trace.FAILURE_STOP_REASON : _voMetricsPlayListJs2['default'].Trace.USER_REQUEST_STOP_REASON);\n\n for (var i = 0, ln = streams.length; i < ln; i++) {\n var stream = streams[i];\n eventBus.off(_coreEventsEventsJs2['default'].STREAM_INITIALIZED, onStreamInitialized, this);\n stream.reset(hasMediaError);\n }\n\n streams = [];\n\n eventBus.off(_coreEventsEventsJs2['default'].PLAYBACK_TIME_UPDATED, onPlaybackTimeUpdated, this);\n eventBus.off(_coreEventsEventsJs2['default'].PLAYBACK_SEEKING, onPlaybackSeeking, this);\n eventBus.off(_coreEventsEventsJs2['default'].PLAYBACK_ERROR, onPlaybackError, this);\n eventBus.off(_coreEventsEventsJs2['default'].PLAYBACK_STARTED, onPlaybackStarted, this);\n eventBus.off(_coreEventsEventsJs2['default'].PLAYBACK_PAUSED, onPlaybackPaused, this);\n eventBus.off(_coreEventsEventsJs2['default'].PLAYBACK_ENDED, onEnded, this);\n eventBus.off(_coreEventsEventsJs2['default'].MANIFEST_UPDATED, onManifestUpdated, this);\n eventBus.off(_coreEventsEventsJs2['default'].STREAM_BUFFERING_COMPLETED, onStreamBufferingCompleted, this);\n\n baseURLController.reset();\n manifestUpdater.reset();\n metricsModel.clearAllCurrentMetrics();\n manifestModel.setValue(null);\n manifestLoader.reset();\n timelineConverter.reset();\n liveEdgeFinder.reset();\n adapter.reset();\n virtualBuffer.reset();\n isStreamSwitchingInProgress = false;\n isUpdating = false;\n activeStream = null;\n hasMediaError = false;\n hasInitialisationError = false;\n initialPlayback = true;\n isPaused = false;\n\n if (mediaSource) {\n mediaSourceController.detachMediaSource(videoModel);\n mediaSource = null;\n }\n videoModel = null;\n if (protectionController) {\n protectionController.setMediaElement(null);\n protectionController = null;\n protectionData = null;\n if (manifestModel.getValue()) {\n eventBus.trigger(_coreEventsEventsJs2['default'].PROTECTION_DESTROYED, { data: manifestModel.getValue().url });\n }\n }\n\n eventBus.trigger(_coreEventsEventsJs2['default'].STREAM_TEARDOWN_COMPLETE);\n }\n\n instance = {\n initialize: initialize,\n getAutoPlay: getAutoPlay,\n getActiveStreamInfo: getActiveStreamInfo,\n isStreamActive: isStreamActive,\n getStreamById: getStreamById,\n getTimeRelativeToStreamId: getTimeRelativeToStreamId,\n load: load,\n loadWithManifest: loadWithManifest,\n getActiveStreamCommonEarliestTime: getActiveStreamCommonEarliestTime,\n setConfig: setConfig,\n reset: reset\n };\n\n setup();\n\n return instance;\n}\n\nStreamController.__dashjs_factory_name = 'StreamController';\n\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(StreamController);\nmodule.exports = exports['default'];\n\n},{\"../../core/Debug.js\":5,\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7,\"../../core/events/Events.js\":9,\"../ManifestUpdater.js\":36,\"../Stream.js\":39,\"../models/MediaPlayerModel.js\":64,\"../models/URIQueryAndFragmentModel.js\":66,\"../models/VideoModel.js\":67,\"../vo/metrics/PlayList.js\":119,\"./PlaybackController.js\":54}],58:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction TextController(config) {\n\n var context = this.context;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var sourceBufferController = config.sourceBufferController;\n var errHandler = config.errHandler;\n\n var instance = undefined,\n initialized = undefined,\n mediaSource = undefined,\n buffer = undefined,\n type = undefined,\n streamProcessor = undefined,\n representationController = undefined;\n\n function setup() {\n\n initialized = false;\n mediaSource = null;\n buffer = null;\n type = null;\n streamProcessor = null;\n representationController = null;\n\n eventBus.on(_coreEventsEventsJs2['default'].DATA_UPDATE_COMPLETED, onDataUpdateCompleted, this);\n eventBus.on(_coreEventsEventsJs2['default'].INIT_FRAGMENT_LOADED, onInitFragmentLoaded, this);\n }\n\n function initialize(Type, source, StreamProcessor) {\n type = Type;\n setMediaSource(source);\n streamProcessor = StreamProcessor;\n representationController = streamProcessor.getRepresentationController();\n }\n\n /**\n * @param mediaInfo object\n * @returns SourceBuffer object\n * @memberof BufferController#\n */\n function createBuffer(mediaInfo) {\n try {\n buffer = sourceBufferController.createSourceBuffer(mediaSource, mediaInfo);\n\n if (!initialized) {\n if (buffer.hasOwnProperty('initialize')) {\n buffer.initialize(type, this);\n }\n initialized = true;\n }\n } catch (e) {\n errHandler.mediaSourceError('Error creating ' + type + ' source buffer.');\n }\n\n return buffer;\n }\n\n function getBuffer() {\n return buffer;\n }\n\n function setBuffer(value) {\n buffer = value;\n }\n\n function setMediaSource(value) {\n mediaSource = value;\n }\n\n function getStreamProcessor() {\n return streamProcessor;\n }\n\n function reset(errored) {\n\n eventBus.off(_coreEventsEventsJs2['default'].DATA_UPDATE_COMPLETED, onDataUpdateCompleted, this);\n eventBus.off(_coreEventsEventsJs2['default'].INIT_FRAGMENT_LOADED, onInitFragmentLoaded, this);\n\n if (!errored) {\n sourceBufferController.abort(mediaSource, buffer);\n sourceBufferController.removeSourceBuffer(mediaSource, buffer);\n }\n }\n\n function onDataUpdateCompleted(e) {\n if (e.sender.getStreamProcessor() !== streamProcessor) return;\n eventBus.trigger(_coreEventsEventsJs2['default'].TIMED_TEXT_REQUESTED, { index: 0, sender: e.sender }); //TODO make index dynamic if referring to MP?\n }\n\n function onInitFragmentLoaded(e) {\n if (e.fragmentModel !== streamProcessor.getFragmentModel() || !e.chunk.bytes) return;\n sourceBufferController.append(buffer, e.chunk);\n }\n\n instance = {\n initialize: initialize,\n createBuffer: createBuffer,\n getBuffer: getBuffer,\n setBuffer: setBuffer,\n getStreamProcessor: getStreamProcessor,\n setMediaSource: setMediaSource,\n reset: reset\n };\n\n setup();\n\n return instance;\n}\n\nTextController.__dashjs_factory_name = 'TextController';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(TextController);\nmodule.exports = exports['default'];\n\n},{\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7,\"../../core/events/Events.js\":9}],59:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _voErrorJs = _dereq_('./../vo/Error.js');\n\nvar _voErrorJs2 = _interopRequireDefault(_voErrorJs);\n\nvar _coreEventBusJs = _dereq_('./../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('./../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreDebugJs = _dereq_('../../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nvar TIME_SYNC_FAILED_ERROR_CODE = 1;\nvar HTTP_TIMEOUT_MS = 5000;\n\nfunction TimeSyncController() {\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var instance = undefined,\n offsetToDeviceTimeMs = undefined,\n isSynchronizing = undefined,\n isInitialised = undefined,\n useManifestDateHeaderTimeSource = undefined,\n handlers = undefined,\n metricsModel = undefined,\n dashMetrics = undefined;\n\n function initialize(timingSources, useManifestDateHeader) {\n useManifestDateHeaderTimeSource = useManifestDateHeader;\n offsetToDeviceTimeMs = 0;\n isSynchronizing = false;\n isInitialised = false;\n\n // a list of known schemeIdUris and a method to call with @value\n handlers = {\n 'urn:mpeg:dash:utc:http-head:2014': httpHeadHandler,\n 'urn:mpeg:dash:utc:http-xsdate:2014': httpHandler.bind(null, xsdatetimeDecoder),\n 'urn:mpeg:dash:utc:http-iso:2014': httpHandler.bind(null, iso8601Decoder),\n 'urn:mpeg:dash:utc:direct:2014': directHandler,\n\n // some specs referencing early ISO23009-1 drafts incorrectly use\n // 2012 in the URI, rather than 2014. support these for now.\n 'urn:mpeg:dash:utc:http-head:2012': httpHeadHandler,\n 'urn:mpeg:dash:utc:http-xsdate:2012': httpHandler.bind(null, xsdatetimeDecoder),\n 'urn:mpeg:dash:utc:http-iso:2012': httpHandler.bind(null, iso8601Decoder),\n 'urn:mpeg:dash:utc:direct:2012': directHandler,\n\n // it isn't clear how the data returned would be formatted, and\n // no public examples available so http-ntp not supported for now.\n // presumably you would do an arraybuffer type xhr and decode the\n // binary data returned but I would want to see a sample first.\n 'urn:mpeg:dash:utc:http-ntp:2014': notSupportedHandler,\n\n // not clear how this would be supported in javascript (in browser)\n 'urn:mpeg:dash:utc:ntp:2014': notSupportedHandler,\n 'urn:mpeg:dash:utc:sntp:2014': notSupportedHandler\n };\n\n if (!getIsSynchronizing()) {\n attemptSync(timingSources);\n setIsInitialised(true);\n }\n }\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.metricsModel) {\n metricsModel = config.metricsModel;\n }\n\n if (config.dashMetrics) {\n dashMetrics = config.dashMetrics;\n }\n }\n\n function getOffsetToDeviceTimeMs() {\n return getOffsetMs();\n }\n\n function setIsSynchronizing(value) {\n isSynchronizing = value;\n }\n\n function getIsSynchronizing() {\n return isSynchronizing;\n }\n\n function setIsInitialised(value) {\n isInitialised = value;\n }\n\n function setOffsetMs(value) {\n offsetToDeviceTimeMs = value;\n }\n\n function getOffsetMs() {\n return offsetToDeviceTimeMs;\n }\n\n // takes xsdatetime and returns milliseconds since UNIX epoch\n // may not be necessary as xsdatetime is very similar to ISO 8601\n // which is natively understood by javascript Date parser\n function alternateXsdatetimeDecoder(xsdatetimeStr) {\n // taken from DashParser - should probably refactor both uses\n var SECONDS_IN_MIN = 60;\n var MINUTES_IN_HOUR = 60;\n var MILLISECONDS_IN_SECONDS = 1000;\n var datetimeRegex = /^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\\.[0-9]*)?)?(?:([+\\-])([0-9]{2})([0-9]{2}))?/;\n\n var utcDate, timezoneOffset;\n\n var match = datetimeRegex.exec(xsdatetimeStr);\n\n // If the string does not contain a timezone offset different browsers can interpret it either\n // as UTC or as a local time so we have to parse the string manually to normalize the given date value for\n // all browsers\n utcDate = Date.UTC(parseInt(match[1], 10), parseInt(match[2], 10) - 1, // months start from zero\n parseInt(match[3], 10), parseInt(match[4], 10), parseInt(match[5], 10), match[6] && (parseInt(match[6], 10) || 0), match[7] && parseFloat(match[7]) * MILLISECONDS_IN_SECONDS || 0);\n // If the date has timezone offset take it into account as well\n if (match[9] && match[10]) {\n timezoneOffset = parseInt(match[9], 10) * MINUTES_IN_HOUR + parseInt(match[10], 10);\n utcDate += (match[8] === '+' ? -1 : +1) * timezoneOffset * SECONDS_IN_MIN * MILLISECONDS_IN_SECONDS;\n }\n\n return new Date(utcDate).getTime();\n }\n\n // try to use the built in parser, since xsdate is a constrained ISO8601\n // which is supported natively by Date.parse. if that fails, try a\n // regex-based version used elsewhere in this application.\n function xsdatetimeDecoder(xsdatetimeStr) {\n var parsedDate = Date.parse(xsdatetimeStr);\n\n if (isNaN(parsedDate)) {\n parsedDate = alternateXsdatetimeDecoder(xsdatetimeStr);\n }\n\n return parsedDate;\n }\n\n // takes ISO 8601 timestamp and returns milliseconds since UNIX epoch\n function iso8601Decoder(isoStr) {\n return Date.parse(isoStr);\n }\n\n // takes RFC 1123 timestamp (which is same as ISO8601) and returns\n // milliseconds since UNIX epoch\n function rfc1123Decoder(dateStr) {\n return Date.parse(dateStr);\n }\n\n function notSupportedHandler(url, onSuccessCB, onFailureCB) {\n onFailureCB();\n }\n\n function directHandler(xsdatetimeStr, onSuccessCB, onFailureCB) {\n var time = xsdatetimeDecoder(xsdatetimeStr);\n\n if (!isNaN(time)) {\n onSuccessCB(time);\n return;\n }\n\n onFailureCB();\n }\n\n function httpHandler(decoder, url, onSuccessCB, onFailureCB, isHeadRequest) {\n var oncomplete, onload;\n var complete = false;\n var req = new XMLHttpRequest();\n\n var verb = isHeadRequest ? 'HEAD' : 'GET';\n var urls = url.match(/\\S+/g);\n\n // according to ISO 23009-1, url could be a white-space\n // separated list of URLs. just handle one at a time.\n url = urls.shift();\n\n oncomplete = function () {\n if (complete) {\n return;\n }\n\n // we only want to pass through here once per xhr,\n // regardless of whether the load was successful.\n complete = true;\n\n // if there are more urls to try, call self.\n if (urls.length) {\n httpHandler(decoder, urls.join(' '), onSuccessCB, onFailureCB, isHeadRequest);\n } else {\n onFailureCB();\n }\n };\n\n onload = function () {\n var time, result;\n\n if (req.status === 200) {\n time = isHeadRequest ? req.getResponseHeader('Date') : req.response;\n\n result = decoder(time);\n\n // decoder returns NaN if non-standard input\n if (!isNaN(result)) {\n onSuccessCB(result);\n complete = true;\n }\n }\n };\n\n req.open(verb, url);\n req.timeout = HTTP_TIMEOUT_MS || 0;\n req.onload = onload;\n req.onloadend = oncomplete;\n req.send();\n }\n\n function httpHeadHandler(url, onSuccessCB, onFailureCB) {\n httpHandler(rfc1123Decoder, url, onSuccessCB, onFailureCB, true);\n }\n\n function checkForDateHeader() {\n var metrics = metricsModel.getReadOnlyMetricsFor('stream');\n var dateHeaderValue = dashMetrics.getLatestMPDRequestHeaderValueByID(metrics, 'Date');\n var dateHeaderTime = dateHeaderValue !== null ? new Date(dateHeaderValue).getTime() : Number.NaN;\n\n if (!isNaN(dateHeaderTime)) {\n setOffsetMs(dateHeaderTime - new Date().getTime());\n completeTimeSyncSequence(false, dateHeaderTime / 1000, offsetToDeviceTimeMs);\n } else {\n completeTimeSyncSequence(true);\n }\n }\n\n function completeTimeSyncSequence(failed, time, offset) {\n setIsSynchronizing(false);\n eventBus.trigger(_coreEventsEventsJs2['default'].TIME_SYNCHRONIZATION_COMPLETED, { time: time, offset: offset, error: failed ? new _voErrorJs2['default'](TIME_SYNC_FAILED_ERROR_CODE) : null });\n }\n\n function attemptSync(sources, sourceIndex) {\n\n // if called with no sourceIndex, use zero (highest priority)\n var index = sourceIndex || 0;\n\n // the sources should be ordered in priority from the manifest.\n // try each in turn, from the top, until either something\n // sensible happens, or we run out of sources to try.\n var source = sources[index];\n\n // callback to emit event to listeners\n var onComplete = function onComplete(time, offset) {\n var failed = !time || !offset;\n if (failed && useManifestDateHeaderTimeSource) {\n //Before falling back to binary search , check if date header exists on MPD. if so, use for a time source.\n checkForDateHeader();\n } else {\n completeTimeSyncSequence(failed, time, offset);\n }\n };\n\n setIsSynchronizing(true);\n\n if (source) {\n // check if there is a handler for this @schemeIdUri\n if (handlers.hasOwnProperty(source.schemeIdUri)) {\n // if so, call it with its @value\n handlers[source.schemeIdUri](source.value, function (serverTime) {\n // the timing source returned something useful\n var deviceTime = new Date().getTime();\n var offset = serverTime - deviceTime;\n\n setOffsetMs(offset);\n\n log('Local time: ' + new Date(deviceTime));\n log('Server time: ' + new Date(serverTime));\n log('Difference (ms): ' + offset);\n\n onComplete(serverTime, offset);\n }, function () {\n // the timing source was probably uncontactable\n // or returned something we can't use - try again\n // with the remaining sources\n attemptSync(sources, index + 1);\n });\n } else {\n // an unknown schemeIdUri must have been found\n // try again with the remaining sources\n attemptSync(sources, index + 1);\n }\n } else {\n // no valid time source could be found, just use device time\n setOffsetMs(0);\n onComplete();\n }\n }\n\n function reset() {\n setIsInitialised(false);\n setIsSynchronizing(false);\n }\n\n instance = {\n initialize: initialize,\n getOffsetToDeviceTimeMs: getOffsetToDeviceTimeMs,\n setConfig: setConfig,\n reset: reset\n };\n\n return instance;\n}\n\nTimeSyncController.__dashjs_factory_name = 'TimeSyncController';\nvar factory = _coreFactoryMakerJs2['default'].getSingletonFactory(TimeSyncController);\nfactory.TIME_SYNC_FAILED_ERROR_CODE = TIME_SYNC_FAILED_ERROR_CODE;\nfactory.HTTP_TIMEOUT_MS = HTTP_TIMEOUT_MS;\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../../core/Debug.js\":5,\"../../core/FactoryMaker.js\":7,\"./../../core/EventBus.js\":6,\"./../../core/events/Events.js\":9,\"./../vo/Error.js\":100}],60:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _XlinkLoaderJs = _dereq_('../XlinkLoader.js');\n\nvar _XlinkLoaderJs2 = _interopRequireDefault(_XlinkLoaderJs);\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _externalsXml2jsonJs = _dereq_('../../../externals/xml2json.js');\n\nvar _externalsXml2jsonJs2 = _interopRequireDefault(_externalsXml2jsonJs);\n\nvar RESOLVE_TYPE_ONLOAD = 'onLoad';\nvar RESOLVE_TYPE_ONACTUATE = 'onActuate';\nvar ELEMENT_TYPE_PERIOD = 'Period';\nvar ELEMENT_TYPE_ADAPTATIONSET = 'AdaptationSet';\nvar ELEMENT_TYPE_EVENTSTREAM = 'EventStream';\nvar RESOLVE_TO_ZERO = 'urn:mpeg:dash:resolve-to-zero:2013';\n\nfunction XlinkController(config) {\n\n var context = this.context;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var instance = undefined,\n matchers = undefined,\n iron = undefined,\n manifest = undefined,\n converter = undefined,\n xlinkLoader = undefined;\n\n function setup() {\n eventBus.on(_coreEventsEventsJs2['default'].XLINK_ELEMENT_LOADED, onXlinkElementLoaded, instance);\n\n xlinkLoader = (0, _XlinkLoaderJs2['default'])(context).create({\n errHandler: config.errHandler,\n metricsModel: config.metricsModel,\n requestModifier: config.requestModifier\n });\n }\n\n function setMatchers(value) {\n matchers = value;\n }\n\n function setIron(value) {\n iron = value;\n }\n\n /**\n *

Triggers the resolution of the xlink.onLoad attributes in the manifest file

\n * @param manifest\n */\n function resolveManifestOnLoad(mpd) {\n var elements;\n // First resolve all periods, so unnecessary requests inside onLoad Periods with Default content are avoided\n converter = new _externalsXml2jsonJs2['default'](matchers, '', true);\n manifest = mpd;\n elements = getElementsToResolve(manifest.Period_asArray, manifest, ELEMENT_TYPE_PERIOD, RESOLVE_TYPE_ONLOAD);\n resolve(elements, ELEMENT_TYPE_PERIOD, RESOLVE_TYPE_ONLOAD);\n }\n\n function reset() {\n eventBus.off(_coreEventsEventsJs2['default'].XLINK_ELEMENT_LOADED, onXlinkElementLoaded, instance);\n\n if (xlinkLoader) {\n xlinkLoader.reset();\n xlinkLoader = null;\n }\n }\n\n function resolve(elements, type, resolveType) {\n var resolveObject = {};\n var element, url, i;\n\n resolveObject.elements = elements;\n resolveObject.type = type;\n resolveObject.resolveType = resolveType;\n // If nothing to resolve, directly call allElementsLoaded\n if (resolveObject.elements.length === 0) {\n onXlinkAllElementsLoaded(resolveObject);\n }\n for (i = 0; i < resolveObject.elements.length; i++) {\n element = resolveObject.elements[i];\n if (element.url.indexOf('http://') !== -1) {\n url = element.url;\n } else {\n url = element.originalContent.BaseURL + element.url;\n }\n xlinkLoader.load(url, element, resolveObject);\n }\n }\n\n function onXlinkElementLoaded(event) {\n var element, resolveObject, index;\n\n var openingTag = '';\n var closingTag = '';\n var mergedContent = '';\n\n element = event.element;\n resolveObject = event.resolveObject;\n // if the element resolved into content parse the content\n if (element.resolvedContent) {\n // we add a parent elements so the converter is able to parse multiple elements of the same type which are not wrapped inside a container\n index = element.resolvedContent.indexOf('>') + 1; //find the closing position of the xml tag\n mergedContent = element.resolvedContent.substr(0, index) + openingTag + element.resolvedContent.substr(index) + closingTag;\n element.resolvedContent = converter.xml_str2json(mergedContent);\n }\n if (isResolvingFinished(resolveObject)) {\n onXlinkAllElementsLoaded(resolveObject);\n }\n }\n\n // We got to wait till all elements of the current queue are resolved before merging back\n function onXlinkAllElementsLoaded(resolveObject) {\n var elements = [];\n var i, obj;\n\n mergeElementsBack(resolveObject);\n if (resolveObject.resolveType === RESOLVE_TYPE_ONACTUATE) {\n eventBus.trigger(_coreEventsEventsJs2['default'].XLINK_READY, { manifest: manifest });\n }\n if (resolveObject.resolveType === RESOLVE_TYPE_ONLOAD) {\n switch (resolveObject.type) {\n // Start resolving the other elements. We can do Adaptation Set and EventStream in parallel\n case ELEMENT_TYPE_PERIOD:\n for (i = 0; i < manifest[ELEMENT_TYPE_PERIOD + '_asArray'].length; i++) {\n obj = manifest[ELEMENT_TYPE_PERIOD + '_asArray'][i];\n if (obj.hasOwnProperty(ELEMENT_TYPE_ADAPTATIONSET + '_asArray')) {\n elements = elements.concat(getElementsToResolve(obj[ELEMENT_TYPE_ADAPTATIONSET + '_asArray'], obj, ELEMENT_TYPE_ADAPTATIONSET, RESOLVE_TYPE_ONLOAD));\n }\n if (obj.hasOwnProperty(ELEMENT_TYPE_EVENTSTREAM + '_asArray')) {\n elements = elements.concat(getElementsToResolve(obj[ELEMENT_TYPE_EVENTSTREAM + '_asArray'], obj, ELEMENT_TYPE_EVENTSTREAM, RESOLVE_TYPE_ONLOAD));\n }\n }\n resolve(elements, ELEMENT_TYPE_ADAPTATIONSET, RESOLVE_TYPE_ONLOAD);\n break;\n case ELEMENT_TYPE_ADAPTATIONSET:\n // TODO: Resolve SegmentList here\n eventBus.trigger(_coreEventsEventsJs2['default'].XLINK_READY, { manifest: manifest });\n break;\n }\n }\n }\n\n // Returns the elements with the specific resolve Type\n function getElementsToResolve(elements, parentElement, type, resolveType) {\n var toResolve = [];\n var element, i, xlinkObject;\n // first remove all the resolve-to-zero elements\n for (i = elements.length - 1; i >= 0; i--) {\n element = elements[i];\n if (element.hasOwnProperty('xlink:href') && element['xlink:href'] === RESOLVE_TO_ZERO) {\n elements.splice(i, 1);\n }\n }\n // now get the elements with the right resolve type\n for (i = 0; i < elements.length; i++) {\n element = elements[i];\n if (element.hasOwnProperty('xlink:href') && element.hasOwnProperty('xlink:actuate') && element['xlink:actuate'] === resolveType) {\n xlinkObject = createXlinkObject(element['xlink:href'], parentElement, type, i, resolveType, element);\n toResolve.push(xlinkObject);\n }\n }\n return toResolve;\n }\n\n function mergeElementsBack(resolveObject) {\n var resolvedElements = [];\n var element, type, obj, i, j, k;\n // Start merging back from the end because of index shifting. Note that the elements with the same parent have to be ordered by index ascending\n for (i = resolveObject.elements.length - 1; i >= 0; i--) {\n element = resolveObject.elements[i];\n type = element.type + '_asArray';\n\n // Element couldn't be resolved or is TODO Inappropriate target: Remove all Xlink attributes\n if (!element.resolvedContent || isInappropriateTarget()) {\n delete element.originalContent['xlink:actuate'];\n delete element.originalContent['xlink:href'];\n resolvedElements.push(element.originalContent);\n }\n // Element was successfully resolved\n else if (element.resolvedContent) {\n for (j = 0; j < element.resolvedContent[type].length; j++) {\n //TODO Contains another Xlink attribute with xlink:actuate set to onload. Remove all xLink attributes\n obj = element.resolvedContent[type][j];\n resolvedElements.push(obj);\n }\n }\n // Replace the old elements in the parent with the resolved ones\n element.parentElement[type].splice(element.index, 1);\n for (k = 0; k < resolvedElements.length; k++) {\n element.parentElement[type].splice(element.index + k, 0, resolvedElements[k]);\n }\n resolvedElements = [];\n }\n if (resolveObject.elements.length > 0) {\n iron.run(manifest);\n }\n }\n\n function createXlinkObject(url, parentElement, type, index, resolveType, originalContent) {\n return {\n url: url,\n parentElement: parentElement,\n type: type,\n index: index,\n resolveType: resolveType,\n originalContent: originalContent,\n resolvedContent: null,\n resolved: false\n };\n }\n\n // Check if all pending requests are finished\n function isResolvingFinished(elementsToResolve) {\n var i, obj;\n for (i = 0; i < elementsToResolve.elements.length; i++) {\n obj = elementsToResolve.elements[i];\n if (obj.resolved === false) {\n return false;\n }\n }\n return true;\n }\n\n // TODO : Do some syntax check here if the target is valid or not\n function isInappropriateTarget() {\n return false;\n }\n\n instance = {\n resolveManifestOnLoad: resolveManifestOnLoad,\n setMatchers: setMatchers,\n setIron: setIron,\n reset: reset\n };\n\n setup();\n return instance;\n}\n\nXlinkController.__dashjs_factory_name = 'XlinkController';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(XlinkController);\nmodule.exports = exports['default'];\n\n},{\"../../../externals/xml2json.js\":3,\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7,\"../../core/events/Events.js\":9,\"../XlinkLoader.js\":45}],61:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar _dashModelsDashManifestModelJs = _dereq_('../../dash/models/DashManifestModel.js');\n\nvar _dashModelsDashManifestModelJs2 = _interopRequireDefault(_dashModelsDashManifestModelJs);\n\nvar _utilsObjectUtilsJs = _dereq_('../utils/ObjectUtils.js');\n\nvar _utilsObjectUtilsJs2 = _interopRequireDefault(_utilsObjectUtilsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar DEFAULT_INDEX = NaN;\n\nvar Node = function Node(_baseUrls, _selectedIdx) {\n _classCallCheck(this, Node);\n\n this.data = {\n baseUrls: _baseUrls || null,\n selectedIdx: _selectedIdx || DEFAULT_INDEX\n };\n this.children = [];\n};\n\nfunction BaseURLTreeModel() {\n\n var instance = undefined;\n var root = undefined;\n\n var context = this.context;\n var dashManifestModel = (0, _dashModelsDashManifestModelJs2['default'])(context).getInstance();\n var objectUtils = (0, _utilsObjectUtilsJs2['default'])(context).getInstance();\n\n function setup() {\n root = new Node();\n }\n\n function updateChildData(node, index, element) {\n var baseUrls = dashManifestModel.getBaseURLsFromElement(element);\n\n if (!node[index]) {\n node[index] = new Node(baseUrls);\n } else {\n if (!objectUtils.areSimpleEquivalent(baseUrls, node[index].data.baseUrls)) {\n node[index].data.baseUrls = baseUrls;\n node[index].data.selectedIdx = DEFAULT_INDEX;\n }\n }\n }\n\n function getBaseURLCollectionsFromManifest(manifest) {\n var baseUrls = dashManifestModel.getBaseURLsFromElement(manifest);\n\n if (!objectUtils.areSimpleEquivalent(baseUrls, root.data.baseUrls)) {\n root.data.baseUrls = baseUrls;\n root.data.selectedIdx = DEFAULT_INDEX;\n }\n\n if (manifest.Period_asArray) {\n manifest.Period_asArray.forEach(function (p, pi) {\n updateChildData(root.children, pi, p);\n\n if (p.AdaptationSet_asArray) {\n p.AdaptationSet_asArray.forEach(function (a, ai) {\n updateChildData(root.children[pi].children, ai, a);\n\n if (a.Representation_asArray) {\n a.Representation_asArray.sort(dashManifestModel.getRepresentationSortFunction()).forEach(function (r, ri) {\n updateChildData(root.children[pi].children[ai].children, ri, r);\n });\n }\n });\n }\n });\n }\n }\n\n function walk(callback, node) {\n var target = node || root;\n\n callback(target.data);\n\n if (target.children) {\n target.children.forEach(function (child) {\n return walk(callback, child);\n });\n }\n }\n\n function invalidateSelectedIndexes(serviceLocation) {\n walk(function (data) {\n if (!isNaN(data.selectedIdx)) {\n if (serviceLocation === data.baseUrls[data.selectedIdx].serviceLocation) {\n data.selectedIdx = DEFAULT_INDEX;\n }\n }\n });\n }\n\n function update(manifest) {\n getBaseURLCollectionsFromManifest(manifest);\n }\n\n function reset() {\n root = new Node();\n }\n\n function getForPath(path) {\n var target = root;\n var nodes = [target.data];\n\n path.forEach(function (p) {\n target = target.children[p];\n\n if (target) {\n nodes.push(target.data);\n }\n });\n\n return nodes.filter(function (n) {\n return n.baseUrls.length;\n });\n }\n\n instance = {\n reset: reset,\n update: update,\n getForPath: getForPath,\n invalidateSelectedIndexes: invalidateSelectedIndexes\n };\n\n setup();\n\n return instance;\n}\n\nBaseURLTreeModel.__dashjs_factory_name = 'BaseURLTreeModel';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(BaseURLTreeModel);\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7,\"../../dash/models/DashManifestModel.js\":17,\"../utils/ObjectUtils.js\":93}],62:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _voFragmentRequestJs = _dereq_('../vo/FragmentRequest.js');\n\nvar _voFragmentRequestJs2 = _interopRequireDefault(_voFragmentRequestJs);\n\nvar _coreDebugJs = _dereq_('../../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nvar FRAGMENT_MODEL_LOADING = 'loading';\nvar FRAGMENT_MODEL_EXECUTED = 'executed';\nvar FRAGMENT_MODEL_CANCELED = 'canceled';\nvar FRAGMENT_MODEL_FAILED = 'failed';\n\nfunction FragmentModel(config) {\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var metricsModel = config.metricsModel;\n\n var instance = undefined,\n scheduleController = undefined,\n executedRequests = undefined,\n loadingRequests = undefined,\n fragmentLoader = undefined;\n\n function setup() {\n scheduleController = null;\n fragmentLoader = null;\n executedRequests = [];\n loadingRequests = [];\n\n eventBus.on(_coreEventsEventsJs2['default'].LOADING_COMPLETED, onLoadingCompleted, instance);\n }\n\n function setLoader(value) {\n fragmentLoader = value;\n }\n\n function setScheduleController(value) {\n scheduleController = value;\n }\n\n function getScheduleController() {\n return scheduleController;\n }\n\n function isFragmentLoaded(request) {\n var isEqualComplete = function isEqualComplete(req1, req2) {\n return req1.action === _voFragmentRequestJs2['default'].ACTION_COMPLETE && req1.action === req2.action;\n };\n\n var isEqualMedia = function isEqualMedia(req1, req2) {\n return !isNaN(req1.index) && req1.index === req2.index && req1.startTime === req2.startTime && req1.adaptationIndex === req2.adaptationIndex;\n };\n\n var isEqualInit = function isEqualInit(req1, req2) {\n return isNaN(req1.index) && isNaN(req2.index) && req1.quality === req2.quality;\n };\n\n var check = function check(arr) {\n var req, i;\n var isLoaded = false;\n\n var ln = arr.length;\n\n for (i = 0; i < ln; i++) {\n req = arr[i];\n\n if (isEqualMedia(request, req) || isEqualInit(request, req) || isEqualComplete(request, req)) {\n //log(request.mediaType + \"Fragment already loaded for time: \" + request.startTime);\n isLoaded = true;\n break;\n }\n }\n\n return isLoaded;\n };\n\n return check(loadingRequests) || check(executedRequests);\n }\n\n /**\n *\n * Gets an array of {@link FragmentRequest} objects\n *\n * @param {object} filter The object with properties by which the method filters the requests to be returned.\n * the only mandatory property is state, which must be a value from\n * other properties should match the properties of {@link FragmentRequest}. E.g.:\n * getRequests({state: FragmentModel.FRAGMENT_MODEL_EXECUTED, quality: 0}) - returns\n * all the requests from executedRequests array where requests.quality = filter.quality\n *\n * @returns {Array}\n * @memberof FragmentModel#\n */\n function getRequests(filter) {\n var requests = [];\n var filteredRequests = [];\n var ln = 1;\n var states;\n\n if (!filter || !filter.state) return requests;\n\n if (filter.state instanceof Array) {\n ln = filter.state.length;\n states = filter.state;\n } else {\n states = [filter.state];\n }\n\n for (var i = 0; i < ln; i++) {\n requests = getRequestsForState(states[i]);\n filteredRequests = filteredRequests.concat(filterRequests(requests, filter));\n }\n\n return filteredRequests;\n }\n\n function removeExecutedRequestsBeforeTime(time) {\n var lastIdx = executedRequests.length - 1;\n var start = NaN;\n var req = null;\n var i;\n\n // loop through the executed requests and remove the ones for which startTime is less than the given time\n for (i = lastIdx; i >= 0; i--) {\n req = executedRequests[i];\n start = req.startTime;\n if (!isNaN(start) && start < time) {\n removeRequest(executedRequests, req);\n }\n }\n }\n\n function abortRequests() {\n var reqs = [];\n fragmentLoader.abort();\n\n while (loadingRequests.length > 0) {\n reqs.push(loadingRequests[0]);\n removeRequest(loadingRequests, loadingRequests[0]);\n }\n\n loadingRequests = [];\n\n return reqs;\n }\n\n function executeRequest(request) {\n if (!request) return;\n\n switch (request.action) {\n case _voFragmentRequestJs2['default'].ACTION_COMPLETE:\n // Stream has completed, execute the corresponding callback\n executedRequests.push(request);\n addSchedulingInfoMetrics(request, FRAGMENT_MODEL_EXECUTED);\n eventBus.trigger(_coreEventsEventsJs2['default'].STREAM_COMPLETED, { request: request, fragmentModel: this });\n break;\n case _voFragmentRequestJs2['default'].ACTION_DOWNLOAD:\n addSchedulingInfoMetrics(request, FRAGMENT_MODEL_LOADING);\n loadingRequests.push(request);\n loadCurrentFragment(request);\n break;\n default:\n log('Unknown request action.');\n }\n }\n\n function reset() {\n eventBus.off(_coreEventsEventsJs2['default'].LOADING_COMPLETED, onLoadingCompleted, this);\n\n if (fragmentLoader) {\n fragmentLoader.reset();\n fragmentLoader = null;\n }\n\n context = null;\n executedRequests = [];\n loadingRequests = [];\n }\n\n function loadCurrentFragment(request) {\n eventBus.trigger(_coreEventsEventsJs2['default'].FRAGMENT_LOADING_STARTED, { sender: instance, request: request });\n fragmentLoader.load(request);\n }\n\n function removeRequest(arr, request) {\n var idx = arr.indexOf(request);\n\n if (idx !== -1) {\n arr.splice(idx, 1);\n }\n }\n\n function getRequestForTime(arr, time, threshold) {\n var lastIdx = arr.length - 1;\n var start = NaN;\n var end = NaN;\n var req = null;\n var i;\n\n // loop through the executed requests and pick the one for which the playback interval matches the given time\n for (i = lastIdx; i >= 0; i--) {\n req = arr[i];\n start = req.startTime;\n end = start + req.duration;\n threshold = threshold || req.duration / 2;\n if (!isNaN(start) && !isNaN(end) && time + threshold >= start && time - threshold < end || isNaN(start) && isNaN(time)) {\n return req;\n }\n }\n\n return null;\n }\n\n function filterRequests(arr, filter) {\n if (!filter) return arr;\n\n // for time use a specific filtration function\n if (filter.hasOwnProperty('time')) {\n return [getRequestForTime(arr, filter.time, filter.threshold)];\n }\n\n return arr.filter(function (request /*, idx, arr*/) {\n for (var prop in filter) {\n if (prop === 'state') continue;\n\n if (filter.hasOwnProperty(prop) && request[prop] != filter[prop]) return false;\n }\n\n return true;\n });\n }\n\n function getRequestsForState(state) {\n var requests;\n\n switch (state) {\n case FRAGMENT_MODEL_LOADING:\n requests = loadingRequests;\n break;\n case FRAGMENT_MODEL_EXECUTED:\n requests = executedRequests;\n break;\n default:\n requests = [];\n }\n\n return requests;\n }\n\n function addSchedulingInfoMetrics(request, state) {\n if (!request) return;\n\n var mediaType = request.mediaType;\n var now = new Date();\n var type = request.type;\n var startTime = request.startTime;\n var availabilityStartTime = request.availabilityStartTime;\n var duration = request.duration;\n var quality = request.quality;\n var range = request.range;\n\n metricsModel.addSchedulingInfo(mediaType, now, type, startTime, availabilityStartTime, duration, quality, range, state);\n metricsModel.addRequestsQueue(mediaType, loadingRequests, executedRequests);\n }\n\n function onLoadingCompleted(e) {\n if (e.sender !== fragmentLoader) return;\n\n var request = e.request;\n var response = e.response;\n var error = e.error;\n\n loadingRequests.splice(loadingRequests.indexOf(request), 1);\n\n if (response && !error) {\n executedRequests.push(request);\n }\n\n addSchedulingInfoMetrics(request, error ? FRAGMENT_MODEL_FAILED : FRAGMENT_MODEL_EXECUTED);\n eventBus.trigger(_coreEventsEventsJs2['default'].FRAGMENT_LOADING_COMPLETED, { request: request, response: response, error: error, sender: this });\n }\n\n instance = {\n setLoader: setLoader,\n setScheduleController: setScheduleController,\n getScheduleController: getScheduleController,\n getRequests: getRequests,\n isFragmentLoaded: isFragmentLoaded,\n removeExecutedRequestsBeforeTime: removeExecutedRequestsBeforeTime,\n abortRequests: abortRequests,\n executeRequest: executeRequest,\n reset: reset\n };\n\n setup();\n return instance;\n}\n\nFragmentModel.__dashjs_factory_name = 'FragmentModel';\nvar factory = _coreFactoryMakerJs2['default'].getClassFactory(FragmentModel);\nfactory.FRAGMENT_MODEL_LOADING = FRAGMENT_MODEL_LOADING;\nfactory.FRAGMENT_MODEL_EXECUTED = FRAGMENT_MODEL_EXECUTED;\nfactory.FRAGMENT_MODEL_CANCELED = FRAGMENT_MODEL_CANCELED;\nfactory.FRAGMENT_MODEL_FAILED = FRAGMENT_MODEL_FAILED;\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../../core/Debug.js\":5,\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7,\"../../core/events/Events.js\":9,\"../vo/FragmentRequest.js\":101}],63:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction ManifestModel() {\n\n var context = this.context;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var instance = undefined,\n manifest = undefined;\n\n function getValue() {\n return manifest;\n }\n\n function setValue(value) {\n manifest = value;\n eventBus.trigger(_coreEventsEventsJs2['default'].MANIFEST_LOADED, { data: value });\n }\n\n instance = {\n getValue: getValue,\n setValue: setValue\n };\n\n return instance;\n}\n\nManifestModel.__dashjs_factory_name = 'ManifestModel';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(ManifestModel);\nmodule.exports = exports['default'];\n\n},{\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7,\"../../core/events/Events.js\":9}],64:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _voMetricsHTTPRequestJs = _dereq_('../vo/metrics/HTTPRequest.js');\n\nvar _voMetricsHTTPRequestJs2 = _interopRequireDefault(_voMetricsHTTPRequestJs);\n\nvar DEFAULT_UTC_TIMING_SOURCE = { scheme: 'urn:mpeg:dash:utc:http-xsdate:2014', value: 'http://time.akamai.com/?iso' };\nvar LIVE_DELAY_FRAGMENT_COUNT = 4;\n\nvar DEFAULT_LOCAL_STORAGE_BITRATE_EXPIRATION = 360000;\nvar DEFAULT_LOCAL_STORAGE_MEDIA_SETTINGS_EXPIRATION = 360000;\n\nvar BANDWIDTH_SAFETY_FACTOR = 0.9;\nvar ABANDON_LOAD_TIMEOUT = 10000;\n\nvar BUFFER_TO_KEEP = 40;\nvar BUFFER_PRUNING_INTERVAL = 30;\nvar DEFAULT_MIN_BUFFER_TIME = 40;\nvar BUFFER_TIME_AT_TOP_QUALITY = 40;\nvar BUFFER_TIME_AT_TOP_QUALITY_LONG_FORM = 60;\nvar LONG_FORM_CONTENT_DURATION_THRESHOLD = 600;\nvar RICH_BUFFER_THRESHOLD = 20;\n\nvar FRAGMENT_RETRY_ATTEMPTS = 3;\nvar FRAGMENT_RETRY_INTERVAL = 1000;\n\nvar MANIFEST_RETRY_ATTEMPTS = 3;\nvar MANIFEST_RETRY_INTERVAL = 1000;\n\nvar XLINK_RETRY_ATTEMPTS = 1;\nvar XLINK_RETRY_INTERVAL = 500;\n\n//This value influences the startup time for live (in ms).\nvar WALLCLOCK_TIME_UPDATE_INTERVAL = 50;\n\nfunction MediaPlayerModel() {\n\n var instance = undefined,\n useManifestDateHeaderTimeSource = undefined,\n useSuggestedPresentationDelay = undefined,\n UTCTimingSources = undefined,\n liveDelayFragmentCount = undefined,\n liveDelay = undefined,\n scheduleWhilePaused = undefined,\n bufferToKeep = undefined,\n bufferPruningInterval = undefined,\n lastBitrateCachingInfo = undefined,\n lastMediaSettingsCachingInfo = undefined,\n stableBufferTime = undefined,\n bufferTimeAtTopQuality = undefined,\n bufferTimeAtTopQualityLongForm = undefined,\n longFormContentDurationThreshold = undefined,\n richBufferThreshold = undefined,\n bandwidthSafetyFactor = undefined,\n abandonLoadTimeout = undefined,\n retryAttempts = undefined,\n retryIntervals = undefined,\n wallclockTimeUpdateInterval = undefined,\n bufferOccupancyABREnabled = undefined;\n\n function setup() {\n var _retryAttempts, _retryIntervals;\n\n UTCTimingSources = [];\n useSuggestedPresentationDelay = false;\n useManifestDateHeaderTimeSource = true;\n scheduleWhilePaused = true;\n bufferOccupancyABREnabled = false;\n lastBitrateCachingInfo = { enabled: true, ttl: DEFAULT_LOCAL_STORAGE_BITRATE_EXPIRATION };\n lastMediaSettingsCachingInfo = { enabled: true, ttl: DEFAULT_LOCAL_STORAGE_MEDIA_SETTINGS_EXPIRATION };\n liveDelayFragmentCount = LIVE_DELAY_FRAGMENT_COUNT;\n liveDelay = undefined; // Explicitly state that default is undefined\n bufferToKeep = BUFFER_TO_KEEP;\n bufferPruningInterval = BUFFER_PRUNING_INTERVAL;\n stableBufferTime = DEFAULT_MIN_BUFFER_TIME;\n bufferTimeAtTopQuality = BUFFER_TIME_AT_TOP_QUALITY;\n bufferTimeAtTopQualityLongForm = BUFFER_TIME_AT_TOP_QUALITY_LONG_FORM;\n longFormContentDurationThreshold = LONG_FORM_CONTENT_DURATION_THRESHOLD;\n richBufferThreshold = RICH_BUFFER_THRESHOLD;\n bandwidthSafetyFactor = BANDWIDTH_SAFETY_FACTOR;\n abandonLoadTimeout = ABANDON_LOAD_TIMEOUT;\n wallclockTimeUpdateInterval = WALLCLOCK_TIME_UPDATE_INTERVAL;\n\n retryAttempts = (_retryAttempts = {}, _defineProperty(_retryAttempts, _voMetricsHTTPRequestJs2['default'].MPD_TYPE, MANIFEST_RETRY_ATTEMPTS), _defineProperty(_retryAttempts, _voMetricsHTTPRequestJs2['default'].XLINK_EXPANSION_TYPE, XLINK_RETRY_ATTEMPTS), _defineProperty(_retryAttempts, _voMetricsHTTPRequestJs2['default'].MEDIA_SEGMENT_TYPE, FRAGMENT_RETRY_ATTEMPTS), _defineProperty(_retryAttempts, _voMetricsHTTPRequestJs2['default'].INIT_SEGMENT_TYPE, FRAGMENT_RETRY_ATTEMPTS), _defineProperty(_retryAttempts, _voMetricsHTTPRequestJs2['default'].BITSTREAM_SWITCHING_SEGMENT_TYPE, FRAGMENT_RETRY_ATTEMPTS), _defineProperty(_retryAttempts, _voMetricsHTTPRequestJs2['default'].INDEX_SEGMENT_TYPE, FRAGMENT_RETRY_ATTEMPTS), _defineProperty(_retryAttempts, _voMetricsHTTPRequestJs2['default'].OTHER_TYPE, FRAGMENT_RETRY_ATTEMPTS), _retryAttempts);\n\n retryIntervals = (_retryIntervals = {}, _defineProperty(_retryIntervals, _voMetricsHTTPRequestJs2['default'].MPD_TYPE, MANIFEST_RETRY_INTERVAL), _defineProperty(_retryIntervals, _voMetricsHTTPRequestJs2['default'].XLINK_EXPANSION_TYPE, XLINK_RETRY_INTERVAL), _defineProperty(_retryIntervals, _voMetricsHTTPRequestJs2['default'].MEDIA_SEGMENT_TYPE, FRAGMENT_RETRY_INTERVAL), _defineProperty(_retryIntervals, _voMetricsHTTPRequestJs2['default'].INIT_SEGMENT_TYPE, FRAGMENT_RETRY_INTERVAL), _defineProperty(_retryIntervals, _voMetricsHTTPRequestJs2['default'].BITSTREAM_SWITCHING_SEGMENT_TYPE, FRAGMENT_RETRY_INTERVAL), _defineProperty(_retryIntervals, _voMetricsHTTPRequestJs2['default'].INDEX_SEGMENT_TYPE, FRAGMENT_RETRY_INTERVAL), _defineProperty(_retryIntervals, _voMetricsHTTPRequestJs2['default'].OTHER_TYPE, FRAGMENT_RETRY_INTERVAL), _retryIntervals);\n }\n\n //TODO Should we use Object.define to have setters/getters? makes more readable code on other side.\n function setBufferOccupancyABREnabled(value) {\n bufferOccupancyABREnabled = value;\n }\n\n function getBufferOccupancyABREnabled() {\n return bufferOccupancyABREnabled;\n }\n\n function setBandwidthSafetyFactor(value) {\n bandwidthSafetyFactor = value;\n }\n\n function getBandwidthSafetyFactor() {\n return bandwidthSafetyFactor;\n }\n\n function setAbandonLoadTimeout(value) {\n abandonLoadTimeout = value;\n }\n\n function getAbandonLoadTimeout() {\n return abandonLoadTimeout;\n }\n\n function setStableBufferTime(value) {\n stableBufferTime = value;\n }\n\n function getStableBufferTime() {\n return stableBufferTime;\n }\n\n function setBufferTimeAtTopQuality(value) {\n bufferTimeAtTopQuality = value;\n }\n\n function getBufferTimeAtTopQuality() {\n return bufferTimeAtTopQuality;\n }\n\n function setBufferTimeAtTopQualityLongForm(value) {\n bufferTimeAtTopQualityLongForm = value;\n }\n\n function getBufferTimeAtTopQualityLongForm() {\n return bufferTimeAtTopQualityLongForm;\n }\n\n function setLongFormContentDurationThreshold(value) {\n longFormContentDurationThreshold = value;\n }\n\n function getLongFormContentDurationThreshold() {\n return longFormContentDurationThreshold;\n }\n\n function setRichBufferThreshold(value) {\n richBufferThreshold = value;\n }\n\n function getRichBufferThreshold() {\n return richBufferThreshold;\n }\n\n function setBufferToKeep(value) {\n bufferToKeep = value;\n }\n\n function getBufferToKeep() {\n return bufferToKeep;\n }\n\n function setLastBitrateCachingInfo(enable, ttl) {\n lastBitrateCachingInfo.enabled = enable;\n if (ttl !== undefined && !isNaN(ttl) && typeof ttl === 'number') {\n lastBitrateCachingInfo.ttl = ttl;\n }\n }\n\n function getLastBitrateCachingInfo() {\n return lastBitrateCachingInfo;\n }\n\n function setLastMediaSettingsCachingInfo(enable, ttl) {\n lastMediaSettingsCachingInfo.enabled = enable;\n if (ttl !== undefined && !isNaN(ttl) && typeof ttl === 'number') {\n lastMediaSettingsCachingInfo.ttl = ttl;\n }\n }\n\n function getLastMediaSettingsCachingInfo() {\n return lastMediaSettingsCachingInfo;\n }\n\n function setBufferPruningInterval(value) {\n bufferPruningInterval = value;\n }\n\n function getBufferPruningInterval() {\n return bufferPruningInterval;\n }\n\n function setFragmentRetryAttempts(value) {\n retryAttempts[_voMetricsHTTPRequestJs2['default'].MEDIA_SEGMENT_TYPE] = value;\n }\n\n function setRetryAttemptsForType(type, value) {\n retryAttempts[type] = value;\n }\n\n function getFragmentRetryAttempts() {\n return retryAttempts[_voMetricsHTTPRequestJs2['default'].MEDIA_SEGMENT_TYPE];\n }\n\n function getRetryAttemptsForType(type) {\n return retryAttempts[type];\n }\n\n function setFragmentRetryInterval(value) {\n retryIntervals[_voMetricsHTTPRequestJs2['default'].MEDIA_SEGMENT_TYPE] = value;\n }\n\n function setRetryIntervalForType(type, value) {\n retryIntervals[type] = value;\n }\n\n function getFragmentRetryInterval() {\n return retryIntervals[_voMetricsHTTPRequestJs2['default'].MEDIA_SEGMENT_TYPE];\n }\n\n function getRetryIntervalForType(type) {\n return retryIntervals[type];\n }\n\n function setWallclockTimeUpdateInterval(value) {\n wallclockTimeUpdateInterval = value;\n }\n\n function getWallclockTimeUpdateInterval() {\n return wallclockTimeUpdateInterval;\n }\n\n function setScheduleWhilePaused(value) {\n scheduleWhilePaused = value;\n }\n\n function getScheduleWhilePaused() {\n return scheduleWhilePaused;\n }\n\n function setLiveDelayFragmentCount(value) {\n liveDelayFragmentCount = value;\n }\n\n function setLiveDelay(value) {\n liveDelay = value;\n }\n\n function getLiveDelayFragmentCount() {\n return liveDelayFragmentCount;\n }\n\n function getLiveDelay() {\n return liveDelay;\n }\n\n function setUseManifestDateHeaderTimeSource(value) {\n useManifestDateHeaderTimeSource = value;\n }\n\n function getUseManifestDateHeaderTimeSource() {\n return useManifestDateHeaderTimeSource;\n }\n\n function setUseSuggestedPresentationDelay(value) {\n useSuggestedPresentationDelay = value;\n }\n\n function getUseSuggestedPresentationDelay() {\n return useSuggestedPresentationDelay;\n }\n\n function setUTCTimingSources(value) {\n UTCTimingSources = value;\n }\n\n function getUTCTimingSources() {\n return UTCTimingSources;\n }\n\n function reset() {\n //TODO need to figure out what props to persist across sessions and which to reset if any.\n //setup();\n }\n\n instance = {\n setBufferOccupancyABREnabled: setBufferOccupancyABREnabled,\n getBufferOccupancyABREnabled: getBufferOccupancyABREnabled,\n setBandwidthSafetyFactor: setBandwidthSafetyFactor,\n getBandwidthSafetyFactor: getBandwidthSafetyFactor,\n setAbandonLoadTimeout: setAbandonLoadTimeout,\n getAbandonLoadTimeout: getAbandonLoadTimeout,\n setLastBitrateCachingInfo: setLastBitrateCachingInfo,\n getLastBitrateCachingInfo: getLastBitrateCachingInfo,\n setLastMediaSettingsCachingInfo: setLastMediaSettingsCachingInfo,\n getLastMediaSettingsCachingInfo: getLastMediaSettingsCachingInfo,\n setStableBufferTime: setStableBufferTime,\n getStableBufferTime: getStableBufferTime,\n setBufferTimeAtTopQuality: setBufferTimeAtTopQuality,\n getBufferTimeAtTopQuality: getBufferTimeAtTopQuality,\n setBufferTimeAtTopQualityLongForm: setBufferTimeAtTopQualityLongForm,\n getBufferTimeAtTopQualityLongForm: getBufferTimeAtTopQualityLongForm,\n setLongFormContentDurationThreshold: setLongFormContentDurationThreshold,\n getLongFormContentDurationThreshold: getLongFormContentDurationThreshold,\n setRichBufferThreshold: setRichBufferThreshold,\n getRichBufferThreshold: getRichBufferThreshold,\n setBufferToKeep: setBufferToKeep,\n getBufferToKeep: getBufferToKeep,\n setBufferPruningInterval: setBufferPruningInterval,\n getBufferPruningInterval: getBufferPruningInterval,\n setFragmentRetryAttempts: setFragmentRetryAttempts,\n getFragmentRetryAttempts: getFragmentRetryAttempts,\n setRetryAttemptsForType: setRetryAttemptsForType,\n getRetryAttemptsForType: getRetryAttemptsForType,\n setFragmentRetryInterval: setFragmentRetryInterval,\n getFragmentRetryInterval: getFragmentRetryInterval,\n setRetryIntervalForType: setRetryIntervalForType,\n getRetryIntervalForType: getRetryIntervalForType,\n setWallclockTimeUpdateInterval: setWallclockTimeUpdateInterval,\n getWallclockTimeUpdateInterval: getWallclockTimeUpdateInterval,\n setScheduleWhilePaused: setScheduleWhilePaused,\n getScheduleWhilePaused: getScheduleWhilePaused,\n getUseSuggestedPresentationDelay: getUseSuggestedPresentationDelay,\n setUseSuggestedPresentationDelay: setUseSuggestedPresentationDelay,\n setLiveDelayFragmentCount: setLiveDelayFragmentCount,\n getLiveDelayFragmentCount: getLiveDelayFragmentCount,\n getLiveDelay: getLiveDelay,\n setLiveDelay: setLiveDelay,\n setUseManifestDateHeaderTimeSource: setUseManifestDateHeaderTimeSource,\n getUseManifestDateHeaderTimeSource: getUseManifestDateHeaderTimeSource,\n setUTCTimingSources: setUTCTimingSources,\n getUTCTimingSources: getUTCTimingSources,\n reset: reset\n };\n\n setup();\n\n return instance;\n}\n\n//TODO see if you can move this and not export and just getter to get default value.\nMediaPlayerModel.__dashjs_factory_name = 'MediaPlayerModel';\nvar factory = _coreFactoryMakerJs2['default'].getSingletonFactory(MediaPlayerModel);\nfactory.DEFAULT_UTC_TIMING_SOURCE = DEFAULT_UTC_TIMING_SOURCE;\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7,\"../vo/metrics/HTTPRequest.js\":117}],65:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _voMetricsListJs = _dereq_('../vo/MetricsList.js');\n\nvar _voMetricsListJs2 = _interopRequireDefault(_voMetricsListJs);\n\nvar _voMetricsTCPConnectionJs = _dereq_('../vo/metrics/TCPConnection.js');\n\nvar _voMetricsTCPConnectionJs2 = _interopRequireDefault(_voMetricsTCPConnectionJs);\n\nvar _voMetricsHTTPRequestJs = _dereq_('../vo/metrics/HTTPRequest.js');\n\nvar _voMetricsHTTPRequestJs2 = _interopRequireDefault(_voMetricsHTTPRequestJs);\n\nvar _voMetricsRepresentationSwitchJs = _dereq_('../vo/metrics/RepresentationSwitch.js');\n\nvar _voMetricsRepresentationSwitchJs2 = _interopRequireDefault(_voMetricsRepresentationSwitchJs);\n\nvar _voMetricsBufferLevelJs = _dereq_('../vo/metrics/BufferLevel.js');\n\nvar _voMetricsBufferLevelJs2 = _interopRequireDefault(_voMetricsBufferLevelJs);\n\nvar _voMetricsBufferStateJs = _dereq_('../vo/metrics/BufferState.js');\n\nvar _voMetricsBufferStateJs2 = _interopRequireDefault(_voMetricsBufferStateJs);\n\nvar _voMetricsDVRInfoJs = _dereq_('../vo/metrics/DVRInfo.js');\n\nvar _voMetricsDVRInfoJs2 = _interopRequireDefault(_voMetricsDVRInfoJs);\n\nvar _voMetricsDroppedFramesJs = _dereq_('../vo/metrics/DroppedFrames.js');\n\nvar _voMetricsDroppedFramesJs2 = _interopRequireDefault(_voMetricsDroppedFramesJs);\n\nvar _voMetricsManifestUpdateJs = _dereq_('../vo/metrics/ManifestUpdate.js');\n\nvar _voMetricsManifestUpdateJs2 = _interopRequireDefault(_voMetricsManifestUpdateJs);\n\nvar _voMetricsSchedulingInfoJs = _dereq_('../vo/metrics/SchedulingInfo.js');\n\nvar _voMetricsSchedulingInfoJs2 = _interopRequireDefault(_voMetricsSchedulingInfoJs);\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _voMetricsRequestsQueueJs = _dereq_('../vo/metrics/RequestsQueue.js');\n\nvar _voMetricsRequestsQueueJs2 = _interopRequireDefault(_voMetricsRequestsQueueJs);\n\nvar _coreEventsEventsJs = _dereq_('../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _voMetricsBolaStateJs = _dereq_('../vo/metrics/BolaState.js');\n\nvar _voMetricsBolaStateJs2 = _interopRequireDefault(_voMetricsBolaStateJs);\n\nfunction MetricsModel() {\n\n var context = this.context;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var instance = undefined,\n adapter = undefined,\n streamMetrics = undefined;\n\n function setup() {\n streamMetrics = {};\n }\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.adapter) {\n adapter = config.adapter;\n }\n }\n\n function metricsChanged() {\n eventBus.trigger(_coreEventsEventsJs2['default'].METRICS_CHANGED);\n }\n\n function metricChanged(mediaType) {\n eventBus.trigger(_coreEventsEventsJs2['default'].METRIC_CHANGED, { mediaType: mediaType });\n metricsChanged();\n }\n\n function metricUpdated(mediaType, metricType, vo) {\n eventBus.trigger(_coreEventsEventsJs2['default'].METRIC_UPDATED, { mediaType: mediaType, metric: metricType, value: vo });\n metricChanged(mediaType);\n }\n\n function metricAdded(mediaType, metricType, vo) {\n eventBus.trigger(_coreEventsEventsJs2['default'].METRIC_ADDED, { mediaType: mediaType, metric: metricType, value: vo });\n metricChanged(mediaType);\n }\n\n function clearCurrentMetricsForType(type) {\n delete streamMetrics[type];\n metricChanged(type);\n }\n\n function clearAllCurrentMetrics() {\n streamMetrics = {};\n metricsChanged();\n }\n\n function getReadOnlyMetricsFor(type) {\n if (streamMetrics.hasOwnProperty(type)) {\n return streamMetrics[type];\n }\n\n return null;\n }\n\n function getMetricsFor(type) {\n var metrics;\n\n if (streamMetrics.hasOwnProperty(type)) {\n metrics = streamMetrics[type];\n } else {\n metrics = new _voMetricsListJs2['default']();\n streamMetrics[type] = metrics;\n }\n\n return metrics;\n }\n\n function addTcpConnection(mediaType, tcpid, dest, topen, tclose, tconnect) {\n var vo = new _voMetricsTCPConnectionJs2['default']();\n\n vo.tcpid = tcpid;\n vo.dest = dest;\n vo.topen = topen;\n vo.tclose = tclose;\n vo.tconnect = tconnect;\n\n getMetricsFor(mediaType).TcpList.push(vo);\n\n metricAdded(mediaType, adapter.metricsList.TCP_CONNECTION, vo);\n return vo;\n }\n\n function appendHttpTrace(httpRequest, s, d, b) {\n var vo = new _voMetricsHTTPRequestJs2['default'].Trace();\n\n vo.s = s;\n vo.d = d;\n vo.b = b;\n\n httpRequest.trace.push(vo);\n\n if (!httpRequest.interval) {\n httpRequest.interval = 0;\n }\n\n httpRequest.interval += d;\n\n return vo;\n }\n\n function addHttpRequest(mediaType, tcpid, type, url, actualurl, serviceLocation, range, trequest, tresponse, tfinish, responsecode, mediaduration, responseHeaders, traces) {\n var vo = new _voMetricsHTTPRequestJs2['default']();\n\n // ISO 23009-1 D.4.3 NOTE 2:\n // All entries for a given object will have the same URL and range\n // and so can easily be correlated. If there were redirects or\n // failures there will be one entry for each redirect/failure.\n // The redirect-to URL or alternative url (where multiple have been\n // provided in the MPD) will appear as the actualurl of the next\n // entry with the same url value.\n if (actualurl && actualurl !== url) {\n\n // given the above, add an entry for the original request\n addHttpRequest(mediaType, null, type, url, null, null, range, trequest, null, // unknown\n null, // unknown\n null, // unknown, probably a 302\n mediaduration, null, null);\n\n vo.actualurl = actualurl;\n }\n\n vo.tcpid = tcpid;\n vo.type = type;\n vo.url = url;\n vo.range = range;\n vo.trequest = trequest;\n vo.tresponse = tresponse;\n vo.responsecode = responsecode;\n\n vo._tfinish = tfinish;\n vo._stream = mediaType;\n vo._mediaduration = mediaduration;\n vo._responseHeaders = responseHeaders;\n vo._serviceLocation = serviceLocation;\n\n if (traces) {\n traces.forEach(function (trace) {\n appendHttpTrace(vo, trace.s, trace.d, trace.b);\n });\n } else {\n // The interval and trace shall be absent for redirect and failure records.\n delete vo.interval;\n delete vo.trace;\n }\n\n getMetricsFor(mediaType).HttpList.push(vo);\n\n metricAdded(mediaType, adapter.metricsList.HTTP_REQUEST, vo);\n return vo;\n }\n\n function addRepresentationSwitch(mediaType, t, mt, to, lto) {\n var vo = new _voMetricsRepresentationSwitchJs2['default']();\n\n vo.t = t;\n vo.mt = mt;\n vo.to = to;\n\n if (lto) {\n vo.lto = lto;\n } else {\n delete vo.lto;\n }\n\n getMetricsFor(mediaType).RepSwitchList.push(vo);\n\n metricAdded(mediaType, adapter.metricsList.TRACK_SWITCH, vo);\n return vo;\n }\n\n function addBufferLevel(mediaType, t, level) {\n var vo = new _voMetricsBufferLevelJs2['default']();\n vo.t = t;\n vo.level = level;\n getMetricsFor(mediaType).BufferLevel.push(vo);\n\n metricAdded(mediaType, adapter.metricsList.BUFFER_LEVEL, vo);\n return vo;\n }\n\n function addBufferState(mediaType, state, target) {\n var vo = new _voMetricsBufferStateJs2['default']();\n vo.target = target;\n vo.state = state;\n getMetricsFor(mediaType).BufferState.push(vo);\n\n metricAdded(mediaType, adapter.metricsList.BUFFER_STATE, vo);\n return vo;\n }\n\n function addDVRInfo(mediaType, currentTime, mpd, range) {\n var vo = new _voMetricsDVRInfoJs2['default']();\n\n vo.time = currentTime;\n vo.range = range;\n vo.manifestInfo = mpd;\n\n getMetricsFor(mediaType).DVRInfo.push(vo);\n metricAdded(mediaType, adapter.metricsList.DVR_INFO, vo);\n\n return vo;\n }\n\n function addDroppedFrames(mediaType, quality) {\n var vo = new _voMetricsDroppedFramesJs2['default']();\n var list = getMetricsFor(mediaType).DroppedFrames;\n\n vo.time = quality.creationTime;\n vo.droppedFrames = quality.droppedVideoFrames;\n\n if (list.length > 0 && list[list.length - 1] == vo) {\n return list[list.length - 1];\n }\n\n list.push(vo);\n\n metricAdded(mediaType, adapter.metricsList.DROPPED_FRAMES, vo);\n return vo;\n }\n\n function addSchedulingInfo(mediaType, t, type, startTime, availabilityStartTime, duration, quality, range, state) {\n var vo = new _voMetricsSchedulingInfoJs2['default']();\n\n vo.mediaType = mediaType;\n vo.t = t;\n\n vo.type = type;\n vo.startTime = startTime;\n vo.availabilityStartTime = availabilityStartTime;\n vo.duration = duration;\n vo.quality = quality;\n vo.range = range;\n\n vo.state = state;\n\n getMetricsFor(mediaType).SchedulingInfo.push(vo);\n\n metricAdded(mediaType, adapter.metricsList.SCHEDULING_INFO, vo);\n return vo;\n }\n\n function addRequestsQueue(mediaType, loadingRequests, executedRequests) {\n var vo = new _voMetricsRequestsQueueJs2['default']();\n vo.loadingRequests = loadingRequests;\n vo.executedRequests = executedRequests;\n\n getMetricsFor(mediaType).RequestsQueue = vo;\n metricAdded(mediaType, adapter.metricsList.REQUESTS_QUEUE, vo);\n }\n\n function addManifestUpdate(mediaType, type, requestTime, fetchTime, availabilityStartTime, presentationStartTime, clientTimeOffset, currentTime, buffered, latency) {\n var vo = new _voMetricsManifestUpdateJs2['default']();\n var metrics = getMetricsFor('stream');\n\n vo.mediaType = mediaType;\n vo.type = type;\n vo.requestTime = requestTime; // when this manifest update was requested\n vo.fetchTime = fetchTime; // when this manifest update was received\n vo.availabilityStartTime = availabilityStartTime;\n vo.presentationStartTime = presentationStartTime; // the seek point (liveEdge for dynamic, Stream[0].startTime for static)\n vo.clientTimeOffset = clientTimeOffset; // the calculated difference between the server and client wall clock time\n vo.currentTime = currentTime; // actual element.currentTime\n vo.buffered = buffered; // actual element.ranges\n vo.latency = latency; // (static is fixed value of zero. dynamic should be ((Now-@availabilityStartTime) - currentTime)\n\n metrics.ManifestUpdate.push(vo);\n metricAdded(mediaType, adapter.metricsList.MANIFEST_UPDATE, vo);\n\n return vo;\n }\n\n function updateManifestUpdateInfo(manifestUpdate, updatedFields) {\n if (manifestUpdate) {\n for (var field in updatedFields) {\n manifestUpdate[field] = updatedFields[field];\n }\n\n metricUpdated(manifestUpdate.mediaType, adapter.metricsList.MANIFEST_UPDATE, manifestUpdate);\n }\n }\n\n function addManifestUpdateStreamInfo(manifestUpdate, id, index, start, duration) {\n if (manifestUpdate) {\n var vo = new _voMetricsManifestUpdateJs2['default'].StreamInfo();\n\n vo.id = id;\n vo.index = index;\n vo.start = start;\n vo.duration = duration;\n\n manifestUpdate.streamInfo.push(vo);\n metricUpdated(manifestUpdate.mediaType, adapter.metricsList.MANIFEST_UPDATE_STREAM_INFO, manifestUpdate);\n\n return vo;\n }\n return null;\n }\n\n function addManifestUpdateRepresentationInfo(manifestUpdate, id, index, streamIndex, mediaType, presentationTimeOffset, startNumber, fragmentInfoType) {\n if (manifestUpdate) {\n var vo = new _voMetricsManifestUpdateJs2['default'].TrackInfo();\n\n vo.id = id;\n vo.index = index;\n vo.streamIndex = streamIndex;\n vo.mediaType = mediaType;\n vo.startNumber = startNumber;\n vo.fragmentInfoType = fragmentInfoType;\n vo.presentationTimeOffset = presentationTimeOffset;\n\n manifestUpdate.trackInfo.push(vo);\n metricUpdated(manifestUpdate.mediaType, adapter.metricsList.MANIFEST_UPDATE_TRACK_INFO, manifestUpdate);\n\n return vo;\n }\n return null;\n }\n\n function addPlayList(vo) {\n var type = 'stream';\n\n if (vo.trace && Array.isArray(vo.trace)) {\n vo.trace.forEach(function (trace) {\n if (trace.hasOwnProperty('subreplevel') && !trace.subreplevel) {\n delete trace.subreplevel;\n }\n });\n } else {\n delete vo.trace;\n }\n\n getMetricsFor(type).PlayList.push(vo);\n\n metricAdded(type, adapter.metricsList.PLAY_LIST, vo);\n return vo;\n }\n\n function addDVBErrors(vo) {\n var type = 'stream';\n\n getMetricsFor(type).DVBErrors.push(vo);\n\n metricAdded(type, adapter.metricsList.DVB_ERRORS, vo);\n\n return vo;\n }\n\n function updateBolaState(mediaType, _s) {\n var vo = new _voMetricsBolaStateJs2['default']();\n vo._s = _s;\n getMetricsFor(mediaType).BolaState = [vo];\n\n metricAdded(mediaType, 'BolaState', vo);\n return vo;\n }\n\n instance = {\n metricsChanged: metricsChanged,\n metricChanged: metricChanged,\n metricUpdated: metricUpdated,\n metricAdded: metricAdded,\n clearCurrentMetricsForType: clearCurrentMetricsForType,\n clearAllCurrentMetrics: clearAllCurrentMetrics,\n getReadOnlyMetricsFor: getReadOnlyMetricsFor,\n getMetricsFor: getMetricsFor,\n addTcpConnection: addTcpConnection,\n addHttpRequest: addHttpRequest,\n addRepresentationSwitch: addRepresentationSwitch,\n addBufferLevel: addBufferLevel,\n addBufferState: addBufferState,\n addDVRInfo: addDVRInfo,\n addDroppedFrames: addDroppedFrames,\n addSchedulingInfo: addSchedulingInfo,\n addRequestsQueue: addRequestsQueue,\n addManifestUpdate: addManifestUpdate,\n updateManifestUpdateInfo: updateManifestUpdateInfo,\n addManifestUpdateStreamInfo: addManifestUpdateStreamInfo,\n addManifestUpdateRepresentationInfo: addManifestUpdateRepresentationInfo,\n addPlayList: addPlayList,\n addDVBErrors: addDVBErrors,\n updateBolaState: updateBolaState,\n setConfig: setConfig\n };\n\n setup();\n return instance;\n}\n\nMetricsModel.__dashjs_factory_name = 'MetricsModel';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(MetricsModel);\nmodule.exports = exports['default'];\n\n},{\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7,\"../../core/events/Events.js\":9,\"../vo/MetricsList.js\":106,\"../vo/metrics/BolaState.js\":112,\"../vo/metrics/BufferLevel.js\":113,\"../vo/metrics/BufferState.js\":114,\"../vo/metrics/DVRInfo.js\":115,\"../vo/metrics/DroppedFrames.js\":116,\"../vo/metrics/HTTPRequest.js\":117,\"../vo/metrics/ManifestUpdate.js\":118,\"../vo/metrics/RepresentationSwitch.js\":120,\"../vo/metrics/RequestsQueue.js\":121,\"../vo/metrics/SchedulingInfo.js\":122,\"../vo/metrics/TCPConnection.js\":123}],66:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _voURIFragmentDataJs = _dereq_('../vo/URIFragmentData.js');\n\nvar _voURIFragmentDataJs2 = _interopRequireDefault(_voURIFragmentDataJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction URIQueryAndFragmentModel() {\n\n var instance = undefined,\n URIFragmentDataVO = undefined,\n URIQueryData = undefined,\n isHTTPS = undefined;\n\n function initialize() {\n URIFragmentDataVO = new _voURIFragmentDataJs2['default']();\n URIQueryData = [];\n isHTTPS = false;\n }\n\n function getURIFragmentData() {\n return URIFragmentDataVO;\n }\n\n function getURIQueryData() {\n return URIQueryData;\n }\n\n function isManifestHTTPS() {\n return isHTTPS;\n }\n\n function parseURI(uri) {\n if (!uri) return null;\n\n var URIFragmentData = [];\n var mappedArr;\n\n var testQuery = new RegExp(/[?]/);\n var testFragment = new RegExp(/[#]/);\n var testHTTPS = new RegExp(/^(https:)?\\/\\//i);\n var isQuery = testQuery.test(uri);\n var isFragment = testFragment.test(uri);\n\n isHTTPS = testHTTPS.test(uri);\n\n function reduceArray(previousValue, currentValue, index, array) {\n var arr = array[0].split(/[=]/);\n array.push({ key: arr[0], value: arr[1] });\n array.shift();\n return array;\n }\n\n function mapArray(currentValue, index, array) {\n if (index > 0) {\n if (isQuery && URIQueryData.length === 0) {\n URIQueryData = array[index].split(/[&]/);\n } else if (isFragment) {\n URIFragmentData = array[index].split(/[&]/);\n }\n }\n\n return array;\n }\n\n mappedArr = uri.split(/[?#]/).map(mapArray);\n\n if (URIQueryData.length > 0) {\n URIQueryData = URIQueryData.reduce(reduceArray, null);\n }\n\n if (URIFragmentData.length > 0) {\n URIFragmentData = URIFragmentData.reduce(reduceArray, null);\n URIFragmentData.forEach(function (object) {\n URIFragmentDataVO[object.key] = object.value;\n });\n }\n\n return uri;\n }\n\n instance = {\n initialize: initialize,\n parseURI: parseURI,\n getURIFragmentData: getURIFragmentData,\n getURIQueryData: getURIQueryData,\n isManifestHTTPS: isManifestHTTPS\n };\n\n return instance;\n}\n\nURIQueryAndFragmentModel.__dashjs_factory_name = 'URIQueryAndFragmentModel';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(URIQueryAndFragmentModel);\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7,\"../vo/URIFragmentData.js\":111}],67:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction VideoModel() {\n\n var instance = undefined,\n element = undefined,\n TTMLRenderingDiv = undefined,\n videoContainer = undefined,\n stalledStreams = undefined,\n previousPlaybackRate = undefined;\n\n function initialize() {\n stalledStreams = [];\n }\n\n function setPlaybackRate(value) {\n if (!element || element.readyState < 2) return;\n element.playbackRate = value;\n }\n\n //TODO Move the DVR window calculations from MediaPlayer to Here.\n function setCurrentTime(currentTime) {\n //_currentTime = currentTime;\n\n // We don't set the same currentTime because it can cause firing unexpected Pause event in IE11\n // providing playbackRate property equals to zero.\n if (element.currentTime == currentTime) return;\n\n // TODO Despite the fact that MediaSource 'open' event has been fired IE11 cannot set videoElement.currentTime\n // immediately (it throws InvalidStateError). It seems that this is related to videoElement.readyState property\n // Initially it is 0, but soon after 'open' event it goes to 1 and setting currentTime is allowed. Chrome allows to\n // set currentTime even if readyState = 0.\n // setTimeout is used to workaround InvalidStateError in IE11\n try {\n element.currentTime = currentTime;\n } catch (e) {\n if (element.readyState === 0 && e.code === e.INVALID_STATE_ERR) {\n setTimeout(function () {\n element.currentTime = currentTime;\n }, 400);\n }\n }\n }\n\n function getElement() {\n return element;\n }\n\n function setElement(value) {\n element = value;\n // Workaround to force Firefox to fire the canplay event.\n element.preload = 'auto';\n }\n\n function setSource(source) {\n if (source) {\n element.src = source;\n } else {\n element.removeAttribute('src');\n element.load();\n }\n }\n\n function getSource() {\n return element.src;\n }\n\n function getVideoContainer() {\n return videoContainer;\n }\n\n function setVideoContainer(value) {\n videoContainer = value;\n }\n\n function getTTMLRenderingDiv() {\n return TTMLRenderingDiv;\n }\n\n function setTTMLRenderingDiv(div) {\n TTMLRenderingDiv = div;\n // The styling will allow the captions to match the video window size and position.\n TTMLRenderingDiv.style.position = 'absolute';\n TTMLRenderingDiv.style.display = 'flex';\n TTMLRenderingDiv.style.overflow = 'hidden';\n TTMLRenderingDiv.style.pointerEvents = 'none';\n TTMLRenderingDiv.style.top = 0;\n TTMLRenderingDiv.style.left = 0;\n }\n\n function setStallState(type, state) {\n stallStream(type, state);\n }\n\n function isStalled() {\n return stalledStreams.length > 0;\n }\n\n function addStalledStream(type) {\n\n var event = undefined;\n\n if (type === null || element.seeking || stalledStreams.indexOf(type) !== -1) {\n return;\n }\n\n stalledStreams.push(type);\n if (stalledStreams.length === 1) {\n // Halt playback until nothing is stalled.\n event = document.createEvent('Event');\n event.initEvent('waiting', true, false);\n previousPlaybackRate = element.playbackRate;\n setPlaybackRate(0);\n element.dispatchEvent(event);\n }\n }\n\n function removeStalledStream(type) {\n var index = stalledStreams.indexOf(type);\n var event = undefined;\n\n if (type === null) {\n return;\n }\n if (index !== -1) {\n stalledStreams.splice(index, 1);\n }\n // If nothing is stalled resume playback.\n if (isStalled() === false && element.playbackRate === 0) {\n event = document.createEvent('Event');\n event.initEvent('playing', true, false);\n setPlaybackRate(previousPlaybackRate || 1);\n element.dispatchEvent(event);\n }\n }\n\n function stallStream(type, isStalled) {\n if (isStalled) {\n addStalledStream(type);\n } else {\n removeStalledStream(type);\n }\n }\n\n function getPlaybackQuality() {\n var hasWebKit = ('webkitDroppedFrameCount' in element);\n var hasQuality = ('getVideoPlaybackQuality' in element);\n var result = null;\n\n if (hasQuality) {\n result = element.getVideoPlaybackQuality();\n } else if (hasWebKit) {\n result = { droppedVideoFrames: element.webkitDroppedFrameCount, creationTime: new Date() };\n }\n\n return result;\n }\n\n instance = {\n initialize: initialize,\n setCurrentTime: setCurrentTime,\n setStallState: setStallState,\n getElement: getElement,\n setElement: setElement,\n setSource: setSource,\n getSource: getSource,\n getVideoContainer: getVideoContainer,\n setVideoContainer: setVideoContainer,\n getTTMLRenderingDiv: getTTMLRenderingDiv,\n setTTMLRenderingDiv: setTTMLRenderingDiv,\n getPlaybackQuality: getPlaybackQuality\n };\n\n return instance;\n}\n\nVideoModel.__dashjs_factory_name = 'VideoModel';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(VideoModel);\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7}],68:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction RulesContext(config) {\n\n var instance = undefined;\n var representationInfo = config.streamProcessor.getCurrentRepresentationInfo();\n var sp = config.streamProcessor;\n var currentValue = config.currentValue;\n\n function getStreamInfo() {\n return representationInfo.mediaInfo.streamInfo;\n }\n\n function getMediaInfo() {\n return representationInfo.mediaInfo;\n }\n\n function getTrackInfo() {\n return representationInfo;\n }\n\n function getCurrentValue() {\n return currentValue;\n }\n\n function getManifestInfo() {\n return representationInfo.mediaInfo.streamInfo.manifestInfo;\n }\n\n function getStreamProcessor() {\n return sp;\n }\n\n instance = {\n getStreamInfo: getStreamInfo,\n getMediaInfo: getMediaInfo,\n getTrackInfo: getTrackInfo,\n getCurrentValue: getCurrentValue,\n getManifestInfo: getManifestInfo,\n getStreamProcessor: getStreamProcessor\n };\n\n return instance;\n}\n\nRulesContext.__dashjs_factory_name = 'RulesContext';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(RulesContext);\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7}],69:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _RulesContextJs = _dereq_('./RulesContext.js');\n\nvar _RulesContextJs2 = _interopRequireDefault(_RulesContextJs);\n\nvar _SwitchRequestJs = _dereq_('./SwitchRequest.js');\n\nvar _SwitchRequestJs2 = _interopRequireDefault(_SwitchRequestJs);\n\nvar _abrABRRulesCollectionJs = _dereq_('./abr/ABRRulesCollection.js');\n\nvar _abrABRRulesCollectionJs2 = _interopRequireDefault(_abrABRRulesCollectionJs);\n\nvar _synchronizationSynchronizationRulesCollectionJs = _dereq_('./synchronization/SynchronizationRulesCollection.js');\n\nvar _synchronizationSynchronizationRulesCollectionJs2 = _interopRequireDefault(_synchronizationSynchronizationRulesCollectionJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar ABR_RULE = 0;\nvar SYNC_RULE = 1;\n\nfunction RulesController() {\n\n var context = this.context;\n\n var instance = undefined,\n rules = undefined;\n\n function initialize() {\n rules = {};\n }\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.abrRulesCollection) {\n rules[ABR_RULE] = config.abrRulesCollection;\n }\n\n if (config.synchronizationRulesCollection) {\n rules[SYNC_RULE] = config.synchronizationRulesCollection;\n }\n }\n\n function applyRules(rulesArr, streamProcessor, callback, current, overrideFunc) {\n var values = {};\n var rule, i;\n\n var rulesCount = rulesArr.length;\n var ln = rulesCount;\n var rulesContext = getRulesContext(streamProcessor, current);\n\n var callbackFunc = function callbackFunc(result) {\n var value, confidence;\n\n if (result.value !== _SwitchRequestJs2['default'].NO_CHANGE) {\n values[result.priority] = overrideFunc(values[result.priority], result.value);\n }\n\n if (--rulesCount) return;\n\n if (values[_SwitchRequestJs2['default'].WEAK] !== _SwitchRequestJs2['default'].NO_CHANGE) {\n confidence = _SwitchRequestJs2['default'].WEAK;\n value = values[_SwitchRequestJs2['default'].WEAK];\n }\n\n if (values[_SwitchRequestJs2['default'].DEFAULT] !== _SwitchRequestJs2['default'].NO_CHANGE) {\n confidence = _SwitchRequestJs2['default'].DEFAULT;\n value = values[_SwitchRequestJs2['default'].DEFAULT];\n }\n\n if (values[_SwitchRequestJs2['default'].STRONG] !== _SwitchRequestJs2['default'].NO_CHANGE) {\n confidence = _SwitchRequestJs2['default'].STRONG;\n value = values[_SwitchRequestJs2['default'].STRONG];\n }\n\n if (confidence != _SwitchRequestJs2['default'].STRONG && confidence != _SwitchRequestJs2['default'].WEAK) {\n confidence = _SwitchRequestJs2['default'].DEFAULT;\n }\n\n callback({ value: value !== undefined ? value : current, confidence: confidence });\n };\n\n values[_SwitchRequestJs2['default'].STRONG] = _SwitchRequestJs2['default'].NO_CHANGE;\n values[_SwitchRequestJs2['default'].WEAK] = _SwitchRequestJs2['default'].NO_CHANGE;\n values[_SwitchRequestJs2['default'].DEFAULT] = _SwitchRequestJs2['default'].NO_CHANGE;\n\n for (i = 0; i < ln; i++) {\n rule = rulesArr[i];\n rule.execute(rulesContext, callbackFunc);\n }\n }\n\n function reset() {\n var abrRules = rules[ABR_RULE];\n var synchronizationRules = rules[SYNC_RULE];\n var allRules = (abrRules.getRules(_abrABRRulesCollectionJs2['default'].QUALITY_SWITCH_RULES) || []).concat(abrRules.getRules(_abrABRRulesCollectionJs2['default'].ABANDON_FRAGMENT_RULES) || []).concat(synchronizationRules.getRules(_synchronizationSynchronizationRulesCollectionJs2['default'].TIME_SYNCHRONIZED_RULES) || []).concat(synchronizationRules.getRules(_synchronizationSynchronizationRulesCollectionJs2['default'].BEST_GUESS_RULES) || []);\n var ln = allRules.length;\n\n var rule, i;\n\n for (i = 0; i < ln; i++) {\n rule = allRules[i];\n\n if (typeof rule.reset !== 'function') continue;\n\n rule.reset();\n }\n\n rules = {};\n }\n\n function getRulesContext(streamProcessor, currentValue) {\n return (0, _RulesContextJs2['default'])(context).create({ streamProcessor: streamProcessor, currentValue: currentValue });\n }\n\n instance = {\n initialize: initialize,\n setConfig: setConfig,\n applyRules: applyRules,\n reset: reset\n };\n\n return instance;\n}\n\nRulesController.__dashjs_factory_name = 'RulesController';\nvar factory = _coreFactoryMakerJs2['default'].getSingletonFactory(RulesController);\nfactory.ABR_RULE = ABR_RULE;\nfactory.SYNC_RULE = SYNC_RULE;\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7,\"./RulesContext.js\":68,\"./SwitchRequest.js\":70,\"./abr/ABRRulesCollection.js\":71,\"./synchronization/SynchronizationRulesCollection.js\":84}],70:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar NO_CHANGE = 999;\nvar DEFAULT = 0.5;\nvar STRONG = 1;\nvar WEAK = 0;\n\nfunction SwitchRequest(v, p) {\n //TODO refactor all the calls to this to use config to be like everything else.\n var value = v === undefined ? NO_CHANGE : v;\n var priority = p === undefined ? DEFAULT : p;\n\n var instance = {\n value: value,\n priority: priority\n };\n\n return instance;\n}\n\nSwitchRequest.__dashjs_factory_name = 'SwitchRequest';\nvar factory = _coreFactoryMakerJs2['default'].getClassFactory(SwitchRequest);\nfactory.NO_CHANGE = NO_CHANGE;\nfactory.DEFAULT = DEFAULT;\nfactory.STRONG = STRONG;\nfactory.WEAK = WEAK;\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7}],71:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _ThroughputRuleJs = _dereq_('./ThroughputRule.js');\n\nvar _ThroughputRuleJs2 = _interopRequireDefault(_ThroughputRuleJs);\n\nvar _BufferOccupancyRuleJs = _dereq_('./BufferOccupancyRule.js');\n\nvar _BufferOccupancyRuleJs2 = _interopRequireDefault(_BufferOccupancyRuleJs);\n\nvar _InsufficientBufferRuleJs = _dereq_('./InsufficientBufferRule.js');\n\nvar _InsufficientBufferRuleJs2 = _interopRequireDefault(_InsufficientBufferRuleJs);\n\nvar _AbandonRequestsRuleJs = _dereq_('./AbandonRequestsRule.js');\n\nvar _AbandonRequestsRuleJs2 = _interopRequireDefault(_AbandonRequestsRuleJs);\n\nvar _BolaRuleJs = _dereq_('./BolaRule.js');\n\nvar _BolaRuleJs2 = _interopRequireDefault(_BolaRuleJs);\n\nvar _BolaAbandonRuleJs = _dereq_('./BolaAbandonRule.js');\n\nvar _BolaAbandonRuleJs2 = _interopRequireDefault(_BolaAbandonRuleJs);\n\nvar _modelsMediaPlayerModelJs = _dereq_('../../models/MediaPlayerModel.js');\n\nvar _modelsMediaPlayerModelJs2 = _interopRequireDefault(_modelsMediaPlayerModelJs);\n\nvar _modelsMetricsModelJs = _dereq_('../../models/MetricsModel.js');\n\nvar _modelsMetricsModelJs2 = _interopRequireDefault(_modelsMetricsModelJs);\n\nvar _dashDashMetricsJs = _dereq_('../../../dash/DashMetrics.js');\n\nvar _dashDashMetricsJs2 = _interopRequireDefault(_dashDashMetricsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar QUALITY_SWITCH_RULES = 'qualitySwitchRules';\nvar ABANDON_FRAGMENT_RULES = 'abandonFragmentRules';\n\nfunction ABRRulesCollection() {\n\n var context = this.context;\n var isWebOS = !!window.PalmSystem;\n\n var instance = undefined,\n qualitySwitchRules = undefined,\n abandonFragmentRules = undefined;\n\n function initialize() {\n qualitySwitchRules = [];\n abandonFragmentRules = [];\n\n var metricsModel = (0, _modelsMetricsModelJs2['default'])(context).getInstance();\n var dashMetrics = (0, _dashDashMetricsJs2['default'])(context).getInstance();\n var mediaPlayerModel = (0, _modelsMediaPlayerModelJs2['default'])(context).getInstance();\n\n if (!isWebOS && mediaPlayerModel.getBufferOccupancyABREnabled()) {\n qualitySwitchRules.push((0, _BolaRuleJs2['default'])(context).create({\n metricsModel: metricsModel,\n dashMetrics: (0, _dashDashMetricsJs2['default'])(context).getInstance()\n }));\n abandonFragmentRules.push((0, _BolaAbandonRuleJs2['default'])(context).create({\n metricsModel: metricsModel,\n dashMetrics: (0, _dashDashMetricsJs2['default'])(context).getInstance()\n }));\n } else {\n qualitySwitchRules.push((0, _ThroughputRuleJs2['default'])(context).create({\n metricsModel: metricsModel,\n dashMetrics: dashMetrics\n }));\n\n // disable BufferOccupancy rule for webOS as it not always is able\n // to play topmost quality\n if (!isWebOS) {\n qualitySwitchRules.push((0, _BufferOccupancyRuleJs2['default'])(context).create({\n metricsModel: metricsModel,\n dashMetrics: dashMetrics\n }));\n }\n\n qualitySwitchRules.push((0, _InsufficientBufferRuleJs2['default'])(context).create({ metricsModel: metricsModel }));\n abandonFragmentRules.push((0, _AbandonRequestsRuleJs2['default'])(context).create());\n }\n }\n\n function getRules(type) {\n switch (type) {\n case QUALITY_SWITCH_RULES:\n return qualitySwitchRules;\n case ABANDON_FRAGMENT_RULES:\n return abandonFragmentRules;\n default:\n return null;\n }\n }\n\n instance = {\n initialize: initialize,\n getRules: getRules\n };\n\n return instance;\n}\n\nABRRulesCollection.__dashjs_factory_name = 'ABRRulesCollection';\nvar factory = _coreFactoryMakerJs2['default'].getSingletonFactory(ABRRulesCollection);\nfactory.QUALITY_SWITCH_RULES = QUALITY_SWITCH_RULES;\nfactory.ABANDON_FRAGMENT_RULES = ABANDON_FRAGMENT_RULES;\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../../../core/FactoryMaker.js\":7,\"../../../dash/DashMetrics.js\":13,\"../../models/MediaPlayerModel.js\":64,\"../../models/MetricsModel.js\":65,\"./AbandonRequestsRule.js\":72,\"./BolaAbandonRule.js\":73,\"./BolaRule.js\":74,\"./BufferOccupancyRule.js\":75,\"./InsufficientBufferRule.js\":76,\"./ThroughputRule.js\":77}],72:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _SwitchRequestJs = _dereq_('../SwitchRequest.js');\n\nvar _SwitchRequestJs2 = _interopRequireDefault(_SwitchRequestJs);\n\nvar _modelsMediaPlayerModelJs = _dereq_('../../models/MediaPlayerModel.js');\n\nvar _modelsMediaPlayerModelJs2 = _interopRequireDefault(_modelsMediaPlayerModelJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreDebugJs = _dereq_('../../../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nvar GRACE_TIME_THRESHOLD = 500;\nvar ABANDON_MULTIPLIER = 1.5;\n\nfunction AbandonRequestsRule() /*config*/{\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n\n var instance = undefined,\n fragmentDict = undefined,\n abandonDict = undefined,\n mediaPlayerModel = undefined;\n\n function setup() {\n fragmentDict = {};\n abandonDict = {};\n mediaPlayerModel = (0, _modelsMediaPlayerModelJs2['default'])(context).getInstance();\n }\n\n function setFragmentRequestDict(type, id) {\n fragmentDict[type] = fragmentDict[type] || {};\n fragmentDict[type][id] = fragmentDict[type][id] || {};\n }\n\n function execute(rulesContext, callback) {\n var fragmentInfo;\n var now = new Date().getTime();\n var mediaInfo = rulesContext.getMediaInfo();\n var mediaType = mediaInfo.type;\n var progressEvent = rulesContext.getCurrentValue();\n var representationInfo = rulesContext.getTrackInfo();\n var req = progressEvent.request;\n var abrController = rulesContext.getStreamProcessor().getABRController();\n var switchRequest = (0, _SwitchRequestJs2['default'])(context).create(_SwitchRequestJs2['default'].NO_CHANGE, _SwitchRequestJs2['default'].WEAK);\n\n if (!isNaN(req.index)) {\n setFragmentRequestDict(mediaType, req.index);\n fragmentInfo = fragmentDict[mediaType][req.index];\n\n if (fragmentInfo === null || req.firstByteDate === null || abandonDict.hasOwnProperty(fragmentInfo.id)) {\n callback(switchRequest);\n return;\n }\n\n //setup some init info based on first progress event\n if (fragmentInfo.firstByteTime === undefined) {\n fragmentInfo.firstByteTime = req.firstByteDate.getTime();\n fragmentInfo.segmentDuration = req.duration;\n fragmentInfo.bytesTotal = req.bytesTotal;\n fragmentInfo.id = req.index;\n //log(\"FRAG ID : \" ,fragmentInfo.id, \" *****************\");\n }\n //update info base on subsequent progress events until completed.\n fragmentInfo.bytesLoaded = req.bytesLoaded;\n fragmentInfo.elapsedTime = now - fragmentInfo.firstByteTime;\n\n if (fragmentInfo.bytesLoaded < fragmentInfo.bytesTotal && fragmentInfo.elapsedTime >= GRACE_TIME_THRESHOLD) {\n\n fragmentInfo.measuredBandwidthInKbps = Math.round(fragmentInfo.bytesLoaded * 8 / fragmentInfo.elapsedTime);\n fragmentInfo.estimatedTimeOfDownload = (fragmentInfo.bytesTotal * 8 * 0.001 / fragmentInfo.measuredBandwidthInKbps).toFixed(2);\n //log(\"id: \",fragmentInfo.id, \"kbps: \", fragmentInfo.measuredBandwidthInKbps, \"etd: \",fragmentInfo.estimatedTimeOfDownload, \"et: \", fragmentInfo.elapsedTime/1000);\n\n if (fragmentInfo.estimatedTimeOfDownload < fragmentInfo.segmentDuration * ABANDON_MULTIPLIER || representationInfo.quality === 0) {\n callback(switchRequest);\n return;\n } else if (!abandonDict.hasOwnProperty(fragmentInfo.id)) {\n var newQuality = abrController.getQualityForBitrate(mediaInfo, fragmentInfo.measuredBandwidthInKbps * mediaPlayerModel.getBandwidthSafetyFactor());\n switchRequest = (0, _SwitchRequestJs2['default'])(context).create(newQuality, _SwitchRequestJs2['default'].STRONG);\n abandonDict[fragmentInfo.id] = fragmentInfo;\n log('AbandonRequestsRule ( ', mediaType, 'frag id', fragmentInfo.id, ') is asking to abandon and switch to quality to ', newQuality, ' measured bandwidth was', fragmentInfo.measuredBandwidthInKbps);\n delete fragmentDict[mediaType][fragmentInfo.id];\n }\n } else if (fragmentInfo.bytesLoaded === fragmentInfo.bytesTotal) {\n delete fragmentDict[mediaType][fragmentInfo.id];\n }\n }\n\n callback(switchRequest);\n }\n\n function reset() {\n fragmentDict = {};\n abandonDict = {};\n }\n\n instance = {\n execute: execute,\n reset: reset\n };\n\n setup();\n\n return instance;\n}\n\nAbandonRequestsRule.__dashjs_factory_name = 'AbandonRequestsRule';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(AbandonRequestsRule);\nmodule.exports = exports['default'];\n\n},{\"../../../core/Debug.js\":5,\"../../../core/FactoryMaker.js\":7,\"../../models/MediaPlayerModel.js\":64,\"../SwitchRequest.js\":70}],73:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2016, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _SwitchRequestJs = _dereq_('../SwitchRequest.js');\n\nvar _SwitchRequestJs2 = _interopRequireDefault(_SwitchRequestJs);\n\nvar _modelsMediaPlayerModelJs = _dereq_('../../models/MediaPlayerModel.js');\n\nvar _modelsMediaPlayerModelJs2 = _interopRequireDefault(_modelsMediaPlayerModelJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreDebugJs = _dereq_('../../../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nvar _BolaRuleJs = _dereq_('./BolaRule.js');\n\nvar _BolaRuleJs2 = _interopRequireDefault(_BolaRuleJs);\n\nfunction BolaAbandonRule(config) {\n\n // do not abandon during the grace period\n var GRACE_PERIOD_MS = 500;\n var POOR_RTT_MS = 200;\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n var dashMetrics = config.dashMetrics;\n var metricsModel = config.metricsModel;\n\n var instance = undefined,\n abandonDict = undefined,\n mediaPlayerModel = undefined;\n\n function setup() {\n abandonDict = {};\n mediaPlayerModel = (0, _modelsMediaPlayerModelJs2['default'])(context).getInstance();\n }\n\n function rememberAbandon(mediaType, index, quality) {\n // if this is called, then canStillAbandon(mediaType, index, quality) should have returned true\n abandonDict[mediaType] = { index: index, quality: quality };\n }\n\n function canStillAbandon(mediaType, index, quality) {\n var adm = abandonDict[mediaType];\n if (!adm) return true;\n return index > adm.index || index == adm.index && quality < adm.quality;\n }\n\n function execute(rulesContext, callback) {\n var mediaInfo = rulesContext.getMediaInfo();\n var mediaType = mediaInfo.type;\n var metrics = metricsModel.getReadOnlyMetricsFor(mediaType);\n var progressEvent = rulesContext.getCurrentValue();\n var request = progressEvent.request;\n var switchRequest = (0, _SwitchRequestJs2['default'])(context).create(_SwitchRequestJs2['default'].NO_CHANGE, _SwitchRequestJs2['default'].WEAK);\n\n // TODO: should we abandon during startup?\n if (metrics.BolaState.length === 0 || metrics.BolaState[0]._s.state !== _BolaRuleJs2['default'].BOLA_STATE_STEADY) {\n abandonDict = {}; // otherwise seek back might disable abandonment - TODO: handle cleaner\n callback(switchRequest);\n return;\n }\n\n var bolaState = metrics.BolaState[0]._s;\n // TODO: does changing bolaState conform to coding style, or should we clone?\n\n var index = request.index;\n var quality = request.quality;\n\n if (isNaN(index) || quality === 0 || !canStillAbandon(mediaType, index, quality) || !request.firstByteDate) {\n callback(switchRequest);\n return;\n }\n\n var nowMilliSeconds = new Date().getTime();\n var elapsedTimeMilliSeconds = nowMilliSeconds - request.firstByteDate.getTime();\n\n var bytesLoaded = request.bytesLoaded;\n var bytesTotal = request.bytesTotal;\n var bytesRemaining = bytesTotal - bytesLoaded;\n var duration = request.duration;\n\n var bufferLevel = dashMetrics.getCurrentBufferLevel(metrics) ? dashMetrics.getCurrentBufferLevel(metrics) : 0.0;\n\n var estimateThroughputBSF = bolaState.bandwidthSafetyFactor * 8000.0 * bytesLoaded / elapsedTimeMilliSeconds; // throughput in bits per second\n var rttSeconds = 0.001 * (request.firstByteDate.getTime() - request.requestStartDate.getTime());\n if (rttSeconds < 0.001 * POOR_RTT_MS) rttSeconds = 0.001 * POOR_RTT_MS;\n\n var diagnosticMessage = 'index=' + index + ' quality=' + quality + ' bytesLoaded/bytesTotal=' + bytesLoaded + '/' + bytesTotal + ' bufferLevel=' + bufferLevel + ' timeSince1stByte=' + (elapsedTimeMilliSeconds / 1000).toFixed(3) + ' estThroughput=' + (estimateThroughputBSF / 1000000).toFixed(3) + ' latency=' + rttSeconds.toFixed(3);\n\n var estimateOtherBytesTotal = bytesTotal * bolaState.bitrate[0] / bolaState.bitrate[quality];\n var estimateBytesRemainingAfterRtt = bytesRemaining - rttSeconds * estimateThroughputBSF / 8.0;\n if (estimateBytesRemainingAfterRtt < 1.0) {\n estimateBytesRemainingAfterRtt = 1.0;\n }\n\n if (elapsedTimeMilliSeconds < GRACE_PERIOD_MS || bytesRemaining <= estimateOtherBytesTotal || bufferLevel > bolaState.bufferTarget || estimateBytesRemainingAfterRtt <= estimateOtherBytesTotal || 8 * bytesTotal / estimateThroughputBSF <= duration) {\n // Do not abandon during first GRACE_PERIOD_MS.\n // Do not abandon if we need to download less bytes than the size of the lowest quality fragment.\n // Do not abandon if buffer level is above bufferTarget because the schedule controller will not download anything anyway.\n // Do not abandon if after rttSeconds bytesRemaining is estimated to drop below size of lowest quality fragment.\n // Do not abandon if fragment takes less than 1 fragment duration to download.\n callback(switchRequest);\n return;\n }\n\n // check if we are giving the safety guarantee (see comment in BolaRule.js)\n if (bolaState.safetyGuarantee && bufferLevel <= bolaState.fragmentDuration && bolaState.state === _BolaRuleJs2['default'].BOLA_STATE_STEADY) {\n // If the buffer only has one fragment left, then this is the last chance to abandon without rebuffering if the network bandwidth corresponds to the lowest bitrate.\n\n // BOLA_STATE_STEADY: During startup the buffer has not yet grown enough and will give false positives.\n\n bolaState.lastQuality = 0;\n metricsModel.updateBolaState(mediaType, bolaState);\n\n rememberAbandon(mediaType, index, quality);\n switchRequest = (0, _SwitchRequestJs2['default'])(context).create(0, _SwitchRequestJs2['default'].STRONG);\n if (_BolaRuleJs2['default'].BOLA_DEBUG) log('BolaDebug ' + mediaType + ' BolaAbandonRule to 0 for safety guarantee' + ' - ' + diagnosticMessage);\n callback(switchRequest);\n return;\n }\n\n var estimateTimeRemainSeconds = 8.0 * bytesRemaining / estimateThroughputBSF;\n\n // find maximum allowed quality that shouldn't lead to rebuffering\n var maxQualityAllowed = quality; // recall that quality > 0; if quality === 0 then we would have returned early\n if (estimateTimeRemainSeconds > bufferLevel) {\n --maxQualityAllowed;\n while (maxQualityAllowed > 0) {\n estimateOtherBytesTotal = bytesTotal * bolaState.bitrate[maxQualityAllowed] / bolaState.bitrate[quality];\n estimateTimeRemainSeconds = rttSeconds + 8 * estimateOtherBytesTotal / estimateThroughputBSF;\n if (estimateTimeRemainSeconds <= bufferLevel) {\n break;\n }\n --maxQualityAllowed;\n }\n }\n\n // If we abandon, there will be RTT time before we get first byte at lower quality.\n // By that time, the no-abandon option would have downloaded some more, and the buffer level would have depleted some more.\n // Introducing this RTT cushion also helps avoid extra abandonment, especially with close bitrates.\n\n var bufferAfterRtt = bufferLevel + bolaState.virtualBuffer - rttSeconds;\n\n // check if we should abandon using BOLA utility criteria\n var newQuality = quality;\n var score = (bolaState.utility[quality] + bolaState.gp - bufferAfterRtt / bolaState.Vp) / estimateBytesRemainingAfterRtt;\n\n for (var i = 0; i < quality; ++i) {\n estimateOtherBytesTotal = bytesTotal * bolaState.bitrate[i] / bolaState.bitrate[quality];\n if (estimateOtherBytesTotal > estimateBytesRemainingAfterRtt) {\n // abandoning to download at q such that i <= q < quality is not helpful\n break;\n }\n var s = (bolaState.utility[i] + bolaState.gp - bufferAfterRtt / bolaState.Vp) / estimateOtherBytesTotal;\n if (s > score) {\n newQuality = i;\n score = s;\n }\n }\n\n // compare with maximum allowed quality that shouldn't lead to rebuffering\n if (newQuality > maxQualityAllowed) {\n newQuality = maxQualityAllowed;\n }\n\n if (newQuality === quality) {\n // no change\n callback(switchRequest);\n return;\n }\n\n // Abandon, but to which quality? Abandoning should not happen often, and it's OK to be more conservative when it does.\n while (newQuality > 0 && bolaState.bitrate[newQuality] > estimateThroughputBSF) {\n --newQuality;\n }\n\n bolaState.lastQuality = newQuality;\n metricsModel.updateBolaState(mediaType, bolaState);\n\n rememberAbandon(mediaType, index, quality);\n switchRequest = (0, _SwitchRequestJs2['default'])(context).create(newQuality, _SwitchRequestJs2['default'].STRONG);\n if (_BolaRuleJs2['default'].BOLA_DEBUG) log('BolaDebug ' + mediaType + ' BolaAbandonRule abandon to ' + newQuality + ' - ' + diagnosticMessage);\n callback(switchRequest);\n }\n\n function reset() {\n abandonDict = {};\n }\n\n instance = {\n execute: execute,\n reset: reset\n };\n\n setup();\n\n return instance;\n}\n\nBolaAbandonRule.__dashjs_factory_name = 'BolaAbandonRule';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(BolaAbandonRule);\nmodule.exports = exports['default'];\n\n},{\"../../../core/Debug.js\":5,\"../../../core/FactoryMaker.js\":7,\"../../models/MediaPlayerModel.js\":64,\"../SwitchRequest.js\":70,\"./BolaRule.js\":74}],74:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2016, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n// For a description of the BOLA adaptive bitrate (ABR) algorithm, see http://arxiv.org/abs/1601.06748\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _SwitchRequestJs = _dereq_('../SwitchRequest.js');\n\nvar _SwitchRequestJs2 = _interopRequireDefault(_SwitchRequestJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _modelsMediaPlayerModelJs = _dereq_('../../models/MediaPlayerModel.js');\n\nvar _modelsMediaPlayerModelJs2 = _interopRequireDefault(_modelsMediaPlayerModelJs);\n\nvar _controllersPlaybackControllerJs = _dereq_('../../controllers/PlaybackController.js');\n\nvar _controllersPlaybackControllerJs2 = _interopRequireDefault(_controllersPlaybackControllerJs);\n\nvar _voMetricsHTTPRequestJs = _dereq_('../../vo/metrics/HTTPRequest.js');\n\nvar _voMetricsHTTPRequestJs2 = _interopRequireDefault(_voMetricsHTTPRequestJs);\n\nvar _dashDashAdapterJs = _dereq_('../../../dash/DashAdapter.js');\n\nvar _dashDashAdapterJs2 = _interopRequireDefault(_dashDashAdapterJs);\n\nvar _coreEventBusJs = _dereq_('../../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreDebugJs = _dereq_('../../../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\n// BOLA_STATE_ONE_BITRATE : If there is only one bitrate (or initialization failed), always return NO_CHANGE.\n// BOLA_STATE_STARTUP : Download fragments at most recently measured throughput.\n// BOLA_STATE_STARTUP_NO_INC: If quality increased then decreased during startup, then quality cannot be increased.\n// BOLA_STATE_STEADY : Buffer primed, we switch to steady operation.\n// TODO: add BOLA_STATE_SEEK and tune Bola behavior on seeking\nvar BOLA_STATE_ONE_BITRATE = 0;\nvar BOLA_STATE_STARTUP = 1;\nvar BOLA_STATE_STARTUP_NO_INC = 2;\nvar BOLA_STATE_STEADY = 3;\nvar BOLA_DEBUG = false; // TODO: remove\n\nfunction BolaRule(config) {\n\n // Bola needs some space between buffer levels.\n var MINIMUM_BUFFER_LEVEL_SPACING = 5.0;\n\n var AVERAGE_THROUGHPUT_SAMPLE_AMOUNT_LIVE = 2;\n var AVERAGE_THROUGHPUT_SAMPLE_AMOUNT_VOD = 3;\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n var dashMetrics = config.dashMetrics;\n var metricsModel = config.metricsModel;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var instance = undefined,\n lastCallTimeDict = undefined,\n seekMediaTypes = undefined,\n mediaPlayerModel = undefined,\n playbackController = undefined,\n adapter = undefined;\n\n function setup() {\n lastCallTimeDict = {};\n seekMediaTypes = [];\n mediaPlayerModel = (0, _modelsMediaPlayerModelJs2['default'])(context).getInstance();\n playbackController = (0, _controllersPlaybackControllerJs2['default'])(context).getInstance();\n adapter = (0, _dashDashAdapterJs2['default'])(context).getInstance();\n eventBus.on(_coreEventsEventsJs2['default'].PLAYBACK_SEEKING, onPlaybackSeeking, instance);\n eventBus.on(_coreEventsEventsJs2['default'].PERIOD_SWITCH_STARTED, onPeriodSwitchStarted, instance);\n }\n\n function calculateInitialState(rulesContext) {\n // TODO: analyze behavior of weird inputs and handle as gracefully as possible\n\n // TODO: currently based on 12 second buffer target, tweek to utilize a higher buffer target\n\n var initialState = {};\n\n var mediaInfo = rulesContext.getMediaInfo();\n\n var bitrate = mediaInfo.bitrateList.map(function (b) {\n return b.bandwidth;\n });\n var bitrateCount = bitrate.length;\n if (bitrateCount < 2 || bitrate[0] >= bitrate[1] || bitrate[bitrateCount - 2] >= bitrate[bitrateCount - 1]) {\n // if bitrate list irregular, stick to lowest bitrate\n // TODO: should we tolerate repeated bitrates?\n initialState.state = BOLA_STATE_ONE_BITRATE;\n return initialState;\n }\n\n var streamProcessor = rulesContext.getStreamProcessor();\n var streamInfo = rulesContext.getStreamInfo();\n var trackInfo = rulesContext.getTrackInfo();\n\n var isDynamic = streamProcessor.isDynamic();\n var duration = streamInfo.manifestInfo.duration;\n var fragmentDuration = trackInfo.fragmentDuration;\n\n var bufferTarget = undefined;\n var bufferMax = undefined;\n // Note: If isDynamic (live streaming) we keep the same target for cases where the user is playing behind live edge, but then make throughput-based decisions when the buffer level is low because of availability.\n bufferTarget = mediaPlayerModel.getStableBufferTime();\n if (duration >= mediaPlayerModel.getLongFormContentDurationThreshold()) {\n bufferMax = mediaPlayerModel.getBufferTimeAtTopQualityLongForm();\n } else {\n bufferMax = mediaPlayerModel.getBufferTimeAtTopQuality();\n }\n\n // During live streaming, there might not be enough fragments available to fill all the way to the buffer target. In such a case, Bola detects the lack of fragment availability and calculate a bitrate depending on what the buffer level would have been had more fragments been available. This is done by keeping an additional virtualBuffer level. Of course, in such a case Bola needs to also keep track of the real buffer to avoid rebuffering.\n\n // Bola needs some space between buffer levels. If bolaBufferTarget is set to a level higher than the real bufferTarget, the Schedule Controller will still not fill up the buffer up to bolaBufferTarget. However, Bola will detect the effect of the Schedule Controller and calculate a bitrate depending on what the buffer level would have been had the Schedule Controller filled more buffer. This is handled similar to the live streaming scenario using the additional virtualBuffer level.\n var bolaBufferTarget = bufferTarget;\n if (bolaBufferTarget < fragmentDuration + MINIMUM_BUFFER_LEVEL_SPACING) {\n\n bolaBufferTarget = fragmentDuration + MINIMUM_BUFFER_LEVEL_SPACING;\n }\n\n var utility = [];\n for (var i = 0; i < bitrateCount; ++i) {\n utility.push(Math.log(bitrate[i] / bitrate[0]));\n }\n\n // BOLA parameters V and gamma (multiplied by p === fragmentDuration):\n // Choose Vp and gp such that logarithmic utility would always prefer the lowest bitrate when bufferLevel === fragmentDuration and would always prefer the highest bitrate when bufferLevel === bufferTarget.\n // TODO: document the math\n var Vp = (bolaBufferTarget - fragmentDuration) / utility[bitrateCount - 1];\n var gp = 1.0 + utility[bitrateCount - 1] / (bolaBufferTarget / fragmentDuration - 1.0);\n\n // If the bufferTarget (the real bufferTarget and not bolaBufferTarget) is large enough, we might guarantee that Bola will never rebuffer unless the network bandwidth drops below the lowest encoded bitrate level. For this to work Bola needs to use the real buffer level without the additional virtualBuffer. Also, for this to work efficiently, we need to make sure that if the buffer level drops to one fragment during a download, the current download does not have more bits remaining than the size of one fragment at the lowest quality.\n var maxRtt = 0.2; // TODO: is this reasonable?\n var safetyGuarantee = !isDynamic && bolaBufferTarget === bufferTarget;\n if (safetyGuarantee) {\n // TODO: document the math\n // we might need to adjust Vp and gp\n var VpNew = Vp;\n var gpNew = gp;\n for (var i = 1; i < bitrateCount; ++i) {\n var threshold = VpNew * (gpNew - bitrate[0] * utility[i] / (bitrate[i] - bitrate[0]));\n var minThreshold = fragmentDuration * (2.0 - bitrate[0] / bitrate[i]) + maxRtt;\n if (minThreshold >= bufferTarget) {\n safetyGuarantee = false;\n break;\n }\n if (threshold < minThreshold) {\n VpNew *= (bufferTarget - minThreshold) / (bufferTarget - threshold);\n gpNew = minThreshold / VpNew + utility[i] * bitrate[0] / (bitrate[i] - bitrate[0]);\n }\n }\n if (safetyGuarantee && (bufferTarget - fragmentDuration) * VpNew / Vp < MINIMUM_BUFFER_LEVEL_SPACING) {\n safetyGuarantee = false;\n }\n if (safetyGuarantee) {\n Vp = VpNew;\n gp = gpNew;\n }\n }\n\n // When using the virtualBuffer, it must be capped.\n // TODO: document the math\n var bolaBufferMax = Vp * (utility[bitrateCount - 1] + gp);\n\n // Note: We either use the virtualBuffer or the safetyGuarantee, but not both.\n\n initialState.state = BOLA_STATE_STARTUP;\n\n initialState.bitrate = bitrate;\n initialState.utility = utility;\n initialState.Vp = Vp;\n initialState.gp = gp;\n\n initialState.fragmentDuration = fragmentDuration;\n initialState.bandwidthSafetyFactor = mediaPlayerModel.getBandwidthSafetyFactor();\n initialState.bufferTarget = bufferTarget;\n initialState.bufferMax = bufferMax;\n initialState.bolaBufferTarget = bolaBufferTarget;\n initialState.bolaBufferMax = bolaBufferMax;\n\n initialState.isDynamic = isDynamic;\n initialState.safetyGuarantee = safetyGuarantee;\n initialState.lastQuality = 0;\n initialState.virtualBuffer = 0.0;\n initialState.throughputCount = isDynamic ? AVERAGE_THROUGHPUT_SAMPLE_AMOUNT_LIVE : AVERAGE_THROUGHPUT_SAMPLE_AMOUNT_VOD;\n\n if (BOLA_DEBUG) {\n var info = '';\n for (var i = 0; i < bitrate.length - 1; ++i) {\n var ui = utility[i];\n var ui1 = utility[i + 1];\n var ri = bitrate[i];\n var ri1 = bitrate[i + 1];\n var th = Vp * ((ui * ri1 - ui1 * ri) / (ri1 - ri) + gp);\n var z = Vp * (ui + gp);\n info += i + ':' + (bitrate[i] / 1000000).toFixed(3) + ' ' + th.toFixed(3) + '/' + z.toFixed(3) + ' ';\n }\n info += ' ' + (bitrate.length - 1) + ':' + (bitrate[bitrate.length - 1] / 1000000).toFixed(3) + ' -/' + (Vp * (utility[bitrate.length - 1] + gp)).toFixed(3);\n log('BolaDebug ' + mediaInfo.type + ' bitrates ' + info);\n }\n\n return initialState;\n }\n\n function getQualityFromBufferLevel(bolaState, bufferLevel) {\n var bitrateCount = bolaState.bitrate.length;\n var quality = bitrateCount - 1;\n var score = 0.0;\n for (var i = 0; i < bitrateCount; ++i) {\n var s = (bolaState.utility[i] + bolaState.gp - bufferLevel / bolaState.Vp) / bolaState.bitrate[i];\n if (s > score) {\n score = s;\n quality = i;\n }\n }\n return quality;\n }\n\n function getLastHttpRequests(metrics, count) {\n var allHttpRequests = dashMetrics.getHttpRequests(metrics);\n var httpRequests = [];\n for (var i = allHttpRequests.length - 1; i >= 0; --i) {\n var request = allHttpRequests[i];\n if (request.type === _voMetricsHTTPRequestJs2['default'].MEDIA_SEGMENT_TYPE && request._tfinish && request.tresponse && request.trace) {\n httpRequests.push(request);\n if (httpRequests.length === count) {\n break;\n }\n }\n }\n return httpRequests;\n }\n\n function getLastThroughput(metrics, count, mediaType) {\n // TODO: mediaType only used for debugging, remove it\n // TODO: Should we replace this with an average of the last few throughputs?\n var lastRequests = getLastHttpRequests(metrics, count);\n if (lastRequests.length === 0) {\n return 0.0;\n }\n\n var totalInverse = 0.0;\n var msg = '';\n for (var i = 0; i < lastRequests.length; ++i) {\n // The RTT delay results in a lower throughput. We can avoid this delay in the calculation, but we do not want to.\n var downloadSeconds = 0.001 * (lastRequests[i]._tfinish.getTime() - lastRequests[i].trequest.getTime());\n var downloadBits = 8 * lastRequests[i].trace.reduce(function (a, b) {\n return a + b.b[0];\n }, 0);\n msg += ' ' + (downloadBits / 1000000).toFixed(3) + '/' + downloadSeconds.toFixed(3) + '=' + (downloadBits / downloadSeconds / 1000000).toFixed(3);\n totalInverse += downloadSeconds / downloadBits;\n }\n\n if (BOLA_DEBUG) log('BolaDebug ' + mediaType + ' BolaRule last throughput = ' + (lastRequests.length / totalInverse / 1000000).toFixed(3) + ' :' + msg);\n\n return lastRequests.length / totalInverse;\n }\n\n function getQualityFromThroughput(bolaState, throughput) {\n // do not factor in bandwidthSafetyFactor here - it is factored at point of call\n\n var q = 0;\n for (var i = 1; i < bolaState.bitrate.length; ++i) {\n if (bolaState.bitrate[i] > throughput) {\n break;\n }\n q = i;\n }\n return q;\n }\n\n function getDelayFromLastFragmentInSeconds(metrics, mediaType) {\n var lastRequests = getLastHttpRequests(metrics, 1);\n if (lastRequests.length === 0) {\n return 0.0;\n }\n var lastRequest = lastRequests[0];\n var nowMilliSeconds = new Date().getTime();\n var lastRequestFinishMilliSeconds = lastRequest._tfinish.getTime();\n\n if (lastRequestFinishMilliSeconds > nowMilliSeconds) {\n // this shouldn't happen, try to handle gracefully\n lastRequestFinishMilliSeconds = nowMilliSeconds;\n }\n\n var lct = lastCallTimeDict[mediaType];\n lastCallTimeDict[mediaType] = nowMilliSeconds;\n var delayMilliSeconds = 0.0;\n if (lct && lct > lastRequestFinishMilliSeconds) {\n delayMilliSeconds = nowMilliSeconds - lct;\n } else {\n delayMilliSeconds = nowMilliSeconds - lastRequestFinishMilliSeconds;\n }\n\n if (delayMilliSeconds < 0.0) return 0.0;\n return 0.001 * delayMilliSeconds;\n }\n\n function onPlaybackSeeking() {\n // TODO: Verify what happens if we seek mid-fragment.\n // TODO: If we have 10s fragments and seek, we would like to download the first fragment at a lower quality to restart playback quickly.\n for (var i = 0; i < seekMediaTypes.length; ++i) {\n var mediaType = seekMediaTypes[i];\n var metrics = metricsModel.getReadOnlyMetricsFor(mediaType);\n if (metrics.BolaState.length !== 0) {\n var bolaState = metrics.BolaState[0]._s;\n if (bolaState.state !== BOLA_STATE_ONE_BITRATE) {\n bolaState.state = BOLA_STATE_STARTUP;\n }\n metricsModel.updateBolaState(mediaType, bolaState);\n }\n }\n }\n\n function onPeriodSwitchStarted() {\n // TODO\n }\n\n function execute(rulesContext, callback) {\n var streamProcessor = rulesContext.getStreamProcessor();\n streamProcessor.getScheduleController().setTimeToLoadDelay(0.0);\n\n var switchRequest = (0, _SwitchRequestJs2['default'])(context).create(_SwitchRequestJs2['default'].NO_CHANGE, _SwitchRequestJs2['default'].WEAK);\n\n var mediaInfo = rulesContext.getMediaInfo();\n var mediaType = mediaInfo.type;\n var metrics = metricsModel.getReadOnlyMetricsFor(mediaType);\n\n if (metrics.BolaState.length === 0) {\n // initialization\n\n if (BOLA_DEBUG) log('BolaDebug ' + mediaType + '\\nBolaDebug ' + mediaType + ' BolaRule for state=- fragmentStart=' + adapter.getIndexHandlerTime(rulesContext.getStreamProcessor()).toFixed(3));\n\n var initState = calculateInitialState(rulesContext);\n metricsModel.updateBolaState(mediaType, initState);\n\n var q = 0;\n if (initState.state !== BOLA_STATE_ONE_BITRATE) {\n // initState.state === BOLA_STATE_STARTUP\n\n seekMediaTypes.push(mediaType);\n\n // Bola is not invoked by dash.js to determine the bitrate quality for the first fragment. We might estimate the throughput level here, but the metric related to the HTTP request for the first fragment is usually not available.\n // TODO: at some point, we may want to consider a tweak that redownloads the first fragment at a higher quality\n\n var initThroughput = getLastThroughput(metrics, initState.throughputCount, mediaType);\n if (initThroughput === 0.0) {\n // We don't have information about any download yet - let someone else decide quality.\n if (BOLA_DEBUG) log('BolaDebug ' + mediaType + ' BolaRule quality unchanged for INITIALIZE');\n callback(switchRequest);\n return;\n }\n q = getQualityFromThroughput(initState, initThroughput * initState.bandwidthSafetyFactor);\n initState.lastQuality = q;\n switchRequest = (0, _SwitchRequestJs2['default'])(context).create(q, _SwitchRequestJs2['default'].DEFAULT);\n }\n\n if (BOLA_DEBUG) log('BolaDebug ' + mediaType + ' BolaRule quality ' + q + ' for INITIALIZE');\n callback(switchRequest);\n return;\n }\n\n // metrics.BolaState.length > 0\n var bolaState = metrics.BolaState[0]._s;\n // TODO: does changing bolaState conform to coding style, or should we clone?\n\n if (bolaState.state === BOLA_STATE_ONE_BITRATE) {\n if (BOLA_DEBUG) log('BolaDebug ' + mediaType + ' BolaRule quality 0 for ONE_BITRATE');\n callback(switchRequest);\n return;\n }\n\n if (BOLA_DEBUG) log('BolaDebug ' + mediaType + '\\nBolaDebug ' + mediaType + ' EXECUTE BolaRule for state=' + bolaState.state + ' fragmentStart=' + adapter.getIndexHandlerTime(rulesContext.getStreamProcessor()).toFixed(3));\n\n var bufferLevel = dashMetrics.getCurrentBufferLevel(metrics) ? dashMetrics.getCurrentBufferLevel(metrics) : 0.0;\n var bolaQuality = getQualityFromBufferLevel(bolaState, bufferLevel);\n var lastThroughput = getLastThroughput(metrics, bolaState.throughputCount, mediaType);\n\n if (BOLA_DEBUG) log('BolaDebug ' + mediaType + ' BolaRule bufferLevel=' + bufferLevel.toFixed(3) + '(+' + bolaState.virtualBuffer.toFixed(3) + ') lastThroughput=' + (lastThroughput / 1000000.0).toFixed(3) + ' tentativeQuality=' + bolaQuality + ',' + getQualityFromBufferLevel(bolaState, bufferLevel + bolaState.virtualBuffer));\n\n if (bufferLevel <= 0.1) {\n // rebuffering occurred, reset virtual buffer\n bolaState.virtualBuffer = 0.0;\n }\n\n if (!bolaState.safetyGuarantee) {\n // we can use virtualBuffer\n // find out if there was delay because of lack of availability or because bolaBufferTarget > bufferTarget\n var timeSinceLastDownload = getDelayFromLastFragmentInSeconds(metrics, mediaType);\n if (timeSinceLastDownload > 0.0) {\n // TODO: maybe we should set some positive threshold here\n bolaState.virtualBuffer += timeSinceLastDownload;\n }\n if (bufferLevel + bolaState.virtualBuffer > bolaState.bolaBufferMax) {\n bolaState.virtualBuffer = bolaState.bolaBufferMax - bufferLevel;\n }\n if (bolaState.virtualBuffer < 0.0) {\n bolaState.virtualBuffer = 0.0;\n }\n\n // update bolaQuality using virtualBuffer: bufferLevel might be artificially low because of lack of availability\n\n var bolaQualityVirtual = getQualityFromBufferLevel(bolaState, bufferLevel + bolaState.virtualBuffer);\n if (bolaQualityVirtual > bolaQuality) {\n // May use quality higher than that indicated by real buffer level.\n\n // In this case, make sure there is enough throughput to download a fragment before real buffer runs out.\n\n var maxQuality = bolaQuality;\n while (maxQuality < bolaQualityVirtual && bolaState.bitrate[maxQuality + 1] * bolaState.fragmentDuration / (lastThroughput * bolaState.bandwidthSafetyFactor) < bufferLevel) {\n ++maxQuality;\n }\n\n // TODO: maybe we can use a more conservative level here, but this should be OK\n\n if (maxQuality > bolaQuality) {\n // We can (and will) download at a quality higher than that indicated by real buffer level.\n if (bolaQualityVirtual <= maxQuality) {\n // we can download fragment indicated by real+virtual buffer without rebuffering\n bolaQuality = bolaQualityVirtual;\n } else {\n // downloading fragment indicated by real+virtual rebuffers, use lower quality\n bolaQuality = maxQuality;\n // deflate virtual buffer to match quality\n // TODO: document the math\n var targetBufferLevel = bolaState.Vp * (bolaState.gp + bolaState.utility[bolaQuality]);\n if (bufferLevel + bolaState.virtualBuffer > targetBufferLevel) {\n bolaState.virtualBuffer = targetBufferLevel - bufferLevel;\n if (bolaState.virtualBuffer < 0.0) {\n // should be false\n bolaState.virtualBuffer = 0.0;\n }\n }\n }\n }\n }\n } // !bolaState.safetyGuarantee: we can use virtualBuffer\n\n if (bolaState.state === BOLA_STATE_STARTUP || bolaState.state === BOLA_STATE_STARTUP_NO_INC) {\n // in startup phase, use some throughput estimation\n\n var q = getQualityFromThroughput(bolaState, lastThroughput * bolaState.bandwidthSafetyFactor);\n\n if (lastThroughput <= 0.0) {\n // something went wrong - go to steady state\n bolaState.state = BOLA_STATE_STEADY;\n }\n if (bolaState.state === BOLA_STATE_STARTUP && q < bolaState.lastQuality) {\n // Since the quality is decreasing during startup, it will not be allowed to increase again.\n bolaState.state = BOLA_STATE_STARTUP_NO_INC;\n }\n if (bolaState.state === BOLA_STATE_STARTUP_NO_INC && q > bolaState.lastQuality) {\n // In this state the quality is not allowed to increase until steady state.\n q = bolaState.lastQuality;\n }\n if (q <= bolaQuality) {\n // Since the buffer is full enough for steady state operation to match startup operation, switch over to steady state.\n bolaState.state = BOLA_STATE_STEADY;\n }\n if (bolaState.state !== BOLA_STATE_STEADY) {\n // still in startup mode\n if (BOLA_DEBUG) log('BolaDebug ' + mediaType + ' BolaRule quality ' + q + '>' + bolaQuality + ' for STARTUP');\n bolaState.lastQuality = q;\n metricsModel.updateBolaState(mediaType, bolaState);\n switchRequest = (0, _SwitchRequestJs2['default'])(context).create(q, _SwitchRequestJs2['default'].DEFAULT);\n callback(switchRequest);\n return;\n }\n }\n\n // steady state\n\n // we want to avoid oscillations\n // We implement the \"BOLA-O\" variant: when network bandwidth lies between two encoded bitrate levels, stick to the lowest level.\n var delaySeconds = 0.0;\n if (bolaQuality > bolaState.lastQuality) {\n // do not multiply throughput by bandwidthSafetyFactor here: we are not using throughput estimation but capping bitrate to avoid oscillations\n var q = getQualityFromThroughput(bolaState, lastThroughput);\n if (bolaQuality > q) {\n // only intervene if we are trying to *increase* quality to an *unsustainable* level\n\n if (q < bolaState.lastQuality) {\n // we are only avoid oscillations - do not drop below last quality\n q = bolaState.lastQuality;\n } else {\n // We are dropping to an encoded bitrate which is a little less than the network bandwidth because bitrate levels are discrete. Quality q might lead to buffer inflation, so we deflate buffer to the level that q gives postive utility.\n var wantBufferLevel = bolaState.Vp * (bolaState.utility[q] + bolaState.gp);\n delaySeconds = bufferLevel - wantBufferLevel;\n }\n bolaQuality = q;\n }\n }\n\n if (delaySeconds > 0.0) {\n // first reduce virtual buffer\n if (delaySeconds > bolaState.virtualBuffer) {\n delaySeconds -= bolaState.virtualBuffer;\n bolaState.virtualBuffer = 0.0;\n } else {\n bolaState.virtualBuffer -= delaySeconds;\n delaySeconds = 0.0;\n }\n }\n if (delaySeconds > 0.0) {\n streamProcessor.getScheduleController().setTimeToLoadDelay(1000.0 * delaySeconds);\n }\n\n bolaState.lastQuality = bolaQuality;\n metricsModel.updateBolaState(mediaType, bolaState);\n switchRequest = (0, _SwitchRequestJs2['default'])(context).create(bolaQuality, _SwitchRequestJs2['default'].DEFAULT);\n if (BOLA_DEBUG) log('BolaDebug ' + mediaType + ' BolaRule quality ' + bolaQuality + ' delay=' + delaySeconds.toFixed(3) + ' for STEADY');\n callback(switchRequest);\n }\n\n function reset() {\n eventBus.off(_coreEventsEventsJs2['default'].PLAYBACK_SEEKING, onPlaybackSeeking, instance);\n eventBus.off(_coreEventsEventsJs2['default'].PERIOD_SWITCH_STARTED, onPeriodSwitchStarted, instance);\n setup();\n }\n\n instance = {\n execute: execute,\n reset: reset\n };\n\n setup();\n return instance;\n}\n\nBolaRule.__dashjs_factory_name = 'BolaRule';\nvar factory = _coreFactoryMakerJs2['default'].getClassFactory(BolaRule);\nfactory.BOLA_STATE_ONE_BITRATE = BOLA_STATE_ONE_BITRATE;\nfactory.BOLA_STATE_STARTUP = BOLA_STATE_STARTUP;\nfactory.BOLA_STATE_STARTUP_NO_INC = BOLA_STATE_STARTUP_NO_INC;\nfactory.BOLA_STATE_STEADY = BOLA_STATE_STEADY;\nfactory.BOLA_DEBUG = BOLA_DEBUG; // TODO: remove\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../../../core/Debug.js\":5,\"../../../core/EventBus.js\":6,\"../../../core/FactoryMaker.js\":7,\"../../../core/events/Events.js\":9,\"../../../dash/DashAdapter.js\":11,\"../../controllers/PlaybackController.js\":54,\"../../models/MediaPlayerModel.js\":64,\"../../vo/metrics/HTTPRequest.js\":117,\"../SwitchRequest.js\":70}],75:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _SwitchRequestJs = _dereq_('../SwitchRequest.js');\n\nvar _SwitchRequestJs2 = _interopRequireDefault(_SwitchRequestJs);\n\nvar _modelsMediaPlayerModelJs = _dereq_('../../models/MediaPlayerModel.js');\n\nvar _modelsMediaPlayerModelJs2 = _interopRequireDefault(_modelsMediaPlayerModelJs);\n\nvar _controllersAbrControllerJs = _dereq_('../../controllers/AbrController.js');\n\nvar _controllersAbrControllerJs2 = _interopRequireDefault(_controllersAbrControllerJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreDebugJs = _dereq_('../../../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nfunction BufferOccupancyRule(config) {\n\n var instance = undefined;\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n\n var metricsModel = config.metricsModel;\n var dashMetrics = config.dashMetrics;\n\n var lastSwitchTime = undefined,\n mediaPlayerModel = undefined;\n\n function setup() {\n lastSwitchTime = 0;\n mediaPlayerModel = (0, _modelsMediaPlayerModelJs2['default'])(context).getInstance();\n }\n\n function execute(rulesContext, callback) {\n var now = new Date().getTime() / 1000;\n var mediaInfo = rulesContext.getMediaInfo();\n var representationInfo = rulesContext.getTrackInfo();\n var mediaType = mediaInfo.type;\n var waitToSwitchTime = !isNaN(representationInfo.fragmentDuration) ? representationInfo.fragmentDuration / 2 : 2;\n var current = rulesContext.getCurrentValue();\n var streamProcessor = rulesContext.getStreamProcessor();\n var abrController = streamProcessor.getABRController();\n var metrics = metricsModel.getReadOnlyMetricsFor(mediaType);\n var lastBufferLevel = dashMetrics.getCurrentBufferLevel(metrics);\n var lastBufferStateVO = metrics.BufferState.length > 0 ? metrics.BufferState[metrics.BufferState.length - 1] : null;\n var isBufferRich = false;\n var maxIndex = mediaInfo.representationCount - 1;\n var switchRequest = (0, _SwitchRequestJs2['default'])(context).create(_SwitchRequestJs2['default'].NO_CHANGE, _SwitchRequestJs2['default'].WEAK);\n\n if (now - lastSwitchTime < waitToSwitchTime || abrController.getAbandonmentStateFor(mediaType) === _controllersAbrControllerJs2['default'].ABANDON_LOAD) {\n callback(switchRequest);\n return;\n }\n\n if (lastBufferStateVO !== null) {\n // This will happen when another rule tries to switch from top to any other.\n // If there is enough buffer why not try to stay at high level.\n if (lastBufferLevel > lastBufferStateVO.target) {\n isBufferRich = lastBufferLevel - lastBufferStateVO.target > mediaPlayerModel.getRichBufferThreshold();\n\n if (isBufferRich && mediaInfo.representationCount > 1) {\n switchRequest = (0, _SwitchRequestJs2['default'])(context).create(maxIndex, _SwitchRequestJs2['default'].STRONG);\n }\n }\n }\n\n if (switchRequest.value !== _SwitchRequestJs2['default'].NO_CHANGE && switchRequest.value !== current) {\n log('BufferOccupancyRule requesting switch to index: ', switchRequest.value, 'type: ', mediaType, ' Priority: ', switchRequest.priority === _SwitchRequestJs2['default'].DEFAULT ? 'Default' : switchRequest.priority === _SwitchRequestJs2['default'].STRONG ? 'Strong' : 'Weak');\n }\n\n callback(switchRequest);\n }\n\n function reset() {\n lastSwitchTime = 0;\n }\n\n instance = {\n execute: execute,\n reset: reset\n };\n\n setup();\n\n return instance;\n}\n\nBufferOccupancyRule.__dashjs_factory_name = 'BufferOccupancyRule';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(BufferOccupancyRule);\nmodule.exports = exports['default'];\n\n},{\"../../../core/Debug.js\":5,\"../../../core/FactoryMaker.js\":7,\"../../controllers/AbrController.js\":46,\"../../models/MediaPlayerModel.js\":64,\"../SwitchRequest.js\":70}],76:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _SwitchRequestJs = _dereq_('../SwitchRequest.js');\n\nvar _SwitchRequestJs2 = _interopRequireDefault(_SwitchRequestJs);\n\nvar _controllersBufferControllerJs = _dereq_('../../controllers/BufferController.js');\n\nvar _controllersBufferControllerJs2 = _interopRequireDefault(_controllersBufferControllerJs);\n\nvar _coreEventBusJs = _dereq_('../../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreDebugJs = _dereq_('../../../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nfunction InsufficientBufferRule(config) {\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var metricsModel = config.metricsModel;\n\n var instance = undefined,\n bufferStateDict = undefined,\n lastSwitchTime = undefined,\n waitToSwitchTime = undefined;\n\n function setup() {\n bufferStateDict = {};\n lastSwitchTime = 0;\n waitToSwitchTime = 1000;\n eventBus.on(_coreEventsEventsJs2['default'].PLAYBACK_SEEKING, onPlaybackSeeking, instance);\n }\n\n function execute(rulesContext, callback) {\n var now = new Date().getTime();\n var mediaType = rulesContext.getMediaInfo().type;\n var current = rulesContext.getCurrentValue();\n var metrics = metricsModel.getReadOnlyMetricsFor(mediaType);\n var lastBufferStateVO = metrics.BufferState.length > 0 ? metrics.BufferState[metrics.BufferState.length - 1] : null;\n var switchRequest = (0, _SwitchRequestJs2['default'])(context).create(_SwitchRequestJs2['default'].NO_CHANGE, _SwitchRequestJs2['default'].WEAK);\n\n if (now - lastSwitchTime < waitToSwitchTime || lastBufferStateVO === null) {\n callback(switchRequest);\n return;\n }\n\n setBufferInfo(mediaType, lastBufferStateVO.state);\n // After the sessions first buffer loaded event , if we ever have a buffer empty event we want to switch all the way down.\n if (lastBufferStateVO.state === _controllersBufferControllerJs2['default'].BUFFER_EMPTY && bufferStateDict[mediaType].firstBufferLoadedEvent !== undefined) {\n switchRequest = (0, _SwitchRequestJs2['default'])(context).create(0, _SwitchRequestJs2['default'].STRONG);\n }\n\n if (switchRequest.value !== _SwitchRequestJs2['default'].NO_CHANGE && switchRequest.value !== current) {\n log('InsufficientBufferRule requesting switch to index: ', switchRequest.value, 'type: ', mediaType, ' Priority: ', switchRequest.priority === _SwitchRequestJs2['default'].DEFAULT ? 'Default' : switchRequest.priority === _SwitchRequestJs2['default'].STRONG ? 'Strong' : 'Weak');\n }\n\n lastSwitchTime = now;\n callback(switchRequest);\n }\n\n function setBufferInfo(type, state) {\n bufferStateDict[type] = bufferStateDict[type] || {};\n bufferStateDict[type].state = state;\n if (state === _controllersBufferControllerJs2['default'].BUFFER_LOADED && !bufferStateDict[type].firstBufferLoadedEvent) {\n bufferStateDict[type].firstBufferLoadedEvent = true;\n }\n }\n\n function onPlaybackSeeking() {\n bufferStateDict = {};\n }\n\n function reset() {\n eventBus.off(_coreEventsEventsJs2['default'].PLAYBACK_SEEKING, onPlaybackSeeking, instance);\n bufferStateDict = {};\n lastSwitchTime = 0;\n }\n\n instance = {\n execute: execute,\n reset: reset\n };\n\n setup();\n\n return instance;\n}\n\nInsufficientBufferRule.__dashjs_factory_name = 'InsufficientBufferRule';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(InsufficientBufferRule);\nmodule.exports = exports['default'];\n\n},{\"../../../core/Debug.js\":5,\"../../../core/EventBus.js\":6,\"../../../core/FactoryMaker.js\":7,\"../../../core/events/Events.js\":9,\"../../controllers/BufferController.js\":49,\"../SwitchRequest.js\":70}],77:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _SwitchRequestJs = _dereq_('../SwitchRequest.js');\n\nvar _SwitchRequestJs2 = _interopRequireDefault(_SwitchRequestJs);\n\nvar _controllersBufferControllerJs = _dereq_('../../controllers/BufferController.js');\n\nvar _controllersBufferControllerJs2 = _interopRequireDefault(_controllersBufferControllerJs);\n\nvar _controllersAbrControllerJs = _dereq_('../../controllers/AbrController.js');\n\nvar _controllersAbrControllerJs2 = _interopRequireDefault(_controllersAbrControllerJs);\n\nvar _modelsMediaPlayerModelJs = _dereq_('../../models/MediaPlayerModel.js');\n\nvar _modelsMediaPlayerModelJs2 = _interopRequireDefault(_modelsMediaPlayerModelJs);\n\nvar _voMetricsHTTPRequestJs = _dereq_('../../vo/metrics/HTTPRequest.js');\n\nvar _voMetricsHTTPRequestJs2 = _interopRequireDefault(_voMetricsHTTPRequestJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreDebugJs = _dereq_('../../../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nfunction ThroughputRule(config) {\n\n var AVERAGE_THROUGHPUT_SAMPLE_AMOUNT_LIVE = 2;\n var AVERAGE_THROUGHPUT_SAMPLE_AMOUNT_VOD = 3;\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n var dashMetrics = config.dashMetrics;\n var metricsModel = config.metricsModel;\n var isWebOS = !!window.PalmSystem;\n\n var instance = undefined,\n throughputArray = undefined,\n videoLimit = undefined,\n mediaPlayerModel = undefined;\n\n function setup() {\n throughputArray = [];\n mediaPlayerModel = (0, _modelsMediaPlayerModelJs2['default'])(context).getInstance();\n if (isWebOS) {\n var devInfo = JSON.parse(window.PalmSystem.deviceInfo);\n if (devInfo.screenWidth < 1920) {\n videoLimit = { width: 1280, height: 720 };\n } else if (devInfo.screenWidth < 3840) {\n videoLimit = { width: 1920, height: 1080 };\n } else {\n videoLimit = { width: 3840, height: 2160 };\n }\n }\n }\n\n function storeLastRequestThroughputByType(type, lastRequestThroughput) {\n throughputArray[type] = throughputArray[type] || [];\n if (lastRequestThroughput !== Infinity && lastRequestThroughput !== throughputArray[type][throughputArray[type].length - 1]) {\n throughputArray[type].push(lastRequestThroughput);\n }\n }\n\n function getAverageThroughput(type, isDynamic) {\n var averageThroughput = 0;\n var sampleAmount = isDynamic ? AVERAGE_THROUGHPUT_SAMPLE_AMOUNT_LIVE : AVERAGE_THROUGHPUT_SAMPLE_AMOUNT_VOD;\n var arr = throughputArray[type];\n var len = arr.length;\n\n sampleAmount = len < sampleAmount ? len : sampleAmount;\n\n if (len > 0) {\n var startValue = len - sampleAmount;\n var totalSampledValue = 0;\n\n for (var i = startValue; i < len; i++) {\n totalSampledValue += arr[i];\n }\n averageThroughput = totalSampledValue / sampleAmount;\n }\n\n if (arr.length > sampleAmount) {\n arr.shift();\n }\n\n return averageThroughput / 1000 * mediaPlayerModel.getBandwidthSafetyFactor();\n }\n\n function execute(rulesContext, callback) {\n var downloadTime;\n var bytes;\n var averageThroughput;\n var lastRequestThroughput;\n\n var mediaInfo = rulesContext.getMediaInfo();\n var mediaType = mediaInfo.type;\n var current = rulesContext.getCurrentValue();\n var metrics = metricsModel.getReadOnlyMetricsFor(mediaType);\n var streamProcessor = rulesContext.getStreamProcessor();\n var abrController = streamProcessor.getABRController();\n var isDynamic = streamProcessor.isDynamic();\n var lastRequest = dashMetrics.getCurrentHttpRequest(metrics);\n var bufferStateVO = metrics.BufferState.length > 0 ? metrics.BufferState[metrics.BufferState.length - 1] : null;\n var bufferLevelVO = metrics.BufferLevel.length > 0 ? metrics.BufferLevel[metrics.BufferLevel.length - 1] : null;\n var switchRequest = (0, _SwitchRequestJs2['default'])(context).create(_SwitchRequestJs2['default'].NO_CHANGE, _SwitchRequestJs2['default'].WEAK);\n\n if (!metrics || !lastRequest || lastRequest.type !== _voMetricsHTTPRequestJs2['default'].MEDIA_SEGMENT_TYPE || !bufferStateVO || !bufferLevelVO) {\n\n callback(switchRequest);\n return;\n }\n\n if (lastRequest.trace && lastRequest.trace.length) {\n downloadTime = (lastRequest._tfinish.getTime() - lastRequest.tresponse.getTime()) / 1000;\n\n bytes = lastRequest.trace.reduce(function (a, b) {\n return a + b.b[0];\n }, 0);\n\n lastRequestThroughput = Math.round(bytes * 8) / downloadTime;\n storeLastRequestThroughputByType(mediaType, lastRequestThroughput);\n }\n\n averageThroughput = Math.round(getAverageThroughput(mediaType, isDynamic));\n abrController.setAverageThroughput(mediaType, averageThroughput);\n\n if (abrController.getAbandonmentStateFor(mediaType) !== _controllersAbrControllerJs2['default'].ABANDON_LOAD) {\n\n if (bufferStateVO.state === _controllersBufferControllerJs2['default'].BUFFER_LOADED || isDynamic) {\n var newQuality = abrController.getQualityForBitrate(mediaInfo, averageThroughput);\n if (mediaType === 'video' && isWebOS) {\n var bitrateList = abrController.getBitrateList(mediaInfo);\n while (newQuality && (bitrateList[newQuality].height > videoLimit.height || bitrateList[newQuality].width > videoLimit.width)) {\n newQuality--;\n }\n }\n streamProcessor.getScheduleController().setTimeToLoadDelay(0); // TODO Watch out for seek event - no delay when seeking.!!\n switchRequest = (0, _SwitchRequestJs2['default'])(context).create(newQuality, _SwitchRequestJs2['default'].DEFAULT);\n }\n\n if (switchRequest.value !== _SwitchRequestJs2['default'].NO_CHANGE && switchRequest.value !== current) {\n log('ThroughputRule requesting switch to index: ', switchRequest.value, 'type: ', mediaType, ' Priority: ', switchRequest.priority === _SwitchRequestJs2['default'].DEFAULT ? 'Default' : switchRequest.priority === _SwitchRequestJs2['default'].STRONG ? 'Strong' : 'Weak', 'Average throughput', Math.round(averageThroughput), 'kbps');\n }\n }\n\n callback(switchRequest);\n }\n\n function reset() {\n setup();\n }\n\n instance = {\n execute: execute,\n reset: reset\n };\n\n setup();\n return instance;\n}\n\nThroughputRule.__dashjs_factory_name = 'ThroughputRule';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(ThroughputRule);\nmodule.exports = exports['default'];\n\n},{\"../../../core/Debug.js\":5,\"../../../core/FactoryMaker.js\":7,\"../../controllers/AbrController.js\":46,\"../../controllers/BufferController.js\":49,\"../../models/MediaPlayerModel.js\":64,\"../../vo/metrics/HTTPRequest.js\":117,\"../SwitchRequest.js\":70}],78:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction BasicSelector(config) {\n\n var instance = undefined;\n\n var blacklistController = config.blacklistController;\n\n function select(baseUrls) {\n var index = 0;\n var selectedBaseUrl;\n\n if (baseUrls && baseUrls.some(function (baseUrl, idx) {\n index = idx;\n\n return !blacklistController.contains(baseUrl.serviceLocation);\n })) {\n selectedBaseUrl = baseUrls[index];\n }\n\n return selectedBaseUrl;\n }\n\n instance = {\n select: select\n };\n\n return instance;\n}\n\nBasicSelector.__dashjs_factory_name = 'BasicSelector';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(BasicSelector);\nmodule.exports = exports['default'];\n\n},{\"../../../core/FactoryMaker.js\":7}],79:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction DVBSelector(config) {\n\n var instance = undefined;\n\n var blacklistController = config.blacklistController;\n\n function getNonBlacklistedBaseUrls(urls) {\n var removedPriorities = [];\n\n var samePrioritiesFilter = function samePrioritiesFilter(el) {\n if (removedPriorities.length) {\n if (el.dvb_priority && removedPriorities.indexOf(el.dvb_priority) !== -1) {\n return false;\n }\n }\n\n return true;\n };\n\n var serviceLocationFilter = function serviceLocationFilter(baseUrl) {\n if (blacklistController.contains(baseUrl.serviceLocation)) {\n // whenever a BaseURL is removed from the available list of\n // BaseURLs, any other BaseURL with the same @priority\n // value as the BaseURL being removed shall also be removed\n if (baseUrl.dvb_priority) {\n removedPriorities.push(baseUrl.dvb_priority);\n }\n\n // all URLs in the list which have a @serviceLocation\n // attribute matching an entry in the blacklist shall be\n // removed from the available list of BaseURLs\n return false;\n }\n\n return true;\n };\n\n return urls.filter(serviceLocationFilter).filter(samePrioritiesFilter);\n }\n\n function selectByWeight(availableUrls) {\n var prioritySorter = function prioritySorter(a, b) {\n var diff = a.dvb_priority - b.dvb_priority;\n return isNaN(diff) ? 0 : diff;\n };\n\n var topPriorityFilter = function topPriorityFilter(baseUrl, idx, arr) {\n return !idx || arr[0].dvb_priority && baseUrl.dvb_priority && arr[0].dvb_priority === baseUrl.dvb_priority;\n };\n\n var totalWeight = 0;\n var cumulWeights = [];\n var idx = 0;\n var rn;\n var urls;\n\n // It shall begin by taking the set of resolved BaseURLs present or inherited at the current\n // position in the MPD, resolved and filtered as described in 10.8.2.1, that have the lowest\n // @priority attribute value.\n urls = availableUrls.sort(prioritySorter).filter(topPriorityFilter);\n\n if (urls.length) {\n if (urls.length > 1) {\n // If there is more than one BaseURL with this lowest @priority attribute value then the Player\n // shall select one of them at random such that the probability of each BaseURL being chosen\n // is proportional to the value of its @weight attribute. The method described in RFC 2782\n // [26] or picking from a number of weighted entries is suitable for this, but there may be other\n // algorithms which achieve the same effect.\n\n // add all the weights together, storing the accumulated weight per entry\n urls.forEach(function (baseUrl) {\n totalWeight += baseUrl.dvb_weight;\n cumulWeights.push(totalWeight);\n });\n\n // pick a random number between zero and totalWeight\n rn = Math.floor(Math.random() * (totalWeight - 1));\n\n // select the index for the range rn falls within\n cumulWeights.every(function (limit, index) {\n idx = index;\n\n if (rn < limit) {\n return false;\n }\n\n return true;\n });\n }\n\n return urls[idx];\n }\n }\n\n function select(baseUrls) {\n return baseUrls && selectByWeight(getNonBlacklistedBaseUrls(baseUrls));\n }\n\n instance = {\n select: select\n };\n\n return instance;\n}\n\nDVBSelector.__dashjs_factory_name = 'DVBSelector';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(DVBSelector);\nmodule.exports = exports['default'];\n\n},{\"../../../core/FactoryMaker.js\":7}],80:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _modelsMediaPlayerModelJs = _dereq_('../../models/MediaPlayerModel.js');\n\nvar _modelsMediaPlayerModelJs2 = _interopRequireDefault(_modelsMediaPlayerModelJs);\n\nvar _controllersPlaybackControllerJs = _dereq_('../../controllers/PlaybackController.js');\n\nvar _controllersPlaybackControllerJs2 = _interopRequireDefault(_controllersPlaybackControllerJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction BufferLevelRule(config) {\n\n var instance = undefined;\n var context = this.context;\n\n var dashMetrics = config.dashMetrics;\n var metricsModel = config.metricsModel;\n var textSourceBuffer = config.textSourceBuffer;\n\n var mediaPlayerModel = undefined,\n playbackController = undefined;\n\n function setup() {\n mediaPlayerModel = (0, _modelsMediaPlayerModelJs2['default'])(context).getInstance();\n playbackController = (0, _controllersPlaybackControllerJs2['default'])(context).getInstance();\n }\n\n function execute(streamProcessor) {\n\n var representationInfo = streamProcessor.getCurrentRepresentationInfo();\n var mediaInfo = representationInfo.mediaInfo;\n var mediaType = mediaInfo.type;\n var metrics = metricsModel.getReadOnlyMetricsFor(mediaType);\n var bufferLevel = dashMetrics.getCurrentBufferLevel(metrics);\n\n return bufferLevel < getBufferTarget(streamProcessor, mediaType);\n }\n\n function reset() {}\n\n function getBufferTarget(streamProcessor, type) {\n\n var representationInfo = streamProcessor.getCurrentRepresentationInfo();\n var mediaInfo = representationInfo.mediaInfo;\n var streamInfo = mediaInfo.streamInfo;\n var abrController = streamProcessor.getABRController();\n var duration = streamInfo.manifestInfo.duration;\n var isLongFormContent = duration >= mediaPlayerModel.getLongFormContentDurationThreshold();\n var bufferTarget = NaN;\n\n if (type === 'fragmentedText') {\n bufferTarget = textSourceBuffer.getAllTracksAreDisabled() ? 0 : representationInfo.fragmentDuration;\n } else {\n if (abrController.isPlayingAtTopQuality(streamInfo)) {\n bufferTarget = isLongFormContent ? mediaPlayerModel.getBufferTimeAtTopQualityLongForm() : mediaPlayerModel.getBufferTimeAtTopQuality();\n } else {\n bufferTarget = mediaPlayerModel.getStableBufferTime();\n }\n }\n return bufferTarget;\n }\n\n instance = {\n execute: execute,\n reset: reset\n };\n setup();\n return instance;\n}\n\nBufferLevelRule.__dashjs_factory_name = 'BufferLevelRule';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(BufferLevelRule);\nmodule.exports = exports['default'];\n\n},{\"../../../core/FactoryMaker.js\":7,\"../../controllers/PlaybackController.js\":54,\"../../models/MediaPlayerModel.js\":64}],81:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreDebugJs = _dereq_('../../../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction NextFragmentRequestRule(config) {\n\n var instance = undefined;\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n var adapter = config.adapter;\n var sourceBufferController = config.sourceBufferController;\n var virtualBuffer = config.virtualBuffer;\n var textSourceBuffer = config.textSourceBuffer;\n\n function execute(streamProcessor) {\n\n var representationInfo = streamProcessor.getCurrentRepresentationInfo();\n var mediaInfo = representationInfo.mediaInfo;\n var mediaType = mediaInfo.type;\n var streamId = mediaInfo.streamInfo.id;\n var scheduleController = streamProcessor.getScheduleController();\n var seekTarget = scheduleController.getSeekTarget();\n var hasSeekTarget = !isNaN(seekTarget);\n var keepIdx = !hasSeekTarget;\n var time = hasSeekTarget ? seekTarget : adapter.getIndexHandlerTime(streamProcessor);\n var buffer = streamProcessor.getBuffer();\n var range = null;\n var appendedChunks = undefined;\n var request = undefined;\n\n if (isNaN(time) || mediaType === 'fragmentedText' && textSourceBuffer.getAllTracksAreDisabled()) {\n return null;\n }\n\n if (hasSeekTarget) {\n scheduleController.setSeekTarget(NaN);\n }\n\n /**\n * This is critical for IE/Safari/EDGE\n * */\n if (buffer) {\n range = sourceBufferController.getBufferRange(streamProcessor.getBuffer(), time);\n if (range !== null) {\n appendedChunks = virtualBuffer.getChunks({ streamId: streamId, mediaType: mediaType, appended: true, mediaInfo: mediaInfo, forRange: range });\n if (appendedChunks && appendedChunks.length > 0) {\n var t = time;\n time = appendedChunks[appendedChunks.length - 1].bufferedRange.end;\n log('Prior to making a request for time, NextFragmentRequestRule is aligning index handler\\'s currentTime with bufferedRange.end.', t, ' was changed to ', time);\n }\n }\n }\n\n request = adapter.getFragmentRequestForTime(streamProcessor, representationInfo, time, { keepIdx: keepIdx });\n //log(\"getForTime\", request, time);\n if (request && streamProcessor.getFragmentModel().isFragmentLoaded(request)) {\n request = adapter.getNextFragmentRequest(streamProcessor, representationInfo);\n //log(\"getForNext\", request, streamProcessor.getIndexHandler().getCurrentIndex());\n }\n\n if (request) {\n adapter.setIndexHandlerTime(streamProcessor, request.startTime + request.duration);\n request.delayLoadingTime = new Date().getTime() + scheduleController.getTimeToLoadDelay();\n scheduleController.setTimeToLoadDelay(0); // only delay one fragment\n }\n\n return request;\n }\n\n instance = {\n execute: execute\n };\n\n return instance;\n}\n\nNextFragmentRequestRule.__dashjs_factory_name = 'NextFragmentRequestRule';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(NextFragmentRequestRule);\nmodule.exports = exports['default'];\n\n},{\"../../../core/Debug.js\":5,\"../../../core/FactoryMaker.js\":7}],82:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _SwitchRequestJs = _dereq_('../SwitchRequest.js');\n\nvar _SwitchRequestJs2 = _interopRequireDefault(_SwitchRequestJs);\n\nvar _coreEventBusJs = _dereq_('../../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar SEARCH_TIME_SPAN = 12 * 60 * 60; // set the time span that limits our search range to a 12 hours in seconds\n\nfunction LiveEdgeBinarySearchRule(config) {\n\n var context = this.context;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var adapter = config.adapter;\n var timelineConverter = config.timelineConverter;\n\n var instance = undefined,\n liveEdgeInitialSearchPosition = undefined,\n liveEdgeSearchRange = undefined,\n liveEdgeSearchStep = undefined,\n representationInfo = undefined,\n useBinarySearch = undefined,\n fragmentDuration = undefined,\n p = undefined,\n callback = undefined,\n fragmentLoader = undefined,\n streamProcessor = undefined;\n\n function setup() {\n liveEdgeInitialSearchPosition = NaN;\n liveEdgeSearchRange = null;\n liveEdgeSearchStep = NaN;\n representationInfo = null;\n useBinarySearch = false;\n fragmentDuration = NaN;\n p = _SwitchRequestJs2['default'].DEFAULT;\n }\n\n function execute(rulesContext, callbackFunc) {\n var request, DVRWindow; // all fragments are supposed to be available in this interval\n\n callback = callbackFunc;\n streamProcessor = rulesContext.getStreamProcessor();\n fragmentLoader = streamProcessor.getFragmentLoader();\n representationInfo = rulesContext.getTrackInfo();\n fragmentDuration = representationInfo.fragmentDuration;\n DVRWindow = representationInfo.DVRWindow; // all fragments are supposed to be available in this interval\n\n // start position of the search, it is supposed to be a live edge - the last available fragment for the current mpd\n liveEdgeInitialSearchPosition = DVRWindow.end;\n\n if (representationInfo.useCalculatedLiveEdgeTime) {\n //By default an expected live edge is the end of the last segment.\n // A calculated live edge ('end' property of a range returned by TimelineConverter.calcSegmentAvailabilityRange)\n // is used as an initial point for finding the actual live edge.\n // But for SegmentTimeline mpds (w/o a negative @r) the end of the\n // last segment is the actual live edge. At the same time, calculated live edge is an expected live edge.\n // Thus, we need to switch an expected live edge and actual live edge for SegmentTimeline streams.\n var actualLiveEdge = timelineConverter.getExpectedLiveEdge();\n timelineConverter.setExpectedLiveEdge(liveEdgeInitialSearchPosition);\n callback((0, _SwitchRequestJs2['default'])(context).create(actualLiveEdge, p));\n return;\n }\n\n // we should search for a live edge in a time range which is limited by SEARCH_TIME_SPAN.\n liveEdgeSearchRange = { start: Math.max(0, liveEdgeInitialSearchPosition - SEARCH_TIME_SPAN), end: liveEdgeInitialSearchPosition + SEARCH_TIME_SPAN };\n // we have to use half of the availability interval (window) as a search step to ensure that we find a fragment in the window\n liveEdgeSearchStep = Math.floor((DVRWindow.end - DVRWindow.start) / 2);\n // start search from finding a request for the initial search time\n request = adapter.getFragmentRequestForTime(streamProcessor, representationInfo, liveEdgeInitialSearchPosition, { ignoreIsFinished: true });\n findLiveEdge(liveEdgeInitialSearchPosition, onSearchForFragmentSucceeded, onSearchForFragmentFailed, request);\n }\n\n function reset() {\n liveEdgeInitialSearchPosition = NaN;\n liveEdgeSearchRange = null;\n liveEdgeSearchStep = NaN;\n representationInfo = null;\n useBinarySearch = false;\n fragmentDuration = NaN;\n streamProcessor = null;\n fragmentLoader = null;\n }\n\n function findLiveEdge(searchTime, onSuccess, onError, request) {\n var req;\n if (request === null) {\n // request can be null because it is out of the generated list of request. In this case we need to\n // update the list and the DVRWindow\n // try to get request object again\n req = adapter.generateFragmentRequestForTime(streamProcessor, representationInfo, searchTime);\n findLiveEdge(searchTime, onSuccess, onError, req);\n } else {\n var handler = function handler(e) {\n eventBus.off(_coreEventsEventsJs2['default'].CHECK_FOR_EXISTENCE_COMPLETED, handler, this);\n if (e.exists) {\n onSuccess(e.request, searchTime);\n } else {\n onError(e.request, searchTime);\n }\n };\n\n eventBus.on(_coreEventsEventsJs2['default'].CHECK_FOR_EXISTENCE_COMPLETED, handler, this);\n fragmentLoader.checkForExistence(request);\n }\n }\n\n function onSearchForFragmentFailed(request, lastSearchTime) {\n var searchTime, req, searchInterval;\n\n if (useBinarySearch) {\n binarySearch(false, lastSearchTime);\n return;\n }\n\n // we have not found any available fragments yet, update the search interval\n searchInterval = lastSearchTime - liveEdgeInitialSearchPosition;\n // we search forward and backward from the start position, increasing the search interval by the value of the half of the availability interval - liveEdgeSearchStep\n searchTime = searchInterval > 0 ? liveEdgeInitialSearchPosition - searchInterval : liveEdgeInitialSearchPosition + Math.abs(searchInterval) + liveEdgeSearchStep;\n\n // if the search time is out of the range bounds we have not be able to find live edge, stop trying\n if (searchTime < liveEdgeSearchRange.start && searchTime > liveEdgeSearchRange.end) {\n callback((0, _SwitchRequestJs2['default'])(context).create(null, p));\n } else {\n // continue searching for a first available fragment\n req = adapter.getFragmentRequestForTime(streamProcessor, representationInfo, searchTime, { ignoreIsFinished: true });\n findLiveEdge(searchTime, onSearchForFragmentSucceeded, onSearchForFragmentFailed, req);\n }\n }\n\n function onSearchForFragmentSucceeded(request, lastSearchTime) {\n var startTime = request.startTime;\n var req, searchTime;\n\n if (!useBinarySearch) {\n // if the fragment duration is unknown we cannot use binary search because we will not be able to\n // decide when to stop the search, so let the start time of the current fragment be a liveEdge\n if (!representationInfo.fragmentDuration) {\n callback((0, _SwitchRequestJs2['default'])(context).create(startTime, p));\n return;\n }\n useBinarySearch = true;\n liveEdgeSearchRange.end = startTime + 2 * liveEdgeSearchStep;\n\n //if the first request has succeeded we should check next fragment - if it does not exist we have found live edge,\n // otherwise start binary search to find live edge\n if (lastSearchTime === liveEdgeInitialSearchPosition) {\n searchTime = lastSearchTime + fragmentDuration;\n req = adapter.getFragmentRequestForTime(streamProcessor, representationInfo, searchTime, { ignoreIsFinished: true });\n findLiveEdge(searchTime, function () {\n binarySearch(true, searchTime);\n }, function () {\n callback((0, _SwitchRequestJs2['default'])(context).create(searchTime, p));\n }, req);\n\n return;\n }\n }\n\n binarySearch(true, lastSearchTime);\n }\n\n function binarySearch(lastSearchSucceeded, lastSearchTime) {\n var isSearchCompleted, req, searchTime;\n\n if (lastSearchSucceeded) {\n liveEdgeSearchRange.start = lastSearchTime;\n } else {\n liveEdgeSearchRange.end = lastSearchTime;\n }\n\n isSearchCompleted = Math.floor(liveEdgeSearchRange.end - liveEdgeSearchRange.start) <= fragmentDuration;\n\n if (isSearchCompleted) {\n // search completed, we should take the time of the last found fragment. If the last search succeeded we\n // take this time. Otherwise, we should subtract the time of the search step which is equal to fragment duration\n callback((0, _SwitchRequestJs2['default'])(context).create(lastSearchSucceeded ? lastSearchTime : lastSearchTime - fragmentDuration, p));\n } else {\n // update the search time and continue searching\n searchTime = (liveEdgeSearchRange.start + liveEdgeSearchRange.end) / 2;\n req = adapter.getFragmentRequestForTime(streamProcessor, representationInfo, searchTime, { ignoreIsFinished: true });\n findLiveEdge(searchTime, onSearchForFragmentSucceeded, onSearchForFragmentFailed, req);\n }\n }\n\n instance = {\n execute: execute,\n reset: reset\n };\n\n setup();\n\n return instance;\n}\n\nLiveEdgeBinarySearchRule.__dashjs_factory_name = 'LiveEdgeBinarySearchRule';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(LiveEdgeBinarySearchRule);\nmodule.exports = exports['default'];\n\n},{\"../../../core/EventBus.js\":6,\"../../../core/FactoryMaker.js\":7,\"../../../core/events/Events.js\":9,\"../SwitchRequest.js\":70}],83:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _SwitchRequestJs = _dereq_('../SwitchRequest.js');\n\nvar _SwitchRequestJs2 = _interopRequireDefault(_SwitchRequestJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction LiveEdgeWithTimeSynchronizationRule(config) {\n\n var instance = undefined;\n var context = this.context;\n var timelineConverter = config.timelineConverter;\n\n // if the time has been synchronized correctly (which it must have been\n // to end up executing this rule), the last entry in the DVR window\n // should be the live edge. if that is incorrect for whatever reason,\n // playback will fail to start and some other action should be taken.\n function execute(rulesContext, callback) {\n var representationInfo = rulesContext.getTrackInfo();\n var liveEdgeInitialSearchPosition = representationInfo.DVRWindow.end;\n var p = _SwitchRequestJs2['default'].DEFAULT;\n\n if (representationInfo.useCalculatedLiveEdgeTime) {\n //By default an expected live edge is the end of the last segment.\n // A calculated live edge ('end' property of a range returned by TimelineConverter.calcSegmentAvailabilityRange)\n // is used as an initial point for finding the actual live edge.\n // But for SegmentTimeline mpds (w/o a negative @r) the end of the\n // last segment is the actual live edge. At the same time, calculated live edge is an expected live edge.\n // Thus, we need to switch an expected live edge and actual live edge for SegmentTimeline streams.\n var actualLiveEdge = timelineConverter.getExpectedLiveEdge();\n timelineConverter.setExpectedLiveEdge(liveEdgeInitialSearchPosition);\n callback((0, _SwitchRequestJs2['default'])(context).create(actualLiveEdge, p));\n } else {\n callback((0, _SwitchRequestJs2['default'])(context).create(liveEdgeInitialSearchPosition, p));\n }\n }\n\n instance = {\n execute: execute\n };\n\n return instance;\n}\n\nLiveEdgeWithTimeSynchronizationRule.__dashjs_factory_name = 'LiveEdgeWithTimeSynchronizationRule';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(LiveEdgeWithTimeSynchronizationRule);\nmodule.exports = exports['default'];\n\n},{\"../../../core/FactoryMaker.js\":7,\"../SwitchRequest.js\":70}],84:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _dashUtilsTimelineConverterJs = _dereq_('../../../dash/utils/TimelineConverter.js');\n\nvar _dashUtilsTimelineConverterJs2 = _interopRequireDefault(_dashUtilsTimelineConverterJs);\n\nvar _LiveEdgeBinarySearchRuleJs = _dereq_('./LiveEdgeBinarySearchRule.js');\n\nvar _LiveEdgeBinarySearchRuleJs2 = _interopRequireDefault(_LiveEdgeBinarySearchRuleJs);\n\nvar _LiveEdgeWithTimeSynchronizationRuleJs = _dereq_('./LiveEdgeWithTimeSynchronizationRule.js');\n\nvar _LiveEdgeWithTimeSynchronizationRuleJs2 = _interopRequireDefault(_LiveEdgeWithTimeSynchronizationRuleJs);\n\nvar _dashDashAdapterJs = _dereq_('../../../dash/DashAdapter.js');\n\nvar _dashDashAdapterJs2 = _interopRequireDefault(_dashDashAdapterJs);\n\nvar TIME_SYNCHRONIZED_RULES = 'withAccurateTimeSourceRules';\nvar BEST_GUESS_RULES = 'bestGuestRules';\n\nfunction SynchronizationRulesCollection() {\n\n var context = this.context;\n\n var instance = undefined,\n withAccurateTimeSourceRules = undefined,\n bestGuestRules = undefined;\n\n function initialize() {\n withAccurateTimeSourceRules = [];\n bestGuestRules = [];\n\n withAccurateTimeSourceRules.push((0, _LiveEdgeWithTimeSynchronizationRuleJs2['default'])(context).create({\n timelineConverter: (0, _dashUtilsTimelineConverterJs2['default'])(context).getInstance()\n }));\n\n bestGuestRules.push((0, _LiveEdgeBinarySearchRuleJs2['default'])(context).create({\n timelineConverter: (0, _dashUtilsTimelineConverterJs2['default'])(context).getInstance(),\n adapter: (0, _dashDashAdapterJs2['default'])(context).getInstance()\n }));\n }\n\n function getRules(type) {\n switch (type) {\n case TIME_SYNCHRONIZED_RULES:\n return withAccurateTimeSourceRules;\n case BEST_GUESS_RULES:\n return bestGuestRules;\n default:\n return null;\n }\n }\n\n instance = {\n initialize: initialize,\n getRules: getRules\n };\n\n return instance;\n}\n\nSynchronizationRulesCollection.__dashjs_factory_name = 'SynchronizationRulesCollection';\nvar factory = _coreFactoryMakerJs2['default'].getSingletonFactory(SynchronizationRulesCollection);\nfactory.TIME_SYNCHRONIZED_RULES = TIME_SYNCHRONIZED_RULES;\nfactory.BEST_GUESS_RULES = BEST_GUESS_RULES;\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../../../core/FactoryMaker.js\":7,\"../../../dash/DashAdapter.js\":11,\"../../../dash/utils/TimelineConverter.js\":23,\"./LiveEdgeBinarySearchRule.js\":82,\"./LiveEdgeWithTimeSynchronizationRule.js\":83}],85:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _dashModelsDashManifestModelJs = _dereq_('../../dash/models/DashManifestModel.js');\n\nvar _dashModelsDashManifestModelJs2 = _interopRequireDefault(_dashModelsDashManifestModelJs);\n\nvar _controllersBlacklistControllerJs = _dereq_('../controllers/BlacklistController.js');\n\nvar _controllersBlacklistControllerJs2 = _interopRequireDefault(_controllersBlacklistControllerJs);\n\nvar _rulesBaseUrlResolutionDVBSelectorJs = _dereq_('../rules/baseUrlResolution/DVBSelector.js');\n\nvar _rulesBaseUrlResolutionDVBSelectorJs2 = _interopRequireDefault(_rulesBaseUrlResolutionDVBSelectorJs);\n\nvar _rulesBaseUrlResolutionBasicSelectorJs = _dereq_('../rules/baseUrlResolution/BasicSelector.js');\n\nvar _rulesBaseUrlResolutionBasicSelectorJs2 = _interopRequireDefault(_rulesBaseUrlResolutionBasicSelectorJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE = 1;\nvar URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE = 'Failed to resolve a valid URL';\n\nfunction BaseURLSelector() {\n\n var context = this.context;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n var dashManifestModel = (0, _dashModelsDashManifestModelJs2['default'])(context).getInstance();\n\n var instance = undefined,\n serviceLocationBlacklistController = undefined,\n basicSelector = undefined,\n dvbSelector = undefined,\n selector = undefined;\n\n function setup() {\n serviceLocationBlacklistController = (0, _controllersBlacklistControllerJs2['default'])(context).create({\n updateEventName: _coreEventsEventsJs2['default'].SERVICE_LOCATION_BLACKLIST_CHANGED,\n loadFailedEventName: _coreEventsEventsJs2['default'].FRAGMENT_LOADING_COMPLETED\n });\n\n basicSelector = (0, _rulesBaseUrlResolutionBasicSelectorJs2['default'])(context).create({\n blacklistController: serviceLocationBlacklistController\n });\n\n dvbSelector = (0, _rulesBaseUrlResolutionDVBSelectorJs2['default'])(context).create({\n blacklistController: serviceLocationBlacklistController\n });\n\n selector = basicSelector;\n }\n\n function chooseSelectorFromManifest(manifest) {\n if (dashManifestModel.getIsDVB(manifest)) {\n selector = dvbSelector;\n } else {\n selector = basicSelector;\n }\n }\n\n function select(data) {\n var baseUrls = data.baseUrls;\n var selectedIdx = data.selectedIdx;\n\n // Once a random selection has been carried out amongst a group of BaseURLs with the same\n // @priority attribute value, then that choice should be re-used if the selection needs to be made again\n // unless the blacklist has been modified or the available BaseURLs have changed.\n if (!isNaN(selectedIdx)) {\n return baseUrls[selectedIdx];\n }\n\n var selectedBaseUrl = selector.select(baseUrls);\n\n if (!selectedBaseUrl) {\n eventBus.trigger(_coreEventsEventsJs2['default'].URL_RESOLUTION_FAILED, {\n error: new Error(URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE, URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE)\n });\n\n return;\n }\n\n data.selectedIdx = baseUrls.indexOf(selectedBaseUrl);\n\n return selectedBaseUrl;\n }\n\n function reset() {\n serviceLocationBlacklistController.reset();\n }\n\n instance = {\n chooseSelectorFromManifest: chooseSelectorFromManifest,\n select: select,\n reset: reset\n };\n\n setup();\n\n return instance;\n}\n\nBaseURLSelector.__dashjs_factory_name = 'BaseURLSelector';\nvar factory = _coreFactoryMakerJs2['default'].getClassFactory(BaseURLSelector);\nfactory.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE = URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE;\nfactory.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE = URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE;\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7,\"../../core/events/Events.js\":9,\"../../dash/models/DashManifestModel.js\":17,\"../controllers/BlacklistController.js\":48,\"../rules/baseUrlResolution/BasicSelector.js\":78,\"../rules/baseUrlResolution/DVBSelector.js\":79}],86:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _IsoFileJs = _dereq_('./IsoFile.js');\n\nvar _IsoFileJs2 = _interopRequireDefault(_IsoFileJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _codemIsoboxer = _dereq_('codem-isoboxer');\n\nvar _codemIsoboxer2 = _interopRequireDefault(_codemIsoboxer);\n\nvar SAMPLE_IS_NON_SYNC = 0x10000;\n\nfunction BoxParser() /*config*/{\n\n var instance = undefined;\n var context = this.context;\n\n /**\n * @param {ArrayBuffer} data\n * @returns {@link IsoFile}\n * @memberof BoxParser#\n */\n function parse(data) {\n if (!data) return null;\n\n if (data.fileStart === undefined) {\n data.fileStart = 0;\n }\n\n var parsedFile = _codemIsoboxer2['default'].parseBuffer(data);\n var dashIsoFile = (0, _IsoFileJs2['default'])(context).create();\n\n dashIsoFile.setData(parsedFile);\n\n return dashIsoFile;\n }\n function avccExtraData(data) {\n if (!data) return null;\n\n var isoFile = parse(data);\n var stsdBox = isoFile.getBox('stsd');\n if (stsdBox && stsdBox.entry_count) {\n for (var i = 0; i < stsdBox.entry_count; i++) {\n if (stsdBox.entries[i].type == 'avc1') {\n return stsdBox.entries[i].config;\n }\n }\n }\n }\n\n function isIDR(data, nalLenSize) {\n if (!data) return;\n\n var pos = 0;\n var len = data.byteLength;\n while (len - pos >= nalLenSize) {\n var nalLen;\n switch (nalLenSize) {\n case 1:\n nalLen = data.getUint8(pos);break;\n case 2:\n nalLen = data.getUint16(pos);break;\n case 3:\n nalLen = data.getUint24(pos);break;\n case 4:\n nalLen = data.getUint32(pos);break;\n }\n pos += nalLenSize;\n if (!nalLen) {\n continue;\n }\n var t = data.getUint8(pos);\n pos += nalLen;\n if ((t & 0x1f) == 5) {\n // IDR NAL.\n return true;\n }\n }\n }\n\n function getSyncSamples(extraData, data) {\n if (!data || !extraData) return;\n\n var isoFile = parse(data);\n var mdatBox = isoFile.getBox('mdat');\n var trunBox = isoFile.getBox('trun');\n if (!trunBox || !trunBox.samples) {\n return;\n }\n var samples = trunBox.samples;\n var pos = mdatBox.offset + 8;\n var nalLenSize = (extraData.getUint8(8 + 4) & 3) + 1;\n var res = [];\n for (var i = 0, len = samples.length; i < len; i++) {\n if (!(samples[i].sample_flags & SAMPLE_IS_NON_SYNC)) {\n var s = { index: i };\n if (isIDR(new DataView(data, pos, samples[i].sample_size), nalLenSize)) s.isIDR = true;\n res.push(s);\n }\n pos += samples[i].sample_size;\n }\n return res;\n }\n\n instance = {\n parse: parse,\n avccExtraData: avccExtraData,\n getSyncSamples: getSyncSamples\n };\n\n return instance;\n}\nBoxParser.__dashjs_factory_name = 'BoxParser';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(BoxParser);\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7,\"./IsoFile.js\":91,\"codem-isoboxer\":4}],87:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction Capabilities() {\n\n var instance = undefined,\n encryptedMediaSupported = undefined;\n\n function setup() {\n encryptedMediaSupported = false;\n }\n\n function supportsMediaSource() {\n var hasWebKit = ('WebKitMediaSource' in window);\n var hasMediaSource = ('MediaSource' in window);\n\n return hasWebKit || hasMediaSource;\n }\n\n /**\n * Returns whether Encrypted Media Extensions are supported on this\n * user agent\n *\n * @return {boolean} true if EME is supported, false otherwise\n */\n function supportsEncryptedMedia() {\n return encryptedMediaSupported;\n }\n\n function setEncryptedMediaSupported(value) {\n encryptedMediaSupported = value;\n }\n\n function supportsCodec(element, codec) {\n\n if (!(element instanceof HTMLMediaElement)) {\n throw 'element must be of type HTMLMediaElement.';\n }\n\n var canPlay = element.canPlayType(codec);\n return canPlay === 'probably' || canPlay === 'maybe';\n }\n\n instance = {\n supportsMediaSource: supportsMediaSource,\n supportsEncryptedMedia: supportsEncryptedMedia,\n supportsCodec: supportsCodec,\n setEncryptedMediaSupported: setEncryptedMediaSupported\n };\n\n setup();\n\n return instance;\n}\nCapabilities.__dashjs_factory_name = 'Capabilities';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(Capabilities);\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7}],88:[function(_dereq_,module,exports){\n/**\n* The copyright in this software is being made available under the BSD License,\n* included below. This software may be subject to other third party and contributor\n* rights, including patent rights, and no such rights are granted under this license.\n*\n* Copyright (c) 2013, Dash Industry Forum.\n* All rights reserved.\n*\n* Redistribution and use in source and binary forms, with or without modification,\n* are permitted provided that the following conditions are met:\n* * Redistributions of source code must retain the above copyright notice, this\n* list of conditions and the following disclaimer.\n* * Redistributions in binary form must reproduce the above copyright notice,\n* this list of conditions and the following disclaimer in the documentation and/or\n* other materials provided with the distribution.\n* * Neither the name of Dash Industry Forum nor the names of its\n* contributors may be used to endorse or promote products derived from this software\n* without specific prior written permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n* POSSIBILITY OF SUCH DAMAGE.\n*/\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction CustomTimeRanges() /*config*/{\n var customTimeRangeArray = [];\n var length = 0;\n\n function add(start, end) {\n var i = 0;\n\n for (i = 0; i < this.customTimeRangeArray.length && start > this.customTimeRangeArray[i].start; i++);\n\n this.customTimeRangeArray.splice(i, 0, { start: start, end: end });\n\n for (i = 0; i < this.customTimeRangeArray.length - 1; i++) {\n if (this.mergeRanges(i, i + 1)) {\n i--;\n }\n }\n this.length = this.customTimeRangeArray.length;\n }\n\n function clear() {\n this.customTimeRangeArray = [];\n this.length = 0;\n }\n\n function remove(start, end) {\n for (var i = 0; i < this.customTimeRangeArray.length; i++) {\n if (start <= this.customTimeRangeArray[i].start && end >= this.customTimeRangeArray[i].end) {\n // |--------------Range i-------|\n //|---------------Range to remove ---------------|\n // or\n //|--------------Range i-------|\n //|--------------Range to remove ---------------|\n // or\n // |--------------Range i-------|\n //|--------------Range to remove ---------------|\n this.customTimeRangeArray.splice(i, 1);\n i--;\n } else if (start > this.customTimeRangeArray[i].start && end < this.customTimeRangeArray[i].end) {\n //|-----------------Range i----------------|\n // |-------Range to remove -----|\n this.customTimeRangeArray.splice(i + 1, 0, { start: end, end: this.customTimeRangeArray[i].end });\n this.customTimeRangeArray[i].end = start;\n break;\n } else if (start > this.customTimeRangeArray[i].start && start < this.customTimeRangeArray[i].end) {\n //|-----------Range i----------|\n // |---------Range to remove --------|\n // or\n //|-----------------Range i----------------|\n // |-------Range to remove -----|\n this.customTimeRangeArray[i].end = start;\n } else if (end > this.customTimeRangeArray[i].start && end < this.customTimeRangeArray[i].end) {\n // |-----------Range i----------|\n //|---------Range to remove --------|\n // or\n //|-----------------Range i----------------|\n //|-------Range to remove -----|\n this.customTimeRangeArray[i].start = end;\n }\n }\n\n this.length = this.customTimeRangeArray.length;\n }\n\n function mergeRanges(rangeIndex1, rangeIndex2) {\n var range1 = this.customTimeRangeArray[rangeIndex1];\n var range2 = this.customTimeRangeArray[rangeIndex2];\n\n if (range1.start <= range2.start && range2.start <= range1.end && range1.end <= range2.end) {\n //|-----------Range1----------|\n // |-----------Range2----------|\n range1.end = range2.end;\n this.customTimeRangeArray.splice(rangeIndex2, 1);\n return true;\n } else if (range2.start <= range1.start && range1.start <= range2.end && range2.end <= range1.end) {\n // |-----------Range1----------|\n //|-----------Range2----------|\n range1.start = range2.start;\n this.customTimeRangeArray.splice(rangeIndex2, 1);\n return true;\n } else if (range2.start <= range1.start && range1.start <= range2.end && range1.end <= range2.end) {\n // |--------Range1-------|\n //|---------------Range2--------------|\n this.customTimeRangeArray.splice(rangeIndex1, 1);\n return true;\n } else if (range1.start <= range2.start && range2.start <= range1.end && range2.end <= range1.end) {\n //|-----------------Range1--------------|\n // |-----------Range2----------|\n this.customTimeRangeArray.splice(rangeIndex2, 1);\n return true;\n }\n return false;\n }\n\n function start(index) {\n return this.customTimeRangeArray[index].start;\n }\n\n function end(index) {\n return this.customTimeRangeArray[index].end;\n }\n\n return {\n customTimeRangeArray: customTimeRangeArray,\n length: length,\n add: add,\n clear: clear,\n remove: remove,\n mergeRanges: mergeRanges,\n start: start,\n end: end\n };\n}\nCustomTimeRanges.__dashjs_factory_name = 'CustomTimeRanges';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(CustomTimeRanges);\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7}],89:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _modelsMediaPlayerModelJs = _dereq_('../models/MediaPlayerModel.js');\n\nvar _modelsMediaPlayerModelJs2 = _interopRequireDefault(_modelsMediaPlayerModelJs);\n\nvar _coreDebugJs = _dereq_('../../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nvar legacyKeysAndReplacements = [{ oldKey: 'dashjs_vbitrate', newKey: 'dashjs_video_bitrate' }, { oldKey: 'dashjs_abitrate', newKey: 'dashjs_audio_bitrate' }, { oldKey: 'dashjs_vsettings', newKey: 'dashjs_video_settings' }, { oldKey: 'dashjs_asettings', newKey: 'dashjs_audio_settings' }];\n\nvar LOCAL_STORAGE_BITRATE_KEY_TEMPLATE = 'dashjs_?_bitrate';\nvar LOCAL_STORAGE_SETTINGS_KEY_TEMPLATE = 'dashjs_?_settings';\n\nvar STORAGE_TYPE_LOCAL = 'localStorage';\nvar STORAGE_TYPE_SESSION = 'sessionStorage';\n\nfunction DOMStorage() {\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n\n var instance = undefined,\n supported = undefined,\n mediaPlayerModel = undefined;\n\n //type can be local, session\n function isSupported(type) {\n if (supported !== undefined) return supported;\n\n supported = false;\n\n var testKey = '1';\n var testValue = '1';\n var storage;\n\n try {\n if (typeof window !== 'undefined') {\n storage = window[type];\n }\n } catch (error) {\n log('Warning: DOMStorage access denied: ' + error.message);\n return supported;\n }\n\n if (!storage || type !== STORAGE_TYPE_LOCAL && type !== STORAGE_TYPE_SESSION) {\n return supported;\n }\n\n /* When Safari (OS X or iOS) is in private browsing mode, it appears as though localStorage is available, but trying to call setItem throws an exception.\n http://stackoverflow.com/questions/14555347/html5-localstorage-error-with-safari-quota-exceeded-err-dom-exception-22-an\n Check if the storage can be used\n */\n try {\n storage.setItem(testKey, testValue);\n storage.removeItem(testKey);\n supported = true;\n } catch (error) {\n log('Warning: DOMStorage is supported, but cannot be used: ' + error.message);\n }\n\n return supported;\n }\n\n function translateLegacyKeys() {\n if (isSupported(STORAGE_TYPE_LOCAL)) {\n legacyKeysAndReplacements.forEach(function (entry) {\n var value = localStorage.getItem(entry.oldKey);\n\n if (value) {\n localStorage.removeItem(entry.oldKey);\n\n try {\n localStorage.setItem(entry.newKey, value);\n } catch (e) {\n log(e.message);\n }\n }\n });\n }\n }\n\n function setup() {\n mediaPlayerModel = (0, _modelsMediaPlayerModelJs2['default'])(context).getInstance();\n\n translateLegacyKeys();\n }\n\n // Return current epoch time, ms, rounded to the nearest 10m to avoid fingerprinting user\n function getTimestamp() {\n var ten_minutes_ms = 60 * 1000 * 10;\n return Math.round(new Date().getTime() / ten_minutes_ms) * ten_minutes_ms;\n }\n\n function canStore(storageType, key) {\n return isSupported(storageType) && mediaPlayerModel['get' + key + 'CachingInfo']().enabled;\n }\n\n function getSavedMediaSettings(type) {\n //Checks local storage to see if there is valid, non-expired media settings\n if (!canStore(STORAGE_TYPE_LOCAL, 'LastMediaSettings')) return null;\n\n var key = LOCAL_STORAGE_SETTINGS_KEY_TEMPLATE.replace(/\\?/, type);\n var obj = JSON.parse(localStorage.getItem(key)) || {};\n var isExpired = new Date().getTime() - parseInt(obj.timestamp, 10) >= mediaPlayerModel.getLastMediaSettingsCachingInfo().ttl || false;\n var settings = obj.settings;\n\n if (isExpired) {\n localStorage.removeItem(key);\n settings = null;\n }\n\n return settings;\n }\n\n function getSavedBitrateSettings(type) {\n var savedBitrate = NaN;\n //Checks local storage to see if there is valid, non-expired bit rate\n //hinting from the last play session to use as a starting bit rate.\n if (canStore(STORAGE_TYPE_LOCAL, 'LastBitrate')) {\n var key = LOCAL_STORAGE_BITRATE_KEY_TEMPLATE.replace(/\\?/, type);\n var obj = JSON.parse(localStorage.getItem(key)) || {};\n var isExpired = new Date().getTime() - parseInt(obj.timestamp, 10) >= mediaPlayerModel.getLastBitrateCachingInfo().ttl || false;\n var bitrate = parseInt(obj.bitrate, 10);\n\n if (!isNaN(bitrate) && !isExpired) {\n savedBitrate = bitrate;\n log('Last saved bitrate for ' + type + ' was ' + bitrate);\n } else if (isExpired) {\n localStorage.removeItem(key);\n }\n }\n return savedBitrate;\n }\n\n function setSavedMediaSettings(type, value) {\n if (canStore(STORAGE_TYPE_LOCAL, 'LastMediaSettings')) {\n var key = LOCAL_STORAGE_SETTINGS_KEY_TEMPLATE.replace(/\\?/, type);\n try {\n localStorage.setItem(key, JSON.stringify({ settings: value, timestamp: getTimestamp() }));\n } catch (e) {\n log(e.message);\n }\n }\n }\n\n function setSavedBitrateSettings(type, bitrate) {\n if (canStore(STORAGE_TYPE_LOCAL, 'LastBitrate') && bitrate) {\n var key = LOCAL_STORAGE_BITRATE_KEY_TEMPLATE.replace(/\\?/, type);\n try {\n localStorage.setItem(key, JSON.stringify({ bitrate: bitrate / 1000, timestamp: getTimestamp() }));\n } catch (e) {\n log(e.message);\n }\n }\n }\n\n instance = {\n getSavedBitrateSettings: getSavedBitrateSettings,\n setSavedBitrateSettings: setSavedBitrateSettings,\n getSavedMediaSettings: getSavedMediaSettings,\n setSavedMediaSettings: setSavedMediaSettings,\n isSupported: isSupported\n };\n\n setup();\n return instance;\n}\n\nDOMStorage.__dashjs_factory_name = 'DOMStorage';\nvar factory = _coreFactoryMakerJs2['default'].getSingletonFactory(DOMStorage);\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../../core/Debug.js\":5,\"../../core/FactoryMaker.js\":7,\"../models/MediaPlayerModel.js\":64}],90:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar CAPABILITY_ERROR_MEDIASOURCE = 'mediasource';\nvar CAPABILITY_ERROR_MEDIAKEYS = 'mediakeys';\n\nvar DOWNLOAD_ERROR_ID_MANIFEST = 'manifest';\nvar DOWNLOAD_ERROR_ID_SIDX = 'SIDX';\nvar DOWNLOAD_ERROR_ID_CONTENT = 'content';\nvar DOWNLOAD_ERROR_ID_INITIALIZATION = 'initialization';\nvar DOWNLOAD_ERROR_ID_XLINK = 'xlink';\n\nvar MANIFEST_ERROR_ID_CODEC = 'codec';\nvar MANIFEST_ERROR_ID_PARSE = 'parse';\nvar MANIFEST_ERROR_ID_NOSTREAMS = 'nostreams';\n\nvar TIMED_TEXT_ERROR_ID_PARSE = 'parse';\n\nfunction ErrorHandler() {\n\n var instance = undefined;\n var context = this.context;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n // \"mediasource\"|\"mediakeys\"\n function capabilityError(err) {\n eventBus.trigger(_coreEventsEventsJs2['default'].ERROR, { error: 'capability', event: err });\n }\n\n // {id: \"manifest\"|\"SIDX\"|\"content\"|\"initialization\"|\"xlink\", url: \"\", request: {XMLHttpRequest instance}}\n function downloadError(id, url, request) {\n eventBus.trigger(_coreEventsEventsJs2['default'].ERROR, { error: 'download', event: { id: id, url: url, request: request } });\n }\n\n // {message: \"\", id: \"codec\"|\"parse\"|\"nostreams\", manifest: {parsed manifest}}\n function manifestError(message, id, manifest) {\n eventBus.trigger(_coreEventsEventsJs2['default'].ERROR, { error: 'manifestError', event: { message: message, id: id, manifest: manifest } });\n }\n\n // {message: '', id: 'parse', cc: ''}\n function timedTextError(message, id, ccContent) {\n eventBus.trigger(_coreEventsEventsJs2['default'].ERROR, { error: 'cc', event: { message: message, id: id, cc: ccContent } });\n }\n\n function mediaSourceError(err) {\n eventBus.trigger(_coreEventsEventsJs2['default'].ERROR, { error: 'mediasource', event: err });\n }\n\n function mediaKeySessionError(err) {\n eventBus.trigger(_coreEventsEventsJs2['default'].ERROR, { error: 'key_session', event: err });\n }\n\n function mediaKeyMessageError(err) {\n eventBus.trigger(_coreEventsEventsJs2['default'].ERROR, { error: 'key_message', event: err });\n }\n\n instance = {\n capabilityError: capabilityError,\n downloadError: downloadError,\n manifestError: manifestError,\n timedTextError: timedTextError,\n mediaSourceError: mediaSourceError,\n mediaKeySessionError: mediaKeySessionError,\n mediaKeyMessageError: mediaKeyMessageError\n };\n\n return instance;\n}\n\nErrorHandler.__dashjs_factory_name = 'ErrorHandler';\n\nvar factory = _coreFactoryMakerJs2['default'].getSingletonFactory(ErrorHandler);\n\nfactory.CAPABILITY_ERROR_MEDIASOURCE = CAPABILITY_ERROR_MEDIASOURCE;\nfactory.CAPABILITY_ERROR_MEDIAKEYS = CAPABILITY_ERROR_MEDIAKEYS;\nfactory.DOWNLOAD_ERROR_ID_MANIFEST = DOWNLOAD_ERROR_ID_MANIFEST;\nfactory.DOWNLOAD_ERROR_ID_SIDX = DOWNLOAD_ERROR_ID_SIDX;\nfactory.DOWNLOAD_ERROR_ID_CONTENT = DOWNLOAD_ERROR_ID_CONTENT;\nfactory.DOWNLOAD_ERROR_ID_INITIALIZATION = DOWNLOAD_ERROR_ID_INITIALIZATION;\nfactory.DOWNLOAD_ERROR_ID_XLINK = DOWNLOAD_ERROR_ID_XLINK;\nfactory.MANIFEST_ERROR_ID_CODEC = MANIFEST_ERROR_ID_CODEC;\nfactory.MANIFEST_ERROR_ID_PARSE = MANIFEST_ERROR_ID_PARSE;\nfactory.MANIFEST_ERROR_ID_NOSTREAMS = MANIFEST_ERROR_ID_NOSTREAMS;\nfactory.TIMED_TEXT_ERROR_ID_PARSE = TIMED_TEXT_ERROR_ID_PARSE;\n\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7,\"../../core/events/Events.js\":9}],91:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _voIsoBoxJs = _dereq_('../vo/IsoBox.js');\n\nvar _voIsoBoxJs2 = _interopRequireDefault(_voIsoBoxJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction IsoFile() {\n\n var instance = undefined,\n parsedIsoFile = undefined,\n commonProps = undefined,\n sidxProps = undefined,\n sidxRefProps = undefined,\n stsdProps = undefined,\n emsgProps = undefined,\n mdhdProps = undefined,\n mfhdProps = undefined,\n tfhdProps = undefined,\n tfdtProps = undefined,\n trunProps = undefined,\n trunSampleProps = undefined;\n\n /**\n * @param {string} type\n * @returns {@link IsoBox}\n * @memberof IsoFile#\n */\n function getBox(type) {\n if (!type || !parsedIsoFile || !parsedIsoFile.boxes || parsedIsoFile.boxes.length === 0) return null;\n\n return convertToDashIsoBox(parsedIsoFile.fetch(type));\n }\n\n /**\n * @param {string} type\n * @returns {Array} array of {@link IsoBox}\n * @memberof IsoFile#\n */\n function getBoxes(type) {\n var boxData = parsedIsoFile.fetchAll(type);\n var boxes = [];\n var box;\n\n for (var i = 0, ln = boxData.length; i < ln; i++) {\n box = convertToDashIsoBox(boxData[i]);\n\n if (box) {\n boxes.push(box);\n }\n }\n\n return boxes;\n }\n\n /**\n * @param {string} value\n * @memberof IsoFile#\n */\n function setData(value) {\n parsedIsoFile = value;\n }\n\n /**\n * @returns {@link IsoBox}\n * @memberof IsoFile#\n */\n function getLastBox() {\n if (!parsedIsoFile || !parsedIsoFile.boxes || !parsedIsoFile.boxes.length) return null;\n\n var type = parsedIsoFile.boxes[parsedIsoFile.boxes.length - 1].type;\n var boxes = getBoxes(type);\n\n return boxes[boxes.length - 1];\n }\n\n /**\n * @returns {Number}\n * @memberof IsoFile#\n */\n function getOffset() {\n return parsedIsoFile._cursor.offset;\n }\n\n function setup() {\n commonProps = {\n offset: '_offset',\n size: 'size',\n type: 'type'\n };\n\n sidxProps = {\n references: 'references',\n timescale: 'timescale',\n earliest_presentation_time: 'earliest_presentation_time',\n first_offset: 'first_offset'\n };\n\n sidxRefProps = {\n reference_type: 'reference_type',\n referenced_size: 'referenced_size',\n subsegment_duration: 'subsegment_duration'\n };\n\n stsdProps = {\n entries: 'entries',\n entry_count: 'entry_count'\n };\n\n emsgProps = {\n id: 'id',\n value: 'value',\n timescale: 'timescale',\n scheme_id_uri: 'scheme_id_uri',\n presentation_time_delta: 'presentation_time_delta',\n event_duration: 'event_duration',\n message_data: 'message_data'\n };\n\n mdhdProps = {\n timescale: 'timescale'\n };\n\n mfhdProps = {\n sequence_number: 'sequence_number'\n };\n\n tfhdProps = {\n base_data_offset: 'base_data_offset',\n sample_description_index: 'sample_description_index',\n default_sample_duration: 'default_sample_duration',\n default_sample_size: 'default_sample_size',\n default_sample_flags: 'default_sample_flags',\n flags: 'flags'\n };\n\n tfdtProps = {\n version: 'version',\n baseMediaDecodeTime: 'baseMediaDecodeTime',\n flags: 'flags'\n };\n\n trunProps = {\n sample_count: 'sample_count',\n first_sample_flags: 'first_sample_flags',\n data_offset: 'data_offset',\n flags: 'flags',\n samples: 'samples'\n };\n\n trunSampleProps = {\n sample_size: 'sample_size',\n sample_duration: 'sample_duration',\n sample_composition_time_offset: 'sample_composition_time_offset'\n };\n }\n\n function copyProps(from, to, props) {\n for (var prop in props) {\n to[prop] = from[props[prop]];\n }\n }\n\n function convertToDashIsoBox(boxData) {\n if (!boxData) return null;\n\n var box = new _voIsoBoxJs2['default']();\n var i, ln;\n\n copyProps(boxData, box, commonProps);\n\n if (boxData.hasOwnProperty('_incomplete')) {\n box.isComplete = !boxData._incomplete;\n }\n\n switch (box.type) {\n case 'sidx':\n copyProps(boxData, box, sidxProps);\n if (box.references) {\n for (i = 0, ln = box.references.length; i < ln; i++) {\n copyProps(boxData.references[i], box.references[i], sidxRefProps);\n }\n }\n break;\n case 'stsd':\n copyProps(boxData, box, stsdProps);\n break;\n case 'emsg':\n copyProps(boxData, box, emsgProps);\n break;\n case 'mdhd':\n copyProps(boxData, box, mdhdProps);\n break;\n case 'mfhd':\n copyProps(boxData, box, mfhdProps);\n break;\n case 'tfhd':\n copyProps(boxData, box, tfhdProps);\n break;\n case 'tfdt':\n copyProps(boxData, box, tfdtProps);\n break;\n case 'trun':\n copyProps(boxData, box, trunProps);\n if (box.samples) {\n for (i = 0, ln = box.samples.length; i < ln; i++) {\n copyProps(boxData.samples[i], box.samples[i], trunSampleProps);\n }\n }\n break;\n }\n\n return box;\n }\n\n instance = {\n getBox: getBox,\n getBoxes: getBoxes,\n setData: setData,\n getLastBox: getLastBox,\n getOffset: getOffset\n };\n\n setup();\n\n return instance;\n}\nIsoFile.__dashjs_factory_name = 'IsoFile';\nexports['default'] = _coreFactoryMakerJs2['default'].getClassFactory(IsoFile);\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7,\"../vo/IsoBox.js\":103}],92:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _rulesSynchronizationSynchronizationRulesCollectionJs = _dereq_('../rules/synchronization/SynchronizationRulesCollection.js');\n\nvar _rulesSynchronizationSynchronizationRulesCollectionJs2 = _interopRequireDefault(_rulesSynchronizationSynchronizationRulesCollectionJs);\n\nvar _voErrorJs = _dereq_('../vo/Error.js');\n\nvar _voErrorJs2 = _interopRequireDefault(_voErrorJs);\n\nvar _coreEventBusJs = _dereq_('../../core/EventBus.js');\n\nvar _coreEventBusJs2 = _interopRequireDefault(_coreEventBusJs);\n\nvar _coreEventsEventsJs = _dereq_('../../core/events/Events.js');\n\nvar _coreEventsEventsJs2 = _interopRequireDefault(_coreEventsEventsJs);\n\nvar _rulesRulesControllerJs = _dereq_('../rules/RulesController.js');\n\nvar _rulesRulesControllerJs2 = _interopRequireDefault(_rulesRulesControllerJs);\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar LIVE_EDGE_NOT_FOUND_ERROR_CODE = 1;\n\nfunction LiveEdgeFinder() {\n\n var context = this.context;\n var eventBus = (0, _coreEventBusJs2['default'])(context).getInstance();\n\n var instance = undefined,\n timelineConverter = undefined,\n streamProcessor = undefined,\n rulesController = undefined,\n isSearchStarted = undefined,\n searchStartTime = undefined,\n rules = undefined,\n liveEdge = undefined,\n ruleSet = undefined;\n\n function initialize(TimelineConverter, StreamProcessor) {\n timelineConverter = TimelineConverter;\n streamProcessor = StreamProcessor;\n isSearchStarted = false;\n searchStartTime = NaN;\n liveEdge = null;\n rulesController = (0, _rulesRulesControllerJs2['default'])(context).getInstance();\n ruleSet = _rulesSynchronizationSynchronizationRulesCollectionJs2['default'].BEST_GUESS_RULES;\n eventBus.on(_coreEventsEventsJs2['default'].STREAM_INITIALIZED, onStreamInitialized, this);\n }\n\n function abortSearch() {\n isSearchStarted = false;\n searchStartTime = NaN;\n }\n\n function getLiveEdge() {\n return liveEdge;\n }\n\n function reset() {\n eventBus.off(_coreEventsEventsJs2['default'].STREAM_INITIALIZED, onStreamInitialized, this);\n abortSearch();\n liveEdge = null;\n timelineConverter = null;\n streamProcessor = null;\n isSearchStarted = false;\n searchStartTime = NaN;\n ruleSet = null;\n rulesController = null;\n }\n\n function onSearchCompleted(req) {\n var searchTime = (new Date().getTime() - searchStartTime) / 1000;\n liveEdge = req.value;\n eventBus.trigger(_coreEventsEventsJs2['default'].LIVE_EDGE_SEARCH_COMPLETED, { liveEdge: liveEdge, searchTime: searchTime, error: liveEdge === null ? new _voErrorJs2['default'](LIVE_EDGE_NOT_FOUND_ERROR_CODE, 'live edge has not been found', null) : null });\n }\n\n function onStreamInitialized(e) {\n\n if (!streamProcessor.isDynamic() || isSearchStarted || e.error) {\n return;\n }\n\n ruleSet = timelineConverter.isTimeSyncCompleted() ? _rulesSynchronizationSynchronizationRulesCollectionJs2['default'].TIME_SYNCHRONIZED_RULES : _rulesSynchronizationSynchronizationRulesCollectionJs2['default'].BEST_GUESS_RULES;\n\n rules = (0, _rulesSynchronizationSynchronizationRulesCollectionJs2['default'])(context).getInstance().getRules(ruleSet);\n isSearchStarted = true;\n searchStartTime = new Date().getTime();\n\n rulesController.applyRules(rules, streamProcessor, onSearchCompleted, null, function (currentValue, newValue) {\n return newValue;\n });\n }\n\n instance = {\n initialize: initialize,\n abortSearch: abortSearch,\n getLiveEdge: getLiveEdge,\n reset: reset\n };\n\n return instance;\n}\nLiveEdgeFinder.__dashjs_factory_name = 'LiveEdgeFinder';\nvar factory = _coreFactoryMakerJs2['default'].getSingletonFactory(LiveEdgeFinder);\nfactory.LIVE_EDGE_NOT_FOUND_ERROR_CODE = LIVE_EDGE_NOT_FOUND_ERROR_CODE;\nexports['default'] = factory;\nmodule.exports = exports['default'];\n\n},{\"../../core/EventBus.js\":6,\"../../core/FactoryMaker.js\":7,\"../../core/events/Events.js\":9,\"../rules/RulesController.js\":69,\"../rules/synchronization/SynchronizationRulesCollection.js\":84,\"../vo/Error.js\":100}],93:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\n/**\n * @Module ObjectUtils\n * @description Provides utility functions for objects\n */\nfunction ObjectUtils() {\n\n var instance = undefined;\n\n /**\n * Returns true if objects resolve to the same string. Only really useful\n * when the user controls the object generation\n * @return {boolean}\n * @memberof module:ObjectUtils\n * @instance\n */\n function areSimpleEquivalent(obj1, obj2) {\n return JSON.stringify(obj1) === JSON.stringify(obj2);\n }\n\n instance = {\n areSimpleEquivalent: areSimpleEquivalent\n };\n\n return instance;\n}\n\nObjectUtils.__dashjs_factory_name = 'ObjectUtils';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(ObjectUtils);\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7}],94:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nfunction RequestModifier() {\n\n var instance = undefined;\n\n function modifyRequestURL(url) {\n return url;\n }\n\n function modifyRequestHeader(request) {\n return request;\n }\n\n instance = {\n modifyRequestURL: modifyRequestURL,\n modifyRequestHeader: modifyRequestHeader\n };\n\n return instance;\n}\n\nRequestModifier.__dashjs_factory_name = 'RequestModifier';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(RequestModifier);\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7}],95:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _externalsXml2jsonJs = _dereq_('../../../externals/xml2json.js');\n\nvar _externalsXml2jsonJs2 = _interopRequireDefault(_externalsXml2jsonJs);\n\nvar _coreDebugJs = _dereq_('../../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nvar SECONDS_IN_HOUR = 60 * 60; // Expression of an hour in seconds\nvar SECONDS_IN_MIN = 60; // Expression of a minute in seconds\n\nfunction TTMLParser() {\n\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n\n /*\n * This TTML parser follows \"EBU-TT-D SUBTITLING DISTRIBUTION FORMAT - tech3380\" spec - https://tech.ebu.ch/docs/tech/tech3380.pdf.\n * */\n var instance = undefined,\n timingRegex = undefined,\n ttml = undefined,\n // contains the whole ttml document received\n ttmlStyling = undefined,\n // contains the styling information from the document (from head following EBU-TT-D)\n ttmlLayout = undefined,\n // contains the positioning information from the document (from head following EBU-TT-D)\n fontSize = undefined,\n lineHeight = undefined,\n linePadding = undefined,\n defaultLayoutProperties = undefined,\n defaultStyleProperties = undefined,\n fontFamilies = undefined,\n textAlign = undefined,\n multiRowAlign = undefined,\n wrapOption = undefined,\n unicodeBidi = undefined,\n displayAlign = undefined,\n writingMode = undefined,\n videoModel = undefined;\n\n function setConfig(config) {\n if (!config) return;\n\n if (config.videoModel) {\n videoModel = config.videoModel;\n }\n }\n\n /**\n * Parse the raw data and process it to return the HTML element representing the cue.\n * Return the region to be processed and controlled (hide/show) by the caption controller.\n * @param data: raw data received from the TextSourceBuffer\n **/\n\n function parse(data, intervalStart, intervalEnd) {\n var tt = undefined,\n // Top element\n head = undefined,\n // head in tt\n body = undefined,\n // body in tt\n type = undefined;\n\n var errorMsg = '';\n\n var converter = new _externalsXml2jsonJs2['default']([], '', false);\n\n // Parse the TTML in a JSON object.\n ttml = converter.xml_str2json(data);\n\n if (!ttml) {\n throw 'TTML document could not be parsed';\n }\n\n if (videoModel.getTTMLRenderingDiv()) {\n type = 'html';\n }\n\n // Get the namespace if there is one defined in the JSON object.\n var ttNS = getNamespacePrefix(ttml, 'http://www.w3.org/ns/ttml');\n\n // Remove the namespace before each node if it exists:\n if (ttNS) {\n removeNamespacePrefix(ttml, ttNS);\n }\n\n // Check the document and compare to the specification (TTML and EBU-TT-D).\n tt = ttml.tt;\n if (!tt) {\n throw 'TTML document lacks tt element';\n }\n head = tt.head;\n if (!head) {\n throw 'TTML document lacks head element';\n }\n if (head.layout) {\n ttmlLayout = head.layout.region_asArray; //Mandatory in EBU-TT-D\n }\n if (head.styling) {\n ttmlStyling = head.styling.style_asArray; // Mandatory in EBU-TT-D\n }\n body = tt.body;\n if (!body) {\n throw 'TTML document lacks body element';\n }\n\n // Extract the cellResolution information\n var cellResolution = getCellResolution();\n\n // Recover the video width and height displayed by the player.\n var videoWidth = videoModel.getElement().clientWidth;\n var videoHeight = videoModel.getElement().clientHeight;\n\n // Compute the CellResolution unit in order to process properties using sizing (fontSize, linePadding, etc).\n var cellUnit = [videoWidth / cellResolution[0], videoHeight / cellResolution[1]];\n defaultStyleProperties['font-size'] = cellUnit[1] + 'px;';\n\n var regions = [];\n if (ttmlLayout) {\n for (var i = 0; i < ttmlLayout.length; i++) {\n regions.push(processRegion(JSON.parse(JSON.stringify(ttmlLayout[i])), cellUnit));\n }\n }\n\n // Get the namespace prefix.\n var nsttp = getNamespacePrefix(ttml.tt, 'http://www.w3.org/ns/ttml#parameter');\n\n // Set the framerate.\n if (ttml.tt.hasOwnProperty(nsttp + ':frameRate')) {\n ttml.tt.frameRate = parseInt(ttml.tt[nsttp + ':frameRate'], 10);\n }\n var captionArray = [];\n // Extract the div\n var divs = ttml.tt.body_asArray[0].__children;\n\n divs.forEach(function (div) {\n var cues = div.div.p_asArray;\n\n // Check if cues is not empty or undefined.\n if (!cues || cues.length === 0) {\n errorMsg = 'TTML document does not contain any cues';\n } else {\n\n /*** Parsing of every cue.\n *\n * cues: List of the cues found in the ttml parsing.\n * We iterate on this list.\n * cue: Every cue is parsed individually and creates an HTML element with its style and children.\n *\n * pElements: all the nodes that can be found in the paragraph.\n *\n * ***/\n\n // Caption array is the final result return containing all the cues' information.\n var pStartTime;\n var pEndTime;\n var spanStartTime;\n var spanEndTime;\n cues.forEach(function (cue) {\n\n // Obtain the start and end time of the cue.\n if (cue.hasOwnProperty('begin') && cue.hasOwnProperty('end')) {\n pStartTime = parseTimings(cue.begin);\n pEndTime = parseTimings(cue.end);\n } else if (cue.span.hasOwnProperty('begin') && cue.span.hasOwnProperty('end')) {\n spanStartTime = parseTimings(cue.span.begin);\n spanEndTime = parseTimings(cue.span.end);\n } else {\n errorMsg = 'TTML document has incorrect timing value';\n throw errorMsg;\n }\n var cueStartTime = spanStartTime || pStartTime;\n var cueEndTime = spanEndTime || pEndTime;\n\n if (typeof intervalStart !== 'undefined' && typeof intervalEnd !== 'undefined') {\n if (cueEndTime < intervalStart || cueStartTime > intervalEnd) {\n log('TTML: Cue interval ' + cueStartTime + '-' + cueEndTime + ' outside sample interval ' + intervalStart + '-' + intervalEnd + '. Dropped');\n return;\n } else {\n var clipped = false;\n var origStart = cueStartTime;\n var origEnd = cueEndTime;\n if (cueStartTime < intervalStart) {\n clipped = true;\n cueStartTime = intervalStart;\n }\n if (cueEndTime > intervalEnd) {\n clipped = true;\n cueEndTime = intervalEnd;\n }\n if (clipped) {\n log('TTML: Clipped cue ' + origStart + '-' + origEnd + ' to ' + cueStartTime + '-' + cueEndTime);\n }\n }\n }\n\n if (cue['smpte:backgroundImage'] !== undefined) {\n var images = ttml.tt.head.metadata.image_asArray;\n for (var j = 0; j < images.length; j++) {\n if ('#' + images[j]['xml:id'] == cue['smpte:backgroundImage']) {\n captionArray.push({\n start: cueStartTime,\n end: cueEndTime,\n id: images[j]['xml:id'],\n data: 'data:image/' + images[j].imagetype.toLowerCase() + ';base64, ' + images[j].__text,\n type: 'image'\n });\n }\n }\n } else if (type === 'html') {\n lineHeight = {};\n linePadding = {};\n fontSize = {};\n var cueID = '';\n if (cue.hasOwnProperty('id') || cue.hasOwnProperty('xml:id')) {\n cueID = cue['xml:id'] || cue.id;\n }\n // Error if timing is not specified.\n // TODO: check with the specification what is allowed.\n if ((isNaN(pStartTime) || isNaN(pEndTime)) && (isNaN(spanStartTime) || isNaN(spanEndTime))) {\n errorMsg = 'TTML document has incorrect timing value';\n throw errorMsg;\n }\n\n /**\n * Find the region defined for the cue.\n */\n // properties to be put in the \"captionRegion\" HTML element.\n var cueRegionProperties = constructCueRegion(cue, div.div, cellUnit);\n\n /**\n * Find the style defined for the cue.\n */\n // properties to be put in the \"paragraph\" HTML element.\n var cueStyleProperties = constructCueStyle(cue, cellUnit);\n\n /**\n * /!\\ Create the cue HTML Element containing the whole cue.\n */\n var styleIDs = cueStyleProperties[1];\n cueStyleProperties = cueStyleProperties[0];\n\n // Final cue HTML element.\n var cueParagraph = document.createElement('div');\n cueParagraph.className = styleIDs;\n\n // Stock the element in the subtitle (in p) in an array (in case there are only one value).\n var pElements = cue.__children;\n\n // Create an wrapper containing the cue information about unicodeBidi and direction\n // as they need to be defined on at this level.\n // We append to the wrapper the cue itself.\n var cueDirUniWrapper = constructCue(pElements, cellUnit);\n cueDirUniWrapper.className = 'cueDirUniWrapper';\n\n // If the style defines these two properties, we place them in cueContainer\n // and delete them from the cue style so it is not added afterwards to the final cue.\n if (arrayContains('unicode-bidi', cueStyleProperties)) {\n cueDirUniWrapper.style.cssText += getPropertyFromArray('unicode-bidi', cueStyleProperties);\n deletePropertyFromArray('unicode-bidi', cueStyleProperties);\n }\n if (arrayContains('direction', cueStyleProperties)) {\n cueDirUniWrapper.style.cssText += getPropertyFromArray('direction', cueStyleProperties);\n deletePropertyFromArray('direction', cueStyleProperties);\n }\n\n // Apply the linePadding property if it is specified in the cue style.\n if (arrayContains('padding-left', cueStyleProperties) && arrayContains('padding-right', cueStyleProperties)) {\n cueDirUniWrapper.innerHTML = applyLinePadding(cueDirUniWrapper, cueStyleProperties);\n }\n\n /**\n * Clean and set the style and region for the cue to be returned.\n */\n\n // Remove the line padding property from being added at the \"paragraph\" element level.\n if (arrayContains('padding-left', cueStyleProperties) && arrayContains('padding-right', cueStyleProperties)) {\n deletePropertyFromArray('padding-left', cueStyleProperties);\n deletePropertyFromArray('padding-right', cueStyleProperties);\n }\n\n // Remove the ID of the region from being added at the \"paragraph\" element level.\n var regionID = '';\n if (arrayContains('regionID', cueRegionProperties)) {\n var wholeRegionID = getPropertyFromArray('regionID', cueRegionProperties);\n regionID = wholeRegionID.slice(wholeRegionID.indexOf(':') + 1, wholeRegionID.length - 1);\n }\n\n // We link the p style to the finale cueParagraph element.\n if (cueStyleProperties) {\n cueParagraph.style.cssText = cueStyleProperties.join(' ') + 'display:flex;';\n }\n // We define the CSS style for the cue region.\n if (cueRegionProperties) {\n cueRegionProperties = cueRegionProperties.join(' ');\n }\n\n // We then place the cue wrapper inside the paragraph element.\n cueParagraph.appendChild(cueDirUniWrapper);\n\n // Final cue.\n var finalCue = document.createElement('div');\n finalCue.appendChild(cueParagraph);\n finalCue.id = 'subtitle_' + cueID;\n finalCue.style.cssText = 'position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;' + cueRegionProperties;\n\n if (Object.keys(fontSize).length === 0) {\n fontSize.defaultFontSize = '100';\n }\n\n // We add all the cue information in captionArray.\n captionArray.push({\n start: cueStartTime,\n end: cueEndTime,\n type: 'html',\n cueHTMLElement: finalCue,\n regions: regions,\n regionID: regionID,\n cueID: cueID,\n videoHeight: videoHeight,\n videoWidth: videoWidth,\n cellResolution: cellResolution,\n fontSize: fontSize || {\n defaultFontSize: '100'\n },\n lineHeight: lineHeight,\n linePadding: linePadding\n });\n } else {\n var text = '';\n var textElements = cue.__children;\n if (textElements.length) {\n textElements.forEach(function (el) {\n if (el.hasOwnProperty('span')) {\n var spanElements = el.span.__children;\n spanElements.forEach(function (spanEl) {\n // If metadata is present, do not process.\n if (spanElements.hasOwnProperty('metadata')) {\n return;\n }\n // If the element is a string\n if (spanEl.hasOwnProperty('#text')) {\n text += spanEl['#text'].replace(/[\\r\\n]+/gm, ' ').trim();\n // If the element is a 'br' tag\n } else if ('br' in spanEl) {\n // Create a br element.\n text += '\\n';\n }\n });\n } else if (el.hasOwnProperty('br')) {\n text += '\\n';\n } else {\n text += el['#text'].replace(/[\\r\\n]+/gm, ' ').trim();\n }\n });\n }\n\n captionArray.push({\n start: cueStartTime,\n end: cueEndTime,\n data: text,\n type: 'text'\n });\n }\n });\n }\n });\n\n if (errorMsg !== '') {\n log(errorMsg);\n }\n\n if (captionArray.length > 0) {\n return captionArray;\n } else {\n throw errorMsg;\n }\n }\n\n function setup() {\n /*\n * This TTML parser follows \"EBU-TT-D SUBTITLING DISTRIBUTION FORMAT - tech3380\" spec - https://tech.ebu.ch/docs/tech/tech3380.pdf.\n * */\n timingRegex = /^([0-9][0-9]+):([0-5][0-9]):([0-5][0-9])|(60)(\\.([0-9])+)?$/; // Regex defining the time\n fontSize = {};\n lineHeight = {};\n linePadding = {};\n defaultLayoutProperties = {\n 'top': '85%;',\n 'left': '5%;',\n 'width': '90%;',\n 'height': '10%;',\n 'align-items': 'flex-start;',\n 'overflow': 'visible;',\n '-ms-writing-mode': 'lr-tb, horizontal-tb;',\n '-webkit-writing-mode': 'horizontal-tb;',\n '-moz-writing-mode': 'horizontal-tb;',\n 'writing-mode': 'horizontal-tb;'\n };\n defaultStyleProperties = {\n 'color': 'rgb(255,255,255);',\n 'direction': 'ltr;',\n 'font-family': 'monospace, sans-serif;',\n 'font-style': 'normal;',\n 'line-height': 'normal;',\n 'font-weight': 'normal;',\n 'text-align': 'start;',\n 'justify-content': 'flex-start;',\n 'text-decoration': 'none;',\n 'unicode-bidi': 'normal;',\n 'white-space': 'normal;',\n 'width': '100%;'\n };\n fontFamilies = {\n monospace: 'font-family: monospace;',\n sansSerif: 'font-family: sans-serif;',\n serif: 'font-family: serif;',\n monospaceSansSerif: 'font-family: monospace, sans-serif;',\n monospaceSerif: 'font-family: monospace, serif;',\n proportionalSansSerif: 'font-family: Arial;',\n proportionalSerif: 'font-family: Times New Roman;',\n 'default': 'font-family: monospace, sans-serif;'\n };\n textAlign = {\n right: ['justify-content: flex-end;', 'text-align: right;'],\n start: ['justify-content: flex-start;', 'text-align: start;'],\n center: ['justify-content: center;', 'text-align: center;'],\n end: ['justify-content: flex-end;', 'text-align: end;'],\n left: ['justify-content: flex-start;', 'text-align: left;']\n };\n multiRowAlign = {\n start: 'text-align: start;',\n center: 'text-align: center;',\n end: 'text-align: end;',\n auto: ''\n };\n wrapOption = {\n wrap: 'white-space: normal;',\n noWrap: 'white-space: nowrap;'\n };\n unicodeBidi = {\n normal: 'unicode-bidi: normal;',\n embed: 'unicode-bidi: embed;',\n bidiOverride: 'unicode-bidi: bidi-override;'\n };\n displayAlign = {\n before: 'align-items: flex-start;',\n center: 'align-items: center;',\n after: 'align-items: flex-end;'\n };\n writingMode = {\n lrtb: '-webkit-writing-mode: horizontal-tb;' + 'writing-mode: horizontal-tb;',\n rltb: '-webkit-writing-mode: horizontal-tb;' + 'writing-mode: horizontal-tb;' + 'direction: rtl;' + 'unicode-bidi: bidi-override;',\n tbrl: '-webkit-writing-mode: vertical-rl;' + 'writing-mode: vertical-rl;' + '-webkit-text-orientation: upright;' + 'text-orientation: upright;',\n tblr: '-webkit-writing-mode: vertical-lr;' + 'writing-mode: vertical-lr;' + '-webkit-text-orientation: upright;' + 'text-orientation: upright;',\n lr: '-webkit-writing-mode: horizontal-tb;' + 'writing-mode: horizontal-tb;',\n rl: '-webkit-writing-mode: horizontal-tb;' + 'writing-mode: horizontal-tb;' + 'direction: rtl;',\n tb: '-webkit-writing-mode: vertical-rl;' + 'writing-mode: vertical-rl;' + '-webkit-text-orientation: upright;' + 'text-orientation: upright;'\n };\n }\n\n function parseTimings(timingStr) {\n // Test if the time provided by the caption is valid.\n var test = timingRegex.test(timingStr);\n var timeParts, parsedTime, frameRate;\n\n if (!test) {\n // Return NaN so it will throw an exception at internalParse if the time is incorrect.\n return NaN;\n }\n\n timeParts = timingStr.split(':');\n\n // Process the timings by decomposing it and converting it in numbers.\n parsedTime = parseFloat(timeParts[0]) * SECONDS_IN_HOUR + parseFloat(timeParts[1]) * SECONDS_IN_MIN + parseFloat(timeParts[2]);\n\n // In case a frameRate is provided, we adjust the parsed time.\n if (timeParts[3]) {\n frameRate = ttml.tt.frameRate;\n if (frameRate && !isNaN(frameRate)) {\n parsedTime += parseFloat(timeParts[3]) / frameRate;\n } else {\n return NaN;\n }\n }\n return parsedTime;\n }\n\n function getNamespacePrefix(json, ns) {\n // Obtain the namespace prefix.\n var r = Object.keys(json).filter(function (k) {\n return (k.split(':')[0] === 'xmlns' || k.split(':')[1] === 'xmlns') && json[k] === ns;\n }).map(function (k) {\n return k.split(':')[2] || k.split(':')[1];\n });\n if (r.length != 1) {\n return null;\n }\n return r[0];\n }\n\n function removeNamespacePrefix(json, nsPrefix) {\n for (var key in json) {\n if (json.hasOwnProperty(key)) {\n if ((typeof json[key] === 'object' || json[key] instanceof Object) && !Array.isArray(json[key])) {\n removeNamespacePrefix(json[key], nsPrefix);\n } else if (Array.isArray(json[key])) {\n for (var i = 0; i < json[key].length; i++) {\n removeNamespacePrefix(json[key][i], nsPrefix);\n }\n }\n var newKey = key.slice(key.indexOf(nsPrefix) + nsPrefix.length + 1);\n json[newKey] = json[key];\n delete json[key];\n }\n }\n }\n\n // backgroundColor = background-color, convert from camelCase to dash.\n function camelCaseToDash(key) {\n return key.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n }\n\n // Convert an RGBA value written in Hex to rgba(v,v,v,a).\n function convertHexToRGBA(rgba) {\n // Get the hexadecimal value without the #.\n var hex = rgba.slice(1);\n // Separate the values in pairs.\n var hexMatrice = hex.match(/.{2}/g);\n // Convert the alpha value in decimal between 0 and 1.\n var alpha = parseFloat(parseInt(parseInt(hexMatrice[3], 16) / 255 * 1000, 10) / 1000);\n // Get the standard RGB value.\n var rgb = hexMatrice.slice(0, 3).map(function (i) {\n return parseInt(i, 16);\n });\n // Return the RGBA value for CSS.\n return 'rgba(' + rgb.join(',') + ',' + alpha + ');';\n }\n\n // Return whether or not an array contains a certain text\n function arrayContains(text, array) {\n for (var i = 0; i < array.length; i++) {\n if (array[i].indexOf(text) > -1) {\n return true;\n }\n }\n return false;\n }\n\n // Return the whole value that contains \"text\"\n function getPropertyFromArray(text, array) {\n for (var i = 0; i < array.length; i++) {\n if (array[i].indexOf(text) > -1) {\n return array[i];\n }\n }\n return null;\n }\n\n // Delete a a property from an array.\n function deletePropertyFromArray(property, array) {\n array.splice(array.indexOf(getPropertyFromArray(property, array)), 1);\n }\n\n function mergeArrays(primeArray, arrayToAdd) {\n for (var i = 0; i < primeArray.length; i++) {\n for (var j = 0; j < arrayToAdd.length; j++) {\n // Take only the name of the property\n if (primeArray[i]) {\n if (primeArray[i].split(':')[0].indexOf(arrayToAdd[j].split(':')[0]) > -1) {\n primeArray.splice(i, 1);\n }\n }\n }\n }\n return primeArray.concat(arrayToAdd);\n }\n\n /**\n * Processing of styling information:\n * - processStyle: return an array of strings with the cue style under a CSS style form.\n * - findStyleFromID: Return the unprocessed style from TTMLStyling corresponding to the ID researched.\n * - getProcessedStyle: Return the processed style(s) from the ID(s) received in entry.\n * **/\n\n // Compute the style properties to return an array with the cleaned properties.\n function processStyle(cueStyle, cellUnit) {\n var properties = [];\n\n // Clean up from the xml2json parsing:\n for (var key in cueStyle) {\n if (cueStyle.hasOwnProperty(key)) {\n //Clean the properties from the parsing.\n var newKey = key.replace('ebutts:', '');\n newKey = newKey.replace('xml:', '');\n newKey = newKey.replace('tts:', '');\n\n // Clean the properties' names.\n newKey = camelCaseToDash(newKey);\n cueStyle[newKey] = cueStyle[key];\n delete cueStyle[key];\n }\n }\n\n // Line padding is computed from the cellResolution.\n if ('line-padding' in cueStyle) {\n var valuePadding = parseFloat(cueStyle['line-padding'].slice(cueStyle['line-padding'].indexOf(':') + 1, cueStyle['line-padding'].indexOf('c')));\n if ('id' in cueStyle) {\n linePadding[cueStyle.id] = valuePadding;\n }\n var valuePaddingInPx = valuePadding * cellUnit[0] + 'px;';\n properties.push('padding-left:' + valuePaddingInPx);\n properties.push('padding-right:' + valuePaddingInPx);\n }\n // Font size is computed from the cellResolution.\n if ('font-size' in cueStyle) {\n var valueFtSize = parseFloat(cueStyle['font-size'].slice(cueStyle['font-size'].indexOf(':') + 1, cueStyle['font-size'].indexOf('%')));\n if ('id' in cueStyle) {\n fontSize[cueStyle.id] = valueFtSize;\n }\n var valueFtSizeInPx = valueFtSize / 100 * cellUnit[1] + 'px;';\n properties.push('font-size:' + valueFtSizeInPx);\n }\n // Line height is computed from the cellResolution.\n if ('line-height' in cueStyle) {\n if (cueStyle['line-height'] === 'normal') {\n properties.push('line-height: normal;');\n } else {\n var valueLHSize = parseFloat(cueStyle['line-height'].slice(cueStyle['line-height'].indexOf(':') + 1, cueStyle['line-height'].indexOf('%')));\n if ('id' in cueStyle) {\n lineHeight[cueStyle.id] = valueLHSize;\n }\n var valueLHSizeInPx = valueLHSize / 100 * cellUnit[1] + 'px;';\n properties.push('line-height' + ':' + valueLHSizeInPx);\n }\n }\n // Font-family can be specified by a generic family name or a custom family name.\n if ('font-family' in cueStyle) {\n if (cueStyle['font-family'] in fontFamilies) {\n properties.push(fontFamilies[cueStyle['font-family']]);\n } else {\n properties.push('font-family:' + cueStyle['font-family'] + ';');\n }\n }\n // Text align needs to be set from two properties:\n // The standard text-align CSS property.\n // The justify-content property as we use flex boxes.\n if ('text-align' in cueStyle) {\n if (cueStyle['text-align'] in textAlign) {\n properties.push(textAlign[cueStyle['text-align']][0]);\n properties.push(textAlign[cueStyle['text-align']][1]);\n }\n }\n // Multi Row align is set only by the text-align property.\n // TODO: TO CHECK\n if ('multi-row-align' in cueStyle) {\n if (arrayContains('text-align', properties) && cueStyle['multi-row-align'] != 'auto') {\n deletePropertyFromArray('text-align', properties);\n }\n if (cueStyle['multi-row-align'] in multiRowAlign) {\n properties.push(multiRowAlign[cueStyle['multi-row-align']]);\n }\n }\n // Background color can be specified from hexadecimal (RGB or RGBA) value.\n var rgbaValue;\n if ('background-color' in cueStyle) {\n if (cueStyle['background-color'].indexOf('#') > -1 && cueStyle['background-color'].length - 1 === 8) {\n rgbaValue = convertHexToRGBA(cueStyle['background-color']);\n properties.push('background-color: ' + rgbaValue);\n } else {\n properties.push('background-color:' + cueStyle['background-color'] + ';');\n }\n }\n // Color can be specified from hexadecimal (RGB or RGBA) value.\n if ('color' in cueStyle) {\n if (cueStyle.color.indexOf('#') > -1 && cueStyle.color.length - 1 === 8) {\n rgbaValue = convertHexToRGBA(cueStyle.color);\n properties.push('color: ' + rgbaValue);\n } else {\n properties.push('color:' + cueStyle.color + ';');\n }\n }\n // Wrap option is determined by the white-space CSS property.\n if ('wrap-option' in cueStyle) {\n if (cueStyle['wrap-option'] in wrapOption) {\n properties.push(wrapOption[cueStyle['wrap-option']]);\n } else {\n properties.push('white-space:' + cueStyle['wrap-option']);\n }\n }\n // Unicode bidi is determined by the unicode-bidi CSS property.\n if ('unicode-bidi' in cueStyle) {\n if (cueStyle['unicode-bidi'] in unicodeBidi) {\n properties.push(unicodeBidi[cueStyle['unicode-bidi']]);\n } else {\n properties.push('unicode-bidi:' + cueStyle['unicode-bidi']);\n }\n }\n\n // Standard properties identical to CSS.\n\n if ('font-style' in cueStyle) {\n properties.push('font-style:' + cueStyle['font-style'] + ';');\n }\n if ('font-weight' in cueStyle) {\n properties.push('font-weight:' + cueStyle['font-weight'] + ';');\n }\n if ('direction' in cueStyle) {\n properties.push('direction:' + cueStyle.direction + ';');\n }\n if ('text-decoration' in cueStyle) {\n properties.push('text-decoration:' + cueStyle['text-decoration'] + ';');\n }\n\n // Handle white-space preserve\n if (ttml.tt.hasOwnProperty('xml:space')) {\n if (ttml.tt['xml:space'] === 'preserve') {\n properties.push('white-space: pre;');\n }\n }\n\n return properties;\n }\n\n // Find the style set by comparing the style IDs available.\n // Return null if no style is found\n function findStyleFromID(ttmlStyling, cueStyleID) {\n // For every styles available, search the corresponding style in ttmlStyling.\n for (var j = 0; j < ttmlStyling.length; j++) {\n var currStyle = ttmlStyling[j];\n if (currStyle['xml:id'] === cueStyleID || currStyle.id === cueStyleID) {\n // Return the style corresponding to the ID in parameter.\n return currStyle;\n }\n }\n return null;\n }\n // Return the computed style from a certain ID.\n function getProcessedStyle(reference, cellUnit) {\n var styles = [];\n var ids = reference.match(/\\S+/g);\n ids.forEach(function (id) {\n // Find the style for each id received.\n var cueStyle = findStyleFromID(ttmlStyling, id);\n if (cueStyle) {\n // Process the style for the cue in CSS form.\n // Send a copy of the style object, so it does not modify the original by cleaning it.\n var stylesFromId = processStyle(JSON.parse(JSON.stringify(cueStyle)), cellUnit);\n styles = styles.concat(stylesFromId);\n }\n });\n return styles;\n }\n\n /**\n * Processing of layout information:\n * - processRegion: return an array of strings with the cue region under a CSS style form.\n * - findRegionFromID: Return the unprocessed region from TTMLLayout corresponding to the ID researched.\n * - getProcessedRegion: Return the processed region(s) from the ID(s) received in entry.\n ***/\n\n // Compute the region properties to return an array with the cleaned properties.\n function processRegion(cueRegion, cellUnit) {\n var properties = [];\n\n // Clean up from the xml2json parsing:\n for (var key in cueRegion) {\n //Clean the properties from the parsing.\n var newKey = key.replace('tts:', '');\n newKey = newKey.replace('xml:', '');\n\n // Clean the properties' names.\n newKey = camelCaseToDash(newKey);\n cueRegion[newKey] = cueRegion[key];\n if (newKey !== key) {\n delete cueRegion[key];\n }\n }\n // Extent property corresponds to width and height\n if ('extent' in cueRegion) {\n var coordsExtent = cueRegion.extent.split(/\\s/);\n properties.push('width: ' + coordsExtent[0] + ';');\n properties.push('height: ' + coordsExtent[1] + ';');\n }\n // Origin property corresponds to top and left\n if ('origin' in cueRegion) {\n var coordsOrigin = cueRegion.origin.split(/\\s/);\n properties.push('left: ' + coordsOrigin[0] + ';');\n properties.push('top: ' + coordsOrigin[1] + ';');\n }\n // DisplayAlign property corresponds to vertical-align\n if ('display-align' in cueRegion) {\n properties.push(displayAlign[cueRegion['display-align']]);\n }\n // WritingMode is not yet implemented (for CSS3, to come)\n if ('writing-mode' in cueRegion) {\n properties.push(writingMode[cueRegion['writing-mode']]);\n }\n // Style will give to the region the style properties from the style selected\n if ('style' in cueRegion) {\n var styleFromID = getProcessedStyle(cueRegion.style, cellUnit);\n properties = properties.concat(styleFromID);\n }\n\n // Standard properties identical to CSS.\n\n if ('padding' in cueRegion) {\n properties.push('padding:' + cueRegion.padding + ';');\n }\n if ('overflow' in cueRegion) {\n properties.push('overflow:' + cueRegion.overflow + ';');\n }\n if ('show-background' in cueRegion) {\n properties.push('show-background:' + cueRegion['show-background'] + ';');\n }\n if ('id' in cueRegion) {\n properties.push('regionID:' + cueRegion.id + ';');\n }\n\n return properties;\n }\n\n // Find the region set by comparing the region IDs available.\n // Return null if no region is found\n function findRegionFromID(ttmlLayout, cueRegionID) {\n // For every region available, search the corresponding style in ttmlLayout.\n for (var j = 0; j < ttmlLayout.length; j++) {\n var currReg = ttmlLayout[j];\n if (currReg['xml:id'] === cueRegionID || currReg.id === cueRegionID) {\n // Return the region corresponding to the ID in parameter.\n return currReg;\n }\n }\n return null;\n }\n\n // Return the computed region from a certain ID.\n function getProcessedRegion(reference, cellUnit) {\n var regions = [];\n var ids = reference.match(/\\S+/g);\n ids.forEach(function (id) {\n // Find the region for each id received.\n var cueRegion = findRegionFromID(ttmlLayout, id);\n if (cueRegion) {\n // Process the region for the cue in CSS form.\n // Send a copy of the style object, so it does not modify the original by cleaning it.\n var regionsFromId = processRegion(JSON.parse(JSON.stringify(cueRegion)), cellUnit);\n regions = regions.concat(regionsFromId);\n }\n });\n return regions;\n }\n\n //Return the cellResolution defined by the TTML document.\n function getCellResolution() {\n var defaultCellResolution = [32, 15]; // Default cellResolution.\n if (ttml.tt.hasOwnProperty('ttp:cellResolution')) {\n return ttml.tt['ttp:cellResolution'].split(' ').map(parseFloat);\n } else {\n return defaultCellResolution;\n }\n }\n\n // Return the cue wrapped into a span specifying its linePadding.\n function applyLinePadding(cueHTML, cueStyle) {\n // Extract the linePadding property from cueStyleProperties.\n var linePaddingLeft = getPropertyFromArray('padding-left', cueStyle);\n var linePaddingRight = getPropertyFromArray('padding-right', cueStyle);\n var linePadding = linePaddingLeft.concat(' ' + linePaddingRight + ' ');\n\n // Declaration of the HTML elements to be used in the cue innerHTML construction.\n var outerHTMLBeforeBr = '';\n var outerHTMLAfterBr = '';\n var cueInnerHTML = '';\n\n // List all the nodes of the subtitle.\n var nodeList = Array.prototype.slice.call(cueHTML.children);\n // Take a br element as reference.\n var brElement = cueHTML.getElementsByClassName('lineBreak')[0];\n // First index of the first br element.\n var idx = nodeList.indexOf(brElement);\n // array of all the br element indices\n var indices = [];\n // Find all the indices of the br elements.\n while (idx != -1) {\n indices.push(idx);\n idx = nodeList.indexOf(brElement, idx + 1);\n }\n\n // Strings for the cue innerHTML construction.\n var spanStringEnd = '<\\/span>';\n var br = '
';\n var clonePropertyString = '' + outerHTMLBeforeBr;\n }\n // For every element of the list, we compute the element coming after the line break.s\n var styleAfter = '';\n // for each element coming after the line break, we add its HTML.\n for (var k = i + 1; k < nodeList.length; k++) {\n outerHTMLAfterBr += nodeList[k].outerHTML;\n // If this is the last element, we add its style to the wrapper.\n if (k === nodeList.length - 1) {\n styleAfter += linePadding.concat(nodeList[k].style.cssText);\n }\n }\n\n // The before element will comprises the clone property (for line wrapping), the style that\n // need to be applied (ex: background-color) and the rest og the HTML.\n outerHTMLAfterBr = clonePropertyString + styleAfter + '\">' + outerHTMLAfterBr;\n\n // For each line break we must add the before and/or after element to the final cue as well as\n // the line break when needed.\n if (outerHTMLBeforeBr && outerHTMLAfterBr && index === indices.length - 1) {\n cueInnerHTML += outerHTMLBeforeBr + spanStringEnd + br + outerHTMLAfterBr + spanStringEnd;\n } else if (outerHTMLBeforeBr && outerHTMLAfterBr && index !== indices.length - 1) {\n cueInnerHTML += outerHTMLBeforeBr + spanStringEnd + br + outerHTMLAfterBr + spanStringEnd + br;\n } else if (outerHTMLBeforeBr && !outerHTMLAfterBr) {\n cueInnerHTML += outerHTMLBeforeBr + spanStringEnd;\n } else if (!outerHTMLBeforeBr && outerHTMLAfterBr && index === indices.length - 1) {\n cueInnerHTML += outerHTMLAfterBr + spanStringEnd;\n } else if (!outerHTMLBeforeBr && outerHTMLAfterBr && index !== indices.length - 1) {\n cueInnerHTML += outerHTMLAfterBr + spanStringEnd + br;\n }\n });\n } else {\n // If there is no line break in the subtitle, we simply wrap cue in a span indicating the linePadding.\n var style = '';\n for (var k = 0; k < nodeList.length; k++) {\n style += nodeList[k].style.cssText;\n }\n cueInnerHTML = clonePropertyString + linePadding + style + '\">' + cueHTML.innerHTML + spanStringEnd;\n }\n return cueInnerHTML;\n }\n\n /*** Create the cue element\n * I. The cues are text only:\n * i) The cue contains a 'br' element\n * ii) The cue contains a span element\n * iii) The cue contains text\n * ***/\n\n function constructCue(cueElements, cellUnit) {\n var cue = document.createElement('div');\n cueElements.forEach(function (el) {\n // If metadata is present, do not process.\n if (el.hasOwnProperty('metadata')) {\n return;\n }\n\n /**\n * If the p element contains spans: create the span elements.\n */\n if (el.hasOwnProperty('span')) {\n\n // Stock the span subtitles in an array (in case there are only one value).\n var spanElements = el.span.__children;\n\n // Create the span element.\n var spanHTMLElement = document.createElement('span');\n // Extract the style of the span.\n if (el.span.hasOwnProperty('style')) {\n var spanStyle = getProcessedStyle(el.span.style, cellUnit);\n spanHTMLElement.className = 'spanPadding ' + el.span.style;\n spanHTMLElement.style.cssText = spanStyle.join(' ');\n }\n\n // if the span has more than one element, we check for each of them their nature (br or text).\n spanElements.forEach(function (spanEl) {\n // If metadata is present, do not process.\n if (spanElements.hasOwnProperty('metadata')) {\n return;\n }\n // If the element is a string\n if (spanEl.hasOwnProperty('#text')) {\n var textNode = document.createTextNode(spanEl['#text']);\n spanHTMLElement.appendChild(textNode);\n // If the element is a 'br' tag\n } else if ('br' in spanEl) {\n // To handle br inside span we need to add the current span\n // to the cue and then create a br and add that the cue\n // then create a new span that we use for the next line of\n // text, that is a copy of the current span\n\n // Add the current span to the cue, only if it has childNodes (text)\n if (spanHTMLElement.hasChildNodes()) {\n cue.appendChild(spanHTMLElement);\n }\n\n // Create a br and add that to the cue\n var brEl = document.createElement('br');\n brEl.className = 'lineBreak';\n cue.appendChild(brEl);\n\n // Create an replacement span and copy the style and classname from the old one\n var newSpanHTMLElement = document.createElement('span');\n newSpanHTMLElement.className = spanHTMLElement.className;\n newSpanHTMLElement.style.cssText = spanHTMLElement.style.cssText;\n\n // Replace the current span with the one we just created\n spanHTMLElement = newSpanHTMLElement;\n }\n });\n // We append the element to the cue container.\n cue.appendChild(spanHTMLElement);\n }\n\n /**\n * Create a br element if there is one in the cue.\n */\n else if (el.hasOwnProperty('br')) {\n // We append the line break to the cue container.\n var brEl = document.createElement('br');\n brEl.className = 'lineBreak';\n cue.appendChild(brEl);\n }\n\n /**\n * Add the text that is not in any inline element\n */\n else if (el.hasOwnProperty('#text')) {\n // Add the text to an individual span element (to add line padding if it is defined).\n var textNode = document.createElement('span');\n textNode.textContent = el['#text'];\n\n // We append the element to the cue container.\n cue.appendChild(textNode);\n }\n });\n return cue;\n }\n\n function constructCueRegion(cue, div, cellUnit) {\n var cueRegionProperties = []; // properties to be put in the \"captionRegion\" HTML element\n // Obtain the region ID(s) assigned to the cue.\n var pRegionID = cue.region;\n // If div has a region.\n var divRegionID = div.region;\n\n var divRegion;\n var pRegion;\n\n // If the div element reference a region.\n if (divRegionID) {\n divRegion = getProcessedRegion(divRegionID, cellUnit);\n }\n // If the p element reference a region.\n if (pRegionID) {\n pRegion = cueRegionProperties.concat(getProcessedRegion(pRegionID, cellUnit));\n if (divRegion) {\n cueRegionProperties = mergeArrays(divRegion, pRegion);\n } else {\n cueRegionProperties = pRegion;\n }\n } else if (divRegion) {\n cueRegionProperties = divRegion;\n }\n\n // Add initial/default values to what's not defined in the layout:\n applyDefaultProperties(cueRegionProperties, defaultLayoutProperties);\n\n return cueRegionProperties;\n }\n\n function constructCueStyle(cue, cellUnit) {\n var cueStyleProperties = []; // properties to be put in the \"paragraph\" HTML element\n // Obtain the style ID(s) assigned to the cue.\n var pStyleID = cue.style;\n // If body has a style.\n var bodyStyleID = ttml.tt.body.style;\n // If div has a style.\n var divStyleID = ttml.tt.body.div.style;\n\n var bodyStyle;\n var divStyle;\n var pStyle;\n var styleIDs = '';\n\n // If the body element reference a style.\n if (bodyStyleID) {\n bodyStyle = getProcessedStyle(bodyStyleID, cellUnit);\n styleIDs = 'paragraph ' + bodyStyleID;\n }\n\n // If the div element reference a style.\n if (divStyleID) {\n divStyle = getProcessedStyle(divStyleID, cellUnit);\n if (bodyStyle) {\n divStyle = mergeArrays(bodyStyle, divStyle);\n styleIDs += ' ' + divStyleID;\n } else {\n styleIDs = 'paragraph ' + divStyleID;\n }\n }\n\n // If the p element reference a style.\n if (pStyleID) {\n pStyle = getProcessedStyle(pStyleID, cellUnit);\n if (bodyStyle && divStyle) {\n cueStyleProperties = mergeArrays(divStyle, pStyle);\n styleIDs += ' ' + pStyleID;\n } else if (bodyStyle) {\n cueStyleProperties = mergeArrays(bodyStyle, pStyle);\n styleIDs += ' ' + pStyleID;\n } else if (divStyle) {\n cueStyleProperties = mergeArrays(divStyle, pStyle);\n styleIDs += ' ' + pStyleID;\n } else {\n cueStyleProperties = pStyle;\n styleIDs = 'paragraph ' + pStyleID;\n }\n } else if (bodyStyle && !divStyle) {\n cueStyleProperties = bodyStyle;\n } else if (!bodyStyle && divStyle) {\n cueStyleProperties = divStyle;\n }\n\n // Add initial/default values to what's not defined in the styling:\n applyDefaultProperties(cueStyleProperties, defaultStyleProperties);\n\n return [cueStyleProperties, styleIDs];\n }\n\n function applyDefaultProperties(array, defaultProperties) {\n for (var key in defaultProperties) {\n if (defaultProperties.hasOwnProperty(key)) {\n if (!arrayContains(key, array)) {\n array.push(key + ':' + defaultProperties[key]);\n }\n }\n }\n }\n\n instance = {\n parse: parse,\n setConfig: setConfig\n };\n\n setup();\n return instance;\n}\nTTMLParser.__dashjs_factory_name = 'TTMLParser';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(TTMLParser);\nmodule.exports = exports['default'];\n\n},{\"../../../externals/xml2json.js\":3,\"../../core/Debug.js\":5,\"../../core/FactoryMaker.js\":7}],96:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\n/**\n * @Module URLUtils\n * @description Provides utility functions for operating on URLs.\n * Initially this is simply a method to determine the Base URL of a URL, but\n * should probably include other things provided all over the place such as\n * determining whether a URL is relative/absolute, resolving two paths etc.\n */\nfunction URLUtils() {\n\n var instance = undefined;\n\n var absUrl = /^(?:(?:[a-z]+:)?\\/)?\\//i;\n\n /**\n * Returns a string that contains the Base URL of a URL, if determinable.\n * @return {string}\n * @memberof module:URLUtils\n * @instance\n */\n function parseBaseUrl(url) {\n var base = '';\n\n if (url.indexOf('/') !== -1) {\n if (url.indexOf('?') !== -1) {\n url = url.substring(0, url.indexOf('?'));\n }\n base = url.substring(0, url.lastIndexOf('/') + 1);\n }\n\n return base;\n }\n\n /**\n * Determines whether the url is relative.\n * @return {bool}\n * @param {string} url\n * @memberof module:URLUtils\n * @instance\n */\n function isRelative(url) {\n return !absUrl.test(url);\n }\n\n instance = {\n parseBaseUrl: parseBaseUrl,\n isRelative: isRelative\n };\n\n return instance;\n}\n\nURLUtils.__dashjs_factory_name = 'URLUtils';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(URLUtils);\nmodule.exports = exports['default'];\n\n},{\"../../core/FactoryMaker.js\":7}],97:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _coreFactoryMakerJs = _dereq_('../../core/FactoryMaker.js');\n\nvar _coreFactoryMakerJs2 = _interopRequireDefault(_coreFactoryMakerJs);\n\nvar _coreDebugJs = _dereq_('../../core/Debug.js');\n\nvar _coreDebugJs2 = _interopRequireDefault(_coreDebugJs);\n\nfunction VTTParser() {\n var context = this.context;\n var log = (0, _coreDebugJs2['default'])(context).getInstance().log;\n\n var instance = undefined,\n regExNewLine = undefined,\n regExToken = undefined,\n regExWhiteSpace = undefined,\n regExWhiteSpaceWordBoundary = undefined;\n\n function setup() {\n regExNewLine = /(?:\\r\\n|\\r|\\n)/gm;\n regExToken = /-->/;\n regExWhiteSpace = /(^[\\s]+|[\\s]+$)/g;\n regExWhiteSpaceWordBoundary = /\\s\\b/g;\n }\n\n function parse(data) {\n var captionArray = [];\n var len, lastStartTime;\n\n data = data.split(regExNewLine);\n len = data.length;\n lastStartTime = -1;\n\n for (var i = 0; i < len; i++) {\n var item = data[i];\n\n if (item.length > 0 && item !== 'WEBVTT') {\n if (item.match(regExToken)) {\n var attributes = parseItemAttributes(item);\n var cuePoints = attributes.cuePoints;\n var styles = attributes.styles;\n var text = getSublines(data, i + 1);\n var startTime = convertCuePointTimes(cuePoints[0].replace(regExWhiteSpace, ''));\n var endTime = convertCuePointTimes(cuePoints[1].replace(regExWhiteSpace, ''));\n\n if (!isNaN(startTime) && !isNaN(endTime) && startTime >= lastStartTime && endTime > startTime) {\n if (text !== '') {\n lastStartTime = startTime;\n //TODO Make VO external so other parsers can use.\n captionArray.push({\n start: startTime,\n end: endTime,\n data: text,\n styles: styles\n });\n } else {\n log('Skipping cue due to empty/malformed cue text');\n }\n } else {\n log('Skipping cue due to incorrect cue timing');\n }\n }\n }\n }\n\n return captionArray;\n }\n\n function convertCuePointTimes(time) {\n var timeArray = time.split(':');\n var len = timeArray.length - 1;\n\n time = parseInt(timeArray[len - 1], 10) * 60 + parseFloat(timeArray[len]);\n\n if (len === 2) {\n time += parseInt(timeArray[0], 10) * 3600;\n }\n\n return time;\n }\n\n function parseItemAttributes(data) {\n var vttCuePoints = data.split(regExToken);\n var arr = vttCuePoints[1].split(regExWhiteSpaceWordBoundary);\n arr.shift(); //remove first array index it is empty...\n vttCuePoints[1] = arr[0];\n arr.shift();\n return { cuePoints: vttCuePoints, styles: getCaptionStyles(arr) };\n }\n\n function getCaptionStyles(arr) {\n var styleObject = {};\n arr.forEach(function (element) {\n if (element.split(/:/).length > 1) {\n var val = element.split(/:/)[1];\n if (val && val.search(/%/) != -1) {\n val = parseInt(val.replace(/%/, ''), 10);\n }\n if (element.match(/align/) || element.match(/A/)) {\n styleObject.align = val;\n }\n if (element.match(/line/) || element.match(/L/)) {\n styleObject.line = val;\n }\n if (element.match(/position/) || element.match(/P/)) {\n styleObject.position = val;\n }\n if (element.match(/size/) || element.match(/S/)) {\n styleObject.size = val;\n }\n }\n });\n\n return styleObject;\n }\n\n /**\n * VTT can have multiple lines to display per cuepoint.\n * */\n function getSublines(data, idx) {\n var i = idx;\n\n var subline = '';\n var lineData = '';\n var lineCount;\n\n while (data[i] !== '' && i < data.length) {\n i++;\n }\n\n lineCount = i - idx;\n if (lineCount > 1) {\n for (var j = 0; j < lineCount; j++) {\n lineData = data[idx + j];\n if (!lineData.match(regExToken)) {\n subline += lineData;\n if (j !== lineCount - 1) {\n subline += '\\n';\n }\n } else {\n // caption text should not have '-->' in it\n subline = '';\n break;\n }\n }\n } else {\n lineData = data[idx];\n if (!lineData.match(regExToken)) subline = lineData;\n }\n return decodeURI(subline);\n }\n\n instance = {\n parse: parse\n };\n\n setup();\n return instance;\n}\nVTTParser.__dashjs_factory_name = 'VTTParser';\nexports['default'] = _coreFactoryMakerJs2['default'].getSingletonFactory(VTTParser);\nmodule.exports = exports['default'];\n\n},{\"../../core/Debug.js\":5,\"../../core/FactoryMaker.js\":7}],98:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar BitrateInfo = function BitrateInfo() {\n _classCallCheck(this, BitrateInfo);\n\n this.mediaType = null;\n this.bitrate = null;\n this.width = null;\n this.height = null;\n this.qualityIndex = NaN;\n};\n\nexports[\"default\"] = BitrateInfo;\nmodule.exports = exports[\"default\"];\n\n},{}],99:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n * @class\n * @ignore\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar DataChunk =\n//Represents a data structure that keep all the necessary info about a single init/media segment\nfunction DataChunk() {\n _classCallCheck(this, DataChunk);\n\n this.streamId = null;\n this.mediaInfo = null;\n this.segmentType = null;\n this.quality = NaN;\n this.index = NaN;\n this.bytes = null;\n this.start = NaN;\n this.end = NaN;\n this.duration = NaN;\n};\n\nexports[\"default\"] = DataChunk;\nmodule.exports = exports[\"default\"];\n\n},{}],100:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar Error = function Error(code, message, data) {\n _classCallCheck(this, Error);\n\n this.code = code || null;\n this.message = message || null;\n this.data = data || null;\n};\n\nexports[\"default\"] = Error;\nmodule.exports = exports[\"default\"];\n\n},{}],101:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar FragmentRequest = function FragmentRequest() {\n _classCallCheck(this, FragmentRequest);\n\n this.action = FragmentRequest.ACTION_DOWNLOAD;\n this.startTime = NaN;\n this.mediaType = null;\n this.mediaInfo = null;\n this.type = null;\n this.duration = NaN;\n this.timescale = NaN;\n this.range = null;\n this.url = null;\n this.serviceLocation = null;\n this.requestStartDate = null;\n this.firstByteDate = null;\n this.requestEndDate = null;\n this.quality = NaN;\n this.index = NaN;\n this.availabilityStartTime = null;\n this.availabilityEndTime = null;\n this.wallStartTime = null;\n this.bytesLoaded = NaN;\n this.bytesTotal = NaN;\n this.delayLoadingTime = NaN;\n this.responseType = 'arraybuffer';\n};\n\nFragmentRequest.ACTION_DOWNLOAD = 'download';\nFragmentRequest.ACTION_COMPLETE = 'complete';\n\nexports['default'] = FragmentRequest;\nmodule.exports = exports['default'];\n\n},{}],102:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _FragmentRequestJs = _dereq_('./FragmentRequest.js');\n\nvar _FragmentRequestJs2 = _interopRequireDefault(_FragmentRequestJs);\n\nvar HeadRequest = (function (_FragmentRequest) {\n _inherits(HeadRequest, _FragmentRequest);\n\n function HeadRequest(url) {\n _classCallCheck(this, HeadRequest);\n\n _get(Object.getPrototypeOf(HeadRequest.prototype), 'constructor', this).call(this);\n this.url = url || null;\n this.checkForExistenceOnly = true;\n }\n\n return HeadRequest;\n})(_FragmentRequestJs2['default']);\n\nexports['default'] = HeadRequest;\nmodule.exports = exports['default'];\n\n},{\"./FragmentRequest.js\":101}],103:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar IsoBox = function IsoBox() {\n _classCallCheck(this, IsoBox);\n\n this.offset = NaN;\n this.type = null;\n this.size = NaN;\n this.isComplete = true;\n};\n\nexports[\"default\"] = IsoBox;\nmodule.exports = exports[\"default\"];\n\n},{}],104:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ManifestInfo = function ManifestInfo() {\n _classCallCheck(this, ManifestInfo);\n\n this.DVRWindowSize = NaN;\n this.loadedTime = null;\n this.availableFrom = null;\n this.minBufferTime = NaN;\n this.duration = NaN;\n this.isDynamic = false;\n this.maxFragmentDuration = null;\n};\n\nexports[\"default\"] = ManifestInfo;\nmodule.exports = exports[\"default\"];\n\n},{}],105:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar MediaInfo = function MediaInfo() {\n _classCallCheck(this, MediaInfo);\n\n this.id = null;\n this.index = null;\n this.type = null;\n this.streamInfo = null;\n this.representationCount = 0;\n this.lang = null;\n this.viewpoint = null;\n this.accessibility = null;\n this.audioChannelConfiguration = null;\n this.roles = null;\n this.codec = null;\n this.mimeType = null;\n this.contentProtection = null;\n this.isText = false;\n this.KID = null;\n this.bitrateList = null;\n};\n\nexports[\"default\"] = MediaInfo;\nmodule.exports = exports[\"default\"];\n\n},{}],106:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar MetricsList = function MetricsList() {\n _classCallCheck(this, MetricsList);\n\n this.TcpList = [];\n this.HttpList = [];\n this.RepSwitchList = [];\n this.BufferLevel = [];\n this.BufferState = [];\n this.PlayList = [];\n this.DroppedFrames = [];\n this.SchedulingInfo = [];\n this.DVRInfo = [];\n this.ManifestUpdate = [];\n this.RequestsQueue = null;\n this.DVBErrors = [];\n this.BolaState = [];\n};\n\nexports[\"default\"] = MetricsList;\nmodule.exports = exports[\"default\"];\n\n},{}],107:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar StreamInfo = function StreamInfo() {\n _classCallCheck(this, StreamInfo);\n\n this.id = null;\n this.index = null;\n this.start = NaN;\n this.duration = NaN;\n this.manifestInfo = null;\n this.isLast = true;\n this.isFirst = true;\n};\n\nexports[\"default\"] = StreamInfo;\nmodule.exports = exports[\"default\"];\n\n},{}],108:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _FragmentRequestJs = _dereq_('./FragmentRequest.js');\n\nvar _FragmentRequestJs2 = _interopRequireDefault(_FragmentRequestJs);\n\nvar TextRequest = (function (_FragmentRequest) {\n _inherits(TextRequest, _FragmentRequest);\n\n function TextRequest(url, type) {\n _classCallCheck(this, TextRequest);\n\n _get(Object.getPrototypeOf(TextRequest.prototype), 'constructor', this).call(this);\n this.url = url || null;\n this.type = type || null;\n this.mediaType = 'stream';\n this.responseType = 'text';\n }\n\n return TextRequest;\n})(_FragmentRequestJs2['default']);\n\nexports['default'] = TextRequest;\nmodule.exports = exports['default'];\n\n},{\"./FragmentRequest.js\":101}],109:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar TextTrackInfo = function TextTrackInfo() {\n _classCallCheck(this, TextTrackInfo);\n\n this.video = null;\n this.captionData = null;\n this.label = null;\n this.lang = null;\n this.defaultTrack = false;\n this.kind = null;\n this.isFragmented = false;\n this.isEmbedded = false;\n};\n\nexports[\"default\"] = TextTrackInfo;\nmodule.exports = exports[\"default\"];\n\n},{}],110:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar TrackInfo = function TrackInfo() {\n _classCallCheck(this, TrackInfo);\n\n this.id = null;\n this.quality = null;\n this.DVRWindow = null;\n this.fragmentDuration = null;\n this.mediaInfo = null;\n this.MSETimeOffset = null;\n};\n\nexports[\"default\"] = TrackInfo;\nmodule.exports = exports[\"default\"];\n\n},{}],111:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar URIFragmentData = function URIFragmentData() {\n _classCallCheck(this, URIFragmentData);\n\n this.t = null;\n this.xywh = null;\n this.track = null;\n this.id = null;\n this.s = null;\n};\n\nexports[\"default\"] = URIFragmentData;\n\n/*\n From Spec http://www.w3.org/TR/media-frags/\n\n temporal (t) - This dimension denotes a specific time range in the original media, such as \"starting at second 10, continuing until second 20\";\n spatial (xywh) - this dimension denotes a specific range of pixels in the original media, such as \"a rectangle with size (100,100) with its top-left at coordinate (10,10)\";\n Media fragments support also addressing the media along two additional dimensions (in the advanced version defined in Media Fragments 1.0 URI (advanced)):\n track (track) - this dimension denotes one or more tracks in the original media, such as \"the english audio and the video track\";\n id (id) - this dimension denotes a named temporal fragment within the original media, such as \"chapter 2\", and can be seen as a convenient way of specifying a temporal fragment.\n\n\n ## Note\n Akamai is purposing to add #s=X to the ISO standard.\n - (X) Value would be a start time to seek to at startup instead of starting at 0 or live edge\n - Allows for seeking back before the start time unlike a temporal clipping.\n*/\nmodule.exports = exports[\"default\"];\n\n},{}],112:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2016, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n * @ignore\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar BolaState = function BolaState() {\n _classCallCheck(this, BolaState);\n\n /**\n * number\n * @private\n */\n this._s = undefined;\n};\n\nexports[\"default\"] = BolaState;\nmodule.exports = exports[\"default\"];\n\n},{}],113:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n * @class\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar BufferLevel =\n/**\n * @description This Object holds reference to the current buffer level and the time it was recorded.\n */\nfunction BufferLevel() {\n _classCallCheck(this, BufferLevel);\n\n /**\n * Real-Time | Time of the measurement of the buffer level.\n * @public\n */\n this.t = null;\n /**\n * Level of the buffer in milliseconds. Indicates the playout duration for which\n * media data of all active media components is available starting from the\n * current playout time.\n * @public\n */\n this.level = null;\n};\n\nexports[\"default\"] = BufferLevel;\nmodule.exports = exports[\"default\"];\n\n},{}],114:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar _controllersBufferControllerJs = _dereq_('../../controllers/BufferController.js');\n\nvar _controllersBufferControllerJs2 = _interopRequireDefault(_controllersBufferControllerJs);\n\n/**\n * @class\n */\n\nvar BufferState =\n/**\n * @description This Object holds reference to the current buffer state of the video element.\n */\nfunction BufferState() {\n _classCallCheck(this, BufferState);\n\n /**\n * The Buffer Level Target determined by the BufferLevelRule.\n * @public\n */\n this.target = null;\n /**\n * Current buffer state. Will be BufferController.BUFFER_EMPTY or BufferController.BUFFER_LOADED.\n * @public\n */\n this.state = _controllersBufferControllerJs2['default'].BUFFER_EMPTY;\n};\n\nexports['default'] = BufferState;\nmodule.exports = exports['default'];\n\n},{\"../../controllers/BufferController.js\":49}],115:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar DVRInfo =\n/**\n * @description This Object holds reference to DVR availability window information.\n */\nfunction DVRInfo() {\n _classCallCheck(this, DVRInfo);\n\n /**\n * The current time of the video element when this was created.\n * @public\n */\n this.time = null;\n /**\n * The current Segment Availability Range as an object with start and end properties.\n * It's delta defined by the timeShiftBufferDepth MPD attribute.\n * @public\n */\n this.range = null;\n /**\n * Reference to the internal ManifestInfo.js VO.\n * @public\n */\n this.manifestInfo = null;\n};\n\nexports[\"default\"] = DVRInfo;\nmodule.exports = exports[\"default\"];\n\n},{}],116:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar DroppedFrames =\n/**\n * @description This Object holds reference to DroppedFrames count and the time it was recorded.\n */\nfunction DroppedFrames() {\n _classCallCheck(this, DroppedFrames);\n\n /**\n * Real-Time | Time of the measurement of the dropped frames.\n * @public\n */\n this.time = null;\n /**\n * Number of dropped frames\n * @public\n */\n this.droppedFrames = null;\n};\n\nexports[\"default\"] = DroppedFrames;\nmodule.exports = exports[\"default\"];\n\n},{}],117:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar HTTPRequest =\n/**\n * @description This Object holds reference to the HTTPRequest for manifest, fragment and xlink loading.\n * Members which are not defined in ISO23009-1 Annex D should be prefixed by a _ so that they are ignored\n * by Metrics Reporting code.\n */\nfunction HTTPRequest() {\n _classCallCheck(this, HTTPRequest);\n\n /**\n * Identifier of the TCP connection on which the HTTP request was sent.\n * @public\n */\n this.tcpid = null;\n /**\n * This is an optional parameter and should not be included in HTTP request/response transactions for progressive download.\n * The type of the request:\n * - MPD\n * - XLink expansion\n * - Initialization Fragment\n * - Index Fragment\n * - Media Fragment\n * - Bitstream Switching Fragment\n * - other\n * @public\n */\n this.type = null;\n /**\n * The original URL (before any redirects or failures)\n * @public\n */\n this.url = null;\n /**\n * The actual URL requested, if different from above\n * @public\n */\n this.actualurl = null;\n /**\n * The contents of the byte-range-spec part of the HTTP Range header.\n * @public\n */\n this.range = null;\n /**\n * Real-Time | The real time at which the request was sent.\n * @public\n */\n this.trequest = null;\n /**\n * Real-Time | The real time at which the first byte of the response was received.\n * @public\n */\n this.tresponse = null;\n /**\n * The HTTP response code.\n * @public\n */\n this.responsecode = null;\n /**\n * The duration of the throughput trace intervals (ms), for successful requests only.\n * @public\n */\n this.interval = null;\n /**\n * Throughput traces, for successful requests only.\n * @public\n */\n this.trace = [];\n\n /**\n * Type of stream (\"audio\" | \"video\" etc..)\n * @public\n */\n this._stream = null;\n /**\n * Real-Time | The real time at which the request finished.\n * @public\n */\n this._tfinish = null;\n /**\n * The duration of the media requests, if available, in milliseconds.\n * @public\n */\n this._mediaduration = null;\n /**\n * all the response headers from request.\n * @public\n */\n this._responseHeaders = null;\n /**\n * The selected service location for the request. string.\n * @public\n */\n this._serviceLocation = null;\n};\n\nHTTPRequest.Trace = (function () {\n /**\n * @description This Object holds reference to the progress of the HTTPRequest.\n */\n\n function _class() {\n _classCallCheck(this, _class);\n\n /**\n * Real-Time | Measurement stream start.\n * @public\n */\n this.s = null;\n /**\n * Measurement stream duration (ms).\n * @public\n */\n this.d = null;\n /**\n * List of integers counting the bytes received in each trace interval within the measurement stream.\n * @public\n */\n this.b = [];\n }\n\n return _class;\n})();\n\nHTTPRequest.MPD_TYPE = 'MPD';\nHTTPRequest.XLINK_EXPANSION_TYPE = 'XLinkExpansion';\nHTTPRequest.INIT_SEGMENT_TYPE = 'InitializationSegment';\nHTTPRequest.INDEX_SEGMENT_TYPE = 'IndexSegment';\nHTTPRequest.MEDIA_SEGMENT_TYPE = 'MediaSegment';\nHTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE = 'BitstreamSwitchingSegment';\nHTTPRequest.OTHER_TYPE = 'other';\n\nexports['default'] = HTTPRequest;\nmodule.exports = exports['default'];\n\n},{}],118:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ManifestUpdate =\n/**\n * @description This Object holds reference to the manifest update information.\n */\nfunction ManifestUpdate() {\n _classCallCheck(this, ManifestUpdate);\n\n /**\n * Media Type Video | Audio | FragmentedText\n * @public\n */\n this.mediaType = null;\n /**\n * MPD Type static | dynamic\n * @public\n */\n this.type = null;\n /**\n * When this manifest update was requested\n * @public\n */\n this.requestTime = null;\n /**\n * When this manifest update was received\n * @public\n */\n this.fetchTime = null;\n /**\n * Calculated Availability Start time of the stream.\n * @public\n */\n this.availabilityStartTime = null;\n /**\n * the seek point (liveEdge for dynamic, Stream[0].startTime for static)\n * @public\n */\n this.presentationStartTime = 0;\n /**\n * The calculated difference between the server and client wall clock time\n * @public\n */\n this.clientTimeOffset = 0;\n /**\n * Actual element.currentTime\n * @public\n */\n this.currentTime = null;\n /**\n * Actual element.ranges\n * @public\n */\n this.buffered = null;\n /**\n * Static is fixed value of zero. dynamic should be ((Now-@availabilityStartTime) - elementCurrentTime)\n * @public\n */\n this.latency = 0;\n /**\n * Array holding list of StreamInfo VO Objects\n * @public\n */\n this.streamInfo = [];\n /**\n * Array holding list of TrackInfo VO Objects\n * @public\n */\n this.trackInfo = [];\n};\n\nManifestUpdate.StreamInfo = (function () {\n /**\n * @description This Object holds reference to the current period's stream information when the manifest was updated.\n */\n\n function _class() {\n _classCallCheck(this, _class);\n\n /**\n * Stream@id\n * @public\n */\n this.id = null;\n /**\n * Period Index\n * @public\n */\n this.index = null;\n /**\n * Stream@start\n * @public\n */\n this.start = null;\n /**\n * Stream@duration\n * @public\n */\n this.duration = null;\n }\n\n return _class;\n})();\n\nManifestUpdate.TrackInfo = (function () {\n\n /**\n * @description This Object holds reference to the current representation's info when the manifest was updated.\n */\n\n function _class2() {\n _classCallCheck(this, _class2);\n\n /**\n * Track@id\n * @public\n */\n this.id = null;\n /**\n * Representation Index\n * @public\n */\n this.index = null;\n /**\n * Media Type Video | Audio | FragmentedText\n * @public\n */\n this.mediaType = null;\n /**\n * Which reprenset\n * @public\n */\n this.streamIndex = null;\n /**\n * Holds reference to @presentationTimeOffset\n * @public\n */\n this.presentationTimeOffset = null;\n /**\n * Holds reference to @startNumber\n * @public\n */\n this.startNumber = null;\n /**\n * list|template|timeline\n * @public\n */\n this.fragmentInfoType = null;\n }\n\n return _class2;\n})();\n//TODO we need exports for all the sub objects. These should all be class VO\nexports[\"default\"] = ManifestUpdate;\nmodule.exports = exports[\"default\"];\n\n},{}],119:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar PlayList =\n/**\n * @description This Object holds reference to the playback session information\n */\nfunction PlayList() {\n _classCallCheck(this, PlayList);\n\n /**\n * Timestamp of the user action that starts the playback stream...\n * @public\n */\n this.start = null;\n /**\n * Presentation time at which playout was requested by the user...\n * @public\n */\n this.mstart = null;\n /**\n * Type of user action which triggered playout\n * - New playout request (e.g. initial playout or seeking)\n * - Resume from pause\n * - Other user request (e.g. user-requested quality change)\n * - Start of a metrics collection stream (hence earlier entries in the play list not collected)\n * @public\n */\n this.starttype = null;\n\n /**\n * List of streams of continuous rendering of decoded samples.\n * @public\n */\n this.trace = [];\n};\n\nPlayList.Trace = (function () {\n function _class() {\n _classCallCheck(this, _class);\n\n /**\n * The value of the Representation@id of the Representation from which the samples were taken.\n * @type {String}\n * @public\n */\n this.representationid = null;\n /**\n * If not present, this metrics concerns the Representation as a whole.\n * If present, subreplevel indicates the greatest value of any\n * Subrepresentation@level being rendered.\n * @type {Number}\n * @public\n */\n this.subreplevel = null;\n /**\n * The time at which the first sample was rendered\n * @type {Number}\n * @public\n */\n this.start = null;\n /**\n * The presentation time of the first sample rendered.\n * @type {Number}\n * @public\n */\n this.mstart = null;\n /**\n * The duration of the continuously presented samples (which is the same in real time and media time). \"Continuously presented\" means that the media clock continued to advance at the playout speed throughout the interval. NOTE: the spec does not call out the units, but all other durations etc are in ms, and we use ms too.\n * @type {Number}\n * @public\n */\n this.duration = null;\n /**\n * The playback speed relative to normal playback speed (i.e.normal forward playback speed is 1.0).\n * @type {Number}\n * @public\n */\n this.playbackspeed = null;\n /**\n * The reason why continuous presentation of this Representation was stopped.\n * representation switch\n * rebuffering\n * user request\n * end of Period\n * end of Stream\n * end of content\n * end of a metrics collection period\n *\n * @type {String}\n * @public\n */\n this.stopreason = null;\n }\n\n return _class;\n})();\n\n/* Public Static Constants */\nPlayList.INITIAL_PLAYOUT_START_REASON = 'initial_playout';\nPlayList.SEEK_START_REASON = 'seek';\nPlayList.RESUME_FROM_PAUSE_START_REASON = 'resume';\nPlayList.METRICS_COLLECTION_START_REASON = 'metrics_collection_start';\n\nPlayList.Trace.REPRESENTATION_SWITCH_STOP_REASON = 'representation_switch';\nPlayList.Trace.REBUFFERING_REASON = 'rebuffering';\nPlayList.Trace.USER_REQUEST_STOP_REASON = 'user_request';\nPlayList.Trace.END_OF_PERIOD_STOP_REASON = 'end_of_period';\nPlayList.Trace.END_OF_CONTENT_STOP_REASON = 'end_of_content';\nPlayList.Trace.METRICS_COLLECTION_STOP_REASON = 'metrics_collection_end';\nPlayList.Trace.FAILURE_STOP_REASON = 'failure';\n\nexports['default'] = PlayList;\nmodule.exports = exports['default'];\n\n},{}],120:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar RepresentationSwitch =\n/**\n * @description This Object holds reference to the info at quality switch between two representations.\n */\nfunction RepresentationSwitch() {\n _classCallCheck(this, RepresentationSwitch);\n\n /**\n * Time of the switch event.\n * @public\n */\n this.t = null;\n /**\n * The media presentation time of the earliest access unit\n * (out of all media content components) played out from\n * the Representation.\n *\n * @public\n */\n this.mt = null;\n /**\n * Value of Representation@id identifying the switch-to Representation.\n * @public\n */\n this.to = null;\n /**\n * If not present, this metrics concerns the Representation as a whole.\n * If present, lto indicates the value of SubRepresentation@level within\n * Representation identifying the switch-to level of the Representation.\n *\n * @public\n */\n this.lto = null;\n};\n\nexports[\"default\"] = RepresentationSwitch;\nmodule.exports = exports[\"default\"];\n\n},{}],121:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar RequestsQueue =\n/**\n * @description This Object holds reference to Fragment Model's request queues\n */\nfunction RequestsQueue() {\n _classCallCheck(this, RequestsQueue);\n\n /**\n * Array of all of the requests that have begun to load\n * This request may not make it into the executed queue if it is abandon due to ABR rules for example.\n * @public\n */\n this.loadingRequests = [];\n /**\n * Array of the The requests that have completed\n * @public\n */\n this.executedRequests = [];\n};\n\nexports[\"default\"] = RequestsQueue;\nmodule.exports = exports[\"default\"];\n\n},{}],122:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar SchedulingInfo =\n/**\n * @description This Object holds reference to the index handling of the current fragment being loaded or executed.\n */\nfunction SchedulingInfo() {\n _classCallCheck(this, SchedulingInfo);\n\n /**\n * Type of stream Audio | Video | FragmentedText\n * @public\n */\n this.mediaType = null;\n /**\n * Time of the scheduling event.\n * @public\n */\n this.t = null;\n\n /**\n * Type of fragment (initialization | media)\n * @public\n */\n this.type = null;\n /**\n * Presentation start time of fragment\n * @public\n */\n this.startTime = null;\n /**\n * Availability start time of fragment\n * @public\n */\n this.availabilityStartTime = null;\n /**\n * Duration of fragment\n * @public\n */\n this.duration = null;\n /**\n * Bit Rate Quality of fragment\n * @public\n */\n this.quality = null;\n /**\n * Range of fragment\n * @public\n */\n this.range = null;\n\n /**\n * Current state of fragment\n * @public\n */\n this.state = null;\n};\n\nexports[\"default\"] = SchedulingInfo;\nmodule.exports = exports[\"default\"];\n\n},{}],123:[function(_dereq_,module,exports){\n/**\n * The copyright in this software is being made available under the BSD License,\n * included below. This software may be subject to other third party and contributor\n * rights, including patent rights, and no such rights are granted under this license.\n *\n * Copyright (c) 2013, Dash Industry Forum.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright notice, this\n * list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation and/or\n * other materials provided with the distribution.\n * * Neither the name of Dash Industry Forum nor the names of its\n * contributors may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * @class\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar TCPConnection =\n/**\n * @description This Object holds reference to the current tcp connection\n */\nfunction TCPConnection() {\n _classCallCheck(this, TCPConnection);\n\n /**\n * Identifier of the TCP connection on which the HTTP request was sent.\n * @public\n */\n this.tcpid = null;\n /**\n * IP Address of the interface over which the client is receiving the TCP data.\n * @public\n */\n this.dest = null;\n /**\n * Real-Time | The time at which the connection was opened (sending time of the initial SYN or connect socket operation).\n * @public\n */\n this.topen = null;\n /**\n * Real-Time | The time at which the connection was closed (sending or reception time of FIN or RST or close socket operation).\n * @public\n */\n this.tclose = null;\n /**\n * Connect time in ms (time from sending the initial SYN to receiving the ACK or completion of the connect socket operation).\n * @public\n */\n this.tconnect = null;\n};\n\nexports[\"default\"] = TCPConnection;\nmodule.exports = exports[\"default\"];\n\n},{}]},{},[37])(37)\n});\n//# sourceMappingURL=dash.mediaplayer.debug.js.map\n","'use strict';\n\nexports.__esModule = true;\nexports.default = cancelContentPlay;\n\nvar _window = require('global/window');\n\nvar _window2 = _interopRequireDefault(_window);\n\nvar _document = require('global/document');\n\nvar _document2 = _interopRequireDefault(_document);\n\nvar _video = require('video.js');\n\nvar _video2 = _interopRequireDefault(_video);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction cancelContentPlay(player) {\n if (player.ads.cancelPlayTimeout) {\n // another cancellation is already in flight, so do nothing\n return;\n }\n\n // Avoid content flash on non-iPad iOS and iPhones on iOS10 with playsinline\n if (_video2.default.browser.IS_IOS && _video2.default.browser.IS_IPHONE && !player.el_.hasAttribute('playsinline')) {\n\n var width = player.currentWidth ? player.currentWidth() : player.width();\n var height = player.currentHeight ? player.currentHeight() : player.height();\n\n // A placeholder black box will be shown in the document while the player is hidden.\n var placeholder = _document2.default.createElement('div');\n\n placeholder.style.width = width + 'px';\n placeholder.style.height = height + 'px';\n placeholder.style.background = 'black';\n player.el_.parentNode.insertBefore(placeholder, player.el_);\n\n // Hide the player. While in full-screen video playback mode on iOS, this\n // makes the player show a black screen instead of content flash.\n player.el_.style.display = 'none';\n\n // Unhide the player and remove the placeholder once we're ready to move on.\n player.one(['adstart', 'adplaying', 'adtimeout', 'adserror', 'adscanceled', 'adskip', 'playing'], function () {\n player.el_.style.display = 'block';\n placeholder.remove();\n });\n\n // Detect fullscreen change, if returning from fullscreen and placeholder exists,\n // remove placeholder and show player whether or not playsinline was attached.\n player.on('fullscreenchange', function () {\n if (placeholder && player.hasClass('vjs-fullscreen')) {\n player.el_.style.display = 'block';\n placeholder.remove();\n }\n });\n }\n\n // The timeout is necessary because pausing a video element while processing a `play`\n // event on iOS can cause the video element to continuously toggle between playing and\n // paused states.\n player.ads.cancelPlayTimeout = _window2.default.setTimeout(function () {\n // deregister the cancel timeout so subsequent cancels are scheduled\n player.ads.cancelPlayTimeout = null;\n\n // pause playback so ads can be handled.\n if (!player.paused()) {\n player.pause();\n }\n\n // When the 'content-playback' state is entered, this will let us know to play\n player.ads.cancelledPlay = true;\n }, 1);\n} /*\n This feature makes sure the player is paused during ad loading.\n \n It does this by pausing the player immediately after a \"play\" where ads will be requested,\n then signalling that we should play after the ad is done.\n */","'use strict';\n\nexports.__esModule = true;\nexports.default = initializeContentupdate;\n\nvar _window = require('global/window');\n\nvar _window2 = _interopRequireDefault(_window);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// Start sending contentupdate events\nfunction initializeContentupdate(player) {\n\n // Keep track of the current content source\n // If you want to change the src of the video without triggering\n // the ad workflow to restart, you can update this variable before\n // modifying the player's source\n player.ads.contentSrc = player.currentSrc();\n\n // Check if a new src has been set, if so, trigger contentupdate\n var checkSrc = function checkSrc() {\n if (player.ads.state !== 'ad-playback') {\n var src = player.currentSrc();\n\n if (src !== player.ads.contentSrc) {\n player.trigger({\n type: 'contentupdate',\n oldValue: player.ads.contentSrc,\n newValue: src\n });\n player.ads.contentSrc = src;\n }\n }\n };\n\n // loadstart reliably indicates a new src has been set\n player.on('loadstart', checkSrc);\n // check immediately in case we missed the loadstart\n _window2.default.setTimeout(checkSrc, 1);\n} /*\n This feature sends a `contentupdate` event when the player source changes.\n */","'use strict';\n\nexports.__esModule = true;\nexports.processMetadataTracks = processMetadataTracks;\nexports.setMetadataTrackMode = setMetadataTrackMode;\nexports.getSupportedAdCue = getSupportedAdCue;\nexports.getCueId = getCueId;\nexports.processAdTrack = processAdTrack;\n\nvar _video = require('video.js');\n\nvar _video2 = _interopRequireDefault(_video);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n* This feature allows metadata text tracks to be manipulated once they are available,\n* usually after the 'loadstart' event is observed on the player\n* @param player A reference to a player\n* @param processMetadataTrack A callback that performs some operations on a\n* metadata text track\n**/\nfunction processMetadataTracks(player, processMetadataTrack) {\n var tracks = player.textTracks();\n var setModeAndProcess = function setModeAndProcess(track) {\n if (track.kind === 'metadata') {\n player.ads.cueTextTracks.setMetadataTrackMode(track);\n processMetadataTrack(player, track);\n }\n };\n\n // Text tracks are available\n if (tracks.length > 0) {\n for (var i = 0; i < tracks.length; i++) {\n var track = tracks[i];\n\n setModeAndProcess(track);\n }\n // Wait until text tracks are added\n // We avoid always setting the event handler in case\n // integrations decide to handle this separately\n // with a different handler for the same event\n } else {\n tracks.addEventListener('addtrack', function (event) {\n var track = event.track;\n\n setModeAndProcess(track);\n });\n }\n}\n\n/**\n* Sets the track mode to one of 'disabled', 'hidden' or 'showing'\n* @see https://github.com/videojs/video.js/blob/master/docs/guides/text-tracks.md\n* Default behavior is to do nothing, @override if this is not desired\n* @param track The text track to set the mode on\n*/\n/**\n* This feature allows metadata text tracks to be manipulated once available\n* @see processMetadataTracks.\n* It also allows ad implementations to leverage ad cues coming through\n* text tracks, @see processAdTrack\n**/\n\nfunction setMetadataTrackMode(track) {\n return;\n}\n\n/**\n* Determines whether cue is an ad cue and returns the cue data.\n* @param player A reference to the player\n* @param cue The cue to be checked\n* Returns the given cue by default @override if futher processing is required\n* @return the cueData in JSON if cue is a supported ad cue, or -1 if not\n**/\nfunction getSupportedAdCue(player, cue) {\n return cue;\n}\n\n/**\n* Gets the id associated with a cue.\n* @param cue The cue to extract an ID from\n* @returns The first occurance of 'id' in the object,\n* @override if this is not the desired cue id\n**/\nfunction getCueId(player, cue) {\n return cue.id;\n}\n\n/**\n* Checks whether a cue has already been used\n* @param cueId The Id associated with a cue\n**/\nvar cueAlreadySeen = function cueAlreadySeen(player, cueId) {\n return cueId !== undefined && player.ads.includedCues[cueId];\n};\n\n/**\n* Indicates that a cue has been used\n* @param cueId The Id associated with a cue\n**/\nvar setCueAlreadySeen = function setCueAlreadySeen(player, cueId) {\n if (cueId !== undefined && cueId !== '') {\n player.ads.includedCues[cueId] = true;\n }\n};\n\n/**\n* This feature allows ad metadata tracks to be manipulated in ad implementations\n* @param player A reference to the player\n* @param cues The set of cues to work with\n* @param processCue A method that uses a cue to make some\n* ad request in the ad implementation\n* @param [cancelAds] A method that dynamically cancels ads in the ad implementation\n**/\nfunction processAdTrack(player, cues, processCue, cancelAds) {\n player.ads.includedCues = {};\n\n // loop over set of cues\n for (var i = 0; i < cues.length; i++) {\n var cue = cues[i];\n var cueData = this.getSupportedAdCue(player, cue);\n\n // Exit if this is not a supported cue\n if (cueData === -1) {\n _video2.default.log.warn('Skipping as this is not a supported ad cue.', cue);\n return;\n }\n\n // Continue processing supported cue\n var cueId = this.getCueId(player, cue);\n var startTime = cue.startTime;\n\n // Skip ad if cue was already used\n if (cueAlreadySeen(player, cueId)) {\n _video2.default.log('Skipping ad already seen with ID ' + cueId);\n return;\n }\n\n // Process cue as an ad cue\n processCue(player, cueData, cueId, startTime);\n\n // Indicate that this cue has been used\n setCueAlreadySeen(player, cueId);\n\n // Optional dynamic ad cancellation\n if (cancelAds !== undefined) {\n cancelAds(player, cueData);\n }\n }\n}","'use strict';\n\nexports.__esModule = true;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; /*\n This feature provides an optional method for ad integrations to insert run-time values\n into an ad server URL or configuration.\n */\n\nexports.default = adMacroReplacement;\n\nvar _window = require('global/window');\n\nvar _window2 = _interopRequireDefault(_window);\n\nvar _document = require('global/document');\n\nvar _document2 = _interopRequireDefault(_document);\n\nvar _video = require('video.js');\n\nvar _video2 = _interopRequireDefault(_video);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// Return URI encoded version of value if uriEncode is true\nvar uriEncodeIfNeeded = function uriEncodeIfNeeded(value, uriEncode) {\n if (uriEncode) {\n return encodeURIComponent(value);\n }\n return value;\n};\n\n// Add custom field macros to macros object\n// based on given name for custom fields property of mediainfo object.\nvar customFields = function customFields(mediainfo, macros, customFieldsName) {\n if (mediainfo && mediainfo[customFieldsName]) {\n var fields = mediainfo[customFieldsName];\n var fieldNames = Object.keys(fields);\n\n for (var i = 0; i < fieldNames.length; i++) {\n var tag = '{mediainfo.' + customFieldsName + '.' + fieldNames[i] + '}';\n\n macros[tag] = fields[fieldNames[i]];\n }\n }\n};\n\n// Public method that integrations use for ad macros.\n// \"string\" is any string with macros to be replaced\n// \"uriEncode\" if true will uri encode macro values when replaced\n// \"customMacros\" is a object with custom macros and values to map them to\n// - For example: {'{five}': 5}\n// Return value is is \"string\" with macros replaced\n// - For example: adMacroReplacement('{player.id}') returns a string of the player id\nfunction adMacroReplacement(string, uriEncode, customMacros) {\n\n if (uriEncode === undefined) {\n uriEncode = false;\n }\n\n var macros = {};\n\n if (customMacros !== undefined) {\n macros = customMacros;\n }\n\n // Static macros\n macros['{player.id}'] = this.options_['data-player'];\n macros['{mediainfo.id}'] = this.mediainfo ? this.mediainfo.id : '';\n macros['{mediainfo.name}'] = this.mediainfo ? this.mediainfo.name : '';\n macros['{mediainfo.description}'] = this.mediainfo ? this.mediainfo.description : '';\n macros['{mediainfo.tags}'] = this.mediainfo ? this.mediainfo.tags : '';\n macros['{mediainfo.reference_id}'] = this.mediainfo ? this.mediainfo.reference_id : '';\n macros['{mediainfo.duration}'] = this.mediainfo ? this.mediainfo.duration : '';\n macros['{mediainfo.ad_keys}'] = this.mediainfo ? this.mediainfo.ad_keys : '';\n macros['{player.duration}'] = this.duration();\n macros['{timestamp}'] = new Date().getTime();\n macros['{document.referrer}'] = _document2.default.referrer;\n macros['{window.location.href}'] = _window2.default.location.href;\n macros['{random}'] = Math.floor(Math.random() * 1000000000000);\n\n // Custom fields in mediainfo\n customFields(this.mediainfo, macros, 'custom_fields');\n customFields(this.mediainfo, macros, 'customFields');\n\n // Go through all the replacement macros and apply them to the string.\n // This will replace all occurrences of the replacement macros.\n for (var i in macros) {\n string = string.split(i).join(uriEncodeIfNeeded(macros[i], uriEncode));\n }\n\n // Page variables\n string = string.replace(/{pageVariable\\.([^}]+)}/g, function (match, name) {\n var value = void 0;\n var context = _window2.default;\n var names = name.split('.');\n\n // Iterate down multiple levels of selector without using eval\n // This makes things like pageVariable.foo.bar work\n for (var _i = 0; _i < names.length; _i++) {\n if (_i === names.length - 1) {\n value = context[names[_i]];\n } else {\n context = context[names[_i]];\n }\n }\n\n var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n\n // Only allow certain types of values. Anything else is probably a mistake.\n if (value === null) {\n return 'null';\n } else if (value === undefined) {\n _video2.default.log.warn('Page variable \"' + name + '\" not found');\n return '';\n } else if (type !== 'string' && type !== 'number' && type !== 'boolean') {\n _video2.default.log.warn('Page variable \"' + name + '\" is not a supported type');\n return '';\n }\n\n return uriEncodeIfNeeded(String(value), uriEncode);\n });\n\n return string;\n}","'use strict';\n\nvar _window = require('global/window');\n\nvar _window2 = _interopRequireDefault(_window);\n\nvar _video = require('video.js');\n\nvar _video2 = _interopRequireDefault(_video);\n\nvar _redispatch = require('./redispatch.js');\n\nvar _redispatch2 = _interopRequireDefault(_redispatch);\n\nvar _snapshot = require('./snapshot.js');\n\nvar snapshot = _interopRequireWildcard(_snapshot);\n\nvar _contentupdate = require('./contentupdate.js');\n\nvar _contentupdate2 = _interopRequireDefault(_contentupdate);\n\nvar _cancelContentPlay = require('./cancelContentPlay.js');\n\nvar _cancelContentPlay2 = _interopRequireDefault(_cancelContentPlay);\n\nvar _macros = require('./macros.js');\n\nvar _macros2 = _interopRequireDefault(_macros);\n\nvar _cueTextTracks = require('./cueTextTracks.js');\n\nvar cueTextTracks = _interopRequireWildcard(_cueTextTracks);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/*\nThis main plugin file is responsible for integration logic and enabling the features\nthat live in in separate files.\n*/\n\nvar VIDEO_EVENTS = _video2.default.getComponent('Html5').Events;\n\n/**\n * Remove the poster attribute from the video element tech, if present. When\n * reusing a video element for multiple videos, the poster image will briefly\n * reappear while the new source loads. Removing the attribute ahead of time\n * prevents the poster from showing up between videos.\n *\n * @param {Object} player The videojs player object\n */\nvar removeNativePoster = function removeNativePoster(player) {\n var tech = player.$('.vjs-tech');\n\n if (tech) {\n tech.removeAttribute('poster');\n }\n};\n\n// ---------------------------------------------------------------------------\n// Ad Framework\n// ---------------------------------------------------------------------------\n\n// default framework settings\nvar defaults = {\n // maximum amount of time in ms to wait to receive `adsready` from the ad\n // implementation after play has been requested. Ad implementations are\n // expected to load any dynamic libraries and make any requests to determine\n // ad policies for a video during this time.\n timeout: 5000,\n\n // maximum amount of time in ms to wait for the ad implementation to start\n // linear ad mode after `readyforpreroll` has fired. This is in addition to\n // the standard timeout.\n prerollTimeout: 100,\n\n // maximum amount of time in ms to wait for the ad implementation to start\n // linear ad mode after `contentended` has fired.\n postrollTimeout: 100,\n\n // when truthy, instructs the plugin to output additional information about\n // plugin state to the video.js log. On most devices, the video.js log is\n // the same as the developer console.\n debug: false,\n\n // set this to true when using ads that are part of the content video\n stitchedAds: false\n};\n\nvar contribAdsPlugin = function contribAdsPlugin(options) {\n\n var player = this; // eslint-disable-line consistent-this\n\n var settings = _video2.default.mergeOptions(defaults, options);\n\n // prefix all video element events during ad playback\n // if the video element emits ad-related events directly,\n // plugins that aren't ad-aware will break. prefixing allows\n // plugins that wish to handle ad events to do so while\n // avoiding the complexity for common usage\n var videoEvents = VIDEO_EVENTS.concat(['firstplay', 'loadedalldata', 'playing']);\n\n // Set up redispatching of player events\n player.on(videoEvents, _redispatch2.default);\n // Move redispatch to be first handler\n if (_video2.default.dom) {\n var data = _video2.default.dom.getElData(player.el());\n videoEvents.forEach(function (type) {\n var handlers = data.handlers[type];\n var handler = handlers && handlers.find(function (h) {\n return h.guid === _redispatch2.default.guid;\n });\n if (handler) {\n handlers.splice(handlers.indexOf(handler), 1);\n handlers.unshift(handler);\n }\n });\n }\n\n // videojs expects 'play' event but we redispatch it as 'contentplay'\n // so need to update play button state\n player.on('contentplay', function () {\n if (player.controlBar.playToggle) {\n player.controlBar.playToggle.handlePlay();\n }\n });\n\n // \"vjs-has-started\" should be present at the end of a video. This makes sure it's\n // always there.\n player.on('ended', function () {\n if (!player.hasClass('vjs-has-started')) {\n player.addClass('vjs-has-started');\n }\n });\n\n // We now auto-play when an ad gets loaded if we're playing ads in the same video\n // element as the content.\n // The problem is that in IE11, we cannot play in addurationchange but in iOS8, we\n // cannot play from adcanplay.\n // This will prevent ad-integrations from needing to do this themselves.\n player.on(['addurationchange', 'adcanplay'], function () {\n if (player.currentSrc() === player.ads.snapshot.currentSrc) {\n return;\n }\n\n player.play();\n });\n\n player.on('nopreroll', function () {\n player.ads.nopreroll_ = true;\n });\n\n player.on('nopostroll', function () {\n player.ads.nopostroll_ = true;\n });\n\n // Remove ad-loading class when ad plays or when content plays (in case there was no ad)\n // If you remove this class too soon you can get a flash of content!\n player.on(['ads-ad-started', 'playing'], function () {\n player.removeClass('vjs-ad-loading');\n });\n\n // Replace the plugin constructor with the ad namespace\n player.ads = {\n state: 'content-set',\n disableNextSnapshotRestore: false,\n\n // This is set to true if the content has ended once. After that, the user can\n // seek backwards and replay content, but _contentHasEnded remains true.\n _contentHasEnded: false,\n\n VERSION: '4.2.0-7',\n\n reset: function reset() {\n player.ads.disableNextSnapshotRestore = false;\n player.ads._contentHasEnded = false;\n player.ads.snapshot = null;\n },\n\n\n // Call this when an ad response has been received and there are\n // linear ads ready to be played.\n startLinearAdMode: function startLinearAdMode() {\n if (player.ads.state === 'preroll?' || player.ads.state === 'content-playback' || player.ads.state === 'postroll?') {\n player.trigger('adstart');\n }\n },\n\n\n // Call this when a linear ad pod has finished playing.\n endLinearAdMode: function endLinearAdMode() {\n if (player.ads.state === 'ad-playback' || player.ads.state === 'preroll?') {\n // In the case of an empty ad response, we want to make sure that\n // the vjs-ad-loading class is always removed. We could probably check for\n // duration on adPlayer for an empty ad but we remove it here just to make sure\n player.removeClass('vjs-ad-loading');\n }\n if (player.ads.state === 'ad-playback') {\n player.trigger('adend');\n }\n if (player.ads.state === 'preroll?') {\n player.trigger('nopreroll');\n }\n },\n\n\n // Call this when an ad response has been received but there are no\n // linear ads to be played (i.e. no ads available, or overlays).\n // This has no effect if we are already in a linear ad mode. Always\n // use endLinearAdMode() to exit from linear ad-playback state.\n skipLinearAdMode: function skipLinearAdMode() {\n if (player.ads.state !== 'ad-playback') {\n player.trigger('adskip');\n }\n },\n stitchedAds: function stitchedAds(arg) {\n if (arg !== undefined) {\n this._stitchedAds = !!arg;\n }\n return this._stitchedAds;\n },\n\n\n // Returns whether the video element has been modified since the\n // snapshot was taken.\n // We test both src and currentSrc because changing the src attribute to a URL that\n // AdBlocker is intercepting doesn't update currentSrc.\n videoElementRecycled: function videoElementRecycled() {\n if (!this.snapshot) {\n throw new Error('You cannot use videoElementRecycled while there is no snapshot.');\n }\n\n var srcChanged = player.src() !== this.snapshot.src;\n var currentSrcChanged = player.currentSrc() !== this.snapshot.currentSrc;\n\n return srcChanged || currentSrcChanged;\n },\n\n\n // Returns a boolean indicating if given player is in live mode.\n // Can be replaced when this is fixed: https://github.com/videojs/video.js/issues/3262\n isLive: function isLive(somePlayer) {\n if (somePlayer.duration() === Infinity) {\n return true;\n } else if (_video2.default.browser.IOS_VERSION === '8' && somePlayer.duration() === 0) {\n return true;\n }\n return false;\n },\n\n\n // Return true if content playback should mute and continue during ad breaks.\n // This is only done during live streams on platforms where it's supported.\n // This improves speed and accuracy when returning from an ad break.\n shouldPlayContentBehindAd: function shouldPlayContentBehindAd(somePlayer) {\n return !settings.disablePlayContentBehindAd && !_video2.default.browser.IS_IOS && !_video2.default.browser.IS_ANDROID && somePlayer.duration() === Infinity;\n }\n };\n\n player.ads.stitchedAds(settings.stitchedAds);\n\n player.ads.cueTextTracks = cueTextTracks;\n player.ads.adMacroReplacement = _macros2.default.bind(player);\n\n // Start sending contentupdate events for this player\n (0, _contentupdate2.default)(player);\n\n // Global contentupdate handler for resetting plugin state\n player.on('contentupdate', player.ads.reset);\n\n // Ad Playback State Machine\n var states = {\n 'content-set': {\n events: {\n adscanceled: function adscanceled() {\n this.state = 'content-playback';\n },\n adsready: function adsready() {\n this.state = 'ads-ready';\n },\n play: function play() {\n this.state = 'ads-ready?';\n (0, _cancelContentPlay2.default)(player);\n // remove the poster so it doesn't flash between videos\n removeNativePoster(player);\n },\n adserror: function adserror() {\n this.state = 'content-playback';\n },\n adskip: function adskip() {\n this.state = 'content-playback';\n }\n }\n },\n 'ads-ready': {\n events: {\n play: function play() {\n this.state = 'preroll?';\n (0, _cancelContentPlay2.default)(player);\n },\n adskip: function adskip() {\n this.state = 'content-playback';\n },\n adserror: function adserror() {\n this.state = 'content-playback';\n }\n }\n },\n 'preroll?': {\n enter: function enter() {\n if (player.ads.nopreroll_) {\n // This will start the ads manager in case there are later ads\n player.trigger('readyforpreroll');\n\n // If we don't wait a tick, entering content-playback will cancel\n // cancelPlayTimeout, causing the video to not pause for the ad\n _window2.default.setTimeout(function () {\n // Don't wait for a preroll\n player.trigger('nopreroll');\n }, 1);\n } else {\n // change class to show that we're waiting on ads\n player.addClass('vjs-ad-loading');\n // schedule an adtimeout event to fire if we waited too long\n player.ads.adTimeoutTimeout = _window2.default.setTimeout(function () {\n player.trigger('adtimeout');\n }, settings.prerollTimeout);\n // signal to ad plugin that it's their opportunity to play a preroll\n player.trigger('readyforpreroll');\n }\n },\n leave: function leave() {\n _window2.default.clearTimeout(player.ads.adTimeoutTimeout);\n },\n\n events: {\n play: function play() {\n (0, _cancelContentPlay2.default)(player);\n },\n adstart: function adstart() {\n this.state = 'ad-playback';\n },\n adskip: function adskip() {\n this.state = 'content-playback';\n },\n adtimeout: function adtimeout() {\n this.state = 'content-playback';\n },\n adserror: function adserror() {\n this.state = 'content-playback';\n },\n nopreroll: function nopreroll() {\n this.state = 'content-playback';\n }\n }\n },\n 'ads-ready?': {\n enter: function enter() {\n player.addClass('vjs-ad-loading');\n player.ads.adTimeoutTimeout = _window2.default.setTimeout(function () {\n player.trigger('adtimeout');\n }, settings.timeout);\n },\n leave: function leave() {\n _window2.default.clearTimeout(player.ads.adTimeoutTimeout);\n player.removeClass('vjs-ad-loading');\n },\n\n events: {\n play: function play() {\n (0, _cancelContentPlay2.default)(player);\n },\n adscanceled: function adscanceled() {\n this.state = 'content-playback';\n },\n adsready: function adsready() {\n this.state = 'preroll?';\n },\n adskip: function adskip() {\n this.state = 'content-playback';\n },\n adtimeout: function adtimeout() {\n this.state = 'content-playback';\n },\n adserror: function adserror() {\n this.state = 'content-playback';\n }\n }\n },\n 'ad-playback': {\n enter: function enter() {\n // capture current player state snapshot (playing, currentTime, src)\n if (!player.ads.shouldPlayContentBehindAd(player)) {\n this.snapshot = snapshot.getPlayerSnapshot(player);\n }\n\n // Mute the player behind the ad\n if (player.ads.shouldPlayContentBehindAd(player)) {\n this.preAdVolume_ = player.volume();\n player.volume(0);\n }\n\n // add css to the element to indicate and ad is playing.\n player.addClass('vjs-ad-playing');\n\n // We should remove the vjs-live class if it has been added in order to\n // show the adprogress control bar on Android devices for falsely\n // determined LIVE videos due to the duration incorrectly reported as Infinity\n if (player.hasClass('vjs-live')) {\n player.removeClass('vjs-live');\n }\n\n // remove the poster so it doesn't flash between ads\n removeNativePoster(player);\n\n // We no longer need to supress play events once an ad is playing.\n // Clear it if we were.\n if (player.ads.cancelPlayTimeout) {\n // If we don't wait a tick, we could cancel the pause for cancelContentPlay,\n // resulting in content playback behind the ad\n _window2.default.setTimeout(function () {\n _window2.default.clearTimeout(player.ads.cancelPlayTimeout);\n player.ads.cancelPlayTimeout = null;\n }, 1);\n }\n },\n leave: function leave() {\n player.removeClass('vjs-ad-playing');\n\n // We should add the vjs-live class back if the video is a LIVE video\n // If we dont do this, then for a LIVE Video, we will get an incorrect\n // styled control, which displays the time for the video\n if (player.ads.isLive(player)) {\n player.addClass('vjs-live');\n }\n if (!player.ads.shouldPlayContentBehindAd(player)) {\n snapshot.restorePlayerSnapshot(player, this.snapshot);\n }\n\n // Reset the volume to pre-ad levels\n if (player.ads.shouldPlayContentBehindAd(player)) {\n player.volume(this.preAdVolume_);\n }\n },\n\n events: {\n adend: function adend() {\n this.state = 'content-resuming';\n },\n adserror: function adserror() {\n this.state = 'content-resuming';\n // Trigger 'adend' to notify that we are exiting 'ad-playback'\n player.trigger('adend');\n }\n }\n },\n 'content-resuming': {\n enter: function enter() {\n if (this._contentHasEnded) {\n _window2.default.clearTimeout(player.ads._fireEndedTimeout);\n // in some cases, ads are played in a swf or another video element\n // so we do not get an ended event in this state automatically.\n // If we don't get an ended event we can use, we need to trigger\n // one ourselves or else we won't actually ever end the current video.\n player.ads._fireEndedTimeout = _window2.default.setTimeout(function () {\n player.trigger('ended');\n }, 1000);\n }\n },\n leave: function leave() {\n _window2.default.clearTimeout(player.ads._fireEndedTimeout);\n },\n\n events: {\n contentupdate: function contentupdate() {\n this.state = 'content-set';\n },\n contentresumed: function contentresumed() {\n this.state = 'content-playback';\n },\n playing: function playing() {\n this.state = 'content-playback';\n },\n ended: function ended() {\n this.state = 'content-playback';\n }\n }\n },\n 'postroll?': {\n enter: function enter() {\n this.snapshot = snapshot.getPlayerSnapshot(player);\n if (player.ads.nopostroll_) {\n _window2.default.setTimeout(function () {\n // content-resuming happens after the timeout for backward-compatibility\n // with plugins that relied on a postrollTimeout before nopostroll was\n // implemented\n player.ads.state = 'content-resuming';\n player.trigger('ended');\n }, 1);\n } else {\n player.addClass('vjs-ad-loading');\n\n player.ads.adTimeoutTimeout = _window2.default.setTimeout(function () {\n player.trigger('adtimeout');\n }, settings.postrollTimeout);\n }\n },\n leave: function leave() {\n _window2.default.clearTimeout(player.ads.adTimeoutTimeout);\n player.removeClass('vjs-ad-loading');\n },\n\n events: {\n adstart: function adstart() {\n this.state = 'ad-playback';\n },\n adskip: function adskip() {\n this.state = 'content-resuming';\n _window2.default.setTimeout(function () {\n player.trigger('ended');\n }, 1);\n },\n adtimeout: function adtimeout() {\n this.state = 'content-resuming';\n _window2.default.setTimeout(function () {\n player.trigger('ended');\n }, 1);\n },\n adserror: function adserror() {\n this.state = 'content-resuming';\n _window2.default.setTimeout(function () {\n player.trigger('ended');\n }, 1);\n },\n contentupdate: function contentupdate() {\n this.state = 'ads-ready?';\n }\n }\n },\n 'content-playback': {\n enter: function enter() {\n // make sure that any cancelPlayTimeout is cleared\n if (player.ads.cancelPlayTimeout) {\n _window2.default.clearTimeout(player.ads.cancelPlayTimeout);\n player.ads.cancelPlayTimeout = null;\n }\n\n // This was removed because now that \"playing\" is fixed to only play after\n // preroll, any integration should just use the \"playing\" event. However,\n // we found out some 3rd party code relied on this event, so we've temporarily\n // added it back in to give people more time to update their code.\n player.trigger({\n type: 'contentplayback',\n triggerevent: player.ads.triggerevent\n });\n\n // Play the content\n if (player.ads.cancelledPlay) {\n player.ads.cancelledPlay = false;\n if (player.paused()) {\n player.play();\n }\n }\n },\n\n events: {\n // In the case of a timeout, adsready might come in late.\n // This assumes the behavior that if an ad times out, it could still\n // interrupt the content and start playing. An integration could\n // still decide to behave otherwise.\n adsready: function adsready() {\n player.trigger('readyforpreroll');\n },\n adstart: function adstart() {\n this.state = 'ad-playback';\n },\n contentupdate: function contentupdate() {\n // We know sources have changed, so we call CancelContentPlay\n // to avoid playback of video in the background of an ad. Playback Occurs on\n // Android devices if we do not call cancelContentPlay. This is because\n // the sources do not get updated in time on Android due to timing issues.\n // So instead of checking if the sources have changed in the play handler\n // and calling cancelContentPlay() there we call it here.\n // This does not happen on Desktop as the sources do get updated in time.\n if (!player.ads.shouldPlayContentBehindAd(player)) {\n (0, _cancelContentPlay2.default)(player);\n }\n if (player.paused()) {\n this.state = 'content-set';\n } else {\n this.state = 'ads-ready?';\n }\n },\n contentended: function contentended() {\n\n // If _contentHasEnded is true it means we already checked for postrolls and\n // played postrolls if needed, so now we're ready to send an ended event\n if (this._contentHasEnded) {\n // Causes ended event to trigger in content-resuming.enter.\n // From there, the ended event event is not redispatched.\n // Then we end up back in content-playback state.\n this.state = 'content-resuming';\n return;\n }\n\n this._contentHasEnded = true;\n this.state = 'postroll?';\n }\n }\n }\n };\n\n var processEvent = function processEvent(event) {\n\n var state = player.ads.state;\n\n // Execute the current state's handler for this event\n var eventHandlers = states[state].events;\n\n if (eventHandlers) {\n var handler = eventHandlers[event.type];\n\n if (handler) {\n handler.apply(player.ads);\n }\n }\n\n // If the state has changed...\n if (state !== player.ads.state) {\n var previousState = state;\n var newState = player.ads.state;\n\n // Record the event that caused the state transition\n player.ads.triggerevent = event.type;\n\n // Execute \"leave\" method for the previous state\n if (states[previousState].leave) {\n states[previousState].leave.apply(player.ads);\n }\n\n // Execute \"enter\" method for the new state\n if (states[newState].enter) {\n states[newState].enter.apply(player.ads);\n }\n\n // Debug log message for state changes\n if (settings.debug) {\n _video2.default.log('ads', player.ads.triggerevent + ' triggered: ' + previousState + ' -> ' + newState);\n }\n }\n };\n\n // Register our handler for the events that the state machine will process\n player.on(VIDEO_EVENTS.concat([\n // Events emitted by this plugin\n 'adtimeout', 'contentupdate', 'contentplaying', 'contentended', 'contentresumed',\n // Triggered by startLinearAdMode()\n 'adstart',\n // Triggered by endLinearAdMode()\n 'adend',\n // Triggered by skipLinearAdMode()\n 'adskip',\n\n // Events emitted by integrations\n 'adsready', 'adserror', 'adscanceled', 'nopreroll']), processEvent);\n\n // If we're autoplaying, the state machine will immidiately process\n // a synthetic play event\n if (!player.paused()) {\n processEvent({ type: 'play' });\n }\n};\n\n// Register this plugin with videojs\n_video2.default.plugin('ads', contribAdsPlugin);","'use strict';\n\nexports.__esModule = true;\nexports.default = redispatch;\n/*\nThe goal of this feature is to make player events work as an integrator would\nexpect despite the presense of ads. For example, an integrator would expect\nan `ended` event to happen once the content is ended. If an `ended` event is sent\nas a result of an ad ending, that is a bug. The `redispatch` method should recognize\nsuch `ended` events and prefix them so they are sent as `adended`, and so on with\nall other player events.\n*/\n\n// Stop propogation for an event\nvar cancelEvent = function cancelEvent(player, event) {\n // Pretend we called stopImmediatePropagation because we want the native\n // element events to continue propagating\n event.isImmediatePropagationStopped = function () {\n return true;\n };\n event.cancelBubble = true;\n event.isPropagationStopped = function () {\n return true;\n };\n};\n\n// Stop propogation for an event, then send a new event with the type of the original\n// event with the given prefix added.\nvar prefixEvent = function prefixEvent(player, prefix, event) {\n cancelEvent(player, event);\n player.trigger({\n type: prefix + event.type,\n state: player.ads.state,\n originalEvent: event\n });\n};\n\n// Handle a player event, either by redispatching it with a prefix, or by\n// letting it go on its way without any meddling.\nfunction redispatch(event) {\n\n // We do a quick play/pause before we check for prerolls. This creates a \"playing\"\n // event. This conditional block prefixes that event so it's \"adplaying\" if it\n // happens while we're in the \"preroll?\" state. Not every browser is in the\n // \"preroll?\" state for this event, so the following browsers come through here:\n // * iPad\n // * iPhone\n // * Android\n // * Safari\n // This is too soon to check videoElementRecycled because there is no snapshot\n // yet. We rely on the coincidence that all browsers for which\n // videoElementRecycled would be true also happen to send their initial playing\n // event during \"preroll?\"\n if (event.type === 'playing' && this.ads.state === 'preroll?') {\n prefixEvent(this, 'ad', event);\n\n // Here we send \"adplaying\" for browsers that send their initial \"playing\" event\n // (caused by the the initial play/pause) during the \"ad-playback\" state.\n // The following browsers come through here:\n // * Chrome\n // * IE11\n // If the ad plays in the content tech (aka videoElementRecycled) there will be\n // another playing event when the ad starts. We check videoElementRecycled to\n // avoid a second adplaying event. Thankfully, at this point a snapshot exists\n // so we can safely check videoElementRecycled.\n } else if (event.type === 'playing' && this.ads.state === 'ad-playback' && !this.ads.videoElementRecycled()) {\n prefixEvent(this, 'ad', event);\n\n // If the ad takes a long time to load, \"playing\" caused by play/pause can happen\n // during \"ads-ready?\" instead of \"preroll?\" or \"ad-playback\", skipping the\n // other conditions that would normally catch it\n } else if (event.type === 'playing' && this.ads.state === 'ads-ready?') {\n prefixEvent(this, 'ad', event);\n\n // When an ad is playing in content tech, we would normally prefix\n // \"playing\" with \"ad\" to send \"adplaying\". However, when we did a play/pause\n // before the preroll, we already sent \"adplaying\". This condition prevents us\n // from sending another.\n } else if (event.type === 'playing' && this.ads.state === 'ad-playback' && this.ads.videoElementRecycled()) {\n cancelEvent(this, event);\n return;\n\n // When ad is playing in content tech, prefix everything with \"ad\".\n // This block catches many events such as emptied, play, timeupdate, and ended.\n } else if (this.ads.state === 'ad-playback') {\n if (this.ads.videoElementRecycled() || this.ads.stitchedAds()) {\n prefixEvent(this, 'ad', event);\n }\n\n // Send contentended if ended happens during content.\n // We will make sure an ended event is sent after postrolls.\n } else if (this.ads.state === 'content-playback' && event.type === 'ended') {\n prefixEvent(this, 'content', event);\n\n // Event prefixing during content resuming is complicated\n } else if (this.ads.state === 'content-resuming') {\n\n // This does not happen during normal circumstances. I wasn't able to reproduce\n // it, but the working theory is that it handles cases where restoring the\n // snapshot takes a long time, such as in iOS7 and older Firefox.\n if (this.ads.snapshot && this.currentSrc() !== this.ads.snapshot.currentSrc) {\n\n // Don't prefix `loadstart` event\n if (event.type === 'loadstart') {\n return;\n }\n\n // All other events get \"content\" prefix\n return prefixEvent(this, 'content', event);\n\n // Content resuming after postroll\n } else if (this.ads.snapshot && this.ads.snapshot.ended) {\n\n // Don't prefix `pause` and `ended` events\n // They don't always happen during content-resuming, but they might.\n // It seems to happen most often on iOS and Android.\n if (event.type === 'pause' || event.type === 'ended') {\n return;\n }\n\n // All other events get \"content\" prefix\n return prefixEvent(this, 'content', event);\n }\n\n // Content resuming after preroll or midroll\n // Events besides \"playing\" get \"content\" prefix\n if (event.type !== 'playing') {\n prefixEvent(this, 'content', event);\n }\n }\n}","'use strict';\n\nexports.__esModule = true;\nexports.getPlayerSnapshot = getPlayerSnapshot;\nexports.restorePlayerSnapshot = restorePlayerSnapshot;\n\nvar _window = require('global/window');\n\nvar _window2 = _interopRequireDefault(_window);\n\nvar _video = require('video.js');\n\nvar _video2 = _interopRequireDefault(_video);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Returns an object that captures the portions of player state relevant to\n * video playback. The result of this function can be passed to\n * restorePlayerSnapshot with a player to return the player to the state it\n * was in when this function was invoked.\n * @param {Object} player The videojs player object\n */\n/*\nThe snapshot feature is responsible for saving the player state before an ad, then\nrestoring the player state after an ad.\n*/\n\nfunction getPlayerSnapshot(player) {\n\n var currentTime = void 0;\n\n if (_video2.default.browser.IS_IOS && player.ads.isLive(player)) {\n // Record how far behind live we are\n if (player.seekable().length > 0) {\n currentTime = player.currentTime() - player.seekable().end(0);\n } else {\n currentTime = player.currentTime();\n }\n } else {\n currentTime = player.currentTime();\n }\n\n var tech = player.$('.vjs-tech');\n var remoteTracks = player.remoteTextTracks ? player.remoteTextTracks() : [];\n var tracks = player.textTracks ? player.textTracks() : [];\n var suppressedRemoteTracks = [];\n var suppressedTracks = [];\n var snapshotObject = {\n ended: player.ended(),\n currentSrc: player.currentSrc(),\n src: player.src(),\n currentTime: currentTime,\n type: player.currentType()\n };\n\n if (tech) {\n snapshotObject.nativePoster = tech.poster;\n snapshotObject.style = tech.getAttribute('style');\n }\n\n for (var i = 0; i < remoteTracks.length; i++) {\n var track = remoteTracks[i];\n\n suppressedRemoteTracks.push({\n track: track,\n mode: track.mode\n });\n track.mode = 'disabled';\n }\n snapshotObject.suppressedRemoteTracks = suppressedRemoteTracks;\n\n for (var _i = 0; _i < tracks.length; _i++) {\n var _track = tracks[_i];\n\n suppressedTracks.push({\n track: _track,\n mode: _track.mode\n });\n _track.mode = 'disabled';\n }\n snapshotObject.suppressedTracks = suppressedTracks;\n\n return snapshotObject;\n}\n\n/**\n * Attempts to modify the specified player so that its state is equivalent to\n * the state of the snapshot.\n * @param {Object} player - the videojs player object\n * @param {Object} snapshotObject - the player state to apply\n */\nfunction restorePlayerSnapshot(player, snapshotObject) {\n\n if (player.ads.disableNextSnapshotRestore === true) {\n player.ads.disableNextSnapshotRestore = false;\n return;\n }\n\n // The playback tech\n var tech = player.$('.vjs-tech');\n\n // the number of[ remaining attempts to restore the snapshot\n var attempts = 20;\n\n var suppressedRemoteTracks = snapshotObject.suppressedRemoteTracks;\n var suppressedTracks = snapshotObject.suppressedTracks;\n var trackSnapshot = void 0;\n var restoreTracks = function restoreTracks() {\n for (var i = 0; i < suppressedRemoteTracks.length; i++) {\n trackSnapshot = suppressedRemoteTracks[i];\n trackSnapshot.track.mode = trackSnapshot.mode;\n }\n\n for (var _i2 = 0; _i2 < suppressedTracks.length; _i2++) {\n trackSnapshot = suppressedTracks[_i2];\n trackSnapshot.track.mode = trackSnapshot.mode;\n }\n };\n\n // finish restoring the playback state\n var resume = function resume() {\n var currentTime = void 0;\n\n if (_video2.default.browser.IS_IOS && player.ads.isLive(player)) {\n if (snapshotObject.currentTime < 0) {\n // Playback was behind real time, so seek backwards to match\n if (player.seekable().length > 0) {\n currentTime = player.seekable().end(0) + snapshotObject.currentTime;\n } else {\n currentTime = player.currentTime();\n }\n player.currentTime(currentTime);\n }\n } else if (snapshotObject.ended) {\n player.currentTime(player.duration());\n } else {\n player.currentTime(snapshotObject.currentTime);\n }\n\n // Resume playback if this wasn't a postroll\n if (!snapshotObject.ended) {\n player.play();\n }\n };\n\n // determine if the video element has loaded enough of the snapshot source\n // to be ready to apply the rest of the state\n var tryToResume = function tryToResume() {\n\n // tryToResume can either have been called through the `contentcanplay`\n // event or fired through setTimeout.\n // When tryToResume is called, we should make sure to clear out the other\n // way it could've been called by removing the listener and clearing out\n // the timeout.\n player.off('contentcanplay', tryToResume);\n if (player.ads.tryToResumeTimeout_) {\n player.clearTimeout(player.ads.tryToResumeTimeout_);\n player.ads.tryToResumeTimeout_ = null;\n }\n\n // Tech may have changed depending on the differences in sources of the\n // original video and that of the ad\n tech = player.el().querySelector('.vjs-tech');\n\n if (tech.readyState > 1) {\n // some browsers and media aren't \"seekable\".\n // readyState greater than 1 allows for seeking without exceptions\n return resume();\n }\n\n if (tech.seekable === undefined) {\n // if the tech doesn't expose the seekable time ranges, try to\n // resume playback immediately\n return resume();\n }\n\n if (tech.seekable.length > 0) {\n // if some period of the video is seekable, resume playback\n return resume();\n }\n\n // delay a bit and then check again unless we're out of attempts\n if (attempts--) {\n _window2.default.setTimeout(tryToResume, 50);\n } else {\n try {\n resume();\n } catch (e) {\n _video2.default.log.warn('Failed to resume the content after an advertisement', e);\n }\n }\n };\n\n if (snapshotObject.nativePoster) {\n tech.poster = snapshotObject.nativePoster;\n }\n\n if ('style' in snapshotObject) {\n // overwrite all css style properties to restore state precisely\n tech.setAttribute('style', snapshotObject.style || '');\n }\n\n // Determine whether the player needs to be restored to its state\n // before ad playback began. With a custom ad display or burned-in\n // ads, the content player state hasn't been modified and so no\n // restoration is required\n\n if (player.ads.videoElementRecycled()) {\n // on ios7, fiddling with textTracks too early will cause safari to crash\n player.one('contentloadedmetadata', restoreTracks);\n\n // if the src changed for ad playback, reset it\n player.src({ src: snapshotObject.currentSrc, type: snapshotObject.type });\n // safari requires a call to `load` to pick up a changed source\n player.load();\n // and then resume from the snapshots time once the original src has loaded\n // in some browsers (firefox) `canplay` may not fire correctly.\n // Reace the `canplay` event with a timeout.\n player.one('contentcanplay', tryToResume);\n player.ads.tryToResumeTimeout_ = player.setTimeout(tryToResume, 2000);\n } else if (!player.ended() || !snapshotObject.ended) {\n // if we didn't change the src, just restore the tracks\n restoreTracks();\n // the src didn't change and this wasn't a postroll\n // just resume playback at the current time.\n player.play();\n }\n}","/**\n * @file add-text-track-data.js\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _holaOrgVideoJs = (typeof window !== \"undefined\" ? window['videojs'] : typeof global !== \"undefined\" ? global['videojs'] : null);\n\nvar _holaOrgVideoJs2 = _interopRequireDefault(_holaOrgVideoJs);\n\n/**\n * Define properties on a cue for backwards compatability,\n * but warn the user that the way that they are using it\n * is depricated and will be removed at a later date.\n *\n * @param {Cue} cue the cue to add the properties on\n * @private\n */\nvar deprecateOldCue = function deprecateOldCue(cue) {\n Object.defineProperties(cue.frame, {\n id: {\n get: function get() {\n _holaOrgVideoJs2['default'].log.warn('cue.frame.id is deprecated. Use cue.value.key instead.');\n return cue.value.key;\n }\n },\n value: {\n get: function get() {\n _holaOrgVideoJs2['default'].log.warn('cue.frame.value is deprecated. Use cue.value.data instead.');\n return cue.value.data;\n }\n },\n privateData: {\n get: function get() {\n _holaOrgVideoJs2['default'].log.warn('cue.frame.privateData is deprecated. Use cue.value.data instead.');\n return cue.value.data;\n }\n }\n });\n};\n\n/**\n * Add text track data to a source handler given the captions and\n * metadata from the buffer.\n *\n * @param {Object} sourceHandler the flash or virtual source buffer\n * @param {Array} captionArray an array of caption data\n * @param {Array} cue an array of meta data\n * @private\n */\nvar addTextTrackData = function addTextTrackData(sourceHandler, captionArray, metadataArray) {\n var Cue = window.WebKitDataCue || window.VTTCue;\n\n if (captionArray) {\n captionArray.forEach(function (caption) {\n this.inbandTextTrack_.addCue(new Cue(caption.startTime + this.timestampOffset, caption.endTime + this.timestampOffset, caption.text));\n }, sourceHandler);\n }\n\n if (metadataArray) {\n metadataArray.forEach(function (metadata) {\n var time = metadata.cueTime + this.timestampOffset;\n\n metadata.frames.forEach(function (frame) {\n var cue = new Cue(time, time, frame.value || frame.url || frame.data || '');\n\n cue.frame = frame;\n cue.value = frame;\n deprecateOldCue(cue);\n this.metadataTrack_.addCue(cue);\n }, this);\n }, sourceHandler);\n }\n};\n\nexports['default'] = addTextTrackData;\nmodule.exports = exports['default'];","/**\n * @file codec-utils.js\n */\n\n/**\n * Check if a codec string refers to an audio codec.\n *\n * @param {String} codec codec string to check\n * @return {Boolean} if this is an audio codec\n * @private\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nvar isAudioCodec = function isAudioCodec(codec) {\n return (/mp4a\\.\\d+.\\d+/i.test(codec)\n );\n};\n\n/**\n * Check if a codec string refers to a video codec.\n *\n * @param {String} codec codec string to check\n * @return {Boolean} if this is a video codec\n * @private\n */\nvar isVideoCodec = function isVideoCodec(codec) {\n return (/avc1\\.[\\da-f]+/i.test(codec)\n );\n};\n\n/**\n * Parse a content type header into a type and parameters\n * object\n *\n * @param {String} type the content type header\n * @return {Object} the parsed content-type\n * @private\n */\nvar parseContentType = function parseContentType(type) {\n var object = { type: '', parameters: {} };\n var parameters = type.trim().split(';');\n\n // first parameter should always be content-type\n object.type = parameters.shift().trim();\n parameters.forEach(function (parameter) {\n var pair = parameter.trim().split('=');\n\n if (pair.length > 1) {\n var _name = pair[0].replace(/\"/g, '').trim();\n var value = pair[1].replace(/\"/g, '').trim();\n\n object.parameters[_name] = value;\n }\n });\n\n return object;\n};\n\nexports['default'] = {\n isAudioCodec: isAudioCodec,\n parseContentType: parseContentType,\n isVideoCodec: isVideoCodec\n};\nmodule.exports = exports['default'];","/**\n * @file create-text-tracks-if-necessary.js\n */\n\n/**\n * Create text tracks on video.js if they exist on a segment.\n *\n * @param {Object} sourceBuffer the VSB or FSB\n * @param {Object} mediaSource the HTML or Flash media source\n * @param {Object} segment the segment that may contain the text track\n * @private\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nvar createTextTracksIfNecessary = function createTextTracksIfNecessary(sourceBuffer, mediaSource, segment) {\n // create an in-band caption track if one is present in the segment\n if (segment.captions && segment.captions.length && !sourceBuffer.inbandTextTrack_) {\n sourceBuffer.inbandTextTrack_ = mediaSource.player_.addTextTrack('captions', 'cc1');\n }\n\n if (segment.metadata && segment.metadata.length && !sourceBuffer.metadataTrack_) {\n sourceBuffer.metadataTrack_ = mediaSource.player_.addTextTrack('metadata', 'Timed Metadata');\n sourceBuffer.metadataTrack_.inBandMetadataTrackDispatchType = segment.metadata.dispatchType;\n }\n};\n\nexports['default'] = createTextTracksIfNecessary;\nmodule.exports = exports['default'];","/**\n * @file flash-constants.js\n */\n/**\n * The maximum size in bytes for append operations to the video.js\n * SWF. Calling through to Flash blocks and can be expensive so\n * we chunk data and pass through 4KB at a time, yielding to the\n * browser between chunks. This gives a theoretical maximum rate of\n * 1MB/s into Flash. Any higher and we begin to drop frames and UI\n * responsiveness suffers.\n *\n * @private\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar flashConstants = {\n // times in milliseconds\n TIME_BETWEEN_CHUNKS: 1,\n BYTES_PER_CHUNK: 1024 * 32\n};\n\nexports[\"default\"] = flashConstants;\nmodule.exports = exports[\"default\"];","/**\n * @file flash-media-source.js\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _holaOrgVideoJs = (typeof window !== \"undefined\" ? window['videojs'] : typeof global !== \"undefined\" ? global['videojs'] : null);\n\nvar _holaOrgVideoJs2 = _interopRequireDefault(_holaOrgVideoJs);\n\nvar _flashSourceBuffer = require('./flash-source-buffer');\n\nvar _flashSourceBuffer2 = _interopRequireDefault(_flashSourceBuffer);\n\nvar _flashConstants = require('./flash-constants');\n\nvar _flashConstants2 = _interopRequireDefault(_flashConstants);\n\nvar _codecUtils = require('./codec-utils');\n\n/**\n * A flash implmentation of HTML MediaSources and a polyfill\n * for browsers that don't support native or HTML MediaSources..\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/MediaSource\n * @class FlashMediaSource\n * @extends videojs.EventTarget\n */\n\nvar FlashMediaSource = (function (_videojs$EventTarget) {\n _inherits(FlashMediaSource, _videojs$EventTarget);\n\n function FlashMediaSource() {\n var _this = this;\n\n _classCallCheck(this, FlashMediaSource);\n\n _get(Object.getPrototypeOf(FlashMediaSource.prototype), 'constructor', this).call(this);\n this.sourceBuffers = [];\n this.readyState = 'closed';\n\n this.on(['sourceopen', 'webkitsourceopen'], function (event) {\n // find the swf where we will push media data\n _this.swfObj = document.getElementById(event.swfId);\n _this.player_ = (0, _holaOrgVideoJs2['default'])(_this.swfObj.parentNode);\n _this.tech_ = _this.swfObj.tech;\n _this.readyState = 'open';\n\n _this.tech_.on('seeking', function () {\n var i = _this.sourceBuffers.length;\n\n while (i--) {\n _this.sourceBuffers[i].abort();\n }\n });\n\n // trigger load events\n if (_this.swfObj) {\n _this.swfObj.vjs_load();\n }\n });\n }\n\n /**\n * Set or return the presentation duration.\n *\n * @param {Double} value the duration of the media in seconds\n * @param {Double} the current presentation duration\n * @link http://www.w3.org/TR/media-source/#widl-MediaSource-duration\n */\n\n /**\n * We have this function so that the html and flash interfaces\n * are the same.\n *\n * @private\n */\n\n _createClass(FlashMediaSource, [{\n key: 'addSeekableRange_',\n value: function addSeekableRange_() {}\n // intentional no-op\n\n /**\n * Create a new flash source buffer and add it to our flash media source.\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/addSourceBuffer\n * @param {String} type the content-type of the source\n * @return {Object} the flash source buffer\n */\n\n }, {\n key: 'addSourceBuffer',\n value: function addSourceBuffer(type) {\n var parsedType = (0, _codecUtils.parseContentType)(type);\n var sourceBuffer = undefined;\n\n // if this is an FLV type, we'll push data to flash\n if (parsedType.type === 'video/mp2t') {\n // Flash source buffers\n sourceBuffer = new _flashSourceBuffer2['default'](this);\n } else {\n throw new Error('NotSupportedError (Video.js)');\n }\n\n this.sourceBuffers.push(sourceBuffer);\n return sourceBuffer;\n }\n\n /**\n * Signals the end of the stream.\n *\n * @link https://w3c.github.io/media-source/#widl-MediaSource-endOfStream-void-EndOfStreamError-error\n * @param {String=} error Signals that a playback error\n * has occurred. If specified, it must be either \"network\" or\n * \"decode\".\n */\n }, {\n key: 'endOfStream',\n value: function endOfStream(error) {\n if (error === 'network') {\n // MEDIA_ERR_NETWORK\n this.tech_.error(2);\n } else if (error === 'decode') {\n // MEDIA_ERR_DECODE\n this.tech_.error(3);\n }\n if (this.readyState !== 'ended') {\n this.readyState = 'ended';\n this.swfObj.vjs_endOfStream();\n }\n }\n }]);\n\n return FlashMediaSource;\n})(_holaOrgVideoJs2['default'].EventTarget);\n\nexports['default'] = FlashMediaSource;\ntry {\n Object.defineProperty(FlashMediaSource.prototype, 'duration', {\n /**\n * Return the presentation duration.\n *\n * @return {Double} the duration of the media in seconds\n * @link http://www.w3.org/TR/media-source/#widl-MediaSource-duration\n */\n get: function get() {\n if (!this.swfObj) {\n return NaN;\n }\n // get the current duration from the SWF\n return this.swfObj.vjs_getProperty('duration');\n },\n /**\n * Set the presentation duration.\n *\n * @param {Double} value the duration of the media in seconds\n * @return {Double} the duration of the media in seconds\n * @link http://www.w3.org/TR/media-source/#widl-MediaSource-duration\n */\n set: function set(value) {\n var i = undefined;\n var oldDuration = this.swfObj.vjs_getProperty('duration');\n\n this.swfObj.vjs_setProperty('duration', value);\n\n if (value < oldDuration) {\n // In MSE, this triggers the range removal algorithm which causes\n // an update to occur\n for (i = 0; i < this.sourceBuffers.length; i++) {\n this.sourceBuffers[i].remove(value, oldDuration);\n }\n }\n\n return value;\n }\n });\n} catch (e) {\n // IE8 throws if defineProperty is called on a non-DOM node. We\n // don't support IE8 but we shouldn't throw an error if loaded\n // there.\n FlashMediaSource.prototype.duration = NaN;\n}\n\nfor (var property in _flashConstants2['default']) {\n FlashMediaSource[property] = _flashConstants2['default'][property];\n}\nmodule.exports = exports['default'];","/**\n * @file flash-source-buffer.js\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _holaOrgVideoJs = (typeof window !== \"undefined\" ? window['videojs'] : typeof global !== \"undefined\" ? global['videojs'] : null);\n\nvar _holaOrgVideoJs2 = _interopRequireDefault(_holaOrgVideoJs);\n\nvar _holaOrgMuxJs = require('@hola.org/mux.js');\n\nvar _holaOrgMuxJs2 = _interopRequireDefault(_holaOrgMuxJs);\n\nvar _removeCuesFromTrack = require('./remove-cues-from-track');\n\nvar _removeCuesFromTrack2 = _interopRequireDefault(_removeCuesFromTrack);\n\nvar _createTextTracksIfNecessary = require('./create-text-tracks-if-necessary');\n\nvar _createTextTracksIfNecessary2 = _interopRequireDefault(_createTextTracksIfNecessary);\n\nvar _addTextTrackData = require('./add-text-track-data');\n\nvar _addTextTrackData2 = _interopRequireDefault(_addTextTrackData);\n\nvar _flashConstants = require('./flash-constants');\n\nvar _flashConstants2 = _interopRequireDefault(_flashConstants);\n\n/**\n * A wrapper around the setTimeout function that uses\n * the flash constant time between ticks value.\n *\n * @param {Function} func the function callback to run\n * @private\n */\nvar scheduleTick = function scheduleTick(func) {\n // Chrome doesn't invoke requestAnimationFrame callbacks\n // in background tabs, so use setTimeout.\n window.setTimeout(func, _flashConstants2['default'].TIME_BETWEEN_CHUNKS);\n};\n\n/**\n * Generates a random string of max length 6\n *\n * @return {String} the randomly generated string\n * @function generateRandomString\n * @private\n */\nvar generateRandomString = function generateRandomString() {\n return Math.random().toString(36).slice(2, 8);\n};\n\n/**\n * Round a number to a specified number of places much like\n * toFixed but return a number instead of a string representation.\n *\n * @param {Number} num A number\n * @param {Number} places The number of decimal places which to\n * round\n * @private\n */\nvar toDecimalPlaces = function toDecimalPlaces(num, places) {\n if (typeof places !== 'number' || places < 0) {\n places = 0;\n }\n\n var scale = Math.pow(10, places);\n\n return Math.round(num * scale) / scale;\n};\n\nvar byteArrayToString = function byteArrayToString(buffer) {\n var CHUNK_SIZE = 8 * 1024;\n var str = '';\n\n if (buffer.length <= CHUNK_SIZE) {\n return String.fromCharCode.apply(null, buffer);\n }\n for (var i = 0; i < buffer.length; i += CHUNK_SIZE) {\n str += String.fromCharCode.apply(null, buffer.subarray(i, i + CHUNK_SIZE));\n }\n return str;\n};\n\n/**\n * A SourceBuffer implementation for Flash rather than HTML.\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/MediaSource\n * @param {Object} mediaSource the flash media source\n * @class FlashSourceBuffer\n * @extends videojs.EventTarget\n */\n\nvar FlashSourceBuffer = (function (_videojs$EventTarget) {\n _inherits(FlashSourceBuffer, _videojs$EventTarget);\n\n function FlashSourceBuffer(mediaSource) {\n var _this = this;\n\n _classCallCheck(this, FlashSourceBuffer);\n\n _get(Object.getPrototypeOf(FlashSourceBuffer.prototype), 'constructor', this).call(this);\n var encodedHeader = undefined;\n\n // Start off using the globally defined value but refine\n // as we append data into flash\n this.chunkSize_ = _flashConstants2['default'].BYTES_PER_CHUNK;\n\n // byte arrays queued to be appended\n this.buffer_ = [];\n\n // the total number of queued bytes\n this.bufferSize_ = 0;\n\n // to be able to determine the correct position to seek to, we\n // need to retain information about the mapping between the\n // media timeline and PTS values\n this.basePtsOffset_ = NaN;\n\n this.mediaSource = mediaSource;\n\n // indicates whether the asynchronous continuation of an operation\n // is still being processed\n // see https://w3c.github.io/media-source/#widl-SourceBuffer-updating\n this.updating = false;\n this.timestampOffset_ = 0;\n\n // TS to FLV transmuxer\n this.segmentParser_ = new _holaOrgMuxJs2['default'].flv.Transmuxer();\n this.segmentParser_.on('data', this.receiveBuffer_.bind(this));\n encodedHeader = window.btoa(String.fromCharCode.apply(null, Array.prototype.slice.call(this.segmentParser_.getFlvHeader())));\n\n var safePlayerId = this.mediaSource.player_.id().replace(/[^a-zA-Z0-9]/g, '_');\n\n this.flashEncodedHeaderName_ = 'vjs_flashEncodedHeader_' + safePlayerId + generateRandomString();\n this.flashEncodedDataName_ = 'vjs_flashEncodedData_' + safePlayerId + generateRandomString();\n\n window[this.flashEncodedHeaderName_] = function () {\n delete window[_this.flashEncodedHeaderName_];\n return encodedHeader;\n };\n\n this.mediaSource.swfObj.vjs_appendChunkReady(this.flashEncodedHeaderName_);\n\n Object.defineProperty(this, 'timestampOffset', {\n get: function get() {\n return this.timestampOffset_;\n },\n set: function set(val) {\n if (typeof val === 'number' && val >= 0) {\n this.timestampOffset_ = val;\n this.segmentParser_ = new _holaOrgMuxJs2['default'].flv.Transmuxer();\n this.segmentParser_.on('data', this.receiveBuffer_.bind(this));\n // We have to tell flash to expect a discontinuity\n this.mediaSource.swfObj.vjs_discontinuity();\n // the media <-> PTS mapping must be re-established after\n // the discontinuity\n this.basePtsOffset_ = NaN;\n }\n }\n });\n\n Object.defineProperty(this, 'buffered', {\n get: function get() {\n if (!this.mediaSource || !this.mediaSource.swfObj || !('vjs_getProperty' in this.mediaSource.swfObj)) {\n return _holaOrgVideoJs2['default'].createTimeRange();\n }\n\n var buffered = this.mediaSource.swfObj.vjs_getProperty('buffered');\n\n if (buffered && buffered.length) {\n buffered[0][0] = toDecimalPlaces(buffered[0][0], 3);\n buffered[0][1] = toDecimalPlaces(buffered[0][1], 3);\n }\n return _holaOrgVideoJs2['default'].createTimeRanges(buffered);\n }\n });\n\n // On a seek we remove all text track data since flash has no concept\n // of a buffered-range and everything else is reset on seek\n this.mediaSource.player_.on('seeked', function () {\n (0, _removeCuesFromTrack2['default'])(0, Infinity, _this.metadataTrack_);\n (0, _removeCuesFromTrack2['default'])(0, Infinity, _this.inbandTextTrack_);\n });\n }\n\n /**\n * Append bytes to the sourcebuffers buffer, in this case we\n * have to append it to swf object.\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/appendBuffer\n * @param {Array} bytes\n */\n\n _createClass(FlashSourceBuffer, [{\n key: 'appendBuffer',\n value: function appendBuffer(bytes) {\n var _this2 = this;\n\n var error = undefined;\n var chunk = 512 * 1024;\n var i = 0;\n\n if (this.updating) {\n error = new Error('SourceBuffer.append() cannot be called ' + 'while an update is in progress');\n error.name = 'InvalidStateError';\n error.code = 11;\n throw error;\n }\n\n this.updating = true;\n this.mediaSource.readyState = 'open';\n this.trigger({ type: 'update' });\n\n // this is here to use recursion\n var chunkInData = function chunkInData() {\n _this2.segmentParser_.push(bytes.subarray(i, i + chunk));\n i += chunk;\n if (i < bytes.byteLength) {\n scheduleTick(chunkInData);\n } else {\n scheduleTick(_this2.segmentParser_.flush.bind(_this2.segmentParser_));\n }\n };\n\n chunkInData();\n }\n\n /**\n * Reset the parser and remove any data queued to be sent to the SWF.\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/abort\n */\n }, {\n key: 'abort',\n value: function abort() {\n this.buffer_ = [];\n this.bufferSize_ = 0;\n this.mediaSource.swfObj.vjs_abort();\n\n // report any outstanding updates have ended\n if (this.updating) {\n this.updating = false;\n this.trigger({ type: 'updateend' });\n }\n }\n\n /**\n * Flash cannot remove ranges already buffered in the NetStream\n * but seeking clears the buffer entirely. For most purposes,\n * having this operation act as a no-op is acceptable.\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/remove\n * @param {Double} start start of the section to remove\n * @param {Double} end end of the section to remove\n */\n }, {\n key: 'remove',\n value: function remove(start, end) {\n (0, _removeCuesFromTrack2['default'])(start, end, this.metadataTrack_);\n (0, _removeCuesFromTrack2['default'])(start, end, this.inbandTextTrack_);\n this.trigger({ type: 'update' });\n this.trigger({ type: 'updateend' });\n }\n\n /**\n * Receive a buffer from the flv.\n *\n * @param {Object} segment\n * @private\n */\n }, {\n key: 'receiveBuffer_',\n value: function receiveBuffer_(segment) {\n var _this3 = this;\n\n // create an in-band caption track if one is present in the segment\n (0, _createTextTracksIfNecessary2['default'])(this, this.mediaSource, segment);\n (0, _addTextTrackData2['default'])(this, segment.captions, segment.metadata);\n\n // Do this asynchronously since convertTagsToData_ can be time consuming\n scheduleTick(function () {\n var flvBytes = _this3.convertTagsToData_(segment);\n\n if (_this3.buffer_.length === 0) {\n scheduleTick(_this3.processBuffer_.bind(_this3));\n }\n\n if (flvBytes) {\n _this3.buffer_.push(flvBytes);\n _this3.bufferSize_ += flvBytes.byteLength;\n }\n });\n }\n\n /**\n * Append a portion of the current buffer to the SWF.\n *\n * @private\n */\n }, {\n key: 'processBuffer_',\n value: function processBuffer_() {\n var _this4 = this;\n\n var chunkSize = _flashConstants2['default'].BYTES_PER_CHUNK;\n\n if (!this.buffer_.length) {\n if (this.updating !== false) {\n this.updating = false;\n this.trigger({ type: 'updateend' });\n }\n // do nothing if the buffer is empty\n return;\n }\n\n // concatenate appends up to the max append size\n var payload = new Uint8Array(Math.min(chunkSize, this.bufferSize_));\n var i = payload.byteLength;\n\n while (i) {\n var chunk = this.buffer_[0].subarray(0, i);\n\n payload.set(chunk, payload.byteLength - i);\n // requeue any bytes that won't make it this round\n if (chunk.byteLength < this.buffer_[0].byteLength) {\n this.buffer_[0] = this.buffer_[0].subarray(i);\n } else {\n this.buffer_.shift();\n }\n i -= chunk.byteLength;\n }\n this.bufferSize_ -= payload.byteLength;\n\n var b64str = window.btoa(byteArrayToString(payload));\n\n window[this.flashEncodedDataName_] = function () {\n // schedule another processBuffer to process any left over data or to\n // trigger updateend\n scheduleTick(_this4.processBuffer_.bind(_this4));\n delete window[_this4.flashEncodedDataName_];\n return b64str;\n };\n\n // Notify the swf that segment data is ready to be appended\n this.mediaSource.swfObj.vjs_appendChunkReady(this.flashEncodedDataName_);\n }\n\n /**\n * Turns an array of flv tags into a Uint8Array representing the\n * flv data. Also removes any tags that are before the current\n * time so that playback begins at or slightly after the right\n * place on a seek\n *\n * @private\n * @param {Object} segmentData object of segment data\n */\n }, {\n key: 'convertTagsToData_',\n value: function convertTagsToData_(segmentData) {\n var segmentByteLength = 0;\n var tech = this.mediaSource.tech_;\n var targetPts = 0;\n var i = undefined;\n var j = undefined;\n var segment = undefined;\n var filteredTags = [];\n var tags = this.getOrderedTags_(segmentData);\n\n // Establish the media timeline to PTS translation if we don't\n // have one already\n if (isNaN(this.basePtsOffset_) && tags.length) {\n this.basePtsOffset_ = tags[0].pts;\n }\n\n // Trim any tags that are before the end of the end of\n // the current buffer\n if (tech.buffered().length) {\n targetPts = tech.buffered().end(0) - this.timestampOffset;\n }\n // Trim to currentTime if it's ahead of buffered or buffered doesn't exist\n targetPts = Math.max(targetPts, tech.currentTime() - this.timestampOffset);\n\n // PTS values are represented in milliseconds\n targetPts *= 1e3;\n targetPts += this.basePtsOffset_;\n\n // skip tags with a presentation time less than the seek target\n for (i = 0; i < tags.length; i++) {\n if (tags[i].pts >= targetPts) {\n filteredTags.push(tags[i]);\n }\n }\n\n if (filteredTags.length === 0) {\n return;\n }\n\n // concatenate the bytes into a single segment\n for (i = 0; i < filteredTags.length; i++) {\n segmentByteLength += filteredTags[i].bytes.byteLength;\n }\n segment = new Uint8Array(segmentByteLength);\n for (i = 0, j = 0; i < filteredTags.length; i++) {\n segment.set(filteredTags[i].bytes, j);\n j += filteredTags[i].bytes.byteLength;\n }\n\n return segment;\n }\n\n /**\n * Assemble the FLV tags in decoder order.\n *\n * @private\n * @param {Object} segmentData object of segment data\n */\n }, {\n key: 'getOrderedTags_',\n value: function getOrderedTags_(segmentData) {\n var videoTags = segmentData.tags.videoTags;\n var audioTags = segmentData.tags.audioTags;\n var tag = undefined;\n var tags = [];\n\n while (videoTags.length || audioTags.length) {\n if (!videoTags.length) {\n // only audio tags remain\n tag = audioTags.shift();\n } else if (!audioTags.length) {\n // only video tags remain\n tag = videoTags.shift();\n } else if (audioTags[0].dts < videoTags[0].dts) {\n // audio should be decoded next\n tag = audioTags.shift();\n } else {\n // video should be decoded next\n tag = videoTags.shift();\n }\n\n tags.push(tag.finalize());\n }\n\n return tags;\n }\n }]);\n\n return FlashSourceBuffer;\n})(_holaOrgVideoJs2['default'].EventTarget);\n\nexports['default'] = FlashSourceBuffer;\nmodule.exports = exports['default'];","/**\n * @file html-media-source.js\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _holaOrgVideoJs = (typeof window !== \"undefined\" ? window['videojs'] : typeof global !== \"undefined\" ? global['videojs'] : null);\n\nvar _holaOrgVideoJs2 = _interopRequireDefault(_holaOrgVideoJs);\n\nvar _virtualSourceBuffer = require('./virtual-source-buffer');\n\nvar _virtualSourceBuffer2 = _interopRequireDefault(_virtualSourceBuffer);\n\nvar _codecUtils = require('./codec-utils');\n\n/**\n * Replace the old apple-style `avc1.
.
` codec string with the standard\n * `avc1.`\n *\n * @param {Array} codecs an array of codec strings to fix\n * @return {Array} the translated codec array\n * @private\n */\nvar translateLegacyCodecs = function translateLegacyCodecs(codecs) {\n return codecs.map(function (codec) {\n return codec.replace(/avc1\\.(\\d+)\\.(\\d+)/i, function (orig, profile, avcLevel) {\n var profileHex = ('00' + Number(profile).toString(16)).slice(-2);\n var avcLevelHex = ('00' + Number(avcLevel).toString(16)).slice(-2);\n\n return 'avc1.' + profileHex + '00' + avcLevelHex;\n });\n });\n};\n\n/**\n * Our MediaSource implementation in HTML, mimics native\n * MediaSource where/if possible.\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/MediaSource\n * @class HtmlMediaSource\n * @extends videojs.EventTarget\n */\n\nvar HtmlMediaSource = (function (_videojs$EventTarget) {\n _inherits(HtmlMediaSource, _videojs$EventTarget);\n\n function HtmlMediaSource() {\n var _this = this;\n\n _classCallCheck(this, HtmlMediaSource);\n\n _get(Object.getPrototypeOf(HtmlMediaSource.prototype), 'constructor', this).call(this);\n var property = undefined;\n\n this.nativeMediaSource_ = new window.MediaSource();\n // delegate to the native MediaSource's methods by default\n for (property in this.nativeMediaSource_) {\n if (!(property in HtmlMediaSource.prototype) && typeof this.nativeMediaSource_[property] === 'function') {\n this[property] = this.nativeMediaSource_[property].bind(this.nativeMediaSource_);\n }\n }\n\n // emulate `duration` and `seekable` until seeking can be\n // handled uniformly for live streams\n // see https://github.com/w3c/media-source/issues/5\n this.duration_ = NaN;\n Object.defineProperty(this, 'duration', {\n get: function get() {\n if (this.duration_ === Infinity) {\n return this.duration_;\n }\n return this.nativeMediaSource_.duration;\n },\n set: function set(duration) {\n this.duration_ = duration;\n if (duration !== Infinity) {\n this.nativeMediaSource_.duration = duration;\n return;\n }\n }\n });\n Object.defineProperty(this, 'seekable', {\n get: function get() {\n if (this.duration_ === Infinity) {\n return _holaOrgVideoJs2['default'].createTimeRanges([[0, this.nativeMediaSource_.duration]]);\n }\n return this.nativeMediaSource_.seekable;\n }\n });\n\n Object.defineProperty(this, 'readyState', {\n get: function get() {\n return this.nativeMediaSource_.readyState;\n }\n });\n\n Object.defineProperty(this, 'activeSourceBuffers', {\n get: function get() {\n return this.activeSourceBuffers_;\n }\n });\n\n // the list of virtual and native SourceBuffers created by this\n // MediaSource\n this.sourceBuffers = [];\n\n this.activeSourceBuffers_ = [];\n\n /**\n * update the list of active source buffers based upon various\n * imformation from HLS and video.js\n *\n * @private\n */\n this.updateActiveSourceBuffers_ = function () {\n // Retain the reference but empty the array\n _this.activeSourceBuffers_.length = 0;\n\n // By default, the audio in the combined virtual source buffer is enabled\n // and the audio-only source buffer (if it exists) is disabled.\n var combined = false;\n var audioOnly = true;\n\n // TODO: maybe we can store the sourcebuffers on the track objects?\n // safari may do something like this\n for (var i = 0; i < _this.player_.audioTracks().length; i++) {\n var track = _this.player_.audioTracks()[i];\n\n if (track.enabled && track.kind !== 'main') {\n // The enabled track is an alternate audio track so disable the audio in\n // the combined source buffer and enable the audio-only source buffer.\n combined = true;\n audioOnly = false;\n break;\n }\n }\n\n // Since we currently support a max of two source buffers, add all of the source\n // buffers (in order).\n _this.sourceBuffers.forEach(function (sourceBuffer) {\n /* eslinst-disable */\n // TODO once codecs are required, we can switch to using the codecs to determine\n // what stream is the video stream, rather than relying on videoTracks\n /* eslinst-enable */\n\n if (sourceBuffer.videoCodec_ && sourceBuffer.audioCodec_) {\n // combined\n sourceBuffer.audioDisabled_ = combined;\n } else if (sourceBuffer.videoCodec_ && !sourceBuffer.audioCodec_) {\n // If the \"combined\" source buffer is video only, then we do not want\n // disable the audio-only source buffer (this is mostly for demuxed\n // audio and video hls)\n sourceBuffer.audioDisabled_ = true;\n audioOnly = false;\n } else if (!sourceBuffer.videoCodec_ && sourceBuffer.audioCodec_) {\n // audio only\n sourceBuffer.audioDisabled_ = audioOnly;\n if (audioOnly) {\n return;\n }\n }\n\n _this.activeSourceBuffers_.push(sourceBuffer);\n });\n };\n\n // Re-emit MediaSource events on the polyfill\n ['sourceopen', 'sourceclose', 'sourceended'].forEach(function (eventName) {\n this.nativeMediaSource_.addEventListener(eventName, this.trigger.bind(this));\n }, this);\n\n // capture the associated player when the MediaSource is\n // successfully attached\n this.on('sourceopen', function (event) {\n // Get the player this MediaSource is attached to\n var video = document.querySelector('[src=\"' + _this.url_ + '\"]');\n\n if (!video) {\n return;\n }\n\n _this.player_ = (0, _holaOrgVideoJs2['default'])(video.parentNode);\n\n _this.player_.audioTracks().on('change', _this.updateActiveSourceBuffers_);\n _this.player_.audioTracks().on('addtrack', _this.updateActiveSourceBuffers_);\n _this.player_.audioTracks().on('removetrack', _this.updateActiveSourceBuffers_);\n });\n\n // explicitly terminate any WebWorkers that were created\n // by SourceHandlers\n this.on('sourceclose', function (event) {\n this.sourceBuffers.forEach(function (sourceBuffer) {\n if (sourceBuffer.transmuxer_) {\n sourceBuffer.transmuxer_.terminate();\n }\n });\n this.sourceBuffers.length = 0;\n if (!this.player_) {\n return;\n }\n\n this.player_.audioTracks().off('change', this.updateActiveSourceBuffers_);\n this.player_.audioTracks().off('addtrack', this.updateActiveSourceBuffers_);\n this.player_.audioTracks().off('removetrack', this.updateActiveSourceBuffers_);\n });\n }\n\n /**\n * Add a range that that can now be seeked to.\n *\n * @param {Double} start where to start the addition\n * @param {Double} end where to end the addition\n * @private\n */\n\n _createClass(HtmlMediaSource, [{\n key: 'addSeekableRange_',\n value: function addSeekableRange_(start, end) {\n var error = undefined;\n\n if (this.duration !== Infinity) {\n error = new Error('MediaSource.addSeekableRange() can only be invoked ' + 'when the duration is Infinity');\n error.name = 'InvalidStateError';\n error.code = 11;\n throw error;\n }\n\n if (end > this.nativeMediaSource_.duration || isNaN(this.nativeMediaSource_.duration)) {\n this.nativeMediaSource_.duration = end;\n }\n }\n\n /**\n * Add a source buffer to the media source.\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/addSourceBuffer\n * @param {String} type the content-type of the content\n * @return {Object} the created source buffer\n */\n }, {\n key: 'addSourceBuffer',\n value: function addSourceBuffer(type) {\n var buffer = undefined;\n var parsedType = (0, _codecUtils.parseContentType)(type);\n\n // Create a VirtualSourceBuffer to transmux MPEG-2 transport\n // stream segments into fragmented MP4s\n if (parsedType.type === 'video/mp2t') {\n var codecs = [];\n\n if (parsedType.parameters && parsedType.parameters.codecs) {\n codecs = parsedType.parameters.codecs.split(',');\n codecs = translateLegacyCodecs(codecs);\n // XXX alexeym: fix bug in firefox when audio codec begins from\n // whitespace character\n codecs = codecs.map(function (codec) {\n return codec.trim();\n });\n codecs = codecs.filter(function (codec) {\n return (0, _codecUtils.isAudioCodec)(codec) || (0, _codecUtils.isVideoCodec)(codec);\n });\n }\n\n if (codecs.length === 0) {\n codecs = ['avc1.4d400d', 'mp4a.40.2'];\n }\n\n buffer = new _virtualSourceBuffer2['default'](this, codecs);\n\n if (this.sourceBuffers.length !== 0) {\n // If another VirtualSourceBuffer already exists, then we are creating a\n // SourceBuffer for an alternate audio track and therefore we know that\n // the source has both an audio and video track.\n // That means we should trigger the manual creation of the real\n // SourceBuffers instead of waiting for the transmuxer to return data\n this.sourceBuffers[0].createRealSourceBuffers_();\n buffer.createRealSourceBuffers_();\n\n // Automatically disable the audio on the first source buffer if\n // a second source buffer is ever created\n this.sourceBuffers[0].audioDisabled_ = true;\n }\n } else {\n // delegate to the native implementation\n buffer = this.nativeMediaSource_.addSourceBuffer(type);\n }\n\n this.sourceBuffers.push(buffer);\n return buffer;\n }\n }]);\n\n return HtmlMediaSource;\n})(_holaOrgVideoJs2['default'].EventTarget);\n\nexports['default'] = HtmlMediaSource;\nmodule.exports = exports['default'];","/**\n * @file remove-cues-from-track.js\n */\n\n/**\n * Remove cues from a track on video.js.\n *\n * @param {Double} start start of where we should remove the cue\n * @param {Double} end end of where the we should remove the cue\n * @param {Object} track the text track to remove the cues from\n * @private\n */\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar removeCuesFromTrack = function removeCuesFromTrack(start, end, track) {\n var i = undefined;\n var cue = undefined;\n\n if (!track) {\n return;\n }\n\n i = track.cues.length;\n\n while (i--) {\n cue = track.cues[i];\n\n // Remove any overlapping cue\n if (cue.startTime <= end && cue.endTime >= start) {\n track.removeCue(cue);\n }\n }\n};\n\nexports[\"default\"] = removeCuesFromTrack;\nmodule.exports = exports[\"default\"];","/**\n * @file transmuxer-worker.js\n */\n\n/**\n * videojs-contrib-media-sources\n *\n * Copyright (c) 2015 Brightcove\n * All rights reserved.\n *\n * Handles communication between the browser-world and the mux.js\n * transmuxer running inside of a WebWorker by exposing a simple\n * message-based interface to a Transmuxer object.\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar _holaOrgMuxJs = require('@hola.org/mux.js');\n\nvar _holaOrgMuxJs2 = _interopRequireDefault(_holaOrgMuxJs);\n\n/**\n * Re-emits tranmsuxer events by converting them into messages to the\n * world outside the worker.\n *\n * @param {Object} transmuxer the transmuxer to wire events on\n * @private\n */\nvar wireTransmuxerEvents = function wireTransmuxerEvents(transmuxer) {\n transmuxer.on('data', function (segment) {\n // transfer ownership of the underlying ArrayBuffer\n // instead of doing a copy to save memory\n // ArrayBuffers are transferable but generic TypedArrays are not\n // @link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers#Passing_data_by_transferring_ownership_(transferable_objects)\n var typedArray = segment.data;\n\n segment.data = typedArray.buffer;\n postMessage({\n action: 'data',\n segment: segment,\n byteOffset: typedArray.byteOffset,\n byteLength: typedArray.byteLength\n }, [segment.data]);\n });\n\n if (transmuxer.captionStream) {\n transmuxer.captionStream.on('data', function (caption) {\n postMessage({\n action: 'caption',\n data: caption\n });\n });\n }\n\n transmuxer.on('done', function (data) {\n postMessage({ action: 'done' });\n });\n};\n\n/**\n * All incoming messages route through this hash. If no function exists\n * to handle an incoming message, then we ignore the message.\n *\n * @class MessageHandlers\n * @param {Object} options the options to initialize with\n */\n\nvar MessageHandlers = (function () {\n function MessageHandlers(options) {\n _classCallCheck(this, MessageHandlers);\n\n this.options = options || {};\n this.init();\n }\n\n /**\n * Our web wroker interface so that things can talk to mux.js\n * that will be running in a web worker. the scope is passed to this by\n * webworkify.\n *\n * @param {Object} self the scope for the web worker\n */\n\n /**\n * initialize our web worker and wire all the events.\n */\n\n _createClass(MessageHandlers, [{\n key: 'init',\n value: function init() {\n if (this.transmuxer) {\n this.transmuxer.dispose();\n }\n this.transmuxer = new _holaOrgMuxJs2['default'].mp4.Transmuxer(this.options);\n wireTransmuxerEvents(this.transmuxer);\n }\n\n /**\n * Adds data (a ts segment) to the start of the transmuxer pipeline for\n * processing.\n *\n * @param {ArrayBuffer} data data to push into the muxer\n */\n }, {\n key: 'push',\n value: function push(data) {\n // Cast array buffer to correct type for transmuxer\n var segment = new Uint8Array(data.data, data.byteOffset, data.byteLength);\n\n this.transmuxer.push(segment);\n }\n\n /**\n * Recreate the transmuxer so that the next segment added via `push`\n * start with a fresh transmuxer.\n */\n }, {\n key: 'reset',\n value: function reset() {\n this.init();\n }\n\n /**\n * Set the value that will be used as the `baseMediaDecodeTime` time for the\n * next segment pushed in. Subsequent segments will have their `baseMediaDecodeTime`\n * set relative to the first based on the PTS values.\n *\n * @param {Object} data used to set the timestamp offset in the muxer\n */\n }, {\n key: 'setTimestampOffset',\n value: function setTimestampOffset(data) {\n var timestampOffset = data.timestampOffset || 0;\n\n this.transmuxer.setBaseMediaDecodeTime(Math.round(timestampOffset * 90000));\n }\n\n /**\n * Forces the pipeline to finish processing the last segment and emit it's\n * results.\n *\n * @param {Object} data event data, not really used\n */\n }, {\n key: 'flush',\n value: function flush(data) {\n this.transmuxer.flush();\n }\n }]);\n\n return MessageHandlers;\n})();\n\nvar Worker = function Worker(self) {\n self.onmessage = function (event) {\n if (event.data.action === 'init' && event.data.options) {\n this.messageHandlers = new MessageHandlers(event.data.options);\n return;\n }\n\n if (!this.messageHandlers) {\n this.messageHandlers = new MessageHandlers();\n }\n\n if (event.data && event.data.action && event.data.action !== 'init') {\n if (this.messageHandlers[event.data.action]) {\n this.messageHandlers[event.data.action](event.data);\n }\n }\n };\n};\n\nexports['default'] = function (self) {\n return new Worker(self);\n};\n\nmodule.exports = exports['default'];","/**\n * @file videojs-contrib-media-sources.js\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _flashMediaSource = require('./flash-media-source');\n\nvar _flashMediaSource2 = _interopRequireDefault(_flashMediaSource);\n\nvar _htmlMediaSource = require('./html-media-source');\n\nvar _htmlMediaSource2 = _interopRequireDefault(_htmlMediaSource);\n\nvar _holaOrgVideoJs = (typeof window !== \"undefined\" ? window['videojs'] : typeof global !== \"undefined\" ? global['videojs'] : null);\n\nvar _holaOrgVideoJs2 = _interopRequireDefault(_holaOrgVideoJs);\n\nvar urlCount = 0;\n\n// ------------\n// Media Source\n// ------------\n\nvar defaults = {\n // how to determine the MediaSource implementation to use. There\n // are three available modes:\n // - auto: use native MediaSources where available and Flash\n // everywhere else\n // - html5: always use native MediaSources\n // - flash: always use the Flash MediaSource polyfill\n mode: 'auto'\n};\n\n// store references to the media sources so they can be connected\n// to a video element (a swf object)\n// TODO: can we store this somewhere local to this module?\n_holaOrgVideoJs2['default'].mediaSources = {};\n\n/**\n * Provide a method for a swf object to notify JS that a\n * media source is now open.\n *\n * @param {String} msObjectURL string referencing the MSE Object URL\n * @param {String} swfId the swf id\n */\nvar open = function open(msObjectURL, swfId) {\n var mediaSource = _holaOrgVideoJs2['default'].mediaSources[msObjectURL];\n\n if (mediaSource) {\n mediaSource.trigger({ type: 'sourceopen', swfId: swfId });\n } else {\n throw new Error('Media Source not found (Video.js)');\n }\n};\n\n/**\n * Check to see if the native MediaSource object exists and supports\n * an MP4 container with both H.264 video and AAC-LC audio.\n *\n * @return {Boolean} if native media sources are supported\n */\nvar supportsNativeMediaSources = function supportsNativeMediaSources() {\n return !!window.MediaSource && !!window.MediaSource.isTypeSupported && window.MediaSource.isTypeSupported('video/mp4;codecs=\"avc1.4d400d,mp4a.40.2\"');\n};\n\n/**\n * An emulation of the MediaSource API so that we can support\n * native and non-native functionality such as flash and\n * video/mp2t videos. returns an instance of HtmlMediaSource or\n * FlashMediaSource depending on what is supported and what options\n * are passed in.\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/MediaSource\n * @param {Object} options options to use during setup.\n */\nvar MediaSource = function MediaSource(options) {\n var settings = _holaOrgVideoJs2['default'].mergeOptions(defaults, options);\n\n this.MediaSource = {\n open: open,\n supportsNativeMediaSources: supportsNativeMediaSources\n };\n\n // determine whether HTML MediaSources should be used\n if (settings.mode === 'html5' || settings.mode === 'auto' && supportsNativeMediaSources()) {\n return new _htmlMediaSource2['default']();\n }\n\n // otherwise, emulate them through the SWF\n return new _flashMediaSource2['default']();\n};\n\nexports.MediaSource = MediaSource;\nMediaSource.open = open;\nMediaSource.supportsNativeMediaSources = supportsNativeMediaSources;\n\n/**\n * A wrapper around the native URL for our MSE object\n * implementation, this object is exposed under videojs.URL\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/URL/URL\n */\nvar URL = {\n /**\n * A wrapper around the native createObjectURL for our objects.\n * This function maps a native or emulated mediaSource to a blob\n * url so that it can be loaded into video.js\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL\n * @param {MediaSource} object the object to create a blob url to\n */\n createObjectURL: function createObjectURL(object) {\n var objectUrlPrefix = 'blob:vjs-media-source/';\n var url = undefined;\n\n // use the native MediaSource to generate an object URL\n if (object instanceof _htmlMediaSource2['default']) {\n url = window.URL.createObjectURL(object.nativeMediaSource_);\n object.url_ = url;\n return url;\n }\n // if the object isn't an emulated MediaSource, delegate to the\n // native implementation\n if (!(object instanceof _flashMediaSource2['default'])) {\n url = window.URL.createObjectURL(object);\n object.url_ = url;\n return url;\n }\n\n // build a URL that can be used to map back to the emulated\n // MediaSource\n url = objectUrlPrefix + urlCount;\n\n urlCount++;\n\n // setup the mapping back to object\n _holaOrgVideoJs2['default'].mediaSources[url] = object;\n\n return url;\n }\n};\n\nexports.URL = URL;\n_holaOrgVideoJs2['default'].MediaSource = MediaSource;\n_holaOrgVideoJs2['default'].URL = URL;","/**\n * @file virtual-source-buffer.js\n */\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar _holaOrgVideoJs = (typeof window !== \"undefined\" ? window['videojs'] : typeof global !== \"undefined\" ? global['videojs'] : null);\n\nvar _holaOrgVideoJs2 = _interopRequireDefault(_holaOrgVideoJs);\n\nvar _createTextTracksIfNecessary = require('./create-text-tracks-if-necessary');\n\nvar _createTextTracksIfNecessary2 = _interopRequireDefault(_createTextTracksIfNecessary);\n\nvar _removeCuesFromTrack = require('./remove-cues-from-track');\n\nvar _removeCuesFromTrack2 = _interopRequireDefault(_removeCuesFromTrack);\n\nvar _addTextTrackData = require('./add-text-track-data');\n\nvar _addTextTrackData2 = _interopRequireDefault(_addTextTrackData);\n\nvar _webworkify = require('webworkify');\n\nvar _webworkify2 = _interopRequireDefault(_webworkify);\n\nvar _transmuxerWorker = require('./transmuxer-worker');\n\nvar _transmuxerWorker2 = _interopRequireDefault(_transmuxerWorker);\n\nvar _codecUtils = require('./codec-utils');\n\n/**\n * VirtualSourceBuffers exist so that we can transmux non native formats\n * into a native format, but keep the same api as a native source buffer.\n * It creates a transmuxer, that works in its own thread (a web worker) and\n * that transmuxer muxes the data into a native format. VirtualSourceBuffer will\n * then send all of that data to the naive sourcebuffer so that it is\n * indestinguishable from a natively supported format.\n *\n * @param {HtmlMediaSource} mediaSource the parent mediaSource\n * @param {Array} codecs array of codecs that we will be dealing with\n * @class VirtualSourceBuffer\n * @extends video.js.EventTarget\n */\n\nvar VirtualSourceBuffer = (function (_videojs$EventTarget) {\n _inherits(VirtualSourceBuffer, _videojs$EventTarget);\n\n function VirtualSourceBuffer(mediaSource, codecs) {\n var _this = this;\n\n _classCallCheck(this, VirtualSourceBuffer);\n\n _get(Object.getPrototypeOf(VirtualSourceBuffer.prototype), 'constructor', this).call(this, _holaOrgVideoJs2['default'].EventTarget);\n this.timestampOffset_ = 0;\n this.pendingBuffers_ = [];\n this.bufferUpdating_ = false;\n this.mediaSource_ = mediaSource;\n this.codecs_ = codecs;\n this.audioCodec_ = null;\n this.videoCodec_ = null;\n this.audioDisabled_ = false;\n\n var options = {\n remux: false\n };\n\n this.codecs_.forEach(function (codec) {\n if ((0, _codecUtils.isAudioCodec)(codec)) {\n _this.audioCodec_ = codec;\n } else if ((0, _codecUtils.isVideoCodec)(codec)) {\n _this.videoCodec_ = codec;\n }\n });\n\n // append muxed segments to their respective native buffers as\n // soon as they are available\n this.transmuxer_ = (0, _webworkify2['default'])(_transmuxerWorker2['default']);\n this.transmuxer_.postMessage({ action: 'init', options: options });\n\n this.transmuxer_.onmessage = function (event) {\n if (event.data.action === 'data') {\n return _this.data_(event);\n }\n\n if (event.data.action === 'done') {\n return _this.done_(event);\n }\n };\n\n // this timestampOffset is a property with the side-effect of resetting\n // baseMediaDecodeTime in the transmuxer on the setter\n Object.defineProperty(this, 'timestampOffset', {\n get: function get() {\n return this.timestampOffset_;\n },\n set: function set(val) {\n if (typeof val === 'number' && val >= 0) {\n this.timestampOffset_ = val;\n\n // We have to tell the transmuxer to set the baseMediaDecodeTime to\n // the desired timestampOffset for the next segment\n this.transmuxer_.postMessage({\n action: 'setTimestampOffset',\n timestampOffset: val\n });\n }\n }\n });\n\n // setting the append window affects both source buffers\n Object.defineProperty(this, 'appendWindowStart', {\n get: function get() {\n return (this.videoBuffer_ || this.audioBuffer_).appendWindowStart;\n },\n set: function set(start) {\n if (this.videoBuffer_) {\n this.videoBuffer_.appendWindowStart = start;\n }\n if (this.audioBuffer_) {\n this.audioBuffer_.appendWindowStart = start;\n }\n }\n });\n\n // this buffer is \"updating\" if either of its native buffers are\n Object.defineProperty(this, 'updating', {\n get: function get() {\n return !!(this.bufferUpdating_ || !this.audioDisabled_ && this.audioBuffer_ && this.audioBuffer_.updating || this.videoBuffer_ && this.videoBuffer_.updating);\n }\n });\n\n // the buffered property is the intersection of the buffered\n // ranges of the native source buffers\n Object.defineProperty(this, 'buffered', {\n get: function get() {\n var start = null;\n var end = null;\n var arity = 0;\n var extents = [];\n var ranges = [];\n\n if (!this.videoBuffer_ && (this.audioDisabled_ || !this.audioBuffer_)) {\n return _holaOrgVideoJs2['default'].createTimeRange();\n }\n\n // Handle the case where we only have one buffer\n if (!this.videoBuffer_) {\n return this.audioBuffer_.buffered;\n } else if (this.audioDisabled_ || !this.audioBuffer_) {\n return this.videoBuffer_.buffered;\n }\n\n // Handle the case where there is no buffer data\n if ((!this.videoBuffer_ || this.videoBuffer_.buffered.length === 0) && (!this.audioBuffer_ || this.audioBuffer_.buffered.length === 0)) {\n return _holaOrgVideoJs2['default'].createTimeRange();\n }\n\n // Handle the case where we have both buffers and create an\n // intersection of the two\n var videoBuffered = this.videoBuffer_.buffered;\n var audioBuffered = this.audioBuffer_.buffered;\n var count = videoBuffered.length;\n\n // A) Gather up all start and end times\n while (count--) {\n extents.push({ time: videoBuffered.start(count), type: 'start' });\n extents.push({ time: videoBuffered.end(count), type: 'end' });\n }\n count = audioBuffered.length;\n while (count--) {\n extents.push({ time: audioBuffered.start(count), type: 'start' });\n extents.push({ time: audioBuffered.end(count), type: 'end' });\n }\n // B) Sort them by time\n extents.sort(function (a, b) {\n return a.time - b.time;\n });\n\n // C) Go along one by one incrementing arity for start and decrementing\n // arity for ends\n for (count = 0; count < extents.length; count++) {\n if (extents[count].type === 'start') {\n arity++;\n\n // D) If arity is ever incremented to 2 we are entering an\n // overlapping range\n if (arity === 2) {\n start = extents[count].time;\n }\n } else if (extents[count].type === 'end') {\n arity--;\n\n // E) If arity is ever decremented to 1 we leaving an\n // overlapping range\n if (arity === 1) {\n end = extents[count].time;\n }\n }\n\n // F) Record overlapping ranges\n if (start !== null && end !== null) {\n ranges.push([start, end]);\n start = null;\n end = null;\n }\n }\n\n return _holaOrgVideoJs2['default'].createTimeRanges(ranges);\n }\n });\n }\n\n /**\n * When we get a data event from the transmuxer\n * we call this function and handle the data that\n * was sent to us\n *\n * @private\n * @param {Event} event the data event from the transmuxer\n */\n\n _createClass(VirtualSourceBuffer, [{\n key: 'data_',\n value: function data_(event) {\n var segment = event.data.segment;\n\n // Cast ArrayBuffer to TypedArray\n segment.data = new Uint8Array(segment.data, event.data.byteOffset, event.data.byteLength);\n\n (0, _createTextTracksIfNecessary2['default'])(this, this.mediaSource_, segment);\n\n // Add the segments to the pendingBuffers array\n this.pendingBuffers_.push(segment);\n return;\n }\n\n /**\n * When we get a done event from the transmuxer\n * we call this function and we process all\n * of the pending data that we have been saving in the\n * data_ function\n *\n * @private\n * @param {Event} event the done event from the transmuxer\n */\n }, {\n key: 'done_',\n value: function done_(event) {\n // All buffers should have been flushed from the muxer\n // start processing anything we have received\n this.processPendingSegments_();\n return;\n }\n\n /**\n * Create our internal native audio/video source buffers and add\n * event handlers to them with the following conditions:\n * 1. they do not already exist on the mediaSource\n * 2. this VSB has a codec for them\n *\n * @private\n */\n }, {\n key: 'createRealSourceBuffers_',\n value: function createRealSourceBuffers_() {\n var _this2 = this;\n\n var types = ['audio', 'video'];\n\n types.forEach(function (type) {\n // Don't create a SourceBuffer of this type if we don't have a\n // codec for it\n if (!_this2[type + 'Codec_']) {\n return;\n }\n\n // Do nothing if a SourceBuffer of this type already exists\n if (_this2[type + 'Buffer_']) {\n return;\n }\n\n var buffer = null;\n\n // If the mediasource already has a SourceBuffer for the codec\n // use that\n if (_this2.mediaSource_[type + 'Buffer_']) {\n buffer = _this2.mediaSource_[type + 'Buffer_'];\n } else {\n buffer = _this2.mediaSource_.nativeMediaSource_.addSourceBuffer(type + '/mp4;codecs=\"' + _this2[type + 'Codec_'] + '\"');\n _this2.mediaSource_[type + 'Buffer_'] = buffer;\n }\n\n _this2[type + 'Buffer_'] = buffer;\n\n // Wire up the events to the SourceBuffer\n ['update', 'updatestart', 'updateend'].forEach(function (event) {\n buffer.addEventListener(event, function () {\n // if audio is disabled\n if (type === 'audio' && _this2.audioDisabled_) {\n return;\n }\n\n var shouldTrigger = types.every(function (t) {\n // skip checking audio's updating status if audio\n // is not enabled\n if (t === 'audio' && _this2.audioDisabled_) {\n return true;\n }\n // if the other type if updating we don't trigger\n if (type !== t && _this2[t + 'Buffer_'] && _this2[t + 'Buffer_'].updating) {\n return false;\n }\n return true;\n });\n\n if (shouldTrigger) {\n return _this2.trigger(event);\n }\n });\n });\n });\n }\n\n /**\n * Emulate the native mediasource function, but our function will\n * send all of the proposed segments to the transmuxer so that we\n * can transmux them before we append them to our internal\n * native source buffers in the correct format.\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/appendBuffer\n * @param {Uint8Array} segment the segment to append to the buffer\n */\n }, {\n key: 'appendBuffer',\n value: function appendBuffer(segment) {\n // Start the internal \"updating\" state\n this.bufferUpdating_ = true;\n\n this.transmuxer_.postMessage({\n action: 'push',\n // Send the typed-array of data as an ArrayBuffer so that\n // it can be sent as a \"Transferable\" and avoid the costly\n // memory copy\n data: segment.buffer,\n\n // To recreate the original typed-array, we need information\n // about what portion of the ArrayBuffer it was a view into\n byteOffset: segment.byteOffset,\n byteLength: segment.byteLength\n }, [segment.buffer]);\n this.transmuxer_.postMessage({ action: 'flush' });\n }\n }, {\n key: 'pushBuffer',\n value: function pushBuffer(segment) {\n this.transmuxer_.postMessage({\n action: 'push',\n // Send the typed-array of data as an ArrayBuffer so that\n // it can be sent as a \"Transferable\" and avoid the costly\n // memory copy\n data: segment.buffer,\n\n // To recreate the original typed-array, we need information\n // about what portion of the ArrayBuffer it was a view into\n byteOffset: segment.byteOffset,\n byteLength: segment.byteLength\n }, [segment.buffer]);\n }\n }, {\n key: 'flushBuffer',\n value: function flushBuffer() {\n this.bufferUpdating_ = true;\n this.transmuxer_.postMessage({ action: 'flush' });\n }\n\n /**\n * Emulate the native mediasource function and remove parts\n * of the buffer from any of our internal buffers that exist\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/remove\n * @param {Double} start position to start the remove at\n * @param {Double} end position to end the remove at\n */\n }, {\n key: 'remove',\n value: function remove(start, end) {\n if (this.videoBuffer_) {\n this.videoBuffer_.remove(start, end);\n }\n if (!this.audioDisabled_ && this.audioBuffer_) {\n this.audioBuffer_.remove(start, end);\n }\n\n // Remove Metadata Cues (id3)\n (0, _removeCuesFromTrack2['default'])(start, end, this.metadataTrack_);\n\n // Remove Any Captions\n (0, _removeCuesFromTrack2['default'])(start, end, this.inbandTextTrack_);\n }\n\n /**\n * Process any segments that the muxer has output\n * Concatenate segments together based on type and append them into\n * their respective sourceBuffers\n *\n * @private\n */\n }, {\n key: 'processPendingSegments_',\n value: function processPendingSegments_() {\n var sortedSegments = {\n video: {\n segments: [],\n bytes: 0\n },\n audio: {\n segments: [],\n bytes: 0\n },\n captions: [],\n metadata: []\n };\n\n // Sort segments into separate video/audio arrays and\n // keep track of their total byte lengths\n sortedSegments = this.pendingBuffers_.reduce(function (segmentObj, segment) {\n var type = segment.type;\n var data = segment.data;\n\n segmentObj[type].segments.push(data);\n segmentObj[type].bytes += data.byteLength;\n\n // Gather any captions into a single array\n if (segment.captions) {\n segmentObj.captions = segmentObj.captions.concat(segment.captions);\n }\n\n if (segment.info) {\n segmentObj[type].info = segment.info;\n }\n\n // Gather any metadata into a single array\n if (segment.metadata) {\n segmentObj.metadata = segmentObj.metadata.concat(segment.metadata);\n }\n\n return segmentObj;\n }, sortedSegments);\n\n // Create the real source buffers if they don't exist by now since we\n // finally are sure what tracks are contained in the source\n if (!this.videoBuffer_ && !this.audioBuffer_) {\n // Remove any codecs that may have been specified by default but\n // are no longer applicable now\n if (sortedSegments.video.bytes === 0) {\n this.videoCodec_ = null;\n }\n if (sortedSegments.audio.bytes === 0) {\n this.audioCodec_ = null;\n }\n\n this.createRealSourceBuffers_();\n }\n\n if (sortedSegments.audio.info) {\n this.mediaSource_.trigger({ type: 'audioinfo', info: sortedSegments.audio.info });\n }\n if (sortedSegments.video.info) {\n this.mediaSource_.trigger({ type: 'videoinfo', info: sortedSegments.video.info });\n }\n\n // Merge multiple video and audio segments into one and append\n if (this.videoBuffer_) {\n this.concatAndAppendSegments_(sortedSegments.video, this.videoBuffer_);\n // TODO: are video tracks the only ones with text tracks?\n (0, _addTextTrackData2['default'])(this, sortedSegments.captions, sortedSegments.metadata);\n }\n if (!this.audioDisabled_ && this.audioBuffer_) {\n this.concatAndAppendSegments_(sortedSegments.audio, this.audioBuffer_);\n }\n\n this.pendingBuffers_.length = 0;\n\n // We are no longer in the internal \"updating\" state\n this.bufferUpdating_ = false;\n }\n\n /**\n * Combine all segments into a single Uint8Array and then append them\n * to the destination buffer\n *\n * @param {Object} segmentObj\n * @param {SourceBuffer} destinationBuffer native source buffer to append data to\n * @private\n */\n }, {\n key: 'concatAndAppendSegments_',\n value: function concatAndAppendSegments_(segmentObj, destinationBuffer) {\n var offset = 0;\n var tempBuffer = undefined;\n\n if (segmentObj.bytes) {\n tempBuffer = new Uint8Array(segmentObj.bytes);\n\n // Combine the individual segments into one large typed-array\n segmentObj.segments.forEach(function (segment) {\n tempBuffer.set(segment, offset);\n offset += segment.byteLength;\n });\n\n destinationBuffer.appendBuffer(tempBuffer);\n }\n }\n\n /**\n * Emulate the native mediasource function. abort any soureBuffer\n * actions and throw out any un-appended data.\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/abort\n */\n }, {\n key: 'abort',\n value: function abort() {\n if (this.videoBuffer_) {\n this.videoBuffer_.abort();\n }\n if (this.audioBuffer_) {\n this.audioBuffer_.abort();\n }\n if (this.transmuxer_) {\n this.transmuxer_.postMessage({ action: 'reset' });\n }\n this.pendingBuffers_.length = 0;\n this.bufferUpdating_ = false;\n }\n }]);\n\n return VirtualSourceBuffer;\n})(_holaOrgVideoJs2['default'].EventTarget);\n\nexports['default'] = VirtualSourceBuffer;\nmodule.exports = exports['default'];","/**\n * mux.js\n *\n * Copyright (c) 2016 Brightcove\n * All rights reserved.\n *\n * A stream-based aac to mp4 converter. This utility can be used to\n * deliver mp4s to a SourceBuffer on platforms that support native\n * Media Source Extensions.\n */\n'use strict';\nvar Stream = require('../utils/stream.js');\n\n// Constants\nvar AacStream;\n\n/**\n * Splits an incoming stream of binary data into ADTS and ID3 Frames.\n */\n\nAacStream = function() {\n var\n everything = new Uint8Array(),\n timeStamp = 0;\n\n AacStream.prototype.init.call(this);\n\n this.setTimestamp = function(timestamp) {\n timeStamp = timestamp;\n };\n\n this.parseId3TagSize = function(header, byteIndex) {\n var\n returnSize = (header[byteIndex + 6] << 21) |\n (header[byteIndex + 7] << 14) |\n (header[byteIndex + 8] << 7) |\n (header[byteIndex + 9]),\n flags = header[byteIndex + 5],\n footerPresent = (flags & 16) >> 4;\n\n if (footerPresent) {\n return returnSize + 20;\n }\n return returnSize + 10;\n };\n\n this.parseAdtsSize = function(header, byteIndex) {\n var\n lowThree = (header[byteIndex + 5] & 0xE0) >> 5,\n middle = header[byteIndex + 4] << 3,\n highTwo = header[byteIndex + 3] & 0x3 << 11;\n\n return (highTwo | middle) | lowThree;\n };\n\n this.push = function(bytes) {\n var\n frameSize = 0,\n byteIndex = 0,\n bytesLeft,\n chunk,\n packet,\n tempLength;\n\n // If there are bytes remaining from the last segment, prepend them to the\n // bytes that were pushed in\n if (everything.length) {\n tempLength = everything.length;\n everything = new Uint8Array(bytes.byteLength + tempLength);\n everything.set(everything.subarray(0, tempLength));\n everything.set(bytes, tempLength);\n } else {\n everything = bytes;\n }\n\n while (everything.length - byteIndex >= 3) {\n if ((everything[byteIndex] === 'I'.charCodeAt(0)) &&\n (everything[byteIndex + 1] === 'D'.charCodeAt(0)) &&\n (everything[byteIndex + 2] === '3'.charCodeAt(0))) {\n\n // Exit early because we don't have enough to parse\n // the ID3 tag header\n if (everything.length - byteIndex < 10) {\n break;\n }\n\n // check framesize\n frameSize = this.parseId3TagSize(everything, byteIndex);\n\n // Exit early if we don't have enough in the buffer\n // to emit a full packet\n if (frameSize > everything.length) {\n break;\n }\n chunk = {\n type: 'timed-metadata',\n data: everything.subarray(byteIndex, byteIndex + frameSize)\n };\n this.trigger('data', chunk);\n byteIndex += frameSize;\n continue;\n } else if ((everything[byteIndex] & 0xff === 0xff) &&\n ((everything[byteIndex + 1] & 0xf0) === 0xf0)) {\n\n // Exit early because we don't have enough to parse\n // the ADTS frame header\n if (everything.length - byteIndex < 7) {\n break;\n }\n\n frameSize = this.parseAdtsSize(everything, byteIndex);\n\n // Exit early if we don't have enough in the buffer\n // to emit a full packet\n if (frameSize > everything.length) {\n break;\n }\n\n packet = {\n type: 'audio',\n data: everything.subarray(byteIndex, byteIndex + frameSize),\n pts: timeStamp,\n dts: timeStamp\n };\n this.trigger('data', packet);\n byteIndex += frameSize;\n continue;\n }\n byteIndex++;\n }\n bytesLeft = everything.length - byteIndex;\n\n if (bytesLeft > 0) {\n everything = everything.subarray(byteIndex);\n } else {\n everything = new Uint8Array();\n }\n };\n};\n\nAacStream.prototype = new Stream();\n\nmodule.exports = AacStream;\n","'use strict';\n\nvar Stream = require('../utils/stream.js');\n\nvar AdtsStream;\n\nvar\n ADTS_SAMPLING_FREQUENCIES = [\n 96000,\n 88200,\n 64000,\n 48000,\n 44100,\n 32000,\n 24000,\n 22050,\n 16000,\n 12000,\n 11025,\n 8000,\n 7350\n ];\n\n/*\n * Accepts a ElementaryStream and emits data events with parsed\n * AAC Audio Frames of the individual packets. Input audio in ADTS\n * format is unpacked and re-emitted as AAC frames.\n *\n * @see http://wiki.multimedia.cx/index.php?title=ADTS\n * @see http://wiki.multimedia.cx/?title=Understanding_AAC\n */\nAdtsStream = function() {\n var buffer;\n\n AdtsStream.prototype.init.call(this);\n\n this.push = function(packet) {\n var\n i = 0,\n frameNum = 0,\n frameLength,\n protectionSkipBytes,\n frameEnd,\n oldBuffer,\n sampleCount,\n adtsFrameDuration;\n\n if (packet.type !== 'audio') {\n // ignore non-audio data\n return;\n }\n\n // Prepend any data in the buffer to the input data so that we can parse\n // aac frames the cross a PES packet boundary\n if (buffer) {\n oldBuffer = buffer;\n buffer = new Uint8Array(oldBuffer.byteLength + packet.data.byteLength);\n buffer.set(oldBuffer);\n buffer.set(packet.data, oldBuffer.byteLength);\n } else {\n buffer = packet.data;\n }\n\n // unpack any ADTS frames which have been fully received\n // for details on the ADTS header, see http://wiki.multimedia.cx/index.php?title=ADTS\n while (i + 5 < buffer.length) {\n\n // Loook for the start of an ADTS header..\n if (buffer[i] !== 0xFF || (buffer[i + 1] & 0xF6) !== 0xF0) {\n // If a valid header was not found, jump one forward and attempt to\n // find a valid ADTS header starting at the next byte\n i++;\n continue;\n }\n\n // The protection skip bit tells us if we have 2 bytes of CRC data at the\n // end of the ADTS header\n protectionSkipBytes = (~buffer[i + 1] & 0x01) * 2;\n\n // Frame length is a 13 bit integer starting 16 bits from the\n // end of the sync sequence\n frameLength = ((buffer[i + 3] & 0x03) << 11) |\n (buffer[i + 4] << 3) |\n ((buffer[i + 5] & 0xe0) >> 5);\n\n sampleCount = ((buffer[i + 6] & 0x03) + 1) * 1024;\n adtsFrameDuration = (sampleCount * 90000) /\n ADTS_SAMPLING_FREQUENCIES[(buffer[i + 2] & 0x3c) >>> 2];\n\n frameEnd = i + frameLength;\n\n // If we don't have enough data to actually finish this ADTS frame, return\n // and wait for more data\n if (buffer.byteLength < frameEnd) {\n return;\n }\n\n // Otherwise, deliver the complete AAC frame\n this.trigger('data', {\n pts: packet.pts + (frameNum * adtsFrameDuration),\n dts: packet.dts + (frameNum * adtsFrameDuration),\n sampleCount: sampleCount,\n audioobjecttype: ((buffer[i + 2] >>> 6) & 0x03) + 1,\n channelcount: ((buffer[i + 2] & 1) << 2) |\n ((buffer[i + 3] & 0xc0) >>> 6),\n samplerate: ADTS_SAMPLING_FREQUENCIES[(buffer[i + 2] & 0x3c) >>> 2],\n samplingfrequencyindex: (buffer[i + 2] & 0x3c) >>> 2,\n // assume ISO/IEC 14496-12 AudioSampleEntry default of 16\n samplesize: 16,\n data: buffer.subarray(i + 7 + protectionSkipBytes, frameEnd)\n });\n\n // If the buffer is empty, clear it and return\n if (buffer.byteLength === frameEnd) {\n buffer = undefined;\n return;\n }\n\n frameNum++;\n\n // Remove the finished frame from the buffer and start the process again\n buffer = buffer.subarray(frameEnd);\n }\n };\n this.flush = function() {\n this.trigger('done');\n };\n};\n\nAdtsStream.prototype = new Stream();\n\nmodule.exports = AdtsStream;\n","'use strict';\n\nvar Stream = require('../utils/stream.js');\nvar ExpGolomb = require('../utils/exp-golomb.js');\n\nvar H264Stream, NalByteStream;\n// values of profile_idc that indicate additional fields are included in the SPS\n// see Recommendation ITU-T H.264 (4/2013),\n// 7.3.2.1.1 Sequence parameter set data syntax\nvar PROFILES_WITH_OPTIONAL_SPS_DATA = {\n 100: true,\n 110: true,\n 122: true,\n 244: true,\n 44: true,\n 83: true,\n 86: true,\n 118: true,\n 128: true,\n 138: true,\n 139: true,\n 134: true\n};\nvar unitTypes = {\n slice_layer_without_partitioning_rbsp: 1,\n slice_layer_without_partitioning_rbsp_idr: 5,\n sei_rbsp: 6,\n seq_parameter_set_rbsp: 7,\n pic_parameter_set_rbsp: 8,\n access_unit_delimiter_rbsp: 9,\n};\n\n/**\n * Accepts a NAL unit byte stream and unpacks the embedded NAL units.\n */\nNalByteStream = function() {\n var\n syncPoint = 0,\n i,\n buffer;\n NalByteStream.prototype.init.call(this);\n\n this.push = function(data) {\n var swapBuffer;\n\n if (!buffer) {\n buffer = data.data;\n } else {\n swapBuffer = new Uint8Array(buffer.byteLength + data.data.byteLength);\n swapBuffer.set(buffer);\n swapBuffer.set(data.data, buffer.byteLength);\n buffer = swapBuffer;\n }\n\n // Rec. ITU-T H.264, Annex B\n // scan for NAL unit boundaries\n\n // a match looks like this:\n // 0 0 1 .. NAL .. 0 0 1\n // ^ sync point ^ i\n // or this:\n // 0 0 1 .. NAL .. 0 0 0\n // ^ sync point ^ i\n\n // advance the sync point to a NAL start, if necessary\n for (; syncPoint < buffer.byteLength - 3; syncPoint++) {\n if (buffer[syncPoint + 2] === 1) {\n // the sync point is properly aligned\n i = syncPoint + 5;\n break;\n }\n }\n\n while (i < buffer.byteLength) {\n // look at the current byte to determine if we've hit the end of\n // a NAL unit boundary\n switch (buffer[i]) {\n case 0:\n // skip past non-sync sequences\n if (buffer[i - 1] !== 0) {\n i += 2;\n break;\n } else if (buffer[i - 2] !== 0) {\n i++;\n break;\n }\n\n // deliver the NAL unit if it isn't empty\n if (syncPoint + 3 !== i - 2) {\n this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n }\n\n // drop trailing zeroes\n do {\n i++;\n } while (buffer[i] !== 1 && i < buffer.length);\n syncPoint = i - 2;\n i += 3;\n break;\n case 1:\n // skip past non-sync sequences\n if (buffer[i - 1] !== 0 ||\n buffer[i - 2] !== 0) {\n i += 3;\n break;\n }\n\n // deliver the NAL unit\n this.trigger('data', buffer.subarray(syncPoint + 3, i - 2));\n syncPoint = i - 2;\n i += 3;\n break;\n default:\n // the current byte isn't a one or zero, so it cannot be part\n // of a sync sequence\n i += 3;\n break;\n }\n }\n // filter out the NAL units that were delivered\n buffer = buffer.subarray(syncPoint);\n i -= syncPoint;\n syncPoint = 0;\n };\n\n this.flush = function() {\n // deliver the last buffered NAL unit\n if (buffer && buffer.byteLength > 3) {\n this.trigger('data', buffer.subarray(syncPoint + 3));\n }\n // reset the stream state\n buffer = null;\n syncPoint = 0;\n this.trigger('done');\n };\n};\nNalByteStream.prototype = new Stream();\n\n/**\n * Accepts input from a ElementaryStream and produces H.264 NAL unit data\n * events.\n */\nH264Stream = function() {\n var\n nalByteStream = new NalByteStream(),\n self,\n trackId,\n currentPts,\n currentDts,\n\n discardEmulationPreventionBytes,\n readSequenceParameterSet,\n skipScalingList;\n\n H264Stream.prototype.init.call(this);\n self = this;\n\n this.push = function(packet) {\n if (packet.type !== 'video') {\n return;\n }\n trackId = packet.trackId;\n currentPts = packet.pts;\n currentDts = packet.dts;\n\n nalByteStream.push(packet);\n };\n\n nalByteStream.on('data', function(data) {\n var\n event = {\n trackId: trackId,\n pts: currentPts,\n dts: currentDts,\n data: data\n };\n var ev_type = data[0] & 0x1f;\n\n if (ev_type==1 || ev_type>=5 && ev_type<=9) {\n event.nalUnitType = ev_type;\n }\n if (ev_type==7 || ev_type==6) {\n event.escapedRBSP = discardEmulationPreventionBytes(data.subarray(1));\n event.config = ev_type==7 ? readSequenceParameterSet(event.escapedRBSP) : null;\n }\n self.trigger('data', event);\n });\n nalByteStream.on('done', function() { self.trigger('done'); });\n this.flush = function() { nalByteStream.flush(); };\n\n /**\n * Advance the ExpGolomb decoder past a scaling list. The scaling\n * list is optionally transmitted as part of a sequence parameter\n * set and is not relevant to transmuxing.\n * @param count {number} the number of entries in this scaling list\n * @param expGolombDecoder {object} an ExpGolomb pointed to the\n * start of a scaling list\n * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1\n */\n skipScalingList = function(count, expGolombDecoder) {\n var\n lastScale = 8,\n nextScale = 8,\n j,\n deltaScale;\n\n for (j = 0; j < count; j++) {\n if (nextScale !== 0) {\n deltaScale = expGolombDecoder.readExpGolomb();\n nextScale = (lastScale + deltaScale + 256) % 256;\n }\n\n lastScale = (nextScale === 0) ? lastScale : nextScale;\n }\n };\n\n /**\n * Expunge any \"Emulation Prevention\" bytes from a \"Raw Byte\n * Sequence Payload\"\n * @param data {Uint8Array} the bytes of a RBSP from a NAL\n * unit\n * @return {Uint8Array} the RBSP without any Emulation\n * Prevention Bytes\n */\n discardEmulationPreventionBytes = function(data) {\n var\n length = data.byteLength,\n emulationPreventionBytesPositions = [],\n i = 1,\n newLength, newData;\n\n // Find all `Emulation Prevention Bytes`\n while (i < length - 2) {\n if (data[i] === 0 && data[i + 1] === 0 && data[i + 2] === 0x03) {\n emulationPreventionBytesPositions.push(i + 2);\n i += 2;\n } else {\n i++;\n }\n }\n\n // If no Emulation Prevention Bytes were found just return the original\n // array\n if (emulationPreventionBytesPositions.length === 0) {\n return data;\n }\n\n // Create a new array to hold the NAL unit data\n newLength = length - emulationPreventionBytesPositions.length;\n newData = new Uint8Array(newLength);\n var sourceIndex = 0;\n\n for (i = 0; i < newLength; sourceIndex++, i++) {\n if (sourceIndex === emulationPreventionBytesPositions[0]) {\n // Skip this byte\n sourceIndex++;\n // Remove this position index\n emulationPreventionBytesPositions.shift();\n }\n newData[i] = data[sourceIndex];\n }\n\n return newData;\n };\n\n /**\n * Read a sequence parameter set and return some interesting video\n * properties. A sequence parameter set is the H264 metadata that\n * describes the properties of upcoming video frames.\n * @param data {Uint8Array} the bytes of a sequence parameter set\n * @return {object} an object with configuration parsed from the\n * sequence parameter set, including the dimensions of the\n * associated video frames.\n */\n readSequenceParameterSet = function(data) {\n var\n frameCropLeftOffset = 0,\n frameCropRightOffset = 0,\n frameCropTopOffset = 0,\n frameCropBottomOffset = 0,\n sarScale = 1,\n expGolombDecoder, profileIdc, levelIdc, profileCompatibility,\n chromaFormatIdc, picOrderCntType,\n numRefFramesInPicOrderCntCycle, picWidthInMbsMinus1,\n picHeightInMapUnitsMinus1,\n frameMbsOnlyFlag,\n scalingListCount,\n sarRatio,\n aspectRatioIdc,\n i;\n\n expGolombDecoder = new ExpGolomb(data);\n profileIdc = expGolombDecoder.readUnsignedByte(); // profile_idc\n profileCompatibility = expGolombDecoder.readUnsignedByte(); // constraint_set[0-5]_flag\n levelIdc = expGolombDecoder.readUnsignedByte(); // level_idc u(8)\n expGolombDecoder.skipUnsignedExpGolomb(); // seq_parameter_set_id\n\n // some profiles have more optional data we don't need\n if (PROFILES_WITH_OPTIONAL_SPS_DATA[profileIdc]) {\n chromaFormatIdc = expGolombDecoder.readUnsignedExpGolomb();\n if (chromaFormatIdc === 3) {\n expGolombDecoder.skipBits(1); // separate_colour_plane_flag\n }\n expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_luma_minus8\n expGolombDecoder.skipUnsignedExpGolomb(); // bit_depth_chroma_minus8\n expGolombDecoder.skipBits(1); // qpprime_y_zero_transform_bypass_flag\n if (expGolombDecoder.readBoolean()) { // seq_scaling_matrix_present_flag\n scalingListCount = (chromaFormatIdc !== 3) ? 8 : 12;\n for (i = 0; i < scalingListCount; i++) {\n if (expGolombDecoder.readBoolean()) { // seq_scaling_list_present_flag[ i ]\n if (i < 6) {\n skipScalingList(16, expGolombDecoder);\n } else {\n skipScalingList(64, expGolombDecoder);\n }\n }\n }\n }\n }\n\n expGolombDecoder.skipUnsignedExpGolomb(); // log2_max_frame_num_minus4\n picOrderCntType = expGolombDecoder.readUnsignedExpGolomb();\n\n if (picOrderCntType === 0) {\n expGolombDecoder.readUnsignedExpGolomb(); // log2_max_pic_order_cnt_lsb_minus4\n } else if (picOrderCntType === 1) {\n expGolombDecoder.skipBits(1); // delta_pic_order_always_zero_flag\n expGolombDecoder.skipExpGolomb(); // offset_for_non_ref_pic\n expGolombDecoder.skipExpGolomb(); // offset_for_top_to_bottom_field\n numRefFramesInPicOrderCntCycle = expGolombDecoder.readUnsignedExpGolomb();\n for (i = 0; i < numRefFramesInPicOrderCntCycle; i++) {\n expGolombDecoder.skipExpGolomb(); // offset_for_ref_frame[ i ]\n }\n }\n\n expGolombDecoder.skipUnsignedExpGolomb(); // max_num_ref_frames\n expGolombDecoder.skipBits(1); // gaps_in_frame_num_value_allowed_flag\n\n picWidthInMbsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\n picHeightInMapUnitsMinus1 = expGolombDecoder.readUnsignedExpGolomb();\n\n frameMbsOnlyFlag = expGolombDecoder.readBits(1);\n if (frameMbsOnlyFlag === 0) {\n expGolombDecoder.skipBits(1); // mb_adaptive_frame_field_flag\n }\n\n expGolombDecoder.skipBits(1); // direct_8x8_inference_flag\n if (expGolombDecoder.readBoolean()) { // frame_cropping_flag\n frameCropLeftOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropRightOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropTopOffset = expGolombDecoder.readUnsignedExpGolomb();\n frameCropBottomOffset = expGolombDecoder.readUnsignedExpGolomb();\n }\n if (expGolombDecoder.readBoolean()) {\n // vui_parameters_present_flag\n if (expGolombDecoder.readBoolean()) {\n // aspect_ratio_info_present_flag\n aspectRatioIdc = expGolombDecoder.readUnsignedByte();\n switch (aspectRatioIdc) {\n case 1: sarRatio = [1, 1]; break;\n case 2: sarRatio = [12, 11]; break;\n case 3: sarRatio = [10, 11]; break;\n case 4: sarRatio = [16, 11]; break;\n case 5: sarRatio = [40, 33]; break;\n case 6: sarRatio = [24, 11]; break;\n case 7: sarRatio = [20, 11]; break;\n case 8: sarRatio = [32, 11]; break;\n case 9: sarRatio = [80, 33]; break;\n case 10: sarRatio = [18, 11]; break;\n case 11: sarRatio = [15, 11]; break;\n case 12: sarRatio = [64, 33]; break;\n case 13: sarRatio = [160, 99]; break;\n case 14: sarRatio = [4, 3]; break;\n case 15: sarRatio = [3, 2]; break;\n case 16: sarRatio = [2, 1]; break;\n case 255: {\n sarRatio = [expGolombDecoder.readUnsignedByte() << 8 |\n expGolombDecoder.readUnsignedByte(),\n expGolombDecoder.readUnsignedByte() << 8 |\n expGolombDecoder.readUnsignedByte() ];\n break;\n }\n }\n if (sarRatio) {\n sarScale = sarRatio[0] / sarRatio[1];\n }\n }\n }\n return {\n profileIdc: profileIdc,\n levelIdc: levelIdc,\n profileCompatibility: profileCompatibility,\n width: Math.ceil((((picWidthInMbsMinus1 + 1) * 16) - frameCropLeftOffset * 2 - frameCropRightOffset * 2) * sarScale),\n height: ((2 - frameMbsOnlyFlag) * (picHeightInMapUnitsMinus1 + 1) * 16) - (frameCropTopOffset * 2) - (frameCropBottomOffset * 2)\n };\n };\n\n};\nH264Stream.prototype = new Stream();\n\nmodule.exports = {\n H264Stream: H264Stream,\n NalByteStream: NalByteStream,\n unitTypes: unitTypes,\n};\n","module.exports = {\n adts: require('./adts'),\n h264: require('./h264'),\n};\n","/**\n * An object that stores the bytes of an FLV tag and methods for\n * querying and manipulating that data.\n * @see http://download.macromedia.com/f4v/video_file_format_spec_v10_1.pdf\n */\n'use strict';\n\nvar FlvTag;\n\n// (type:uint, extraData:Boolean = false) extends ByteArray\nFlvTag = function(type, extraData) {\n var\n // Counter if this is a metadata tag, nal start marker if this is a video\n // tag. unused if this is an audio tag\n adHoc = 0, // :uint\n\n // The default size is 16kb but this is not enough to hold iframe\n // data and the resizing algorithm costs a bit so we create a larger\n // starting buffer for video tags\n bufferStartSize = 16384,\n\n // checks whether the FLV tag has enough capacity to accept the proposed\n // write and re-allocates the internal buffers if necessary\n prepareWrite = function(flv, count) {\n var\n bytes,\n minLength = flv.position + count;\n if (minLength < flv.bytes.byteLength) {\n // there's enough capacity so do nothing\n return;\n }\n\n // allocate a new buffer and copy over the data that will not be modified\n bytes = new Uint8Array(minLength * 2);\n bytes.set(flv.bytes.subarray(0, flv.position), 0);\n flv.bytes = bytes;\n flv.view = new DataView(flv.bytes.buffer);\n },\n\n // commonly used metadata properties\n widthBytes = FlvTag.widthBytes || new Uint8Array('width'.length),\n heightBytes = FlvTag.heightBytes || new Uint8Array('height'.length),\n videocodecidBytes = FlvTag.videocodecidBytes || new Uint8Array('videocodecid'.length),\n i;\n\n if (!FlvTag.widthBytes) {\n // calculating the bytes of common metadata names ahead of time makes the\n // corresponding writes faster because we don't have to loop over the\n // characters\n // re-test with test/perf.html if you're planning on changing this\n for (i = 0; i < 'width'.length; i++) {\n widthBytes[i] = 'width'.charCodeAt(i);\n }\n for (i = 0; i < 'height'.length; i++) {\n heightBytes[i] = 'height'.charCodeAt(i);\n }\n for (i = 0; i < 'videocodecid'.length; i++) {\n videocodecidBytes[i] = 'videocodecid'.charCodeAt(i);\n }\n\n FlvTag.widthBytes = widthBytes;\n FlvTag.heightBytes = heightBytes;\n FlvTag.videocodecidBytes = videocodecidBytes;\n }\n\n this.keyFrame = false; // :Boolean\n\n switch(type) {\n case FlvTag.VIDEO_TAG:\n this.length = 16;\n // Start the buffer at 256k\n bufferStartSize *= 6;\n break;\n case FlvTag.AUDIO_TAG:\n this.length = 13;\n this.keyFrame = true;\n break;\n case FlvTag.METADATA_TAG:\n this.length = 29;\n this.keyFrame = true;\n break;\n default:\n throw(\"Error Unknown TagType\");\n }\n\n this.bytes = new Uint8Array(bufferStartSize);\n this.view = new DataView(this.bytes.buffer);\n this.bytes[0] = type;\n this.position = this.length;\n this.keyFrame = extraData; // Defaults to false\n\n // presentation timestamp\n this.pts = 0;\n // decoder timestamp\n this.dts = 0;\n\n // ByteArray#writeBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0)\n this.writeBytes = function(bytes, offset, length) {\n var\n start = offset || 0,\n end;\n length = length || bytes.byteLength;\n end = start + length;\n\n prepareWrite(this, length);\n this.bytes.set(bytes.subarray(start, end), this.position);\n\n this.position += length;\n this.length = Math.max(this.length, this.position);\n };\n\n // ByteArray#writeByte(value:int):void\n this.writeByte = function(byte) {\n prepareWrite(this, 1);\n this.bytes[this.position] = byte;\n this.position++;\n this.length = Math.max(this.length, this.position);\n };\n\n // ByteArray#writeShort(value:int):void\n this.writeShort = function(short) {\n prepareWrite(this, 2);\n this.view.setUint16(this.position, short);\n this.position += 2;\n this.length = Math.max(this.length, this.position);\n };\n\n // Negative index into array\n // (pos:uint):int\n this.negIndex = function(pos) {\n return this.bytes[this.length - pos];\n };\n\n // The functions below ONLY work when this[0] == VIDEO_TAG.\n // We are not going to check for that because we dont want the overhead\n // (nal:ByteArray = null):int\n this.nalUnitSize = function() {\n if (adHoc === 0) {\n return 0;\n }\n\n return this.length - (adHoc + 4);\n };\n\n this.startNalUnit = function() {\n // remember position and add 4 bytes\n if (adHoc > 0) {\n throw new Error(\"Attempted to create new NAL wihout closing the old one\");\n }\n\n // reserve 4 bytes for nal unit size\n adHoc = this.length;\n this.length += 4;\n this.position = this.length;\n };\n\n // (nal:ByteArray = null):void\n this.endNalUnit = function(nalContainer) {\n var\n nalStart, // :uint\n nalLength; // :uint\n\n // Rewind to the marker and write the size\n if (this.length === adHoc + 4) {\n // we started a nal unit, but didnt write one, so roll back the 4 byte size value\n this.length -= 4;\n } else if (adHoc > 0) {\n nalStart = adHoc + 4;\n nalLength = this.length - nalStart;\n\n this.position = adHoc;\n this.view.setUint32(this.position, nalLength);\n this.position = this.length;\n\n if (nalContainer) {\n // Add the tag to the NAL unit\n nalContainer.push(this.bytes.subarray(nalStart, nalStart + nalLength));\n }\n }\n\n adHoc = 0;\n };\n\n /**\n * Write out a 64-bit floating point valued metadata property. This method is\n * called frequently during a typical parse and needs to be fast.\n */\n // (key:String, val:Number):void\n this.writeMetaDataDouble = function(key, val) {\n var i;\n prepareWrite(this, 2 + key.length + 9);\n\n // write size of property name\n this.view.setUint16(this.position, key.length);\n this.position += 2;\n\n // this next part looks terrible but it improves parser throughput by\n // 10kB/s in my testing\n\n // write property name\n if (key === 'width') {\n this.bytes.set(widthBytes, this.position);\n this.position += 5;\n } else if (key === 'height') {\n this.bytes.set(heightBytes, this.position);\n this.position += 6;\n } else if (key === 'videocodecid') {\n this.bytes.set(videocodecidBytes, this.position);\n this.position += 12;\n } else {\n for (i = 0; i < key.length; i++) {\n this.bytes[this.position] = key.charCodeAt(i);\n this.position++;\n }\n }\n\n // skip null byte\n this.position++;\n\n // write property value\n this.view.setFloat64(this.position, val);\n this.position += 8;\n\n // update flv tag length\n this.length = Math.max(this.length, this.position);\n ++adHoc;\n };\n\n // (key:String, val:Boolean):void\n this.writeMetaDataBoolean = function(key, val) {\n var i;\n prepareWrite(this, 2);\n this.view.setUint16(this.position, key.length);\n this.position += 2;\n for (i = 0; i < key.length; i++) {\n // if key.charCodeAt(i) >= 255, handle error\n prepareWrite(this, 1);\n this.bytes[this.position] = key.charCodeAt(i);\n this.position++;\n }\n prepareWrite(this, 2);\n this.view.setUint8(this.position, 0x01);\n this.position++;\n this.view.setUint8(this.position, val ? 0x01 : 0x00);\n this.position++;\n this.length = Math.max(this.length, this.position);\n ++adHoc;\n };\n\n // ():ByteArray\n this.finalize = function() {\n var\n dtsDelta, // :int\n len; // :int\n\n switch(this.bytes[0]) {\n // Video Data\n case FlvTag.VIDEO_TAG:\n this.bytes[11] = ((this.keyFrame || extraData) ? 0x10 : 0x20 ) | 0x07; // We only support AVC, 1 = key frame (for AVC, a seekable frame), 2 = inter frame (for AVC, a non-seekable frame)\n this.bytes[12] = extraData ? 0x00 : 0x01;\n\n dtsDelta = this.pts - this.dts;\n this.bytes[13] = (dtsDelta & 0x00FF0000) >>> 16;\n this.bytes[14] = (dtsDelta & 0x0000FF00) >>> 8;\n this.bytes[15] = (dtsDelta & 0x000000FF) >>> 0;\n break;\n\n case FlvTag.AUDIO_TAG:\n this.bytes[11] = 0xAF; // 44 kHz, 16-bit stereo\n this.bytes[12] = extraData ? 0x00 : 0x01;\n break;\n\n case FlvTag.METADATA_TAG:\n this.position = 11;\n this.view.setUint8(this.position, 0x02); // String type\n this.position++;\n this.view.setUint16(this.position, 0x0A); // 10 Bytes\n this.position += 2;\n // set \"onMetaData\"\n this.bytes.set([0x6f, 0x6e, 0x4d, 0x65,\n 0x74, 0x61, 0x44, 0x61,\n 0x74, 0x61], this.position);\n this.position += 10;\n this.bytes[this.position] = 0x08; // Array type\n this.position++;\n this.view.setUint32(this.position, adHoc);\n this.position = this.length;\n this.bytes.set([0, 0, 9], this.position);\n this.position += 3; // End Data Tag\n this.length = this.position;\n break;\n }\n\n len = this.length - 11;\n\n // write the DataSize field\n this.bytes[ 1] = (len & 0x00FF0000) >>> 16;\n this.bytes[ 2] = (len & 0x0000FF00) >>> 8;\n this.bytes[ 3] = (len & 0x000000FF) >>> 0;\n // write the Timestamp\n this.bytes[ 4] = (this.dts & 0x00FF0000) >>> 16;\n this.bytes[ 5] = (this.dts & 0x0000FF00) >>> 8;\n this.bytes[ 6] = (this.dts & 0x000000FF) >>> 0;\n this.bytes[ 7] = (this.dts & 0xFF000000) >>> 24;\n // write the StreamID\n this.bytes[ 8] = 0;\n this.bytes[ 9] = 0;\n this.bytes[10] = 0;\n\n // Sometimes we're at the end of the view and have one slot to write a\n // uint32, so, prepareWrite of count 4, since, view is uint8\n prepareWrite(this, 4);\n this.view.setUint32(this.length, this.length);\n this.length += 4;\n this.position += 4;\n\n // trim down the byte buffer to what is actually being used\n this.bytes = this.bytes.subarray(0, this.length);\n this.frameTime = FlvTag.frameTime(this.bytes);\n // if bytes.bytelength isn't equal to this.length, handle error\n return this;\n };\n};\n\nFlvTag.AUDIO_TAG = 0x08; // == 8, :uint\nFlvTag.VIDEO_TAG = 0x09; // == 9, :uint\nFlvTag.METADATA_TAG = 0x12; // == 18, :uint\n\n// (tag:ByteArray):Boolean {\nFlvTag.isAudioFrame = function(tag) {\n return FlvTag.AUDIO_TAG === tag[0];\n};\n\n// (tag:ByteArray):Boolean {\nFlvTag.isVideoFrame = function(tag) {\n return FlvTag.VIDEO_TAG === tag[0];\n};\n\n// (tag:ByteArray):Boolean {\nFlvTag.isMetaData = function(tag) {\n return FlvTag.METADATA_TAG === tag[0];\n};\n\n// (tag:ByteArray):Boolean {\nFlvTag.isKeyFrame = function(tag) {\n if (FlvTag.isVideoFrame(tag)) {\n return tag[11] === 0x17;\n }\n\n if (FlvTag.isAudioFrame(tag)) {\n return true;\n }\n\n if (FlvTag.isMetaData(tag)) {\n return true;\n }\n\n return false;\n};\n\n// (tag:ByteArray):uint {\nFlvTag.frameTime = function(tag) {\n var pts = tag[ 4] << 16; // :uint\n pts |= tag[ 5] << 8;\n pts |= tag[ 6] << 0;\n pts |= tag[ 7] << 24;\n return pts;\n};\n\nmodule.exports = FlvTag;\n","module.exports = {\n tag: require('./flv-tag'),\n Transmuxer: require('./transmuxer'),\n tools: require('../tools/flv-inspector'),\n};\n","'use strict';\n\nvar Stream = require('../utils/stream.js');\nvar FlvTag = require('./flv-tag.js');\nvar m2ts = require('../m2ts/m2ts.js');\nvar codecs = require('../codecs');\nvar AdtsStream = codecs.adts;\nvar H264Stream = codecs.h264.H264Stream;\n\nvar\n MetadataStream,\n Transmuxer,\n VideoSegmentStream,\n AudioSegmentStream,\n CoalesceStream,\n collectTimelineInfo,\n metaDataTag,\n extraDataTag;\n\n/**\n * Store information about the start and end of the tracka and the\n * duration for each frame/sample we process in order to calculate\n * the baseMediaDecodeTime\n */\ncollectTimelineInfo = function (track, data) {\n if (typeof data.pts === 'number') {\n if (track.timelineStartInfo.pts === undefined) {\n track.timelineStartInfo.pts = data.pts;\n } else {\n track.timelineStartInfo.pts =\n Math.min(track.timelineStartInfo.pts, data.pts);\n }\n }\n\n if (typeof data.dts === 'number') {\n if (track.timelineStartInfo.dts === undefined) {\n track.timelineStartInfo.dts = data.dts;\n } else {\n track.timelineStartInfo.dts =\n Math.min(track.timelineStartInfo.dts, data.dts);\n }\n }\n};\n\nmetaDataTag = function(track, pts) {\n var\n tag = new FlvTag(FlvTag.METADATA_TAG); // :FlvTag\n\n tag.dts = pts;\n tag.pts = pts;\n\n tag.writeMetaDataDouble(\"videocodecid\", 7);\n tag.writeMetaDataDouble(\"width\", track.width);\n tag.writeMetaDataDouble(\"height\", track.height);\n\n return tag;\n};\n\nextraDataTag = function(track, pts) {\n var\n i,\n tag = new FlvTag(FlvTag.VIDEO_TAG, true);\n\n tag.dts = pts;\n tag.pts = pts;\n\n tag.writeByte(0x01);// version\n tag.writeByte(track.profileIdc);// profile\n tag.writeByte(track.profileCompatibility);// compatibility\n tag.writeByte(track.levelIdc);// level\n tag.writeByte(0xFC | 0x03); // reserved (6 bits), NULA length size - 1 (2 bits)\n tag.writeByte(0xE0 | 0x01 ); // reserved (3 bits), num of SPS (5 bits)\n tag.writeShort( track.sps[0].length ); // data of SPS\n tag.writeBytes( track.sps[0] ); // SPS\n\n tag.writeByte(track.pps.length); // num of PPS (will there ever be more that 1 PPS?)\n for (i = 0 ; i < track.pps.length ; ++i) {\n tag.writeShort(track.pps[i].length); // 2 bytes for length of PPS\n tag.writeBytes(track.pps[i]); // data of PPS\n }\n\n return tag;\n};\n\n/**\n * Constructs a single-track, media segment from AAC data\n * events. The output of this stream can be fed to flash.\n */\nAudioSegmentStream = function(track) {\n var\n adtsFrames = [],\n adtsFramesLength = 0,\n sequenceNumber = 0,\n earliestAllowedDts = 0,\n oldExtraData;\n\n AudioSegmentStream.prototype.init.call(this);\n\n this.push = function(data) {\n collectTimelineInfo(track, data);\n\n if (track && track.channelcount === undefined) {\n track.audioobjecttype = data.audioobjecttype;\n track.channelcount = data.channelcount;\n track.samplerate = data.samplerate;\n track.samplingfrequencyindex = data.samplingfrequencyindex;\n track.samplesize = data.samplesize;\n track.extraData = (track.audioobjecttype << 11) |\n (track.samplingfrequencyindex << 7) |\n (track.channelcount << 3);\n }\n\n data.pts = Math.round(data.pts / 90);\n data.dts = Math.round(data.dts / 90);\n\n // buffer audio data until end() is called\n adtsFrames.push(data);\n };\n\n this.flush = function() {\n var currentFrame, adtsFrame, deltaDts,lastMetaPts, tags = [];\n // return early if no audio data has been observed\n if (adtsFrames.length === 0) {\n this.trigger('done');\n return;\n }\n\n lastMetaPts = -Infinity;\n\n while (adtsFrames.length) {\n currentFrame = adtsFrames.shift();\n\n // write out metadata tags every 1 second so that the decoder\n // is re-initialized quickly after seeking into a different\n // audio configuration\n if (track.extraData !== oldExtraData || currentFrame.pts - lastMetaPts >= 1000) {\n adtsFrame = new FlvTag(FlvTag.METADATA_TAG);\n adtsFrame.pts = currentFrame.pts;\n adtsFrame.dts = currentFrame.dts;\n\n // AAC is always 10\n adtsFrame.writeMetaDataDouble(\"audiocodecid\", 10);\n adtsFrame.writeMetaDataBoolean(\"stereo\", 2 === track.channelcount);\n adtsFrame.writeMetaDataDouble (\"audiosamplerate\", track.samplerate);\n // Is AAC always 16 bit?\n adtsFrame.writeMetaDataDouble (\"audiosamplesize\", 16);\n\n tags.push(adtsFrame);\n\n oldExtraData = track.extraData;\n\n adtsFrame = new FlvTag(FlvTag.AUDIO_TAG, true);\n // For audio, DTS is always the same as PTS. We want to set the DTS\n // however so we can compare with video DTS to determine approximate\n // packet order\n adtsFrame.pts = currentFrame.pts;\n adtsFrame.dts = currentFrame.dts;\n\n adtsFrame.view.setUint16(adtsFrame.position, track.extraData);\n adtsFrame.position += 2;\n adtsFrame.length = Math.max(adtsFrame.length, adtsFrame.position);\n\n tags.push(adtsFrame);\n\n lastMetaPts = currentFrame.pts;\n }\n adtsFrame = new FlvTag(FlvTag.AUDIO_TAG);\n adtsFrame.pts = currentFrame.pts;\n adtsFrame.dts = currentFrame.dts;\n\n adtsFrame.writeBytes(currentFrame.data);\n\n tags.push(adtsFrame);\n }\n\n oldExtraData = null;\n this.trigger('data', {track: track, tags: tags});\n\n this.trigger('done');\n };\n};\nAudioSegmentStream.prototype = new Stream();\n\n/**\n * Store FlvTags for the h264 stream\n * @param track {object} track metadata configuration\n */\nVideoSegmentStream = function(track) {\n var\n sequenceNumber = 0,\n nalUnits = [],\n nalUnitsLength = 0,\n config,\n h264Frame;\n VideoSegmentStream.prototype.init.call(this);\n\n this.finishFrame = function(tags, frame) {\n if (!frame) {\n return;\n }\n // Check if keyframe and the length of tags.\n // This makes sure we write metadata on the first frame of a segment.\n if (config && track && track.newMetadata &&\n (frame.keyFrame || tags.length === 0)) {\n // Push extra data on every IDR frame in case we did a stream change + seek\n tags.push(metaDataTag(config, frame.pts));\n tags.push(extraDataTag(track, frame.pts));\n track.newMetadata = false;\n }\n\n frame.endNalUnit();\n tags.push(frame);\n };\n\n this.push = function(data) {\n collectTimelineInfo(track, data);\n\n data.pts = Math.round(data.pts / 90);\n data.dts = Math.round(data.dts / 90);\n\n // buffer video until flush() is called\n nalUnits.push(data);\n };\n\n this.flush = function() {\n var\n currentNal,\n tags = [];\n\n // Throw away nalUnits at the start of the byte stream until we find\n // the first AUD\n while (nalUnits.length && nalUnits[0].nalUnitType !== codecs.h264.unitTypes.access_unit_delimiter_rbsp) {\n nalUnits.shift();\n }\n\n // return early if no video data has been observed\n if (nalUnits.length === 0) {\n this.trigger('done');\n return;\n }\n\n while (nalUnits.length) {\n currentNal = nalUnits.shift();\n\n // record the track config\n switch (currentNal.nalUnitType){\n case codecs.h264.unitTypes.seq_parameter_set_rbsp:\n track.newMetadata = true;\n config = currentNal.config;\n track.width = config.width;\n track.height = config.height;\n track.sps = [currentNal.data];\n track.profileIdc = config.profileIdc;\n track.levelIdc = config.levelIdc;\n track.profileCompatibility = config.profileCompatibility;\n h264Frame.endNalUnit();\n break;\n case codecs.h264.unitTypes.pic_parameter_set_rbsp:\n track.newMetadata = true;\n track.pps = [currentNal.data];\n h264Frame.endNalUnit();\n break;\n case codecs.h264.unitTypes.access_unit_delimiter_rbsp:\n if (h264Frame) {\n this.finishFrame(tags, h264Frame);\n }\n h264Frame = new FlvTag(FlvTag.VIDEO_TAG);\n h264Frame.pts = currentNal.pts;\n h264Frame.dts = currentNal.dts;\n break;\n case codecs.h264.unitTypes.slice_layer_without_partitioning_rbsp_idr:\n // the current sample is a key frame\n h264Frame.keyFrame = true;\n h264Frame.endNalUnit();\n break;\n default:\n h264Frame.endNalUnit();\n break;\n }\n h264Frame.startNalUnit();\n h264Frame.writeBytes(currentNal.data);\n }\n if (h264Frame) {\n this.finishFrame(tags, h264Frame);\n }\n\n this.trigger('data', {track: track, tags: tags});\n\n // Continue with the flush process now\n this.trigger('done');\n };\n};\n\nVideoSegmentStream.prototype = new Stream();\n\n/**\n * The final stage of the transmuxer that emits the flv tags\n * for audio, video, and metadata. Also tranlates in time and\n * outputs caption data and id3 cues.\n */\nCoalesceStream = function(options) {\n // Number of Tracks per output segment\n // If greater than 1, we combine multiple\n // tracks into a single segment\n this.numberOfTracks = 0;\n this.metadataStream = options.metadataStream;\n\n this.videoTags = [];\n this.audioTags = [];\n this.videoTrack = null;\n this.audioTrack = null;\n this.pendingCaptions = [];\n this.pendingMetadata = [];\n this.pendingTracks = 0;\n\n CoalesceStream.prototype.init.call(this);\n\n // Take output from multiple\n this.push = function(output) {\n // buffer incoming captions until the associated video segment\n // finishes\n if (output.text) {\n return this.pendingCaptions.push(output);\n }\n // buffer incoming id3 tags until the final flush\n if (output.frames) {\n return this.pendingMetadata.push(output);\n }\n\n if (output.track.type === 'video') {\n this.videoTrack = output.track;\n this.videoTags = output.tags;\n this.pendingTracks++;\n }\n if (output.track.type === 'audio') {\n this.audioTrack = output.track;\n this.audioTags = output.tags;\n this.pendingTracks++;\n }\n };\n};\n\nCoalesceStream.prototype = new Stream();\nCoalesceStream.prototype.flush = function() {\n var\n id3,\n caption,\n i,\n timelineStartPts,\n event = {\n tags: {},\n captions: [],\n metadata: []\n };\n\n if (this.pendingTracks < this.numberOfTracks) {\n return;\n }\n\n if (this.videoTrack) {\n timelineStartPts = this.videoTrack.timelineStartInfo.pts;\n } else if (this.audioTrack) {\n timelineStartPts = this.audioTrack.timelineStartInfo.pts;\n }\n\n event.tags.videoTags = this.videoTags;\n event.tags.audioTags = this.audioTags;\n\n // Translate caption PTS times into second offsets into the\n // video timeline for the segment\n for (i = 0; i < this.pendingCaptions.length; i++) {\n caption = this.pendingCaptions[i];\n caption.startTime = caption.startPts - timelineStartPts;\n caption.startTime /= 90e3;\n caption.endTime = caption.endPts - timelineStartPts;\n caption.endTime /= 90e3;\n event.captions.push(caption);\n }\n\n // Translate ID3 frame PTS times into second offsets into the\n // video timeline for the segment\n for (i = 0; i < this.pendingMetadata.length; i++) {\n id3 = this.pendingMetadata[i];\n id3.cueTime = id3.pts - timelineStartPts;\n id3.cueTime /= 90e3;\n event.metadata.push(id3);\n }\n // We add this to every single emitted segment even though we only need\n // it for the first\n event.metadata.dispatchType = this.metadataStream.dispatchType;\n\n // Reset stream state\n this.videoTrack = null;\n this.audioTrack = null;\n this.videoTags = [];\n this.audioTags = [];\n this.pendingCaptions.length = 0;\n this.pendingMetadata.length = 0;\n this.pendingTracks = 0;\n\n // Emit the final segment\n this.trigger('data', event);\n\n this.trigger('done');\n};\n\n/**\n * An object that incrementally transmuxes MPEG2 Trasport Stream\n * chunks into an FLV.\n */\nTransmuxer = function(options) {\n var\n self = this,\n videoTrack,\n audioTrack,\n\n packetStream, parseStream, elementaryStream,\n adtsStream, h264Stream,\n videoSegmentStream, audioSegmentStream, captionStream,\n coalesceStream;\n\n Transmuxer.prototype.init.call(this);\n\n options = options || {};\n\n // expose the metadata stream\n this.metadataStream = new m2ts.MetadataStream();\n\n options.metadataStream = this.metadataStream;\n\n // set up the parsing pipeline\n packetStream = new m2ts.TransportPacketStream();\n parseStream = new m2ts.TransportParseStream();\n elementaryStream = new m2ts.ElementaryStream();\n adtsStream = new AdtsStream();\n h264Stream = new H264Stream();\n coalesceStream = new CoalesceStream(options);\n\n // disassemble MPEG2-TS packets into elementary streams\n packetStream\n .pipe(parseStream)\n .pipe(elementaryStream);\n\n // !!THIS ORDER IS IMPORTANT!!\n // demux the streams\n elementaryStream\n .pipe(h264Stream);\n elementaryStream\n .pipe(adtsStream);\n\n elementaryStream\n .pipe(this.metadataStream)\n .pipe(coalesceStream);\n // if CEA-708 parsing is available, hook up a caption stream\n captionStream = new m2ts.CaptionStream();\n h264Stream.pipe(captionStream)\n .pipe(coalesceStream);\n\n // hook up the segment streams once track metadata is delivered\n elementaryStream.on('data', function(data) {\n var i, videoTrack, audioTrack;\n\n if (data.type === 'metadata') {\n i = data.tracks.length;\n\n // scan the tracks listed in the metadata\n while (i--) {\n if (data.tracks[i].type === 'video') {\n videoTrack = data.tracks[i];\n } else if (data.tracks[i].type === 'audio') {\n audioTrack = data.tracks[i];\n }\n }\n\n // hook up the video segment stream to the first track with h264 data\n if (videoTrack && !videoSegmentStream) {\n coalesceStream.numberOfTracks++;\n videoSegmentStream = new VideoSegmentStream(videoTrack);\n\n // Set up the final part of the video pipeline\n h264Stream\n .pipe(videoSegmentStream)\n .pipe(coalesceStream);\n }\n\n if (audioTrack && !audioSegmentStream) {\n // hook up the audio segment stream to the first track with aac data\n coalesceStream.numberOfTracks++;\n audioSegmentStream = new AudioSegmentStream(audioTrack);\n\n // Set up the final part of the audio pipeline\n adtsStream\n .pipe(audioSegmentStream)\n .pipe(coalesceStream);\n }\n }\n });\n\n // feed incoming data to the front of the parsing pipeline\n this.push = function(data) {\n packetStream.push(data);\n };\n\n // flush any buffered data\n this.flush = function() {\n // Start at the top of the pipeline and flush all pending work\n packetStream.flush();\n };\n\n // Re-emit any data coming from the coalesce stream to the outside world\n coalesceStream.on('data', function (event) {\n self.trigger('data', event);\n });\n\n // Let the consumer know we have finished flushing the entire pipeline\n coalesceStream.on('done', function () {\n self.trigger('done');\n });\n\n // For information on the FLV format, see\n // http://download.macromedia.com/f4v/video_file_format_spec_v10_1.pdf.\n // Technically, this function returns the header and a metadata FLV tag\n // if duration is greater than zero\n // duration in seconds\n // @return {object} the bytes of the FLV header as a Uint8Array\n this.getFlvHeader = function(duration, audio, video) { // :ByteArray {\n var\n headBytes = new Uint8Array(3 + 1 + 1 + 4),\n head = new DataView(headBytes.buffer),\n metadata,\n result,\n metadataLength;\n\n // default arguments\n duration = duration || 0;\n audio = audio === undefined? true : audio;\n video = video === undefined? true : video;\n\n // signature\n head.setUint8(0, 0x46); // 'F'\n head.setUint8(1, 0x4c); // 'L'\n head.setUint8(2, 0x56); // 'V'\n\n // version\n head.setUint8(3, 0x01);\n\n // flags\n head.setUint8(4, (audio ? 0x04 : 0x00) | (video ? 0x01 : 0x00));\n\n // data offset, should be 9 for FLV v1\n head.setUint32(5, headBytes.byteLength);\n\n // init the first FLV tag\n if (duration <= 0) {\n // no duration available so just write the first field of the first\n // FLV tag\n result = new Uint8Array(headBytes.byteLength + 4);\n result.set(headBytes);\n result.set([0, 0, 0, 0], headBytes.byteLength);\n return result;\n }\n\n // write out the duration metadata tag\n metadata = new FlvTag(FlvTag.METADATA_TAG);\n metadata.pts = metadata.dts = 0;\n metadata.writeMetaDataDouble(\"duration\", duration);\n metadataLength = metadata.finalize().length;\n result = new Uint8Array(headBytes.byteLength + metadataLength);\n result.set(headBytes);\n result.set(head.byteLength, metadataLength);\n\n return result;\n };\n};\nTransmuxer.prototype = new Stream();\n\n// forward compatibility\nmodule.exports = Transmuxer;\n","'use strict';\n\nvar muxjs = {\n codecs: require('./codecs'),\n mp4: require('./mp4'),\n flv: require('./flv'),\n mp2t: require('./m2ts'),\n};\nmodule.exports = muxjs;\n","/**\n * mux.js\n *\n * Copyright (c) 2015 Brightcove\n * All rights reserved.\n *\n * Reads in-band caption information from a video elementary\n * stream. Captions must follow the CEA-708 standard for injection\n * into an MPEG-2 transport streams.\n * @see https://en.wikipedia.org/wiki/CEA-708\n */\n\n'use strict';\n\n// -----------------\n// Link To Transport\n// -----------------\n\n// Supplemental enhancement information (SEI) NAL units have a\n// payload type field to indicate how they are to be\n// interpreted. CEAS-708 caption content is always transmitted with\n// payload type 0x04.\nvar USER_DATA_REGISTERED_ITU_T_T35 = 4,\n RBSP_TRAILING_BITS = 128,\n Stream = require('../utils/stream'),\n codecs = require('../codecs');\n\n/**\n * Parse a supplemental enhancement information (SEI) NAL unit.\n * Stops parsing once a message of type ITU T T35 has been found.\n *\n * @param bytes {Uint8Array} the bytes of a SEI NAL unit\n * @return {object} the parsed SEI payload\n * @see Rec. ITU-T H.264, 7.3.2.3.1\n */\nvar parseSei = function(bytes) {\n var\n i = 0,\n result = {\n payloadType: -1,\n payloadSize: 0,\n },\n payloadType = 0,\n payloadSize = 0;\n\n // go through the sei_rbsp parsing each each individual sei_message\n while (i < bytes.byteLength) {\n // stop once we have hit the end of the sei_rbsp\n if (bytes[i] === RBSP_TRAILING_BITS) {\n break;\n }\n\n // Parse payload type\n while (bytes[i] === 0xFF) {\n payloadType += 255;\n i++;\n }\n payloadType += bytes[i++];\n\n // Parse payload size\n while (bytes[i] === 0xFF) {\n payloadSize += 255;\n i++;\n }\n payloadSize += bytes[i++];\n\n // this sei_message is a 608/708 caption so save it and break\n // there can only ever be one caption message in a frame's sei\n if (!result.payload && payloadType === USER_DATA_REGISTERED_ITU_T_T35) {\n result.payloadType = payloadType;\n result.payloadSize = payloadSize;\n result.payload = bytes.subarray(i, i + payloadSize);\n break;\n }\n\n // skip the payload and parse the next message\n i += payloadSize;\n payloadType = 0;\n payloadSize = 0;\n }\n\n return result;\n};\n\n// see ANSI/SCTE 128-1 (2013), section 8.1\nvar parseUserData = function(sei) {\n // itu_t_t35_contry_code must be 181 (United States) for\n // captions\n if (sei.payload[0] !== 181) {\n return null;\n }\n\n // itu_t_t35_provider_code should be 49 (ATSC) for captions\n if (((sei.payload[1] << 8) | sei.payload[2]) !== 49) {\n return null;\n }\n\n // the user_identifier should be \"GA94\" to indicate ATSC1 data\n if (String.fromCharCode(sei.payload[3],\n sei.payload[4],\n sei.payload[5],\n sei.payload[6]) !== 'GA94') {\n return null;\n }\n\n // finally, user_data_type_code should be 0x03 for caption data\n if (sei.payload[7] !== 0x03) {\n return null;\n }\n\n // return the user_data_type_structure and strip the trailing\n // marker bits\n return sei.payload.subarray(8, sei.payload.length - 1);\n};\n\n// see CEA-708-D, section 4.4\nvar parseCaptionPackets = function(pts, userData) {\n var results = [], i, count, offset, data;\n\n // if this is just filler, return immediately\n if (!(userData[0] & 0x40)) {\n return results;\n }\n\n // parse out the cc_data_1 and cc_data_2 fields\n count = userData[0] & 0x1f;\n for (i = 0; i < count; i++) {\n offset = i * 3;\n data = {\n type: userData[offset + 2] & 0x03,\n pts: pts\n };\n\n // capture cc data when cc_valid is 1\n if (userData[offset + 2] & 0x04) {\n data.ccData = (userData[offset + 3] << 8) | userData[offset + 4];\n results.push(data);\n }\n }\n return results;\n};\n\nvar CaptionStream = function() {\n var self = this;\n CaptionStream.prototype.init.call(this);\n\n this.captionPackets_ = [];\n\n this.field1_ = new Cea608Stream();\n\n // forward data and done events from field1_ to this CaptionStream\n this.field1_.on('data', this.trigger.bind(this, 'data'));\n this.field1_.on('done', this.trigger.bind(this, 'done'));\n};\nCaptionStream.prototype = new Stream();\nCaptionStream.prototype.push = function(event) {\n var sei, userData, captionPackets;\n\n // only examine SEI NALs\n if (event.nalUnitType !== codecs.h264.unitTypes.sei_rbsp) {\n return;\n }\n\n // parse the sei\n sei = parseSei(event.escapedRBSP);\n\n // ignore everything but user_data_registered_itu_t_t35\n if (sei.payloadType !== USER_DATA_REGISTERED_ITU_T_T35) {\n return;\n }\n\n // parse out the user data payload\n userData = parseUserData(sei);\n\n // ignore unrecognized userData\n if (!userData) {\n return;\n }\n\n // parse out CC data packets and save them for later\n this.captionPackets_ = this.captionPackets_.concat(parseCaptionPackets(event.pts, userData));\n};\n\nCaptionStream.prototype.flush = function () {\n // make sure we actually parsed captions before proceeding\n if (!this.captionPackets_.length) {\n this.field1_.flush();\n return;\n }\n\n // sort caption byte-pairs based on their PTS values\n this.captionPackets_.sort(function(a, b) {\n return a.pts - b.pts;\n });\n\n // Push each caption into Cea608Stream\n this.captionPackets_.forEach(this.field1_.push, this.field1_);\n\n this.captionPackets_.length = 0;\n this.field1_.flush();\n return;\n};\n// ----------------------\n// Session to Application\n// ----------------------\n\nvar BASIC_CHARACTER_TRANSLATION = {\n 0x2a: 0xe1,\n 0x5c: 0xe9,\n 0x5e: 0xed,\n 0x5f: 0xf3,\n 0x60: 0xfa,\n 0x7b: 0xe7,\n 0x7c: 0xf7,\n 0x7d: 0xd1,\n 0x7e: 0xf1,\n 0x7f: 0x2588\n};\n\nvar getCharFromCode = function(code) {\n if(code === null) {\n return '';\n }\n code = BASIC_CHARACTER_TRANSLATION[code] || code;\n return String.fromCharCode(code);\n};\n\n// Constants for the byte codes recognized by Cea608Stream. This\n// list is not exhaustive. For a more comprehensive listing and\n// semantics see\n// http://www.gpo.gov/fdsys/pkg/CFR-2010-title47-vol1/pdf/CFR-2010-title47-vol1-sec15-119.pdf\nvar PADDING = 0x0000,\n\n // Pop-on Mode\n RESUME_CAPTION_LOADING = 0x1420,\n END_OF_CAPTION = 0x142f,\n\n // Roll-up Mode\n ROLL_UP_2_ROWS = 0x1425,\n ROLL_UP_3_ROWS = 0x1426,\n ROLL_UP_4_ROWS = 0x1427,\n RESUME_DIRECT_CAPTIONING = 0x1429,\n CARRIAGE_RETURN = 0x142d,\n // Erasure\n BACKSPACE = 0x1421,\n ERASE_DISPLAYED_MEMORY = 0x142c,\n ERASE_NON_DISPLAYED_MEMORY = 0x142e;\n\n// the index of the last row in a CEA-608 display buffer\nvar BOTTOM_ROW = 14;\n// CEA-608 captions are rendered onto a 34x15 matrix of character\n// cells. The \"bottom\" row is the last element in the outer array.\nvar createDisplayBuffer = function() {\n var result = [], i = BOTTOM_ROW + 1;\n while (i--) {\n result.push('');\n }\n return result;\n};\n\nvar Cea608Stream = function() {\n Cea608Stream.prototype.init.call(this);\n\n this.mode_ = 'popOn';\n // When in roll-up mode, the index of the last row that will\n // actually display captions. If a caption is shifted to a row\n // with a lower index than this, it is cleared from the display\n // buffer\n this.topRow_ = 0;\n this.startPts_ = 0;\n this.displayed_ = createDisplayBuffer();\n this.nonDisplayed_ = createDisplayBuffer();\n this.lastControlCode_ = null;\n\n this.push = function(packet) {\n // Ignore other channels\n if (packet.type !== 0) {\n return;\n }\n var data, swap, char0, char1;\n // remove the parity bits\n data = packet.ccData & 0x7f7f;\n\n // ignore duplicate control codes\n if (data === this.lastControlCode_) {\n this.lastControlCode_ = null;\n return;\n }\n\n // Store control codes\n if ((data & 0xf000) === 0x1000) {\n this.lastControlCode_ = data;\n } else {\n this.lastControlCode_ = null;\n }\n\n switch (data) {\n case PADDING:\n break;\n case RESUME_CAPTION_LOADING:\n this.mode_ = 'popOn';\n break;\n case END_OF_CAPTION:\n // if a caption was being displayed, it's gone now\n this.flushDisplayed(packet.pts);\n\n // flip memory\n swap = this.displayed_;\n this.displayed_ = this.nonDisplayed_;\n this.nonDisplayed_ = swap;\n\n // start measuring the time to display the caption\n this.startPts_ = packet.pts;\n break;\n\n case ROLL_UP_2_ROWS:\n this.topRow_ = BOTTOM_ROW - 1;\n this.mode_ = 'rollUp';\n break;\n case ROLL_UP_3_ROWS:\n this.topRow_ = BOTTOM_ROW - 2;\n this.mode_ = 'rollUp';\n break;\n case ROLL_UP_4_ROWS:\n this.topRow_ = BOTTOM_ROW - 3;\n this.mode_ = 'rollUp';\n break;\n case CARRIAGE_RETURN:\n this.flushDisplayed(packet.pts);\n this.shiftRowsUp_();\n this.startPts_ = packet.pts;\n break;\n\n case BACKSPACE:\n if (this.mode_ === 'popOn') {\n this.nonDisplayed_[BOTTOM_ROW] = this.nonDisplayed_[BOTTOM_ROW].slice(0, -1);\n } else {\n this.displayed_[BOTTOM_ROW] = this.displayed_[BOTTOM_ROW].slice(0, -1);\n }\n break;\n case ERASE_DISPLAYED_MEMORY:\n this.flushDisplayed(packet.pts);\n this.displayed_ = createDisplayBuffer();\n break;\n case ERASE_NON_DISPLAYED_MEMORY:\n this.nonDisplayed_ = createDisplayBuffer();\n break;\n default:\n char0 = data >>> 8;\n char1 = data & 0xff;\n\n // Look for a Channel 1 Preamble Address Code\n if (char0 >= 0x10 && char0 <= 0x17 &&\n char1 >= 0x40 && char1 <= 0x7F &&\n (char0 !== 0x10 || char1 < 0x60)) {\n // Follow Safari's lead and replace the PAC with a space\n char0 = 0x20;\n // we only want one space so make the second character null\n // which will get become '' in getCharFromCode\n char1 = null;\n }\n\n // Look for special character sets\n if ((char0 === 0x11 || char0 === 0x19) &&\n (char1 >= 0x30 && char1 <= 0x3F)) {\n // Put in eigth note and space\n char0 = 0x266A;\n char1 = '';\n }\n\n // ignore unsupported control codes\n if ((char0 & 0xf0) === 0x10) {\n return;\n }\n\n // character handling is dependent on the current mode\n this[this.mode_](packet.pts, char0, char1);\n break;\n }\n };\n};\nCea608Stream.prototype = new Stream();\n// Trigger a cue point that captures the current state of the\n// display buffer\nCea608Stream.prototype.flushDisplayed = function(pts) {\n var content = this.displayed_\n // remove spaces from the start and end of the string\n .map(function(row) { return row.trim(); })\n // remove empty rows\n .filter(function(row) { return row.length; })\n // combine all text rows to display in one cue\n .join('\\n');\n\n if (content.length) {\n this.trigger('data', {\n startPts: this.startPts_,\n endPts: pts,\n text: content\n });\n }\n};\n\n// Mode Implementations\nCea608Stream.prototype.popOn = function(pts, char0, char1) {\n var baseRow = this.nonDisplayed_[BOTTOM_ROW];\n\n // buffer characters\n baseRow += getCharFromCode(char0);\n baseRow += getCharFromCode(char1);\n this.nonDisplayed_[BOTTOM_ROW] = baseRow;\n};\n\nCea608Stream.prototype.rollUp = function(pts, char0, char1) {\n var baseRow = this.displayed_[BOTTOM_ROW];\n if (baseRow === '') {\n // we're starting to buffer new display input, so flush out the\n // current display\n this.flushDisplayed(pts);\n\n this.startPts_ = pts;\n }\n\n baseRow += getCharFromCode(char0);\n baseRow += getCharFromCode(char1);\n\n this.displayed_[BOTTOM_ROW] = baseRow;\n};\nCea608Stream.prototype.shiftRowsUp_ = function() {\n var i;\n // clear out inactive rows\n for (i = 0; i < this.topRow_; i++) {\n this.displayed_[i] = '';\n }\n // shift displayed rows up\n for (i = this.topRow_; i < BOTTOM_ROW; i++) {\n this.displayed_[i] = this.displayed_[i + 1];\n }\n // clear out the bottom row\n this.displayed_[BOTTOM_ROW] = '';\n};\n\n// exports\nmodule.exports = {\n CaptionStream: CaptionStream,\n Cea608Stream: Cea608Stream,\n};\n\n","module.exports = require('./m2ts');\n","/**\n * mux.js\n *\n * Copyright (c) 2015 Brightcove\n * All rights reserved.\n *\n * A stream-based mp2t to mp4 converter. This utility can be used to\n * deliver mp4s to a SourceBuffer on platforms that support native\n * Media Source Extensions.\n */\n'use strict';\nvar Stream = require('../utils/stream.js'),\n CaptionStream = require('./caption-stream'),\n StreamTypes = require('./stream-types'),\n TimestampRolloverStream = require('./timestamp-rollover-stream').TimestampRolloverStream;\n\nvar m2tsStreamTypes = require('./stream-types.js');\n\n// object types\nvar TransportPacketStream, TransportParseStream, ElementaryStream;\n\n// constants\nvar\n MP2T_PACKET_LENGTH = 188, // bytes\n SYNC_BYTE = 0x47;\n\n/**\n * Splits an incoming stream of binary data into MPEG-2 Transport\n * Stream packets.\n */\nTransportPacketStream = function() {\n var\n buffer = new Uint8Array(MP2T_PACKET_LENGTH),\n bytesInBuffer = 0;\n\n TransportPacketStream.prototype.init.call(this);\n\n // Deliver new bytes to the stream.\n\n this.push = function(bytes) {\n var\n startIndex = 0,\n endIndex = MP2T_PACKET_LENGTH,\n everything;\n\n // If there are bytes remaining from the last segment, prepend them to the\n // bytes that were pushed in\n if (bytesInBuffer) {\n everything = new Uint8Array(bytes.byteLength + bytesInBuffer);\n everything.set(buffer.subarray(0, bytesInBuffer));\n everything.set(bytes, bytesInBuffer);\n bytesInBuffer = 0;\n } else {\n everything = bytes;\n }\n\n // While we have enough data for a packet\n while (endIndex < everything.byteLength) {\n // Look for a pair of start and end sync bytes in the data..\n if (everything[startIndex] === SYNC_BYTE && everything[endIndex] === SYNC_BYTE) {\n // We found a packet so emit it and jump one whole packet forward in\n // the stream\n this.trigger('data', everything.subarray(startIndex, endIndex));\n startIndex += MP2T_PACKET_LENGTH;\n endIndex += MP2T_PACKET_LENGTH;\n continue;\n }\n // If we get here, we have somehow become de-synchronized and we need to step\n // forward one byte at a time until we find a pair of sync bytes that denote\n // a packet\n startIndex++;\n endIndex++;\n }\n\n // If there was some data left over at the end of the segment that couldn't\n // possibly be a whole packet, keep it because it might be the start of a packet\n // that continues in the next segment\n if (startIndex < everything.byteLength) {\n buffer.set(everything.subarray(startIndex), 0);\n bytesInBuffer = everything.byteLength - startIndex;\n }\n };\n\n this.flush = function() {\n // If the buffer contains a whole packet when we are being flushed, emit it\n // and empty the buffer. Otherwise hold onto the data because it may be\n // important for decoding the next segment\n if (bytesInBuffer === MP2T_PACKET_LENGTH && buffer[0] === SYNC_BYTE) {\n this.trigger('data', buffer);\n bytesInBuffer = 0;\n }\n this.trigger('done');\n };\n};\nTransportPacketStream.prototype = new Stream();\n\n/**\n * Accepts an MP2T TransportPacketStream and emits data events with parsed\n * forms of the individual transport stream packets.\n */\nTransportParseStream = function() {\n var parsePsi, parsePat, parsePmt, parsePes, self;\n TransportParseStream.prototype.init.call(this);\n self = this;\n\n this.packetsWaitingForPmt = [];\n this.programMapTable = undefined;\n\n parsePsi = function(payload, psi) {\n var offset = 0;\n\n // PSI packets may be split into multiple sections and those\n // sections may be split into multiple packets. If a PSI\n // section starts in this packet, the payload_unit_start_indicator\n // will be true and the first byte of the payload will indicate\n // the offset from the current position to the start of the\n // section.\n if (psi.payloadUnitStartIndicator) {\n offset += payload[offset] + 1;\n }\n\n if (psi.type === 'pat') {\n parsePat(payload.subarray(offset), psi);\n } else {\n parsePmt(payload.subarray(offset), psi);\n }\n };\n\n parsePat = function(payload, pat) {\n pat.section_number = payload[7];\n pat.last_section_number = payload[8];\n\n // skip the PSI header and parse the first PMT entry\n self.pmtPid = (payload[10] & 0x1F) << 8 | payload[11];\n pat.pmtPid = self.pmtPid;\n };\n\n /**\n * Parse out the relevant fields of a Program Map Table (PMT).\n * @param payload {Uint8Array} the PMT-specific portion of an MP2T\n * packet. The first byte in this array should be the table_id\n * field.\n * @param pmt {object} the object that should be decorated with\n * fields parsed from the PMT.\n */\n parsePmt = function(payload, pmt) {\n var sectionLength, tableEnd, programInfoLength, offset;\n\n // PMTs can be sent ahead of the time when they should actually\n // take effect. We don't believe this should ever be the case\n // for HLS but we'll ignore \"forward\" PMT declarations if we see\n // them. Future PMT declarations have the current_next_indicator\n // set to zero.\n if (!(payload[5] & 0x01)) {\n return;\n }\n\n // overwrite any existing program map table\n self.programMapTable = {};\n\n // the mapping table ends at the end of the current section\n sectionLength = (payload[1] & 0x0f) << 8 | payload[2];\n tableEnd = 3 + sectionLength - 4;\n\n // to determine where the table is, we have to figure out how\n // long the program info descriptors are\n programInfoLength = (payload[10] & 0x0f) << 8 | payload[11];\n\n // advance the offset to the first entry in the mapping table\n offset = 12 + programInfoLength;\n while (offset < tableEnd) {\n // add an entry that maps the elementary_pid to the stream_type\n self.programMapTable[(payload[offset + 1] & 0x1F) << 8 | payload[offset + 2]] = payload[offset];\n\n // move to the next table entry\n // skip past the elementary stream descriptors, if present\n offset += ((payload[offset + 3] & 0x0F) << 8 | payload[offset + 4]) + 5;\n }\n\n // record the map on the packet as well\n pmt.programMapTable = self.programMapTable;\n\n // if there are any packets waiting for a PMT to be found, process them now\n while (self.packetsWaitingForPmt.length) {\n self.processPes_.apply(self, self.packetsWaitingForPmt.shift());\n }\n };\n\n /**\n * Deliver a new MP2T packet to the stream.\n */\n this.push = function(packet) {\n var\n result = {},\n offset = 4;\n\n result.payloadUnitStartIndicator = !!(packet[1] & 0x40);\n\n // pid is a 13-bit field starting at the last bit of packet[1]\n result.pid = packet[1] & 0x1f;\n result.pid <<= 8;\n result.pid |= packet[2];\n\n // if an adaption field is present, its length is specified by the\n // fifth byte of the TS packet header. The adaptation field is\n // used to add stuffing to PES packets that don't fill a complete\n // TS packet, and to specify some forms of timing and control data\n // that we do not currently use.\n if (((packet[3] & 0x30) >>> 4) > 0x01) {\n offset += packet[offset] + 1;\n }\n\n // parse the rest of the packet based on the type\n if (result.pid === 0) {\n result.type = 'pat';\n parsePsi(packet.subarray(offset), result);\n this.trigger('data', result);\n } else if (result.pid === this.pmtPid) {\n result.type = 'pmt';\n parsePsi(packet.subarray(offset), result);\n this.trigger('data', result);\n } else if (this.programMapTable === undefined) {\n // When we have not seen a PMT yet, defer further processing of\n // PES packets until one has been parsed\n this.packetsWaitingForPmt.push([packet, offset, result]);\n } else {\n this.processPes_(packet, offset, result);\n }\n };\n\n this.processPes_ = function(packet, offset, result) {\n result.streamType = this.programMapTable[result.pid];\n result.type = 'pes';\n result.data = packet.subarray(offset);\n\n this.trigger('data', result);\n };\n\n};\nTransportParseStream.prototype = new Stream();\nTransportParseStream.STREAM_TYPES = {\n h264: 0x1b,\n adts: 0x0f\n};\n\n/**\n * Reconsistutes program elementary stream (PES) packets from parsed\n * transport stream packets. That is, if you pipe an\n * mp2t.TransportParseStream into a mp2t.ElementaryStream, the output\n * events will be events which capture the bytes for individual PES\n * packets plus relevant metadata that has been extracted from the\n * container.\n */\nElementaryStream = function() {\n var\n self = this,\n // PES packet fragments\n video = {\n data: [],\n size: 0\n },\n audio = {\n data: [],\n size: 0\n },\n timedMetadata = {\n data: [],\n size: 0\n },\n parsePes = function(payload, pes) {\n var ptsDtsFlags;\n function extract_ts(arr, index) {\n var ts = (arr[index] & 0x0E) * 536870912 + // 1 << 29\n (arr[index+1] & 0xFF) * 4194304 + // 1 << 22\n (arr[index+2] & 0xFE) * 16384 + // 1 << 14\n (arr[index+3] & 0xFF) * 128 + // 1 << 7\n (arr[index+4] & 0xFE) / 2;\n // check if greater than 2^32 -1\n if (ts > 4294967295) {\n // decrement 2^33\n ts -= 8589934592;\n }\n return ts;\n }\n\n // find out if this packets starts a new keyframe\n pes.dataAlignmentIndicator = (payload[6] & 0x04) !== 0;\n // PES packets may be annotated with a PTS value, or a PTS value\n // and a DTS value. Determine what combination of values is\n // available to work with.\n ptsDtsFlags = payload[7];\n\n // PTS and DTS are normally stored as a 33-bit number. Javascript\n // performs all bitwise operations on 32-bit integers but javascript\n // supports a much greater range (52-bits) of integer using standard\n // mathematical operations.\n // We construct a 31-bit value using bitwise operators over the 31\n // most significant bits and then multiply by 4 (equal to a left-shift\n // of 2) before we add the final 2 least significant bits of the\n // timestamp (equal to an OR.)\n if (ptsDtsFlags & 0xC0) {\n // the PTS and DTS are not written out directly. For information\n // on how they are encoded, see\n // http://dvd.sourceforge.net/dvdinfo/pes-hdr.html\n pes.pts = extract_ts(payload, 9);\n pes.dts = ptsDtsFlags & 0x40 ? extract_ts(payload, 14) : pes.pts;\n }\n // the data section starts immediately after the PES header.\n // pes_header_data_length specifies the number of header bytes\n // that follow the last byte of the field.\n pes.data = payload.subarray(9 + payload[8]);\n },\n flushStream = function(stream, type) {\n var\n packetData = new Uint8Array(stream.size),\n event = {\n type: type\n },\n i = 0,\n fragment;\n\n // do nothing if there is no buffered data\n if (!stream.data.length) {\n return;\n }\n event.trackId = stream.data[0].pid;\n\n // reassemble the packet\n while (stream.data.length) {\n fragment = stream.data.shift();\n\n packetData.set(fragment.data, i);\n i += fragment.data.byteLength;\n }\n\n // parse assembled packet's PES header\n parsePes(packetData, event);\n\n stream.size = 0;\n\n self.trigger('data', event);\n };\n\n ElementaryStream.prototype.init.call(this);\n\n this.push = function(data) {\n ({\n pat: function() {\n // we have to wait for the PMT to arrive as well before we\n // have any meaningful metadata\n },\n pes: function() {\n var stream, streamType;\n\n switch (data.streamType) {\n case StreamTypes.H264_STREAM_TYPE:\n case m2tsStreamTypes.H264_STREAM_TYPE:\n stream = video;\n streamType = 'video';\n break;\n case StreamTypes.ADTS_STREAM_TYPE:\n stream = audio;\n streamType = 'audio';\n break;\n case StreamTypes.METADATA_STREAM_TYPE:\n stream = timedMetadata;\n streamType = 'timed-metadata';\n break;\n default:\n // ignore unknown stream types\n return;\n }\n\n // if a new packet is starting, we can flush the completed\n // packet\n if (data.payloadUnitStartIndicator) {\n flushStream(stream, streamType);\n }\n\n // buffer this fragment until we are sure we've received the\n // complete payload\n stream.data.push(data);\n stream.size += data.data.byteLength;\n },\n pmt: function() {\n var\n event = {\n type: 'metadata',\n tracks: []\n },\n programMapTable = data.programMapTable,\n k,\n track;\n\n // translate streams to tracks\n for (k in programMapTable) {\n if (programMapTable.hasOwnProperty(k)) {\n track = {\n timelineStartInfo: {\n baseMediaDecodeTime: 0\n }\n };\n track.id = +k;\n if (programMapTable[k] === m2tsStreamTypes.H264_STREAM_TYPE) {\n track.codec = 'avc';\n track.type = 'video';\n } else if (programMapTable[k] === m2tsStreamTypes.ADTS_STREAM_TYPE) {\n track.codec = 'adts';\n track.type = 'audio';\n }\n event.tracks.push(track);\n }\n }\n self.trigger('data', event);\n }\n })[data.type]();\n };\n\n /**\n * Flush any remaining input. Video PES packets may be of variable\n * length. Normally, the start of a new video packet can trigger the\n * finalization of the previous packet. That is not possible if no\n * more video is forthcoming, however. In that case, some other\n * mechanism (like the end of the file) has to be employed. When it is\n * clear that no additional data is forthcoming, calling this method\n * will flush the buffered packets.\n */\n this.flush = function() {\n // !!THIS ORDER IS IMPORTANT!!\n // video first then audio\n flushStream(video, 'video');\n flushStream(audio, 'audio');\n flushStream(timedMetadata, 'timed-metadata');\n this.trigger('done');\n };\n};\nElementaryStream.prototype = new Stream();\n\nvar m2ts = {\n PAT_PID: 0x0000,\n MP2T_PACKET_LENGTH: MP2T_PACKET_LENGTH,\n TransportPacketStream: TransportPacketStream,\n TransportParseStream: TransportParseStream,\n ElementaryStream: ElementaryStream,\n TimestampRolloverStream: TimestampRolloverStream,\n CaptionStream: CaptionStream.CaptionStream,\n Cea608Stream: CaptionStream.Cea608Stream,\n MetadataStream: require('./metadata-stream')\n};\n\nfor (var type in StreamTypes) {\n if (StreamTypes.hasOwnProperty(type)) {\n m2ts[type] = StreamTypes[type];\n }\n}\n\nmodule.exports = m2ts;\n","/**\n * Accepts program elementary stream (PES) data events and parses out\n * ID3 metadata from them, if present.\n * @see http://id3.org/id3v2.3.0\n */\n'use strict';\nvar\n Stream = require('../utils/stream'),\n StreamTypes = require('./stream-types'),\n // return a percent-encoded representation of the specified byte range\n // @see http://en.wikipedia.org/wiki/Percent-encoding\n percentEncode = function(bytes, start, end) {\n var i, result = '';\n for (i = start; i < end; i++) {\n result += '%' + ('00' + bytes[i].toString(16)).slice(-2);\n }\n return result;\n },\n // return the string representation of the specified byte range,\n // interpreted as UTf-8.\n parseUtf8 = function(bytes, start, end) {\n return decodeURIComponent(percentEncode(bytes, start, end));\n },\n // return the string representation of the specified byte range,\n // interpreted as ISO-8859-1.\n parseIso88591 = function(bytes, start, end) {\n return unescape(percentEncode(bytes, start, end)); // jshint ignore:line\n },\n parseSyncSafeInteger = function (data) {\n return (data[0] << 21) |\n (data[1] << 14) |\n (data[2] << 7) |\n (data[3]);\n },\n tagParsers = {\n 'TXXX': function(tag) {\n var i;\n if (tag.data[0] !== 3) {\n // ignore frames with unrecognized character encodings\n return;\n }\n\n for (i = 1; i < tag.data.length; i++) {\n if (tag.data[i] === 0) {\n // parse the text fields\n tag.description = parseUtf8(tag.data, 1, i);\n // do not include the null terminator in the tag value\n tag.value = parseUtf8(tag.data, i + 1, tag.data.length - 1);\n break;\n }\n }\n tag.data = tag.value;\n },\n 'WXXX': function(tag) {\n var i;\n if (tag.data[0] !== 3) {\n // ignore frames with unrecognized character encodings\n return;\n }\n\n for (i = 1; i < tag.data.length; i++) {\n if (tag.data[i] === 0) {\n // parse the description and URL fields\n tag.description = parseUtf8(tag.data, 1, i);\n tag.url = parseUtf8(tag.data, i + 1, tag.data.length);\n break;\n }\n }\n },\n 'PRIV': function(tag) {\n var i;\n\n for (i = 0; i < tag.data.length; i++) {\n if (tag.data[i] === 0) {\n // parse the description and URL fields\n tag.owner = parseIso88591(tag.data, 0, i);\n break;\n }\n }\n tag.privateData = tag.data.subarray(i + 1);\n tag.data = tag.privateData;\n }\n },\n MetadataStream;\n\nMetadataStream = function(options) {\n var\n settings = {\n debug: !!(options && options.debug),\n\n // the bytes of the program-level descriptor field in MP2T\n // see ISO/IEC 13818-1:2013 (E), section 2.6 \"Program and\n // program element descriptors\"\n descriptor: options && options.descriptor\n },\n // the total size in bytes of the ID3 tag being parsed\n tagSize = 0,\n // tag data that is not complete enough to be parsed\n buffer = [],\n // the total number of bytes currently in the buffer\n bufferSize = 0,\n i;\n\n MetadataStream.prototype.init.call(this);\n\n // calculate the text track in-band metadata track dispatch type\n // https://html.spec.whatwg.org/multipage/embedded-content.html#steps-to-expose-a-media-resource-specific-text-track\n this.dispatchType = StreamTypes.METADATA_STREAM_TYPE.toString(16);\n if (settings.descriptor) {\n for (i = 0; i < settings.descriptor.length; i++) {\n this.dispatchType += ('00' + settings.descriptor[i].toString(16)).slice(-2);\n }\n }\n\n this.push = function(chunk) {\n var tag, frameStart, frameSize, frame, i, frameHeader;\n if (chunk.type !== 'timed-metadata') {\n return;\n }\n\n // if data_alignment_indicator is set in the PES header,\n // we must have the start of a new ID3 tag. Assume anything\n // remaining in the buffer was malformed and throw it out\n if (chunk.dataAlignmentIndicator) {\n bufferSize = 0;\n buffer.length = 0;\n }\n\n // ignore events that don't look like ID3 data\n if (buffer.length === 0 &&\n (chunk.data.length < 10 ||\n chunk.data[0] !== 'I'.charCodeAt(0) ||\n chunk.data[1] !== 'D'.charCodeAt(0) ||\n chunk.data[2] !== '3'.charCodeAt(0))) {\n if (settings.debug) {\n console.log('Skipping unrecognized metadata packet');\n }\n return;\n }\n\n // add this chunk to the data we've collected so far\n\n buffer.push(chunk);\n bufferSize += chunk.data.byteLength;\n\n // grab the size of the entire frame from the ID3 header\n if (buffer.length === 1) {\n // the frame size is transmitted as a 28-bit integer in the\n // last four bytes of the ID3 header.\n // The most significant bit of each byte is dropped and the\n // results concatenated to recover the actual value.\n tagSize = parseSyncSafeInteger(chunk.data.subarray(6, 10));\n\n // ID3 reports the tag size excluding the header but it's more\n // convenient for our comparisons to include it\n tagSize += 10;\n }\n\n // if the entire frame has not arrived, wait for more data\n if (bufferSize < tagSize) {\n return;\n }\n\n // collect the entire frame so it can be parsed\n tag = {\n data: new Uint8Array(tagSize),\n frames: [],\n pts: buffer[0].pts,\n dts: buffer[0].dts\n };\n for (i = 0; i < tagSize;) {\n tag.data.set(buffer[0].data.subarray(0, tagSize - i), i);\n i += buffer[0].data.byteLength;\n bufferSize -= buffer[0].data.byteLength;\n buffer.shift();\n }\n\n // find the start of the first frame and the end of the tag\n frameStart = 10;\n if (tag.data[5] & 0x40) {\n // advance the frame start past the extended header\n frameStart += 4; // header size field\n frameStart += parseSyncSafeInteger(tag.data.subarray(10, 14));\n\n // clip any padding off the end\n tagSize -= parseSyncSafeInteger(tag.data.subarray(16, 20));\n }\n\n // parse one or more ID3 frames\n // http://id3.org/id3v2.3.0#ID3v2_frame_overview\n do {\n // determine the number of bytes in this frame\n frameSize = parseSyncSafeInteger(tag.data.subarray(frameStart + 4, frameStart + 8));\n if (frameSize < 1) {\n return console.log('Malformed ID3 frame encountered. Skipping metadata parsing.');\n }\n frameHeader = String.fromCharCode(tag.data[frameStart],\n tag.data[frameStart + 1],\n tag.data[frameStart + 2],\n tag.data[frameStart + 3]);\n\n\n frame = {\n id: frameHeader,\n data: tag.data.subarray(frameStart + 10, frameStart + frameSize + 10)\n };\n frame.key = frame.id;\n if (tagParsers[frame.id]) {\n tagParsers[frame.id](frame);\n if (frame.owner === 'com.apple.streaming.transportStreamTimestamp') {\n var\n d = frame.data,\n size = ((d[3] & 0x01) << 30) |\n (d[4] << 22) |\n (d[5] << 14) |\n (d[6] << 6) |\n (d[7] >>> 2);\n\n size *= 4;\n size += d[7] & 0x03;\n frame.timeStamp = size;\n this.trigger('timestamp', frame);\n }\n }\n tag.frames.push(frame);\n\n frameStart += 10; // advance past the frame header\n frameStart += frameSize; // advance past the frame body\n } while (frameStart < tagSize);\n this.trigger('data', tag);\n };\n};\nMetadataStream.prototype = new Stream();\n\nmodule.exports = MetadataStream;\n","'use strict';\n\nmodule.exports = {\n H264_STREAM_TYPE: 0x1B,\n ADTS_STREAM_TYPE: 0x0F,\n METADATA_STREAM_TYPE: 0x15\n};\n","/**\n * mux.js\n *\n * Copyright (c) 2016 Brightcove\n * All rights reserved.\n *\n * Accepts program elementary stream (PES) data events and corrects\n * decode and presentation time stamps to account for a rollover\n * of the 33 bit value.\n */\n\n'use strict';\n\nvar Stream = require('../utils/stream');\n\nvar MAX_TS = 8589934592;\n\nvar RO_THRESH = 4294967296;\n\nvar handleRollover = function(value, reference) {\n var direction = 1;\n\n if (value > reference) {\n // If the current timestamp value is greater than our reference timestamp and we detect a\n // timestamp rollover, this means the roll over is happening in the opposite direction.\n // Example scenario: Enter a long stream/video just after a rollover occurred. The reference\n // point will be set to a small number, e.g. 1. The user then seeks backwards over the\n // rollover point. In loading this segment, the timestamp values will be very large,\n // e.g. 2^33 - 1. Since this comes before the data we loaded previously, we want to adjust\n // the time stamp to be `value - 2^33`.\n direction = -1;\n }\n\n // Note: A seek forwards or back that is greater than the RO_THRESH (2^32, ~13 hours) will\n // cause an incorrect adjustment.\n while (Math.abs(reference - value) > RO_THRESH) {\n value += (direction * MAX_TS);\n }\n\n return value;\n};\n\nvar TimestampRolloverStream = function(type) {\n var lastDTS, referenceDTS;\n\n TimestampRolloverStream.prototype.init.call(this);\n\n this.type_ = type;\n\n this.push = function(data) {\n if (data.type !== this.type_) {\n return;\n }\n\n if (referenceDTS === undefined) {\n referenceDTS = data.dts;\n }\n\n data.dts = handleRollover(data.dts, referenceDTS);\n data.pts = handleRollover(data.pts, referenceDTS);\n\n lastDTS = data.dts;\n\n this.trigger('data', data);\n };\n\n this.flush = function() {\n referenceDTS = lastDTS;\n this.trigger('done');\n };\n\n};\n\nTimestampRolloverStream.prototype = new Stream();\n\nmodule.exports = {\n TimestampRolloverStream: TimestampRolloverStream,\n handleRollover: handleRollover\n};\n","module.exports = {\n generator: require('./mp4-generator'),\n Transmuxer: require('./transmuxer').Transmuxer,\n AudioSegmentStream: require('./transmuxer').AudioSegmentStream,\n VideoSegmentStream: require('./transmuxer').VideoSegmentStream,\n tools: require('../tools/mp4-inspector'),\n MP4ParserStream: require('./mp4-parser').MP4ParserStream,\n MP4BuilderStream: require('./mp4-parser').MP4BuilderStream,\n};\n","/**\n * mux.js\n *\n * Copyright (c) 2015 Brightcove\n * All rights reserved.\n *\n * Functions that generate fragmented MP4s suitable for use with Media\n * Source Extensions.\n */\n'use strict';\n\nvar UINT32_MAX = Math.pow(2, 32) - 1;\nvar box, cslg, dinf, esds, ftyp, edts, elst, mdat, mfhd, minf, moof, moov,\n mvex, mvhd, trak, tkhd, mdia, mdhd, hdlr, sdtp, stbl, stsd, styp, traf,\n trep, trex, trun, types, MAJOR_BRAND, MINOR_VERSION, AVC1_BRAND,\n VIDEO_HDLR, AUDIO_HDLR, HDLR_TYPES, VMHD, SMHD, DREF, STCO, STSC, STSZ,\n STTS, Uint8Array, DataView;\n\nUint8Array = window.Uint8Array;\nDataView = window.DataView;\n\n// pre-calculate constants\n(function() {\n var i;\n types = {\n avc1: [], // codingname\n avcC: [],\n btrt: [],\n cslg: [],\n dinf: [],\n dref: [],\n edts: [],\n elst: [],\n esds: [],\n ftyp: [],\n hdlr: [],\n mdat: [],\n mdhd: [],\n mdia: [],\n mfhd: [],\n minf: [],\n moof: [],\n moov: [],\n mp4a: [], // codingname\n mvex: [],\n mvhd: [],\n sdtp: [],\n smhd: [],\n stbl: [],\n stco: [],\n stsc: [],\n stsd: [],\n stsz: [],\n stts: [],\n styp: [],\n tfdt: [],\n tfhd: [],\n traf: [],\n trak: [],\n trun: [],\n trep: [],\n trex: [],\n tkhd: [],\n vmhd: []\n };\n\n // In environments where Uint8Array is undefined (e.g., IE8), skip set up so that we\n // don't throw an error\n if (typeof Uint8Array === 'undefined') {\n return;\n }\n\n for (i in types) {\n if (types.hasOwnProperty(i)) {\n types[i] = [\n i.charCodeAt(0),\n i.charCodeAt(1),\n i.charCodeAt(2),\n i.charCodeAt(3)\n ];\n }\n }\n\n MAJOR_BRAND = new Uint8Array([\n 'i'.charCodeAt(0),\n 's'.charCodeAt(0),\n 'o'.charCodeAt(0),\n 'm'.charCodeAt(0)\n ]);\n AVC1_BRAND = new Uint8Array([\n 'a'.charCodeAt(0),\n 'v'.charCodeAt(0),\n 'c'.charCodeAt(0),\n '1'.charCodeAt(0)\n ]);\n MINOR_VERSION = new Uint8Array([0, 0, 0, 1]);\n VIDEO_HDLR = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n 0x76, 0x69, 0x64, 0x65, // handler_type: 'vide'\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x56, 0x69, 0x64, 0x65,\n 0x6f, 0x48, 0x61, 0x6e,\n 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'VideoHandler'\n ]);\n AUDIO_HDLR = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n 0x73, 0x6f, 0x75, 0x6e, // handler_type: 'soun'\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x53, 0x6f, 0x75, 0x6e,\n 0x64, 0x48, 0x61, 0x6e,\n 0x64, 0x6c, 0x65, 0x72, 0x00 // name: 'SoundHandler'\n ]);\n HDLR_TYPES = {\n video: VIDEO_HDLR,\n audio: AUDIO_HDLR\n };\n DREF = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x01, // entry_count\n 0x00, 0x00, 0x00, 0x0c, // entry_size\n 0x75, 0x72, 0x6c, 0x20, // 'url' type\n 0x00, // version 0\n 0x00, 0x00, 0x01 // entry_flags\n ]);\n SMHD = new Uint8Array([\n 0x00, // version\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, // balance, 0 means centered\n 0x00, 0x00 // reserved\n ]);\n STCO = new Uint8Array([\n 0x00, // version\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00 // entry_count\n ]);\n STSC = STCO;\n STSZ = new Uint8Array([\n 0x00, // version\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x00, // sample_size\n 0x00, 0x00, 0x00, 0x00, // sample_count\n ]);\n STTS = STCO;\n VMHD = new Uint8Array([\n 0x00, // version\n 0x00, 0x00, 0x01, // flags\n 0x00, 0x00, // graphicsmode\n 0x00, 0x00,\n 0x00, 0x00,\n 0x00, 0x00 // opcolor\n ]);\n}());\n\nfunction uint32_to_arr(num){\n return [num>>>24&255, num>>>16&255, num>>>8&255, num&255];\n}\n\nfunction uint16_to_arr(num){\n return [num>>>8&255, num&255];\n}\n\nbox = function(type) {\n var\n payload = [],\n size = 0,\n i,\n result,\n view;\n\n for (i = 1; i < arguments.length; i++) {\n payload.push(arguments[i]);\n }\n\n i = payload.length;\n\n // calculate the total size we need to allocate\n while (i--) {\n size += payload[i].byteLength;\n }\n result = new Uint8Array(size + 8);\n view = new DataView(result.buffer, result.byteOffset, result.byteLength);\n view.setUint32(0, result.byteLength);\n result.set(type, 4);\n\n // copy the payload into the result\n for (i = 0, size = 8; i < payload.length; i++) {\n result.set(payload[i], size);\n size += payload[i].byteLength;\n }\n return result;\n};\n\ncslg = function(cslg) {\n var obj = {};\n for (var k in cslg)\n obj[k] = cslg[k]>>>0;\n return box(types.cslg, new Uint8Array([\n 0x00, // version\n 0x00, 0x00, 0x00, // flags\n (obj.ctts_shift >>> 24) & 0xFF,\n (obj.ctts_shift >>> 16) & 0xFF,\n (obj.ctts_shift >>> 8) & 0xFF,\n obj.ctts_shift & 0xFF,\n (obj.min_ctts >>> 24) & 0xFF,\n (obj.min_ctts >>> 16) & 0xFF,\n (obj.min_ctts >>> 8) & 0xFF,\n obj.min_ctts & 0xFF,\n (obj.max_ctts >>> 24) & 0xFF,\n (obj.max_ctts >>> 16) & 0xFF,\n (obj.max_ctts >>> 8) & 0xFF,\n obj.max_ctts & 0xFF,\n (obj.min_cts >>> 24) & 0xFF,\n (obj.min_cts >>> 16) & 0xFF,\n (obj.min_cts >>> 8) & 0xFF,\n obj.min_cts & 0xFF,\n (obj.max_cts >>> 24) & 0xFF,\n (obj.max_cts >>> 16) & 0xFF,\n (obj.max_cts >>> 8) & 0xFF,\n obj.max_cts & 0xFF,\n ]));\n};\n\ndinf = function() {\n return box(types.dinf, box(types.dref, DREF));\n};\n\nedts = function(track) {\n return box(types.edts, elst(track));\n};\n\nelst = function(track) {\n var count = track.edit_list.length, i;\n var bytes = [\n 0x00, // version\n 0x00, 0x00, 0x00\n ].concat(uint32_to_arr(count)); // entries count\n for (i = 0; i < count; i++)\n {\n bytes = bytes.concat(uint32_to_arr(track.edit_list[i].segment_duration))\n .concat(uint32_to_arr(track.edit_list[i].media_time))\n .concat(uint16_to_arr(track.edit_list[i].media_rate))\n .concat(uint16_to_arr(0)); // reserved\n }\n return box(types.elst, new Uint8Array(bytes));\n};\n\nesds = function(track) {\n return box(types.esds, new Uint8Array([\n 0x00, // version\n 0x00, 0x00, 0x00, // flags\n\n // ES_Descriptor\n 0x03, // tag, ES_DescrTag\n 0x19, // length\n 0x00, 0x00, // ES_ID\n 0x00, // streamDependenceFlag, URL_flag, reserved, streamPriority\n\n // DecoderConfigDescriptor\n 0x04, // tag, DecoderConfigDescrTag\n 0x11, // length\n 0x40, // object type\n 0x15, // streamType\n 0x00, 0x06, 0x00, // bufferSizeDB\n 0x00, 0x00, 0xda, 0xc0, // maxBitrate\n 0x00, 0x00, 0xda, 0xc0, // avgBitrate\n\n // DecoderSpecificInfo\n 0x05, // tag, DecoderSpecificInfoTag\n 0x02, // length\n // ISO/IEC 14496-3, AudioSpecificConfig\n // for samplingFrequencyIndex see ISO/IEC 13818-7:2006, 8.1.3.2.2, Table 35\n (track.audioobjecttype << 3) | (track.samplingfrequencyindex >>> 1),\n (track.samplingfrequencyindex << 7) | (track.channelcount << 3),\n 0x06, 0x01, 0x02 // GASpecificConfig\n ]));\n};\n\nftyp = function(opt) {\n opt = opt||{};\n var params = opt.compatible||[MAJOR_BRAND, AVC1_BRAND];\n params = params.slice(0);\n params.unshift(types.ftyp, opt.major||MAJOR_BRAND, MINOR_VERSION);\n return box.apply(null, params);\n};\n\nhdlr = function(type) {\n return box(types.hdlr, HDLR_TYPES[type]);\n};\nmdat = function(data) {\n return box(types.mdat, data);\n};\nmdhd = function(track) {\n var result = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x02, // creation_time\n 0x00, 0x00, 0x00, 0x03, // modification_time\n 0x00, 0x01, 0x5f, 0x90, // timescale, 90,000 \"ticks\" per second\n\n (track.duration >>> 24) & 0xFF,\n (track.duration >>> 16) & 0xFF,\n (track.duration >>> 8) & 0xFF,\n track.duration & 0xFF, // duration\n 0x55, 0xc4, // 'und' language (undetermined)\n 0x00, 0x00\n ]);\n\n // Use the sample rate from the track metadata, when it is\n // defined. The sample rate can be parsed out of an ADTS header, for\n // instance.\n if (track.samplerate) {\n result[12] = (track.samplerate >>> 24) & 0xFF;\n result[13] = (track.samplerate >>> 16) & 0xFF;\n result[14] = (track.samplerate >>> 8) & 0xFF;\n result[15] = (track.samplerate) & 0xFF;\n }\n\n return box(types.mdhd, result);\n};\nmdia = function(track) {\n return box(types.mdia, mdhd(track), hdlr(track.type), minf(track));\n};\nmfhd = function(sequenceNumber) {\n return box(types.mfhd, new Uint8Array([\n 0x00,\n 0x00, 0x00, 0x00, // flags\n (sequenceNumber & 0xFF000000) >> 24,\n (sequenceNumber & 0xFF0000) >> 16,\n (sequenceNumber & 0xFF00) >> 8,\n sequenceNumber & 0xFF, // sequence_number\n ]));\n};\nminf = function(track) {\n return box(types.minf,\n track.type === 'video' ? box(types.vmhd, VMHD) : box(types.smhd, SMHD),\n dinf(), stbl(track));\n};\nmoof = function(sequenceNumber, tracks, opt) {\n var\n trackFragments = [],\n i = tracks.length;\n opt = opt||{};\n // build traf boxes for each track fragment\n while (i--) {\n trackFragments[i] = traf(tracks[i], opt);\n }\n return box.apply(null, [\n types.moof,\n mfhd(sequenceNumber)\n ].concat(trackFragments));\n};\n/**\n * Returns a movie box.\n * @param tracks {array} the tracks associated with this movie\n * @see ISO/IEC 14496-12:2012(E), section 8.2.1\n */\nmoov = function(tracks, opt) {\n var\n i = tracks.length,\n boxes = [],\n duration = 0;\n opt = opt||{};\n while (i--) {\n boxes[i] = trak(tracks[i]);\n if (opt.set_duration) {\n duration = Math.max(duration,\n Math.floor(tracks[i].duration*90000/tracks[i].samplerate));\n }\n }\n duration = opt.duration||duration||0xFFFFFFFF;\n return box.apply(null, [types.moov, mvhd(duration)].concat(boxes)\n .concat(mvex(tracks)));\n};\nmvex = function(tracks) {\n var\n i = tracks.length,\n boxes = [];\n\n while (i--) {\n boxes[i] = trex(tracks[i]);\n if (tracks[i].cslg && tracks[i].cslg.max_cts) {\n boxes.push(trep(tracks[i]));\n }\n }\n return box.apply(null, [types.mvex].concat(boxes));\n};\nmvhd = function(duration) {\n var\n bytes = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x01, // creation_time\n 0x00, 0x00, 0x00, 0x02, // modification_time\n 0x00, 0x01, 0x5f, 0x90, // timescale, 90,000 \"ticks\" per second\n (duration & 0xFF000000) >> 24,\n (duration & 0xFF0000) >> 16,\n (duration & 0xFF00) >> 8,\n duration & 0xFF, // duration\n 0x00, 0x01, 0x00, 0x00, // 1.0 rate\n 0x01, 0x00, // 1.0 volume\n 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x01, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n 0xff, 0xff, 0xff, 0xff // next_track_ID\n ]);\n return box(types.mvhd, bytes);\n};\n\nsdtp = function(track) {\n var\n samples = track.samples || [],\n bytes = new Uint8Array(4 + samples.length),\n flags,\n i;\n\n // leave the full box header (4 bytes) all zero\n\n // write the sample table\n for (i = 0; i < samples.length; i++) {\n flags = samples[i].flags;\n\n bytes[i + 4] = (flags.isLeading << 6) |\n (flags.dependsOn << 4) |\n (flags.isDependedOn << 2) |\n (flags.hasRedundancy);\n }\n\n return box(types.sdtp,\n bytes);\n};\n\nstbl = function(track) {\n return box(types.stbl,\n stsd(track),\n box(types.stts, STTS),\n box(types.stsc, STSC),\n box(types.stsz, STSZ),\n box(types.stco, STCO));\n};\n\n(function() {\n var videoSample, audioSample;\n\n stsd = function(track) {\n\n return box(types.stsd, new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n 0x00, 0x00, 0x00, 0x01\n ]), track.type === 'video' ? videoSample(track) : audioSample(track));\n };\n\n videoSample = function(track) {\n var\n sps = track.sps || [],\n pps = track.pps || [],\n sequenceParameterSets = [],\n pictureParameterSets = [],\n i;\n\n // assemble the SPSs\n for (i = 0; i < sps.length; i++) {\n sequenceParameterSets.push((sps[i].byteLength & 0xFF00) >>> 8);\n sequenceParameterSets.push((sps[i].byteLength & 0xFF)); // sequenceParameterSetLength\n sequenceParameterSets = sequenceParameterSets.concat(Array.prototype.slice.call(sps[i])); // SPS\n }\n\n // assemble the PPSs\n for (i = 0; i < pps.length; i++) {\n pictureParameterSets.push((pps[i].byteLength & 0xFF00) >>> 8);\n pictureParameterSets.push((pps[i].byteLength & 0xFF));\n pictureParameterSets = pictureParameterSets.concat(Array.prototype.slice.call(pps[i]));\n }\n\n return box(types.avc1, new Uint8Array([\n 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, // data_reference_index\n 0x00, 0x00, // pre_defined\n 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, // pre_defined\n (track.width & 0xff00) >> 8,\n track.width & 0xff, // width\n (track.height & 0xff00) >> 8,\n track.height & 0xff, // height\n 0x00, 0x48, 0x00, 0x00, // horizresolution\n 0x00, 0x48, 0x00, 0x00, // vertresolution\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, // frame_count\n 0x13,\n 0x76, 0x69, 0x64, 0x65,\n 0x6f, 0x6a, 0x73, 0x2d,\n 0x63, 0x6f, 0x6e, 0x74,\n 0x72, 0x69, 0x62, 0x2d,\n 0x68, 0x6c, 0x73, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, // compressorname\n 0x00, 0x18, // depth = 24\n 0x11, 0x11 // pre_defined = -1\n ]), box(types.avcC, new Uint8Array([\n 0x01, // configurationVersion\n track.profileIdc, // AVCProfileIndication\n track.profileCompatibility, // profile_compatibility\n track.levelIdc, // AVCLevelIndication\n 0xff // lengthSizeMinusOne, hard-coded to 4 bytes\n ].concat([\n sps.length|0xE0 // reserved (high 3 bits) | numOfSequenceParameterSets\n ]).concat(sequenceParameterSets).concat([\n pps.length // numOfPictureParameterSets\n ]).concat(pictureParameterSets))), // \"PPS\"\n box(types.btrt, new Uint8Array([\n 0x00, 0x1c, 0x9c, 0x80, // bufferSizeDB\n 0x00, 0x2d, 0xc6, 0xc0, // maxBitrate\n 0x00, 0x2d, 0xc6, 0xc0\n ])) // avgBitrate\n );\n };\n\n audioSample = function(track) {\n return box(types.mp4a, new Uint8Array([\n\n // SampleEntry, ISO/IEC 14496-12\n 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, // reserved\n 0x00, 0x01, // data_reference_index\n\n // AudioSampleEntry, ISO/IEC 14496-12\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, 0x00, 0x00, // reserved\n (track.channelcount & 0xff00) >> 8,\n (track.channelcount & 0xff), // channelcount\n\n (track.samplesize & 0xff00) >> 8,\n (track.samplesize & 0xff), // samplesize\n 0x00, 0x00, // pre_defined\n 0x00, 0x00, // reserved\n\n (track.samplerate & 0xff00) >> 8,\n (track.samplerate & 0xff),\n 0x00, 0x00 // samplerate, 16.16\n\n // MP4AudioSampleEntry, ISO/IEC 14496-14\n ]), esds(track));\n };\n}());\n\nstyp = function() {\n return box(types.styp, MAJOR_BRAND, MINOR_VERSION, MAJOR_BRAND);\n};\n\ntkhd = function(track) {\n var duration = track.duration;\n if (track.samplerate) {\n // tkhd duration should be in movie scale\n duration = Math.floor(duration*90000/track.samplerate);\n }\n var result = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x07, // flags\n 0x00, 0x00, 0x00, 0x00, // creation_time\n 0x00, 0x00, 0x00, 0x00, // modification_time\n (track.id & 0xFF000000) >> 24,\n (track.id & 0xFF0000) >> 16,\n (track.id & 0xFF00) >> 8,\n track.id & 0xFF, // track_ID\n 0x00, 0x00, 0x00, 0x00, // reserved\n (track.duration & 0xFF000000) >> 24,\n (track.duration & 0xFF0000) >> 16,\n (track.duration & 0xFF00) >> 8,\n track.duration & 0xFF, // duration\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00, // reserved\n 0x00, 0x00, // layer\n 0x00, 0x00, // alternate_group\n +(track.type=='audio'), 0x00, // non-audio track volume\n 0x00, 0x00, // reserved\n 0x00, 0x01, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x01, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x40, 0x00, 0x00, 0x00, // transformation: unity matrix\n (track.width & 0xFF00) >> 8,\n track.width & 0xFF,\n 0x00, 0x00, // width\n (track.height & 0xFF00) >> 8,\n track.height & 0xFF,\n 0x00, 0x00 // height\n ]);\n\n return box(types.tkhd, result);\n};\n\n/**\n * Generate a track fragment (traf) box. A traf box collects metadata\n * about tracks in a movie fragment (moof) box.\n */\ntraf = function(track, opt) {\n var trackFragmentHeader, trackFragmentDecodeTime,\n trackFragmentRun, sampleDependencyTable, dataOffset,\n upperWordBaseMediaDecodeTime, lowerWordBaseMediaDecodeTime;\n opt = opt||{};\n trackFragmentHeader = box(types.tfhd, new Uint8Array([\n 0x00, // version 0\n opt.no_multi_init ? 0x02 : 0x00, 0x00, 0x3a, // flags\n (track.id & 0xFF000000) >> 24,\n (track.id & 0xFF0000) >> 16,\n (track.id & 0xFF00) >> 8,\n (track.id & 0xFF), // track_ID\n 0x00, 0x00, 0x00, 0x01, // sample_description_index\n 0x00, 0x00, 0x00, 0x00, // default_sample_duration\n 0x00, 0x00, 0x00, 0x00, // default_sample_size\n 0x00, 0x00, 0x00, 0x00 // default_sample_flags\n ]));\n\n upperWordBaseMediaDecodeTime = Math.floor(track.baseMediaDecodeTime / (UINT32_MAX + 1));\n lowerWordBaseMediaDecodeTime = Math.floor(track.baseMediaDecodeTime % (UINT32_MAX + 1));\n trackFragmentDecodeTime = box(types.tfdt, new Uint8Array([\n 0x01, // version 1\n 0x00, 0x00, 0x00, // flags\n // baseMediaDecodeTime\n (upperWordBaseMediaDecodeTime >>> 24) & 0xFF,\n (upperWordBaseMediaDecodeTime >>> 16) & 0xFF,\n (upperWordBaseMediaDecodeTime >>> 8) & 0xFF,\n upperWordBaseMediaDecodeTime & 0xFF,\n (lowerWordBaseMediaDecodeTime >>> 24) & 0xFF,\n (lowerWordBaseMediaDecodeTime >>> 16) & 0xFF,\n (lowerWordBaseMediaDecodeTime >>> 8) & 0xFF,\n lowerWordBaseMediaDecodeTime & 0xFF\n ]));\n\n // the data offset specifies the number of bytes from the start of\n // the containing moof to the first payload byte of the associated\n // mdat\n dataOffset = (32 + // tfhd\n 20 + // tfdt\n 8 + // traf header\n 16 + // mfhd\n 8 + // moof header\n 8); // mdat header\n\n // audio tracks require less metadata\n if (track.type === 'audio') {\n trackFragmentRun = trun(track, dataOffset);\n return box(types.traf,\n trackFragmentHeader,\n trackFragmentDecodeTime,\n trackFragmentRun);\n }\n\n // video tracks should contain an independent and disposable samples\n // box (sdtp)\n // generate one and adjust offsets to match\n sampleDependencyTable = sdtp(track);\n trackFragmentRun = trun(track,\n sampleDependencyTable.length + dataOffset);\n return box(types.traf,\n trackFragmentHeader,\n trackFragmentDecodeTime,\n trackFragmentRun,\n sampleDependencyTable);\n};\n\n/**\n * Generate a track box.\n * @param track {object} a track definition\n * @return {Uint8Array} the track box\n */\ntrak = function(track) {\n track.duration = track.duration || 0xffffffff;\n var param = [types.trak, tkhd(track), mdia(track)];\n if (track.edit_list && track.edit_list.length)\n param.splice(2, 0, edts(track));\n return box.apply(null, param);\n};\n\ntrep = function(track){\n return box(types.trep, new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n (track.id & 0xFF000000) >> 24,\n (track.id & 0xFF0000) >> 16,\n (track.id & 0xFF00) >> 8,\n (track.id & 0xFF), // track_ID\n ]), cslg(track.cslg));\n};\n\ntrex = function(track) {\n var result = new Uint8Array([\n 0x00, // version 0\n 0x00, 0x00, 0x00, // flags\n (track.id & 0xFF000000) >> 24,\n (track.id & 0xFF0000) >> 16,\n (track.id & 0xFF00) >> 8,\n (track.id & 0xFF), // track_ID\n 0x00, 0x00, 0x00, 0x01, // default_sample_description_index\n 0x00, 0x00, 0x00, 0x00, // default_sample_duration\n 0x00, 0x00, 0x00, 0x00, // default_sample_size\n 0x00, 0x01, 0x00, 0x01 // default_sample_flags\n ]);\n // the last two bytes of default_sample_flags is the sample\n // degradation priority, a hint about the importance of this sample\n // relative to others. Lower the degradation priority for all sample\n // types other than video.\n if (track.type !== 'video') {\n result[result.length - 1] = 0x00;\n }\n\n return box(types.trex, result);\n};\n\ntrun = function(track, offset) {\n function get_flags(sample){\n return ('duration' in sample&&0x1)|('size' in sample&&0x2)|\n ('flags' in sample&&0x4)|('compositionTimeOffset' in sample&&0x8);\n }\n function trun_header(samples, offset, flags) {\n return [\n 0x00, // version 0\n 0x00,\n flags,\n 0x01, // flags\n (samples.length & 0xFF000000) >>> 24,\n (samples.length & 0xFF0000) >>> 16,\n (samples.length & 0xFF00) >>> 8,\n samples.length & 0xFF, // sample_count\n (offset & 0xFF000000) >>> 24,\n (offset & 0xFF0000) >>> 16,\n (offset & 0xFF00) >>> 8,\n offset & 0xFF // data_offset\n ];\n }\n var samples = track.samples||[];\n var flags = get_flags(samples[0]||{});\n offset += 20+4*samples.length*((flags>>3&1)+(flags>>2&1)+(flags>>1&1)+\n (flags&1));\n var bytes = trun_header(samples, offset, flags);\n var was_neg = false;\n for (var i=0; i>24&0xFF, sample.duration>>16&0xFF,\n sample.duration>>8&0xFF, sample.duration&0xFF); // sample_duration\n }\n if (flags&2){\n bytes.push(sample.size>>24&0xFF, sample.size>>16&0xFF,\n sample.size>>8&0xFF, sample.size&0xFF); // sample_size\n }\n if (flags&4){\n bytes.push(sample.flags.isLeading<<2|sample.flags.dependsOn,\n sample.flags.isDependedOn<<6|sample.flags.hasRedundancy<<4|\n sample.flags.paddingValue<<1|sample.flags.isNonSyncSample,\n sample.flags.degradationPriority>>8&0xFF,\n sample.flags.degradationPriority&0xFF); // sample_flags\n }\n if (flags&8){\n was_neg = was_neg||sample.compositionTimeOffset<0;\n bytes.push(sample.compositionTimeOffset>>24&0xFF,\n sample.compositionTimeOffset>>16&0xFF,\n sample.compositionTimeOffset>>8&0xFF,\n sample.compositionTimeOffset&0xFF); // sample_composition_time_offset\n }\n }\n bytes[0] = +!!was_neg;\n return box(types.trun, new Uint8Array(bytes));\n};\n\nmodule.exports = {\n ftyp: ftyp,\n mdat: mdat,\n moof: moof,\n moov: moov,\n initSegment: function(tracks, opt) {\n var\n fileType = ftyp(opt),\n movie = moov(tracks, opt),\n result;\n\n result = new Uint8Array(fileType.byteLength + movie.byteLength);\n result.set(fileType);\n result.set(movie, fileType.byteLength);\n return result;\n }\n};\n","'use strict';\n\nvar Stream = require('../utils/stream.js');\nvar mp4 = require('./mp4-generator.js');\nvar sample_type={vide: 'video', soun: 'audio'};\nvar full_box = ['meta', 'mvhd', 'tkhd', 'mdhd', 'smhd', 'vmhd', 'dref',\n 'hdlr', 'stsd', 'esds', 'stts', 'stps', 'stss', 'ctts', 'stsc', 'stsz',\n 'stco', 'esds', 'elst', 'nmhd', 'cslg', 'sdtp', 'co64'];\n// tgas, elng - non-standard unknown boxes seen in some videos\nvar raw_copy = ['udta', 'smhd', 'vmhd', 'dref', 'iods', 'btrt', 'pasp', 'clap',\n 'uuid', 'colr', 'sbgp', 'sgpd', 'gmhd', 'tref', 'nmhd', 'svcC', 'hmhd',\n 'fiel', 'tapt', 'load', 'meta', 'sefd', 'beam', 'tgas', 'elng'];\nvar containers = {\n trak: {name: 'track_info', multi: 1},\n edts: {name: 'edit_list'},\n exts: {name: 'edit_list'},\n mdia: {name: 'media_box'},\n minf: {name: 'media_info'},\n dinf: {name: 'data_info'},\n stbl: {name: 'sample_table'},\n};\nfunction byte_to_hex(bt){ return ('0'+bt.toString(16)).slice(-2); }\nfunction int_to_str(tp){\n return String.fromCharCode(tp>>24&255, tp>>16&255, tp>>8&255, tp&255); }\nfunction getUint64(view, ptr){\n return view.getUint32(ptr+4)+view.getUint32(ptr)*0x100000000; }\nfunction getInt64(view, ptr){\n var hib = view.getUint8(ptr);\n if (hib<128)\n return getUint64(view, ptr);\n return view.getUint32(ptr+4)+0x100000000*(view.getUint32(ptr)-0x100000000);\n}\nfunction Bit_reader(view, ptr, size){\n var pos = 0, len = size*8;\n this.read = function(count, peek){\n var ret = 0, p = pos>>3, r = 7-pos%8;\n for (var i = 0, c = view.getUint8(p+ptr); i>r)&1);\n if (r)\n continue;\n p++;\n r = 8;\n c = view.getUint8(p+ptr);\n }\n if (!peek)\n pos += count;\n return ret;\n };\n this.bits = function(){ return len-pos; };\n}\nvar Box_parser = function(){};\nBox_parser.prototype = {};\nBox_parser.prototype.header = function(opt){\n while (opt.ptr+opt.buffer.b_pos>=opt.branch.last)\n {\n if (opt.branch._id=='movie_box')\n opt.root.h_parsed = true;\n opt.branch = opt.branch.parent;\n }\n opt.type = null;\n opt.offset = 8;\n if (opt.buffer.b_size-opt.ptr<8)\n return (opt.offset = 0);\n opt.size = opt.view.getUint32(opt.ptr);\n if (opt.size==1)\n {\n opt.offset = 16;\n if (opt.buffer.b_size-opt.ptr<16)\n return (opt.offset = 0);\n opt.size = (opt.view.getUint32(opt.ptr+8)<<32)+\n opt.view.getUint32(opt.ptr+12);\n }\n opt.type = int_to_str(opt.view.getUint32(opt.ptr+4));\n if (full_box.includes(opt.type))\n {\n opt.offset += 4;\n if (opt.buffer.b_size-opt.ptr>>24;\n opt.flags = extra&&0xFFFFFF;\n }\n opt.size -= opt.offset;\n opt.ptr += opt.offset;\n};\nBox_parser.prototype.parse = function(opt){\n if (!this[opt.type])\n throw new Error('Unknown box type: '+opt.type);\n this[opt.type](opt);\n};\nraw_copy.forEach(function(cont){\n Box_parser.prototype[cont] = function(opt){\n var data = opt.branch[cont] = new Uint8Array(opt.size);\n data.set(opt.buffer._buff.subarray(opt.ptr, opt.ptr+opt.size));\n };\n});\nObject.keys(containers).forEach(function(cont){\n Box_parser.prototype[cont] = function(opt){\n var elm = containers[cont];\n opt.branch[elm.name] = opt.branch[elm.name]||(elm.multi ? [] : {});\n var new_branch = opt.branch[elm.name];\n if (elm.multi)\n {\n new_branch.push({});\n new_branch = new_branch[new_branch.length-1];\n }\n new_branch.parent = opt.branch;\n new_branch.last = opt.buffer.b_pos+opt.ptr+opt.size;\n new_branch._id = elm.name;\n opt.branch = new_branch;\n opt.size = 0;\n };\n});\nBox_parser.prototype.moov = function(opt){\n var new_branch = opt.branch.movie_box = opt.branch.movie_box||{};\n new_branch.parent = opt.branch;\n new_branch.last = opt.buffer.b_pos+opt.ptr+opt.size;\n new_branch._id = 'movie_box';\n // only ftyp can exist prior to moov in a file beginning\n if (opt.buffer.b_pos<256)\n opt.branch.start_hdr_sz = opt.size;\n else\n opt.branch.end_hdr_sz = opt.size;\n opt.branch = new_branch;\n opt.size = 0;\n};\nfunction get_hd_times(opt){\n var view = opt.view, ptr = opt.ptr, is_tk = opt.type=='tkhd';\n if (!opt.ver)\n {\n return [view.getUint32(ptr), view.getUint32(ptr+4),\n view.getUint32(ptr+8), view.getUint32(ptr+(is_tk ? 16 : 12))];\n }\n return [getUint64(view, ptr), getUint64(view, ptr+8),\n view.getUint32(ptr+16), getUint64(view, ptr+(is_tk ? 24 : 20))];\n\n}\nfunction get_table(view, ptr, cnt, tbl){\n for (var i=0; i>10|96, lang>>5&31|96, lang&31|96);\n};\nBox_parser.prototype.elst = function(opt){\n var view = opt.view, ptr = opt.ptr+4;\n var count = view.getUint32(opt.ptr);\n opt.branch.list = [];\n for (var i=0; i>6&2)+(flags>>4&2);\n break;\n case 4: // DecoderConfigDescrTag\n elm.obj_t = view.getUint8(ptr);\n elm.str_t = view.getUint8(ptr+1)&0x3F;\n ptr += 13;\n break;\n case 5: // DecoderSpecificInfoTag\n var ext_type, br = new Bit_reader(view, ptr, sz);\n elm.aot = br.read(5);\n if (elm.aot==31)\n elm.aot = 32+br.read(6);\n elm.freq = br.read(4);\n if (elm.freq==15)\n elm.freq = br.read(24);\n elm.channel = br.read(4);\n // Read ext configuration for explicitly signaled HE-AAC profiles\n // 5 = HEv1, 29 = HEv2\n if (elm.aot==5 || elm.aot==29)\n {\n ext_type = 5;\n if ((elm.ext_freq_index = br.read(4))==0xf)\n elm.ext_freq = br.read(24);\n // With HE extensions now known, determine underlying profile.\n elm.aot = br.read(5);\n if (elm.aot==31)\n elm.aot = 32+br.read(6);\n }\n if (ext_type!=5 && elm.aot!=36)\n {\n while (br.bits()>=16)\n {\n if (br.read(11, 1)==0x2b7) // sync_ext_type\n {\n br.read(11);\n if (br.read(5)==5) // type_ext\n {\n if (br.read(1)) // sbr\n {\n if (br.read(4)==0xf) // sr_ext\n br.read(24);\n if (br.bits()>=12 && br.read(11)==0x548 &&\n br.read(1)!=1)\n {\n elm.dsi = 5;\n }\n }\n }\n }\n else\n br.read(1);\n }\n }\n ptr += sz;\n break;\n default:\n ptr += sz;\n }\n }\n};\nBox_parser.prototype.stsd = function(opt){\n var view = opt.view, count = view.getUint32(opt.ptr);\n var handler = opt.branch.parent.parent.handler, i, j;\n opt.branch.list = {};\n opt.ptr += 4;\n for (i=0; i>2&3,\n dep: bt>>4&3,\n lead: bt>>6&3,\n };\n }\n};\nBox_parser.prototype.stsz = function(opt){\n var size = opt.view.getUint32(opt.ptr);\n opt.branch.s_sz = [];\n opt.branch.s_count = opt.view.getUint32(opt.ptr+4);\n if (!size)\n get_table(opt.view, opt.ptr+8, opt.branch.s_count, opt.branch.s_sz);\n else\n {\n for (var i=0; i>>1,\n dr.esds.freq<<7|dr.esds.channel<<3]);\n }\n else\n {\n event_elm.codec = 'avc1.'+byte_to_hex(dr.avcc.avc_p_i)+\n byte_to_hex(dr.avcc.prof_compat)+byte_to_hex(dr.avcc.avc_l_i);\n var info = [1, dr.avcc.avc_p_i, dr.avcc.avc_prof_compat,\n dr.avcc.avc_l_i, 255, dr.avcc.sps.length+224];\n dr.avcc.sps.forEach(function(e){\n info = info.concat([e.nal.length>>8, e.nal.length&255]);\n Array.prototype.push.apply(info, e.nal);\n });\n info.push(dr.avcc.pps.length);\n dr.avcc.pps.forEach(function(e){\n info = info.concat([e.nal.length>>8, e.nal.length&255]);\n Array.prototype.push.apply(info, e.nal);\n });\n event_elm.s_i = new Uint8Array(info);\n }\n if (event_elm.edit_list)\n {\n event_elm.edit_list.forEach(function(e){\n if (elm.type!='soun')\n e.media_time = Math.floor(e.media_time*90000/elm.ts);\n e.segment_duration = Math.floor(e.segment_duration*90000/\n opt.root.movie_box.mv_hdr.time_scale);\n });\n }\n if (event_elm.cslg)\n {\n for (var k in event_elm.cslg)\n event_elm.cslg[k] = Math.floor(event_elm.cslg[k]*90000/elm.ts);\n }\n event.tracks.push(event_elm);\n });\n opt.stream.trigger('data', event);\n};\nChunk_parser.prototype.parse = function(opt){\n if (!this.s_info)\n this.process(opt);\n var b_start = opt.buffer.b_pos;\n var b_end = opt.buffer.b_size+b_start;\n var pc = -1, max_dcd = 0, i;\n var v_fin = false;\n while (pc)\n {\n pc = 0;\n for (i=0; i=b_start && pos+sz<=b_end)\n {\n this.s_p[i].s++;\n pc++;\n var sample = {trackId: sinfo.id};\n sample.type = sample_type[sinfo.type];\n sample.dts = time[sn];\n sample.pts = sample.dts+(sinfo.s_ctts[sn]||0);\n sample.duration = sn==time.length-1 ?\n time[sn]-time[sn-1] : time[sn+1]-time[sn];\n sample.size = sz;\n this.s_p[i].max_t = sample.dts/sinfo.ts;\n sample.data = opt.buffer._buff.subarray(pos-b_start,\n pos+sz-b_start);\n sample.dr = sinfo.s_list[sinfo.s_dri[sn]];\n sample.ts = sinfo.ts;\n sample.synced = !sinfo.s_sync.length ||\n sinfo.s_sync.includes(sn+1);\n sample.sn = sn;\n sample.dep = sinfo.s_dep[sn];\n if (sinfo.type=='vide' && (this.break_on_count ?\n sn%this.frag_size===0 : sn&&sample.synced))\n {\n opt.stream.flush();\n }\n opt.stream.trigger('data', sample);\n max_dcd = pos+sz-b_start;\n }\n else if (pos+sz>b_end&&i==this.v_idx)\n v_fin = true;\n }\n }\n if (max_dcd)\n opt.buffer.advance(max_dcd);\n var new_pos = Infinity;\n for (i=0; i=b_start&&new_pos0;\n var i_soun = elm.type=='soun';\n var scale = elm.ts/90000;\n l = 0;\n r = i_ss ? elm.s_sync.length : elm.s_time.length;\n tt = Math.floor(target*scale);\n while (l>1;\n sn = i_ss ? elm.s_sync[m]-1 : m;\n if ((m_time = elm.s_time[sn]+(elm.s_ctts[sn]|0))>tt)\n r = m;\n else\n {\n l = m;\n if (m_time==tt)\n break;\n }\n }\n var res_sn = i_ss ? elm.s_sync[l]-1 : l;\n tt = m_time = elm.s_time[res_sn]+(elm.s_ctts[res_sn]|0);\n if (!i_ss&&elm.s_ctts.length)\n {\n for (sn=l-1; sn>l-10; sn--)\n {\n if (elm.s_time[sn]+(elm.s_ctts[sn]|0)>tt)\n res_sn = sn;\n }\n for (sn=res_sn; sn ((elm.s_cslg&&elm.s_cslg.min_ctts)|0) &&\n m_timethis._buff.length)\n {\n _newbuff = new Uint8Array(2*this._buff.length);\n _newbuff.set(this._buff);\n this._buff = _newbuff;\n }\n if (this.pos=this.b_pos)\n {\n _newbuff = new Uint8Array(Math.max(this.pos+c_len,\n this.b_pos+this.b_size)-Math.min(this.pos, this.b_pos));\n if (this.pos<=this.b_pos)\n {\n _newbuff.set(chunk);\n if (this.pos+c_lenthis.buffer.b_size)\n break;\n this.b_parser.parse(opt);\n opt.ptr += opt.size;\n }\n if (this.metadata.h_parsed)\n this.buffer.pos = this.c_parser.parse(opt);\n else\n {\n this.buffer.advance(opt.ptr-opt.offset);\n this.buffer.pos = opt.type=='mdat' ?\n opt.ptr+opt.size : this.buffer.b_pos+this.buffer.b_size;\n }\n return this.buffer.pos;\n};\nMP4ParserStream.prototype.seek = function(time, use_ssync){\n this.trigger('data', {type: 'seek'});\n var seek_info = this.c_parser.seek(time, use_ssync);\n this.buffer.pos = seek_info.offset;\n return seek_info;\n};\n\nvar AudioFilterStream = function(){\n if (!(this instanceof AudioFilterStream))\n return new AudioFilterStream();\n AudioFilterStream.prototype.init.call(this);\n};\nAudioFilterStream.prototype = new Stream();\nAudioFilterStream.prototype.constructor = AudioFilterStream;\nAudioFilterStream.prototype.push = function(packet){\n if (packet.type!='audio')\n return;\n var scale = 90000/packet.ts;\n packet.pts = Math.floor(packet.pts*scale);\n packet.dts = Math.floor(packet.dts*scale);\n this.trigger('data', {\n type: 'audio',\n samplerate: packet.dr.s_rate,\n samplesize: packet.dr.s_size,\n audioobjecttype: packet.dr.esds.aot,\n samplingfrequencyindex: packet.dr.esds.freq,\n channelcount: packet.dr.esds.channel,\n ts: packet.ts,\n dts: packet.dts,\n pts: packet.pts,\n data: new Uint8Array(packet.data),\n });\n};\n\nvar VideoFilterStream = function(){\n if (!(this instanceof VideoFilterStream))\n return new VideoFilterStream();\n VideoFilterStream.prototype.init.call(this);\n this.synced = false;\n this.au = new Uint8Array([0x09, 0xF0]);\n};\nVideoFilterStream.prototype = new Stream();\nVideoFilterStream.prototype.constructor = VideoFilterStream;\nVideoFilterStream.prototype.flush = function(){\n this.dr = null;\n this.synced = false;\n this.trigger('done');\n};\nVideoFilterStream.prototype.push = function(packet){\n if (packet.type!='video')\n return;\n var pos = 0, i;\n var view = new DataView(packet.data.buffer, packet.data.byteOffset,\n packet.data.byteLength);\n var scale = 90000/packet.ts;\n packet.pts = Math.floor(packet.pts*scale);\n packet.dts = Math.floor(packet.dts*scale);\n this.trigger('data', {\n trackId: packet.trackId,\n pts: packet.pts,\n dts: packet.dts,\n data: this.au,\n nalUnitType: 'access_unit_delimiter_rbsp',\n });\n if (this.dr!=packet.dr||!this.synced)\n {\n this.dr = packet.dr;\n // pseudo-nals for config info\n if (this.dr.avcc.n_sps)\n {\n for (i=0; i= earliestAllowedDts) {\n return adtsFrames;\n }\n\n // We will need to recalculate the earliest segment Dts\n track.minSegmentDts = Infinity;\n\n return adtsFrames.filter(function(currentFrame) {\n // If this is an allowed frame, keep it and record it's Dts\n if (currentFrame.dts >= earliestAllowedDts) {\n track.minSegmentDts = Math.min(track.minSegmentDts, currentFrame.dts);\n track.minSegmentPts = track.minSegmentDts;\n return true;\n }\n // Otherwise, discard it\n return false;\n });\n };\n\n // generate the track's raw mdat data from an array of frames\n this.generateSampleTable_ = function(frames) {\n var\n i,\n currentFrame,\n samples = [];\n\n for (i = 0; i < frames.length; i++) {\n currentFrame = frames[i];\n samples.push({\n size: currentFrame.data.byteLength,\n duration: 1024 // For AAC audio, all samples contain 1024 samples\n });\n }\n return samples;\n };\n\n // generate the track's sample table from an array of frames\n this.concatenateFrameData_ = function(frames) {\n var\n i,\n currentFrame,\n dataOffset = 0,\n data = new Uint8Array(sumFrameByteLengths(frames));\n\n for (i = 0; i < frames.length; i++) {\n currentFrame = frames[i];\n\n data.set(currentFrame.data, dataOffset);\n dataOffset += currentFrame.data.byteLength;\n }\n return data;\n };\n};\n\nAudioSegmentStream.prototype = new Stream();\n\n/**\n * Constructs a single-track, ISO BMFF media segment from H264 data\n * events. The output of this stream can be fed to a SourceBuffer\n * configured with a suitable initialization segment.\n * @param track {object} track metadata configuration\n */\nVideoSegmentStream = function(track) {\n var\n sequenceNumber = 0,\n nalUnits = [],\n config,\n pps;\n\n VideoSegmentStream.prototype.init.call(this);\n\n delete track.minPTS;\n\n this.gopCache_ = [];\n\n this.push = function(nalUnit) {\n collectDtsInfo(track, nalUnit);\n\n // record the track config\n if (nalUnit.nalUnitType === codecs.h264.unitTypes.seq_parameter_set_rbsp && !config) {\n config = nalUnit.config;\n track.sps = [nalUnit.data];\n VIDEO_PROPERTIES.forEach(function(prop) {\n track[prop] = config[prop];\n }, this);\n }\n\n if (nalUnit.nalUnitType === codecs.h264.unitTypes.pic_parameter_set_rbsp &&\n !pps) {\n pps = nalUnit.data;\n track.pps = [nalUnit.data];\n }\n\n // buffer video until flush() is called\n nalUnits.push(nalUnit);\n };\n\n this.flush = function() {\n var\n frames,\n gopForFusion,\n gops,\n moof,\n mdat,\n boxes;\n\n // Throw away nalUnits at the start of the byte stream until\n // we find the first AUD\n while (nalUnits.length && nalUnits[0].nalUnitType !== codecs.h264.unitTypes.access_unit_delimiter_rbsp) {\n nalUnits.shift();\n }\n\n // Return early if no video data has been observed\n if (nalUnits.length === 0) {\n this.resetStream_();\n this.trigger('done', 'VideoSegmentStream');\n return;\n }\n\n // Organize the raw nal-units into arrays that represent\n // higher-level constructs such as frames and gops\n // (group-of-pictures)\n frames = this.groupNalsIntoFrames_(nalUnits);\n gops = this.groupFramesIntoGops_(frames);\n\n // If the first frame of this fragment is not a keyframe we have\n // a problem since MSE (on Chrome) requires a leading keyframe.\n //\n // We have two approaches to repairing this situation:\n // 1) GOP-FUSION:\n // This is where we keep track of the GOPS (group-of-pictures)\n // from previous fragments and attempt to find one that we can\n // prepend to the current fragment in order to create a valid\n // fragment.\n // 2) KEYFRAME-PULLING:\n // Here we search for the first keyframe in the fragment and\n // throw away all the frames between the start of the fragment\n // and that keyframe. We then extend the duration and pull the\n // PTS of the keyframe forward so that it covers the time range\n // of the frames that were disposed of.\n //\n // #1 is far prefereable over #2 which can cause \"stuttering\" but\n // requires more things to be just right.\n if (!gops[0][0].keyFrame) {\n // Search for a gop for fusion from our gopCache\n gopForFusion = this.getGopForFusion_(nalUnits[0], track);\n\n if (gopForFusion) {\n gops.unshift(gopForFusion);\n // Adjust Gops' metadata to account for the inclusion of the\n // new gop at the beginning\n gops.byteLength += gopForFusion.byteLength;\n gops.nalCount += gopForFusion.nalCount;\n gops.pts = gopForFusion.pts;\n gops.dts = gopForFusion.dts;\n gops.duration += gopForFusion.duration;\n } else {\n // If we didn't find a candidate gop fall back to keyrame-pulling\n gops = this.extendFirstKeyFrame_(gops);\n }\n }\n collectDtsInfo(track, gops);\n\n // First, we have to build the index from byte locations to\n // samples (that is, frames) in the video data\n track.samples = this.generateSampleTable_(gops);\n\n // Concatenate the video data and construct the mdat\n mdat = mp4.mdat(this.concatenateNalData_(gops));\n\n // save all the nals in the last GOP into the gop cache\n this.gopCache_.unshift({\n gop: gops.pop(),\n pps: track.pps,\n sps: track.sps\n });\n\n // Keep a maximum of 6 GOPs in the cache\n this.gopCache_.length = Math.min(6, this.gopCache_.length);\n\n // Clear nalUnits\n nalUnits = [];\n\n calculateTrackBaseMediaDecodeTime(track);\n\n this.trigger('timelineStartInfo', track.timelineStartInfo);\n\n moof = mp4.moof(sequenceNumber, [track]);\n\n // it would be great to allocate this array up front instead of\n // throwing away hundreds of media segment fragments\n boxes = new Uint8Array(moof.byteLength + mdat.byteLength);\n\n // Bump the sequence number for next time\n sequenceNumber++;\n\n boxes.set(moof);\n boxes.set(mdat, moof.byteLength);\n\n this.trigger('data', {track: track, boxes: boxes});\n\n this.resetStream_();\n\n // Continue with the flush process now\n this.trigger('done', 'VideoSegmentStream');\n };\n\n this.resetStream_ = function() {\n clearDtsInfo(track);\n\n // reset config and pps because they may differ across segments\n // for instance, when we are rendition switching\n config = undefined;\n pps = undefined;\n };\n\n // Search for a candidate Gop for gop-fusion from the gop cache and\n // return it or return null if no good candidate was found\n this.getGopForFusion_ = function(nalUnit) {\n var\n halfSecond = 45000, // Half-a-second in a 90khz clock\n allowableOverlap = 10000, // About 3 frames @ 30fps\n nearestDistance = Infinity,\n dtsDistance,\n nearestGopObj,\n currentGop,\n currentGopObj,\n i;\n\n // Search for the GOP nearest to the beginning of this nal unit\n for (i = 0; i < this.gopCache_.length; i++) {\n currentGopObj = this.gopCache_[i];\n currentGop = currentGopObj.gop;\n\n // Reject Gops with different SPS or PPS\n if (!(track.pps && arrayEquals(track.pps[0], currentGopObj.pps[0])) ||\n !(track.sps && arrayEquals(track.sps[0], currentGopObj.sps[0]))) {\n continue;\n }\n\n // Reject Gops that would require a negative baseMediaDecodeTime\n if (currentGop.dts < track.timelineStartInfo.dts) {\n continue;\n }\n\n // The distance between the end of the gop and the start of the nalUnit\n dtsDistance = (nalUnit.dts - currentGop.dts) - currentGop.duration;\n\n // Only consider GOPS that start before the nal unit and end within\n // a half-second of the nal unit\n if (dtsDistance >= -allowableOverlap &&\n dtsDistance <= halfSecond) {\n\n // Always use the closest GOP we found if there is more than\n // one candidate\n if (!nearestGopObj ||\n nearestDistance > dtsDistance) {\n nearestGopObj = currentGopObj;\n nearestDistance = dtsDistance;\n }\n }\n }\n\n if (nearestGopObj) {\n return nearestGopObj.gop;\n }\n return null;\n };\n\n this.extendFirstKeyFrame_ = function(gops) {\n var currentGop;\n\n if (!gops[0][0].keyFrame && gops.length > 1) {\n // Remove the first GOP\n currentGop = gops.shift();\n\n gops.byteLength -= currentGop.byteLength;\n gops.nalCount -= currentGop.nalCount;\n\n // Extend the first frame of what is now the\n // first gop to cover the time period of the\n // frames we just removed\n gops[0][0].dts = currentGop.dts;\n gops[0][0].pts = currentGop.pts;\n gops[0][0].duration += currentGop.duration;\n }\n\n return gops;\n };\n\n // Convert an array of nal units into an array of frames with each frame being\n // composed of the nal units that make up that frame\n // Also keep track of cummulative data about the frame from the nal units such\n // as the frame duration, starting pts, etc.\n this.groupNalsIntoFrames_ = function(nalUnits) {\n var\n i,\n currentNal,\n currentFrame = [],\n frames = [];\n\n currentFrame.byteLength = 0;\n\n for (i = 0; i < nalUnits.length; i++) {\n currentNal = nalUnits[i];\n\n // Split on 'aud'-type nal units\n if (currentNal.nalUnitType === codecs.h264.unitTypes.access_unit_delimiter_rbsp) {\n // Since the very first nal unit is expected to be an AUD\n // only push to the frames array when currentFrame is not empty\n if (currentFrame.length) {\n currentFrame.duration = currentNal.dts - currentFrame.dts;\n frames.push(currentFrame);\n }\n currentFrame = [currentNal];\n currentFrame.byteLength = currentNal.data.byteLength;\n currentFrame.pts = currentNal.pts;\n currentFrame.dts = currentNal.dts;\n } else {\n // Specifically flag key frames for ease of use later\n if (currentNal.nalUnitType === codecs.h264.unitTypes.slice_layer_without_partitioning_rbsp_idr) {\n currentFrame.keyFrame = true;\n }\n currentFrame.duration = currentNal.dts - currentFrame.dts;\n currentFrame.byteLength += currentNal.data.byteLength;\n currentFrame.push(currentNal);\n }\n }\n\n // For the last frame, use the duration of the previous frame if we\n // have nothing better to go on\n if (frames.length &&\n (!currentFrame.duration ||\n currentFrame.duration <= 0)) {\n currentFrame.duration = frames[frames.length - 1].duration;\n }\n\n // Push the final frame\n frames.push(currentFrame);\n return frames;\n };\n\n // Convert an array of frames into an array of Gop with each Gop being composed\n // of the frames that make up that Gop\n // Also keep track of cummulative data about the Gop from the frames such as the\n // Gop duration, starting pts, etc.\n this.groupFramesIntoGops_ = function(frames) {\n var\n i,\n currentFrame,\n currentGop = [],\n gops = [];\n\n // We must pre-set some of the values on the Gop since we\n // keep running totals of these values\n currentGop.byteLength = 0;\n currentGop.nalCount = 0;\n currentGop.duration = 0;\n currentGop.pts = frames[0].pts;\n currentGop.dts = frames[0].dts;\n\n // store some metadata about all the Gops\n gops.byteLength = 0;\n gops.nalCount = 0;\n gops.duration = 0;\n gops.pts = frames[0].pts;\n gops.dts = frames[0].dts;\n\n for (i = 0; i < frames.length; i++) {\n currentFrame = frames[i];\n\n if (currentFrame.keyFrame) {\n // Since the very first frame is expected to be an keyframe\n // only push to the gops array when currentGop is not empty\n if (currentGop.length) {\n gops.push(currentGop);\n gops.byteLength += currentGop.byteLength;\n gops.nalCount += currentGop.nalCount;\n gops.duration += currentGop.duration;\n }\n\n currentGop = [currentFrame];\n currentGop.nalCount = currentFrame.length;\n currentGop.byteLength = currentFrame.byteLength;\n currentGop.pts = currentFrame.pts;\n currentGop.dts = currentFrame.dts;\n currentGop.duration = currentFrame.duration;\n } else {\n currentGop.duration += currentFrame.duration;\n currentGop.nalCount += currentFrame.length;\n currentGop.byteLength += currentFrame.byteLength;\n currentGop.push(currentFrame);\n }\n }\n\n if (gops.length && currentGop.duration <= 0) {\n currentGop.duration = gops[gops.length - 1].duration;\n }\n gops.byteLength += currentGop.byteLength;\n gops.nalCount += currentGop.nalCount;\n gops.duration += currentGop.duration;\n\n // push the final Gop\n gops.push(currentGop);\n return gops;\n };\n\n // generate the track's sample table from an array of gops\n this.generateSampleTable_ = function(gops, baseDataOffset) {\n var\n h, i,\n sample,\n currentGop,\n currentFrame,\n dataOffset = baseDataOffset || 0,\n samples = [];\n\n for (h = 0; h < gops.length; h++) {\n currentGop = gops[h];\n\n for (i = 0; i < currentGop.length; i++) {\n currentFrame = currentGop[i];\n\n sample = createDefaultSample();\n\n sample.dataOffset = dataOffset;\n sample.compositionTimeOffset = currentFrame.pts - currentFrame.dts;\n sample.duration = currentFrame.duration;\n sample.size = 4 * currentFrame.length; // Space for nal unit size\n sample.size += currentFrame.byteLength;\n\n if (currentFrame.keyFrame) {\n sample.flags.dependsOn = 2;\n }\n\n dataOffset += sample.size;\n\n samples.push(sample);\n }\n }\n return samples;\n };\n\n // generate the track's raw mdat data from an array of gops\n this.concatenateNalData_ = function(gops) {\n var\n h, i, j,\n currentGop,\n currentFrame,\n currentNal,\n dataOffset = 0,\n nalsByteLength = gops.byteLength,\n numberOfNals = gops.nalCount,\n totalByteLength = nalsByteLength + 4 * numberOfNals,\n data = new Uint8Array(totalByteLength),\n view = new DataView(data.buffer);\n\n // For each Gop..\n for (h = 0; h < gops.length; h++) {\n currentGop = gops[h];\n\n // For each Frame..\n for (i = 0; i < currentGop.length; i++) {\n currentFrame = currentGop[i];\n\n // For each NAL..\n for (j = 0; j < currentFrame.length; j++) {\n currentNal = currentFrame[j];\n\n view.setUint32(dataOffset, currentNal.data.byteLength);\n dataOffset += 4;\n data.set(currentNal.data, dataOffset);\n dataOffset += currentNal.data.byteLength;\n }\n }\n }\n return data;\n };\n};\n\nVideoSegmentStream.prototype = new Stream();\n\n/**\n * Store information about the start and end of the track and the\n * duration for each frame/sample we process in order to calculate\n * the baseMediaDecodeTime\n */\ncollectDtsInfo = function(track, data) {\n if (typeof data.pts === 'number') {\n if (track.timelineStartInfo.pts === undefined) {\n track.timelineStartInfo.pts = data.pts;\n }\n\n if (track.minSegmentPts === undefined) {\n track.minSegmentPts = data.pts;\n } else {\n track.minSegmentPts = Math.min(track.minSegmentPts, data.pts);\n }\n\n if (track.maxSegmentPts === undefined) {\n track.maxSegmentPts = data.pts;\n } else {\n track.maxSegmentPts = Math.max(track.maxSegmentPts, data.pts);\n }\n }\n\n if (typeof data.dts === 'number') {\n if (track.timelineStartInfo.dts === undefined) {\n track.timelineStartInfo.dts = data.dts;\n }\n\n if (track.minSegmentDts === undefined) {\n track.minSegmentDts = data.dts;\n } else {\n track.minSegmentDts = Math.min(track.minSegmentDts, data.dts);\n }\n\n if (track.maxSegmentDts === undefined) {\n track.maxSegmentDts = data.dts;\n } else {\n track.maxSegmentDts = Math.max(track.maxSegmentDts, data.dts);\n }\n }\n};\n\n/**\n * Clear values used to calculate the baseMediaDecodeTime between\n * tracks\n */\nclearDtsInfo = function(track) {\n delete track.minSegmentDts;\n delete track.maxSegmentDts;\n delete track.minSegmentPts;\n delete track.maxSegmentPts;\n};\n\n/**\n * Calculate the track's baseMediaDecodeTime based on the earliest\n * DTS the transmuxer has ever seen and the minimum DTS for the\n * current track\n */\ncalculateTrackBaseMediaDecodeTime = function(track) {\n var\n oneSecondInPTS = 90000, // 90kHz clock\n scale,\n // Calculate the distance, in time, that this segment starts from the start\n // of the timeline (earliest time seen since the transmuxer initialized)\n timeSinceStartOfTimeline = track.minSegmentDts - track.timelineStartInfo.dts,\n // Calculate the first sample's effective compositionTimeOffset\n firstSampleCompositionOffset = track.minSegmentPts - track.minSegmentDts;\n\n // track.timelineStartInfo.baseMediaDecodeTime is the location, in time, where\n // we want the start of the first segment to be placed\n track.baseMediaDecodeTime = track.timelineStartInfo.baseMediaDecodeTime;\n\n // Add to that the distance this segment is from the very first\n track.baseMediaDecodeTime += timeSinceStartOfTimeline;\n\n // Subtract this segment's \"compositionTimeOffset\" so that the first frame of\n // this segment is displayed exactly at the `baseMediaDecodeTime` or at the\n // end of the previous segment\n track.baseMediaDecodeTime -= firstSampleCompositionOffset;\n\n // baseMediaDecodeTime must not become negative\n track.baseMediaDecodeTime = Math.max(0, track.baseMediaDecodeTime);\n\n if (track.type === 'audio') {\n // Audio has a different clock equal to the sampling_rate so we need to\n // scale the PTS values into the clock rate of the track\n scale = track.samplerate / oneSecondInPTS;\n track.baseMediaDecodeTime *= scale;\n track.baseMediaDecodeTime = Math.floor(track.baseMediaDecodeTime);\n }\n\n return track.baseMediaDecodeTime;\n};\n\n/**\n * A Stream that can combine multiple streams (ie. audio & video)\n * into a single output segment for MSE. Also supports audio-only\n * and video-only streams.\n */\nCoalesceStream = function(options, metadataStream) {\n // Number of Tracks per output segment\n // If greater than 1, we combine multiple\n // tracks into a single segment\n this.numberOfTracks = 0;\n this.metadataStream = metadataStream;\n\n if (typeof options.remux !== 'undefined') {\n this.remuxTracks = !!options.remux;\n } else {\n this.remuxTracks = true;\n }\n\n this.pendingTracks = [];\n this.videoTrack = null;\n this.pendingBoxes = [];\n this.pendingCaptions = [];\n this.pendingMetadata = [];\n this.pendingBytes = 0;\n this.emittedTracks = 0;\n\n CoalesceStream.prototype.init.call(this);\n\n // Take output from multiple\n this.push = function(output) {\n // buffer incoming captions until the associated video segment\n // finishes\n if (output.text) {\n return this.pendingCaptions.push(output);\n }\n // buffer incoming id3 tags until the final flush\n if (output.frames) {\n return this.pendingMetadata.push(output);\n }\n\n // Add this track to the list of pending tracks and store\n // important information required for the construction of\n // the final segment\n this.pendingTracks.push(output.track);\n this.pendingBoxes.push(output.boxes);\n this.pendingBytes += output.boxes.byteLength;\n\n if (output.track.type === 'video') {\n this.videoTrack = output.track;\n }\n if (output.track.type === 'audio') {\n this.audioTrack = output.track;\n }\n };\n};\n\nCoalesceStream.prototype = new Stream();\nCoalesceStream.prototype.flush = function(flushSource) {\n var\n offset = 0,\n event = {\n captions: [],\n metadata: [],\n info: {}\n },\n caption,\n id3,\n initSegment,\n timelineStartPts = 0,\n i;\n\n if (this.pendingTracks.length < this.numberOfTracks) {\n if (flushSource !== 'VideoSegmentStream' &&\n flushSource !== 'AudioSegmentStream') {\n // Return because we haven't received a flush from a data-generating\n // portion of the segment (meaning that we have only recieved meta-data\n // or captions.)\n return;\n } else if (this.remuxTracks) {\n // Return until we have enough tracks from the pipeline to remux (if we\n // are remuxing audio and video into a single MP4)\n return;\n } else if (this.pendingTracks.length === 0) {\n // In the case where we receive a flush without any data having been\n // received we consider it an emitted track for the purposes of coalescing\n // `done` events.\n // We do this for the case where there is an audio and video track in the\n // segment but no audio data. (seen in several playlists with alternate\n // audio tracks and no audio present in the main TS segments.)\n this.emittedTracks++;\n\n if (this.emittedTracks >= this.numberOfTracks) {\n this.trigger('done');\n this.emittedTracks = 0;\n }\n return;\n }\n }\n\n if (this.videoTrack) {\n timelineStartPts = this.videoTrack.timelineStartInfo.pts;\n VIDEO_PROPERTIES.forEach(function(prop) {\n event.info[prop] = this.videoTrack[prop];\n }, this);\n } else if (this.audioTrack) {\n timelineStartPts = this.audioTrack.timelineStartInfo.pts;\n AUDIO_PROPERTIES.forEach(function(prop) {\n event.info[prop] = this.audioTrack[prop];\n }, this);\n }\n\n if (this.pendingTracks.length === 1) {\n event.type = this.pendingTracks[0].type;\n } else {\n event.type = 'combined';\n }\n\n this.emittedTracks += this.pendingTracks.length;\n\n initSegment = mp4.initSegment(this.pendingTracks, this.options);\n this.pendingBytes += initSegment.byteLength;\n this.pendingBoxes.unshift(initSegment);\n\n // Create a new typed array large enough to hold the init\n // segment and all tracks\n event.data = new Uint8Array(this.pendingBytes);\n\n // Append each moof+mdat (one per track) after the init segment\n for (i = 0; i < this.pendingBoxes.length; i++) {\n event.data.set(this.pendingBoxes[i], offset);\n offset += this.pendingBoxes[i].byteLength;\n }\n\n // Translate caption PTS times into second offsets into the\n // video timeline for the segment\n for (i = 0; i < this.pendingCaptions.length; i++) {\n caption = this.pendingCaptions[i];\n caption.startTime = (caption.startPts - timelineStartPts);\n caption.startTime /= 90e3;\n caption.endTime = (caption.endPts - timelineStartPts);\n caption.endTime /= 90e3;\n event.captions.push(caption);\n }\n\n // Translate ID3 frame PTS times into second offsets into the\n // video timeline for the segment\n for (i = 0; i < this.pendingMetadata.length; i++) {\n id3 = this.pendingMetadata[i];\n id3.cueTime = (id3.pts - timelineStartPts);\n id3.cueTime /= 90e3;\n event.metadata.push(id3);\n }\n // We add this to every single emitted segment even though we only need\n // it for the first\n event.metadata.dispatchType = this.metadataStream.dispatchType;\n\n // Reset stream state\n this.pendingTracks.length = 0;\n this.videoTrack = null;\n this.pendingBoxes.length = 0;\n this.pendingCaptions.length = 0;\n this.pendingBytes = 0;\n this.pendingMetadata.length = 0;\n\n // Emit the built segment\n this.trigger('data', event);\n\n // Only emit `done` if all tracks have been flushed and emitted\n if (this.emittedTracks >= this.numberOfTracks) {\n this.trigger('done');\n this.emittedTracks = 0;\n }\n};\n/**\n * A Stream that expects MP2T binary data as input and produces\n * corresponding media segments, suitable for use with Media Source\n * Extension (MSE) implementations that support the ISO BMFF byte\n * stream format, like Chrome.\n */\nTransmuxer = function(options) {\n var\n self = this,\n hasFlushed = true,\n videoTrack,\n audioTrack;\n\n Transmuxer.prototype.init.call(this);\n\n options = options || {};\n options.input_type = options.input_type||'ts';\n if (options.break_on_count===undefined) {\n options.break_on_count = true;\n }\n this.baseMediaDecodeTime = options.baseMediaDecodeTime || 0;\n this.transmuxPipeline_ = {};\n\n this.setupAacPipeline = function() {\n var pipeline = {};\n this.transmuxPipeline_ = pipeline;\n\n pipeline.type = 'aac';\n pipeline.metadataStream = new m2ts.MetadataStream();\n\n // set up the parsing pipeline\n pipeline.aacStream = new AacStream();\n pipeline.audioTimestampRolloverStream = new m2ts.TimestampRolloverStream('audio');\n pipeline.timedMetadataTimestampRolloverStream = new m2ts.TimestampRolloverStream('timed-metadata');\n pipeline.adtsStream = new AdtsStream();\n pipeline.coalesceStream = new CoalesceStream(options, pipeline.metadataStream);\n pipeline.headOfPipeline = pipeline.aacStream;\n\n pipeline.aacStream\n .pipe(pipeline.audioTimestampRolloverStream)\n .pipe(pipeline.adtsStream);\n pipeline.aacStream\n .pipe(pipeline.timedMetadataTimestampRolloverStream)\n .pipe(pipeline.metadataStream)\n .pipe(pipeline.coalesceStream);\n\n pipeline.metadataStream.on('timestamp', function(frame) {\n pipeline.aacStream.setTimestamp(frame.timeStamp);\n });\n\n pipeline.aacStream.on('data', function(data) {\n if (data.type === 'timed-metadata' && !pipeline.audioSegmentStream) {\n audioTrack = audioTrack || {\n timelineStartInfo: {\n baseMediaDecodeTime: self.baseMediaDecodeTime\n },\n codec: 'adts',\n type: 'audio'\n };\n // hook up the audio segment stream to the first track with aac data\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.audioSegmentStream = new AudioSegmentStream(audioTrack);\n // Set up the final part of the audio pipeline\n pipeline.adtsStream\n .pipe(pipeline.audioSegmentStream)\n .pipe(pipeline.coalesceStream);\n }\n });\n\n // Re-emit any data coming from the coalesce stream to the outside world\n pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data'));\n // Let the consumer know we have finished flushing the entire pipeline\n pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\n };\n\n this.setupTsPipeline = function() {\n var pipeline = {};\n this.transmuxPipeline_ = pipeline;\n\n pipeline.type = options.input_type;\n if (pipeline.type=='ts')\n {\n options.metadataStream = pipeline.metadataStream =\n new m2ts.MetadataStream();\n // set up the parsing pipeline\n pipeline.packetStream = new m2ts.TransportPacketStream();\n pipeline.parseStream = new m2ts.TransportParseStream();\n pipeline.elementaryStream = new m2ts.ElementaryStream();\n pipeline.videoTimestampRolloverStream = new m2ts.TimestampRolloverStream('video');\n pipeline.audioTimestampRolloverStream = new m2ts.TimestampRolloverStream('audio');\n pipeline.timedMetadataTimestampRolloverStream = new m2ts.TimestampRolloverStream('timed-metadata');\n pipeline.adtsStream = new AdtsStream();\n pipeline.h264Stream = new H264Stream();\n pipeline.captionStream = new m2ts.CaptionStream();\n pipeline.coalesceStream = new CoalesceStream(options,\n pipeline.metadataStream);\n pipeline.headOfPipeline = pipeline.packetStream;\n // disassemble MPEG2-TS packets into elementary streams\n pipeline.packetStream.pipe(pipeline.parseStream)\n .pipe(pipeline.elementaryStream);\n // !!THIS ORDER IS IMPORTANT!!\n // demux the streams\n pipeline.elementaryStream\n .pipe(pipeline.videoTimestampRolloverStream)\n .pipe(pipeline.h264Stream);\n pipeline.elementaryStream\n .pipe(pipeline.audioTimestampRolloverStream)\n .pipe(pipeline.adtsStream);\n\n pipeline.elementaryStream\n .pipe(pipeline.timedMetadataTimestampRolloverStream)\n .pipe(pipeline.metadataStream)\n .pipe(pipeline.coalesceStream);\n // Hook up CEA-608/708 caption stream\n pipeline.h264Stream.pipe(pipeline.captionStream)\n .pipe(pipeline.coalesceStream);\n }\n else\n {\n pipeline.headOfPipeline = pipeline.elementaryStream =\n new mp4p.MP4ParserStream(options);\n pipeline.mp4BuilderStream = new mp4p.MP4BuilderStream(options);\n pipeline.elementaryStream.pipe(pipeline.mp4BuilderStream);\n this.seek = function(pos, ss){\n return pipeline.elementaryStream.seek(pos, ss); };\n this.get_tl = function(id){\n return pipeline.elementaryStream.get_tl(id); };\n this.conf_update = function(conf){\n pipeline.elementaryStream.trigger('confupdate', conf);\n pipeline.mp4BuilderStream.trigger('confupdate', conf);\n };\n }\n\n pipeline.elementaryStream.on('data', function(data) {\n var i;\n\n if (data.type === 'metadata') {\n if (options.input_type === 'mp4') {\n return void self.trigger('metadata', data);\n }\n i = data.tracks.length;\n\n // scan the tracks listed in the metadata\n while (i--) {\n if (!videoTrack && data.tracks[i].type === 'video') {\n videoTrack = data.tracks[i];\n videoTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\n } else if (!audioTrack && data.tracks[i].type === 'audio') {\n audioTrack = data.tracks[i];\n audioTrack.timelineStartInfo.baseMediaDecodeTime = self.baseMediaDecodeTime;\n }\n }\n\n // hook up the video segment stream to the first track with h264 data\n if (videoTrack && !pipeline.videoSegmentStream) {\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.videoSegmentStream = new VideoSegmentStream(videoTrack);\n\n pipeline.videoSegmentStream.on('timelineStartInfo', function(timelineStartInfo) {\n // When video emits timelineStartInfo data after a flush, we forward that\n // info to the AudioSegmentStream, if it exists, because video timeline\n // data takes precedence.\n if (audioTrack) {\n audioTrack.timelineStartInfo = timelineStartInfo;\n // On the first segment we trim AAC frames that exist before the\n // very earliest DTS we have seen in video because Chrome will\n // interpret any video track with a baseMediaDecodeTime that is\n // non-zero as a gap.\n pipeline.audioSegmentStream.setEarliestDts(timelineStartInfo.dts);\n }\n });\n\n // Set up the final part of the video pipeline\n pipeline.h264Stream\n .pipe(pipeline.videoSegmentStream)\n .pipe(pipeline.coalesceStream);\n }\n\n if (audioTrack && !pipeline.audioSegmentStream) {\n // hook up the audio segment stream to the first track with aac data\n pipeline.coalesceStream.numberOfTracks++;\n pipeline.audioSegmentStream = new AudioSegmentStream(audioTrack);\n\n // Set up the final part of the audio pipeline\n pipeline.adtsStream\n .pipe(pipeline.audioSegmentStream)\n .pipe(pipeline.coalesceStream);\n }\n }\n });\n if (options.input_type==='mp4')\n {\n pipeline.mp4BuilderStream.on('data', this.trigger.bind(this, 'data'));\n pipeline.mp4BuilderStream.on('done', this.trigger.bind(this, 'done'));\n }\n else\n {\n // Re-emit any data coming from the coalesce stream to the outside world\n pipeline.coalesceStream.on('data', this.trigger.bind(this, 'data'));\n // Let the consumer know we have finished flushing the entire pipeline\n pipeline.coalesceStream.on('done', this.trigger.bind(this, 'done'));\n }\n };\n\n // hook up the segment streams once track metadata is delivered\n this.setBaseMediaDecodeTime = function (baseMediaDecodeTime) {\n var pipeline = this.transmuxPipeline_;\n\n this.baseMediaDecodeTime = baseMediaDecodeTime;\n if (audioTrack) {\n audioTrack.timelineStartInfo.dts = undefined;\n audioTrack.timelineStartInfo.pts = undefined;\n clearDtsInfo(audioTrack);\n audioTrack.timelineStartInfo.baseMediaDecodeTime = baseMediaDecodeTime;\n }\n // XXX pavelki: to check how to act if mp4\n if (videoTrack) {\n if (pipeline.videoSegmentStream) {\n pipeline.videoSegmentStream.gopCache_ = [];\n }\n videoTrack.timelineStartInfo.dts = undefined;\n videoTrack.timelineStartInfo.pts = undefined;\n clearDtsInfo(videoTrack);\n videoTrack.timelineStartInfo.baseMediaDecodeTime = baseMediaDecodeTime;\n }\n };\n\n // feed incoming data to the front of the parsing pipeline\n this.push = function(data) {\n if (hasFlushed) {\n var isAac = isLikelyAacData(data) && options.input_type!='mp4';\n\n if (isAac && this.transmuxPipeline_.type !== 'aac') {\n this.setupAacPipeline();\n }\n else if (!isAac && this.transmuxPipeline_.type !== options.input_type)\n {\n this.setupTsPipeline();\n }\n hasFlushed = false;\n }\n return this.transmuxPipeline_.headOfPipeline.push(data);\n };\n\n this.appendBuffer = function(data) {\n return this.push(new Uint8Array(data));\n };\n\n // flush any buffered data\n this.flush = function() {\n hasFlushed = true;\n // Start at the top of the pipeline and flush all pending work\n this.transmuxPipeline_.headOfPipeline.flush();\n };\n};\nTransmuxer.prototype = new Stream();\n\nmodule.exports = {\n Transmuxer: Transmuxer,\n VideoSegmentStream: VideoSegmentStream,\n AudioSegmentStream: AudioSegmentStream,\n AUDIO_PROPERTIES: AUDIO_PROPERTIES,\n VIDEO_PROPERTIES: VIDEO_PROPERTIES\n};\n","'use strict';\n\nvar\n tagTypes = {\n 0x08: 'audio',\n 0x09: 'video',\n 0x12: 'metadata'\n },\n hex = function (val) {\n return '0x' + ('00' + val.toString(16)).slice(-2).toUpperCase();\n },\n hexStringList = function (data) {\n var arr = [], i;\n /* jshint -W086 */\n while(data.byteLength > 0) {\n i = 0;\n switch(data.byteLength) {\n default:\n arr.push(hex(data[i++]));\n case 7:\n arr.push(hex(data[i++]));\n case 6:\n arr.push(hex(data[i++]));\n case 5:\n arr.push(hex(data[i++]));\n case 4:\n arr.push(hex(data[i++]));\n case 3:\n arr.push(hex(data[i++]));\n case 2:\n arr.push(hex(data[i++]));\n case 1:\n arr.push(hex(data[i++]));\n }\n data = data.subarray(i);\n }\n /* jshint +W086 */\n return arr.join(' ');\n },\n parseAVCTag = function (tag, obj) {\n var\n avcPacketTypes = [\n 'AVC Sequence Header',\n 'AVC NALU',\n 'AVC End-of-Sequence'\n ],\n nalUnitTypes = [\n 'unspecified',\n 'slice_layer_without_partitioning',\n 'slice_data_partition_a_layer',\n 'slice_data_partition_b_layer',\n 'slice_data_partition_c_layer',\n 'slice_layer_without_partitioning_idr',\n 'sei',\n 'seq_parameter_set',\n 'pic_parameter_set',\n 'access_unit_delimiter',\n 'end_of_seq',\n 'end_of_stream',\n 'filler',\n 'seq_parameter_set_ext',\n 'prefix_nal_unit',\n 'subset_seq_parameter_set',\n 'reserved',\n 'reserved',\n 'reserved'\n ],\n compositionTime = (tag[1] & parseInt('01111111', 2) << 16) | (tag[2] << 8) | tag[3];\n\n obj = obj || {};\n\n obj.avcPacketType = avcPacketTypes[tag[0]];\n obj.CompositionTime = (tag[1] & parseInt('10000000', 2)) ? -compositionTime : compositionTime;\n\n if (tag[0] === 1) {\n obj.nalUnitTypeRaw = hexStringList(tag.subarray(4, 100));\n } else {\n obj.data = hexStringList(tag.subarray(4));\n }\n\n return obj;\n },\n parseVideoTag = function (tag, obj) {\n var\n frameTypes = [\n 'Unknown',\n 'Keyframe (for AVC, a seekable frame)',\n 'Inter frame (for AVC, a nonseekable frame)',\n 'Disposable inter frame (H.263 only)',\n 'Generated keyframe (reserved for server use only)',\n 'Video info/command frame'\n ],\n codecIDs = [\n 'JPEG (currently unused)',\n 'Sorenson H.263',\n 'Screen video',\n 'On2 VP6',\n 'On2 VP6 with alpha channel',\n 'Screen video version 2',\n 'AVC'\n ],\n codecID = tag[0] & parseInt('00001111', 2);\n\n obj = obj || {};\n\n obj.frameType = frameTypes[(tag[0] & parseInt('11110000', 2)) >>> 4];\n obj.codecID = codecID;\n\n if (codecID === 7) {\n return parseAVCTag(tag.subarray(1), obj);\n }\n return obj;\n },\n parseAACTag = function (tag, obj) {\n var packetTypes = [\n 'AAC Sequence Header',\n 'AAC Raw'\n ];\n\n obj = obj || {};\n\n obj.aacPacketType = packetTypes[tag[0]];\n obj.data = hexStringList(tag.subarray(1));\n\n return obj;\n },\n parseAudioTag = function (tag, obj) {\n var\n formatTable = [\n 'Linear PCM, platform endian',\n 'ADPCM',\n 'MP3',\n 'Linear PCM, little endian',\n 'Nellymoser 16-kHz mono',\n 'Nellymoser 8-kHz mono',\n 'Nellymoser',\n 'G.711 A-law logarithmic PCM',\n 'G.711 mu-law logarithmic PCM',\n 'reserved',\n 'AAC',\n 'Speex',\n 'MP3 8-Khz',\n 'Device-specific sound'\n ],\n samplingRateTable = [\n '5.5-kHz',\n '11-kHz',\n '22-kHz',\n '44-kHz'\n ],\n soundFormat = (tag[0] & parseInt('11110000', 2)) >>> 4;\n\n obj = obj || {};\n\n obj.soundFormat = formatTable[soundFormat];\n obj.soundRate = samplingRateTable[(tag[0] & parseInt('00001100', 2)) >>> 2];\n obj.soundSize = ((tag[0] & parseInt('00000010', 2)) >>> 1) ? '16-bit' : '8-bit';\n obj.soundType = (tag[0] & parseInt('00000001', 2)) ? 'Stereo' : 'Mono';\n\n if (soundFormat === 10) {\n return parseAACTag(tag.subarray(1), obj);\n }\n return obj;\n },\n parseGenericTag = function (tag) {\n return {\n tagType: tagTypes[tag[0]],\n dataSize: (tag[1] << 16) | (tag[2] << 8) | tag[3],\n timestamp: (tag[7] << 24) | (tag[4] << 16) | (tag[5] << 8) | tag[6],\n streamID: (tag[8] << 16) | (tag[9] << 8) | tag[10]\n };\n },\n inspectFlvTag = function (tag) {\n var header = parseGenericTag(tag);\n switch (tag[0]) {\n case 0x08:\n parseAudioTag(tag.subarray(11), header);\n break;\n case 0x09:\n parseVideoTag(tag.subarray(11), header);\n break;\n case 0x12:\n }\n return header;\n },\n inspectFlv = function (bytes) {\n var i = 9, // header\n dataSize,\n parsedResults = [],\n tag;\n\n // traverse the tags\n i += 4; // skip previous tag size\n while (i < bytes.byteLength) {\n dataSize = bytes[i + 1] << 16;\n dataSize |= bytes[i + 2] << 8;\n dataSize |= bytes[i + 3];\n dataSize += 11;\n\n tag = bytes.subarray(i, i + dataSize);\n parsedResults.push(inspectFlvTag(tag));\n i += dataSize + 4;\n }\n return parsedResults;\n },\n textifyFlv = function (flvTagArray) {\n return JSON.stringify(flvTagArray, null, 2);\n };\n\nmodule.exports = {\n inspectTag: inspectFlvTag,\n inspect: inspectFlv,\n textify: textifyFlv\n};\n","'use strict';\n\nvar\n inspectMp4,\n textifyMp4,\n /**\n * Returns the string representation of an ASCII encoded four byte buffer.\n * @param buffer {Uint8Array} a four-byte buffer to translate\n * @return {string} the corresponding string\n */\n parseType = function(buffer) {\n var result = '';\n result += String.fromCharCode(buffer[0]);\n result += String.fromCharCode(buffer[1]);\n result += String.fromCharCode(buffer[2]);\n result += String.fromCharCode(buffer[3]);\n return result;\n },\n parseMp4Date = function(seconds) {\n return new Date(seconds * 1000 - 2082844800000);\n },\n parseSampleFlags = function(flags) {\n return {\n isLeading: (flags[0] & 0x0c) >>> 2,\n dependsOn: flags[0] & 0x03,\n isDependedOn: (flags[1] & 0xc0) >>> 6,\n hasRedundancy: (flags[1] & 0x30) >>> 4,\n paddingValue: (flags[1] & 0x0e) >>> 1,\n isNonSyncSample: flags[1] & 0x01,\n degradationPriority: (flags[2] << 8) | flags[3]\n };\n },\n nalParse = function(avcStream) {\n var\n avcView = new DataView(avcStream.buffer, avcStream.byteOffset, avcStream.byteLength),\n result = [],\n i,\n length;\n for (i = 0; i + 4 < avcStream.length; i += length) {\n length = avcView.getUint32(i);\n i += 4;\n\n // bail if this doesn't appear to be an H264 stream\n if (length <= 0) {\n result.push('MALFORMED DATA');\n continue;\n }\n\n switch(avcStream[i] & 0x1F) {\n case 0x01:\n result.push('slice_layer_without_partitioning_rbsp');\n break;\n case 0x05:\n result.push('slice_layer_without_partitioning_rbsp_idr');\n break;\n case 0x06:\n result.push('sei_rbsp');\n break;\n case 0x07:\n result.push('seq_parameter_set_rbsp');\n break;\n case 0x08:\n result.push('pic_parameter_set_rbsp');\n break;\n case 0x09:\n result.push('access_unit_delimiter_rbsp');\n break;\n default:\n result.push('UNKNOWN NAL - ' + avcStream[i] & 0x1F);\n break;\n }\n }\n return result;\n },\n\n // registry of handlers for individual mp4 box types\n parse = {\n // codingname, not a first-class box type. stsd entries share the\n // same format as real boxes so the parsing infrastructure can be\n // shared\n avc1: function(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n return {\n dataReferenceIndex: view.getUint16(6),\n width: view.getUint16(24),\n height: view.getUint16(26),\n horizresolution: view.getUint16(28) + (view.getUint16(30) / 16),\n vertresolution: view.getUint16(32) + (view.getUint16(34) / 16),\n frameCount: view.getUint16(40),\n depth: view.getUint16(74),\n config: inspectMp4(data.subarray(78, data.byteLength))\n };\n },\n avcC: function(data) {\n var\n view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n configurationVersion: data[0],\n avcProfileIndication: data[1],\n profileCompatibility: data[2],\n avcLevelIndication: data[3],\n lengthSizeMinusOne: data[4] & 0x03,\n sps: [],\n pps: []\n },\n numOfSequenceParameterSets = data[5] & 0x1f,\n numOfPictureParameterSets,\n nalSize,\n offset,\n i;\n\n // iterate past any SPSs\n offset = 6;\n for (i = 0; i < numOfSequenceParameterSets; i++) {\n nalSize = view.getUint16(offset);\n offset += 2;\n result.sps.push(new Uint8Array(data.subarray(offset, offset + nalSize)));\n offset += nalSize;\n }\n // iterate past any PPSs\n numOfPictureParameterSets = data[offset];\n offset++;\n for (i = 0; i < numOfPictureParameterSets; i++) {\n nalSize = view.getUint16(offset);\n offset += 2;\n result.pps.push(new Uint8Array(data.subarray(offset, offset + nalSize)));\n offset += nalSize;\n }\n return result;\n },\n btrt: function(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n return {\n bufferSizeDB: view.getUint32(0),\n maxBitrate: view.getUint32(4),\n avgBitrate: view.getUint32(8)\n };\n },\n esds: function(data) {\n return {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n esId: (data[6] << 8) | data[7],\n streamPriority: data[8] & 0x1f,\n decoderConfig: {\n objectProfileIndication: data[11],\n streamType: (data[12] >>> 2) & 0x3f,\n bufferSize: (data[13] << 16) | (data[14] << 8) | data[15],\n maxBitrate: (data[16] << 24) |\n (data[17] << 16) |\n (data[18] << 8) |\n data[19],\n avgBitrate: (data[20] << 24) |\n (data[21] << 16) |\n (data[22] << 8) |\n data[23],\n decoderConfigDescriptor: {\n tag: data[24],\n length: data[25],\n audioObjectType: (data[26] >>> 3) & 0x1f,\n samplingFrequencyIndex: ((data[26] & 0x07) << 1) |\n ((data[27] >>> 7) & 0x01),\n channelConfiguration: (data[27] >>> 3) & 0x0f\n }\n }\n };\n },\n ftyp: function(data) {\n var\n view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n majorBrand: parseType(data.subarray(0, 4)),\n minorVersion: view.getUint32(4),\n compatibleBrands: []\n },\n i = 8;\n while (i < data.byteLength) {\n result.compatibleBrands.push(parseType(data.subarray(i, i + 4)));\n i += 4;\n }\n return result;\n },\n dinf: function(data) {\n return {\n boxes: inspectMp4(data)\n };\n },\n dref: function(data) {\n return {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n dataReferences: inspectMp4(data.subarray(8))\n };\n },\n hdlr: function(data) {\n var\n view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n language,\n result = {\n version: view.getUint8(0),\n flags: new Uint8Array(data.subarray(1, 4)),\n handlerType: parseType(data.subarray(8, 12)),\n name: ''\n },\n i = 8;\n\n // parse out the name field\n for (i = 24; i < data.byteLength; i++) {\n if (data[i] === 0x00) {\n // the name field is null-terminated\n i++;\n break;\n }\n result.name += String.fromCharCode(data[i]);\n }\n // decode UTF-8 to javascript's internal representation\n // see http://ecmanaut.blogspot.com/2006/07/encoding-decoding-utf8-in-javascript.html\n result.name = decodeURIComponent(global.escape(result.name));\n\n return result;\n },\n mdat: function(data) {\n return {\n byteLength: data.byteLength,\n nals: nalParse(data)\n };\n },\n mdhd: function(data) {\n var\n view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n i = 4,\n language,\n result = {\n version: view.getUint8(0),\n flags: new Uint8Array(data.subarray(1, 4)),\n language: ''\n };\n if (result.version === 1) {\n i += 4;\n result.creationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n i += 8;\n result.modificationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n i += 4;\n result.timescale = view.getUint32(i);\n i += 8;\n result.duration = view.getUint32(i); // truncating top 4 bytes\n } else {\n result.creationTime = parseMp4Date(view.getUint32(i));\n i += 4;\n result.modificationTime = parseMp4Date(view.getUint32(i));\n i += 4;\n result.timescale = view.getUint32(i);\n i += 4;\n result.duration = view.getUint32(i);\n }\n i += 4;\n // language is stored as an ISO-639-2/T code in an array of three 5-bit fields\n // each field is the packed difference between its ASCII value and 0x60\n language = view.getUint16(i);\n result.language += String.fromCharCode((language >> 10) + 0x60);\n result.language += String.fromCharCode(((language & 0x03c0) >> 5) + 0x60);\n result.language += String.fromCharCode((language & 0x1f) + 0x60);\n\n return result;\n },\n mdia: function(data) {\n return {\n boxes: inspectMp4(data)\n };\n },\n mfhd: function(data) {\n return {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n sequenceNumber: (data[4] << 24) |\n (data[5] << 16) |\n (data[6] << 8) |\n (data[7])\n };\n },\n minf: function(data) {\n return {\n boxes: inspectMp4(data)\n };\n },\n // codingname, not a first-class box type. stsd entries share the\n // same format as real boxes so the parsing infrastructure can be\n // shared\n mp4a: function(data) {\n var\n view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n // 6 bytes reserved\n dataReferenceIndex: view.getUint16(6),\n // 4 + 4 bytes reserved\n channelcount: view.getUint16(16),\n samplesize: view.getUint16(18),\n // 2 bytes pre_defined\n // 2 bytes reserved\n samplerate: view.getUint16(24) + (view.getUint16(26) / 65536)\n };\n\n // if there are more bytes to process, assume this is an ISO/IEC\n // 14496-14 MP4AudioSampleEntry and parse the ESDBox\n if (data.byteLength > 28) {\n result.streamDescriptor = inspectMp4(data.subarray(28))[0];\n }\n return result;\n },\n moof: function(data) {\n return {\n boxes: inspectMp4(data)\n };\n },\n moov: function(data) {\n return {\n boxes: inspectMp4(data)\n };\n },\n mvex: function(data) {\n return {\n boxes: inspectMp4(data)\n };\n },\n mvhd: function(data) {\n var\n view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n i = 4,\n result = {\n version: view.getUint8(0),\n flags: new Uint8Array(data.subarray(1, 4))\n };\n\n if (result.version === 1) {\n i += 4;\n result.creationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n i += 8;\n result.modificationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n i += 4;\n result.timescale = view.getUint32(i);\n i += 8;\n result.duration = view.getUint32(i); // truncating top 4 bytes\n } else {\n result.creationTime = parseMp4Date(view.getUint32(i));\n i += 4;\n result.modificationTime = parseMp4Date(view.getUint32(i));\n i += 4;\n result.timescale = view.getUint32(i);\n i += 4;\n result.duration = view.getUint32(i);\n }\n i += 4;\n\n // convert fixed-point, base 16 back to a number\n result.rate = view.getUint16(i) + (view.getUint16(i + 2) / 16);\n i += 4;\n result.volume = view.getUint8(i) + (view.getUint8(i + 1) / 8);\n i += 2;\n i += 2;\n i += 2 * 4;\n result.matrix = new Uint32Array(data.subarray(i, i + (9 * 4)));\n i += 9 * 4;\n i += 6 * 4;\n result.nextTrackId = view.getUint32(i);\n return result;\n },\n pdin: function(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n return {\n version: view.getUint8(0),\n flags: new Uint8Array(data.subarray(1, 4)),\n rate: view.getUint32(4),\n initialDelay: view.getUint32(8)\n };\n },\n sdtp: function(data) {\n var\n result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n samples: []\n }, i;\n\n for (i = 4; i < data.byteLength; i++) {\n result.samples.push({\n dependsOn: (data[i] & 0x30) >> 4,\n isDependedOn: (data[i] & 0x0c) >> 2,\n hasRedundancy: data[i] & 0x03\n });\n }\n return result;\n },\n sidx: function(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n references: [],\n referenceId: view.getUint32(4),\n timescale: view.getUint32(8),\n earliestPresentationTime: view.getUint32(12),\n firstOffset: view.getUint32(16)\n },\n referenceCount = view.getUint16(22),\n i;\n\n for (i = 24; referenceCount; i += 12, referenceCount-- ) {\n result.references.push({\n referenceType: (data[i] & 0x80) >>> 7,\n referencedSize: view.getUint32(i) & 0x7FFFFFFF,\n subsegmentDuration: view.getUint32(i + 4),\n startsWithSap: !!(data[i + 8] & 0x80),\n sapType: (data[i + 8] & 0x70) >>> 4,\n sapDeltaTime: view.getUint32(i + 8) & 0x0FFFFFFF\n });\n }\n\n return result;\n },\n smhd: function(data) {\n return {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n balance: data[4] + (data[5] / 256)\n };\n },\n stbl: function(data) {\n return {\n boxes: inspectMp4(data)\n };\n },\n stco: function(data) {\n var\n view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n chunkOffsets: []\n },\n entryCount = view.getUint32(4),\n i;\n for (i = 8; entryCount; i += 4, entryCount--) {\n result.chunkOffsets.push(view.getUint32(i));\n }\n return result;\n },\n stsc: function(data) {\n var\n view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n entryCount = view.getUint32(4),\n result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n sampleToChunks: []\n },\n i;\n for (i = 8; entryCount; i += 12, entryCount--) {\n result.sampleToChunks.push({\n firstChunk: view.getUint32(i),\n samplesPerChunk: view.getUint32(i + 4),\n sampleDescriptionIndex: view.getUint32(i + 8)\n });\n }\n return result;\n },\n stsd: function(data) {\n return {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n sampleDescriptions: inspectMp4(data.subarray(8))\n };\n },\n stsz: function(data) {\n var\n view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n sampleSize: view.getUint32(4),\n entries: []\n },\n i;\n for (i = 12; i < data.byteLength; i += 4) {\n result.entries.push(view.getUint32(i));\n }\n return result;\n },\n stts: function(data) {\n var\n view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n timeToSamples: []\n },\n entryCount = view.getUint32(4),\n i;\n\n for (i = 8; entryCount; i += 8, entryCount--) {\n result.timeToSamples.push({\n sampleCount: view.getUint32(i),\n sampleDelta: view.getUint32(i + 4)\n });\n }\n return result;\n },\n styp: function(data) {\n return parse.ftyp(data);\n },\n tfdt: function(data) {\n return {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n baseMediaDecodeTime: data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]\n };\n },\n tfhd: function(data) {\n var\n view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n trackId: view.getUint32(4)\n },\n baseDataOffsetPresent = result.flags[2] & 0x01,\n sampleDescriptionIndexPresent = result.flags[2] & 0x02,\n defaultSampleDurationPresent = result.flags[2] & 0x08,\n defaultSampleSizePresent = result.flags[2] & 0x10,\n defaultSampleFlagsPresent = result.flags[2] & 0x20,\n i;\n\n i = 8;\n if (baseDataOffsetPresent) {\n i += 4; // truncate top 4 bytes\n result.baseDataOffset = view.getUint32(12);\n i += 4;\n }\n if (sampleDescriptionIndexPresent) {\n result.sampleDescriptionIndex = view.getUint32(i);\n i += 4;\n }\n if (defaultSampleDurationPresent) {\n result.defaultSampleDuration = view.getUint32(i);\n i += 4;\n }\n if (defaultSampleSizePresent) {\n result.defaultSampleSize = view.getUint32(i);\n i += 4;\n }\n if (defaultSampleFlagsPresent) {\n result.defaultSampleFlags = view.getUint32(i);\n }\n return result;\n },\n tkhd: function(data) {\n var\n view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n i = 4,\n result = {\n version: view.getUint8(0),\n flags: new Uint8Array(data.subarray(1, 4)),\n };\n if (result.version === 1) {\n i += 4;\n result.creationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n i += 8;\n result.modificationTime = parseMp4Date(view.getUint32(i)); // truncating top 4 bytes\n i += 4;\n result.trackId = view.getUint32(i);\n i += 4;\n i += 8;\n result.duration = view.getUint32(i); // truncating top 4 bytes\n } else {\n result.creationTime = parseMp4Date(view.getUint32(i));\n i += 4;\n result.modificationTime = parseMp4Date(view.getUint32(i));\n i += 4;\n result.trackId = view.getUint32(i);\n i += 4;\n i += 4;\n result.duration = view.getUint32(i);\n }\n i += 4;\n i += 2 * 4;\n result.layer = view.getUint16(i);\n i += 2;\n result.alternateGroup = view.getUint16(i);\n i += 2;\n // convert fixed-point, base 16 back to a number\n result.volume = view.getUint8(i) + (view.getUint8(i + 1) / 8);\n i += 2;\n i += 2;\n result.matrix = new Uint32Array(data.subarray(i, i + (9 * 4)));\n i += 9 * 4;\n result.width = view.getUint16(i) + (view.getUint16(i + 2) / 16);\n i += 4;\n result.height = view.getUint16(i) + (view.getUint16(i + 2) / 16);\n return result;\n },\n traf: function(data) {\n return {\n boxes: inspectMp4(data)\n };\n },\n trak: function(data) {\n return {\n boxes: inspectMp4(data)\n };\n },\n trex: function(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n return {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n trackId: view.getUint32(4),\n defaultSampleDescriptionIndex: view.getUint32(8),\n defaultSampleDuration: view.getUint32(12),\n defaultSampleSize: view.getUint32(16),\n sampleDependsOn: data[20] & 0x03,\n sampleIsDependedOn: (data[21] & 0xc0) >> 6,\n sampleHasRedundancy: (data[21] & 0x30) >> 4,\n samplePaddingValue: (data[21] & 0x0e) >> 1,\n sampleIsDifferenceSample: !!(data[21] & 0x01),\n sampleDegradationPriority: view.getUint16(22)\n };\n },\n trun: function(data) {\n var\n result = {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n samples: []\n },\n view = new DataView(data.buffer, data.byteOffset, data.byteLength),\n dataOffsetPresent = result.flags[2] & 0x01,\n firstSampleFlagsPresent = result.flags[2] & 0x04,\n sampleDurationPresent = result.flags[1] & 0x01,\n sampleSizePresent = result.flags[1] & 0x02,\n sampleFlagsPresent = result.flags[1] & 0x04,\n sampleCompositionTimeOffsetPresent = result.flags[1] & 0x08,\n sampleCount = view.getUint32(4),\n offset = 8,\n sample;\n\n if (dataOffsetPresent) {\n result.dataOffset = view.getUint32(offset);\n offset += 4;\n }\n\n if (firstSampleFlagsPresent && sampleCount) {\n sample = {\n flags: parseSampleFlags(data.subarray(offset, offset + 4))\n };\n offset += 4;\n if (sampleDurationPresent) {\n sample.duration = view.getUint32(offset);\n offset += 4;\n }\n if (sampleSizePresent) {\n sample.size = view.getUint32(offset);\n offset += 4;\n }\n if (sampleCompositionTimeOffsetPresent) {\n sample.compositionTimeOffset = view.getUint32(offset);\n offset += 4;\n }\n result.samples.push(sample);\n sampleCount--;\n }\n\n while (sampleCount--) {\n sample = {};\n if (sampleDurationPresent) {\n sample.duration = view.getUint32(offset);\n offset += 4;\n }\n if (sampleSizePresent) {\n sample.size = view.getUint32(offset);\n offset += 4;\n }\n if (sampleFlagsPresent) {\n sample.flags = parseSampleFlags(data.subarray(offset, offset + 4));\n offset += 4;\n }\n if (sampleCompositionTimeOffsetPresent) {\n sample.compositionTimeOffset = view.getUint32(offset);\n offset += 4;\n }\n result.samples.push(sample);\n }\n return result;\n },\n 'url ': function(data) {\n return {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4))\n };\n },\n vmhd: function(data) {\n var view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n return {\n version: data[0],\n flags: new Uint8Array(data.subarray(1, 4)),\n graphicsmode: view.getUint16(4),\n opcolor: new Uint16Array([view.getUint16(6),\n view.getUint16(8),\n view.getUint16(10)])\n };\n }\n };\n\n\n/**\n * Return a javascript array of box objects parsed from an ISO base\n * media file.\n * @param data {Uint8Array} the binary data of the media to be inspected\n * @return {array} a javascript array of potentially nested box objects\n */\ninspectMp4 = function(data) {\n var\n i = 0,\n result = [],\n view,\n size,\n type,\n end,\n box;\n\n // Convert data from Uint8Array to ArrayBuffer, to follow Dataview API\n var ab = new ArrayBuffer(data.length);\n var v = new Uint8Array(ab);\n for (var z = 0; z < data.length; ++z) {\n v[z] = data[z];\n }\n view = new DataView(ab);\n\n\n while (i < data.byteLength) {\n // parse box data\n size = view.getUint32(i);\n type = parseType(data.subarray(i + 4, i + 8));\n end = size > 1 ? i + size : data.byteLength;\n\n // parse type-specific data\n box = (parse[type] || function(data) {\n return {\n data: data\n };\n })(data.subarray(i + 8, end));\n box.size = size;\n box.type = type;\n\n // store this box and move to the next\n result.push(box);\n i = end;\n }\n return result;\n};\n\n/**\n * Returns a textual representation of the javascript represtentation\n * of an MP4 file. You can use it as an alternative to\n * JSON.stringify() to compare inspected MP4s.\n * @param inspectedMp4 {array} the parsed array of boxes in an MP4\n * file\n * @param depth {number} (optional) the number of ancestor boxes of\n * the elements of inspectedMp4. Assumed to be zero if unspecified.\n * @return {string} a text representation of the parsed MP4\n */\ntextifyMp4 = function(inspectedMp4, depth) {\n var indent;\n depth = depth || 0;\n indent = new Array(depth * 2 + 1).join(' ');\n\n // iterate over all the boxes\n return inspectedMp4.map(function(box, index) {\n\n // list the box type first at the current indentation level\n return indent + box.type + '\\n' +\n\n // the type is already included and handle child boxes separately\n Object.keys(box).filter(function(key) {\n return key !== 'type' && key !== 'boxes';\n\n // output all the box properties\n }).map(function(key) {\n var prefix = indent + ' ' + key + ': ',\n value = box[key];\n\n // print out raw bytes as hexademical\n if (value instanceof Uint8Array || value instanceof Uint32Array) {\n var bytes = Array.prototype.slice.call(new Uint8Array(value.buffer, value.byteOffset, value.byteLength))\n .map(function(byte) {\n return ' ' + ('00' + byte.toString(16)).slice(-2);\n }).join('').match(/.{1,24}/g);\n if (!bytes) {\n return prefix + '<>';\n }\n if (bytes.length === 1) {\n return prefix + '<' + bytes.join('').slice(1) + '>';\n }\n return prefix + '<\\n' + bytes.map(function(line) {\n return indent + ' ' + line;\n }).join('\\n') + '\\n' + indent + ' >';\n }\n\n // stringify generic objects\n return prefix +\n JSON.stringify(value, null, 2)\n .split('\\n').map(function(line, index) {\n if (index === 0) {\n return line;\n }\n return indent + ' ' + line;\n }).join('\\n');\n }).join('\\n') +\n\n // recursively textify the child boxes\n (box.boxes ? '\\n' + textifyMp4(box.boxes, depth + 1) : '');\n }).join('\\n');\n};\n\nmodule.exports = {\n inspect: inspectMp4,\n textify: textifyMp4\n};\n","'use strict';\n\nvar ExpGolomb;\n\n/**\n * Parser for exponential Golomb codes, a variable-bitwidth number encoding\n * scheme used by h264.\n */\nExpGolomb = function(workingData) {\n var\n // the number of bytes left to examine in workingData\n workingBytesAvailable = workingData.byteLength,\n\n // the current word being examined\n workingWord = 0, // :uint\n\n // the number of bits left to examine in the current word\n workingBitsAvailable = 0; // :uint;\n\n // ():uint\n this.length = function() {\n return (8 * workingBytesAvailable);\n };\n\n // ():uint\n this.bitsAvailable = function() {\n return (8 * workingBytesAvailable) + workingBitsAvailable;\n };\n\n // ():void\n this.loadWord = function() {\n var\n position = workingData.byteLength - workingBytesAvailable,\n workingBytes = new Uint8Array(4),\n availableBytes = Math.min(4, workingBytesAvailable);\n\n if (availableBytes === 0) {\n throw new Error('no bytes available');\n }\n\n workingBytes.set(workingData.subarray(position,\n position + availableBytes));\n workingWord = new DataView(workingBytes.buffer).getUint32(0);\n\n // track the amount of workingData that has been processed\n workingBitsAvailable = availableBytes * 8;\n workingBytesAvailable -= availableBytes;\n };\n\n // (count:int):void\n this.skipBits = function(count) {\n var skipBytes; // :int\n if (workingBitsAvailable > count) {\n workingWord <<= count;\n workingBitsAvailable -= count;\n } else {\n count -= workingBitsAvailable;\n skipBytes = Math.floor(count / 8);\n\n count -= (skipBytes * 8);\n workingBytesAvailable -= skipBytes;\n\n this.loadWord();\n\n workingWord <<= count;\n workingBitsAvailable -= count;\n }\n };\n\n // (size:int):uint\n this.readBits = function(size) {\n var\n bits = Math.min(workingBitsAvailable, size), // :uint\n valu = workingWord >>> (32 - bits); // :uint\n // if size > 31, handle error\n workingBitsAvailable -= bits;\n if (workingBitsAvailable > 0) {\n workingWord <<= bits;\n } else if (workingBytesAvailable > 0) {\n this.loadWord();\n }\n\n bits = size - bits;\n return bits > 0 && workingBitsAvailable ? valu << bits | this.readBits(bits) : valu;\n };\n\n // ():uint\n this.skipLeadingZeros = function() {\n var leadingZeroCount; // :uint\n for (leadingZeroCount = 0 ; leadingZeroCount < workingBitsAvailable ; ++leadingZeroCount) {\n if (0 !== (workingWord & (0x80000000 >>> leadingZeroCount))) {\n // the first bit of working word is 1\n workingWord <<= leadingZeroCount;\n workingBitsAvailable -= leadingZeroCount;\n return leadingZeroCount;\n }\n }\n\n // we exhausted workingWord and still have not found a 1\n this.loadWord();\n return leadingZeroCount + this.skipLeadingZeros();\n };\n\n // ():void\n this.skipUnsignedExpGolomb = function() {\n this.skipBits(1 + this.skipLeadingZeros());\n };\n\n // ():void\n this.skipExpGolomb = function() {\n this.skipBits(1 + this.skipLeadingZeros());\n };\n\n // ():uint\n this.readUnsignedExpGolomb = function() {\n var clz = this.skipLeadingZeros(); // :uint\n return this.readBits(clz + 1) - 1;\n };\n\n // ():int\n this.readExpGolomb = function() {\n var valu = this.readUnsignedExpGolomb(); // :int\n return valu & 0x01 ? (1 + valu) >>> 1 : -(valu >>> 1);\n };\n\n // Some convenience functions\n // :Boolean\n this.readBoolean = function() {\n return 1 === this.readBits(1);\n };\n\n // ():int\n this.readUnsignedByte = function() {\n return this.readBits(8);\n };\n\n this.loadWord();\n};\n\nmodule.exports = ExpGolomb;\n","/**\n * mux.js\n *\n * Copyright (c) 2014 Brightcove\n * All rights reserved.\n *\n * A lightweight readable stream implemention that handles event dispatching.\n * Objects that inherit from streams should call init in their constructors.\n */\n'use strict';\n\nvar Stream = function() {\n this.init = function() {\n var listeners = {};\n /**\n * Add a listener for a specified event type.\n * @param type {string} the event name\n * @param listener {function} the callback to be invoked when an event of\n * the specified type occurs\n */\n this.on = function(type, listener) {\n if (!listeners[type]) {\n listeners[type] = [];\n }\n listeners[type].push(listener);\n };\n /**\n * Remove a listener for a specified event type.\n * @param type {string} the event name\n * @param listener {function} a function previously registered for this\n * type of event through `on`\n */\n this.off = function(type, listener) {\n var index;\n if (!listeners[type]) {\n return false;\n }\n index = listeners[type].indexOf(listener);\n listeners[type].splice(index, 1);\n return index > -1;\n };\n /**\n * Trigger an event of the specified type on this stream. Any additional\n * arguments to this function are passed as parameters to event listeners.\n * @param type {string} the event name\n */\n this.trigger = function(type) {\n var callbacks, i, length, args;\n callbacks = listeners[type];\n if (!callbacks) {\n return;\n }\n // Copy handlers so if handlers are added/removed during the process it\n // doesn't throw everything off.\n callbacks = callbacks.slice(0);\n // Slicing the arguments on every invocation of this method\n // can add a significant amount of overhead. Avoid the\n // intermediate object creation for the common case of a\n // single callback argument\n if (arguments.length === 2) {\n length = callbacks.length;\n for (i = 0; i < length; ++i) {\n callbacks[i].call(this, arguments[1]);\n }\n } else {\n args = [];\n i = arguments.length;\n for (i = 1; i < arguments.length; ++i) {\n args.push(arguments[i]);\n }\n length = callbacks.length;\n for (i = 0; i < length; ++i) {\n callbacks[i].apply(this, args);\n }\n }\n };\n /**\n * Destroys the stream and cleans up.\n */\n this.dispose = function() {\n listeners = {};\n };\n };\n};\n\n/**\n * Forwards all `data` events on this stream to the destination stream. The\n * destination stream should provide a method `push` to receive the data\n * events as they arrive.\n * @param destination {stream} the stream that will receive all `data` events\n * @param autoFlush {boolean} if false, we will not call `flush` on the destination\n * when the current stream emits a 'done' event\n * @see http://nodejs.org/api/stream.html#stream_readable_pipe_destination_options\n */\nStream.prototype.pipe = function(destination) {\n this.on('data', function(data) {\n destination.push(data);\n });\n\n this.on('done', function(flushSource) {\n destination.flush(flushSource);\n });\n\n return destination;\n};\n\n// Default stream functions that are expected to be overridden to perform\n// actual work. These are provided by the prototype as a sort of no-op\n// implementation so that we don't have to check for their existence in the\n// `pipe` function above.\nStream.prototype.push = function(data) {\n this.trigger('data', data);\n};\n\nStream.prototype.flush = function(flushSource) {\n this.trigger('done', flushSource);\n};\n\nmodule.exports = Stream;\n","var bundleFn = arguments[3];\nvar sources = arguments[4];\nvar cache = arguments[5];\n\nvar stringify = JSON.stringify;\n\nmodule.exports = function (fn) {\n var keys = [];\n var wkey;\n var cacheKeys = Object.keys(cache);\n \n for (var i = 0, l = cacheKeys.length; i < l; i++) {\n var key = cacheKeys[i];\n if (cache[key].exports === fn) {\n wkey = key;\n break;\n }\n }\n \n if (!wkey) {\n wkey = Math.floor(Math.pow(16, 8) * Math.random()).toString(16);\n var wcache = {};\n for (var i = 0, l = cacheKeys.length; i < l; i++) {\n var key = cacheKeys[i];\n wcache[key] = key;\n }\n sources[wkey] = [\n Function(['require','module','exports'], '(' + fn + ')(self)'),\n wcache\n ];\n }\n var skey = Math.floor(Math.pow(16, 8) * Math.random()).toString(16);\n \n var scache = {}; scache[wkey] = wkey;\n sources[skey] = [\n Function(['require'],'require(' + stringify(wkey) + ')(self)'),\n scache\n ];\n \n var src = '(' + bundleFn + ')({'\n + Object.keys(sources).map(function (key) {\n return stringify(key) + ':['\n + sources[key][0]\n + ',' + stringify(sources[key][1]) + ']'\n ;\n }).join(',')\n + '},{},[' + stringify(skey) + '])'\n ;\n \n var URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\n \n return new Worker(URL.createObjectURL(\n new Blob([src], { type: 'text/javascript' })\n ));\n};\n","(function(window, vjs){\n'use strict';\nvar volume_icon_svg = ''\n +''\n +''\n +''\n +''\n +''\n +''\n +''\n +''\n +'';\nvar fullscreen_svg = ''\n +''\n +''\n +''\n +''\n +'';\nvar exit_fullscreen_svg = ''\n +''\n +''\n +''\n +''\n +'';\nvar play_button_svg = ''\n +''\n +''\n +'';\nvar slider_gaps = '
'\n +'
';\nvar skin = '.vjs5-hola-skin';\nvar custom_css = skin+' .vjs-big-play-button:hover .vjs-button-icon {'\n +' fill: @play_button_color;'\n +'}'\n +skin+':not(.vjs-ad-playing) .vjs-progress-control .vjs-play-progress,'\n +skin+' .vjs-progress-control .vjs-mouse-display:before,'\n +skin+' .vjs-progress-control .vjs-play-progress:before,'\n +skin+' .vjs-captions-toggle>.vjs-button-icon:after {'\n +' background-color: @seek_bar_color;'\n +'}';\n\nfunction add_css(url, ver){\n var link = document.createElement('link');\n link.setAttribute('rel', 'stylesheet');\n link.setAttribute('href', url+(ver ? '?'+ver : ''));\n document.getElementsByTagName('head')[0].appendChild(link);\n}\n\nvar Component = vjs.getComponent('Component');\nvar Player = vjs.getComponent('Player');\nvar ControlBar = vjs.getComponent('ControlBar');\nvar Button = vjs.getComponent('Button');\nvar MenuButton = vjs.getComponent('MenuButton');\nvar VolumeMenuButton = vjs.getComponent('VolumeMenuButton');\nvar FullscreenToggle = vjs.getComponent('FullscreenToggle');\nvar BigPlayButton = vjs.getComponent('BigPlayButton');\nvar SeekBar = vjs.getComponent('SeekBar');\nvar LoadingSpinner = vjs.getComponent('LoadingSpinner');\nvar Tooltip = vjs.getComponent('Tooltip');\n\nvar HolaSkin = function(player, opt){\n var _this = this;\n this.player = player;\n this.el = player.el();\n this.opt = opt;\n this.classes_added = [];\n this.controls_min_width = [];\n player.on('dispose', function(){ _this.dispose(); });\n player.on('ready', function(){ _this.init(); });\n var resize = this._resize = this.resize.bind(this);\n player.on('resize', resize);\n player.on('fullscreenchange', function(){ setTimeout(resize); });\n window.addEventListener('resize', resize);\n window.addEventListener('orientationchange', resize);\n this.apply();\n};\n\nHolaSkin.prototype.apply = function(){\n var c, classes = [this.opt.className];\n if (this.opt.show_controls_before_start)\n classes.push('vjs-show-controls-before-start');\n if (this.opt.show_time_for_live)\n classes.push('vjs-show-time-for-live');\n while (c = classes.shift())\n {\n if (this.player.addClass(c))\n this.classes_added.push(c);\n }\n if (this.opt.className=='vjs-ios-skin')\n this.patch_controls_ios();\n else\n this.patch_controls_default();\n};\nHolaSkin.prototype.patch_controls_default = function(){\n var controlbar_createEl = ControlBar.prototype.createEl;\n ControlBar.prototype.createEl = function(){\n var el = controlbar_createEl.call(this);\n el.appendChild(vjs.createEl('div',\n {className: 'vjs-gradient vjs-bottom-gradient'}));\n return el;\n };\n VolumeMenuButton.prototype.createEl = function(){\n var el = MenuButton.prototype.createEl.call(this);\n var id = this.player_.id();\n var svg = volume_icon_svg\n .replace(/{vjs-volume-mask1}/g, 'vjs-volume-mask1_'+id)\n .replace(/{vjs-volume-mask2}/g, 'vjs-volume-mask2_'+id);\n var icon = this.icon_ = vjs.createEl('div',\n {className: 'vjs-button-icon', innerHTML: svg});\n el.insertBefore(icon, el.firstChild);\n return el;\n };\n VolumeMenuButton.prototype.tooltipHandler = function(){\n return this.icon_;\n };\n FullscreenToggle.prototype.controlText_ = 'Full screen';\n FullscreenToggle.prototype.createEl = function(){\n var el = Button.prototype.createEl.call(this);\n el.insertBefore(vjs.createEl('div', {\n className: 'vjs-button-icon vjs-fullscreen-icon',\n innerHTML: fullscreen_svg,\n }), el.firstChild);\n el.insertBefore(vjs.createEl('div', {\n className: 'vjs-button-icon vjs-exit-fullscreen-icon',\n innerHTML: exit_fullscreen_svg,\n }), el.firstChild);\n return el;\n };\n FullscreenToggle.prototype.updateHint = function(){\n this.controlText(this.player_.isFullscreen() ? 'Exit full screen' :\n 'Full screen');\n };\n BigPlayButton.prototype.createEl = function(){\n var el = Button.prototype.createEl.call(this);\n el.appendChild(vjs.createEl('div', {\n className: 'vjs-button-icon',\n innerHTML: play_button_svg,\n }));\n return el;\n };\n var orig_createEl = SeekBar.prototype.createEl;\n SeekBar.prototype.createEl = function(){\n var el = orig_createEl.call(this);\n el.appendChild(vjs.createEl('div', {className: 'vjs-slider-padding'}));\n return el;\n };\n var spinner_createEl = LoadingSpinner.prototype.createEl;\n LoadingSpinner.prototype.createEl = function(){\n var el = spinner_createEl.call(this);\n var rotator = vjs.createEl('div', {className: 'vjs-spinner-rotator'});\n rotator.appendChild(vjs.createEl('div', {\n className: 'vjs-spinner-left'}));\n rotator.appendChild(vjs.createEl('div', {\n className: 'vjs-spinner-right'}));\n el.appendChild(rotator);\n return el;\n };\n var tooltip_show = Tooltip.prototype.show;\n Tooltip.prototype.show = function(){\n if (this.timeout)\n {\n this.clearTimeout(this.timeout);\n this.timeout = 0;\n }\n return tooltip_show.apply(this, arguments);\n };\n};\n\nHolaSkin.prototype.get_ui_zoom = function(){\n var scale = 1;\n if (this.player&&!this.player.hasClass('vjs-ios-skin'))\n return this.ui_zoom = scale;\n var orientation = window.orientation;\n if (orientation!==undefined)\n {\n orientation = orientation===90||orientation==-90 ? 'horizontal' :\n 'vertical';\n }\n var screen = window.screen;\n if (!orientation||!screen)\n return this.ui_zoom = scale;\n var width_available = orientation=='vertical' ? screen.availWidth :\n screen.availHeight;\n if (width_available)\n scale = window.innerWidth/width_available;\n return this.ui_zoom = scale;\n};\n\nHolaSkin.prototype.patch_controls_ios = function(){\n if (this.opt.className!='vjs-ios-skin')\n return;\n var _this = this;\n var prefix = 'vjs-ios-';\n function init_control(el, icon, need_box){\n var bg = vjs.createEl('div', {className: prefix+'background-tint'});\n bg.appendChild(vjs.createEl('div', {className: prefix+'blur'}));\n bg.appendChild(vjs.createEl('div', {className: prefix+'tint'}));\n el.appendChild(bg);\n if (icon)\n {\n el.appendChild(vjs.createEl('div', {className: 'vjs-button-icon',\n innerHTML: typeof icon=='string' ? icon : ''}));\n }\n if (need_box!==false)\n el.className += ' vjs-ios-control-box';\n el.style.zoom = _this.get_ui_zoom();\n }\n // values are found empirically from the native iOS player\n this.controls_min_width = [{name: 'skipBackward', min_width: 306},\n {name: 'skipForward', min_width: 335},\n {name: 'currentTimeDisplay', min_width: 260}];\n var external_controls = this.external_controls = [\n 'volumeMenuButton', 'fullscreenToggle'];\n var controls = ControlBar.prototype.options_.children;\n var play_index = controls.indexOf('playToggle');\n if (play_index!=-1)\n {\n controls.splice(play_index+1, 0, 'skipForward');\n controls.splice(play_index, 0, 'skipBackward');\n }\n var controls_create_el = ControlBar.prototype.createEl;\n ControlBar.prototype.createEl = function(){\n var el = controls_create_el.call(this);\n init_control(el, null, false);\n return el;\n };\n var init_children = ControlBar.prototype.initChildren;\n ControlBar.prototype.initChildren = function(){\n var res = init_children.call(this);\n var _this = this;\n external_controls.forEach(function(name){\n var control = _this[name];\n if (control&&control.el_)\n _this.player_.el_.appendChild(control.el_);\n });\n return res;\n };\n var volume_create_el = VolumeMenuButton.prototype.createEl;\n VolumeMenuButton.prototype.createEl = function(){\n var el = volume_create_el.call(this);\n init_control(el, true);\n return el;\n };\n var fullscreen_create_el = FullscreenToggle.prototype.createEl;\n FullscreenToggle.prototype.createEl = function(){\n var el = fullscreen_create_el.call(this);\n init_control(el, true);\n return el;\n };\n var bigplaybutton_create_el = BigPlayButton.prototype.createEl;\n BigPlayButton.prototype.createEl = function(){\n var el = bigplaybutton_create_el.call(this);\n init_control(el, true, false);\n return el;\n };\n var seekbar_calculate = SeekBar.prototype.calculateDistance;\n SeekBar.prototype.calculateDistance = function(event){\n var zoom = _this.ui_zoom;\n var fake_event = {};\n fake_event.pageY = event.pageY / zoom;\n fake_event.pageX = event.pageX / zoom;\n if (event.changedTouches&&event.changedTouches[0]) {\n var touch = {};\n touch.pageX = event.changedTouches[0].pageX / zoom;\n touch.pageY = event.changedTouches[0].pageY / zoom;\n fake_event.changedTouches = [touch];\n }\n return seekbar_calculate.call(this, fake_event);\n };\n // hack to improve seeking on Android\n // handle touch events from progress-control component\n var seekbar_mousedown = SeekBar.prototype.handleMouseDown;\n SeekBar.prototype.handleMouseDown = function(event){\n if (this.mouse_down_pressed)\n return;\n this.mouse_down_pressed = true;\n seekbar_mousedown.call(this, event);\n };\n var seekbar_mouseup = SeekBar.prototype.handleMouseUp;\n SeekBar.prototype.handleMouseUp = function(event){\n if (!this.mouse_down_pressed)\n return;\n this.mouse_down_pressed = false;\n seekbar_mouseup.call(this, event);\n };\n var seekbar_mousemove = SeekBar.prototype.handleMouseMove;\n SeekBar.prototype.handleMouseMove = function(event){\n if (!this.mouse_down_pressed)\n return;\n var duration = this.player_.duration();\n var distance = this.calculateDistance(event);\n this.scrubbing_distance = distance;\n if (duration)\n {\n _this.scrubbing_percent = 0;\n var newTime = distance*duration;\n if (newTime===duration)\n newTime = newTime - 0.1;\n this.player_.currentTime(newTime);\n }\n else\n _this.scrubbing_percent = distance;\n if (this.update)\n this.update();\n // Immediate update for the time labels\n // disabled because native iOS player does not do this\n if (0)\n {\n this.player_.controlBar.currentTimeDisplay.updateContent();\n this.player_.controlBar.remainingTimeDisplay.updateContent();\n }\n };\n SeekBar.prototype.getPercent = function(){\n var duration = this.player_.duration();\n var percent;\n if (duration||!_this.scrubbing_percent)\n {\n percent = (this.player_.scrubbing()) ?\n this.scrubbing_distance :\n this.player_.currentTime() / duration;\n }\n else\n percent = _this.scrubbing_percent;\n return percent >= 1 ? 1 : percent;\n };\n};\n\nHolaSkin.prototype.update_scrubbing = function(){\n if (!this.scrubbing_percent)\n return;\n var duration = this.player.duration();\n if (duration===Infinity)\n {\n this.scrubbing_percent = 0;\n return;\n }\n if (!duration||this.player.hasClass('vjs-waiting'))\n return;\n var newTime = this.scrubbing_percent*duration;\n if (newTime===duration)\n newTime = newTime - 0.1;\n this.scrubbing_percent = 0;\n this.player.currentTime(newTime);\n};\n\nHolaSkin.prototype.resize = function(){\n var player = this.player;\n var width = this.el.offsetWidth;\n player.toggleClass('vjs-small', width<=480);\n function get_child(name){\n var control_bar = player.controlBar;\n return player[name]||(control_bar&&control_bar[name])||\n player.getChild(name);\n }\n var zoom = this.get_ui_zoom();\n ['controlBar', 'bigPlayButton', 'ShareButton']\n .concat(this.external_controls).forEach(function(name){\n var control = get_child(name);\n if (!control)\n return;\n var el = control.el();\n if (!el)\n return;\n el.style.zoom = zoom;\n });\n var s_width = width/zoom;\n this.controls_min_width.forEach(function(item){\n var control = get_child(item.name);\n if (!control)\n return;\n control.toggleClass('vjs-hidden', s_widthr.left || e.clientY 0 ? currentTime : 0;\n var isPod = false;\n var totalAds = 0;\n var adPosition;\n if (this.currentAd.getAdPodInfo()) {\n isPod = true;\n adPosition = this.currentAd.getAdPodInfo().getAdPosition();\n totalAds = this.currentAd.getAdPodInfo().getTotalAds();\n }\n\n // Update countdown timer data\n var podCount = ': ';\n if (isPod && (totalAds > 1)) {\n podCount = ' (' + adPosition + ' of ' + totalAds + '): ';\n }\n this.countdownDiv.innerHTML =\n this.settings.adLabel + podCount + formatTime(remainingTime);\n\n // Update UI\n var playProgressRatio = currentTime / duration;\n var playProgressPercent = playProgressRatio * 100;\n this.progressDiv.style.width = playProgressPercent + '%';\n this.updateVjsControls();\n }.bind(this);\n\n this.getPlayerWidth = function() {\n var retVal = parseInt(getComputedStyle(this.player.el()).width, 10) ||\n this.player.width();\n return retVal;\n }.bind(this);\n\n this.getPlayerHeight = function() {\n var retVal = parseInt(getComputedStyle(this.player.el()).height, 10) ||\n this.player.height();\n return retVal;\n }.bind(this);\n\n /**\n * Hides the ad controls on mouseout.\n * @private\n */\n var hideAdControls_ = function() {\n this.controlsDiv.style.height = '14px';\n this.playPauseDiv.style.display = 'none';\n this.muteDiv.style.display = 'none';\n this.sliderDiv.style.display = 'none';\n this.fullscreenDiv.style.display = 'none';\n }.bind(this);\n\n /**\n * Shows ad controls on mouseover.\n * @private\n */\n var showAdControls_ = function() {\n this.controlsDiv.style.height = '37px';\n this.playPauseDiv.style.display = 'block';\n this.muteDiv.style.display = 'block';\n this.sliderDiv.style.display = 'block';\n this.fullscreenDiv.style.display = 'block';\n }.bind(this);\n\n /**\n * Show pause and hide play button\n */\n var showPauseButton = function() {\n addClass_(this.playPauseDiv, 'ima-paused');\n removeClass_(this.playPauseDiv, 'ima-playing');\n }.bind(this);\n\n /**\n * Show play and hide pause button\n */\n var showPlayButton = function() {\n addClass_(this.playPauseDiv, 'ima-playing');\n removeClass_(this.playPauseDiv, 'ima-paused');\n }.bind(this);\n\n /**\n * Listener for clicks on the play/pause button during ad playback.\n * @private\n */\n var onAdPlayPauseClick_ = function() {\n if (this.adPlaying) {\n showPauseButton();\n this.adsManager.pause();\n this.adPlaying = false;\n } else {\n showPlayButton();\n this.adsManager.resume();\n this.adPlaying = true;\n }\n }.bind(this);\n\n /**\n * Listener for clicks on the mute button during ad playback.\n * @private\n */\n var onAdMuteClick_ = function() {\n if (this.adMuted) {\n addClass_(this.muteDiv, 'ima-non-muted');\n removeClass_(this.muteDiv, 'ima-muted');\n this.adsManager.setVolume(1);\n // Bubble down to content player\n this.player.muted(false);\n this.adMuted = false;\n this.sliderLevelDiv.style.width = this.player.volume() * 100 + \"%\";\n } else {\n addClass_(this.muteDiv, 'ima-muted');\n removeClass_(this.muteDiv, 'ima-non-muted');\n this.adsManager.setVolume(0);\n // Bubble down to content player\n this.player.muted(true);\n this.adMuted = true;\n this.sliderLevelDiv.style.width = \"0%\";\n }\n }.bind(this);\n\n /* Listener for mouse down events during ad playback. Used for volume.\n * @private\n */\n var onAdVolumeSliderMouseDown_ = function() {\n document.addEventListener(eventTypes.mouseup, onMouseUp_, false);\n document.addEventListener(eventTypes.mousemove, onMouseMove_, false);\n };\n\n /* Mouse movement listener used for volume slider.\n * @private\n */\n var onMouseMove_ = function(event) {\n setVolumeSlider_(event);\n };\n\n /* Mouse release listener used for volume slider.\n * @private\n */\n var onMouseUp_ = function(event) {\n setVolumeSlider_(event);\n document.removeEventListener(eventTypes.mousemove, onMouseMove_);\n document.removeEventListener(eventTypes.mouseup, onMouseUp_);\n };\n\n /* Utility function to set volume and associated UI\n * @private\n */\n var setVolumeSlider_ = function(event) {\n var clientX = event.changedTouches ? event.changedTouches[0].clientX :\n event.clientX;\n var percent = (clientX - this.sliderDiv.getBoundingClientRect().left) /\n this.sliderDiv.offsetWidth;\n percent *= 100;\n //Bounds value 0-100 if mouse is outside slider region.\n percent = Math.min(Math.max(percent, 0), 100);\n this.sliderLevelDiv.style.width = percent + \"%\";\n this.player.volume(percent / 100); //0-1\n this.adsManager.setVolume(percent / 100);\n if (this.player.volume() == 0) {\n addClass_(this.muteDiv, 'ima-muted');\n removeClass_(this.muteDiv, 'ima-non-muted');\n this.player.muted(true);\n this.adMuted = true;\n }\n else\n {\n addClass_(this.muteDiv, 'ima-non-muted');\n removeClass_(this.muteDiv, 'ima-muted');\n this.player.muted(false);\n this.adMuted = false;\n }\n }.bind(this);\n\n /**\n * Listener for clicks on the fullscreen button during ad playback.\n * @private\n */\n var onAdFullscreenClick_ = function() {\n if (this.player.isFullscreen()) {\n this.player.exitFullscreen();\n } else {\n this.player.requestFullscreen();\n }\n }.bind(this);\n\n /**\n * Listens for the video.js player to change its fullscreen status. This\n * keeps the fullscreen-ness of the AdContainer in sync with the player.\n * @private\n */\n var onFullscreenChange_ = function() {\n if (this.player.isFullscreen()) {\n addClass_(this.fullscreenDiv, 'ima-fullscreen');\n removeClass_(this.fullscreenDiv, 'ima-non-fullscreen');\n if (this.adsManager) {\n this.adsManager.resize(\n window.screen.width,\n window.screen.height,\n google.ima.ViewMode.FULLSCREEN);\n }\n } else {\n addClass_(this.fullscreenDiv, 'ima-non-fullscreen');\n removeClass_(this.fullscreenDiv, 'ima-fullscreen');\n if (this.adsManager) {\n this.adsManager.resize(\n this.getPlayerWidth(),\n this.getPlayerHeight(),\n google.ima.ViewMode.NORMAL);\n }\n }\n }.bind(this);\n\n /**\n * Listens for the video.js player to change its volume. This keeps the ad\n * volume in sync with the content volume if the volume of the player is\n * changed while content is playing\n * @private\n */\n var onVolumeChange_ = function() {\n var newVolume = this.player.muted() ? 0 : this.player.volume();\n if (this.adsManager) {\n this.adsManager.setVolume(newVolume);\n }\n // Update UI\n if (newVolume == 0) {\n this.adMuted = true;\n addClass_(this.muteDiv, 'ima-muted');\n removeClass_(this.muteDiv, 'ima-non-muted');\n this.sliderLevelDiv.style.width = '0%';\n } else {\n this.adMuted = false;\n addClass_(this.muteDiv, 'ima-non-muted');\n removeClass_(this.muteDiv, 'ima-muted');\n this.sliderLevelDiv.style.width = newVolume * 100 + '%';\n }\n }.bind(this);\n\n /**\n * Seeks content to 00:00:00. This is used as an event handler for the\n * loadedmetadata event, since seeking is not possible until that event has\n * fired.\n * @private\n */\n var seekContentToZero_ = function() {\n this.player.off('loadedmetadata', seekContentToZero_);\n this.player.currentTime(0);\n }.bind(this);\n\n /**\n * Seeks content to 00:00:00 and starts playback. This is used as an event\n * handler for the loadedmetadata event, since seeking is not possible until\n * that event has fired.\n * @private\n */\n var playContentFromZero_ = function() {\n this.player.off('loadedmetadata', playContentFromZero_);\n this.player.currentTime(0);\n this.player.play();\n }.bind(this);\n\n /**\n * Destroys the AdsManager, sets it to null, and calls contentComplete to\n * reset correlators. Once this is done it requests ads again to keep the\n * inventory available.\n * @private\n */\n var resetIMA_ = function() {\n this.adsActive = false;\n this.adPlaying = false;\n this.restoreLoop();\n this.player.on('contentended', this.localContentEndedListener);\n if (this.currentAd && this.currentAd.isLinear()) {\n this.showAdContainer(false);\n }\n this.vjsControls.show();\n this.player.ads.endLinearAdMode();\n this.updateVjsControls();\n if (this.adTrackingTimer) {\n // If this is called while an ad is playing, stop trying to get that\n // ad's current time.\n clearInterval(this.adTrackingTimer);\n }\n if (this.adsManager) {\n this.adsManager.destroy();\n this.adsManager = null;\n }\n if (this.adsLoader && !this.contentComplete) {\n this.adsLoader.contentComplete();\n }\n this.contentComplete = false;\n this.allAdsCompleted = false;\n }.bind(this);\n\n /**\n * Ads an EventListener to the AdsManager. For a list of available events,\n * see\n * https://developers.google.com/interactive-media-ads/docs/sdks/html5/v3/apis#ima.AdEvent.Type\n * @param {google.ima.AdEvent.Type} event The AdEvent.Type for which to listen.\n * @param {function} callback The method to call when the event is fired.\n */\n this.addEventListener = function(event, callback) {\n if (this.adsManager) {\n this.adsManager.addEventListener(event, callback);\n }\n }.bind(this);\n\n /**\n * Returns the instance of the AdsManager.\n * @return {google.ima.AdsManager} The AdsManager being used by the plugin.\n */\n this.getAdsManager = function() {\n return this.adsManager;\n }.bind(this);\n\n /**\n * DEPRECATED: Use setContentWithAdTag.\n * Sets the content of the video player. You should use this method instead\n * of setting the content src directly to ensure the proper ad tag is\n * requested when the video content is loaded.\n * @param {?string} contentSrc The URI for the content to be played. Leave\n * blank to use the existing content.\n * @param {?string} adTag The ad tag to be requested when the content loads.\n * Leave blank to use the existing ad tag.\n * @param {?boolean} playOnLoad True to play the content once it has loaded,\n * false to only load the content but not start playback.\n */\n this.setContent = function(contentSrc, adTag, playOnLoad) {\n window.console.log(\n 'WARNING: player.ima.setContent is deprecated. Use ' +\n 'player.ima.setContentWithAdTag instead.');\n this.setContentWithAdTag(contentSrc, adTag, playOnLoad);\n }.bind(this);\n\n /**\n * Sets the content of the video player. You should use this method instead\n * of setting the content src directly to ensure the proper ad tag is\n * requested when the video content is loaded.\n * @param {?string} contentSrc The URI for the content to be played. Leave\n * blank to use the existing content.\n * @param {?string} adTag The ad tag to be requested when the content loads.\n * Leave blank to use the existing ad tag.\n * @param {?boolean} playOnLoad True to play the content once it has loaded,\n * false to only load the content but not start playback.\n */\n this.setContentWithAdTag = function(contentSrc, adTag, playOnLoad) {\n resetIMA_();\n this.settings.adTagUrl = adTag ? adTag : this.settings.adTagUrl;\n changeSource_(contentSrc, playOnLoad);\n }.bind(this);\n\n /**\n * Sets the content of the video player. You should use this method instead\n * of setting the content src directly to ensure the proper ads response is\n * used when the video content is loaded.\n * @param {?string} contentSrc The URI for the content to be played. Leave\n * blank to use the existing content.\n * @param {?string} adsResponse The ads response to be requested when the\n * content loads. Leave blank to use the existing ads response.\n * @param {?boolean} playOnLoad True to play the content once it has loaded,\n * false to only load the content but not start playback.\n */\n this.setContentWithAdsResponse = function(contentSrc, adsResponse, playOnLoad) {\n resetIMA_();\n this.settings.adsResponse = adsResponse ? adsResponse : this.settings.adsResponse;\n changeSource_(contentSrc, playOnLoad);\n }.bind(this);\n\n /**\n * Plays an ad immediately\n * @param {?string} adTag The ad tag to be requested.\n * Leave blank to use the existing ad tag.\n */\n this.playAd = function(adTag) {\n resetIMA_();\n this.settings.adTagUrl = adTag ? adTag : this.settings.adTagUrl;\n this.showAdContainer(true);\n this.requestAds();\n }.bind(this);\n\n /**\n * Changes the player source.\n * @param {?string} contentSrc The URI for the content to be played. Leave\n * blank to use the existing content.\n * @param {?boolean} playOnLoad True to play the content once it has loaded,\n * false to only load the content but not start playback.\n * @private\n */\n var changeSource_ = function(contentSrc, playOnLoad) {\n // Only try to pause the player when initialised with a source already\n if (!!this.player.currentSrc()) {\n this.player.currentTime(0);\n this.player.pause();\n }\n if (contentSrc) {\n this.player.src(contentSrc);\n }\n if (playOnLoad) {\n this.player.on('loadedmetadata', playContentFromZero_);\n } else {\n this.player.on('loadedmetadata', seekContentToZero_);\n }\n }.bind(this);\n\n /**\n * Adds a listener for the 'contentended' event of the video player. This should be\n * used instead of setting an 'contentended' listener directly to ensure that the\n * ima can do proper cleanup of the SDK before other event listeners\n * are called.\n * @param {function} listener The listener to be called when content completes.\n */\n this.addContentEndedListener = function(listener) {\n this.contentEndedListeners.push(listener);\n }.bind(this);\n\n /**\n * Adds a listener that will be called when content and all ads have\n * finished playing.\n * @param {function} listener The listener to be called when content and ads complete.\n */\n this.addContentAndAdsEndedListener = function(listener) {\n this.contentAndAdsEndedListeners.push(listener);\n }.bind(this);\n\n /**\n * Sets the listener to be called to trigger manual ad break playback.\n * @param {function} listener The listener to be called to trigger manual ad break playback.\n */\n this.setAdBreakReadyListener = function(listener) {\n this.adBreakReadyListener = listener;\n }.bind(this);\n\n /**\n * Pauses the ad.\n */\n this.pauseAd = function() {\n if (this.adsActive && this.adPlaying) {\n showPauseButton();\n this.adsManager.pause();\n this.adPlaying = false;\n }\n }.bind(this);\n\n /**\n * Resumes the ad.\n */\n this.resumeAd = function() {\n if (this.adsActive && !this.adPlaying) {\n showPlayButton();\n this.adsManager.resume();\n this.adPlaying = true;\n }\n }.bind(this);\n\n /**\n * Set up intervals to check for seeking and update current video time.\n * @private\n */\n var setUpPlayerIntervals_ = function() {\n this.updateTimeIntervalHandle =\n setInterval(updateCurrentTime_, this.seekCheckInterval);\n this.seekCheckIntervalHandle =\n setInterval(checkForSeeking_, this.seekCheckInterval);\n this.resizeCheckIntervalHandle =\n setInterval(checkForResize_, this.resizeCheckInterval);\n }.bind(this);\n\n /**\n * Updates the start time of the video\n * @private\n */\n var updateStartTime_ = function(){\n var cur = this.player.currentTime();\n if (!cur || this.player.ads.state!='content-playback')\n return;\n // first time that isn't zero is our start time, but only if it's\n // more than the 1sec\n if (cur<1)\n cur = 0;\n this.contentPlayheadTracker.startTime = cur;\n this.player.off('timeupdate', updateStartTime_);\n }.bind(this);\n\n /**\n * Updates the current time of the video\n * @private\n */\n var updateCurrentTime_ = function() {\n if (this.player.ads.state=='content-playback' &&\n !this.contentPlayheadTracker.seeking &&\n this.contentPlayheadTracker.startTime>=0) {\n this.contentPlayheadTracker.currentTime = this.player.currentTime() -\n this.contentPlayheadTracker.startTime;\n }\n }.bind(this);\n\n /**\n * Detects when the user is seeking through a video.\n * This is used to prevent mid-rolls from playing while a user is seeking.\n *\n * There *is* a seeking property of the HTML5 video element, but it's not\n * properly implemented on all platforms (e.g. mobile safari), so we have to\n * check ourselves to be sure.\n *\n * @private\n */\n var checkForSeeking_ = function() {\n if (this.player.ads.state!='content-playback')\n return;\n var tempCurrentTime = this.player.currentTime();\n var diff = (tempCurrentTime - this.contentPlayheadTracker.previousTime) * 1000;\n if (Math.abs(diff) > this.seekCheckInterval + this.seekThreshold) {\n this.contentPlayheadTracker.seeking = true;\n } else {\n this.contentPlayheadTracker.seeking = false;\n }\n this.contentPlayheadTracker.previousTime = this.player.currentTime();\n }.bind(this);\n\n /**\n * Detects when the player is resized (for fluid support) and resizes the\n * ads manager to match.\n *\n * @private\n */\n var checkForResize_ = function() {\n var currentWidth = this.getPlayerWidth();\n var currentHeight = this.getPlayerHeight();\n\n if (this.adsManager && (currentWidth != this.adsManagerDimensions.width ||\n currentHeight != this.adsManagerDimensions.height)) {\n this.adsManagerDimensions.width = currentWidth;\n this.adsManagerDimensions.height = currentHeight;\n this.adsManager.resize(currentWidth, currentHeight, google.ima.ViewMode.NORMAL);\n }\n }.bind(this);\n\n /**\n * Changes the flag to show or hide the ad countdown timer.\n *\n * @param {boolean} showCountdownIn Show or hide the countdown timer.\n */\n this.setShowCountdown = function(showCountdownIn) {\n this.showCountdown = showCountdownIn;\n this.countdownDiv.style.display = this.showCountdown ? '' : 'none';\n }.bind(this);\n\n /**\n * Current plugin version.\n */\n this.VERSION = '0.2.0';\n\n /**\n * Stores user-provided settings.\n */\n this.settings;\n\n /**\n * Used to prefix videojs ima\n */\n this.controlPrefix;\n\n /**\n * Video element playing content.\n */\n this.contentPlayer;\n\n /**\n * Boolean flag to show or hide the ad countdown timer.\n */\n this.showCountdown;\n\n /**\n * Boolena flag to enable manual ad break playback.\n */\n this.autoPlayAdBreaks;\n\n /**\n * Video.js control bar.\n */\n this.vjsControls;\n\n /**\n * Div used as an ad container.\n */\n this.adContainerDiv;\n\n /**\n * Div used to display ad controls.\n */\n this.controlsDiv;\n\n /**\n * Div used to display ad countdown timer.\n */\n this.countdownDiv;\n\n /**\n * Div used to display add seek bar.\n */\n this.seekBarDiv;\n\n /**\n * Div used to display ad progress (in seek bar).\n */\n this.progressDiv;\n\n /**\n * Div used to display ad play/pause button.\n */\n this.playPauseDiv;\n\n /**\n * Div used to display ad mute button.\n */\n this.muteDiv;\n\n /**\n * Div used by the volume slider.\n */\n this.sliderDiv;\n\n /**\n * Volume slider level visuals\n */\n this.sliderLevelDiv;\n\n /**\n * Div used to display ad fullscreen button.\n */\n this.fullscreenDiv;\n\n /**\n * IMA SDK AdDisplayContainer.\n */\n this.adDisplayContainer;\n\n /**\n * True if the AdDisplayContainer has been initialized. False otherwise.\n */\n this.adDisplayContainerInitialized = false;\n\n /**\n * IMA SDK AdsLoader\n */\n this.adsLoader;\n\n /**\n * IMA SDK AdsManager\n */\n this.adsManager;\n\n /**\n * IMA SDK AdsRenderingSettings.\n */\n this.adsRenderingSettings = null;\n\n /**\n * Ad tag URL. Should return VAST, VMAP, or ad rules.\n */\n this.adTagUrl;\n\n /**\n * VAST, VMAP, or ad rules response. Used in lieu of fetching a response\n * from an ad tag URL.\n */\n this.adsResponse;\n\n /**\n * Current IMA SDK Ad.\n */\n this.currentAd;\n\n /**\n * Timer used to track content progress.\n */\n this.contentTrackingTimer;\n\n /**\n * Timer used to track ad progress.\n */\n this.adTrackingTimer;\n\n /**\n * True if ads are currently displayed, false otherwise.\n * True regardless of ad pause state if an ad is currently being displayed.\n */\n this.adsActive = false;\n\n /**\n * True if ad is currently playing, false if ad is paused or ads are not\n * currently displayed.\n */\n this.adPlaying = false;\n\n /**\n * True if the ad is muted, false otherwise.\n */\n this.adMuted = false;\n\n /**\n * True if our content video has completed, false otherwise.\n */\n this.contentComplete = false;\n\n /**\n * True if ALL_ADS_COMPLETED has fired, false until then.\n */\n this.allAdsCompleted = false;\n\n /**\n * Handle to interval that repeatedly updates current time.\n */\n this.updateTimeIntervalHandle;\n\n /**\n * Handle to interval that repeatedly checks for seeking.\n */\n this.seekCheckIntervalHandle;\n\n /**\n * Interval (ms) on which to check if the user is seeking through the\n * content.\n */\n this.seekCheckInterval = 1000;\n\n /**\n * Handle to interval that repeatedly checks for player resize.\n */\n this.resizeCheckIntervalHandle;\n\n /**\n * Interval (ms) to check for player resize for fluid support.\n */\n this.resizeCheckInterval = 250;\n\n /**\n * Threshold by which to judge user seeking. We check every 1000 ms to see\n * if the user is seeking. In order for us to decide that they are *not*\n * seeking, the content video playhead must only change by 900-1100 ms\n * between checks. Any greater change and we assume the user is seeking\n * through the video.\n */\n this.seekThreshold = 100;\n\n /**\n * Stores data for the content playhead tracker.\n */\n this.contentPlayheadTracker = {\n currentTime: 0,\n previousTime: 0,\n seeking: false,\n duration: 0,\n startTime: -1\n };\n\n /**\n * Stores data for the ad playhead tracker.\n */\n this.adPlayheadTracker = {\n currentTime: 0,\n duration: 0,\n isPod: false,\n adPosition: 0,\n totalAds: 0\n };\n\n /**\n * Stores the dimensions for the ads manager.\n */\n this.adsManagerDimensions = {\n width: 0,\n height: 0\n };\n\n /**\n * Content ended listeners passed by the publisher to the plugin. Publishers\n * should allow the plugin to handle content ended to ensure proper support\n * of custom ad playback.\n */\n this.contentEndedListeners = [];\n\n /**\n * Content and ads ended listeners passed by the publisher to the plugin.\n * These will be called when the plugin detects that content *and all\n * ads* have completed. This differs from the contentEndedListeners in that\n * contentEndedListeners will fire between content ending and a post-roll\n * playing, whereas the contentAndAdsEndedListeners will fire after the\n * post-roll completes.\n */\n this.contentAndAdsEndedListeners = [];\n\n /**\n * Listener to be called to trigger manual ad break playback.\n */\n this.adBreakReadyListener = undefined;\n\n /**\n * Stores the content source so we can re-populate it manually after a\n * post-roll on iOS.\n */\n this.contentSource = '';\n\n /**\n * Local content ended listener for contentComplete.\n */\n this.localContentEndedListener = function() {\n if (this.adsLoader && !this.contentComplete) {\n this.adsLoader.contentComplete();\n this.contentComplete = true;\n }\n for (var index in this.contentEndedListeners) {\n this.contentEndedListeners[index]();\n }\n if (this.allAdsCompleted) {\n for (var index in this.contentAndAdsEndedListeners) {\n this.contentAndAdsEndedListeners[index]();\n }\n }\n clearInterval(this.updateTimeIntervalHandle);\n clearInterval(this.seekCheckIntervalHandle);\n clearInterval(this.resizeCheckIntervalHandle);\n if(this.player.el()) {\n this.player.one('play', setUpPlayerIntervals_);\n }\n }.bind(this);\n\n this.playerDisposedListener = function(){\n this.contentEndedListeners, this.contentAndAdsEndedListeners = [], [];\n this.contentComplete = true;\n this.player.off('contentended', this.localContentEndedListener);\n this.player.off('timeupdate', updateStartTime_);\n\n // Bug fix: https://github.com/googleads/videojs-ima/issues/306\n if (this.player.ads.adTimeoutTimeout) {\n clearTimeout(this.player.ads.adTimeoutTimeout);\n }\n\n var intervalsToClear = [this.updateTimeIntervalHandle, this.seekCheckIntervalHandle,\n this.adTrackingTimer, this.resizeCheckIntervalHandle];\n for (var index in intervalsToClear) {\n var interval = intervalsToClear[index];\n if (interval) {\n clearInterval(interval);\n }\n }\n if (this.adsManager) {\n this.adsManager.destroy();\n this.adsManager = null;\n }\n }.bind(this);\n\n this.initVjsControls = function() {\n var _this = this;\n var override = function(cls, obj, method, fn, always) {\n var orig = cls.prototype[method];\n return obj[method] = function() {\n return _this.adsActive || always ? fn && fn.apply(this, arguments) :\n orig && orig.apply(this, arguments);\n };\n };\n var overrideHandler = function(cls, obj, target, event, method, fn, always) {\n var orig = cls.prototype[method];\n var handler = override(cls, obj, method, fn);\n if (target) {\n obj.off(target, event, orig);\n obj.on(target, event, handler);\n } else {\n obj.off(event, orig);\n obj.on(event, handler);\n }\n };\n var PlayToggle = videojs.getComponent('PlayToggle');\n var playToggle = this.vjsControls.playToggle;\n overrideHandler(PlayToggle, playToggle, null, ['tap', 'click'],\n 'handleClick', function() {\n onAdPlayPauseClick_();\n if (_this.adPlaying) {\n this.handlePlay();\n } else {\n this.handlePause();\n }\n });\n override(PlayToggle, playToggle, 'update', function() {\n var paused = _this.adsActive ? !_this.adPlaying : player.paused();\n this.toggleClass('vjs-play-control-ad', _this.adsActive);\n this.toggleClass('vjs-paused', paused);\n this.toggleClass('vjs-playing', !paused);\n var text = paused ? 'Play' : 'Pause';\n if (text != this.controlText())\n this.controlText(text);\n }, true);\n overrideHandler(PlayToggle, playToggle, player, 'play',\n 'handlePlay', function() { this.update(); }, true);\n overrideHandler(PlayToggle, playToggle, player, 'pause',\n 'handlePause', function() { this.update(); }, true);\n\n var SeekBar = videojs.getComponent('SeekBar');\n var DvrSeekBar = videojs.getComponent('DvrSeekBar');\n var seekBar = this.vjsControls.progressControl.seekBar;\n var getPercent = function() {\n var duration = _this.currentAd && _this.currentAd.getDuration();\n if (!duration || duration<0) {\n return 0;\n }\n var remainingTime = _this.adsManager.getRemainingTime();\n var currentTime = Math.max(duration - remainingTime, 0);\n return currentTime / duration;\n };\n override(SeekBar, seekBar, 'getPercent', getPercent);\n if (DvrSeekBar) {\n override(DvrSeekBar, seekBar, 'getPercent', getPercent);\n }\n overrideHandler(SeekBar, seekBar, null, ['mousedown', 'touchstart'],\n 'handleMouseDown', null);\n overrideHandler(SeekBar, seekBar, null, 'focus', 'handleFocus', null);\n\n var DurationDisplay = videojs.getComponent('DurationDisplay');\n var durationDisplay = this.vjsControls.durationDisplay;\n overrideHandler(DurationDisplay, durationDisplay, player,\n ['timeupdate', 'loadedmetadata'], 'updateContent', function() {\n var duration = _this.currentAd && _this.currentAd.getDuration();\n if (duration && duration != this.duration_) {\n this.duration_ = duration;\n this.contentEl_.innerHTML = ''+\n this.localize('Duration Time')+' '+formatTime(duration);\n }\n });\n\n var CurrentTimeDisplay = videojs.getComponent('CurrentTimeDisplay');\n var currentTimeDisplay = this.vjsControls.currentTimeDisplay;\n overrideHandler(CurrentTimeDisplay, currentTimeDisplay, player,\n ['timeupdate', 'loadedmetadata'], 'updateContent', function() {\n var duration = _this.currentAd && _this.currentAd.getDuration();\n if (!duration) {\n return;\n }\n var time = duration - _this.adsManager.getRemainingTime();\n var formattedTime = formatTime(time);\n if (formattedTime !== this.formattedTime_) {\n this.formattedTime_ = formattedTime;\n this.contentEl_.innerHTML = ''+\n this.localize('Current Time')+' '+formattedTime;\n }\n });\n }.bind(this);\n\n this.updateVjsControls = function() {\n if (!this.settings.vjsControls) {\n return;\n }\n this.player.toggleClass('vjs-ad-paused',\n this.adsActive && !this.adPlaying);\n var controls = this.vjsControls;\n controls.playToggle.update();\n controls.progressControl.seekBar.update();\n controls.durationDisplay.updateContent();\n controls.currentTimeDisplay.updateContent();\n var duration = this.currentAd && this.currentAd.getDuration();\n var display = !this.adsActive || duration && duration>=0 ? '' : 'none';\n controls.durationDisplay.el().style.display = display;\n controls.currentTimeDisplay.el().style.display = display;\n controls.timeDivider.el().style.display = display;\n }.bind(this);\n\n var getPosition = function(el) {\n var box = el.getBoundingClientRect();\n var docEl = document.documentElement;\n var body = document.body;\n var clientLeft = docEl.clientLeft || body.clientLeft || 0;\n var scrollLeft = window.pageXOffset || body.scrollLeft;\n var left = box.left + scrollLeft - clientLeft;\n var clientTop = docEl.clientTop || body.clientTop || 0;\n var scrollTop = window.pageYOffset || body.scrollTop;\n var top = box.top + scrollTop - clientTop;\n return {\n left: left,\n top: top,\n width: box.width,\n height: box.height,\n };\n };\n\n // proxy click events to the video element when non-linear ad is active\n this.proxyClickEvents = function() {\n var events = (videojs.browser.IS_ANDROID || videojs.browser.IS_IOS) ?\n ['touchstart', 'touchend'] :\n ['click', 'dblclick', 'mousedown', 'mouseup'];\n var player = this.player, el = player.el(), _this = this;\n events.forEach(function(eventName) {\n el.addEventListener(eventName, function(e) {\n var ad = _this.currentAd, t = e.target;\n if (!ad || ad.isLinear() || t.nodeName!='IFRAME' || e.isTrusted) {\n return;\n }\n // ignore clicks on ad ui elements\n var adWidth = ad.getWidth() || ad.getVastMediaWidth();\n var adHeight = ad.getHeight() || ad.getVastMediaHeight();\n var pos = getPosition(t);\n var touch = e.touches && e.touches[0];\n var x = touch ? touch.pageX : e.clientX;\n var y = touch ? touch.pageY : e.clientY;\n var adRight = pos.left+pos.width-(pos.width-adWidth)/2;\n var adTop = pos.top+pos.height-adHeight-4;\n // click on close button\n if (x(adRight-40) && y>adTop && y<(adTop+30)) {\n return;\n }\n // click on recall button\n if (x>(pos.left+pos.width/2-15) && x<(pos.left+pos.width/2+15) &&\n y>(pos.top+pos.height-15)) {\n return;\n }\n var newEvent;\n var opt = {};\n for (var key in e) {\n opt[key] = e[key];\n }\n opt.bubbles = false;\n try {\n newEvent = new e.constructor(e.type, opt);\n } catch (err) {\n // special case for IE11\n newEvent = document.createEvent('MouseEvent');\n newEvent.initMouseEvent(e.type, opt.bubbles, opt.cancelable,\n opt.view, opt.detail, opt.screenX, opt.screenY, opt.clientX,\n opt.clientY, opt.ctrlKey, opt.altKey, opt.shiftKey, opt.metaKey,\n opt.button, null);\n }\n newEvent.stopPropagation();\n player.tech_.trigger(newEvent);\n });\n });\n }.bind(this);\n\n this.settings = extend({}, ima_defaults, options || {});\n this.settings.adLabel = this.player.localize(this.settings.adLabel);\n\n // Currently this isn't used but I can see it being needed in the future, so\n // to avoid implementation problems with later updates I'm requiring it.\n if (!this.settings['id']) {\n window.console.log('Error: must provide id of video.js div');\n return;\n }\n\n this.controlPrefix = (this.settings.id + '_') || '';\n\n this.contentPlayer = this.player.$('.vjs-tech');\n // Default showing countdown timer to true.\n this.showCountdown = true;\n if (this.settings['showCountdown'] == false) {\n this.showCountdown = false;\n }\n\n this.autoPlayAdBreaks = true;\n if (this.settings['autoPlayAdBreaks'] == false) {\n this.autoPlayAdBreaks = false;\n }\n\n var contrib_ads_defaults = {\n debug: this.settings.debug,\n timeout: this.settings.timeout,\n prerollTimeout: this.settings.prerollTimeout\n };\n\n var ads_plugin_settings =\n extend({}, contrib_ads_defaults, options['contribAdsSettings'] || {});\n\n player.ads(ads_plugin_settings);\n\n player.one('play', setUpPlayerIntervals_);\n player.on('contentended', this.localContentEndedListener);\n player.on('dispose', this.playerDisposedListener);\n player.on('timeupdate', updateStartTime_);\n this.adsRenderingSettings = new google.ima.AdsRenderingSettings();\n this.adsRenderingSettings.restoreCustomPlaybackStateOnAdBreakComplete = true;\n if (this.settings['adsRenderingSettings']) {\n for (var setting in this.settings['adsRenderingSettings']) {\n this.adsRenderingSettings[setting] =\n this.settings['adsRenderingSettings'][setting];\n }\n }\n\n if (this.settings['locale']) {\n google.ima.settings.setLocale(this.settings['locale']);\n }\n\n createAdContainer_();\n this.adsLoader = new google.ima.AdsLoader(this.adDisplayContainer);\n\n this.adsLoader.getSettings().setVpaidMode(\n google.ima.ImaSdkSettings.VpaidMode.ENABLED);\n if (this.settings.vpaidAllowed == false) {\n this.adsLoader.getSettings().setVpaidMode(\n google.ima.ImaSdkSettings.VpaidMode.DISABLED);\n }\n if (this.settings.vpaidMode) {\n this.adsLoader.getSettings().setVpaidMode(this.settings.vpaidMode);\n }\n\n if (this.settings.locale) {\n this.adsLoader.getSettings().setLocale(this.settings.locale);\n }\n\n if (this.settings.numRedirects) {\n this.adsLoader.getSettings().setNumRedirects(this.settings.numRedirects);\n }\n\n this.adsLoader.getSettings().setPlayerType('videojs-ima');\n this.adsLoader.getSettings().setPlayerVersion(this.VERSION);\n this.adsLoader.getSettings().setAutoPlayAdBreaks(this.autoPlayAdBreaks);\n\n this.adsLoader.addEventListener(\n google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,\n onAdsManagerLoaded_,\n false);\n this.adsLoader.addEventListener(\n google.ima.AdErrorEvent.Type.AD_ERROR,\n onAdsLoaderError_,\n false);\n\n if (!readyCallback) {\n readyCallback = this.startFromReadyCallback;\n }\n player.on('readyforpreroll', readyCallback);\n player.ready(function() {\n player.on('fullscreenchange', onFullscreenChange_);\n player.on('volumechange', onVolumeChange_);\n });\n this.proxyClickEvents();\n };\n\n videojs.plugin('ima', init);\n});\n\n","(function(window, videojs, document, undefined){\n'use strict';\n/*jshint browser:true*/\n\nvar Flash = videojs.getComponent('Flash');\n\nvar Osmf = videojs.extend(Flash, {\n constructor: function(options, ready){\n var source = options.source;\n var _player = videojs(options.playerId);\n _player.osmf = this;\n options.flashVars = {\n 'playerId': options.playerId,\n 'readyFunction': 'onReady',\n 'eventProxyFunction': 'onEvent',\n 'errorEventProxyFunction': 'onError'\n };\n Flash.call(this, options, ready);\n this.firstplay = false;\n this.loadstart = false;\n _player.on('loadeddata', Osmf.onLoadedData);\n _player.on('ended', Osmf.onEnded);\n options.source = source;\n }\n});\n\nOsmf.formats = {\n 'application/adobe-f4m': 'F4M',\n 'application/adobe-f4v': 'F4V',\n 'application/dash+xml': 'MPD'\n};\n\nOsmf.canPlaySource = function(src){\n var type = src.type.replace(/;.*/, '').toLowerCase();\n return type in Osmf.formats ? 'maybe' : '';\n};\n\nOsmf.log_enabled = false;\n\nvar api = Osmf.prototype;\nvar readWrite = ['preload', 'defaultPlaybackRate', 'playbackRate', 'autoplay',\n 'loop', 'mediaGroup', 'controller', 'controls', 'volume', 'muted',\n 'defaultMuted'];\nvar readOnly = ['error', 'networkState', 'readyState', 'seeking', 'videoWidth',\n 'startOffsetTime', 'paused', 'played', 'ended', 'streamType',\n 'initialTime', 'videoHeight', 'currentLevel', 'levels'];\n\nvar createSetter = function(attr){\n var attrUpper = attr.charAt(0).toUpperCase()+attr.slice(1);\n api['set'+attrUpper] = function(val){\n if (!this.el_.vjs_setProperty)\n return;\n return this.el_.vjs_setProperty(attr, val);\n };\n};\n\nvar createGetter = function(attr){\n api[attr] = function(){\n if (!this.el_.vjs_getProperty)\n return;\n return this.el_.vjs_getProperty(attr);\n };\n};\n\n(function(){\n for (var i = 0; i=10; };\n\nOsmf.onLoadedData = function(){\n var player = this;\n if (player.options_.autoplay)\n player.play();\n else if (player.options_.preload && player.options_.preload!=='none')\n {\n if (player.currentTime())\n player.currentTime(0);\n player.play();\n player.pause();\n player.bigPlayButton.show();\n player.bigPlayButton.one('click', function(){\n player.bigPlayButton.hide(); });\n }\n};\n\nOsmf.onEnded = function(){\n if (this.options().loop)\n this.currentTime(0);\n this.pause();\n};\n\nOsmf.onReady = function(currentSwf){\n if (Osmf.log_enabled)\n videojs.log('OSMF', 'Ready', currentSwf);\n Flash.onReady(currentSwf);\n var tech = document.getElementById(currentSwf).tech;\n if (tech.currentSrc() && tech.currentSrc().length>0)\n tech.el_.vjs_src(tech.currentSrc());\n};\n\nOsmf.onError = function(currentSwf, err){\n var tech = document.getElementById(currentSwf).tech;\n if (err=='loaderror')\n err = 'srcnotfound';\n if (Osmf.log_enabled)\n videojs.log('OSMF', 'Error', err);\n if (tech.options_.reconnectOnError && !tech.reconnecting_)\n {\n tech.reconnecting_ = true;\n tech.trigger(\"waiting\");\n setTimeout(function(){\n tech.src(tech.currentSrc());\n tech.reconnecting_ = false;\n tech.error(null);\n }, 5000);\n }\n tech.error({code: 4, msg: \"\"});\n};\n\nOsmf.onEvent = function(currentSwf, event, data){\n var tech = document.getElementById(currentSwf).tech;\n switch (event)\n {\n case 'playing':\n if (tech.firstplay===false)\n {\n if (Osmf.log_enabled)\n videojs.log('OSMF', 'Event', currentSwf, 'loadstart');\n tech.trigger('loadstart');\n tech.loadstart = true;\n if (Osmf.log_enabled)\n videojs.log('OSMF', 'Event', currentSwf, 'firstplay');\n tech.trigger('firstplay');\n tech.firstplay = true;\n }\n break;\n case 'buffering':\n event = 'waiting';\n break;\n case 'ready':\n event = 'loadeddata';\n break;\n }\n tech.trigger(event, data);\n if (event!=='timeupdate' && Osmf.log_enabled)\n videojs.log('OSMF', 'Event', currentSwf, event);\n};\n\nOsmf.prototype.supportsFullScreen = function(){ return false; };\n\nOsmf.prototype.enterFullScreen = function(){ return false; };\n\nvideojs.options.osmf = {};\nvideojs.options.techOrder.push('osmf');\nvideojs.registerComponent('Osmf', Osmf);\n\n})(window, window.videojs, document);\n","(function(window, vjs){\n'use strict';\nrequire('@hola.org/videojs-utils');\nvar Clipboard = require('clipboard');\nvar find = require('lodash/find');\nvar vtt = require('videojs-vtt.js');\nvar settings_icon_svg = ''\n +''\n +'';\nvar captions_icon_svg = ''\n +''\n +'';\nfunction extend_component(name, parent, comp){\n vjs.registerComponent(name, vjs.extend(vjs.getComponent(parent), comp));\n return vjs.getComponent(name);\n}\nvar Menu = vjs.getComponent('Menu');\nextend_component('PopupMenu', 'Menu', {\n className: 'vjs-rightclick-popup',\n popped: false,\n constructor: function(player, options){\n Menu.call(this, player, options);\n var player_ = player;\n this.addClass(this.className);\n this.hide();\n var _this = this;\n var opt = this.options_;\n _this.menuEnabled = true;\n this.addChild(new PoweredBy(player, {label:\n 'Powered by Hola Player'}));\n if (opt.copy_url!==false)\n {\n this.addChild(new CopyUrlButton(player, {label: 'Copy video URL',\n url: opt.copy_url}));\n }\n if (opt.copy_url!==false && opt.copy_url_with_time!==false &&\n (!multiple_players()||opt.copy_url))\n {\n this.addChild(new CopyUrlButton(player, {url: opt.copy_url,\n label: 'Copy video URL at current time', time: true}));\n }\n if (opt.embed_code)\n {\n this.addChild(new CopyButton(player, {label: 'Copy embed code',\n text: opt.embed_code}));\n }\n if (opt.debugging)\n {\n this.addChild(new LogButton(player, {label: 'Download log'}));\n this.addChild(\n new CopyLogButton(player, {label: 'Copy debug info'}));\n }\n if (opt.report)\n {\n opt.report = vjs.mergeOptions({label: 'Report playback issue'},\n opt.report);\n this.addChild(new ReportButton(player, opt.report));\n }\n if (opt.info)\n {\n opt.info = vjs.mergeOptions({label: 'Stats for nerds'}, opt.info);\n this.addChild(new InfoButton(player, opt.info));\n }\n if (opt.graph)\n {\n opt.graph = vjs.mergeOptions({label: 'CDN overlay'}, opt.graph);\n this.addChild(new GraphButton(player, opt.graph));\n }\n if (opt.about)\n {\n this.addChild(new MenuItemLink(player, {\n href: 'https://holaspark.com/player',\n label: 'About Hola Player',\n }));\n }\n function get_overflow_parent(el){\n var parent = el;\n while (parent = parent.parentElement)\n {\n if (!parent)\n return;\n var style = window.getComputedStyle(parent);\n if (style.overflowX!='visible' || style.overflowY!='visible')\n return parent;\n }\n }\n function oncontextmenu(evt){\n evt.preventDefault();\n if (_this.popped)\n return void _this.hide();\n _this.show();\n _this.check_items();\n var el = _this.el(), x = evt.clientX, y = evt.clientY;\n var max_right = window.innerWidth;\n var max_bottom = window.innerHeight;\n var parent = get_overflow_parent(el);\n if (parent)\n {\n var parent_rect = parent.getBoundingClientRect();\n max_right = Math.min(max_right, parent_rect.right);\n max_bottom = Math.min(max_bottom, parent_rect.bottom);\n }\n var left_shift = x+el.offsetWidth-max_right+5;\n left_shift = Math.max(0, left_shift);\n var top_shift = y+el.offsetHeight-max_bottom+5;\n top_shift = Math.max(0, top_shift);\n var rect = _this.player().el().getBoundingClientRect();\n el.style.left = Math.max(0, x-rect.left-left_shift)+'px';\n el.style.top = Math.max(0, y-rect.top-top_shift)+'px';\n }\n player_.on('contextmenu', oncontextmenu);\n player_.on(['tap', 'click'], function(evt){\n if (_this.popped)\n {\n _this.hide();\n evt.stopPropagation();\n evt.preventDefault();\n return false;\n }\n });\n vjs.on(document, ['tap', 'click'], function(){\n if (_this.popped)\n _this.hide();\n });\n player_.on('hola.wrapper_attached', this.check_items.bind(this));\n player_.on('hola.wrapper_detached', this.check_items.bind(this));\n this.children().forEach(function(item){\n item.on(['tap', 'click'], function(){ _this.hide(); });\n });\n player.enablePopupMenu = function(){\n if (!_this.menuEnabled)\n {\n player_.off('contextmenu');\n player_.on('contextmenu', oncontextmenu);\n _this.menuEnabled = true;\n }\n };\n player.disablePopupMenu = function(){\n if (_this.menuEnabled)\n {\n player_.off('contextmenu');\n player_.on('contextmenu', function(evt){\n evt.preventDefault(); });\n _this.menuEnabled = false;\n }\n };\n },\n show: function(){\n this.removeClass('vjs-hidden');\n this.popped = true;\n },\n hide: function(){\n this.addClass('vjs-hidden');\n this.popped = false;\n },\n check_items: function(){\n this.children().forEach(function(item){\n if (item.is_visible)\n item.toggleClass('vjs-hidden', !item.is_visible());\n });\n },\n});\nvar SubMenu = extend_component('SubMenu', 'Menu', {\n addToMain: true,\n item_count: 17,\n constructor: function(player, options, parent){\n var picker_enabled = true;\n if (options&&options.picker!==undefined)\n picker_enabled = options.picker;\n this.picker_mode_wanted = picker_enabled &&\n player&&player.hasClass('vjs-ios-skin');\n this.picker_mode = this.picker_mode_wanted;\n if (!this.picker_mode)\n this.getHeight = undefined;\n this.items = [];\n this.picker_items = [];\n this.parent = parent;\n this.line_height = options&&options.line_height||31;\n this.radius = 60;\n this.radius_ratio = this.radius/this.item_count;\n Menu.call(this, player, options);\n this.createMenuItem();\n this.createTitleItem();\n if (this.className)\n this.addClass(this.className);\n this.update();\n this.handleTouch();\n },\n createEl: function(){\n var class_name = 'vjs-menu-content';\n if (this.picker_mode)\n class_name += ' vjs-picker';\n var el = Component.prototype.createEl.call(this, 'div',\n {className: class_name});\n el.setAttribute('role', 'menu');\n this.ul = Component.prototype.createEl('ul',\n {className: 'vjs-menu-submenu'});\n if (this.picker_mode)\n {\n this.wrapper = Component.prototype.createEl('div', {\n className: 'vjs-picker-wrapper'});\n var container = Component.prototype.createEl('div', {\n className: 'vjs-picker-container'});\n container.appendChild(this.ul);\n this.wrapper.appendChild(container);\n el.appendChild(this.wrapper);\n return el;\n }\n el.appendChild(this.ul);\n return el;\n },\n addItem: function(component){\n Menu.prototype.addItem.call(this, component);\n this.ul.appendChild(component.el_);\n },\n createTitleItem: function(){\n if (!this.title)\n return;\n var _this = this;\n var title = new MenuItem(this.player_, {label: this.title});\n title.addClass('vjs-submenu-title');\n title.on(['tap', 'click'], function(){\n _this.parent.back();\n });\n this.addChild(title);\n this.titleItem = title;\n },\n createMenuItem: function(){\n if (!this.title || !this.addToMain)\n return;\n var player = this.player(), _this = this;\n var item = this.menuItem = new MenuItem(player, {label: this.title});\n item.addClass('vjs-menu-item-next');\n var span = vjs.createEl('span', {className: 'vjs-menu-item-content'});\n item.minorLabel = vjs.createEl('span', {className: 'vjs-minor-label'});\n item.contentLabel = vjs.createEl('span');\n span.appendChild(item.contentLabel);\n span.appendChild(item.minorLabel);\n item.el().insertBefore(span, item.el().firstChild);\n item.on(['tap', 'click'], function(){\n _this.parent.next(_this); });\n },\n getHeight: function(){\n var title_offset = this.titleItem ?\n this.titleItem.el_.offsetHeight : 0;\n var max_height = get_max_height(this.player_)-title_offset;\n return Math.min(max_height, this.picker ? 90 :\n (this.items.length||this.children_.length*this.line_height));\n },\n insert_item: function(item){\n var angle = item.angle;\n item = item.item||item;\n var handle_item = item;\n if (this.picker_mode)\n {\n handle_item = new MenuItem(this.player_,\n vjs.mergeOptions({}, item.options_));\n handle_item.el_.style.transform = 'rotateX('+(-angle)+\n 'deg) translateZ('+this.radius+'px)';\n handle_item.selected(item.hasClass('vjs-selected'));\n this.picker_items.push(handle_item);\n }\n this.addChild(handle_item);\n this.ul.appendChild(handle_item.el_);\n var _this = this;\n handle_item.on(['tap', 'click'], function(e){\n e.stopImmediatePropagation();\n if (_this.handleItemClick)\n _this.handleItemClick(item);\n if (_this.picker_mode)\n _this.update();\n });\n },\n // XXX alexeym: cleanup all picker code\n update: function(){\n var _this = this;\n this.items.forEach(function(item){\n _this.removeChild(item);\n if (item.el_.parentNode)\n item.el_.parentNode.removeChild(item.el_);\n });\n this.items = [];\n this.picker_items.forEach(function(child){\n child.dispose&&child.dispose(); });\n this.picker_items = [];\n if (this.createItems)\n this.createItems();\n var items_count = this.items.length;\n if (!items_count||items_count<2)\n this.picker_mode = false;\n else\n this.picker_mode = this.picker_mode_wanted;\n if (!this.picker_mode)\n return this.items.forEach(this.insert_item.bind(this));\n var ul_height = this.getHeight();\n this.wrapper.style.height = ul_height+'px';\n this.item_count = items_count * (items_count<4 ? 3 : 2);\n var radius = this.radius = this.radius_ratio*this.item_count;\n var selected = this.items.filter(function(item){\n return item.hasClass('vjs-selected'); })[0];\n selected = selected ? this.items.indexOf(selected) : -1;\n if (selected==-1)\n selected = 0;\n this.theta = 360/this.item_count;\n this.drum_rotate = selected*this.theta;\n this.ul.style.transform = 'translateZ(-'+radius+\n 'px) rotateX('+this.drum_rotate+'deg)';\n var visible = [];\n for (var i=0, index=0; i1)\n {\n var def_source = sources.filter(function(source){\n return source['default']; })[0];\n if (def_source&&def_source.src)\n this.player_.src(def_source.src);\n }\n this.one(player, 'play', this.updateSelected);\n this.on(player, 'resolutionchange', this.updateSelected);\n this.updateSelected();\n if (tech)\n {\n tech.on('loadedqualitydata', function(e, data){\n _this.updateQuality(data); });\n if (tech.quality_data)\n this.updateQuality(tech.quality_data);\n }\n },\n createItems: function(){\n var player = this.player();\n var quality = this.options_.quality;\n var sources = quality && quality.sources ? quality.sources :\n player.options_.sources;\n if (quality===false || !sources || sources.length<2)\n return void this.menuItem.hide();\n this.menuItem.show();\n for (var i=0; i=2160 ? '4k' : q>=720 ? 'hd' : null;\n}\nfunction is_hls_provider(player){\n // XXX bahaa/alexeym: make it an opt instead of detecting provider\n return player.tech_ && (player.tech_.flashlsProvider ||\n player.tech_.hlsProvider);\n}\nvar QualityMenuItem = extend_component('QualityMenuItem', 'MenuItem', {\n constructor: function(player, options){\n options = vjs.mergeOptions({selectable: true}, options);\n MenuItem.call(this, player, options);\n var qt;\n if (qt = quality_type(options.label))\n this.addClass('vjs-quality-'+qt);\n },\n handleClick: function(){},\n});\nvar SpeedSubMenu = extend_component('SpeedSubMenu', 'SubMenu', {\n className: 'vjs-speed-submenu',\n title: 'Speed',\n values: [0.25, 0.5, 0.75, 1, 1.25, 1.5, 2],\n picker: true,\n constructor: function(player, options, parent){\n this.supported = player.tech_ && player.tech_.featuresPlaybackRate;\n SubMenu.call(this, player, options, parent);\n this.on(player, 'ratechange', this.handleRateChange);\n var rate = parseFloat(local_storage_get('vjs5_speed'));\n if (this.supported && this.values.indexOf(rate)!=-1)\n player.playbackRate(rate);\n this.handleRateChange();\n },\n createItems: function(){\n var _this = this, player = this.player();\n var rates = this.supported ? this.values : [1];\n rates.forEach(function(rate){\n var item = new MenuItem(player, {\n label: rate==1 ? 'Normal' : rate,\n selectable: true,\n rate: rate,\n });\n _this.items.push(item);\n });\n this.handleRateChange();\n },\n handleItemClick: function(item){\n var player = this.player(), rate = item.options_.rate;\n if (!this.picker_mode)\n this.parent.back();\n if (rate!=player.playbackRate())\n player.playbackRate(rate);\n local_storage_set('vjs5_speed', rate);\n },\n handleRateChange: function(){\n var rate = this.player().playbackRate();\n this.menuItem.contentLabel.innerHTML = rate==1 ?\n this.localize('Normal') : rate;\n this.items.forEach(function(item){\n item.selected(item.options_.rate==rate);\n });\n },\n});\nfunction get_captions_tracks(player){\n var tracks = [];\n var tt = player.textTracks();\n if (!tt || !tt.length)\n return tracks;\n for (var i=0; i1 ? 13 : 0);\n return (player.el().offsetHeight)/ui_zoom - offset;\n};\nvar SettingsMenu = extend_component('SettingsMenu', 'Menu', {\n className: 'vjs-settings-menu',\n history: [],\n constructor: function(player, options, settings_button){\n Menu.call(this, player, options);\n this.settings_button = settings_button;\n this.addClass(this.className);\n this.update();\n this.on(['tap', 'click', 'touchstart', 'touchend'], function(event){\n event.stopPropagation();\n });\n var resize = this._resize = this.resize.bind(this);\n player.on('resize', resize);\n player.on('fullscreenchange', function(){ setTimeout(resize); });\n window.addEventListener('resize', resize);\n window.addEventListener('orientationchange', resize);\n },\n dispose: function(){\n window.removeEventListener('resize', this._resize);\n window.removeEventListener('orientationchange', this._resize);\n Menu.prototype.dispose.call(this);\n },\n createEl: function(){\n var el = Component.prototype.createEl.call(this, 'div',\n {className: 'vjs-menu'});\n el.setAttribute('role', 'presentation');\n el.style.zoom = get_ui_zoom(this.player_);\n return el;\n },\n update: function(){\n this.children().forEach(this.removeChild.bind(this));\n this.createItems();\n },\n addSubMenu: function(menu){\n this.addChild(menu);\n if (menu.menuItem)\n this.mainMenu.addItem(menu.menuItem);\n },\n createItems: function(){\n this.mainMenu = new SubMenu(this.player_,\n vjs.mergeOptions({picker: false}, this.options_), this);\n this.mainMenu.addClass('vjs-main-submenu');\n this.addChild(this.mainMenu);\n var menus = [SpeedSubMenu, CaptionsSubMenu, QualitySubMenu];\n for (var i=0; i1)\n this.show();\n },\n createEl: function(){\n var el = MenuButton.prototype.createEl.call(this);\n this.icon_ = vjs.createEl('div', {className: 'vjs-button-icon',\n innerHTML: settings_icon_svg});\n el.insertBefore(this.icon_, el.firstChild);\n return el;\n },\n buildCSSClass: function(){\n return MenuButton.prototype.buildCSSClass.call(this)+\n ' vjs-settings-button';\n },\n handleClick: function(){\n if (this.buttonPressed_)\n this.unpressButton();\n else\n this.pressButton();\n },\n updateState: function(){\n this.player_.toggleClass('vjs-settings-expanded', this.buttonPressed_);\n this.el_.setAttribute('aria-expanded', this.buttonPressed_);\n this.menu.show(this.buttonPressed_);\n },\n unpressButton: function(){\n if (!this.enabled_)\n return;\n this.buttonPressed_ = false;\n this.updateState();\n this.el_.focus();\n this.clearInterval(this.activityInterval);\n if (this.clickListener)\n {\n vjs.off(document, ['tap', 'click'], this.clickListener);\n this.player_.off(['tap', 'click'], this.clickListener);\n this.clickListener = null;\n }\n },\n pressButton: function(){\n if (!this.enabled_)\n return;\n this.buttonPressed_ = true;\n this.updateState();\n this.menu.focus();\n // prevent setting vjs-user-inactive when menu is opened\n this.activityInterval = this.setInterval(\n this.player_.reportUserActivity.bind(this.player_), 250);\n var _this = this;\n this.setTimeout(function(){\n _this.clickListener = _this.unpressButton.bind(_this);\n vjs.on(document, ['tap', 'click'], this.clickListener);\n _this.player_.on(['tap', 'click'], this.clickListener);\n });\n },\n tooltipHandler: function(){\n return this.icon_;\n },\n});\nvar Component = vjs.getComponent('Component');\nvar Overlay = extend_component('Overlay', 'Component', {\n constructor: function(player, options){\n Component.call(this, player, options);\n this.hide();\n },\n createEl: function(type, props){\n var custom_class = this.options_['class'];\n custom_class = custom_class ? ' '+custom_class : '';\n var proto_component = Component.prototype;\n var container = proto_component.createEl.call(this, 'div',\n vjs.mergeOptions({className: 'vjs-info-overlay'+custom_class},\n props));\n this.createContent(container);\n return container;\n },\n createContent: function(){},\n});\nfunction round(val){\n if (typeof val!='number')\n return val;\n return val.toFixed(3);\n}\nfunction is_wrapper_attached(check_bws){\n var hola = window.hola_cdn;\n return hola && hola.get_wrapper() && (!check_bws || !!hola._get_bws());\n}\nextend_component('InfoOverlay', 'Overlay', {\n constructor: function(player, options){\n this.info_data = {\n duration: {\n units: 'sec',\n title: 'Duration',\n get: function(p){ return round(p.duration()); },\n },\n position: {\n units: 'sec',\n title: 'Position',\n get: function(p){\n return round(p.currentTime());\n },\n },\n buffered: {\n units: 'sec',\n title: 'Current buffer',\n get: function(p){\n var range = p.buffered();\n var pos = p.currentTime();\n if (range && range.length)\n {\n for (var i=0; i=pos)\n return round(range.end(i)-pos);\n }\n }\n return '--';\n },\n },\n downloaded: {\n units: 'sec',\n title: 'Downloaded',\n get: function(p){\n var range = p.buffered();\n var buf_sec = 0;\n if (range && range.length)\n {\n for (var i=0; i'+\n this.localize(this.options_.label)+'',\n tabIndex: -1,\n }, props);\n return ClickableComponent.prototype.createEl('li', props, attrs);\n};\nvar PoweredBy = extend_component('PoweredBy', 'MenuItem', {\n constructor: function(player, options){\n var ver = window.hola_player&&window.hola_player.VERSION;\n if (ver)\n options.label += ' '+ver;\n MenuItem.call(this, player, options);\n this.addClass('vjs-powered-by');\n },\n});\nvar MenuItemLink = extend_component('MenuItemLink', 'MenuItem', {\n createEl: function(type, props){\n var prot = MenuItem.prototype;\n var label = this.localize(this.options_.label);\n var el = prot.createEl.call(this, 'li', vjs.mergeOptions({\n className: 'vjs-menu-item vjs-menu-item-link',\n innerHTML: '',\n }, props));\n this.link = Component.prototype.createEl('a', {\n className: 'vjs-menu-link',\n innerHTML: this.localize(label),\n }, {\n target: '_blank',\n href: this.options_.href||'#',\n });\n el.appendChild(this.link);\n this.link.addEventListener('touchstart', function(e){\n e.stopPropagation(); });\n return el;\n },\n handleClick: function(e){ e.stopPropagation(); },\n});\nvar ReportButton = extend_component('ReportButton', 'MenuItem', {\n is_visible: is_wrapper_attached,\n handleClick: function(){\n this.player_.trigger({type: 'problem_report'});\n var overlay;\n if (overlay = this.player_.getChild('NotifyOverlay'))\n overlay.flash();\n this.selected(false);\n },\n});\nvar LogButton = extend_component('LogButton', 'MenuItem', {\n is_visible: is_wrapper_attached,\n handleClick: function(){\n this.player_.trigger({type: 'save_logs'});\n this.selected(false);\n },\n});\nvar GraphButton = extend_component('GraphButton', 'MenuItem', {\n is_visible: is_wrapper_attached.bind(null, true),\n handleClick: function(){\n this.player_.trigger({type: 'cdn_graph_overlay'});\n this.selected(false);\n },\n});\nvar CopyButton = extend_component('CopyButton', 'MenuItem', {\n constructor: function(player, options){\n MenuItem.call(this, player, options);\n this.clipboard = new Clipboard(this.el_, {\n text: this.getText.bind(this),\n });\n this.on('tap', function(e){\n this.clipboard.onClick({currentTarget: e.target});\n });\n },\n getText: function(){\n return this.options_.text;\n },\n dispose: function(){\n this.clipboard.destroy();\n MenuItem.prototype.dispose.call(this);\n },\n});\nvar CopyLogButton = extend_component('CopyLogButton', 'CopyButton', {\n getText: function(){\n var player = this.player();\n if (!player.hola_logs)\n return 'Can\\'t find hola_logs method!';\n return player.hola_logs();\n },\n is_visible: is_wrapper_attached,\n});\nvar CopyUrlButton = extend_component('CopyUrlButton', 'CopyButton', {\n getText: function(){\n var url = this.options_.url || get_top_url();\n if (this.options_.time)\n {\n var pos = Math.floor(this.player().currentTime());\n var re = /(#(?:.*&)?t=)(\\d*)/;\n if (url.match(re))\n url = url.replace(re, '$1'+pos);\n else\n url += (url.indexOf('#')!=-1 ? '&t=' : '#t=')+pos;\n }\n return url;\n },\n});\nvar InfoButton = extend_component('InfoButton', 'MenuItem', {\n handleClick: function(){\n var overlay;\n if (overlay = this.player_.getChild('InfoOverlay'))\n overlay.toggle(this);\n },\n});\nvar Button = vjs.getComponent('Button');\nextend_component('CaptionsToggle', 'Button', {\n controlText_: 'Subtitles/closed captions',\n constructor: function(player, options){\n Button.call(this, player, options);\n this.addClass('vjs-captions-toggle');\n this.hide();\n var tt = player.textTracks();\n if (!tt || !tt.on)\n return;\n this.on(tt, 'addtrack', this.update);\n this.on(tt, 'removetrack', this.update);\n this.on(tt, 'change', this.update);\n this.update();\n },\n createEl: function(){\n var el = Button.prototype.createEl.call(this);\n this.icon_ = vjs.createEl('div', {className: 'vjs-button-icon',\n innerHTML: captions_icon_svg});\n el.insertBefore(this.icon_, el.firstChild);\n return el;\n },\n handleClick: function(){\n if (!this.track)\n return;\n var enable = this.track.mode!='showing';\n this.track.mode = enable ? 'showing' : 'disabled';\n if (enable)\n this.showHint();\n },\n showHint: function(){\n var track;\n if (!(track = this.track))\n return;\n var d = this.player().textTrackDisplay, i;\n if (this.timeout)\n this.clearTimeout(this.timeout);\n var cues = [\n new vtt.VTTCue(0, 0, get_track_label(track)),\n new vtt.VTTCue(0, 0, this.localize('press %s to configure'))\n ];\n for (i=0; i1;\n}\nfunction cmp_url(a, b){\n var re = /^https?\\:\\/\\//i;\n return a.replace(re, '//')==b.replace(re, '//');\n}\n\nvjs.plugin('settings', function(opt){\n var video = this;\n opt = vjs.mergeOptions({\n info: true,\n report: true,\n quality: false,\n volume: {level: 1, mute: !!video.options_.muted},\n debugging: true,\n about: true,\n }, opt);\n video.ready(function(){\n function sources_normalize(sources, label_sav){\n var i, source_def, source_sav;\n sources = sources.filter(function(e){ return e.src; });\n for (i=0; i time) {\n active = Math.max(active, time);\n }\n }\n var setting = settings[active];\n if (!setting) {\n return;\n }\n var re = /^https?:\\/\\//i;\n if (setting.src && img.src.replace(re, '//') !=\n setting.src.replace(re, '//')) {\n img.src = setting.src;\n }\n var scale = player.hasClass('vjs-fullscreen') ? 1.5 : 1;\n if (setting.style) {\n img.style.left = parseFloat(setting.style.left)*scale+'px';\n img.style.top = parseFloat(setting.style.top)*scale+'px';\n }\n if (img.naturalWidth) {\n img.style.width = img.naturalWidth*scale+'px';\n img.style.height = img.naturalHeight*scale+'px';\n }\n\n var width = parseFloat(setting.width || settings[0].width)*scale;\n var height = parseFloat(setting.height || settings[0].height)*scale;\n var halfWidth = width / 2;\n\n // make sure that the thumbnail doesn't fall off the right side of the\n // left side of the player\n if (left + halfWidth > maxRight) {\n left = maxRight - width;\n } else if (left-halfWidth < minLeft) {\n left = minLeft;\n } else {\n left -= halfWidth;\n }\n\n div.style.width = width + 'px';\n div.style.height = height + 'px';\n div.style.left = left + 'px';\n div.style.top = '-' + height + 'px';\n div.style.display = 'block';\n };\n\n // update the thumbnail while hovering\n progressControl.on('mousemove', moveListener);\n progressControl.on('touchmove', moveListener);\n\n var moveCancel = function(event) {\n div.style.display = 'none';\n };\n\n // move the placeholder out of the way when not hovering\n progressControl.on('mouseout', moveCancel);\n progressControl.on('touchcancel', moveCancel);\n progressControl.on('touchend', moveCancel);\n player.on('userinactive', moveCancel);\n };\n\n /**\n * register the thubmnails plugin\n */\n videojs.plugin('thumbnails', function(options) {\n if (!options) {\n return;\n }\n var player = this;\n if (!options.vtt) {\n init(player, unfoldSpritesConf(options));\n return;\n }\n var trackEl = player.addRemoteTextTrack({\n id: 'thumbnails',\n kind: 'metadata',\n src: options.vtt,\n });\n trackEl.addEventListener('load', function onLoad() {\n trackEl.removeEventListener('load', onLoad);\n var track = player.textTracks().getTrackById('thumbnails');\n init(player, getConfByVtt(track, options.vtt));\n });\n });\n})();\n","(function(window, vjs){\n'use strict';\nvjs.utils = vjs.utils||{};\n\nfunction local_storage_init(){\n // Cookie functions from\n // https://developer.mozilla.org/en-US/docs/DOM/document.cookie\n function get_cookie_item(key){\n if (!key || !has_cookie_item(key))\n return null;\n var reg_ex = new RegExp('(?:^|.*;\\\\s*)'\n +window.escape(key).replace(/[\\-\\.\\+\\*]/g, '\\\\$&')\n +'\\\\s*\\\\=\\\\s*((?:[^;](?!;))*[^;]?).*');\n return window.unescape(document.cookie.replace(reg_ex, '$1'));\n }\n function set_cookie_item(key, value, end, path, domain, secure){\n if (!key || /^(?:expires|max\\-age|path|domain|secure)$/i.test(key))\n return;\n var expires = '';\n if (end)\n {\n switch (end.constructor)\n {\n case Number:\n expires = end===Infinity\n ? '; expires=Tue, 19 Jan 2038 03:14:07 GMT'\n : '; max-age=' + end;\n break;\n case String:\n expires = '; expires=' + end;\n break;\n case Date:\n expires = '; expires=' + end.toGMTString();\n break;\n }\n }\n document.cookie = window.escape(key)+'='+window.escape(value)+\n expires+(domain ? '; domain='+domain : '')+\n (path ? '; path=' + path : '')+\n (secure ? '; secure' : '');\n }\n function has_cookie_item(key){\n return (new RegExp('(?:^|;\\\\s*)'\n +window.escape(key).replace(/[\\-\\.\\+\\*]/g, '\\\\$&')+'\\\\s*\\\\=')\n ).test(document.cookie);\n }\n function has_local_storage(){\n try {\n window.localStorage.setItem('vjs-storage-test', 'value');\n window.localStorage.removeItem('vjs-storage-test');\n return true;\n } catch(e){ return false; }\n }\n vjs.utils.localStorage = has_local_storage() ? window.localStorage : {\n getItem: get_cookie_item,\n setItem: function(key, value){\n set_cookie_item(key, value, Infinity, '/');\n }\n };\n}\nlocal_storage_init();\n\n})(window, window.videojs);\n","","'use strict';\n// For more information about browser field, check out the browser field at https://github.com/substack/browserify-handbook#browser-field.\n\nvar styleElementsInsertedAtTop = [];\n\nvar insertStyleElement = function(styleElement, options) {\n var head = document.head || document.getElementsByTagName('head')[0];\n var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];\n\n options = options || {};\n options.insertAt = options.insertAt || 'bottom';\n\n if (options.insertAt === 'top') {\n if (!lastStyleElementInsertedAtTop) {\n head.insertBefore(styleElement, head.firstChild);\n } else if (lastStyleElementInsertedAtTop.nextSibling) {\n head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);\n } else {\n head.appendChild(styleElement);\n }\n styleElementsInsertedAtTop.push(styleElement);\n } else if (options.insertAt === 'bottom') {\n head.appendChild(styleElement);\n } else {\n throw new Error('Invalid value for parameter \\'insertAt\\'. Must be \\'top\\' or \\'bottom\\'.');\n }\n};\n\nmodule.exports = {\n // Create a tag with optional data attributes\n createLink: function(href, attributes) {\n var head = document.head || document.getElementsByTagName('head')[0];\n var link = document.createElement('link');\n\n link.href = href;\n link.rel = 'stylesheet';\n\n for (var key in attributes) {\n if ( ! attributes.hasOwnProperty(key)) {\n continue;\n }\n var value = attributes[key];\n link.setAttribute('data-' + key, value);\n }\n\n head.appendChild(link);\n },\n // Create a