define("notificationBanner", ["jqReady!"], function (n) { "use strict"; function i() { var s = document.querySelector(t.id), f, i, h, e, c, l; if (s) for (f = s.querySelectorAll(t.clsMessage), u(), i = 0; i < f.length; i++) { var a = f[i].getAttribute("data-all") === "true" , v = f[i].getAttribute("data-sel") , o = document.querySelectorAll(v); if (o.length) for (h = f[i].getAttribute("data-pos"), e = 0; e < o.length; e++) if (e === 0 || a) c = n(f[i]).clone(), l = c[0], r(o[e], h, l); else break } } function r(i, r, u) { try { switch (r) { case "replace": n(i).html(u); break; case "replaceText": n(i).text(n(u).text().trim()); break; case "prepend": n(i).prepend(u); break; case "append": n(i).append(u); break; case "before": i.parentNode.insertBefore(u, i); break; case "after": default: i.parentNode.insertBefore(u, i.nextSibling) } i.classList.add(t.clsPosElement.substring(1)); u.removeAttribute("data-pos"); u.removeAttribute("data-sel"); u.classList.add(t.clsActiveMessage.substring(1)) } catch (f) { } } function u() { for (var i = document.querySelectorAll(t.clsActiveMessage), n = 0; n < i.length; n++) i[n].remove() } function f() { i(); document.addEventListener("moduleRefreshed", i) } var t = { id: "#ownb-wrapper", clsMessage: ".ownb-content", clsActiveMessage: ".ownb-active", clsPosElement: ".ownb-link" }; return { run: function () { f() } } }); require(["notificationBanner"], function (n) { "use strict"; document.readyState === "complete" || document.readyState === "interactive" ? n.run() : document.addEventListener("DOMContentLoaded", n.run, !1) }); define("AnimationVideo", ["officeUtilities"], function (n) { "use strict"; function o() { return ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].indexOf(navigator.platform) !== -1 || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1 } function s() { var n = document.querySelectorAll(i.MODULE_ELEM); n.length && (u = Array.prototype.map.call(n, function (n) { return new e(n) })) } var u = [], t = { MWF_HIDDEN: "x-hidden", OPACITY: "ow-opacity-0" }, i = { MODULE_ELEM: ".ow-ani-video-fb-img", VIDEO: ".ow-video", FALLBACK_IMAGE: ".ow-fallback-img" }, f = { PLAY: "play" }, r, e = function () { function u(n) { this._elem = n; this._elem && (this.videoElem = this._elem.querySelector(i.VIDEO), this.fallbackImgElem = this._elem.querySelector(i.FALLBACK_IMAGE), this.playingStarted = !1, this.videoElem && this.fallbackImgElem && this.bindEvents()); this.bindEvents = this.bindEvents.bind(this); this.handleIntersect = this.handleIntersect.bind(this); this.handleVideoPlay = this.handleVideoPlay.bind(this); this.handleVideoLoadedData = this.handleVideoLoadedData.bind(this) } return u.prototype.bindEvents = function () { this.videoElem && (this.videoElem.addEventListener(f.PLAY, this.handleVideoPlay.bind(this)), n.createIntersectionObserver(this.videoElem, 0, this.handleIntersect.bind(this))) } , u.prototype.handleVideoPlay = function () { this.videoElem.classList.remove(t.OPACITY); this.playingStarted = !0; clearTimeout(this.videoTimeOut) } , u.prototype.handleVideoLoadedData = function () { var n = this; !this.playingStarted && o() && (this.videoTimeOut = setTimeout(function () { n.playingStarted || (n.videoElem.classList.add(t.MWF_HIDDEN), n.fallbackImgElem.classList.remove(t.MWF_HIDDEN)) }, 2e3)) } , u.prototype.handleIntersect = function (n, t) { r = this; n.forEach(function (n) { n.isIntersecting && n.intersectionRatio >= 0 && (r.handleVideoLoadedData(), t.unobserve(n.target)) }) } , u }(); return { run: function () { s() } } }); require(["AnimationVideo"], function (n) { "use strict"; document.readyState === "complete" || document.readyState === "interactive" ? n.run() : document.addEventListener("DOMContentLoaded", n.run, !1) }); define("LongAmbientVideo", ["officeUtilities"], function (n) { "use strict"; function e(n) { n.filter(function (n) { return n.isIntersecting }).forEach(function (n) { r.filter(function (t) { return !t.areAllAmbientVideosLoaded && t.ambientVideoContainers.some(function (t) { return t === n.target }) }).forEach(function (n) { return n.lazyLoadVideos() }) }) } function s() { var n = document.querySelectorAll(t.MODULE_ELEM); n.length > 0 && (r = Array.prototype.map.call(n, function (n) { return new o(n) }), e(i.takeRecords())) } var r = [] , i = new window.IntersectionObserver(e) , u = { LAZY: "ow-lazy" } , t = { AMBIENT_VIDEO: "video", AMBIENT_VIDEO_CONTAINER: ".m-ambient-video", MODULE_ELEM: '[data-mount="long-ambient-video"]', PLAYPAUSE_BUTTON: ".ow-play-pause", PLAY_VIDEO_LABEL: ".ow-play-video-label", PAUSE_VIDEO_LABEL: ".ow-pause-video-label" } , f = { CLICK: "click", ENDED: "ended" } , o = function () { function r(r) { var o = this, h, s, e; if (this.elem = r, this.elem) for (this.ambientVideos = Array.prototype.slice.call(this.elem.querySelectorAll(t.AMBIENT_VIDEO)), this.ambientVideoContainers = Array.prototype.slice.call(this.elem.querySelectorAll(t.AMBIENT_VIDEO_CONTAINER)), this.playPauseButtons = Array.prototype.slice.call(this.elem.querySelectorAll(t.PLAYPAUSE_BUTTON)), this.pauseAriaLabel = this.elem.querySelector(t.PAUSE_VIDEO_LABEL).getAttribute("value"), this.playAriaLabel = this.elem.querySelector(t.PLAY_VIDEO_LABEL).getAttribute("value"), this.areAllAmbientVideosLoaded = this.ambientVideoContainers.filter(function (n) { return n.classList.contains(u.LAZY) }).map(function (n) { return i.observe(n) }).length === 0, h = function (t) { var r = s.playPauseButtons[t] , i = s.ambientVideos[t]; r && i && (r.addEventListener(f.CLICK, function () { n.togglePlayPauseButton(r, o.playAriaLabel, o.pauseAriaLabel); i.paused || i.ended ? i.play() : i.pause() }), i.addEventListener(f.ENDED, function () { n.togglePlayPauseButton(r, o.playAriaLabel, o.pauseAriaLabel) })) } , s = this, e = 0; e < this.playPauseButtons.length && e < this.ambientVideos.length; e++) h(e) } return r.prototype.lazyLoadVideos = function () { var t = this; this.ambientVideoContainers.filter(function (n) { return n.classList.contains(u.LAZY) }).forEach(function (r, u) { n.lazyLoadVideo(t.ambientVideos[u], r, t.playPauseButtons[u], t.areAllAmbientVideosLoaded); i.unobserve(r) }); this.areAllAmbientVideosLoaded = !0 } , r }(); return { run: function () { s() } } }); require(["LongAmbientVideo"], function (n) { "use strict"; document.readyState === "complete" || document.readyState === "interactive" ? n.run() : document.addEventListener("DOMContentLoaded", n.run, !1) }); define("M365VideoPlayerNpm", [], function () { function n() { (function () { "use strict"; var i = this && this.__extends || function () { var n = function (t, i) { return n = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (n, t) { n.__proto__ = t } || function (n, t) { for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (n[i] = t[i]) } , n(t, i) }; return function (t, i) { function r() { this.constructor = t } if (typeof i != "function" && i !== null) throw new TypeError("Class extends value " + String(i) + " is not a constructor or null"); n(t, i); t.prototype = i === null ? Object.create(i) : (r.prototype = i.prototype, new r) } }(), r, t, n; (function (n) { var i = Object.defineProperty && function () { var n, t; try { n = {}; Object.defineProperty(n, "x", { enumerable: !1, value: n }); for (t in n) if (n.hasOwnProperty(t)) return !1; return n.x === n } catch (i) { return !1 } }(), t; i || n.definePropertyShamSet || (n.definePropertyShamSet = !0, t = Object.defineProperty, Object.defineProperty = function (n, i, r) { n instanceof Element ? t(n, i, r) : n[i] = r ? r.value : !0 } ) } )(window), function (i) { function e(n, t) { return d.call(n, t) } function l(n, t) { var o, s, u, e, h, y, c, b, i, l, p, k, r = t && t.split("/"), a = f.map, v = a && a["*"] || {}; if (n) { for (n = n.split("/"), h = n.length - 1, f.nodeIdCompat && w.test(n[h]) && (n[h] = n[h].replace(w, "")), n[0].charAt(0) === "." && r && (k = r.slice(0, r.length - 1), n = k.concat(n)), i = 0; i < n.length; i++) if (p = n[i], p === ".") n.splice(i, 1), i -= 1; else if (p === "..") if (i === 0 || i === 1 && n[2] === ".." || n[i - 1] === "..") continue; else i > 0 && (n.splice(i - 1, 2), i -= 2); n = n.join("/") } if ((r || v) && a) { for (o = n.split("/"), i = o.length; i > 0; i -= 1) { if (s = o.slice(0, i).join("/"), r) for (l = r.length; l > 0; l -= 1) if (u = a[r.slice(0, l).join("/")], u && (u = u[s], u)) { e = u; y = i; break } if (e) break; !c && v && v[s] && (c = v[s], b = i) } !e && c && (e = c, y = b); e && (o.splice(0, y, e), n = o.join("/")) } return n } function b(n, t) { return function () { var r = g.call(arguments, 0); return typeof r[0] != "string" && r.length === 1 && r.push(null), o.apply(i, r.concat([n, t])) } } function nt(n) { return function (t) { return l(t, n) } } function tt(n) { return function (t) { u[n] = t } } function a(n) { if (e(h, n)) { var t = h[n]; delete h[n]; y[n] = !0; c.apply(i, t) } if (!e(u, n) && !e(y, n)) throw new Error("No " + n); return u[n] } function p(n) { var i, t = n ? n.indexOf("!") : -1; return t > -1 && (i = n.substring(0, t), n = n.substring(t + 1, n.length)), [i, n] } function k(n) { return n ? p(n) : [] } function it(n) { return function () { return f && f.config && f.config[n] || {} } } var c, o, v, s, u = {}, h = {}, f = {}, y = {}, d = Object.prototype.hasOwnProperty, g = [].slice, w = /\.js$/; v = function (n, t) { var r, u = p(n), i = u[0], f = t[1]; return n = u[1], i && (i = l(i, f), r = a(i)), i ? n = r && r.normalize ? r.normalize(n, nt(f)) : l(n, f) : (n = l(n, f), u = p(n), i = u[0], n = u[1], i && (r = a(i))), { f: i ? i + "!" + n : n, n: n, pr: i, p: r } } ; s = { require: function (n) { return b(n) }, exports: function (n) { var t = u[n]; return typeof t != "undefined" ? t : u[n] = {} }, module: function (n) { return { id: n, uri: "", exports: u[n], config: it(n) } } }; c = function (n, t, r, f) { var p, o, d, w, c, g, l = [], nt = typeof r, it; if (f = f || n, g = k(f), nt === "undefined" || nt === "function") { for (t = !t.length && r.length ? ["require", "exports", "module"] : t, c = 0; c < t.length; c += 1) if (w = v(t[c], g), o = w.f, o === "require") l[c] = s.require(n); else if (o === "exports") l[c] = s.exports(n), it = !0; else if (o === "module") p = l[c] = s.module(n); else if (e(u, o) || e(h, o) || e(y, o)) l[c] = a(o); else if (w.p) w.p.load(w.n, b(f, !0), tt(o), {}), l[c] = u[o]; else throw new Error(n + " missing " + o); d = r ? r.apply(u[n], l) : undefined; n && (p && p.exports !== i && p.exports !== u[n] ? u[n] = p.exports : d === i && it || (u[n] = d)) } else n && (u[n] = r) } ; r = t = o = function (n, t, r, u, e) { if (typeof n == "string") return s[n] ? s[n](t) : a(v(n, k(t)).f); if (!n.splice) { if (f = n, f.deps && o(f.deps, f.callback), !t) return; t.splice ? (n = t, t = r, r = null) : n = i } return t = t || function () { } , typeof r == "function" && (r = u, u = e), u ? c(i, n, t, r) : setTimeout(function () { c(i, n, t, r) }, 4), o } ; o.config = function (n) { return o(n) } ; r._defined = u; n = function (n, t, i) { if (typeof n != "string") throw new Error("See almond README: incorrect module build, no module name"); t.splice || (i = t, t = []); e(u, n) || e(h, n) || (h[n] = [n, t, i]) } ; n.amd = { jQuery: !0 } }(); n("closed-captions/ttml-time-parser", ["require", "exports"], function (n, t) { Object.defineProperty(t, "__esModule", { value: !0 }); t.TtmlTimeParser = void 0; var i = function () { function n(n, t) { this.mediaFrameRate = n; this.mediaTickRate = t } return n.prototype.parse = function (t) { var i, r; if (!t) return 0; if (i = n.absoluteTimeRegex.exec(t), i && i.length > 3) { var f = parseInt(i[1], 10) * 3600 , e = parseInt(i[2], 10) * 60 , o = parseInt(i[3], 10) , u = 0; return i[5] && (u = parseFloat(i[4]) * 1e3), i[6] && (u = Math.round(parseFloat(i[6]) * this.getTimeUnitMultiplier("f"))), 1e3 * (f + e + o) + u } return (r = n.relativeTimeRegex.exec(t), r && r.length > 3) ? Math.round(parseFloat(r[1]) * this.getTimeUnitMultiplier(r[3])) : 0 } , n.prototype.getTimeUnitMultiplier = function (n) { switch (n) { case "h": return 36e5; case "ms": return 1; case "m": return 6e4; case "s": return 1e3; case "f": return 1e3 / this.mediaFrameRate; case "t": return 1e3 / this.mediaTickRate; default: return 0 } } , n.absoluteTimeRegex = /^(\d{1,}):(\d{2}):(\d{2})((\.\d{1,})|:(\d{2,}(\.\d{1,})?))?$/, n.relativeTimeRegex = /^(\d+(\.\d+)?)(ms|[hmsft])$/, n }(); t.TtmlTimeParser = i }); n("mwf/utilities/stringExtensions", ["require", "exports"], function (n, t) { function r(n) { return !n || typeof n != "string" || !i(n) } function i(n) { return !n || typeof n != "string" ? n : n.trim ? n.trim() : n.replace(/^\s+|\s+$/g, "") } function u(n, t, i) { return (i === void 0 && (i = !0), !n || !t) ? !1 : (i && (n = n.toLocaleLowerCase(), t = t.toLocaleLowerCase()), n.startsWith) ? n.startsWith(t) : n.indexOf(t) === 0 } function f(n, t, i) { return (i === void 0 && (i = !0), !n || !t) ? !1 : (i && (n = n.toLocaleLowerCase(), t = t.toLocaleLowerCase()), n.endsWith) ? n.endsWith(t) : n.lastIndexOf(t) === n.length - t.length } function e(n, t, i) { if (i === void 0 && (i = !0), !n || !t) return 0; var r = 0; for (i && (n = n.toLocaleLowerCase(), t = t.toLocaleLowerCase()); n.charCodeAt(r) === t.charCodeAt(r);) r++; return r } function o(n) { for (var i = [], t = 1; t < arguments.length; t++) i[t - 1] = arguments[t]; return n.replace(/{(\d+)}/g, function (n, t) { if (t >= i.length) return n; var r = i[t]; return typeof r != "number" && !r ? "" : typeof r == "string" ? r : r.toString() }) } Object.defineProperty(t, "__esModule", { value: !0 }); t.format = t.getMatchLength = t.endsWith = t.startsWith = t.trim = t.isNullOrWhiteSpace = void 0; t.isNullOrWhiteSpace = r; t.trim = i; t.startsWith = u; t.endsWith = f; t.getMatchLength = e; t.format = o }); n("mwf/utilities/utility", ["require", "exports", "mwf/utilities/stringExtensions"], function (n, t, i) { function r(n) { return !isNaN(n) && typeof n == "number" } function e() { return window.innerWidth && document.documentElement.clientWidth ? Math.min(window.innerWidth, document.documentElement.clientWidth) : window.innerWidth || document.documentElement.clientWidth } function c() { return window.innerHeight && document.documentElement.clientHeight ? Math.min(window.innerHeight, document.documentElement.clientHeight) : window.innerHeight || document.documentElement.clientHeight } function l(n) { if (n != null) return { width: n.clientWidth, height: n.clientHeight } } function a(n) { var t; if ((n = n || window.event, !n) || (t = n.key || n.keyIdentifier, !t)) return t; switch (t) { case "Left": return "ArrowLeft"; case "Right": return "ArrowRight"; case "Up": return "ArrowUp"; case "Down": return "ArrowDown"; case "Esc": return "Escape"; default: return t } } function v(n) { return n = n || window.event, n == null ? null : n.which || n.keyCode || n.charCode } function y(n, t, i, r, u) { var o = "", f, e; r && (f = new Date, f.setTime(f.getTime() + r * 864e5), o = "; expires=" + f.toUTCString()); e = ""; u && (e = ";domain=" + u); window.document.cookie = n + "=" + encodeURIComponent(t) + o + ("; path=" + i + ";") + e } function p(n) { var t, i; if (!!n) for (t = 0, i = document.cookie.split("; "); t < i.length; t++) { var r = i[t] , f = r.indexOf("=") , u = o(r.substring(0, f)); if (u === n) return o(r.substring(u.length + 1)) } return null } function o(n) { return n = decodeURIComponent(n.replace("/+/g", " ")), n.indexOf('"') === 0 && (n = n.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\")), n } function w(n) { var u; if (!!n && n.length === 6) { var t = parseInt(n.substring(0, 2), 16) , i = parseInt(n.substring(2, 4), 16) , r = parseInt(n.substring(4, 6), 16); if (!isNaN(t) && !isNaN(i) && !isNaN(r)) return u = (t * 299 + i * 587 + r * 114) / 255e3, u >= .5 ? 2 : 1 } return null } function b(n, t, i) { return !i || !r(n) || !r(t) || !r(i.left) || !r(i.right) || !r(i.top) || !r(i.bottom) ? !1 : n >= i.left && n <= i.right && t >= i.top && t <= i.bottom } function k(n) { console && console.warn ? console.warn(n) : console && console.error && console.error(n) } function d(n, t) { if ((t || !(s("item").toLowerCase().indexOf("perf_marker_global:true") < 0)) && !i.isNullOrWhiteSpace(n) && window.performance && window.performance.mark) { var r = n.split(" ").join("_"); window.performance.mark(r); window.console && window.console.timeStamp && window.console.timeStamp(r) } } function g(n) { if (i.isNullOrWhiteSpace(n) || !window.performance || !window.performance.mark) return 0; var r = n.split(" ").join("_") , t = window.performance.getEntriesByName(r); return t && t.length ? Math.round(t[t.length - 1].startTime) : 0 } function nt(n, t) { var f; if (!r(n)) return "00:00"; f = n < 0; f && (n *= -1); var u = Math.floor(n / 3600) , e = n % 3600 , o = Math.floor(e / 60) , i = ""; return i = t ? u > 0 ? u + ":" : "00:" : u > 0 ? u + ":" : "", n = Math.floor(e % 60), i += (o < 10 ? "0" : "") + o, i += ":" + (n === 0 ? "00" : (n < 10 ? "0" : "") + n), f ? "-" + i : i } function tt(n) { if (!JSON || !JSON.parse) throw new Error("JSON.parse unsupported."); if (!n) throw new Error("Invalid json."); return JSON.parse(n) } function u() { for (var e, t, o, n, f, i, r = [], c = 0; c < arguments.length; c++) r[c] = arguments[c]; if (!r || !r.length) return null; if (e = typeof r[0] == "boolean" && r[0], r.length < 2) return e ? null : r[0]; if (e && r.length < 3) return r[1]; for (t = e ? r[1] : r[0], o = e ? 2 : 1; o < r.length; o++) for (n in r[o]) if (r[o].hasOwnProperty(n)) { if (f = r[o][n], e) { var s = Array.isArray ? Array.isArray(f) : {}.toString.call(f) === "[object Array]" , h = !!t[n] && (Array.isArray ? Array.isArray(t[n]) : {}.toString.call(t[n]) === "[object Array]") , l = !s && typeof f == "object" , a = !h && !!t[n] && typeof t[n] == "object"; if (s && h) { for (i = 0; i < f.length; i++) s = Array.isArray ? Array.isArray(f[i]) : {}.toString.call(f[i]) === "[object Array]", h = !!t[n][i] && (Array.isArray ? Array.isArray(t[n][i]) : {}.toString.call(t[n][i]) === "[object Array]"), l = !s && typeof f[i] == "object", a = !h && !!t[n][i] && typeof t[n][i] == "object", t[n][i] = s ? u(!0, h ? t[n][i] : [], f[i]) : l ? u(!0, a ? t[n][i] : {}, f[i]) : f[i]; continue } else if (s) { t[n] = u(!0, [], f); continue } else if (l) { t[n] = u(!0, a ? t[n] : {}, f); continue } } t[n] = f } return t } function it(n, t, i, r, u) { var f = !i || i < 0 ? -1 : Number(new Date) + i; t = t || 100, function e() { var i = n(); if (i && r) r(); else { if (i) return; if (f === -1 || Number(new Date) < f) setTimeout(e, t); else if (u) u(); else return } }() } function s(n, t) { return t === void 0 && (t = !0), h(location.search, n, t) } function rt(n, t, i) { return i === void 0 && (i = !0), h(n, t, i) } function h(n, t, i) { if (i === void 0 && (i = !0), !t || !n) return ""; var r = "[\\?&]" + t.replace(/[\[\]]/g, "\\$&") + "=([^&#]*)" , f = i ? new RegExp(r, "i") : new RegExp(r) , u = f.exec(n); return u === null ? "" : decodeURIComponent(u[1].replace(/\+/g, " ")) } function ut(n, t) { var i, r; if (!t) return n; if (n.indexOf("//") === -1) throw 'To avoid unexpected results in URL parsing, url must begin with "http://", "https://", or "//"'; return i = document.createElement("a"), i.href = n, i.search = (i.search ? i.search + "&" : "?") + t, r = i.href, i = null, r } function f(n, t, i) { try { if (!t || i !== undefined && !i) return null; switch (n) { case 1: if (!window.localStorage) return null; if (i === undefined) return localStorage.getItem(t); localStorage.setItem(t, i); break; case 0: if (!window.sessionStorage) return null; if (i === undefined) return sessionStorage.getItem(t); sessionStorage.setItem(t, i) } } catch (r) { switch (n) { case 1: console.log("Error while fetching or saving local storage. It could be due to cookie is blocked."); break; case 0: console.log("Error while fetching or saving session storage. It could be due to cookie is blocked.") } } } function ft(n, t) { f(0, n, t) } function et(n) { return f(0, n) } function ot(n, t) { f(1, n, t) } function st(n) { return f(1, n) } Object.defineProperty(t, "__esModule", { value: !0 }); t.Viewports = t.getValueFromLocalStorage = t.saveToLocalStorage = t.getValueFromSessionStorage = t.saveToSessionStorage = t.addQSP = t.getQSPFromUrl = t.getQSPValue = t.poll = t.extend = t.parseJson = t.toElapsedTimeString = t.getPerfMarkerValue = t.createPerfMarker = t.apiDeprecated = t.pointInRect = t.detectContrast = t.getCookie = t.setCookie = t.getKeyCode = t.getVirtualKey = t.getDimensions = t.getWindowHeight = t.getWindowWidth = t.isNumber = void 0; t.isNumber = r; t.getWindowWidth = e; t.getWindowHeight = c; t.getDimensions = l; t.getVirtualKey = a; t.getKeyCode = v; t.setCookie = y; t.getCookie = p; t.detectContrast = w; t.pointInRect = b; t.apiDeprecated = k; t.createPerfMarker = d; t.getPerfMarkerValue = g; t.toElapsedTimeString = nt; t.parseJson = tt; t.extend = u; t.poll = it; t.getQSPValue = s; t.getQSPFromUrl = rt; t.addQSP = ut; t.saveToSessionStorage = ft; t.getValueFromSessionStorage = et; t.saveToLocalStorage = ot; t.getValueFromLocalStorage = st, function (n) { function t() { var t; if (window.matchMedia) { for (t = 0; t < n.allWidths.length; ++t) if (!window.matchMedia("(min-width:" + n.allWidths[t] + "px)").matches) return t } else for (t = 0; t < n.allWidths.length; ++t) if (!(e() >= n.allWidths[t])) return t; return n.allWidths.length } n.allWidths = [320, 540, 768, 1084, 1400, 1779]; n.vpMin = n.allWidths[0]; n.vpMax = 2048; n.getViewport = t }(t.Viewports || (t.Viewports = {})) }); n("closed-captions/ttml-settings", ["require", "exports", "mwf/utilities/utility"], function (n, t, i) { Object.defineProperty(t, "__esModule", { value: !0 }); t.TtmlSettings = t.xmlNS = void 0; t.xmlNS = "http://www.w3.org/XML/1998/namespace"; var r = function () { function n(n) { this.ttmlNamespace = "http://www.w3.org/ns/ttml"; this.ttmlStyleNamespace = "http://www.w3.org/ns/ttml#styling"; this.ttmlParameterNamespace = "http://www.w3.org/ns/ttml#parameter"; this.ttmlMetaNamespace = "http://www.w3.org/ns/ttml#metadata"; this.idPrefix = ""; this.mediaFrameRate = 30; this.mediaFrameRateMultiplier = 1; this.mediaSubFrameRate = 1; this.mediaTickRate = 1e3; this.supportedTimeBase = "media"; this.cellResolution = { rows: 15, columns: 32 }; this.defaultRegionStyle = { backgroundColor: "transparent", color: "#E8E9EA", direction: "ltr", display: "auto", displayAlign: "before", extent: "auto", fontFamily: "default", fontSize: "1c", fontStyle: "normal", fontWeight: "normal", lineHeight: "normal", opacity: "1", origin: "auto", overflow: "hidden", padding: "0", showBackground: "always", textAlign: "start", textDecoration: "none", textOutline: "none", unicodeBidi: "normal", visibility: "visible", wrapOption: "normal", writingMode: "lrtb" }; this.fontMap = {}; this.fontMap["default"] = "Lucida sans typewriter, Lucida console, Consolas"; this.fontMap.monospaceSerif = "Courier"; this.fontMap.proportionalSerif = "Times New Roman, Serif"; this.fontMap.monospaceSansSerif = "Lucida sans typewriter, Lucida console, Consolas"; this.fontMap.proportionalSansSerif = "Arial, Sans-serif"; this.fontMap.casual = "Verdana"; this.fontMap.cursive = "Zapf-Chancery, Segoe script, Cursive"; this.fontMap.smallCaps = "Arial, Helvetica"; this.fontMap.monospace = "Lucida sans typewriter, Lucida console, Consolas"; this.fontMap.sansSerif = "Arial, Sans-serif"; this.fontMap.serif = "Times New Roman, Serif"; n && i.extend(this, n) } return n }(); t.TtmlSettings = r }); n("constants/interfaces", ["require", "exports"], function (n, t) { Object.defineProperty(t, "__esModule", { value: !0 }) }); n("mwf/utilities/htmlExtensions", ["require", "exports", "mwf/utilities/stringExtensions"], function (n, t, i) { function e(n, t, i, f) { var e, o, s; for (f === void 0 && (f = !1), e = 0, o = u(n); e < o.length; e++) s = o[e], y(s, i, f, r[t]) } function nt(n, t, r, f) { var e, s, l, o, h, c; if (f === void 0 && (f = !1), !i.isNullOrWhiteSpace(t)) for (e = 0, s = u(n); e < s.length; e++) for (l = s[e], o = 0, h = t.split(/\s+/); o < h.length; o++) c = h[o], i.isNullOrWhiteSpace(c) || y(l, r, f, c) } function tt(n, t, r, f) { var e, s, l, o, h, c; for (f === void 0 && (f = !1), e = 0, s = u(n); e < s.length; e++) for (l = s[e], o = 0, h = u(t); o < h.length; o++) c = h[o], i.isNullOrWhiteSpace(c) || g(l, r, f, c) } function it(n) { n = v(n); n && (n.preventDefault ? n.preventDefault() : n.returnValue = !1) } function rt(n, t, i, r) { r === void 0 && (r = 150); var f = null , u = 0 , o = function (n) { var t = Date.now(); f && (clearTimeout(f), f = undefined); !!u && t < u + r ? f = setTimeout(function () { u = Date.now(); i(n) }, r - (t - u)) : (u = t, i(n)) }; return e(n, t, o), o } function ut(n, t, r, f, e) { function p(n) { var i = null , t = 0; return function (r) { var u = Date.now(); clearTimeout(i); !!t && u < t + e ? i = setTimeout(function () { t = u; n(r) }, e - (u - t)) : (t = u, n(r)) } } var o, h, a, s, c, l, v; if (f === void 0 && (f = !1), e === void 0 && (e = 150), !i.isNullOrWhiteSpace(t)) for (o = 0, h = u(n); o < h.length; o++) for (a = h[o], s = 0, c = t.split(/\s+/); s < c.length; s++) l = c[s], i.isNullOrWhiteSpace(l) || (v = p(r), y(a, v, f, l)) } function ft(n, t, i, r) { r === void 0 && (r = 150); var u = null , f = function (n) { window.clearTimeout(u); u = setTimeout(function () { i(n) }, r) }; return e(n, t, f), f } function et(n, t) { if (t === void 0 && (t = 5e3), document.readyState === "complete") { n.call(null); return } if (!document.attachEvent && document.readyState === "interactive") { n.call(null); return } var o = null, i, u, f = function () { clearTimeout(o); i && c(document, r.DOMContentLoaded, i); u && c(document, r.onreadystatechange, u); l.requestAnimationFrame.call(window, n) }; if (o = setTimeout(function () { f() }, t), document.addEventListener) { i = function () { f() } ; e(document, r.DOMContentLoaded, i, !1); return } document.attachEvent && (u = function () { document.readyState === "complete" && f() } , e(document, r.onreadystatechange, u, !1)) } function ot(n, t) { t === void 0 && (t = 5e3); var i, u = setTimeout(function () { clearTimeout(u); c(window, r.load, i); n.call(null) }, t); i = function () { clearTimeout(u); l.requestAnimationFrame.call(window, n) } ; document.readyState === "complete" ? (clearTimeout(u), n.call(null)) : e(window, r.load, i) } function p(n, t) { !n || i.isNullOrWhiteSpace(t) || b(n, t) || (n.classList ? n.classList.add(t) : n.className = i.trim(n.className + " " + t)) } function w(n, t) { var o, e, s, r, f; if (!!n && !i.isNullOrWhiteSpace(t)) for (o = " " + i.trim(t) + " ", e = 0, s = u(n); e < s.length; e++) if (r = s[e], r.classList) r.classList.remove(t); else if (!i.isNullOrWhiteSpace(r.className)) { for (f = " " + r.className + " "; f.indexOf(o) > -1;) f = f.replace(o, " "); r.className = i.trim(f) } } function st(n, t) { var i, r, u; if (t) for (i = 0, r = t; i < r.length; i++) u = r[i], w(n, u) } function ht(n, t) { var i, r, u; if (t) for (i = 0, r = t; i < r.length; i++) u = r[i], p(n, u) } function ct(n, t) { var u, f, r; if (n && t) for (u = 0, f = t; u < f.length; u++) r = f[u], i.isNullOrWhiteSpace(r.name) || i.isNullOrWhiteSpace(r.value) || n.setAttribute(r.name, r.value) } function b(n, t) { return !n || i.isNullOrWhiteSpace(t) ? !1 : n.classList ? n.classList.contains(t) : (" " + n.className + " ").indexOf(" " + i.trim(t) + " ") > -1 } function lt(n) { return n ? n.parentElement.removeChild(n) : n } function at(n, t) { return s(n, t) } function vt(n, t) { var i = s(n, t); return !i || !i.length ? null : i[0] } function s(n, t) { var r, u; if (i.isNullOrWhiteSpace(n) || n === "#") return []; if (r = t || document, /^[\#.]?[\w-]+$/.test(n)) { switch (n[0]) { case ".": return r.getElementsByClassName ? k(r.getElementsByClassName(n.slice(1))) : h(r.querySelectorAll(n)); case "#": return u = r.querySelector(n), u ? [u] : [] } return h(r.querySelectorAll(n)) } return h(r.querySelectorAll(n)) } function yt(n, t) { var i = s(n, t); return !i || !i.length ? null : i[0] } function pt(n, t) { var o = t || document, u, f, i, r, e; for (u = n.split(","), i = 0, r = u; i < r.length; i++) e = r[i], f += this.selectElements(e, o); return f } function h(n) { var i, t; if (!n) return []; for (i = [], t = 0; t < n.length; t++) i.push(n[t]); return i } function k(n) { var i, t; if (!n) return []; for (i = [], t = 0; t < n.length; t++) i.push(n[t]); return i } function wt(n) { for (n === void 0 && (n = document.documentElement); n !== null;) { var t = n.getAttribute("dir"); if (!t) n = n.parentElement; else return t === "rtl" ? o.right : o.left } return o.left } function a(n) { var i, t, r; if (n) { i = n.getBoundingClientRect(); t = {}; for (r in i) t[r] = i[r]; return typeof t.width == "undefined" && (t.width = n.offsetWidth), typeof t.height == "undefined" && (t.height = n.offsetHeight), t } } function bt(n) { if (n) return { width: parseFloat(a(n).width) + parseFloat(f(n, "margin-left")) + parseFloat(f(n, "margin-right")), height: parseFloat(a(n).height) + parseFloat(f(n, "margin-top")) + parseFloat(f(n, "margin-bottom")) } } function f(n, t, r) { if (!n) return null; if (!r && r !== "") return r = n.style[t], i.isNullOrWhiteSpace(r) && (r = getComputedStyle(n), r = r[t]), r; n.style[t] = r } function c(n, t, i, f) { var e, o, s; if (n && t && i) for (e = 0, o = u(n); e < o.length; e++) s = o[e], g(s, i, f, r[t]) } function d(n) { return Array.isArray ? Array.isArray(n) : {}.toString.call(n) === "[object Array]" } function u(n) { return d(n) ? n : [n] } function kt(n, t) { return !!n && n !== t && n.contains(t) } function dt(n, t) { return !!n && n.contains(t) } function gt(n) { return !n ? "" : n.textContent || n.innerText || "" } function ni(n, t) { !n || t === null || (n.textContent ? n.textContent = t : n.innerHTML = t) } function ti(n) { n && (n.innerHTML = "") } function ii(n) { return n = v(n), n.target || n.srcElement } function v(n) { return n || window.event } function y(n, t, i, r) { i === void 0 && (i = !1); !n || (window.addEventListener ? n.addEventListener(r, t, i) : n.attachEvent("on" + r, t)) } function g(n, t, i, r) { i === void 0 && (i = !1); !n || (window.removeEventListener ? n.removeEventListener(r, t, i) : n.detachEvent("on" + r, t)) } function ri(n, t, i) { if (i === void 0 && (i = {}), !n || !t) return null; var f = typeof t == "string" ? t : r[t] , u = null; if (i.bubbles = typeof i.bubbles == "undefined" ? !0 : i.bubbles, i.cancelable = typeof i.cancelable == "undefined" ? !0 : i.cancelable, window.CustomEvent && typeof CustomEvent == "function") u = new CustomEvent(f, i), i.changedTouches && i.changedTouches.length && (u.changedTouches = i.changedTouches); else if (document.createEvent) u = document.createEvent("CustomEvent"), u.initCustomEvent(f, i.bubbles, i.cancelable, i.detail), i.changedTouches && i.changedTouches.length && (u.changedTouches = i.changedTouches); else { u = document.createEventObject(); try { n.fireEvent("on" + f, u) } catch (e) { return undefined } return u } return n.dispatchEvent(u), u } function ui(n) { n.stopPropagation ? n.stopPropagation() : n.returnValue = !1 } function fi(n) { return n === void 0 && (n = window), n.scrollY || n.pageYOffset || (n.document.compatMode === "CSS1Compat" ? n.document.documentElement.scrollTop : n.document.body.scrollTop) } function ei(n) { if (!n) return window.document.documentElement; for (var i = n.ownerDocument.documentElement, t = n.offsetParent; t && f(t, "position") == "static";) t = t.offsetParent; return t || i } function oi(n, t) { if (n && t) { var i = t.clientHeight , r = t.scrollHeight; r > i && (t.scrollTop = Math.min(n.offsetTop - t.firstElementChild.offsetTop, r - i)) } } function si(n) { return typeof n.complete != "undefined" && typeof n.naturalHeight != "undefined" ? n && n.complete && n.naturalHeight > 0 : !0 } function hi(n) { return n && typeof n.complete != "undefined" && typeof n.naturalHeight != "undefined" ? n && n.complete && n.naturalWidth == 0 && n.naturalHeight == 0 : !1 } function ci(n) { var i = n.touches && n.touches.length ? n.touches : [n] , t = n.changedTouches && n.changedTouches[0] || i[0]; return { x: t.clientX, y: t.clientY } } function li(n, t) { for (var i = n.matches || n.webkitMatchesSelector || n.mozMatchesSelector || n.msMatchesSelector; n;) { if (i.call(n, t)) break; n = n.parentElement } return n } function ai(n, t) { t === void 0 && (t = !0); !!n && (window.PointerEvent || window.navigator.pointerEnabled) && f(n, "touchAction", t ? "pan-y" : "pan-x") } var l, o, r; Object.defineProperty(t, "__esModule", { value: !0 }); t.preventDefaultSwipeAction = t.getParent = t.getCoordinates = t.isImageLoadFailed = t.isImageLoadedSuccessfully = t.scrollElementIntoView = t.getOffsetParent = t.getScrollY = t.stopPropagation = t.customEvent = t.getEvent = t.getEventTargetOrSrcElement = t.removeInnerHtml = t.setText = t.getText = t.isDescendantOrSelf = t.isDescendant = t.toArray = t.isArray = t.removeEvent = t.css = t.getClientRectWithMargin = t.getClientRect = t.getDirection = t.htmlCollectionToArray = t.nodeListToArray = t.selectElementsFromSelectors = t.selectFirstElementT = t.selectElementsT = t.selectFirstElement = t.selectElements = t.removeElement = t.hasClass = t.addAttribute = t.addClasses = t.removeClasses = t.removeClass = t.addClass = t.onDeferred = t.documentReady = t.addDebouncedEvent = t.addThrottledEvents = t.addThrottledEvent = t.preventDefault = t.removeEvents = t.addEvents = t.addEvent = t.eventTypes = t.Direction = t.SafeBrowserApis = void 0, function (n) { n.requestAnimationFrame = window.requestAnimationFrame || function (n) { typeof n == "function" && window.setTimeout(n, 16.7) } }(l = t.SafeBrowserApis || (t.SafeBrowserApis = {})), function (n) { n[n.right = 0] = "right"; n[n.left = 1] = "left" }(o = t.Direction || (t.Direction = {})), function (n) { n[n.animationend = 0] = "animationend"; n[n.blur = 1] = "blur"; n[n.change = 2] = "change"; n[n.click = 3] = "click"; n[n.DOMContentLoaded = 4] = "DOMContentLoaded"; n[n.DOMNodeInserted = 5] = "DOMNodeInserted"; n[n.DOMNodeRemoved = 6] = "DOMNodeRemoved"; n[n.ended = 7] = "ended"; n[n.error = 8] = "error"; n[n.focus = 9] = "focus"; n[n.focusin = 10] = "focusin"; n[n.focusout = 11] = "focusout"; n[n.input = 12] = "input"; n[n.load = 13] = "load"; n[n.keydown = 14] = "keydown"; n[n.keypress = 15] = "keypress"; n[n.keyup = 16] = "keyup"; n[n.loadedmetadata = 17] = "loadedmetadata"; n[n.mousedown = 18] = "mousedown"; n[n.mousemove = 19] = "mousemove"; n[n.mouseout = 20] = "mouseout"; n[n.mouseover = 21] = "mouseover"; n[n.mouseup = 22] = "mouseup"; n[n.onreadystatechange = 23] = "onreadystatechange"; n[n.resize = 24] = "resize"; n[n.scroll = 25] = "scroll"; n[n.submit = 26] = "submit"; n[n.timeupdate = 27] = "timeupdate"; n[n.touchcancel = 28] = "touchcancel"; n[n.touchend = 29] = "touchend"; n[n.touchmove = 30] = "touchmove"; n[n.touchstart = 31] = "touchstart"; n[n.wheel = 32] = "wheel" }(r = t.eventTypes || (t.eventTypes = {})); t.addEvent = e; t.addEvents = nt; t.removeEvents = tt; t.preventDefault = it; t.addThrottledEvent = rt; t.addThrottledEvents = ut; t.addDebouncedEvent = ft; t.documentReady = et; t.onDeferred = ot; t.addClass = p; t.removeClass = w; t.removeClasses = st; t.addClasses = ht; t.addAttribute = ct; t.hasClass = b; t.removeElement = lt; t.selectElements = at; t.selectFirstElement = vt; t.selectElementsT = s; t.selectFirstElementT = yt; t.selectElementsFromSelectors = pt; t.nodeListToArray = h; t.htmlCollectionToArray = k; t.getDirection = wt; t.getClientRect = a; t.getClientRectWithMargin = bt; t.css = f; t.removeEvent = c; t.isArray = d; t.toArray = u; t.isDescendant = kt; t.isDescendantOrSelf = dt; t.getText = gt; t.setText = ni; t.removeInnerHtml = ti; t.getEventTargetOrSrcElement = ii; t.getEvent = v; t.customEvent = ri; t.stopPropagation = ui; t.getScrollY = fi; t.getOffsetParent = ei; t.scrollElementIntoView = oi; t.isImageLoadedSuccessfully = si; t.isImageLoadFailed = hi; t.getCoordinates = ci; t.getParent = li; t.preventDefaultSwipeAction = ai }); n("closed-captions/ttml-parser", ["require", "exports", "closed-captions/ttml-context", "closed-captions/ttml-time-parser", "closed-captions/ttml-settings", "mwf/utilities/htmlExtensions", "mwf/utilities/stringExtensions"], function (n, t, i, r, u, f, e) { Object.defineProperty(t, "__esModule", { value: !0 }); t.TtmlParser = void 0; var o = function () { function n() { } return n.parse = function (t, f) { var e, o, s, h; return t = typeof t == "string" ? n.parseXml(t) : t, e = new i.TtmlContext, e.settings = new u.TtmlSettings(f), e.root = n.verifyRoot(t, e), e.body = n.getFirstElementByTagNameNS(e.root, "body", e.settings.ttmlNamespace), e.events = [], e.styleSetCache = [], e.body && (n.parseTtAttrs(e), o = n.ensureRegions(e), s = n.getAttributeNS(e.root, "timeBase", e.settings.ttmlParameterNamespace) || "media", e.settings.supportedTimeBase.indexOf(s) !== -1 && (n.processAnonymousSpans(e, e.body), h = new r.TtmlTimeParser(e.settings.mediaFrameRate, e.settings.mediaTickRate), n.applyTiming(e, e.root, { start: n.mediaStart, end: n.mediaEnd }, !0, h), n.applyStyling(e, o)), e.events.push({ time: n.mediaEnd, element: null }), e.events.sort(function (n, t) { return n.time - t.time })), e } , n.parseXml = function (n) { var i = null, t; return window.DOMParser ? (t = new window.DOMParser, i = t.parseFromString(n, "application/xml")) : (t = new window.ActiveXObject("Microsoft.XMLDOM"), t.async = !1, t.loadXML(n), i = t), i } , n.verifyRoot = function (t, i) { var u, r = t.documentElement; return n.getLocalTagName(r) === "tt" && (r.namespaceURI !== "http://www.w3.org/ns/ttml" && (i.settings.ttmlNamespace = r.namespaceURI, i.settings.ttmlStyleNamespace = i.settings.ttmlNamespace + "#styling", i.settings.ttmlParameterNamespace = i.settings.ttmlNamespace + "#parameter", i.settings.ttmlMetaNamespace = i.settings.ttmlNamespace + "#metadata"), u = r), u } , n.parseTtAttrs = function (t) { var h = n.getAttributeNS(t.root, "cellResolution", t.settings.ttmlParameterNamespace), u = n.getAttributeNS(t.root, "extent", t.settings.ttmlStyleNamespace), f = null, r, o, s, i, c, l; h && (r = e.trim(h).split(/\s+/), r.length === 2 && (o = Math.round(parseFloat(r[0])), s = Math.round(parseFloat(r[1])), s > 0 && o > 0 && (f = { rows: s, columns: o }))); f && (t.settings.cellResolution = f); u && u !== "auto" && (i = u.split(/\s+/), i.length === 2 && i[0].substr(i[0].length - 2) === "px" && i[1].substr(i[1].length - 2) === "px" && (c = parseFloat(i[0].substr(0, i[0].length - 2)), l = parseFloat(i[1].substr(0, i[1].length - 2)), t.settings.rootContainerRegionDimensions = { width: Math.round(c), height: Math.round(l) })) } , n.ensureRegions = function (t) { var f, i, o, r; return t.rootContainerRegion = t.root.ownerDocument.createElementNS(t.settings.ttmlNamespace, "rootcontainerregion"), t.root.appendChild(t.rootContainerRegion), f = t.settings.rootContainerRegionDimensions ? e.format("{0}px {1}px", t.settings.rootContainerRegionDimensions.width, t.settings.rootContainerRegionDimensions.height) : "auto", t.rootContainerRegion.setAttributeNS(t.settings.ttmlStyleNamespace, "extent", f), i = n.getFirstElementByTagNameNS(t.root, "head", t.settings.ttmlNamespace), i || (i = t.root.ownerDocument.createElementNS(t.settings.ttmlNamespace, "head"), t.root.appendChild(i)), t.layout = n.getFirstElementByTagNameNS(i, "layout", t.settings.ttmlNamespace), t.layout || (t.layout = t.root.ownerDocument.createElementNS(t.settings.ttmlNamespace, "layout"), t.root.appendChild(t.layout)), o = t.layout.getElementsByTagNameNS(t.settings.ttmlNamespace, "region"), o.length || (r = t.root.ownerDocument.createElementNS(t.settings.ttmlNamespace, "region"), r.setAttributeNS(u.xmlNS, "id", "anonymous"), r.setAttribute("data-isanonymous", "1"), t.layout.appendChild(r), t.body.setAttributeNS(t.settings.ttmlNamespace, "region", "anonymous")), i } , n.processAnonymousSpans = function (t, i) { var u, a, o, v, s, y, e, h, c, l, p, r; if (n.isTagNS(i, "p", t.settings.ttmlNamespace)) { for (u = [], a = void 0, o = 0, v = f.nodeListToArray(i.childNodes); o < v.length; o++) r = v[o], r.nodeType === Node.TEXT_NODE && (a !== Node.TEXT_NODE && u.push([]), u[u.length - 1].push(r)), a = r.nodeType; for (s = 0, y = u; s < y.length; s++) for (e = y[s], h = t.root.ownerDocument.createElementNS(t.settings.ttmlNamespace, "span"), h.appendChild(e[0].parentNode.replaceChild(h, e[0])), c = 1; c < e.length; c++) h.appendChild(e[c]) } for (l = 0, p = f.nodeListToArray(i.childNodes); l < p.length; l++) r = p[l], this.processAnonymousSpans(t, r) } , n.applyTiming = function (t, i, r, u, e) { var b = n.getAttributeNS(i, "begin", t.settings.ttmlNamespace), o = b ? e.parse(b) : r.start, s = 0, l = 0, a = 0, v = n.getAttributeNS(i, "dur", t.settings.ttmlNamespace), h = n.getAttributeNS(i, "end", t.settings.ttmlNamespace), k, p, y, w, c; for (v || h ? v && h ? (l = e.parse(v), a = e.parse(h), k = Math.min(o + l, r.start + a), s = Math.min(k, r.end)) : h ? (a = e.parse(h), s = Math.min(r.start + a, r.end)) : (l = e.parse(v), s = Math.min(o + l, r.end)) : u && (o <= r.end ? (Math.max(0, r.end - o), s = r.end) : s = 0), s < o && (s = o), o = Math.floor(o), s = Math.floor(s), i.setAttribute("data-time-start", o.toString()), i.setAttribute("data-time-end", s.toString()), o >= 0 && t.events.filter(function (n) { return n.time === o }).length <= 0 && t.events.push({ time: o, element: i }), p = o, y = 0, w = f.nodeListToArray(i.childNodes); y < w.length; y++) c = w[y], c.nodeType === Node.ELEMENT_NODE && (n.getAttributeNS(i, "timeContainer", t.settings.ttmlNamespace) !== "seq" ? this.applyTiming(t, c, { start: o, end: s }, !0, e) : (this.applyTiming(t, c, { start: p, end: s }, !1, e), p = parseInt(c.getAttribute("data-time-end"), 10))) } , n.applyStyling = function (t, i) { for (var o, u = n.getFirstElementByTagNameNS(i, "styling", t.settings.ttmlNamespace), s = u ? f.htmlCollectionToArray(u.getElementsByTagNameNS(t.settings.ttmlNamespace, "style")) : [], r = 0, e = f.nodeListToArray(t.root.querySelectorAll("*")); r < e.length; r++) o = e[r], this.applyStyle(t, o, s) } , n.applyStyle = function (t, i, r) { var u = {}, f, e; this.applyStylesheet(t.settings, u, i, r); n.applyInlineStyles(t.settings, u, i); f = !0; for (e in u) if (u.hasOwnProperty(e)) { f = !1; break } f || (i.setAttribute("data-styleSet", t.styleSetCache.length.toString()), t.styleSetCache.push(u)) } , n.applyStylesheet = function (t, i, r, e) { for (var p, s, l, h, a, o, v = n.getAttributeNS(r, "style", t.ttmlNamespace), w = v ? v.split(/\s+/) : [], c = 0, y = w; c < y.length; c++) for (p = y[c], s = 0, l = e; s < l.length; s++) o = l[s], n.getAttributeNS(o, "id", u.xmlNS) === p && (this.applyStylesheet(t, i, o, e), n.applyInlineStyles(t, i, o)); if (n.isTagNS(r, "region", t.ttmlNamespace)) for (h = 0, a = f.htmlCollectionToArray(r.getElementsByTagNameNS(t.ttmlNamespace, "style")); h < a.length; h++) o = a[h], n.applyInlineStyles(t, i, o) } , n.applyInlineStyles = function (t, i, r) { for (var o, u = 0, s = f.htmlCollectionToArray(r.attributes); u < s.length; u++) o = s[u], o.namespaceURI === t.ttmlStyleNamespace && (i[n.getLocalTagName(o)] = e.trim(o.nodeValue)) } , n.getLocalTagName = function (n) { return n.localName || n.baseName } , n.isTagNS = function (n, t, i) { return n.namespaceURI === i && this.getLocalTagName(n) === t } , n.getAttributeNS = function (n, t, i) { var e = n.getAttributeNS(i, t), u, o, r; if (!e) for (u = 0, o = f.htmlCollectionToArray(n.attributes); u < o.length; u++) if (r = o[u], r.localName === t && r.lookupNamespaceURI(r.prefix) === i) { e = r.value; break } return e } , n.getFirstElementByTagNameNS = function (n, t, i) { if (n) { var r = n.getElementsByTagNameNS(i, t); if (r && r.length) return r[0] } return null } , n.mediaStart = -1, n.mediaEnd = 99999999, n }(); t.TtmlParser = o }); n("closed-captions/ttml-context", ["require", "exports", "closed-captions/ttml-parser", "closed-captions/ttml-settings", "mwf/utilities/htmlExtensions", "mwf/utilities/stringExtensions", "mwf/utilities/utility"], function (n, t, i, r, u, f, e) { Object.defineProperty(t, "__esModule", { value: !0 }); t.TtmlContext = void 0; var o = function () { function n() { var t = this; this.translateToHtml = function (e, o, s) { var c, h, v = t.getTagNameEquivalent(e), l = "", y = "", a, p, w, b; switch (v) { case "ttml:region": y = "cue "; case "ttml:rootcontainerregion": case "ttml:body": case "ttml:div": l = "div"; break; case "ttml:p": l = "p"; break; case "ttml:span": l = "span"; break; case "ttml:br": l = "br" } return a = i.TtmlParser.getAttributeNS(e, "role", t.settings.ttmlMetaNamespace), a && (y += " " + a), p = i.TtmlParser.getAttributeNS(e, "agent", t.settings.ttmlMetaNamespace), p && (y += " " + p), a === "x-ruby" ? l = "ruby" : a === "x-rubybase" ? l = "rb" : a === "x-rubytext" && (l = "rt"), f.isNullOrWhiteSpace(l) || (c = n.defaultStyle(t.ownerDocument.createElement(l)), u.addClass(c, f.trim(y)), w = i.TtmlParser.getAttributeNS(e, "title", t.settings.ttmlMetaNamespace), w && c.setAttribute("title", w), b = i.TtmlParser.getAttributeNS(e, "id", r.xmlNS), b && t.settings.idPrefix && c.setAttribute("id", t.settings.idPrefix + b), v === "ttml:region" && (h = c.appendChild(n.defaultStyle(t.ownerDocument.createElement("div"))), u.css(h, "display", "table"), u.css(h, "border-spacing", "0"), u.css(h, "cell-spacing", "0"), u.css(h, "cell-padding", "0"), u.css(h, "width", "100%"), u.css(h, "height", "100%"), h = h.appendChild(n.defaultStyle(t.ownerDocument.createElement("div"))), u.css(h, "display", "table-cell"), o.displayAlign && (t.translateStyle(v, h, { displayAlign: o.displayAlign }), o.displayAlign = null)), s && v === "ttml:span" && (h = c.appendChild(n.defaultStyle(t.ownerDocument.createElement("span"))), u.css(h, "white-space", "pre")), u.css(c, "position", "static"), u.css(c, "width", "100%"), t.translateStyle(v, c, o)), { outerNode: c, innerNode: h ? h : c } } } return n.prototype.setOwnerDocument = function (n) { this.ownerDocument = n } , n.prototype.updateRelatedMediaObjectRegion = function (n) { return !this.settings.relatedMediaObjectRegion || n.width !== this.settings.relatedMediaObjectRegion.width || n.height !== this.settings.relatedMediaObjectRegion.height ? (this.settings.relatedMediaObjectRegion = { width: n.width, height: n.height }, !0) : !1 } , n.prototype.hasEvents = function () { return this.events && !!this.events.length } , n.prototype.resetCurrentEvents = function () { this.currentEvents = [] } , n.prototype.updateCurrentEvents = function (n) { var t = this.getTemporallyActiveEvents(n), r = this.currentEvents ? this.currentEvents.length : 0, u = t ? t.length : 0, i; if (r !== u) return this.currentEventsTime = n, this.currentEvents = t, !0; if (this.currentEvents) for (i = 0; i < r; i++) if (this.currentEvents[i].time !== t[i].time) return this.currentEventsTime = n, this.currentEvents = t, !0; return !1 } , n.prototype.getTemporallyActiveEvents = function (n) { var t = this; return this.events.filter(function (i) { return i.element ? t.isTemporallyActive(i.element, n) : !0 }) } , n.prototype.isTemporallyActive = function (n, t) { return (parseInt(n.getAttribute("data-time-start"), 10) || 0) <= t && t < (parseInt(n.getAttribute("data-time-end"), 10) || 0) } , n.prototype.getCues = function (n) { var t = [], v, tt, s, y, o, w, h, c, b, l, k, e, d, g, a, nt, ut; for (this.currentEventsTime !== n && this.updateCurrentEvents(n), v = i.TtmlParser.getAttributeNS(this.root, "space", r.xmlNS) === "preserve", tt = this.layout ? this.layout.getElementsByTagNameNS(this.settings.ttmlNamespace, "region") : [], s = 0, y = tt; s < y.length; s++) { var p = y[s] , it = i.TtmlParser.getAttributeNS(p, "id", r.xmlNS) , rt = p.getAttribute("data-isanonymous"); if ((rt || it) && (o = this.translate(p, this.settings.defaultRegionStyle, v, n, this.translateToHtml), o.outerNode)) { for (w = o.innerNode, h = o.outerNode, c = 0, b = this.events; c < b.length; c++) l = b[c], l.element && this.isInRegion(l.element, rt ? null : it) && (k = this.prune(l.element, o.inheritableStyleSet, v, n, this.translateToHtml), e = k.prunedElement, k.hasPreservedContent || !e || f.trim(u.getText(e)).length || (e = null), e && w.appendChild(e)); d = h.getAttribute("data-showBackground") === "always"; (d || w.children.length) && (d && h.removeAttribute("data-showBackground"), t.push(h)) } } if (t.length) { for (g = this.translate(this.rootContainerRegion, { overflow: "hidden", padding: "0" }, !1, n, this.translateToHtml), a = 0, nt = t; a < nt.length; a++) ut = nt[a], g.innerNode.appendChild(ut); t = []; t.push(g.outerNode) } return t } , n.prototype.translate = function (n, t, i, r, u) { var f, e, o, s; return (this.isTemporallyActive(n, r) && (o = this.getTagNameEquivalent(n), e = this.getComputedStyleSet(n, t, o, r), e.display !== "none" && (s = this.getApplicableStyleSet(e, o), f = u(n, s, i))), !f) ? { outerNode: null, innerNode: null, inheritableStyleSet: null } : { outerNode: f.outerNode, innerNode: f.innerNode, inheritableStyleSet: this.getInheritableStyleSet(e) } } , n.prototype.translateStyle = function (n, t, i) { for (var r in i) i[r] && this.applyStyle(t, n, r, i[r]) } , n.prototype.prune = function (n, t, f, e, o, s) { var y, a, h, g, v, p, b, l, k, d, w, c; if (s === void 0 && (s = !1), a = !1, h = this.translate(n, t, f, e, o), h.outerNode !== null) { for (g = this.getTagNameEquivalent(n), y = h.outerNode, v = h.innerNode, p = 0, b = u.nodeListToArray(n.childNodes); p < b.length; p++) l = b[p], l.nodeType === Node.COMMENT_NODE || (l.nodeType === Node.TEXT_NODE ? (v.appendChild(document.createTextNode(l.data)), f && g === "ttml:span" && (a = !0)) : (k = f, d = i.TtmlParser.getAttributeNS(l, "space", r.xmlNS), d && (k = d === "preserve"), w = this.prune(l, h.inheritableStyleSet, k, e, o, !0), a = a || w.hasPreservedContent, w.prunedElement && v.appendChild(w.prunedElement))); if (!s) for (c = n.parentNode; c !== null && c.nodeType === Node.ELEMENT_NODE && c !== this.body;) { if (h = this.translate(c, t, f, e, o), h.outerNode) v = h.innerNode, v.appendChild(y), y = h.outerNode; else break; c = c.parentNode } } return { prunedElement: y, hasPreservedContent: a } } , n.prototype.getComputedStyleSet = function (n, t, r, f) { var o = e.extend({}, t), a, s, h, c, l; for (e.extend(o, this.styleSetCache[parseInt(n.getAttribute("data-styleSet"), 10)]), a = n.getElementsByTagNameNS(this.settings.ttmlNamespace, "set"), s = 0, h = u.htmlCollectionToArray(a); s < h.length; s++) c = h[s], this.isTemporallyActive(c, f) && i.TtmlParser.applyInlineStyles(this.settings, o, c); return r === "ttml:p" && o.lineHeight === "normal" && (l = this.appendSpanFontSizes(n, this.getInheritableStyleSet(o), f, ""), l && (o["computed-lineHeight"] = l)), o } , n.prototype.getApplicableStyleSet = function (n, t) { var i = {}, r; n.extent && this.isStyleApplicable(t, "extent") && (i.extent = n.extent); n.color && this.isStyleApplicable(t, "color") && (i.color = n.color); for (r in n) this.isStyleApplicable(t, r) && (i[r] = n[r]); return i } , n.prototype.isStyleApplicable = function (n, t) { switch (t) { case "backgroundColor": case "display": case "visibility": return "ttml:body ttml:div ttml:p ttml:region ttml:rootcontainerregion ttml:span ttml:br".indexOf(n) >= 0; case "fontFamily": case "fontSize": case "fontStyle": case "fontWeight": return "ttml:p ttml:span ttml:br".indexOf(n) >= 0; case "color": case "textDecoration": case "textOutline": case "wrapOption": return "ttml:span ttml:br".indexOf(n) >= 0; case "direction": case "unicodeBidi": return "ttml:p ttml:span ttml:br".indexOf(n) >= 0; case "displayAlign": case "opacity": case "origin": case "overflow": case "padding": case "showBackground": case "writingMode": case "zIndex": return "ttml:region ttml:rootcontainerregion".indexOf(n) >= 0; case "extent": return "ttml:tt ttml:region ttml:rootcontainerregion".indexOf(n) >= 0; case "computed-lineHeight": case "lineHeight": case "textAlign": return "ttml:p".indexOf(n) >= 0; default: return !1 } } , n.prototype.getInheritableStyleSet = function (n) { var i = {}; for (var t in n) if (n.hasOwnProperty(t)) switch (t) { case "backgroundColor": case "computed-lineHeight": case "display": case "displayAlign": case "extent": case "opacity": case "origin": case "overflow": case "padding": case "showBackground": case "unicodeBidi": case "writingMode": case "zIndex": break; default: i[t] = n[t] } return i } , n.prototype.appendSpanFontSizes = function (n, t, i, r) { for (var f, c, s, h, e = 0, o = u.nodeListToArray(n.childNodes); e < o.length; e++) f = o[e], f.nodeType === Node.ELEMENT_NODE && (c = this.getTagNameEquivalent(f), c === "ttml:span" && (s = this.getComputedStyleSet(f, t, "ttml:span", i), h = s.fontSize, h && (r += (r ? "," : "") + h), r = this.appendSpanFontSizes(f, this.getInheritableStyleSet(s), i, r))); return r } , n.prototype.isInRegion = function (n, t) { var e, r, o, f, s, h; if (!t || (e = i.TtmlParser.getAttributeNS(n, "region", this.settings.ttmlNamespace), e === t)) return !0; if (!e) { for (r = n.parentNode; r !== null && r.nodeType === Node.ELEMENT_NODE;) { if (o = this.getRegionId(r), o) return o === t; r = r.parentNode } for (f = 0, s = u.htmlCollectionToArray(n.getElementsByTagName("*")); f < s.length; f++) if (h = s[f], this.getRegionId(h) === t) return !0 } return !1 } , n.prototype.getRegionId = function (n) { var t; return n.nodeType === Node.ELEMENT_NODE && n.namespaceURI === this.settings.ttmlNamespace && (t = i.TtmlParser.getLocalTagName(n) === "region" ? i.TtmlParser.getAttributeNS(n, "id", r.xmlNS) : i.TtmlParser.getAttributeNS(n, "region", this.settings.ttmlNamespace)), t } , n.prototype.getTagNameEquivalent = function (n) { var t = i.TtmlParser.getLocalTagName(n) , r = n.namespaceURI; return r === this.settings.ttmlNamespace ? "ttml:" + t : r === "http://www.w3.org/1999/xhtml" ? t : "" } , n.prototype.applyStyle = function (t, i, r, o) { var s = o, p, h, g, nt, tt, w, b, d, it, l, a, ut; switch (r) { case "color": case "backgroundColor": s = n.ttmlToCssColor(o); u.css(t, r, s); return; case "direction": case "display": u.css(t, r, s); return; case "displayAlign": switch (o) { case "before": s = "top"; break; case "center": s = "middle"; break; case "after": s = "bottom" } u.css(t, "vertical-align", s); return; case "extent": p = void 0; l = void 0; o !== "auto" && (a = o.split(/\s+/), a.length === 2 && (p = this.ttmlToCssUnits(a[0], !0), l = this.ttmlToCssUnits(a[1], !1))); p || (p = (this.settings.rootContainerRegionDimensions ? this.settings.rootContainerRegionDimensions.width : this.settings.relatedMediaObjectRegion.width).toString() + "px", l = (this.settings.rootContainerRegionDimensions ? this.settings.rootContainerRegionDimensions.height : this.settings.relatedMediaObjectRegion.height).toString() + "px"); u.css(t, "position", "absolute"); u.css(t, "width", p); u.css(t, "min-width", p); u.css(t, "max-width", p); u.css(t, "height", l); u.css(t, "min-height", l); u.css(t, "max-height", l); return; case "fontFamily": this.settings.fontMap && this.settings.fontMap[o] && (s = this.settings.fontMap[o]); o === "smallCaps" && u.css(t, "fontVariant", "small-caps"); u.css(t, r, s); return; case "fontSize": h = o.split(/\s+/); g = h.length > 1 ? h[1] : h[0]; s = this.ttmlToCssFontSize(g, !1, .75, i === "ttml:region"); u.css(t, r, s); return; case "fontStyle": case "fontWeight": u.css(t, r, s); return; case "lineHeight": nt = o === "normal" ? o : this.ttmlToCssFontSize(o, !1); u.css(t, "line-height", nt); return; case "computed-lineHeight": for (tt = o.split(","), w = -1, b = 0, d = tt; b < d.length; b++) it = d[b], s = this.ttmlToCssFontSize(it, !1), s && s.indexOf("px") === s.length - 2 && (l = parseFloat(s.substr(0, s.length - 2)), !isNaN(l) && l > w && (w = l)); w >= 0 && u.css(t, "line-height", w + "px"); return; case "origin": o !== "auto" && (a = o.split(/\s+/), a.length === 2 && (u.css(t, "position", "absolute"), u.css(t, "left", this.ttmlToCssUnits(a[0], !0)), u.css(t, "top", this.ttmlToCssUnits(a[1], !1)))); return; case "opacity": u.css(t, r, s); return; case "padding": var c = e.getDimensions(t) , h = o.split(/\s+/) , v = void 0 , y = void 0 , k = void 0 , rt = void 0; switch (h.length) { case 1: v = this.ttmlToCssUnits(h[0], !1, c); y = this.ttmlToCssUnits(h[0], !0, c); s = f.format("{0} {1} {0} {1}", v, y); break; case 2: v = this.ttmlToCssUnits(h[0], !1, c); y = this.ttmlToCssUnits(h[1], !0, c); s = f.format("{0} {1} {0} {1}", v, y); break; case 3: v = this.ttmlToCssUnits(h[0], !1, c); y = this.ttmlToCssUnits(h[1], !0, c); k = this.ttmlToCssUnits(h[2], !1, c); s = f.format("{0} {1} {2} {1}", v, y, k); break; case 4: v = this.ttmlToCssUnits(h[0], !1, c); y = this.ttmlToCssUnits(h[1], !0, c); k = this.ttmlToCssUnits(h[2], !1, c); rt = this.ttmlToCssUnits(h[3], !0, c); s = f.format("{0} {1} {2} {3}", v, y, k, rt) } u.css(t, "box-sizing", "border-box"); u.css(t, "border-style", "solid"); u.css(t, "border-color", "transparent"); u.css(t, "border-width", s); return; case "textAlign": switch (o) { case "start": s = "left"; break; case "end": s = "right" } u.css(t, "text-align", s); return; case "textDecoration": s = n.ttmlToCssTextDecoration(o); u.css(t, "text-decoration", s); return; case "textOutline": ut = u.css(t, "color"); u.css(t, "text-shadow", this.ttmlToCssTextOutline(s, ut)); return; case "unicodeBidi": switch (o) { case "bidiOverride": s = "bidi-override" } u.css(t, "unicode-bidi", s); return; case "visibility": u.css(t, r, s); return; case "writingMode": switch (o) { case "lr": case "lrtb": u.css(t, "writing-mode", "horizontal-tb"); u.css(t, "-webkit-writing-mode", "horizontal-tb"); u.css(t, "writing-mode", "lr-tb"); return; case "rl": case "rltb": u.css(t, "writing-mode", "horizontal-tb"); u.css(t, "-webkit-writing-mode", "horizontal-tb"); u.css(t, "writing-mode", "rl-tb"); return; case "tblr": u.css(t, "text-orientation", "upright"); u.css(t, "writing-mode", "vertical-lr"); u.css(t, "-webkit-text-orientation", "upright"); u.css(t, "-webkit-writing-mode", "vertical-lr"); u.css(t, "writing-mode", "tb-lr"); return; case "tb": case "tbrl": u.css(t, "text-orientation", "upright"); u.css(t, "writing-mode", "vertical-rl"); u.css(t, "-webkit-text-orientation", "upright"); u.css(t, "-webkit-writing-mode", "vertical-rl"); u.css(t, "writing-mode", "tb-rl"); return } return; case "wrapOption": u.css(t, "white-space", o === "noWrap" ? "nowrap" : o === "pre" ? "pre" : "normal"); return; case "zIndex": u.css(t, r, s); return; default: u.css(t, r, s); return } } , n.defaultStyle = function (t) { return u.css(t, "background-color", n.TtmlNamedColorMap.transparent), u.css(t, "offset", "0"), u.css(t, "margin", "0"), u.css(t, "padding", "0"), u.css(t, "border", "0"), t } , n.prototype.ttmlToCssUnits = function (n, t, i) { var e = n, r, h; if (n && (r = n.charAt(n.length - 1), r === "c" || r === "%")) { var o = this.settings.rootContainerRegionDimensions ? this.settings.rootContainerRegionDimensions : this.settings.relatedMediaObjectRegion , s = parseFloat(n.substr(0, n.length - 1)) , f = t ? o.width : o.height , u = void 0; r === "c" ? (h = t ? this.settings.cellResolution.columns : this.settings.cellResolution.rows, u = s * f / h) : r === "%" && (i && (f = t ? i.width : i.height), u = f * s / 100); u = Math.round(u * 10) / 10; e = u + "px" } return e } , n.prototype.ttmlToCssFontSize = function (n, t, i, r) { var e, u; if (i === void 0 && (i = 1), r === void 0 && (r = !1), e = n, n && (u = n.charAt(n.length - 1), u === "c" || r && u === "%")) { var o = this.settings.rootContainerRegionDimensions ? this.settings.rootContainerRegionDimensions : this.settings.relatedMediaObjectRegion , s = parseFloat(n.substr(0, n.length - 1)) , h = t ? o.width : o.height , c = t ? this.settings.cellResolution.columns : this.settings.cellResolution.rows , f = s * h / c; u === "%" && (f /= 100); f = Math.floor(f * i * 10) / 10; e = f + "px" } return e } , n.prototype.ttmlToCssTextOutline = function (t, i) { var u = "none", a, h, v, c, l; if (!f.isNullOrWhiteSpace(t) && t !== "none") { var r = t.split(/\s+/), s = void 0, e = void 0, o; if (r.length === 1 ? (s = i, e = r[0], o = "") : r.length === 3 ? (s = r[0], e = r[1], o = r[2]) : r.length === 2 && (a = r[0].charAt(0), a >= "0" && a <= "9" ? (s = i, e = r[0], o = r[1]) : (s = r[0], e = r[1], o = "")), o = this.ttmlToCssFontSize(o, !1, .75), e = this.ttmlToCssFontSize(e, !1, .75), r = n.lengthRegEx.exec(e), r && r.length === 3) { for (h = Math.round(parseFloat(r[1])), v = r[2], u = "", c = -h; c <= h; c++) for (l = -h; l <= h; l++) (c !== 0 || l !== 0) && (u += f.format("{0}{4} {1}{4} {2} {3}, ", c, l, o, n.ttmlToCssColor(s), v)); u && (u = u.substr(0, u.length - 2)) } } return u } , n.ttmlToCssTextDecoration = function (n) { for (var r, e, t, i = "", o = n.split(/\s+/), u = 0, s = o; u < s.length; u++) { t = s[u]; switch (t) { case "none": case "noUnderline": case "noLineThrough": case "noOverline": i = "none" } } for (r = 0, e = o; r < e.length; r++) { t = e[r]; switch (t) { case "none": case "noUnderline": case "noLineThrough": case "noOverline": break; case "lineThrough": i += " line-through"; break; default: i += " " + t } } return f.trim(i) } , n.ttmlToCssColor = function (t) { var r = t, i; if (t = t.toLowerCase(), t.indexOf("rgba") === 0) { if (i = n.rgbaRegEx.exec(t), i && i.length === 5) { var u = i[1] , e = i[2] , o = i[3] , s = parseInt(i[4], 10); r = f.format("rgba({0},{1},{2},{3})", u, e, o, Math.round(s * 100 / 255) / 100) } } else if (t.charAt(0) === "#" && t.length === 9) { var u = parseInt(t.substr(1, 2), 16) , e = parseInt(t.substr(3, 2), 16) , o = parseInt(t.substr(5, 2), 16) , s = parseInt(t.substr(7, 2), 16); r = f.format("rgba({0},{1},{2},{3})", u, e, o, Math.round(s * 100 / 255) / 100) } else n.TtmlNamedColorMap[t] && (r = n.TtmlNamedColorMap[t]); return r } , n.lengthRegEx = /\s*(\d+\.*\d*)(.*)\s*/, n.rgbaRegEx = /\s*rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)\s*/, n.TtmlNamedColorMap = { transparent: "rgba(0,0,0,0)", black: "rgba(0,0,0,1)", silver: "rgba(192,192,192,1)", gray: "rgba(128,128,128,1)", white: "rgba(255,255,255,1)", maroon: "rgba(128,0,0,1)", red: "rgba(255,0,0,1)", purple: "rgba(128,0,128,1)", fuchsia: "rgba(255,0,255,1)", magenta: "rgba(255,0,255,1)", green: "rgba(0,128,0,1)", lime: "rgba(0,255,0,1)", olive: "rgba(128,128,0,1)", yellow: "rgba(255,255,0,1)", navy: "rgba(0,0,128,1)", blue: "rgba(0,0,255,1)", teal: "rgba(0,128,128,1)", aqua: "rgba(0,255,255,1)", cyan: "rgba(0,255,255,1)" }, n }(); t.TtmlContext = o }); n("data/player-data-interfaces", ["require", "exports"], function (n, t) { Object.defineProperty(t, "__esModule", { value: !0 }); t.VideoErrorCodes = t.DownloadableMediaTypes = t.MediaQuality = t.ClosedCaptionTypes = t.MediaTypes = void 0, function (n) { n[n.MP4 = "MP4"] = "MP4"; n[n.DASH = "DASH"] = "DASH"; n[n.SMOOTH = "SMOOTH"] = "SMOOTH"; n[n.HLS = "HLS"] = "HLS" }(t.MediaTypes || (t.MediaTypes = {})), function (n) { n[n.VTT = "VTT"] = "VTT"; n[n.TTML = "TTML"] = "TTML" }(t.ClosedCaptionTypes || (t.ClosedCaptionTypes = {})), function (n) { n[n.HD = "HD"] = "HD"; n[n.HQ = "HQ"] = "HQ"; n[n.SD = "SD"] = "SD"; n[n.LO = "LO"] = "LO" }(t.MediaQuality || (t.MediaQuality = {})), function (n) { n[n.transcript = "transcript"] = "transcript"; n[n.audio = "audio"] = "audio"; n[n.video = "video"] = "video"; n[n.videoWithCC = "videoWithCC"] = "videoWithCC" }(t.DownloadableMediaTypes || (t.DownloadableMediaTypes = {})), function (n) { n[n.BufferingFirstByteTimeout = 2e3] = "BufferingFirstByteTimeout"; n[n.MediaErrorAborted = 2100] = "MediaErrorAborted"; n[n.MediaErrorNetwork = 2101] = "MediaErrorNetwork"; n[n.MediaErrorDecode = 2102] = "MediaErrorDecode"; n[n.MediaErrorSourceNotSupported = 2103] = "MediaErrorSourceNotSupported"; n[n.MediaErrorUnknown = 2104] = "MediaErrorUnknown"; n[n.MediaSelectionNoMedia = 2200] = "MediaSelectionNoMedia"; n[n.AmpEncryptError = 2405] = "AmpEncryptError"; n[n.AmpPlayerMismatch = 2406] = "AmpPlayerMismatch" }(t.VideoErrorCodes || (t.VideoErrorCodes = {})) }); n("utilities/environment", ["require", "exports"], function (n, t) { Object.defineProperty(t, "__esModule", { value: !0 }); t.Environment = void 0; var i = function () { function n() { } return n.isOfficeCLView = function () { var t = parent !== window , n = t ? document.referrer : window.location.href; return n.match(/client/i) && n.match(/support.office./i) ? !0 : !1 } , n.isVideoPlayerSupported = function () { return n.isHTML5videoSupported() && n.isES5Supported() } , n.isHTML5videoSupported = function () { try { return !!document.createElement("video").canPlayType } catch (n) { } return !1 } , n.isES5Supported = function () { try { var n = !!(String.prototype && String.prototype.trim) , t = !!(Function.prototype && Function.prototype.bind) , i = !!(Object.keys && Object.create && Object.getPrototypeOf && Object.getOwnPropertyNames && Object.isSealed && Object.isFrozen && Object.isExtensible && Object.getOwnPropertyDescriptor && Object.defineProperty && Object.defineProperties && Object.seal && Object.freeze && Object.preventExtensions); return n && t && i ? !0 : !1 } catch (r) { } return !1 } , n.userAgent = navigator.userAgent, n.platform = navigator.platform, n.maxTouchPoints = navigator.maxTouchPoints, n.isWindowsPhone = !!n.userAgent.match(/Windows Phone/i), n.isSilk = !!n.userAgent.match(/Silk/i), n.hasSilkVersion = /\bSilk\/(\d+)\.(\d+)/.test(n.userAgent), n.silkMajor = n.hasSilkVersion ? Number(RegExp.$1) : 0, n.silkMinor = n.hasSilkVersion ? Number(RegExp.$2) : 0, n.isSilkModern = n.silkMajor > 3 || n.silkMajor >= 3 && n.silkMinor >= 5, n.isAndroid = !n.isWindowsPhone && (n.isSilk || !!n.userAgent.match(/Android/i)), n.androidVersion = /Android (\d+\.\d+)/i.test(n.userAgent) ? Number(RegExp.$1) : n.hasSilkVersion ? n.isSilkModern ? 4 : 1 : 0, n.isIPhone = !!n.userAgent.match(/iPhone/i) || !!n.userAgent.match(/iPod/i), n.isIPad = !!n.userAgent.match(/iPad/i) || !!(n.platform === "MacIntel" && n.maxTouchPoints > 1), n.isIProduct = n.isIPad || n.isIPhone, n.isBlackBerry = !!n.userAgent.match(/BlackBerry/i), n.isHtcWindowsPhone = n.isWindowsPhone && !!n.userAgent.match(/HTC/i), n.windowsVersion = /Windows NT(\s)*(\d+\.\d+)/.test(n.userAgent) ? parseFloat(RegExp.$2) : -1, n.ieVersion = /MSIE (\d+\.\d+)/.test(n.userAgent) ? Number(RegExp.$1) : /Trident.*rv:(\d+\.\d+)/.test(n.userAgent) ? Number(RegExp.$1) : 0, n.isIEMobileModern = /\bIEMobile\/(\d+\.\d+)/.test(n.userAgent) ? Number(RegExp.$1) >= 10 : /Windows Phone (\d+\.\d+)/i.test(n.userAgent) ? Number(RegExp.$1) >= 10 : !1, n.isAndroidModern = n.isAndroid && (n.androidVersion >= 4 || n.isSilkModern), n.isMobile = n.isIProduct || n.isAndroid || n.isBlackBerry || n.isWindowsPhone, n.useNativeControls = n.isIProduct, n.isWebkit = !!n.userAgent.match(/Webkit/i), n.isFirefox = !!n.userAgent.match(/Firefox/i), n.isChrome = !!n.userAgent.match(/Chrome/i) && navigator.vendor && navigator.vendor.indexOf("Google") > -1, n.isEdgeBrowser = n.userAgent.indexOf("Edge") > -1, n.isTV = !!n.userAgent.match(/.*SMART\-TV.*Safari\/(535\.20\+|537\.42)/), n.isWindowsRT = /^.*?\bWindows\b.*?\bARM\b.*?$/m.test(n.userAgent), n.isInIframe = parent !== window, n.isSafari = navigator.vendor && navigator.vendor.indexOf("Apple") > -1 && navigator.userAgent && !navigator.userAgent.match("CriOS"), n }(); t.Environment = i }); n("utilities/player-utility", ["require", "exports", "mwf/utilities/stringExtensions", "data/player-data-interfaces", "mwf/utilities/utility", "utilities/environment"], function (n, t, i, r, u, f) { Object.defineProperty(t, "__esModule", { value: !0 }); t.PlayerUtility = void 0; var e = function () { function n() { } return n.random4CharString = function () { return (1 + Math.random()).toString(32).substring(1) } , n.loadScript = function (n) { var i = document.getElementsByTagName("script")[0] , t = document.createElement("script"); t.src = n; t.async = !0; t.onload = t.onreadystatechange = function () { t.readyState && t.readyState !== "loaded" && t.readyState !== "complete" || (t.onload = t.onreadystatechange = null, t.parentNode && t.parentNode.removeChild(t)) } ; i.parentNode.insertBefore(t, i) } , n.formatContentErrorMessage = function (n, t, u) { var f = i.format("[CE{0}]: {1}", r.VideoErrorCodes[n], t); return u && (f += i.format("; (Additional: {0})", u)), f } , n.logConsoleMessage = function (t, r) { r === void 0 && (r = "VideoPlayer"); var u = i.format("[{0}][{1}] {2}", n.toLogTime(new Date), r, t); typeof console == "object" && console.log && console.log(u); f.Environment.isOfficeCLView() && n.logPanelMessage(u, r) } , n.toLogTime = function (n) { n || (n = new Date); var t = n.getHours() , i = n.getMinutes() , r = n.getSeconds(); return t = t < 10 ? "0" + t : t, i = i < 10 ? "0" + i : i, r = r < 10 ? "0" + r : r, t + ":" + i + ":" + r } , n.toFriendlyBitrateString = function (n) { var t, i, r; return n >= 1e7 ? (i = n / 1e6, t = Math.round(i).toLocaleString() + " Mbps") : n >= 1e6 ? (i = n / 1e6, t = (Math.round(i * 100) * .01).toLocaleString() + " Mbps") : n >= 1e4 ? (r = n / 1e3, t = Math.round(r).toLocaleString() + " Kbps") : n >= 1e3 ? (r = n / 1e3, t = (Math.round(r * 100) * .01).toLocaleString() + " Kbps") : t = Math.round(n).toLocaleString() + " bps", t } , n.logPanelMessage = function (t) { typeof n.debugPanel == "undefined" && (n.debugPanel = n.createDebugPanel()); n.debugPanel.appendChild(document.createTextNode("[" + (new Date).toLocaleString() + "]" + t)); n.debugPanel.appendChild(document.createElement("BR")); n.debugPanel.scrollTop = n.debugPanel.scrollHeight - n.debugPanel.clientHeight } , n.createDebugPanel = function () { var n = document.createElement("div"); return n.className = "debugPanel", document.body.appendChild(n), n } , n.getGUID = function () { var n = (new Date).getTime(); return "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".replace(/x/g, function (t) { var i = Math.floor((n + Math.random() * 16) % 16) , r = t === "x" ? i : i % 4 + 4; return r.toString(16) }) } , n.removeFromPendingAjaxRequests = function (t) { for (var r = -1, i = 0; i < n.pendingAjaxRequests.length; i++) if (t === n.pendingAjaxRequests[i]) { r = i; break } r >= 0 && n.pendingAjaxRequests.splice(r, 1) } , n.ajax = function (t, i, r) { if (t) { var u = null; window.XDomainRequest ? (u = new XDomainRequest, u.onload = function () { i && i(u.responseText); n.removeFromPendingAjaxRequests(u) } , n.pendingAjaxRequests.push(u)) : window.XMLHttpRequest && (u = new XMLHttpRequest, u.onreadystatechange = function () { if (u.readyState === 4) { var n = null; u.status === 200 && (n = u.responseText); i && i(n) } } ); u && (u.ontimeout = u.onerror = function () { n.removeFromPendingAjaxRequests(u); r && r() } , u.open("GET", t, !0), u.send()) } } , n.createVideoPerfMarker = function (n, t) { n && t && u.createPerfMarker(n + "_" + t, !0); t === "ttvs" && u.createPerfMarker(t, !0) } , n.getVideoPerfMarker = function (n, t) { return n && t ? u.getPerfMarkerValue(n + "_" + t) : 0 } , n.pendingAjaxRequests = [], n }(); t.PlayerUtility = e }); n("closed-captions/video-closed-captions", ["require", "exports", "closed-captions/ttml-parser", "mwf/utilities/htmlExtensions", "mwf/utilities/utility", "utilities/player-utility"], function (n, t, i, r, u, f) { Object.defineProperty(t, "__esModule", { value: !0 }); t.VideoClosedCaptions = void 0; var e = function () { function n(n, t) { this.element = n; this.errorCallback = t; this.lastPlayPosition = 0; this.ccLanguageId = null; this.resetCaptions() } return n.prototype.setCcLanguage = function (n, t) { if (this.element && n !== this.ccLanguageId) { if (this.ttmlContext = null, this.resetCaptions(), !t) { this.ccLanguageId = null; return } this.ccLanguageId = n; this.loadClosedCaptions(t) } } , n.prototype.getCurrentCcLanguage = function () { return this.ccLanguageId } , n.prototype.loadClosedCaptions = function (n) { var t = this; f.PlayerUtility.ajax(n, function (n) { return t.onClosedCaptionsLoaded(n) }, function () { t.errorCallback && t.errorCallback({ errorType: "oneplayer.error.loadClosedCaptions.ajax", errorDesc: "Ajax call failed: " + n }) }) } , n.prototype.onClosedCaptionsLoaded = function (t) { if (!t) { this.errorCallback && this.errorCallback({ errorType: "oneplayer.error.onClosedCaptionsLoaded.ttmlDoc", errorDesc: "No ttmlDocument found" }); return } this.element.setAttribute(n.ariaHidden, "false"); var r = this.element.id ? this.element.id + "-" : "" , f = { idPrefix: r, fontMap: { "default": "Segoe ui, Arial" }, relatedMediaObjectRegion: u.getDimensions(this.element) }; try { this.ttmlContext = i.TtmlParser.parse(t, f); this.ttmlContext && (this.ttmlContext.setOwnerDocument(this.element.ownerDocument), this.ttmlContext.hasEvents() ? this.updateCaptions(this.lastPlayPosition) : this.element.setAttribute(n.ariaHidden, "true")) } catch (e) { this.errorCallback && this.errorCallback({ errorType: "oneplayer.error.onClosedCaptionsLoaded.ttmlParser", errorDesc: "TtmlDocument parser error: " + e.message }) } } , n.prototype.showSampleCaptions = function () { var t = (new DOMParser).parseFromString("\n\n \n \n Media.wvx.aib<\/ttm:title>\n Copyright (c) 2013 Microsoft Corporation. All rights reserved.<\/ttm:copyright>\n <\/metadata>\n \n