// onerfcomponentFactory.js define("componentFactory", [ "require", "exports", "htmlExtensions", "utility", "stringExtensions", ], function(n, t, i, r, u) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0, }); var f = (function() { function n() {} return ( (n.create = function(t) { for (var i, r = 0, u = t; r < u.length; r++) { if (((i = u[r]), !i.c && !i.component)) throw "factoryInput should has either component or c to tell the factory what component to create.Eg.ComponentFactory.create([{ c: Carousel] or ComponentFactory.create([component: Carousel]))"; n.createComponent(i.component || i.c, i); } }), (n.createComponent = function(t, r) { if (t) { var o = r && r.eventToBind ? r.eventToBind : "", f = r && r.selector ? r.selector : t.selector, s = r && r.context ? r.context : null, u = [], e = function(n, f, e) { var a, c, l, o, h; for ( a = r.elements ? r.elements : f ? i.selectElementsT(f, s) : [document.body], c = 0, l = a; c < l.length; c++ ) (o = l[c]), o.mwfInstances || (o.mwfInstances = {}), o.mwfInstances[n] ? u.push(o.mwfInstances[n]) : ((h = new t(o, e)), (!h.isObserving || h.isObserving()) && ((o.mwfInstances[n] = h), u.push(h))); }; switch (o) { case "DOMContentLoaded": if (n.onDomReadyHappened) n.callBindFunction(t, f, e, r, u); else { n.domReadyFunctions.push(function() { return n.callBindFunction(t, f, e, r, u); }); break; } break; case "load": default: if (n.onDeferredHappened) n.callBindFunction(t, f, e, r, u); else { n.deferredFunctions.push(function() { return n.callBindFunction(t, f, e, r, u); }); break; } } } }), (n.callBindFunction = function(t, i, u, f, e) { f === void 0 && (f = null); var o = n.getTypeName(t), s = o || i || "", h = f && f.params ? f.params : {}; h.mwfClass = o; r.createPerfMarker(s + "_Begin"); u(o, i, h); r.createPerfMarker(s + "_End"); f && f.callback && f.callback(e); }), (n.getTypeName = function(t) { if (t.typeName) return t.typeName; if (t.name) return t.name; var i = n.typeNameRegEx.exec(t.toString()); if (i && i.length > 1) return i[1]; }), (n.enumerateComponents = function(n, t) { var i, r, u; if (n && t) { i = n.mwfInstances; for (r in i) if (i.hasOwnProperty(r) && ((u = i[r]), u && !t(r, u))) break; } }), (n.detach = function(n, t) { var i = n, r; i && i.mwfInstances && !u.isNullOrWhiteSpace(t) && i.mwfInstances.hasOwnProperty(t) && ((r = i.mwfInstances[t]), (i.mwfInstances[t] = null), r && r.detach && r.detach()); }), (n.typeNameRegEx = /function\s+(\S+)\s*\(/), (n.onLoadTimeoutMs = 6e3), (n.onDeferredHappened = !1), (n.deferredFunctions = []), (n.onDomReadyHappened = !1), (n.domReadyFunctions = []), n ); })(); (t.ComponentFactory = f), (function() { i.onDeferred(function() { var n, t, r, u; if ( ((f.onDeferredHappened = !0), (n = f.deferredFunctions), !n || n.length > 0) ) for (t = 0, r = n; t < r.length; t++) (u = r[t]), typeof u == "function" && i.SafeBrowserApis.requestAnimationFrame.call(window, u); f.deferredFunctions = null; }, f.onLoadTimeoutMs); i.documentReady(function() { var n, t, r, u; if ( ((f.onDomReadyHappened = !0), (n = f.domReadyFunctions), !n || n.length > 0) ) for (t = 0, r = n; t < r.length; t++) (u = r[t]), typeof u == "function" && i.SafeBrowserApis.requestAnimationFrame.call(window, u); f.domReadyFunctions = null; }, f.onLoadTimeoutMs); })(); }); define("htmlExtensions", ["require", "exports", "stringExtensions"], function(n, t, i) { "use strict"; 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 g(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 nt(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) || d(l, r, f, c); } function tt(n) { n = v(n); n && (n.preventDefault ? n.preventDefault() : (n.returnValue = !1)); } function it(n, t, i, r) { r === void 0 && (r = 150); var f, 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 rt(n, t, r, f, e) { function p(n) { var i, 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 ut(n, t, i, r) { r === void 0 && (r = 150); var u, f = function(n) { window.clearTimeout(u); u = setTimeout(function() { i(n); }, r); }; return e(n, t, f), f; } function ft(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, 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("timedout"); }, t)), document.addEventListener) ) { i = function() { f("domcontentloaded"); }; e(document, r.DOMContentLoaded, i, !1); return; } document.attachEvent && ((u = function() { document.readyState === "complete" && f("readystatecomplete"); }), e(document, r.onreadystatechange, u, !1)); } function et(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 ot(n, t) { var i, r, u; if (t) for (i = 0, r = t; i < r.length; i++)(u = r[i]), w(n, u); } function st(n, t) { var i, r, u; if (t) for (i = 0, r = t; i < r.length; i++)(u = r[i]), p(n, u); } function ht(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 ct(n) { return n ? n.parentElement.removeChild(n) : n; } function lt(n, t) { return h(n, t); } function at(n, t) { var i = h(n, t); return !i || !i.length ? null : i[0]; } function h(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 ? o(r.getElementsByClassName(n.slice(1))) : o(r.querySelectorAll(n)); case "#": return (u = r.querySelector(n)), u ? [u] : []; } return o(r.getElementsByTagName(n)); } return o(r.querySelectorAll(n)); } function vt(n, t) { var i = h(n, t); return !i || !i.length ? null : i[0]; } function yt(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 o(n) { var i, t; if (!n) return []; for (i = [], t = 0; t < n.length; t++) i.push(n[t]); return i; } function pt(n) { for (n === void 0 && (n = document.documentElement); n !== null;) { var t = n.getAttribute("dir"); if (!t) n = n.parentElement; else return t === "rtl" ? s.right : s.left; } return s.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 wt(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]), d(s, i, f, r[t]); } function k(n) { return Array.isArray ? Array.isArray(n) : {}.toString.call(n) === "[object Array]"; } function u(n) { return k(n) ? n : [n]; } function bt(n, t) { return !!n && n !== t && n.contains(t); } function kt(n, t) { return !!n && n.contains(t); } function dt(n) { return !n ? "" : n.textContent || n.innerText || ""; } function gt(n, t) { !n || t === null || (n.textContent ? (n.textContent = t) : (n.innerHTML = t)); } function ni(n) { n && (n.innerHTML = ""); } function ti(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 d(n, t, i, r) { i === void 0 && (i = !1); !n || (window.removeEventListener ? n.removeEventListener(r, t, i) : n.detachEvent("on" + r, t)); } function ii(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 ri(n) { n.stopPropagation ? n.stopPropagation() : (n.returnValue = !1); } function ui(n) { return ( n === void 0 && (n = window), n.scrollY || n.pageYOffset || (n.document.compatMode === "CSS1Compat" ? n.document.documentElement.scrollTop : n.document.body.scrollTop) ); } function fi(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 ei(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 oi(n) { return typeof n.complete != "undefined" && typeof n.naturalHeight != "undefined" ? n && n.complete && n.naturalHeight > 0 : !0; } function si(n) { return n && typeof n.complete != "undefined" && typeof n.naturalHeight != "undefined" ? n && n.complete && n.naturalWidth == 0 && n.naturalHeight == 0 : !1; } function hi(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 ci(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 li(n, t) { t === void 0 && (t = !0); !!n && (window.PointerEvent || window.navigator.pointerEnabled) && f(n, "touchAction", t ? "pan-y" : "pan-x"); } var l, s, r; Object.defineProperty(t, "__esModule", { value: !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"; })((s = 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 = g; t.removeEvents = nt; t.preventDefault = tt; t.addThrottledEvent = it; t.addThrottledEvents = rt; t.addDebouncedEvent = ut; t.documentReady = ft; t.onDeferred = et; t.addClass = p; t.removeClass = w; t.removeClasses = ot; t.addClasses = st; t.addAttribute = ht; t.hasClass = b; t.removeElement = ct; t.selectElements = lt; t.selectFirstElement = at; t.selectElementsT = h; t.selectFirstElementT = vt; t.selectElementsFromSelectors = yt; t.nodeListToArray = o; t.getDirection = pt; t.getClientRect = a; t.getClientRectWithMargin = wt; t.css = f; t.removeEvent = c; t.isArray = k; t.toArray = u; t.isDescendant = bt; t.isDescendantOrSelf = kt; t.getText = dt; t.setText = gt; t.removeInnerHtml = ni; t.getEventTargetOrSrcElement = ti; t.getEvent = v; t.customEvent = ii; t.stopPropagation = ri; t.getScrollY = ui; t.getOffsetParent = fi; t.scrollElementIntoView = ei; t.isImageLoadedSuccessfully = oi; t.isImageLoadFailed = si; t.getCoordinates = hi; t.getParent = ci; t.preventDefaultSwipeAction = li; }); define("stringExtensions", ["require", "exports"], function(n, t) { "use strict"; 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.isNullOrWhiteSpace = r; t.trim = i; t.startsWith = u; t.endsWith = f; t.getMatchLength = e; t.format = o; }); define("utility", ["require", "exports", "stringExtensions"], function(n, t, i) { "use strict"; 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 >= 0.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) ) { /*!/#IFDEF perf_marker_global || log_define_timing */ if ( !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); /*!/#ENDIF*/ } } } 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.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; var ht; (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; })((ht = t.Viewports || (t.Viewports = {}))); }); define("ajaxWithAnimation", ["jqReady!", "jsll"], function(n, t) { var i = [ "
", ], u = function(t, r) { var u = n(t), o, f, e; u.length && ((o = (r.loaderType || "").toUpperCase()), (i[1] = o === "PROGRESS" || o === "PROGRESSBAR" ? "regional" : o === "SPINNERLARGE" ? "local f-progress-large f-center" : "local f-progress-small"), r.margin && r.margin.length && (i[3] = r.margin), (f = i.join("")), (e = (r.loaderPosition || "").toUpperCase()), e === "TOP" || e === "BOTTOM" ? (u.addClass("ajaxloader"), e === "BOTTOM" ? u.append(f) : u.prepend(f)) : (u.parent().addClass("ajaxloader"), e === "BEFORE" ? u.before(f) : u.after(f))); }, f = function(t, i) { var r = n(t), u; r.length && ((u = (i.loaderPosition || "").toUpperCase()), u !== "TOP" && u !== "BOTTOM" && (r = r.parent()), r.removeClass("ajaxloader").children().remove(".c-progress")); }, r = function(i) { i.refreshElement && u(i.refreshElement, i); var r = n.extend(i, { serviceName: "OneRFService", serviceType: "WebService", operationName: "OneRFAjax", addCvToRequestHeader: !0, }); return t.service.post(r).always(function() { f(i.refreshElement, i); }); }; return ( n.extend(n, { ajaxWithAnimation: r, }), r ); }); define("advancedHistory", ["window"], function(n) { function f(n, t) { var u, f, o, e; if (i) if (((u = r[n]), u)) if (typeof u == "function") u != t && (r[n] = [u, t]); else { for (f = !1, e = 0; (o = u[e]); ++e) if (o == t) { f = !0; break; } f || u.push(t); } else r[n] = t; } function e(n, t) { var u, e, f; if (i && ((u = r[n]), u)) if (typeof u == "function") u === t && delete r[n]; else for (f = 0; (e = u[f]); ++f) if (typeof e == "function" && e === t) { u.splice(f, 1); break; } } function o(n, r, u, f) { if (i) { var e = { stateType: n, stateObject: r, }; typeof u == "undefined" ? t.pushState(e, f || "") : t.pushState(e, f || "", u); } } function s(n, r, u, f) { if (i) { var e = { stateType: n, stateObject: r, }; typeof u == "undefined" ? t.replaceState(e, f || "") : t.replaceState(e, f || "", u); } } function h() { i && t.back(); } function c() { i && t.forward(); } function l(n) { i && n && t.go(n); } function a() { if (i) { var n = t.state; if (n) return n.stateType; } } function v() { if (i) { var n = t.state; if (n && n.stateType) return n.stateObject; } } function y(n) { var t, i = n.state, f, e; if (i) (t = i.stateType), t && ((f = r[t]), f && ((e = i.stateObject), u(f, e))); else for (t in r) u(r[t], null); } function u(n, t) { if (typeof n == "function") n(t); else if (n && n.length > 0) for (var i, r = 0; (i = n[r]); ++r) typeof i == "function" && i(t); } var t = n.history, i = !!(t && t.pushState), r = {}; return ( i && n.addEventListener("popstate", y), { on: f, off: e, push: o, replace: s, back: h, forward: c, go: l, currentType: a, currentState: v, isSupported: i, } ); }); define("queryParams", [], function() { function n(n) { return (n = n.replace(/\+/g, " ")), decodeURIComponent(n); } function t(n, t, r) { if ( n.indexOf("?") === -1 && (n.indexOf("http") === 0 || (n.indexOf("=") === -1 && n.indexOf("&") === -1)) ) return {}; var u = n.indexOf("?") !== -1 ? n.split("?")[1] : n; return i(u, t, r); } function i(t, i, r) { var f = {}, s, o; if (t && t.length) for (t = t.split("#")[0], s = t.split("&"), o = 0; o < s.length; o++) { var h = s[o].split("="), u = h[0].toLowerCase(), e = h[1]; r && ((u = n(u)), e && (e = n(e))); i ? (f[u] || (f[u] = []), f[u].push(e)) : (f[u] = e); } return f; } return t; }); define("ajaxEvent", [ "jqReady!", "document", "advancedHistory", "queryParams", "refreshAjaxModuleTelemetry", "jsll", "ajaxWithAnimation", ], function(n, t, i, r, u, f) { function h(t, i, u) { var f = null, e, o; return ( typeof i == "string" && ((f = i.split("?")[0]), (i = r(i, !0, !0))), (f && f.length) || (f = location.href.split("?")[0]), (e = n.param(i, !0)), (o = f + (e && e.length ? "?" + e : "")), s(t, o, u || {}) ); } function c(t) { var i = { ajaxevent: t, }, s = n("meta[name=MarginTopPixels]").attr("content"), r, u, f, e, o; return ( s !== undefined && (i.MarginTopPixels = s), (r = n("meta[name=CurrentTheme]").attr("content")), r !== undefined && (i.CurrentTheme = r), (u = n("meta[name=AccentColor]").attr("content")), u !== undefined && (i.AccentColor = u), (f = n("meta[name=X-Flight-Ids]").attr("content")), f !== undefined && (i["X-Flight-Ids"] = f), (e = n("meta[name=X-FD-FEATURES]").attr("content")), e !== undefined && (i["X-FD-FEATURES"] = e), (o = n("meta[name=X-FD-FEATURES-IMP]").attr("content")), o !== undefined && (i["X-FD-FEATURES-IMP"] = o), i ); } function l() { var t = {}, o = n("meta[name=hardware]").attr("content"), i, r, u, f, e; return ( o !== undefined && (t.hardware = o), (i = n("meta[name=architecture]").attr("content")), i !== undefined && (t.architecture = i), (r = n("meta[name=telemetryId]").attr("content")), r !== undefined && (t.telemetryId = r), (u = n("meta[name=deviceSerialNumber]").attr("content")), u !== undefined && (t.deviceSerialNumber = u), (f = n("meta[name=timeZone]").attr("content")), f !== undefined && (t.timeZone = f), (e = n("meta[name=userinfo]").attr("content")), e !== undefined && (t.auth = e), t ); } function s(r, u, e, s) { var h = { url: u, previousUrl: location.href, event: r, title: t.title, scrollTop: n(t).scrollTop(), options: { complete: null, error: "", loaderPosition: e.loaderPosition, loaderType: e.loaderType, refreshElement: e.refreshElement && typeof e.refreshElement == "string" ? e.refreshElement : null, }, }, a = { url: u, dataType: "html", data: n.extend(e.data, l()), additionalHeaders: n.extend(e.additionalHeaders, c(r)), }; return ( (a = n.extend(a, e)), n .ajaxWithAnimation(a) .done(function(u) { var c = t.URL; v(u, r, e); s || r === o || (i.currentState() || i.push( "ajaxEvent", n.extend({}, h, { url: h.previousUrl, }), h.previousUrl, h.title ), i.push("ajaxEvent", h, h.url, h.title)); c !== t.URL ? f.ct.capturePageView() : f.ct.captureContentUpdate(); e.complete && e.complete(u); }) .fail(function() { e.error && e.error(); }) ); } function a(t) { t && t.event && s(t.event, t.url, t.options, !0).done(function() { n("html, body").animate({ scrollTop: t.scrollTop, }, 200 ); }); } function v(i, r) { var f = n(n.trim(i)), e, h, s; y(f); e = n("head title"); e.length && (t.title = e.text()); h = f.find("[data-module-id]"); s = []; h.each(function() { var i = n(this), e = i.attr("id"), f = n("[id='" + e + "']"), t; f.length && ((t = n("[data-axp]", f)), (t.length || r !== o) && (t.length ? (u(t, i), t.first().after(i.children()), t .parents("section[role=tabpanel]:first") .attr("defercomplete", "true"), t.remove()) : (u(f, i), f.replaceWith(i)), s.push(e), n.each(i[0].attributes, function(n, t) { (t.name !== "class" && f.attr(t.name)) || f.attr(t.name, t.value); }))); }); p(f); w(r, s); } function y(t) { var i = t.filter("link[rel=stylesheet]"); i.length && i.each(function() { var t = this.getAttribute("href"); e[t] || (n("head").append(this), (e[t] = !0)); }); } function p(t) { var i = t.filter("script"); i.length && i.each(function() { var f, r, o, s, h, i, u, t; this.text.indexOf("requirejs.config") === 0 && ((f = "requireJsConfig"), (r = e[f]), r && r.parentNode && r.parentNode.removeChild(r), (o = new RegExp("paths:{(.|\n)*?}")), (s = o.exec(this.text)), s.forEach(function(n) { if (n.indexOf("paths:") === 0) return (h = n.replace("paths:", "")), !1; }), (u = n("head")), (t = JSON.parse(h.replace(/\'/g, '"'))), t.redtux !== undefined && ((i = ''), u.append(i)), t.mwf !== undefined && ((i = ''), u.append(i)), t.partner !== undefined && ((i = ''), u.append(i)), t.platform !== undefined && ((i = ''), u.append(i)), (e[f] = this)); }); } function w(n, i) { if (n && i && i.length) { var r = t.createEvent("CustomEvent"); r.initCustomEvent("moduleRefreshed", !0, !0, { eventName: n, modules: i, }); t.dispatchEvent(r); } } var e = {}, o = "DeferredEvent"; i.on("ajaxEvent", a); return h; }); define("fireDeferredEvent", ["jqReady!", "ajaxEvent", "document"], function(n, t, i) { var r = !1; return function(u) { return r ? n.Deferred().reject() : ((r = !0), t("DeferredEvent", i.URL, u)); }; }); define("refreshAjaxModuleTelemetry", ["window"], function(n) { var t = n._pageBITags && n._pageBITags.elementTag ? n._pageBITags.elementTag : "data-m"; return function(n, i) { var r = n && n.attr(t), u = i && i.attr(t); if (r !== u && r && u) { var f = JSON.parse(r), e = JSON.parse(u), o = new RegExp(e.id, "g"); i.html(i.get(0).innerHTML.replace(o, f.id)); i.attr(t, r); } }; }); define("deferExec", function() { "use strict"; function h(n) { for (var t = 0; t < n.length; t += 1) Number.isInteger(Number(n[t][1])) ? setTimeout(n[t][0], n[t][1]) : n[t][0](); } function s() { window._pageTimings || (window._pageTimings = {}); window._pageTimings.didDeferExecTimeout = e; var n = f; n.length && ((f = []), h(n)); } function n() { clearTimeout(o); u = !0; s(); } function c() { window.removeEventListener ? window.removeEventListener("load", n, !1) : window.detachEvent && window.detachEvent("load", n); r = !0; e = !0; s(); } function t(n, i) { return ( u || r ? Number.isInteger(Number(i)) ? setTimeout(n, i) : n() : f.push([n, i]), t ); } var i = typeof window != "undefined" && window.document, r = !i, u = !i, f = [], e = !1, o; return ( (Number.isInteger = Number.isInteger || function(n) { return typeof n == "number" && isFinite(n) && Math.floor(n) === n; }), i && (window.addEventListener ? window.addEventListener("load", n, !1) : window.attachEvent && window.attachEvent("onload", n), (u && r) || (o = setTimeout(c, 5e3))), (t.load = function(n, i, r, u) { u.isBuild ? r(null) : t(r, n); }), t ); }); require(["domReady!", "deferExec!"]); define("headData", ["evaluate", "document"], function(n, t) { var r = t.getElementsByTagName("head")[0], i, u, f, e; return r ? ((i = {}), (u = r.getAttribute("data-js")), u && (i.jsInfo = n(u)), (f = r.getAttribute("data-client-settings")), f && (i.clientSettings = n(f)), (e = r.getAttribute("data-info")), e && (i.debugInfo = n(e)), (i.xdid = r.getAttribute("data-xd-id")), (i.locale = t .getElementsByTagName("html")[0] .getAttribute("lang") .toLowerCase()), i) : {}; }); define("evaluate", function() { return ( (window.JSON && window.JSON.parse) || function(n) { return eval("(" + n + ")"); } ); }); require([ "jqReady!", "document", "headData", "ajaxEvent", "fireDeferredEvent", "domReady!", ], function(n, t, i, r, u) { function c() { var t = n("[data-ajax]"); t.each(function() { var i = n(this), t = i.data("ajax"), l, u, f, s, c; if (t && t.e && t.e.length && t.sel && t.sel.length) { l = n(".d_xbox").length >= 1; u = !1; i.attr("role") === "region" && ((f = n("#pivot-tab-" + i.attr("id"))), f.length && ((i = f), (t.sel = "#" + i.attr("id")))); var e = i.parents("[data-module-id]:first"), r = e.length ? e.attr("id") : i.attr("id"), a = e.parents("[data-m]:first").attr("id"), o = t.e; r && t.pivot === "true" ? ((s = n("#" + i.attr("aria-controls"))), s.length && ((r = s.attr("id")), (a = r), (t.margin = l ? "50" : "250")), (u = !0)) : (t.id === 1 || t.id === !0) && (o = r + "-" + o); var y = t.sel[0] === "#" ? t.sel : "#" + r + " " + t.sel, v = ".ajaxevent." + r, h = "click" + v; u && (h += " focusin" + v); c = t.fireonce === "true" ? !0 : !1; n("body").on(h, y, function() { var i = t.usebrowserurl === "true" ? location.href : n(this).attr("href"); return p(o, i, t, r, "#" + a, c), c && n("body").off(h), !1; }); } }); } function l(n) { if (!n) return !1; var i = n.getBoundingClientRect(); return ( i.top < (window.innerHeight || t.documentElement.clientHeight) || i.top <= 0 ); } function f() { var t = n(".ajaxplaceholder:visible"), i = t.length; !e && i && l(t[0]) && (h(), (e = !0)); } function a() { f(); } function v() { var i = n(".ajaxplaceholder:visible").not(".c-pivot").length; if (i) { n(window).on("scroll", f); window.staticOverrideDisableReadyEvent || n(t).ready(a); } } function y() { n(window).off("scroll", f); } function p(t, u, f, e, h, c) { f = n.extend({}, f, { refreshElement: f.wait ? "#" + e + " " + f.wait : "#" + e, loaderType: f.waitind || f.waitInd, loaderPosition: f.waitpos || f.waitPos, margin: f.margin, additionalHeaders: n.extend({}, i.debugInfo && i.debugInfo.bh), data: n.extend({}, i.debugInfo && i.debugInfo.bh), }); r(t, u, f).done(function() { c && s(); o(t, e); }); } function o(n, i) { var u = { eventName: n, moduleId: i, }, r = t.createEvent("CustomEvent"); r.initCustomEvent("deferredLoadModuleCompleted", !0, !0, u); t.dispatchEvent(r); } function s() { var t = n("section.c-pivot section[role=tabpanel][defercomplete]"); n("[data-axp]", t).removeAttr("data-axp"); n("[data-deferredevent]", t).removeAttr("data-deferredevent"); t.each(function() { n("body").off( "click.ajaxevent." + n(this).attr("id") + " focusin.ajaxevent." + n(this).attr("id") ); }); } function h() { var t = n(".ajaxplaceholder[data-axp]").length; t && u({ additionalHeaders: n.extend({}, i.debugInfo && i.debugInfo.bh), data: n.extend({}, i.debugInfo && i.debugInfo.bh), }).done(function() { s(); o(); y(); }); } var e = !1; n.ajaxPrefilter(function(n, t) { (n.dataType == "script" || t.dataType == "script") && (n.cache = !0); }); c(); window.staticOverrideDisableScrollEvent || v(); n("[data-deferredevent]").length > 0 && require(["deferExec!5000"], h); }); require(["jqReady!", "domReady!"], function(n) { (window.apiTagging = {}), (function(t) { var r, i; if ( t !== undefined && ((t.appId = ""), (t.awaCheckedTimes = 0), (t.postMessage = function(n) { window.parent.postMessage(n, "*"); }), (t.awaIsAvailable = function() { return !!( window.awa && window.awa.ct && window.awa.ct.captureContentPageAction ); }), (t.getUrlVars = function() { var n = {}, t = window.location.href.replace( /[?&]+([^=&]+)=([^&]*)/gi, function(t, i, r) { n[i] = r; } ); return n; }), (t.getUrlParam = function(n, i) { var r = i; return ( window.location.href.indexOf(n) > -1 && (r = decodeURIComponent(t.getUrlVars()[n])), r ); }), (t.setAppId = function() { t.awaIsAvailable() ? window.awa.extendCoreData({ appId: t.appId, }) : t.awaCheckedTimes <= 100 && (t.awaCheckedTimes++, setTimeout(function() { t.setAppIda(); }, 50)); }), (t.setAppIdFromQS = function() { var i = t.getUrlParam("jsllappid", undefined); n.trim(i) && ((t.appId = n.trim(i)), t.setAppId()); }), (t.setAppIdFromPM = function(i) { i.originalEvent.data.setAppId && i.originalEvent.data.appId && ((t.appId = n.trim(i.originalEvent.data.appId)), t.setAppId()); }), (t.getVideoId = function(t) { var r = undefined, i = n(t).closest(".c-video-player").attr("data-player-data"); return ( (i = JSON.parse(i)), i.metadata && i.metadata.videoId && (r = i.metadata.videoId), r ); }), (t.attachVideoEvent = function(i, r) { n(i).on( "ended pause play playing seeked timeupdate volumechange abort canplay canplaythrough durationchange emptied error progress ratechange seeking stalled suspend waiting", function(n) { var i = {}; i.tagging = "video"; i.targetVideoId = r; i.type = n.type; i.autoplay = this.autoplay; i.controls = this.controls; i.currentSrc = this.currentSrc; i.currentTime = this.currentTime; i.defaultMuted = this.defaultMuted; i.defaultPlaybackRate = this.defaultPlaybackRate; i.duration = this.duration; i.ended = this.ended; i.error = this.error; i.loop = this.loop; i.muted = this.muted; i.networkState = this.networkState; i.paused = this.paused; i.playbackRate = this.playbackRate; i.preload = this.preload; i.readyState = this.readyState; i.seeking = this.seeking; i.src = this.src; i.volume = this.volume; t.postMessage(i); } ); }), (t.vTaggingHelper = function(i, r) { i.tagging = "video"; i.type = "videostart"; i.targetVideoId = r.contentTags.vidid; i.targetVideoName = r.contentTags.vidnm; n("video").each(function() { var u = this, f = t.getVideoId(u); f === r.contentTags.vidid && n(u).attr("videoeventapi") !== "true" && ((i.targetVideoActionType = n(u)[0].autoplay ? "A" : "O"), (i.targetVideoDuration = n(u)[0].duration), (i.targetVideoIsMuted = n(u)[0].muted || n(u)[0].volume === 0), t.attachVideoEvent(u, r.contentTags.vidid), u.setAttribute("videoeventapi", !0)); }); }), (t.turnOnVideoAPI = function(n) { if (n.originalEvent.data.videoAPI) if (t.awaIsAvailable()) { var i = awa.ct.captureContentPageAction; awa.ct.captureContentPageAction = function(r) { if (r.behavior === 240) { r.tagging = "behavior"; t.postMessage(r); var u = {}; t.vTaggingHelper(u, r); t.postMessage(u); } else(r.tagging = "behavior"), t.postMessage(r); n.originalEvent.data.tOffIframeTagging || i(r); }; } else t.awaCheckedTimes <= 100 && setTimeout(function() { t.turnOnVideoAPI(n); }, 50); }), (r = function(n) { var i = !0, r; if (t.allowedParentDomains) { i = !1; for (r in t.allowedParentDomains) n === r && (i = !0); } return i; }), window.location !== window.parent.location) ) { try { n(window).on("message", function(n) { r(n.originalEvent.origin) && n.originalEvent.data && n.originalEvent.data.vTagging && (t.setAppIdFromPM(n), t.turnOnVideoAPI(n)); }); i = {}; i.onePlayerApi = !0; t.postMessage(i); } catch (u) {} t.setAppIdFromQS(); } })(window.apiTagging); }); define("defaultFocus", ["jqReady!", "domReady!"], function() { function o(n) { return parseInt(n.getAttribute("tabindex")) >= 0 ? !0 : e.indexOf(n.tagName) !== -1 ? !0 : !1; } function u(n, t) { for (var i, r = 0; r < n.children.length; ++r) (i = n.children[r]), o(i) && (t.top || (t.top = i), (t.bottom = i)), u(i, t); } function f(n) { var f = { top: null, bottom: null, }, t, i, r; u(n, f); t = document.createElement("div"); i = document.createElement("div"); t.setAttribute("tabindex", 0); i.setAttribute("tabindex", 0); t.setAttribute("data-tv-prevent-focus", !0); i.setAttribute("data-tv-prevent-focus", !0); t.addEventListener("focus", function() { f.bottom.focus(); }); i.addEventListener("focus", function() { f.top.focus(); }); n.insertAdjacentElement("afterbegin", t); n.insertAdjacentElement("beforeend", i); r = 10; t.style = "width:" + document.documentElement.clientWidth + "px;height:" + r + "px;opacity:0;position:fixed;left:0;top:100px;z-index:9999"; i.style = "width:" + document.documentElement.clientWidth + "px;height:" + r + "px;opacity:0;position:fixed;left:0;top:" + (document.documentElement.clientHeight - r) + "px;z-index:9999"; } function r(n) { var u, r, f, i; if (!n) return !1; u = n.querySelectorAll("[" + t + "]:not([disabled]):not([hidden])"); r = []; for (i in u) u.hasOwnProperty(i) && r.push(u[i]); for ( r = r.sort(function(n, i) { var u = parseInt(n.getAttribute(t)), r; return ( (u = isNaN(u) ? 0 : u), (r = parseInt(i.getAttribute(t))), (r = isNaN(r) ? 0 : r), u - r ); }), f = !1, i = 0; i < r.length; ++i ) if ((r[i].focus(), document.activeElement === r[i])) { f = !0; break; } return f; } var e = [ "A", "BUTTON", "IFRAME", "INPUT", "SELECT", "TEXTAREA", "X-MS-WEBVIEW", ], t = "data-focus-rank", n, i = [], s = function(t, u, e, o) { if ( (n && (n.disconnect(), (n = null)), (t = t || document.body), t === document.body || t === document.documentElement) ) r(t); else { var s = function(t) { if (r(t)) { n.disconnect(); n = null; u && f(t); window.WinStoreClient && window.WinStoreClient.navigateForwardInternally(e, t); return; } for ( var i = document.activeElement; i && i.nodeType === Node.ELEMENT_NODE; ) { if (i === t) { n.disconnect(); n = null; u && f(t); window.WinStoreClient && window.WinStoreClient.navigateForwardInternally(e, t); return; } i = i.parentNode; } }, h = function(n) { for (var i, u, r = 0; r < n.length; ++r) if (((i = n[r]), i.type === "childList")) for (u = 0; u < i.addedNodes.length; ++u) i.addedNodes[u].nodeType == 1 && s(t); else i.type === "attributes" && i.target.nodeType == 1 && s(t); }; n = new window.MutationObserver(h); n.observe(t, { childList: !0, attributes: !0, subtree: !0, }); i.push(o || document.activeElement); s(t); } }, h = function(n) { for (var t; i.length > 0 && t !== document.activeElement;) (t = i.pop()), t.focus(), window.WinStoreClient && window.WinStoreClient.navigateBackwardInternally(n); return t === document.activeElement; }; return { focus: s, tryRestorePreviousFocus: h, trySetDefaultFocusInContainer: r, }; }); define("targeting", ["jqReady!", "domReady!"], function(n) { function t() { n("body").on("click", function(t) { var o = n(t.target), e, s, h; return ( u(o) && ((e = i(o)), typeof e == "string" && (f(o) ? (s = "click") : ((h = o.data("m")), (s = (h && h.cN) || "nonnav")), (e = r(e, s)), n.ajax(e))), !0 ); }); } function i(t) { var r = t.parents("[data-target]"), i; if (r.length > 0) return (i = n(r.get(0)).data("target")), i && i.trackerUri; } function r(n, t) { if (!n || !t) return n; var i = encodeURIComponent(t); return n.replace(/click/i, i).replace(/{action}/i, i); } function u(n) { return ( n.is("a, button, form, select, input, [data-js-href]") || n.parents("a, button, [data-js-href]").length > 0 ); } function f(n) { return ( n.is("a, [data-js-href]") || n.parents("a, [data-js-href]").length > 0 ); } return { setup: t, }; }); require(["targeting"], function(n) { n.setup(); }); require(["jsll", "window"], function(n, t) { if (t.performance && performance.mark && t.requestAnimationFrame) { var i = !1, r = function(r) { return function() { var s = 0, u, f = t.performance.getEntriesByName("frame", "mark"), h = [], l = [], e, o, c; if (f && f.length > 0) { for (e = 0; e < f.length; e++) (o = e === 0 ? Math.round(f[0].startTime) : Math.round(f[e].startTime - f[e - 1].startTime)), (o = o === 16 || o === 18 ? 17 : o), h.push(o.toString(36)); for (u = h[0], c = 0; c < h.length; c++) u === h[c] ? s++ : (l.push( s === 1 ? u : s === 2 ? u + ";" : u + ";" + s.toString(36) ), (s = 1), (u = h[c])); l.length > 0 && (t._pageTimings || (t._pageTimings = {}), (t._pageTimings.frameMarkerData = l), t._pageTimings.wasPageHidden || (t._pageTimings.wasPageHidden = !1), (t._pageTimings.didUserNavigateAway = r), (t._pageTimings.frameMarkerBeaconOffset = Math.round( t.performance.now() )), n.ct.captureContentUpdate({ timings: { frameMarkerData: t._pageTimings.frameMarkerData, wasPageHidden: t._pageTimings.wasPageHidden, didUserNavigateAway: t._pageTimings.didUserNavigateAway, frameMarkerBeaconOffset: t._pageTimings.frameMarkerBeaconOffset, }, }), (i = !0)); } }; }; setTimeout(r(!1), 3e4); t.addEventListener("unload", function() { i || r(!0)(); }); } }); require(["jsll", "window", "domReady!"], function(n, t) { function u() { n.ct.captureContentUpdate({ timings: t._pageTimings.checkPointMetrics, }); } var i, r; if ( t.performance && performance.measure && t.parent === t && (performance.timing.responseStart && performance.timing.domInteractive && (performance.measure("HtmlDuration", "responseStart", "domInteractive"), performance.getEntriesByName("HeadEnd").length != 0 && (performance.measure("HeadDuration", "responseStart", "HeadEnd"), performance.measure("BodyDuration", "HeadEnd", "domInteractive")), performance.getEntriesByName("FooterAreaEnd").length != 0 && performance.measure( "PostFooterDuration", "FooterAreaEnd", "domInteractive" )), t._pageTimings || (t._pageTimings = {}), t._pageTimings.checkPointMetrics || (t._pageTimings.checkPointMetrics = {}), (i = performance.getEntriesByType("measure")), i.length != 0) ) { for (r = 0; r < i.length; r++) t._pageTimings.checkPointMetrics[i[r].name] = Math.round(i[r].duration); t._pageTimings.isPaintTimingSupported && !t._pageTimings.hasFCPFired ? setTimeout(u, 5e3) : u(); } }); define("ttml-context", [ "require", "exports", "ttml-parser", "ttml-settings", "htmlExtensions", "stringExtensions", "utility", ], function(n, t, i, r, u, f, e) { "use strict"; Object.defineProperty(t, "__esModule", { value: !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.nodeListToArray(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.nodeListToArray(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, 0.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, 0.75)), (e = this.ttmlToCssFontSize(e, !1, 0.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; }); define("ttml-parser", [ "require", "exports", "ttml-context", "ttml-time-parser", "ttml-settings", "htmlExtensions", "stringExtensions", ], function(n, t, i, r, u, f, e) { "use strict"; Object.defineProperty(t, "__esModule", { value: !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, d = 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 ? ((d = 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.nodeListToArray( 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.nodeListToArray( 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.nodeListToArray(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.nodeListToArray(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; }); define("ttml-settings", ["require", "exports", "utility"], function(n, t, i) { "use strict"; Object.defineProperty(t, "__esModule", { value: !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; }); define("ttml-time-parser", ["require", "exports"], function(n, t) { "use strict"; Object.defineProperty(t, "__esModule", { value: !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; }); define("video-closed-captions", [ "require", "exports", "ttml-parser", "htmlExtensions", "utility", "player-utility", ], function(n, t, i, r, u, f) { "use strict"; Object.defineProperty(t, "__esModule", { value: !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\n Copyright (c) 2013 Microsoft Corporation. All rights reserved.\n \n \n