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wf,EAAO,GAAG,KAC3BP,EAAkBA,EAAgB1M,OAAO0M,EAAgBnT,QAAQ0T,EAAO,GAAG,IAAK,GACpF,IAGR,IACI7U,EAASuU,EAAeD,EAAgBzY,WAAY,MAAO,CAAC,EAChE,CACA,QACQ2Y,GACAA,GAER,CACJ,CACJ,IACD9Y,EACP,CiEOYoZ,CAAgB,CAAC,UAAW,SAAU,aAAc,gDAAiD,KACzG,MAGIhX,EAAoBD,EAAwB,CACxCqG,MAAOtG,EAAwBmX,WAC/B9U,QAAS,+DACTmE,MAAO,CACHqP,WAAYpU,EACZyQ,SAAU1D,IAI1B,CElHG,IAA8B8G,CFmHrC,C","sources":["webpack://@msnews/bing-homepage/webpack/bootstrap","webpack://@msnews/bing-homepage/webpack/runtime/define property getters","webpack://@msnews/bing-homepage/webpack/runtime/global","webpack://@msnews/bing-homepage/webpack/runtime/hasOwnProperty shorthand","webpack://@msnews/bing-homepage/../../libs/isomorphic-util/dist/DOMHelpersCore.js","webpack://@msnews/bing-homepage/../../libs/isomorphic-util/dist/IsomorphicStorage.js","webpack://@msnews/bing-homepage/../../libs/isomorphic-util/dist/requestData.js","webpack://@msnews/bing-homepage/../../libs/isomorphic-util/dist/SSRInteropContract.js","webpack://@msnews/bing-homepage/../../libs/isomorphic-util/dist/DOMHelpers.js","webpack://@msnews/bing-homepage/../../libs/experiences-constants/dist/AuthCookieNames.js","webpack://@msnews/bing-homepage/../../libs/core-helper/dist/GetCookieCore.js","webpack://@msnews/bing-homepage/../../libs/core-helper/dist/TryParseJson.js","webpack://@msnews/bing-homepage/../../libs/experiences-constants/dist/Flights.js","webpack://@msnews/bing-homepage/../../libs/inline-head-common/dist/InlineHeadCommon.js","webpack://@msnews/bing-homepage/../../libs/experimentation-helpers/dist/GetPeregrineFlights.js","webpack://@msnews/bing-homepage/../../libs/cookie-utils/dist/cookie-helpers/AudienceModeCookie.js","webpack://@msnews/bing-homepage/../../libs/fundamentals/dist/utilities/ChinaCompliance.js","webpack://@msnews/bing-homepage/../../libs/widget-initializer/dist/ErrorDispatcher.js","webpack://@msnews/bing-homepage/../../libs/experiences-constants/dist/Widgets.js","webpack://@msnews/bing-homepage/../../libs/widget-initializer/dist/Utilities.js","webpack://@msnews/bing-homepage/../../libs/widget-initializer/dist/ErrorLogging.js","webpack://@msnews/bing-homepage/../../libs/widget-initializer/dist/LoadingIcon.js","webpack://@msnews/bing-homepage/../../libs/widget-initializer/dist/GetOverrideParams.js","webpack://@msnews/bing-homepage/../../libs/widget-initializer/dist/AddMarkerToPageTimings.js","webpack://@msnews/bing-homepage/../../libs/core-helper/dist/ErrorHelper.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/isArray.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_freeGlobal.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_root.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_Symbol.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_getRawTag.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_objectToString.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_baseGetTag.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/isSymbol.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/isObjectLike.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_isKey.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/isObject.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_coreJsData.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_isMasked.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_toSource.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_baseIsNative.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/isFunction.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_getNative.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_getValue.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_nativeCreate.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_hashGet.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_hashHas.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_Hash.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_hashClear.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_hashDelete.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_hashSet.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_assocIndexOf.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/eq.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_listCacheDelete.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_ListCache.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_listCacheClear.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_listCacheGet.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_listCacheHas.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_listCacheSet.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_Map.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_getMapData.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_isKeyable.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_MapCache.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_mapCacheClear.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_mapCacheDelete.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_mapCacheGet.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_mapCacheHas.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_mapCacheSet.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/memoize.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_stringToPath.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_memoizeCapped.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_baseToString.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_arrayMap.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_castPath.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/toString.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_toKey.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/get.js","webpack://@msnews/bing-homepage/../../node_modules/lodash-es/_baseGet.js","webpack://@msnews/bing-homepage/../../libs/diagnostics/dist/logging/Util.js","webpack://@msnews/bing-homepage/../../libs/diagnostics/dist/logging/Logger.js","webpack://@msnews/bing-homepage/../../libs/diagnostics/dist/logging/LiteLogger.js","webpack://@msnews/bing-homepage/../../libs/fundamentals/dist/webstorage/WebStorage.js","webpack://@msnews/bing-homepage/../../libs/fundamentals/dist/webstorage/LocalStorage.js","webpack://@msnews/bing-homepage/../../libs/widget-initializer/dist/GetPcsResponse.js","webpack://@msnews/bing-homepage/../../libs/core-helper/dist/LodashLiteInline.js","webpack://@msnews/bing-homepage/../../libs/experimentation-helpers/dist/FlightHelpers.js","webpack://@msnews/bing-homepage/../../libs/widget-initializer/dist/WidgetInitializer.js","webpack://@msnews/bing-homepage/../../libs/widget-initializer/dist/GetDataWidgetAttributes.js","webpack://@msnews/bing-homepage/../../libs/widget-initializer/dist/SetOneTrustScript.js"],"sourcesContent":["// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// © Microsoft Corporation. All rights reserved.\n/**\n * Checks if the DOM is available to access and use.\n * If you want to distinguish between server side rendering and client side rendering, prefer use `__WEBPACK_IS_NODE__` because it's a constant value that can be optimized by webpack.\n * @returns {boolean} - true if DOM is available, or false if it is not. This is typically true for\n * client side rendering and false for server side rendering.\n */\nexport function canUseDOM() {\n return !!(typeof window !== \"undefined\" && window.document && window.document.createElement && !window.isRenderServiceEnv);\n}\n//# sourceMappingURL=DOMHelpersCore.js.map","// © Microsoft Corporation. All rights reserved.\nlet storage = new Map();\nfunction getItem(key, fallback) {\n let found = storage.get(key);\n if (found === void 0 && fallback) {\n found = fallback();\n storage.set(key, found);\n }\n return found;\n}\n/**\n * Create a StorageBackend instance that wraps a getter function for the actual backend.\n */\nexport function createStoreWrapper(getBackend) {\n return {\n get: (key) => getBackend().get(key),\n set: (key, value) => getBackend().set(key, value),\n delete: (key) => getBackend().delete(key),\n clear: () => getBackend().clear(),\n has: (key) => getBackend().has(key)\n };\n}\nexport const IsomorphicStorage = Object.freeze({\n /**\n * Stores a value in storage.\n * @param key - The key to store the value under.\n * @param value - The value to store.\n * @returns This RequestStorage instance.\n */\n set(key, value) {\n storage.set(key, value);\n return this;\n },\n /**\n * Gets a value from storage.\n * @param key - The key to get the value for.\n * @param fallback - A function that provides a value if there is nothing stored under the key.\n * @returns The value stored under the key.\n * @remarks\n * The return result of the fallback function will be stored under the key for later access.\n */\n get: getItem,\n /**\n * Clears all values.\n */\n clear() {\n storage.clear();\n },\n /**\n *\n * @param key - The key to delete.\n * @returns true if the value was deleted; false otherwise.\n */\n delete(key) {\n return storage.delete(key);\n },\n /**\n * Determines whether there's a value for the given key.\n * @param key - The key to check.\n * @returns true if the key exists; false otherwise\n */\n has(key) {\n return storage.has(key);\n }\n});\nexport function setStorageBackend(backend) {\n storage = backend;\n}\n/**\n * Create an IsomorphicStorage-based value reference\n * @param value - The initial value\n * @returns { current: T } the object contains getter & setter to current value\n */\nexport function useIsomorphicStorageRef(value) {\n const key = Symbol();\n return {\n get current() {\n return IsomorphicStorage.get(key, () => value);\n },\n set current(nextValue) {\n IsomorphicStorage.set(key, nextValue);\n }\n };\n}\n//# sourceMappingURL=IsomorphicStorage.js.map","// © Microsoft Corporation. All rights reserved.\nimport { IsomorphicStorage } from \"./IsomorphicStorage\";\nimport { osatCookieExistsCookieName, osatCookieName } from \"./SSRInteropContract\";\nconst isomorphicStorageKey = \"__RequestDataInstance__\";\n/**\n * Singleton class to store client browser data sent through query param to Render Service.\n * This is only used under server environment.\n */\nclass RequestData {\n /**\n * Initialize the request data instance with passed in client properties\n */\n constructor(data, isPssrMode) {\n this.url = new URL(data.href);\n this.innerHeight = data.innerHeight;\n this.devicePixelRatio = data.devicePixelRatio;\n this.canUseCssGrid = data.canUseCssGrid;\n this.requestId = data.requestId;\n this.cookie = data.cookie;\n this.referer = data.referer;\n this.userAgent = data.userAgent;\n this.clientData = data.clientData;\n this.oneServiceHeaders = tryParseJson(data.oneServiceHeaders) || {};\n this.isPssrMode = isPssrMode;\n if (isPssrMode) {\n const osatCookieExists = getCookie(osatCookieExistsCookieName, this.cookie);\n const isOsateCookieValid = !!osatCookieExists && osatCookieExists === \"1\";\n const osatCookie = getCookie(osatCookieName, this.cookie);\n // When user is in interactive login scenario, OSATE is present but not valid,\n // so both conditions will fail and we will skip pure SSR\n // When OSAT is present and OSATE is valid (i.e. set to \"1\"), user has already signed in successfully\n // When both OSAT and OSATE are missing, user is not signed in (fallback to MUID for 1S calls)\n if ((isOsateCookieValid && osatCookie) || (!osatCookieExists && !osatCookie)) {\n this.msalAuthReady = true;\n if (osatCookie) {\n // When user has signed in, set JWT token in 1S request header for authentication\n this.oneServiceHeaders[\"Authorization\"] = `Bearer ${osatCookie}`;\n }\n return;\n }\n this.msalAuthReady = false;\n if (osatCookieExists && !isOsateCookieValid) {\n this.pssrRejectedReason = \"interactiveLogin\";\n }\n else if (osatCookieExists && !osatCookie) {\n this.pssrRejectedReason = \"missOSAT\";\n }\n else {\n this.pssrRejectedReason = \"missOSATE\";\n }\n }\n }\n /**\n * Returns singleton class instance.\n * @returns RequestData\n */\n static getInstance() {\n const instance = IsomorphicStorage.get(isomorphicStorageKey);\n if (instance) {\n return instance;\n }\n if (global[\"TEST_ENV\"]) {\n return resetRequestData({\n href: \"http://localhost:8080/\",\n innerHeight: 768,\n devicePixelRatio: 1,\n canUseCssGrid: false,\n requestId: \"0\",\n cookie: \"\",\n userAgent: \"\",\n referer: \"\",\n oneServiceHeaders: \"\"\n });\n }\n // Throw error if the request data has not been set as this should never be the case.\n // This likely highlights that the request data was not initialized when handling a\n // request when server side rendering.\n // TODO - http://osgvsowi/24832691 renable throwing an error.\n // This is currently disabled as other singletons that are initialized at import time use\n // this they will throw an error before anyone has the chance to initialize the request data\n return resetRequestData({\n href: \"http://localhost:8080/\",\n innerHeight: 0,\n devicePixelRatio: 0,\n canUseCssGrid: false,\n requestId: \"0\",\n cookie: \"\",\n userAgent: \"\",\n referer: \"\",\n oneServiceHeaders: \"\"\n });\n }\n /**\n * Reset singleton class instance with passed in info and client settings\n * @returns RequestData\n */\n static resetInstance(data, isPssr = false) {\n const newInstance = new RequestData(data, isPssr);\n IsomorphicStorage.set(isomorphicStorageKey, newInstance);\n return newInstance;\n }\n}\n/**\n * Helper to get cookie content from cookie string\n *\n * @param name cookie name\n * @param cookieString cookie string with which to search for the content by `name`\n * @returns\n */\nfunction getCookie(name, cookieString) {\n if (cookieString && name) {\n const re = new RegExp(\"\\\\b\" + name + \"\\\\s*=\\\\s*([^;]*)\", \"i\");\n const match = re.exec(cookieString);\n return (match && match.length > 1 ? match[1] : null);\n }\n return null;\n}\n/**\n * Helper to safely parse JSON\n * @param json The JSON string to parse\n * @returns The parsed JSON object, or undefined if invalid.\n */\nfunction tryParseJson(json) {\n try {\n if (json) {\n return JSON.parse(json);\n }\n }\n catch (ex) {\n // tslint:disable-next-line:no-empty\n }\n}\n/**\n * Export function to reset the request data singleton.\n * This must be used to set the request data.\n */\nexport const resetRequestData = RequestData.resetInstance;\n/**\n * Export get instance function for testing\n */\nexport const getRequestData = () => (RequestData.getInstance());\n//# sourceMappingURL=requestData.js.map","// © Microsoft Corporation. All rights reserved.\nimport { breakpoints } from \"./SSRInteropContractHelpers\";\n/**\n * The param-name prefix used when serializing params onto the query string.\n */\nexport const SSRRequestDataPrefix = \"rd\";\n/**\n * `OSATE` (OneService access token exists) is a client readable companions cookie dropped together with the\n * `OSAT`(OneService Access Token) cookie to indicate the existence of the `OSAT` cookie.\n * `OSATE` cookie is usually set to expire 6 months from creation, while `OSAT` expires at token expiry (~1-24h)\n *\n * Thus if `OSATE` cookie exists without the accompanying `OSAT` cookie to conclude that\n * a session exists, but the token has expired, which must be re-acquired/re-validated via client-side JS.\n *\n * The `OSATE` can also be deleted manually during various interactive login/logout scenarios to semantically\n * indicate that the `OSAT` token must be re-established/re-validated on client-side JS.\n *\n * 1) Thus if only one of `OSAT` or `OSATE` exists, that indicates PSSR code cannot render the page and thus must\n * fallback to client-side rendering.\n * 2) If both are missing that means the user has logged out, or never established\n * an auth session, which should enable PSSR.\n * 3) If both exists that means the token inside `OSAT` is valid and can be used in PSSR.\n */\nexport const osatCookieExistsCookieName = \"OSATE\";\n/**\n * OneService Access Token cookie used to autheticate 1S calls under PSSR mode.\n * Expires at the time of token expiry (~1-24hr based on MSO tenant auth configuration)\n * Please see detailed notes under `osatCookieExistsCookieName`\n */\nexport const osatCookieName = \"OSAT\";\n/**\n * Defines the \"interop\" contract between client and server-side renderer.\n * All of these values will be serialized into request parameters to be passed\n * on the HTTP request to the SSR server.\n */\nexport const SSRContract = {\n ver: \"0.1.0\",\n spec: {\n // IWindow\n innerWidth: {\n clientValue: () => window.innerWidth\n },\n innerHeight: {\n clientValue: () => window.innerHeight\n },\n outerWidth: {\n clientValue: () => window.outerWidth\n },\n breakpoint: {\n clientValue: () => identifyBreakpoint(window.innerWidth, breakpoints)\n },\n locationHash: {\n clientValue: () => window.location.hash\n },\n locationHref: {\n clientValue: () => window.location.href\n },\n locationHost: {\n clientValue: () => window.location.host\n },\n locationHostName: {\n clientValue: () => window.location.hostname\n },\n locationOrigin: {\n clientValue: () => window.location.origin\n },\n locationPathName: {\n clientValue: () => window.location.pathname\n },\n locationProtocol: {\n clientValue: () => window.location.protocol\n },\n locationSearch: {\n clientValue: () => window.location.search\n },\n screenTop: {\n clientValue: () => window.screenTop\n },\n screenY: {\n clientValue: () => window.screenY\n },\n // IBrowser\n canUseCssGrid: {\n clientValue: () => ((window.CSS && window.CSS.supports && CSS.supports(\"display\", \"grid\")) || false)\n },\n // IDevice\n devicePixelRatio: {\n clientValue: () => window.devicePixelRatio\n },\n // ILocale\n language: {\n clientValue: () => document.documentElement.lang\n },\n direction: {\n clientValue: () => document.documentElement.dir\n }\n }\n};\n/**\n * Identifies current breakpoint based on window width. Same implementation as \"\"@microsoft/fast-layouts-react\"\"\n * The package has been deprecated and prevented dependency projects to use react version later than 16. So removing these dependencies.\n */\nfunction identifyBreakpoint(windowWidth, breakpoints) {\n for (let breakpoint = breakpoints.length - 1; breakpoint >= 0; breakpoint--) {\n if (windowWidth >= breakpoints[breakpoint]) {\n return breakpoint;\n }\n }\n}\n//# sourceMappingURL=SSRInteropContract.js.map","// © Microsoft Corporation. All rights reserved.\nimport { canUseDOM } from \"./DOMHelpersCore\";\nimport { getRequestData } from \"./requestData\";\n/**\n * Get window.navigator.userAgent in an isomorphic manner.\n */\nexport function getUserAgent() {\n return canUseDOM() ? window.navigator.userAgent : getRequestData().userAgent;\n}\n/**\n * Get window.location.href in an isomorphic manner.\n */\nexport function getLocationHref() {\n return canUseDOM() ? window.location.href : getRequestData().url.href;\n}\n/**\n * Get window.location.hostname in an isomorphic manner.\n */\nexport function getLocationHostname() {\n return canUseDOM() ? window.location.hostname : getRequestData().url.hostname;\n}\n/**\n * Get window.location.host in an isomorphic manner.\n */\nexport function getLocationHost() {\n return canUseDOM() ? window.location.host : getRequestData().url.host;\n}\n/**\n * Get window.location.origin in an isomorphic manner.\n */\nexport function getLocationOrigin() {\n return canUseDOM() ? window.location.origin : getRequestData().url.origin;\n}\n/**\n * Get window.location.search in an isomorphic manner.\n */\nexport function getLocationSearch() {\n return canUseDOM() ? window.location.search : getRequestData().url.search;\n}\n/**\n * Get window.location.pathname in an isomorphic manner.\n */\nexport function getLocationPathname() {\n return canUseDOM() ? window.location.pathname : getRequestData().url.pathname;\n}\n/**\n * Get window.location.protocol in an isomorphic manner.\n */\nexport function getLocationProtocol() {\n return canUseDOM() ? window.location.protocol : getRequestData().url.protocol;\n}\n/**\n * Get window.location.hash in an isomorphic manner.\n */\nexport function getLocationHash() {\n return canUseDOM() ? window.location.hash : getRequestData().url.hash;\n}\n/**\n * Get the current URL in an isomorphic manner.\n */\nexport function getCurrentUrl() {\n return getLocationOrigin() + getLocationPathname();\n}\n/**\n * Get document.cookie in an isomorphic manner.\n */\nexport function getCookieString() {\n return canUseDOM() ? window.document.cookie : getRequestData().cookie;\n}\n/**\n * Get window.document.getElementById(elementId).\n */\nexport function getDocumentElementById(elementId) {\n if (!canUseDOM()) {\n throw new Error(\"getDocumentElementById is unsupported server side. This call should be wrapped in canUseDOM().\");\n }\n return window.document.getElementById(elementId);\n}\n/**\n * Get window.document.getDocumentElementsByTagName(tagName).\n */\nexport function getDocumentElementsByTagName(tagName) {\n if (!canUseDOM()) {\n throw new Error(\"getDocumentElementsByTagName is unsupported server side. This call should be wrapped in canUseDOM().\");\n }\n return window.document.getElementsByTagName(tagName);\n}\n/**\n * Get window.document.getDocumentElementsByClassName(className).\n */\nexport function getDocumentElementsByClassName(className) {\n if (!canUseDOM()) {\n throw new Error(\"getDocumentElementsByClassName is unsupported server side. This call should be wrapped in canUseDOM().\");\n }\n return window.document.getElementsByClassName(className);\n}\n/**\n * Get indexedDB in an isomorphic manner.\n * Todo (http://osgvsowi/23753462), provide actual functionality for indexedDB on the server side.\n */\nexport function getIndexedDB() {\n return canUseDOM() ? window.indexedDB : null;\n}\n/**\n * Get window.innerHeight in an isomorphic manner.\n * Todo (http://osgvsowi/23876778), remove the need for server to know about innerWidth by limiting layout options or use CSS based solution.\n */\nexport function getInnerHeight() {\n return canUseDOM() ? window.innerHeight : getRequestData().innerHeight;\n}\n/**\n * Get window.devicePixelRatio in an isomorphic manner.\n */\nexport function getDevicePixelRatio() {\n return canUseDOM() ? window.devicePixelRatio : getRequestData().devicePixelRatio;\n}\n/**\n * Get CSS Grid support in an isomorphic manner\n */\nexport function getCssGridSupport() {\n return !!(canUseDOM() ? (window.CSS && window.CSS.supports && CSS.supports(\"display\", \"grid\")) : getRequestData().canUseCssGrid);\n}\n/**\n * Get variable font support in an isomorphic manner\n * TODO: SSR currently does not support custom fonts.\n */\nexport function getVariableFontSupport() {\n if (!canUseDOM()) {\n throw new Error(\"SSR currently does not support custom fonts.\");\n }\n return !!(window.CSS && window.CSS.supports && CSS.supports(\"(font-variation-settings: normal)\"));\n}\n/**\n * Returns a script element using several default values.\n * Not supported server side.\n * @param src The absolute URL for the script src. Default is undefined, blank is okay.\n * @param id The id to assign the script element. default is \"\" so no id.\n * @param loadAsync Should the script load asynchronously. Default is true.\n * @param crossOrigin Set the script crossorigin attribute. Default is anonymous.\n * @param className The optional className to assign the script element.\n * @returns {HTMLScriptElement} the script element. not using const so it can be overridden by caller.\n */\nexport function createScriptTag(src = undefined, id = undefined, loadAsync = true, crossOrigin = \"anonymous\", className, onload) {\n if (!canUseDOM()) {\n throw new Error(\"createScriptTag is unsupported server side. This call should be wrapped in canUseDOM().\");\n }\n const scriptElement = document.createElement(\"script\");\n if (id) {\n scriptElement.id = id;\n }\n if (className) {\n scriptElement.setAttribute(\"class\", className);\n }\n if (onload) {\n scriptElement.onload = onload;\n }\n scriptElement.type = \"text/javascript\";\n if (src) {\n if (window && window.trustedTypesURLValidation) {\n scriptElement.src = window.trustedTypesURLValidation(src, \"scriptSrcUrlPolicy\");\n }\n else {\n scriptElement.src = src;\n }\n scriptElement.async = loadAsync;\n scriptElement.crossOrigin = crossOrigin;\n }\n // @ts-ignore\n if (window && window.NONCE_ID) {\n // @ts-ignore\n scriptElement.nonce = window.NONCE_ID;\n }\n return scriptElement;\n}\n//# sourceMappingURL=DOMHelpers.js.map","// © Microsoft Corporation. All rights reserved.\n/**\n * Enum for different auth cookie names\n * @enum\n */\nexport var AuthCookieName;\n(function (AuthCookieName) {\n AuthCookieName[\"Anon\"] = \"ANON\";\n AuthCookieName[\"AppAnon\"] = \"APP_ANON\";\n AuthCookieName[\"Unknown\"] = \"\";\n})(AuthCookieName || (AuthCookieName = {}));\n/**\n * List of http-readable cookies that indicate the presence of an auth cookie\n * IMPORTANT NOTE: If this is updated, please update the list in WebWorkerInitializer.ts as well\n */\nexport var AuthCookieExistsCookieName;\n(function (AuthCookieExistsCookieName) {\n AuthCookieExistsCookieName[\"AnonCookieExists\"] = \"ace\";\n AuthCookieExistsCookieName[\"AppAnonCookieExists\"] = \"aace\";\n})(AuthCookieExistsCookieName || (AuthCookieExistsCookieName = {}));\n/**\n * Original source is Constants.ts\n * Child cookie name, used to signal if rpsUser is child account.\n */\nexport const childCookieName = \"child\";\n//# sourceMappingURL=AuthCookieNames.js.map","// © Microsoft Corporation. All rights reserved.\n/**\n * Returns the cookie content given a name\n * @param cookieString {string} - cookie string (usually comes via `document.cookie` for client-side JS)\n * @param name {string} - cookie name\n * @returns the value of the cookie or `null`, if the key is not found.\n */\nexport function getCookieCore(cookieString, name) {\n if (cookieString) {\n const re = new RegExp(\"\\\\b\" + name + \"\\\\s*=\\\\s*([^;]*)\", \"i\");\n const match = re.exec(cookieString);\n return (match && match.length > 1 ? match[1] : null);\n }\n return null;\n}\n//# sourceMappingURL=GetCookieCore.js.map","// © Microsoft Corporation. All rights reserved.\n/**\n * Helper to parse a JSON string to the corresponding object/value, optionally casting\n * it to the preferred type.\n * @param jsonString - The json string to parse\n * @returns The parse object value or null if the string is not valid or failed to parse.\n */\nexport function tryParseJson(jsonString) {\n try {\n if (jsonString) {\n return JSON.parse(jsonString);\n }\n // eslint-disable-next-line no-empty\n }\n catch (ex) { }\n return null;\n}\n//# sourceMappingURL=TryParseJson.js.map","// © Microsoft Corporation. All rights reserved.\n/**\n * Config Service v3 endpoint\n */\nexport const CrsV3Endpoint = \"v3\";\n/**\n * Config Service v3.1 endpoint\n * Will be used for experimentation only.\n */\nexport const CrsV31Endpoint = \"v3.1\";\n/**\n * Config Service Path\n */\nexport const CrsPath = \"/resolver/api/resolve/\";\n/**\n * Prong2 flight prefix\n */\nexport const Prong2FlightPrefix = \"prg-pr2-\";\n/**\n * Peregrine widget specific flights prefix\n */\nexport const widgetFlightsPrefix = \"prg-pw-\";\n/**\n * Peregrine flights with prefix\n */\nexport const PeregrineFlightPrefix = \"prg-\";\n/**\n * Git configs indexedDB caching flight\n */\nexport const GitConfigsIndexedDbTreatment = \"prg-gitconfigs-t\";\n/**\n * Remove page experiments from target scope flight\n */\nexport const RemoveCrsFDHeadTreatment = \"prg-crsfdheadrem\";\n/**\n * Treatment flight for using Akamai-CRS for Prong 1.\n */\nexport const Prong1AkamaiCRSCallTreatmentId = \"prg-1sw-akp1crs\";\n/**\n * Prong 1 flights with prefix\n */\nexport const Prong1FlightsPrefix = \"prg-1sw-\";\n/**\n * Treatment flight for using Akamai endpoint to retrieve CRS configs.\n */\nexport const AkamaiCRSCallTreatmentId = \"prg-callcrsfrakm\";\n/** Treatment flight for disabling welcome greeting & weather one liner in Anaheim */\nexport const AnaheimDisableWeatherInHeadFlight = \"prg-ntp-noweahd\";\n/**\n * Treatment flight for using Akamai-CRS for cn domains in ntp.\n */\nexport const NtpChinaChinaCRSCallTreatmentId = \"prg-akntpcrscncl\";\n/**\n * Akamai base url to call crs used for when treatment flight is detected.\n * Will be used in the ntp flight.\n */\n// eslint-disable-next-line msnews-experiences-rules/no-hardcode-asset-path\nexport const AkamaiBaseUrl = \"https://assets.msn.com\";\n/**\n * Akamai base url to call crs used for when treatment flight is detected.\n * Will be used in the China flight.\n */\nexport const ChinaAkamaiBaseUrl = \"https://assets.msn.cn\";\n/**\n * Treatment flight for using long PCS cache duration for Prong 2.\n */\nexport const Prong2PcsDurationTreatmentId = \"prg-pr2-pcsdur\";\n/**\n * Treatment flight for using manual PCS cache treatment for Prong 2.\n */\nexport const Prong2ManualPcsCacheTreatmentId = \"prg-pr2-manupcs\";\n/**\n * Treatment flight for using Akamai host for Prong2 PCS API\n */\nexport const Prong2PcsApiUseAkamaiEndpoint = \"prg-pr2-akmpcs\";\n/**\n * Treatment flight id for removing the x-ms-flightId header from ads call.\n */\nexport const RemoveFlightIdHeaderTreatment = \"remflighthead\";\n/**\n * Treatment flight id for passing page type to ads calls (native, display, video)\n */\nexport const PassAllAdTypesPageTypeTreatment = \"prg-ad-pgtype\";\n/**\n * Treatment flight id for passing MSFT member id 280 to Xandr ads calls (display, video)\n */\nexport const PassXandrMSFTMemberIdTreatment = \"prg-ad-mbid\";\n/**\n * Treatment flight id for switching UT endpoint to msn domain for AST SDK in display ad\n */\nexport const DisplayAdUseMSNDomainEndpointTreatment = \"prg-ad-astmsn\";\n/**\n * Holdout treatment flight id for switching AST to microsoft domain for display ad\n */\nexport const DisplayAdUseMicrosoftDomainASTSdkHoldoutTreatment = \"prg-ad-astmsft-rf\";\n/**\n * Treatment flight id for sending assigned flights (id and numberline) in display ad request\n */\nexport const DisplayAdPassFlightsTreatment = \"prg-ad-dispflts-t\";\n/**\n * Treatment flight id for sending AST more debug informaton on performance\n */\nexport const EnableDisplayCustomEventTreatment = \"prg-ad-astce\";\n//# sourceMappingURL=Flights.js.map","// © Microsoft Corporation. All rights reserved.\nimport { canUseDOM, getLocationHostname, getLocationSearch } from \"@msnews/isomorphic-util\";\nimport { getAudienceModeFromCookies } from \"@msnews/cookie-utils\";\nimport { getFlightsFilterPrefix, getPeregrineFlights } from \"@msnews/experimentation-helpers\";\nimport { isChinaCompliance } from \"@msnews/fundamentals\";\nimport { tryParseJson } from \"@msnews/core-helper\";\n/**\n * Initialize the inline-head-common module logic.\n * This currently includes the following:\n * - Fetching the CRS call early\n * @param options - Options for the inlineHead initialization call\n */\nexport function init(initOptions = {}) {\n const result = {};\n try {\n if (!canUseDOM()) {\n return result;\n }\n const clientSettings = parseClientSettings();\n let crsAppType = clientSettings.apptype?.toLocaleLowerCase();\n const crsOptions = initOptions.crsOptions || {};\n // Only turn on early CRS call for Prong 2 and MSN HP. Due to shared init logic for app types\n // Until universal shipping - All other app types will have to opt-in to early CRS call via flights or update similarly\n if (crsAppType === \"winwidgets\" || crsAppType === \"homepage\" || crsAppType === \"travel\") {\n crsOptions.crsPrefetch = true;\n }\n // Turn on early CRS call if it's set by the host page for widgets.\n if (clientSettings.widgetAttributes?.clientPerf?.earlyCRSCall) {\n crsOptions.crsPrefetch = true;\n }\n // flight name for edgeChromium exceeds the 20 characters limit\n if (crsAppType === \"edgechromium\") {\n crsAppType = \"edgechr\";\n }\n // shouldUsePWOnlyFlights is typically set by the host page in the widgets page.\n // Widget initializer adds WidgetAttributes exist in the host into client settings for appEnvironment to consume.\n const shouldUsePWOnlyFlights = !!clientSettings.widgetAttributes?.clientPerf?.shouldUsePWOnlyFlights;\n const { all, prg } = parseFlights(shouldUsePWOnlyFlights, crsAppType);\n // Early CRS call is currently enabled based on the flight\n // and the feature switch enablement by each canvas\n const earlyCRSCall = crsOptions.crsPrefetch || (all.includes(\"inlinecrscall\") || all.includes(`icrscall-${crsAppType}`));\n if (earlyCRSCall) {\n fetchCRS(clientSettings, prg, crsOptions);\n result.inlineCRS = true;\n }\n }\n catch (ex) {\n // eslint-disable-next-line no-console\n console.error(\"InlineHeadCommon: \" + ex);\n }\n return result;\n}\n/**\n * Prepares the request object for the CRS call and fetch the response.\n * The method will attempt to fetch from assets.msn.com first, and then fallback\n * to www.msn.com if the first attempt fails. The resulting promise will be cached\n * in the global scope for the ConfigService to consume later when requested by the page.\n * @param clientSettings - Parsed version of the client settings value from the document\n * @param prgExperiments - The list of `prg-` prefixed experiments to be passed to the CRS call\n * @param crsOptions - Options to modify the fetch sequence\n */\nfunction fetchCRS(clientSettings, prgExperiments, crsOptions) {\n const audienceMode = getAudienceModeFromCookies(document.cookie, clientSettings);\n const { apptype, browser, domain: pcsDomain, bundleInfo: { v: bundleVersion } = {}, deviceFormFactor, locale: { content, display } = {}, ocid, os, pagetype: pageType, servicesEndpoints: { crs } = {} } = clientSettings;\n // for widget scenarios we don't want to use the PCS provided domain\n // as the host page domain can be completely different than the PCS call,\n // so we use the current host in that case\n const domain = (tryGetWidgetElement() ? getLocationHostname() : pcsDomain) || \"\";\n if (!apptype || !bundleVersion || !crs) {\n return;\n }\n const currentRequestTargetScope = {\n audienceMode,\n browser,\n deviceFormFactor,\n domain,\n locale: { content, display },\n ocid,\n os,\n platform: \"web\",\n pageType,\n pageExperiments: prgExperiments\n };\n const params = new URLSearchParams([\n [\"expType\", \"AppConfig\"],\n [\"expInstance\", \"default\"],\n [\"apptype\", apptype],\n [\"v\", bundleVersion]\n // Note we don't add the target scope object here as the URLSearchParams adds a lot of\n // escape characters that bloats the payload. Instead we add it as raw JSON string below\n ]);\n // If url has dev only query string params, send this dev/test traffic to int1 environment instead of prod.\n const locationSearch = getLocationSearch();\n const devQueryParam = locationSearch.includes(\"?item=\") || locationSearch.includes(\"&item=\")\n ? \"&citem=dev:true&instance=Int1\"\n : \"\";\n const crsPathAndQuery = `${crs.path}${crs.v}/config/?${params}&targetScope=${JSON.stringify(currentRequestTargetScope)}${devQueryParam}`;\n const fetchHelper = (domain) => {\n const url = new URL(`https://${domain}${crsPathAndQuery}`);\n const { timeout = 5000 } = crsOptions;\n // this is checked in the early CRS promise in ConfigService.ts\n window.crsRequestData = { url: url.toString() };\n let abortSignal;\n if (timeout >= 0) {\n const ctrl = new AbortController();\n setTimeout(() => ctrl.abort(), timeout);\n abortSignal = ctrl.signal;\n }\n return fetch(url, {\n signal: abortSignal\n });\n };\n const compliantSuperMsnDomain = `msn.${isChinaCompliance(location, clientSettings) ? \"cn\" : \"com\"}`;\n // this value is often empty, but if it's not, we should use it as the domain\n const { domain: serverSpecifiedCrsOrigin } = crs;\n const serverSpecifiedCrsDomain = serverSpecifiedCrsOrigin && new URL(serverSpecifiedCrsOrigin).host;\n // enable existing path in ConfigService.ts to fetch result from global promise variable\n let crsPromise = fetchHelper(serverSpecifiedCrsDomain || `assets.${compliantSuperMsnDomain}`);\n if (!crsOptions.disableFallback) {\n crsPromise = crsPromise.catch(() => {\n // only *.msn.com should fallback to the host page domain, otherwise for things like bing.com, it should\n // fallback to www.msn.com\n const { hostname } = location;\n const fallbackDomain = hostname.match(/\\.msn\\.(com|cn)$/)\n ? hostname\n : `www.${compliantSuperMsnDomain}`;\n return fetchHelper(fallbackDomain);\n });\n }\n window.crsPromise = crsPromise;\n}\n/**\n * Parses the flights list from the document -- supports both normal and widget modes.\n * @param shouldUsePWOnlyFlights - Flag to keep only prg-pw- flights\n * @param appType - App type\n * @returns\n */\nexport function parseFlights(shouldUsePWOnlyFlights = false, appType = \"\") {\n const allFlights = tryGetFlights(getPageDatasetValue(\"info\")) || [];\n // When data-canvas-info is present, we use instead of getting prg- flights from all flights.\n let prgFlights = tryGetFlights(getPageDatasetValue(\"canvasInfo\"));\n if (!prgFlights) {\n const prgFilterPrefix = getFlightsFilterPrefix(allFlights, shouldUsePWOnlyFlights, appType);\n prgFlights = getPeregrineFlights(allFlights, prgFilterPrefix);\n }\n return {\n all: allFlights,\n prg: prgFlights\n };\n}\n/**\n * Parses the client settings value from the document -- supports both normal and widget modes.\n * @returns The core client settings object\n */\nfunction parseClientSettings() {\n return tryParseJson(getPageDatasetValue(\"clientSettings\")) || {};\n}\n/**\n * Helper to get one of the well-known dataset values from the document.\n * @param key - The key to get from the dataset\n * @returns The value of the dataset key, or undefined if not found\n */\nfunction getPageDatasetValue(key) {\n // Note that we look at the head dataset first because that's the majority of the cases.\n // We only query for the widget scenario if the head dataset doesn't have the value.\n return document.head.dataset[key]\n || tryGetWidgetElement()?.dataset[key];\n}\n/**\n * Cached widget element value from a previous query -- since we query for both\n * `clientSettings` and `info` values, caching this will save on another DOM query\n */\nlet widgetElement;\n/**\n * Queries the document for the widget element and caches the result.\n * @returns The widget element, or null if not found\n */\nfunction tryGetWidgetElement() {\n if (widgetElement === undefined) {\n widgetElement = document.getElementsByClassName(\"peregrine-widget-settings\")[0] || null;\n }\n return widgetElement;\n}\n/** Helper to reset internal state for UTs */\nexport function _resetInlineHeadCommon() {\n widgetElement = undefined;\n}\n/**\n * Parse head dataset and get the flights in lower case and sorted order.\n * @param key info or canvasInfo\n * @returns Array of flights present in the dataset\n */\nfunction tryGetFlights(flightString) {\n if (!flightString || !flightString.startsWith(\"f:\")) {\n // Return undefined if the dataset is not present or empty.\n // Example: data-canvas-info or data-canvas-info: \"\" or data-canvas-info: \"string without f:\"\n return;\n }\n const reduced = ((flightString.match(/f:\\s*([^;]+)/i)) || [])[1];\n if (!reduced) {\n // Return empty array if the flight string is empty.\n // Example: data-canvas-info: \"f:;\"\n // This is a valid case where the flight string is empty.\n return [];\n }\n // Example: data-canvas-info: \"f:flight1,flight2,flight3;\"\n // Returns [\"flight1\", \"flight2\", \"flight3\"]\n return reduced.toLowerCase().split(\",\")?.sort();\n}\n//# sourceMappingURL=InlineHeadCommon.js.map","// © Microsoft Corporation. All rights reserved.\nimport { PeregrineFlightPrefix, Prong1FlightsPrefix, Prong2FlightPrefix, widgetFlightsPrefix } from \"@msnews/experiences-constants\";\n/**\n * Goes through the array of flights that is given and will filter out any flight that doesn't start with prg-pw.\n * @param flights Array\n * @returns specific flights\n */\nexport function getPeregrineWidgetFlights(flights) {\n return getPeregrineFlights(flights, widgetFlightsPrefix);\n}\n/**\n * Goes through the array of flights that is given and will filter out any flight that doesn't start with\n * prg-. It then sorts them and returns a new string[].\n * @param flights Array of flights that we will filter through and return only the peregrine\n * @param flightPrefix Prefix of the flight ids used for the filter\n * @returns specific flights\n */\nexport function getPeregrineFlights(flights, flightPrefix = PeregrineFlightPrefix) {\n const prefixLen = flightPrefix.length;\n const prgPrefixFlights = [];\n if (flights && flights.length) {\n flights.forEach(item => {\n const cleanItem = item && item.trim();\n if (cleanItem\n && cleanItem.length >= prefixLen\n // much faster to do a substring for the first few characters\n // than to do a lowercase on the whole flight string (also faster than case-insensitive regex)\n && cleanItem.substring(0, prefixLen).toLowerCase() === flightPrefix) {\n prgPrefixFlights.push(cleanItem.toLowerCase());\n }\n });\n prgPrefixFlights.sort();\n }\n return prgPrefixFlights;\n}\n/**\n * Goes through the array of flights that is given and will retrun the correct prefix to filter out any\n * unwanted flights. By default this will return the prefix to only keep flights with prefix 'prg-'\n * @param flights Array of flights that we will filter through\n * @param shouldUseWPOnlyFlights Flag to keep only prg-pw- flights\n * @param appType App type\n * @returns prefix for flights to keep\n */\nexport function getFlightsFilterPrefix(flights, shouldUseWPOnlyFlights = false, appType = \"\") {\n let filterPrefix = PeregrineFlightPrefix;\n if (shouldUseWPOnlyFlights) {\n filterPrefix = widgetFlightsPrefix;\n }\n else if (appType.toLocaleLowerCase() === \"windowsShell\" /* AppType.WindowsShell */.toLocaleLowerCase() ||\n appType.toLocaleLowerCase() === \"windowsShellV2\" /* AppType.WindowsShellV2 */.toLocaleLowerCase()) {\n filterPrefix = Prong1FlightsPrefix;\n }\n else if (appType.toLocaleLowerCase() === \"winWidgets\" /* AppType.WindowsNewsWidgets */.toLocaleLowerCase()\n && !isVpTest()) {\n filterPrefix = Prong2FlightPrefix;\n }\n return filterPrefix;\n}\n/**\n * Checks if the current page is a VP test page\n * We will not import extra libraries due to circle dependencies\n * @returns boolean\n */\nfunction isVpTest() {\n return window?.location?.search?.includes(\"reqsrc=vp\") || !!window?.location?.search?.includes(\"vptest\");\n}\n//# sourceMappingURL=GetPeregrineFlights.js.map","// © Microsoft Corporation. All rights reserved.\nimport { childCookieName } from \"@msnews/experiences-constants\";\nimport { getCookieCore, tryParseJson } from \"@msnews/core-helper\";\n/**\n * Common helper function to get the audience mode from the cookie string.\n * @param cookieString - The cookie string to parse for the aace/child mode value.\n * @param clientSettings - The client settings from PCS\n * @returns The audience mode calculated from the cookies.\n */\nexport function getAudienceModeFromCookies(cookieString, clientSettings) {\n // Set Kids audience mode based on conditions below, otherwise use PCS provided Audience mode.\n let audienceMode;\n // There are two auth endpoints in production, at the time of this comment. One is a Prime based auth-endpoint (that is still being used by few Peregrine canvases)\n // and the second is a dedicated Peregrine endpoint hosted by OneService. In both endpoints, AACE cookie is dropped independent of the child cookie.\n // In Prime based auth endpoint, if the account is identified as Child account, a Child cookie is being dropped. In practice, we see that the value of that cookie is 0,\n // but the cookie is only dropped for Child accounts, so it's enough to check for just the presence of that cookie.\n // In OneService based auth endpoint (that is used by most of the Peregrine canvases), if an account is identified as Child account, auth service drops an AACE cookie\n // with a value of {\"child\": 1} for child accounts and {\"child\": 0} otherwise.\n // Until we move over to the newer (1S based) auth endpoint, we still have to honor both ways of identifying a child account.\n const aaceCookie = decodeURIComponent(getCookieCore(cookieString, \"aace\" /* AuthCookieExistsCookieName.AppAnonCookieExists */));\n const { child } = (aaceCookie && tryParseJson(aaceCookie)) || {};\n const childCookie = getCookieCore(cookieString, childCookieName);\n if (aaceCookie && (child === 1 || childCookie)) {\n audienceMode = \"kids\" /* AudienceModeType.Kids */;\n }\n else {\n audienceMode = clientSettings.audienceMode || \"adult\" /* AudienceModeType.Adult */;\n }\n return audienceMode;\n}\n//# sourceMappingURL=AudienceModeCookie.js.map","// © Microsoft Corporation. All rights reserved.\n/**\n * Gets if the current page should be considered as a China compliance context.\n * @param pageUrl - The current page URL info with the following info:\n * - hostname: The hostname of the current page URL.\n * - search: The search part of the current page URL.\n * @param clientSettings - The client settings of the page.\n * @returns `true` if the current page should be considered as a China compliance context; otherwise, `false`.\n */\nexport function isChinaCompliance(pageUrl, clientSettings) {\n const isChina = pageUrl.hostname.toLowerCase().endsWith(\".cn\")\n // PCS sends isChinaCompliance to be true when it meets appropriate conditions.\n // This flag is not present or will be undefined when PCS conditions aren't met.\n || clientSettings.isChinaCompliance\n // Widget Initializer set this flag when host page ask to use China domain\n || clientSettings.useCnDomain\n // Sapphire mini app sets this flag to true or false based on app configuration\n || pageUrl.search.match(/isChinaBuild=true/i)\n // For testing/debugging on localhost, item=revip:cn\n || pageUrl.search.match(/item=revip:cn/);\n return !!isChina;\n}\n//# sourceMappingURL=ChinaCompliance.js.map","// © Microsoft Corporation. All rights reserved.\nexport var CustomEventPayloadStage;\n(function (CustomEventPayloadStage) {\n CustomEventPayloadStage[\"INITIALIZE\"] = \"initialize\";\n CustomEventPayloadStage[\"CHANGE\"] = \"change\";\n CustomEventPayloadStage[\"ALL\"] = \"all\";\n})(CustomEventPayloadStage || (CustomEventPayloadStage = {}));\nexport const CustomWidgetErrorEvent = \"CustomWidgetErrorEvent\";\n/**\n * Dispatch custom event when some errors arised.\n * @param name - Event name\n * @param payload - Payload for event message\n */\nexport function dispatchCustomEvent(name, payload) {\n window.dispatchEvent(new CustomEvent(name, {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n type: \"AppError\",\n payload\n }\n }));\n}\n/**\n * Get data for custom widget event\n * @param event - CustomWidgetErrorEvent\n */\nexport function getDispatchedCustomEventPayload(event) {\n if (event.type !== CustomWidgetErrorEvent) {\n return null;\n }\n const payload = event.detail?.payload || {};\n return {\n stage: payload.stage,\n message: payload.message,\n extra: payload.extra\n };\n}\n//# sourceMappingURL=ErrorDispatcher.js.map","// © Microsoft Corporation. All rights reserved.\n/**\n * Widget group div class name in the DOM\n */\nexport const widgetGroupClassName = \"peregrine-widgetgroup\";\n/**\n * Widgets div class name in the DOM\n */\nexport const widgetClassName = \"peregrine-widgets\";\n/**\n * Widget settings div\n */\nexport const widgetSettingsClassName = \"peregrine-widget-settings\";\n/**\n * Widgets script core bundle class name in the DOM\n */\nexport const coreBundleClassName = \"peregrine-core-bundle\";\n/**\n * Widget info attribute (used in both 'peregrine-widgetgroup' divs and 'peregrine-widgets' divs)\n */\nexport const widgetInfoAttribute = \"data-widget\";\n/**\n * Widget render state attribute\n */\nexport const widgetRenderStateAttribute = \"data-widget-state\";\n/**\n * Attribute name of the pcsData.info in head element\n */\nexport const headTagDataInfoAttribute = \"data-info\";\n/**\n * Attribute name of the pcsData.clientSettings in head element\n */\nexport const headTagtClientSettingAttribute = \"data-client-settings\";\n/**\n * Attribute name of the pcsData.canvasInfo in head element\n */\nexport const headTagtCanvasInfo = \"data-canvas-info\";\n/**\n * App type name of sharedWidgets app\n */\nexport const sharedWidgetsAppTypeName = \"sharedWidgets\";\n/**\n * App type name of MSN studio app\n */\nexport const msnStudioAppTypeName = \"msnStudio\";\n/**\n * App type name of bingHomepage app\n */\nexport const bingHomepageAppTypeName = \"bingHomepage\";\n/**\n * Page type of bingHomepage app (default search page)\n */\nexport const bingHomepagePageType = \"widgetfeed\";\n/**\n * Page type of bingHomepage app (no search results page)\n */\nexport const bingNoResultsPageType = \"bingNoResultsPage\";\n/**\n * Page name of bingHomepage app\n */\nexport const bingHomepagePageName = \"widgetfeed\";\n/**\n * Ocid of bingHomepage app\n */\nexport const bingHomepageOcid = \"BingHp01\";\n/**\n * Ocid of sharedWidgets app\n */\nexport const sharedWidgetsOcid = \"hpwidget\";\n/**\n * Ocid of sharedWidgets app\n */\nexport const msnStudioOcid = \"msnstudio\";\n/**\n * Page Product of bingHomepage app\n */\nexport const bingHomepageProductName = \"bing\";\n/**\n * Widget Custom Event name\n */\nexport const widgetCustomEventName = \"PeregrineWidgetEvent\";\n/**\n * App type name of distribution app\n */\nexport const distributionAppTypeName = \"distribution\";\n/**\n * Page type of distribution app\n */\nexport const distributionPageType = \"widgetfeed\";\n/**\n * Page name of distribution app\n */\nexport const distributionPageName = \"widgetfeed\";\n/**\n * Ocid of distribution app\n */\nexport const distributionOcid = \"distribution\";\n/**\n * Page Product of distribution app\n */\nexport const distributionProductName = \"distribution\";\n/**\n* Static Server Endpoint name\n*/\nexport const staticServerEndpoint = \"staticview.msn.com\";\n/**\n* Static Server Endpoint name for cn domain\n*/\nexport const staticServerEndpointCnDomain = \"staticview.msn.cn\";\n/**\n * PCS Response cache key\n */\nexport const pwPcsResponseCacheKey = \"pw-pcsresponse\";\n/**\n * Duration of time until PCS response is considered valid from cache.\n * 172800000 = 2 days in milliseconds\n * 2 days: because telemetry pipeline would throw away events with activity id older than 2 days\n */\nexport const pwPcsResponseCacheDuration = 172800000;\n/**\n * Duration of time until PCS response is considered valid from cache for Prong 2\n * 30000 = 30 seconds in milliseconds\n * 30 seconds: because Prong 2 has several flights where a live call to PCS is needed for updating the\n * response info and cannot rely on the stale info in the cache from longer periods.\n*/\nexport const pwPcsResponseProng2CacheDuration = 30000;\n/**\n * Duration of time until PCS response is considered valid from cache for always cached app\n * 2592000000 = 30 days in milliseconds\n * for always cached app, the concept is that we always want user to load the \"previous app version\" from cache.\n * Then we use an app cache manager to update the cache in the background.\n * Then the cache mamanger will decide if current app version is to old and current page view need to be reloaded\n * ideally the cache duration can be set to a very long time like 1 year, which is depends on how long the history app\n * bundles are stored in the server. But for now, we set it to 30 days.\n * NOTE: to understand the SRM issue, we use a very short cache duration for now. Then plan to gradually increase it, until we see the SRM issue happens.\n */\nexport const alwaysCachedAppPcsResponseCacheDuration = 86400000; // 24hrs\n/**\n * Loading icon class name\n */\nexport const widgetLoadingIconClassName = \"peregrine-widget-load-icon\";\n/**\n * EdgeChromium expected widget cards local storage key.\n */\nexport const expectedWidgetsCardsLocalStorageKey = \"expected-widget-cards\";\nexport const widgetsCardsArgsKey = \"widgets-cards-args\";\n//# sourceMappingURL=Widgets.js.map","// © Microsoft Corporation. All rights reserved.\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\n/**\n * Check if widgets loading is supported by the host page\n * @returns true if widgets is supported for rendering else false.\n */\nexport function shouldRenderWidgets() {\n // Make sure that this script runs on proper environment\n // Example: IE11 doesn't support fetch: https://www.caniuse.com/?search=fetch\n if (!canUseDOM()\n || typeof location === \"undefined\"\n || typeof fetch === \"undefined\") {\n console.error(\"Missing required global features.\");\n return false;\n }\n // Check if browser has following support in order to classify as a modern browser.\n // This will help render React or Web component based Widget(s) on modern browsers.\n // If host page accidentally calls widget-initializer script on unsupported browser,\n // this will protect host page, by not rendering widgets on unsupported browser.\n if (typeof customElements === \"undefined\"\n || typeof ShadowRoot === \"undefined\"\n || typeof HTMLTemplateElement === \"undefined\") {\n console.error(\"Not sure if this is modern browser to render widgets!\");\n return false;\n }\n return true;\n}\n/**\n * Get random guid as RID/ActivityId since PCS call is not made yet\n * @returns GUID\n */\nexport function getRandomGuid() {\n return \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n const r = Math.random() * 16 | 0;\n const v = c == \"x\" ? r : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n}\n/**\n * Use pg.p as telemetry => pageProduct if provided by the host page.\n * For windows, use pg.p as entwindowsdash if query=\"enterprise\" is found in pcsAdditionalQsp else use windowsdash.\n * By default use pg.p as appType\n * @param appType appType found in the data-widget json.\n * @param pageProduct pageProduct found in the telemetry object in data-widget json.\n * @param pcsAdditionalQsp pcsAdditionalQsp attribute in the data-widget json. Example: \"locale=en-US®ion=US&query=enterprise\"\n * @returns pg.p (pageProduct) to be used by the widget initializer app errors.\n */\nexport function getTelemetryPageProduct(appType, pageProduct = null, pcsAdditionalQsp = null) {\n // Use pageProduct as pg.p if specified by the host page. Example:\n // data-widget: { telemetry: { pageProduct: \"bing\"}} then we will return \"bing\" as pg.p\n if (pageProduct && pageProduct.length > 0) {\n return pageProduct;\n }\n // Applicable to AppTypes: winwidgets and windowsnewsplus\n // \"query\" in pcsAdditionalQsp is typically used by prong2 to distinguish pg.p\n // Based on this query prong2 differentiate enteprise and retail app errors.\n if (appType === \"windowsNewsPlus\" /* AppType.WindowsNewsPlus */ || appType === \"winWidgets\" /* AppType.WindowsNewsWidgets */) {\n return pcsAdditionalQsp && pcsAdditionalQsp.includes(\"query=enterprise\")\n ? \"entwindowsdash\"\n : \"windowsdash\";\n }\n // Default pg.p as appType\n return appType;\n}\n/**\n * Check if Prong2 MarketSelector enabled\n * @returns true if Prong2 MarketSelector enable else false.\n */\nexport function isMarketSelectorEnabled(appType, flights) {\n return appType === \"winWidgets\" /* AppType.WindowsNewsWidgets */ && flights.includes(\"prg-pr2-marketsel\");\n}\n//# sourceMappingURL=Utilities.js.map","// © Microsoft Corporation. All rights reserved.\nimport { CustomEventPayloadStage, CustomWidgetErrorEvent, dispatchCustomEvent } from \"./ErrorDispatcher\";\nimport { getRandomGuid, getTelemetryPageProduct } from \"./Utilities\";\nlet loggingEndpoint;\nexport let dataWidgetAttributes;\nexport let clientSettings;\nexport let navigatorObj;\n/**\n * Set logging metadata like appType, pageType and market\n * @param dataWidgetAttr\n */\nexport function setLoggingMetadata(dataWidgetAttr, clientSettingsParam) {\n if (dataWidgetAttr) {\n dataWidgetAttributes = dataWidgetAttr;\n }\n if (clientSettingsParam) {\n clientSettings = clientSettingsParam;\n }\n if (!navigatorObj) {\n // window.navigator doesn't exist in IE 11\n // https://caniuse.com/?search=navigator\n const { connection = {}, deviceMemory = \"\", hardwareConcurrency } = window.navigator || {};\n navigatorObj = {\n connectionEffectiveType: connection && connection.effectiveType,\n deviceMemory,\n hardwareConcurrency\n };\n }\n}\n/**\n * Logs error to the given endpoint (e.g. otf). ONLY USE FROM INLINE SCRIPTS.\n * @param message - The error message\n * @param appErrorId - The app error id to be logged\n * @param propertyBag - The blob to store additional error information\n */\nexport async function logError(message, appErrorId, propertyBag) {\n try {\n const settingsObject = {};\n const params = getLoggingParameters(settingsObject);\n let iKey = \"\";\n if (params && params[\"apikey\"]) {\n iKey = getIKeyValue(params[\"apikey\"]);\n }\n const payload = await getLoggingPayload(appErrorId, message, iKey, propertyBag);\n dispatchError(message, params, payload);\n if (params && payload) {\n // Print app error on console\n console.error(payload);\n // fire and forget\n navigator.sendBeacon(\"https://\" + loggingEndpoint + \"/OneCollector/1.0\" + formatParams(params), payload);\n }\n else {\n // eslint-disable-next-line @cs-core/no-console-logs\n console.log(\"missing required params. \" + message);\n }\n }\n catch (error) {\n // eslint-disable-next-line @cs-core/no-console-logs\n console.log(`Error ${error} logging the app error. ${message}`);\n dispatchError(message, {}, \"\");\n }\n}\n/**\n * Verify if the core JS files loaded.\n * NOTE: We cannot verify the experience bundle directly as Experiences does not show up in webpackJsonp.\n * !IMPORTANT!:\n * The same function exists mostly the same in libs\\page-error-handling\\src\\CommonErrorHandlers.ts. Update that function with any changes.\n * @param bundlesToVerify - Use to customize the names of the bundles to verify. Default is [\"vendors\", \"common\", \"microsoft\"]\n * @param errorMessage - Use to customize the logged error message. Default is\"Error when loading bundle(s): \".\n * @param timeout - Use to customize the timeout. Default is 10 seconds.\n * @param callback - on failure call the specified function\n */\nexport function verifyJSLoading(bundlesToVerify = [\"vendors\", \"common\", \"microsoft\"], errorMessage = \"Error when loading bundle(s): \", timeout = 15000, callback) {\n setTimeout(() => {\n const webpackJsonp = window.webpackJsonp;\n if (webpackJsonp) {\n const webpackLength = webpackJsonp.length;\n // The upperbound should always be 1 more than the bundle count.\n const expectedBundlesLength = bundlesToVerify.length + 1;\n if (webpackLength < expectedBundlesLength) {\n if (webpackLength === (expectedBundlesLength - 1)) {\n // experience failed to load so reset array to the generic name and do not cycle thru list.\n bundlesToVerify = [\"experience\"];\n }\n else {\n // An error occured loading our JS files. See which one failed to load.\n const slicedArray = webpackJsonp.slice(0, expectedBundlesLength);\n slicedArray.forEach(bundle => {\n if (bundle.length && bundle[0][0]) {\n bundlesToVerify = bundlesToVerify.splice(bundlesToVerify.indexOf(bundle[0][0]), 1);\n }\n });\n }\n try {\n logError(errorMessage + bundlesToVerify.toString(), 20202, {});\n }\n finally {\n if (callback) {\n callback();\n }\n }\n }\n }\n }, timeout);\n}\n/**\n * Dispatch common error to host page\n * @param message - The error message\n * @param params - The logging parameters\n * @param payload - The logging payload\n */\nfunction dispatchError(message, params, payload) {\n dispatchCustomEvent(CustomWidgetErrorEvent, {\n stage: CustomEventPayloadStage.ALL,\n message,\n extra: {\n payload,\n params\n }\n });\n}\n/**\n * Gets data to set the logging parameters\n * @param settingsObject - The object containing client settings\n */\nfunction getLoggingParameters(settingsObject) {\n if (settingsObject) {\n const { pcsInfo, pageGenTime } = settingsObject;\n const uploadTime = new Date(pageGenTime).getTime();\n const isProd = !pcsInfo || pcsInfo.env === \"prod\";\n // JSLL endpoints\n loggingEndpoint = isProd\n ? `browser.events.data.msn.${dataWidgetAttributes.useCnDomain ? \"cn\" : \"com\"}`\n : `events-sandbox.data.msn.${dataWidgetAttributes.useCnDomain ? \"cn\" : \"com\"}`;\n const apikey = isProd\n ? \"0ded60c75e44443aa3484c42c1c43fe8-9fc57d3f-fdac-4bcf-b927-75eafe60192e-7279\"\n : \"f8857dedc6f54ca8962cfb713e01e7d7-e9250191-fe0b-446f-95ae-07516262f98c-7028\";\n return {\n cors: \"true\",\n \"content-type\": \"application/x-json-stream\",\n \"client-id\": \"NO_AUTH\",\n \"client-version\": \"1DS-Web-JS-2.2.2\",\n apikey: apikey,\n \"upload-time\": uploadTime,\n w: \"0\",\n anoncknm: \"app_anon\"\n };\n }\n return null;\n}\n/**\n * Gets data to set the logging payload\n * @param appErrorId - The app error id to be logged\n * @param message - The error message\n * @param iKey - The key for authenticating on 1DS endpoint\n * @param propertyBag - The blob to store additional error information\n * @param flightIds - The flight ids\n */\nasync function getLoggingPayload(appErrorId, message, iKey, propertyBag) {\n if (!dataWidgetAttributes) {\n return;\n }\n const { appType, pageType, cm, telemetry = {}, pcsAdditionalQsp = \"\" } = dataWidgetAttributes;\n const { pageProduct, pagetype: telemetryPageType } = telemetry;\n const reportingPageType = telemetryPageType || pageType || \"dhp\";\n // Add all data widget attributes (ex: apptype, pagetype, cm, cookie info, etc.) into property bag.\n propertyBag = propertyBag || {};\n propertyBag.dataWidgetAttributes = dataWidgetAttributes;\n // Instrument PCS and client's build number and environment.\n if (clientSettings) {\n const { bundleInfo, pcsInfo } = clientSettings;\n if (pcsInfo) {\n propertyBag.pcsVersion = pcsInfo.v;\n propertyBag.pcsEnv = pcsInfo.env;\n }\n const { alias, v } = bundleInfo || {};\n // Capture build version info\n propertyBag.build = v;\n propertyBag.buildAlias = alias;\n }\n // Add network diagnostics when available\n if (navigatorObj) {\n propertyBag.navigator = navigatorObj;\n }\n // NOTE: since the PCS API call is not made by the host page yet, we do not know rid/aid.\n // Hence we need to generate RID at client\n const rid = getRandomGuid();\n // @ts-ignore\n const tryGetCustomAppErrorEventNameAsync = typeof window === \"object\" && window._tryGetCustomAppErrorEventNameAsync;\n const name = typeof tryGetCustomAppErrorEventNameAsync === \"function\" && await tryGetCustomAppErrorEventNameAsync() || \"MS.News.Web.AppError\";\n // Setting RID=AID might not be correct. The more complex logic in the bundles may determine that we have already burned this as a RID\n // and generate a new one different from AID. But it's better than nothing and we cannot see AID on app error reports right now.\n // Most of the time when we are not using app cache these two will be the same.\n const payload = {\n name: name,\n time: new Date().toISOString(),\n ver: \"4.0\",\n iKey: `o:${iKey}`,\n data: {\n baseData: {},\n baseType: \"MS.News.Web.Base\",\n page: {\n name: \"default\",\n product: getTelemetryPageProduct(appType, pageProduct, pcsAdditionalQsp),\n type: isProng2AppType(appType) ? \"dhp\" : reportingPageType,\n content: {\n category: \"standaloneError\"\n }\n },\n browser: {\n // Assume that cookie consent is not provided so muid is not being sent from cookie\n clientId: \"\"\n },\n flight: {\n id: \"\"\n },\n request: {\n activityId: rid,\n requestId: rid,\n afdMuid: clientSettings && clientSettings.fd_muid ? clientSettings.fd_muid : \"\"\n },\n locale: {\n mkt: cm\n },\n extSchema: {\n id: appErrorId,\n severity: 0,\n pb: propertyBag,\n message: message\n }\n }\n };\n return payload ? JSON.stringify(payload) : null;\n}\n/**\n * Format query string parameters\n * @param params - The logging params\n */\nfunction formatParams(params) {\n return \"?\" + Object\n .keys(params)\n .map(function (key) {\n return key + \"=\" + encodeURIComponent(params[key]);\n }).join(\"&\");\n}\n/**\n * Extracts the value of iKey from apikey\n * @param apikey - The value of apikey for 1DS authentication\n */\nfunction getIKeyValue(apikey) {\n if (apikey) {\n const iKeyIndex = apikey.indexOf(\"-\");\n if (iKeyIndex > 0) {\n return apikey.substring(0, iKeyIndex);\n }\n }\n return \"\";\n}\n/**\n * Helper to tell if app is prong2\n * @param appType The type to evaluate\n * @returns True if appType corresponds to a vesion of prong2, False otherwise\n */\nexport function isProng2AppType(appType) {\n return appType === \"windowsNewsPlus\" /* AppType.WindowsNewsPlus */ || appType === \"winWidgets\" /* AppType.WindowsNewsWidgets */;\n}\n/**\n * NOTE: TOBE USED ONLY FOR UNIT TESTS\n */\nexport function resetIntermediateState() {\n dataWidgetAttributes = undefined;\n clientSettings = undefined;\n navigatorObj = undefined;\n}\n//# sourceMappingURL=ErrorLogging.js.map","// © Microsoft Corporation. All rights reserved.\nimport { widgetGroupClassName, widgetLoadingIconClassName } from \"@msnews/experiences-constants\";\n/**\n * Local variable to store the state of loading icon in widget initializer\n */\nlet loadingIconRemoved = false;\n/**\n * Once this timeout is hit, loading icon will be removed on the host page\n */\nconst LOADING_ICON_REMOVAL_TIMEOUT = 5000;\n/**\n * Add loading icon under peregrine widget group div\n * @param renderWidgetsIcon This boolean value is provided by the host page\n * @param peregrineWidgetGroupDiv\n */\nexport function addLoadingIcon(dataWidgetAttributes) {\n if (!dataWidgetAttributes\n || !dataWidgetAttributes.clientPerf\n || !dataWidgetAttributes.clientPerf.shouldShowLoadingIcon) {\n return;\n }\n const peregrineWidgetGroupDiv = getWidgetGroupDiv();\n if (!peregrineWidgetGroupDiv) {\n return;\n }\n const widgetLoadingIconImg = document.createElement(\"img\");\n widgetLoadingIconImg.setAttribute(\"class\", widgetLoadingIconClassName);\n widgetLoadingIconImg.setAttribute(\"src\", getLoadingImageUrl(dataWidgetAttributes.useCnDomain));\n widgetLoadingIconImg.setAttribute(\"alt\", \"Loading\");\n widgetLoadingIconImg.setAttribute(\"style\", \"display:block;margin:auto;\");\n peregrineWidgetGroupDiv.appendChild(widgetLoadingIconImg);\n // This handler will enable us to remove \"loading\" icon later in the core bundles.\n window._pw_removeLoadingIcon = removeLoadingIcon;\n // After a given timeout, remove the loading icon\n setTimeout(removeLoadingIcon, LOADING_ICON_REMOVAL_TIMEOUT);\n}\n/**\n * Removes loading icon element from the host page under peregrine-widgetgroup div\n */\nfunction removeLoadingIcon() {\n if (loadingIconRemoved) {\n return;\n }\n const peregrineWidgetGroupDiv = getWidgetGroupDiv();\n if (!peregrineWidgetGroupDiv) {\n return;\n }\n const widgetLoadingIconElement = peregrineWidgetGroupDiv.getElementsByClassName(widgetLoadingIconClassName)[0];\n if (widgetLoadingIconElement) {\n peregrineWidgetGroupDiv.removeChild(widgetLoadingIconElement);\n loadingIconRemoved = true;\n }\n}\n/**\n * Get loading image asset url\n * @param useCnDomain\n * @returns Loading asset url\n */\nfunction getLoadingImageUrl(useCnDomain) {\n return `https://assets.msn.${useCnDomain ? \"cn\" : \"com\"}/staticsb/statics/latest/widget/LoadingImg.gif`;\n}\n/**\n * Get div with class name \"peregrine-widgetgroup\"\n * @returns specific div\n */\nfunction getWidgetGroupDiv() {\n return document.body.getElementsByClassName(widgetGroupClassName)[0];\n}\n/**\n * TO BE USED ONLY FOR UNIT TEST CONTEXT\n */\nexport function resetLocalVariables() {\n loadingIconRemoved = false;\n}\n//# sourceMappingURL=LoadingIcon.js.map","// © Microsoft Corporation. All rights reserved.\n/**\n * Get override params for appType, pageType and cm.\n */\nexport function getOverrideParams() {\n const queryParams = location.search && location.search.replace(\"?\", \"\").split(\"&\");\n // This ensures that overrideParams will be always defined so no need to check undefined or null in the caller.\n const overrideParams = {};\n if (!queryParams) {\n return overrideParams;\n }\n // Loop through query params and set appType, pageType and cm in overrideParams.\n // Example:\n // QSP item=appType:windowsShell.\n // This will set overrideParams.appType to be windowsShell\n // overrideParams.pageType and overrideParams.cm will be null.\n for (let i = 0; i < queryParams.length; i++) {\n const itemQsp = queryParams[i];\n const pair = itemQsp.split(\"=\");\n if (pair.length !== 2) {\n continue;\n }\n // Following QSPs are used in statics context/debugging.\n const qspKey = decodeURIComponent(pair[0]);\n const qspValue = decodeURIComponent(pair[1]);\n if (qspKey === \"instance\") {\n overrideParams.staticsAttributes = {\n ...overrideParams.staticsAttributes,\n instance: qspValue\n };\n }\n if (qspKey === \"staticsEnv\") {\n overrideParams.staticsAttributes = {\n ...overrideParams.staticsAttributes,\n staticsEnv: qspValue\n };\n }\n // Following code is for item QSPs.\n if (\n // decodeURIComponent exist in all browsers. https://www.caniuse.com/?search=decodeURIComponent\n qspKey === \"item\"\n && qspValue) {\n const itemPair = qspValue.split(\":\");\n if (itemPair\n && itemPair.length === 2\n && itemPair[0]\n && itemPair[1]) {\n const value = itemPair[1];\n // Add instance=intpr or instance=intperf QSP if item=pcsenv:intpr or item=pcsenv:intperf\n const pcsEnvQsp = (itemPair[0] === \"pcsenv\" && (value === \"intpr\" || value === \"intperf\")) && `instance=${value}`;\n overrideParams.pcsAdditionalQsp = `${overrideParams.pcsAdditionalQsp ? `${overrideParams.pcsAdditionalQsp}&` : \"\"}${pcsEnvQsp || itemQsp}`;\n switch (itemPair[0]) {\n case \"appType\":\n overrideParams.appType = value;\n break;\n case \"pageType\":\n overrideParams.pageType = value;\n break;\n case \"cm\":\n overrideParams.cm = value;\n break;\n case \"dl\":\n overrideParams.dl = value;\n break;\n case \"useCnDomain\":\n overrideParams.useCnDomain = value === \"true\";\n break;\n case \"reportingOcid\":\n overrideParams.telemetry = {\n ...overrideParams.telemetry,\n ocid: value\n };\n break;\n case \"tmpl\":\n overrideParams.telemetry = {\n ...overrideParams.telemetry,\n tmpl: value\n };\n break;\n case \"feedOcid\":\n overrideParams.feed = {\n ...overrideParams.feed,\n ocid: value\n };\n break;\n case \"feedApiKey\":\n overrideParams.feed = {\n ...overrideParams.feed,\n apiKey: value\n };\n break;\n case \"shouldPreFetchPcsResponse\":\n overrideParams.clientPerf = {\n ...overrideParams.clientPerf,\n shouldPreFetchPcsResponse: value === \"true\"\n };\n break;\n case \"shouldUsePWOnlyFlights\":\n overrideParams.clientPerf = {\n ...overrideParams.clientPerf,\n shouldUsePWOnlyFlights: value === \"true\"\n };\n break;\n case \"shouldShowLoadingIcon\":\n overrideParams.clientPerf = {\n ...overrideParams.clientPerf,\n shouldShowLoadingIcon: value === \"true\"\n };\n break;\n }\n }\n }\n }\n return overrideParams;\n}\nexport const PcsMicrosoftStartEnvironment = \"microsoftstart\";\nexport const PcsMicrosoftStartQueryParam = \"item=pcsenv:microsoftstart\";\n/**\n * For debugging purpose: get pcs env from query string param\n * @param appType\n * @returns string (www, int, int1 or microsoftstart)\n */\nexport function getPcsEnvironment(appType = \"\", pcsAdditionalQsp = \"\") {\n const queryParams = location.search?.replace(\"?\", \"\").split(\"&\");\n if (queryParams) {\n // indexOf exist in IE9 and above. https://www.caniuse.com/?search=indexof\n if (queryParams.indexOf(\"item=pcsenv:int1\") > -1) {\n return \"int1\";\n }\n if (queryParams.indexOf(\"item=pcsenv:int\") > -1\n || queryParams.indexOf(\"item=pcsenv:intpr\") > -1\n || queryParams.indexOf(\"item=pcsenv:intperf\") > -1) {\n return \"int\";\n }\n if (appType === \"distribution\" /* AppType.Distribution */ || queryParams.indexOf(PcsMicrosoftStartQueryParam) > -1) {\n return PcsMicrosoftStartEnvironment;\n }\n }\n const inlineQueryParams = pcsAdditionalQsp && pcsAdditionalQsp.replace(\"?\", \"\").split(\"&\");\n if (inlineQueryParams) {\n if (inlineQueryParams.indexOf(PcsMicrosoftStartQueryParam) > -1) {\n return PcsMicrosoftStartEnvironment;\n }\n }\n // Default behavior\n return \"www\";\n}\n//# sourceMappingURL=GetOverrideParams.js.map","// © Microsoft Corporation. All rights reserved.\nconst appTimingsWindowPropertyName = \"_appTimings\";\n/**\n * Add given perf marker to pageTimings global object\n * TODO: We could use this function from diagnostic package but importing that is adding lot of unnecessary code\n * and that is bloating size of widgetInitializer.js from 7 kb to few mb.\n * @param marker name\n */\nexport function addMarkerToPageTimings(marker) {\n if (!performance || !performance.now) {\n return;\n }\n const pageTimings = window._pageTimings || (window._pageTimings = {});\n pageTimings[marker] = Math.round(performance.now());\n}\n/**\n * Add given perf marker to appTimings object\n * @param marker name\n */\nexport function addAppTraceMarker(marker) {\n if (!performance || !performance.now) {\n return;\n }\n const appTimings = window[appTimingsWindowPropertyName] || (window[appTimingsWindowPropertyName] = {});\n appTimings[marker] = performance.now();\n}\n/**\n * Gets current window._pageTimings object\n */\nexport function getPageTimings() {\n if (typeof window === \"object\" && window !== null) {\n return window._pageTimings || (window._pageTimings = {});\n }\n return {};\n}\n//# sourceMappingURL=AddMarkerToPageTimings.js.map","// © Microsoft Corporation. All rights reserved.\n/**\n * Converts the given error object to its string representation based on\n * the type of the input object.\n * @param error - the error object to convert to a string.\n * @param tryIncludeErrorStack - If true, will try to get the stack of the error\n * if the error is an actual Error object that has a stack.\n * @returns {string} - The string representation of the error.\n */\nexport function stringifyError(error, tryIncludeErrorStack) {\n if (error instanceof Error) {\n const message = error.toString();\n return tryIncludeErrorStack && error.stack\n ? `${message}, Stack: ${error.stack}`\n : message;\n }\n else if (typeof error === \"string\") {\n return error;\n }\n else {\n return tryStringifyJson(error);\n }\n}\n/**\n * Attempts to stringify json. Empty string in case of serialization error.\n * @param value - the JS value to convert to a string.\n * @returns {string} - Stringify'ed object\n */\nexport function tryStringifyJson(value) {\n // JSON.stringify returns `undefined` if `undefined` is passed\n // unlike how it handles `null` which is correctly converted to \"null\".\n // So we explicitly handle the undefined scenario here.\n if (value === undefined) {\n return \"undefined\";\n }\n try {\n return JSON.stringify(value);\n }\n catch {\n return \"[serialization-error]\";\n }\n}\n/**\n * Convert the given error \"value\" to an Error object.\n * It will retain the original error message if given an actual Error object\n * or otherwise the string representation of the input value will be used to create a new Error object.\n * @param error - The unknown error value to convert to an Error object.\n * @returns {Error} - The Error object created from the input value.\n */\nexport function toErrorObj(error) {\n return error instanceof Error\n ? error\n : new Error(stringifyError(error));\n}\n//# sourceMappingURL=ErrorHelper.js.map","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nexport default isArray;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nexport default isSymbol;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n","import isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nexport default isKey;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nexport default isObject;\n","import root from './_root.js';\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nexport default coreJsData;\n","import coreJsData from './_coreJsData.js';\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nexport default isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nexport default toSource;\n","import isFunction from './isFunction.js';\nimport isMasked from './_isMasked.js';\nimport isObject from './isObject.js';\nimport toSource from './_toSource.js';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nexport default baseIsNative;\n","import baseGetTag from './_baseGetTag.js';\nimport isObject from './isObject.js';\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nexport default isFunction;\n","import baseIsNative from './_baseIsNative.js';\nimport getValue from './_getValue.js';\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nexport default getNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nexport default getValue;\n","import getNative from './_getNative.js';\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nexport default nativeCreate;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nexport default hashGet;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nexport default hashHas;\n","import hashClear from './_hashClear.js';\nimport hashDelete from './_hashDelete.js';\nimport hashGet from './_hashGet.js';\nimport hashHas from './_hashHas.js';\nimport hashSet from './_hashSet.js';\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nexport default Hash;\n","import nativeCreate from './_nativeCreate.js';\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nexport default hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default hashDelete;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nexport default hashSet;\n","import eq from './eq.js';\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nexport default assocIndexOf;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nexport default eq;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nexport default listCacheDelete;\n","import listCacheClear from './_listCacheClear.js';\nimport listCacheDelete from './_listCacheDelete.js';\nimport listCacheGet from './_listCacheGet.js';\nimport listCacheHas from './_listCacheHas.js';\nimport listCacheSet from './_listCacheSet.js';\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nexport default ListCache;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nexport default listCacheClear;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nexport default listCacheGet;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nexport default listCacheHas;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nexport default listCacheSet;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nexport default Map;\n","import isKeyable from './_isKeyable.js';\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nexport default getMapData;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nexport default isKeyable;\n","import mapCacheClear from './_mapCacheClear.js';\nimport mapCacheDelete from './_mapCacheDelete.js';\nimport mapCacheGet from './_mapCacheGet.js';\nimport mapCacheHas from './_mapCacheHas.js';\nimport mapCacheSet from './_mapCacheSet.js';\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nexport default MapCache;\n","import Hash from './_Hash.js';\nimport ListCache from './_ListCache.js';\nimport Map from './_Map.js';\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nexport default mapCacheClear;\n","import getMapData from './_getMapData.js';\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default mapCacheDelete;\n","import getMapData from './_getMapData.js';\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nexport default mapCacheGet;\n","import getMapData from './_getMapData.js';\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nexport default mapCacheHas;\n","import getMapData from './_getMapData.js';\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nexport default mapCacheSet;\n","import MapCache from './_MapCache.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nexport default memoize;\n","import memoizeCapped from './_memoizeCapped.js';\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nexport default stringToPath;\n","import memoize from './memoize.js';\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nexport default memoizeCapped;\n","import Symbol from './_Symbol.js';\nimport arrayMap from './_arrayMap.js';\nimport isArray from './isArray.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nexport default baseToString;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nexport default arrayMap;\n","import isArray from './isArray.js';\nimport isKey from './_isKey.js';\nimport stringToPath from './_stringToPath.js';\nimport toString from './toString.js';\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nexport default castPath;\n","import baseToString from './_baseToString.js';\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nexport default toString;\n","import isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nexport default toKey;\n","import baseGet from './_baseGet.js';\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nexport default get;\n","import castPath from './_castPath.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nexport default baseGet;\n","// © Microsoft Corporation. All rights reserved.\n/**\n * Utility method to extract query string param in url.\n * @param name - Query param name\n * @returns Query param value\n */\nexport function getQueryParameterByName(locationHref, name) {\n const nameRegEx = name.replace(/[[\\]]/g, \"\\\\$&\");\n const regex = new RegExp(\"[?&]\" + nameRegEx + \"(=([^&#]*)|&|#|$)\");\n const queryNameValueMatches = regex.exec(locationHref);\n if (!queryNameValueMatches) {\n return null;\n }\n // the second group would contain the value of the param\n const queryValue = queryNameValueMatches[2];\n return decodeURIComponent(queryValue.replace(/\\+/g, \" \")) || \"\";\n}\n//# sourceMappingURL=Util.js.map","// © Microsoft Corporation. All rights reserved.\nimport { LiteLogger } from \"./LiteLogger\";\n/**\n * Set the logger instance.\n * @param _logger The logger instance to change to.\n */\nexport function setLogger(_logger) {\n logger = _logger;\n}\n/** Logger used by everyone. Default is LiteLogger. Please set up desired logger implementaiton with setLogger(). */\nexport let logger = new LiteLogger();\n//# sourceMappingURL=Logger.js.map","// © Microsoft Corporation. All rights reserved.\nimport { getQueryParameterByName } from \"./Util\";\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\n/**\n * Logger that simply logs to console with minimum dependencies.\n * Used for bootstrap/inline script where we don't need any logging nor its dependencies.\n */\nexport class LiteLogger {\n /**\n * The constructor\n */\n constructor() {\n if (canUseDOM()) {\n this.isDebugEnabled = ((getQueryParameterByName(window.location.href, \"debug\") || \"\").toLowerCase() in { 1: 1, true: 1 }) ||\n ((getQueryParameterByName(window.location.href, \"reqsrc\") || \"\").toLowerCase() === \"vp\");\n // On debug mode, make webpack_require available as global function\n // so any code in packages could be triggered from console. Handy for debugging.\n if (this.isDebugEnabled && !global[\"TEST_ENV\"]) {\n window.webpackRequire = __webpack_require__;\n }\n }\n else {\n this.isDebugEnabled = false; // isDebugEnabled should be set explictly using the setDebug method\n }\n }\n /**\n * Returns the logging service\n * @returns {ILoggingService}\n */\n getLoggingService() {\n return null;\n }\n /**\n * Checks whether we're running in debug mode.\n * @returns True when either debug=1 or debug=true is present as a query param, otherwise false.\n */\n isDebug() {\n return this.isDebugEnabled;\n }\n /**\n * Override the isDebug setting. Useful when server side rendering.\n */\n setDebug(isDebug) {\n this.isDebugEnabled = isDebug;\n }\n /**\n * Set the tags to filter logs.\n * @param tags Tags to filter logs. If empty, do not filter.\n */\n setTags(tags) {\n // Not supported in console logger at the moment\n }\n /**\n * Log console message.\n * Note that these are not output to the console unless you're in debug mode.\n * @param message - Message to log.\n * @param tags - Optional tags for specifying log type for filtering logs.\n */\n log(message, tags) {\n if (this.isDebug()) {\n console.info(message);\n }\n }\n /**\n * Log error message.\n * @param message - Message to log\n */\n logError(message) {\n console.error(message);\n }\n /**\n * Lazy log console message. Use this when the message being constructed is complex or expensive so that it's only evaluated if needed.\n * Note that the callback is not invoked and the message is not output unless you're in debug mode.\n * @param getMessage - The function to call to get message to log\n */\n logCallback(getMessage) {\n if (this.isDebug()) {\n console.info(getMessage());\n }\n }\n /**\n * Log the objects to the console.\n * Note that these are not output to the console unless you're in debug mode.\n * @param message - Array of messages to log\n */\n logObjects(...message) {\n if (this.isDebug()) {\n console.log(...message);\n }\n }\n /**\n * Log the object to the console.\n * Note that these are not output to the console unless you're in debug mode.\n * @param message - Array of messages to log\n */\n logSingleObject(message, isMetrics) {\n if (this.isDebug()) {\n console.log(message);\n }\n }\n}\n//# sourceMappingURL=LiteLogger.js.map","// © Microsoft Corporation. All rights reserved.\n// Provides utility functions to get and set data from browser webStorage.\nimport { tryParseJson } from \"../utilities/Parsing\";\nimport { logger } from \"@msnews/diagnostics\";\n/**\n * Base class for localeStorage and sessionStorage abstractions\n */\nexport class WebStorage {\n /**\n * Check if the web storage is supported\n * @returns {boolean} true if supported\n */\n get supported() {\n return !!this.storage;\n }\n /**\n * Local storage object for persistent storage\n * @param storage Storage used.\n */\n constructor(storage) {\n this.storage = storage;\n }\n /**\n * Get given key's value from web storage\n * @param {string} key - Key name\n * @returns {string} Key value\n */\n getItem(key) {\n if (this.supported) {\n return this.storage.getItem(key);\n }\n }\n /**\n * Gets the value from local storage using the key.\n * @param {string} key - the storage key to store under\n * @param {T} defaultValue - the default value to return if parsing fails\n * @returns {T} The parsed JSON value\n */\n getObject(key, defaultValue) {\n const value = this.getItem(key);\n if (value != null) {\n const parsedObj = tryParseJson(value);\n if (parsedObj != null) {\n return parsedObj;\n }\n }\n return defaultValue;\n }\n /**\n * Gets given index location key from web storage\n * @param {string} key - Key name\n * @returns {string} Key value\n */\n key(index) {\n if (this.supported && index >= 0) {\n return this.storage.key(index);\n }\n }\n /**\n * Returns all the keys under the storage\n */\n keys() {\n return this.supported\n ? Object.keys(this.storage)\n : [];\n }\n /**\n * Sets the given value after stringifying as JSON\n * @param {string} key - the storage key to store under\n * @param {T} value - the value to serialize and store\n */\n setObject(key, value) {\n (value !== undefined)\n ? this.setItem(key, JSON.stringify(value))\n : this.removeItem(key);\n }\n /**\n * Removes the given key from storage and returns the existing value parsed\n * @param {string} key - the key to remove.\n */\n removeObject(key) {\n const value = this.removeItem(key);\n if (value != null) {\n return tryParseJson(value);\n }\n }\n /**\n * Set given key's value to local storage\n * @param {string} key - Key name\n * @param {string} value - Key value\n * @param {boolean} ignoreError - log error instead of throwing\n */\n setItem(key, value, ignoreError = true) {\n if (this.supported) {\n try {\n if (!value) {\n throw \"Attempted to store null/undefined value: \" + value;\n }\n this.storage.setItem(key, value);\n }\n catch (e) {\n if (ignoreError) {\n logger.logError(e);\n }\n else {\n throw e;\n }\n }\n }\n else if (!ignoreError) {\n throw new Error(\"WebStorage not supported\");\n }\n }\n /**\n * Get entry count of storage\n * @returns storage.length\n */\n get length() {\n if (this.supported) {\n return this.storage.length;\n }\n }\n /**\n * Remove key item from local storage\n * @param {string} key - Key name\n * @returns {string} Key value\n */\n removeItem(key) {\n if (this.supported) {\n const value = this.getItem(key);\n this.storage.removeItem(key);\n return value;\n }\n }\n /**\n * Removes all key/value pairs from storage, if there are any\n */\n clear() {\n if (this.supported) {\n this.storage.clear();\n }\n }\n /**\n * Removes all keys containing the given substring in the storage key\n * @param {string} substring The substring to check\n */\n removeSubstringKeys(substring) {\n if (!this.supported || !substring) {\n return;\n }\n const matchingKeys = [];\n for (let index = 0; index < this.storage.length; index++) {\n const storageKey = this.key(index);\n if (storageKey && storageKey.includes(substring)) {\n matchingKeys.push(storageKey);\n }\n }\n for (let index = 0; index < matchingKeys.length; index++) {\n this.removeItem(matchingKeys[index]);\n }\n }\n}\n//# sourceMappingURL=WebStorage.js.map","// © Microsoft Corporation. All rights reserved.\nimport { WebStorage } from \"./WebStorage\";\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\n/* eslint-disable msnews-experiences-rules/no-direct-api-usage */\n/**\n * Local storage class for persistent storage\n */\nexport class LocalStorage extends WebStorage {\n constructor() {\n let storage = null;\n if (canUseDOM()) {\n try {\n storage = localStorage;\n }\n catch (ex) {\n // Getting local storage failed. Can happen in Chrome when user has disabled cookies.\n }\n }\n super(storage);\n }\n}\n/**\n * Set the local storage instance. Useful when setting up mock storage instance.\n * @param _storage The local storage instance to change to.\n */\nexport function setLocalStorage(_storage) {\n safeLocalStorage = _storage;\n}\n/**\n * Get the local storage instance. This should be used in place of window.localStorage\n * as the browser API would throw exception on browsers with cookies disabled.\n * @return The local storage instance.\n */\nexport function getLocalStorage() {\n return safeLocalStorage;\n}\nlet safeLocalStorage = new LocalStorage();\n//# sourceMappingURL=LocalStorage.js.map","// © Microsoft Corporation. All rights reserved.\nimport { addAppTraceMarker, addMarkerToPageTimings, getPageTimings } from \"./AddMarkerToPageTimings\";\nimport { isProng2AppType, logError } from \"./ErrorLogging\";\nimport { memoizeLite, stringifyError } from \"@msnews/core-helper\";\nimport { pwPcsResponseCacheDuration, alwaysCachedAppPcsResponseCacheDuration, pwPcsResponseCacheKey, staticServerEndpoint, staticServerEndpointCnDomain } from \"@msnews/experiences-constants\";\nimport { get } from \"lodash-es\";\nimport { shouldProng2PcsApiUseAkamaiEndpoint } from \"@msnews/experimentation-helpers\";\nimport { getLocalStorage } from \"@msnews/core\";\n/**\n * Timeout in miliseconds to terminate PCS or Statics network call.\n */\nconst timeoutInMs = 15000;\n// page timings keys\nconst pcsRetry = \"PcsRetry\";\nconst pcsCached = \"PcsCached\";\nconst pcsNoCacheReason = \"PcsNoCacheReason\";\n/**\n * Data Widget Attributes specified by the host page in the Div and override QSPs\n */\nlet dataWidgetAttributes;\n/**\n * This is used to delay writing response to local storage later.\n */\nlet pcsNetworkResponse;\n/**\n * This function calls and gets PCS response for client-setting, user data-info, and core-bundle scripts to render widgets.\n * @param hostPageAttributes contains the specific appType, pageType, cm and pcsAdditionalQsp information.\n * @returns an async response that contains the needed information above.\n */\nexport async function getPcsResponse(hostPageAttributes) {\n if (!hostPageAttributes) {\n return null;\n }\n const pageTimings = getPageTimings();\n pageTimings[pcsRetry] = 0;\n pageTimings[pcsCached] = 0;\n // Add perf marker and app trace marker on global timings objects\n addMarkerToPageTimings(\"WidgetsPcsCallStart\");\n addAppTraceMarker(\"WidgetsPcsCall-start\");\n // Set dataWidgetAttributes for global function\n dataWidgetAttributes = hostPageAttributes;\n let pcsCachedResponse = null;\n // Get PCS response from cache if specified by the host page by setting \"shouldPreFetchPcsResponse\" to be true\n const { appType, clientPerf } = dataWidgetAttributes;\n if ((clientPerf && clientPerf.shouldPreFetchPcsResponse)\n // Temporary remove appType === AppType.WindowsNewsWidgets for CRS spike experiment\n || appType && (appType === \"distribution\" /* AppType.Distribution */)) {\n // Set handler on global object so this can be called at a later point in time\n setHandlerToWritePcsResponseToCache();\n // Get PCS response from cache.\n pcsCachedResponse = await getPcsResponseFromCache();\n }\n else if (window.__useCachedApp) {\n // Get PCS response from cache.\n pcsCachedResponse = await getPcsResponseFromCache();\n }\n if (!pcsCachedResponse && clientPerf && clientPerf.customPrefetchStrategy) {\n let strategy = null;\n if (typeof clientPerf.customPrefetchStrategy === \"string\") {\n strategy = get(window, clientPerf.customPrefetchStrategy, null);\n }\n if (strategy) {\n try {\n pcsCachedResponse = await strategy;\n pcsCachedResponse = tryUpdatePcsResponse(pcsCachedResponse, dataWidgetAttributes.useCnDomain);\n }\n catch (error) {\n pcsCachedResponse = null;\n }\n }\n }\n // If \"shouldPreFetchPcsResponse\" was not specified by the host page or cached response was not valid,\n // proceed making live call to PCS\n if (!pcsCachedResponse) {\n pcsNetworkResponse = await tryGetPcsResponseFromNetwork();\n }\n else {\n pageTimings[pcsCached] = 1;\n }\n // If PCS response from network was not valid, try to return the cached response regardless of the cache duration to avoid blank page.\n if (!pcsNetworkResponse && window.__useCachedApp) {\n pcsCachedResponse = await getPcsResponseFromCache(true);\n }\n // set handler to update the cache for next time; Immediately update PCS response in cache to get new AID/RID\n if (window.__useCachedApp) {\n setTryGetPcsResponseFromNetworkForFutureCaching();\n }\n // Add perf marker and app trace marker on global timings objects\n addMarkerToPageTimings(\"WidgetsPcsCallEnd\");\n addAppTraceMarker(\"WidgetsPcsCall-end\");\n return pcsNetworkResponse || pcsCachedResponse;\n}\n/**\n * This function calls and gets PCS response from PCS API and gets client-setting, user data-info, and core-bundle scripts to render widgets.\n * This is global promise since we want the ability to call from widget initializer as well as from Peregrine bundles (later in page cycle).\n * @returns an async response that contains the needed information above.\n */\nlet tryGetPcsResponseFromNetwork = memoizeLite(async () => {\n if (!dataWidgetAttributes) {\n logError(\"dataWidgetAttributes is null in getPcsResponseFromNetwork\", 43715, {});\n return null;\n }\n // Set a 15-second timeout for PCS API call\n let timer;\n let responseData;\n const fetchUrl = buildPcsFetchUrl();\n try {\n const timeoutPromise = new Promise((resolve) => {\n timer = setTimeout(() => {\n // Log an app error if PCS API call timed out\n logError(\"PCS Widgets API call timed out. Trying to get response from statics\", 43713, { url: fetchUrl });\n resolve(null);\n }, timeoutInMs);\n });\n const pcsFetchPromise = fetch(fetchUrl, { credentials: \"include\" }).then(async (pcsResponse) => {\n if (timer) {\n clearTimeout(timer);\n }\n if (pcsResponse.ok) {\n return await pcsResponse.json();\n }\n const afdAId = tryGetAfdActivityIdFromHeaders(pcsResponse);\n logError(\"Verify PCS response for pcsData and bundleData for request url\", 43716, { fetchUrl, afdAId });\n return null;\n });\n // Race between PCS and a timeout based promise\n responseData = await Promise.race([pcsFetchPromise, timeoutPromise]);\n }\n catch (e) {\n if (timer) {\n clearTimeout(timer);\n }\n // This line of code sends app error only if prong2 page is visible when app type is prong2 app type.\n // If page is not visible in prong2 app type, don't send app error as that is a background refresh.\n const { appType, isCallFromWidgetsChanged } = dataWidgetAttributes || {};\n if (!(isProng2AppType(appType) && isCallFromWidgetsChanged)) {\n // If this is not prong2 app type, send this app error anyways.\n logError(\"Fetch failed for PCS url\", 43715, { originalUrl: fetchUrl, error: stringifyError(e, false) });\n }\n }\n // If response was null or respone was invalid, try get response from static fallback\n if (!validatePcsResponse(responseData)) {\n responseData = await getStaticFallbackPage(fetchUrl);\n }\n // RETRY! If response was still not valid, try getting from static fallback again as a last chance.\n // Make sure that user network is online before retrying.\n const online = (navigator && navigator.onLine) || true;\n if (online && !validatePcsResponse(responseData)) {\n responseData = await getStaticFallbackPage(fetchUrl, true);\n }\n return tryUpdatePcsResponse(responseData, dataWidgetAttributes.useCnDomain);\n});\n/**\n * Get static fall back page if PCS call is not successful\n * @param url - Widget Url\n * @param thisIsRetry - This is used to send different set of app errors\n * @returns StaticResponse\n */\nexport async function getStaticFallbackPage(url, thisIsRetry = false) {\n const { instance, staticsEnv } = dataWidgetAttributes && dataWidgetAttributes.staticsAttributes || {};\n const pageTimings = getPageTimings();\n pageTimings[pcsRetry] = (pageTimings[pcsRetry] || 0) + 1;\n if (instance) {\n url += `&instance=${instance}`;\n }\n if (staticsEnv) {\n url += `&staticsEnv=${staticsEnv}`;\n }\n const originalUrl = new URL(url);\n let staticUrl = url.replace(originalUrl.hostname, staticServerEndpoint);\n if (originalUrl.hostname.includes(\".cn\")) {\n staticUrl = url.replace(originalUrl.hostname, staticServerEndpointCnDomain);\n }\n // Set a 15-second timeout for Static call\n let timer;\n try {\n const timeoutPromise = new Promise((resolve) => {\n timer = setTimeout(() => {\n // Log an app error if Static Response timed out\n const [attempt, errorId] = thisIsRetry ? [\"second\", 52009] : [\"first\", 52006];\n logError(`PCS static Response timed out in ${attempt} attempt`, errorId, { originalUrl: url, staticUrl: staticUrl });\n resolve(null);\n }, timeoutInMs);\n });\n const staticFetchPromise = fetch(staticUrl, { credentials: \"include\" }).then(async (staticResponse) => {\n if (timer) {\n clearTimeout(timer);\n }\n const afdAId = tryGetAfdActivityIdFromHeaders(staticResponse);\n if (staticResponse.ok) {\n return await staticResponse.json();\n }\n else {\n // log error for not loading static page\n const [attempt, errorId] = thisIsRetry ? [\"second\", 52010] : [\"first\", 52004];\n logError(`Response not-ok in ${attempt} attempt to get PCS staticview`, errorId, { originalUrl: url, staticUrl: staticUrl, afdAId });\n return null;\n }\n });\n // Race between PCS and a timeout based promise\n const responeFromRace = await Promise.race([staticFetchPromise, timeoutPromise]);\n return responeFromRace;\n }\n catch (e) {\n if (timer) {\n clearTimeout(timer);\n }\n // log exception while loading static page\n const [attempt, errorId] = thisIsRetry ? [\"second\", 52011] : [\"first\", 52005];\n logError(`Exception in ${attempt} attempt to get PCS static response`, errorId, { error: stringifyError(e, false), originalUrl: url, staticUrl: staticUrl });\n return null;\n }\n}\n/**\n * Get PCS response from storage if it was stored in last 24 hours and if it is valid.\n * @param ignoreDuration - Ignore cache duration and return cached response\n * @returns PCS response from browser storage\n */\nexport async function getPcsResponseFromCache(ignoreDuration = false) {\n try {\n const key = getPcsResponseCacheKey();\n let pcsResponse = JSON.parse(localStorage.getItem(key));\n if (!pcsResponse && window.__bridgeSdk && window.__useCachedApp) {\n // try to get PCS from native storage\n const cachedResponseStr = await window.__bridgeSdk.promiseWithTimeout?.(window.__bridgeSdk.loadDataAsync?.({ key }), 500).then((res) => res ? JSON.parse(res).value : null);\n if (cachedResponseStr) {\n pcsResponse = JSON.parse(cachedResponseStr);\n }\n }\n const { appType } = dataWidgetAttributes || {};\n const storageTimestamp = pcsResponse && pcsResponse.storageTimestamp;\n const pcsUrlCached = pcsResponse && pcsResponse.pcsUrl;\n const currentPcsUrl = buildPcsFetchUrl();\n if (!pcsResponse) {\n // NOTE: JSON.parse(null|0|false) doesn't throw exception, so we need to check for falsy values explicitly\n logPcsNoCacheReason(\"Empty cache response\");\n }\n if (\n // for always cached app in offline mode, return valid cached response immediately without checking cache duration\n ((window.__useCachedApp && !navigator.onLine)\n // if PCS from network failed, return cached response immediately without checking cache duration\n || ignoreDuration)\n && pcsUrlCached === currentPcsUrl && validatePcsResponse(pcsResponse)) {\n return pcsResponse;\n }\n if (appType && appType === \"winWidgets\" /* AppType.WindowsNewsWidgets */) {\n if (dataWidgetAttributes.useCnDomain && shouldProng2PcsApiUseAkamaiEndpoint(pcsResponse)) {\n // if the PCS cache contains the PCS API Akamai migration flight, set pcs env to Akamai endpoint for the next PCS request\n dataWidgetAttributes.pcsEnvironment = \"assets\";\n }\n // Temporary remove the Prong2's cache for CRS spike experiment\n // Return after the akamai endpoint check\n return null;\n }\n const cacheDuration = window.__useCachedApp ? alwaysCachedAppPcsResponseCacheDuration : pwPcsResponseCacheDuration;\n const now = new Date().getTime();\n const isCacheStale = storageTimestamp ? (now - storageTimestamp) >= cacheDuration : true;\n if (!isCacheStale\n // Check if pcs cached url matches current pcs url\n && pcsUrlCached === currentPcsUrl\n // Validate cached response\n && validatePcsResponse(pcsResponse)) {\n return pcsResponse;\n }\n else {\n if (isCacheStale) {\n logPcsNoCacheReason(\"Cache is stale\");\n }\n else if (pcsUrlCached !== currentPcsUrl) {\n logPcsNoCacheReason(\"Cached PCS URL does not match current PCS URL\");\n }\n else {\n logPcsNoCacheReason(\"Cached PCS response is not valid\");\n }\n }\n }\n catch (e) {\n const msg = \"Error reading PCS response from local storage\";\n logPcsNoCacheReason(msg);\n logError(msg, 52007, { error: stringifyError(e, true) });\n }\n return null;\n}\n/**\n * log reason for not caching PCS response in LoadTime Telemetry for debugging\n * @param reason Reason for not caching PCS response\n */\nfunction logPcsNoCacheReason(reason) {\n const pageTimings = getPageTimings();\n if (!pageTimings[pcsNoCacheReason]) {\n pageTimings[pcsNoCacheReason] = reason;\n }\n}\n/**\n * This handler will enable us to call PCS API later point in time and write response to local storage.\n */\nfunction setHandlerToWritePcsResponseToCache() {\n window._pw_cachePcsResponse = async () => {\n try {\n const pcsResponse = await tryGetPcsResponseFromNetwork();\n updateCache(pcsResponse);\n }\n catch (e) {\n logError(\"Error writing PCS response to local storage\", 52008, { error: stringifyError(e, true) });\n }\n };\n}\n/**\n * For always cached app, we want to make sure that the PCS flight info and bundle info is matching with the GitConfig. So we will use a App cache manager to manage the cache flow.\n */\nfunction setTryGetPcsResponseFromNetworkForFutureCaching() {\n // immediately update the cache for next time asynchronously, then resolve the\n const getResponseFromNetworkPromise = new Promise((resolve) => {\n tryGetPcsResponseFromNetwork().then((response) => {\n updateCache(response);\n resolve(response);\n });\n });\n window._pw_tryGetPcsResponseFromNetwork = getResponseFromNetworkPromise;\n}\n/**\n * a helper function to update cache\n * @param pcsResponse response object to be stored in cache\n */\nfunction updateCache(pcsResponse) {\n if (pcsResponse) {\n pcsResponse.storageTimestamp = new Date().getTime();\n pcsResponse.pcsUrl = buildPcsFetchUrl();\n const key = getPcsResponseCacheKey();\n localStorage.setItem(key, JSON.stringify(pcsResponse));\n if (window.__bridgeSdk && window.__useCachedApp) {\n // update cache in native storage\n window.__bridgeSdk.saveDataAsync?.({ key, value: JSON.stringify(pcsResponse) }).catch((e) => {\n logError(\"Error writing PCS response to native storage\", 52008, { error: stringifyError(e, true) });\n });\n }\n }\n else {\n logError(\"PCS response was null\", 52008, {});\n }\n}\n/**\n * Clear PCS response from browser storage\n */\nexport function clearPcsCache() {\n // for always cached app, never clear the cache, we only update the cache when we get the new PCS response.\n // this is to make sure the app works in offline mode.\n if (window.__useCachedApp) {\n return;\n }\n localStorage.removeItem(getPcsResponseCacheKey());\n}\n/**\n * Check if PCS response is valid\n * @param PCS response\n * @returns true if response is valid, false otherwise\n */\nfunction validatePcsResponse(response) {\n return response\n && response.pcsData\n && response.pcsData.info\n && response.pcsData.clientSettings\n && response.bundleData\n && response.bundleData.bootstrappingRefs;\n}\n/**\n * Update response per business logic\n */\nfunction tryUpdatePcsResponse(response, useCnDomain) {\n if (!validatePcsResponse(response)) {\n return null;\n }\n // PCS currently does not send this property, so we need to use the host page provided value to set it\n // Add useCnDomain in client settings so all subsequent endpoints will be switched to use .cn instead of .com\n response.pcsData.clientSettings.useCnDomain = useCnDomain;\n // Add widget attribute on client settings so bundles can read required properties\n response.pcsData.clientSettings.widgetAttributes = dataWidgetAttributes;\n return response;\n}\n/**\n * Get PCS response cache key from Constant, AppType and PageType\n * @returns Cache Key\n */\nfunction getPcsResponseCacheKey() {\n if (!dataWidgetAttributes) {\n return \"\";\n }\n const { appType, cm, pageType } = dataWidgetAttributes;\n return `${pwPcsResponseCacheKey}_${appType}_${pageType}_${cm}`;\n}\n/**\n * Build PCS fetch url from DataWidgetAttributes\n * @returns PCS fetch url\n */\nfunction buildPcsFetchUrl() {\n if (!dataWidgetAttributes) {\n return \"\";\n }\n const { appType, useCnDomain, pageType, pcsEnvironment = \"www\", pcsAdditionalQsp } = dataWidgetAttributes;\n const isMarketSelectorEnabled = getLocalStorage().getItem(\"Prong2MarketSelectorEnabled\");\n const pcsUrl = getLocalStorage().getItem(\"Prong2PcsUrl\");\n if (isMarketSelectorEnabled === \"1\" && pcsUrl && pcsUrl.includes(\"/pcs/api/widget/\")) {\n // PCS url in 1S response contains locale and region query params, so we need to remove them\n return `${pcsUrl}${pcsAdditionalQsp ? `&${pcsAdditionalQsp.split(\"&\").filter(param => !param.startsWith(\"locale=\") && !param.startsWith(\"region=\")).join(\"&\")}` : \"\"}`;\n }\n return `https://${pcsEnvironment}.msn.${useCnDomain ? \"cn\" : \"com\"}/pcs/api/widget/${appType}/${pageType || \"\"}${pcsAdditionalQsp ? `?${pcsAdditionalQsp}` : \"\"}`;\n}\n/**\n * Return AFD provided activity id from response header.\n * @param response from server\n * @returns AFD activity id\n */\nfunction tryGetAfdActivityIdFromHeaders(response) {\n if (!response || !response.headers) {\n return \"\";\n }\n // Return string sequence representing the values of the retrieved header or null if this header is not set.\n // This doesn't throw error if not found.\n return response.headers.get(\"x-msedge-ref\") || \"\";\n}\n/**\n * TO BE USED FOR UNIT TESTING ONLY\n */\nexport function setLocalVariables(attributes) {\n if (attributes) {\n dataWidgetAttributes = attributes;\n }\n tryGetPcsResponseFromNetwork.cache.clear();\n}\n/**\n * Clear memoize cache.\n */\nexport function clearNetworkCachedResponse() {\n if (tryGetPcsResponseFromNetwork) {\n tryGetPcsResponseFromNetwork.cache.clear();\n }\n}\n//# sourceMappingURL=GetPcsResponse.js.map","// © Microsoft Corporation. All rights reserved.\n/**\n * A functionally limited, but lite implementation of lodash memoize helper\n * to help memoize the value of an argumentless function.\n */\nexport function memoizeLite(fn) {\n let cachedValue;\n let invokedOnce = false;\n const memoizedFn = function () {\n if (!invokedOnce) {\n invokedOnce = true;\n cachedValue = fn();\n }\n return cachedValue;\n };\n // helper to clear memoization cache value\n memoizedFn.cache = {\n clear: () => {\n invokedOnce = false;\n cachedValue = undefined;\n }\n };\n return memoizedFn;\n}\n//# sourceMappingURL=LodashLiteInline.js.map","// © Microsoft Corporation. All rights reserved.\nimport { CrsV31Endpoint, CrsV3Endpoint, Prong2ManualPcsCacheTreatmentId, Prong2PcsApiUseAkamaiEndpoint, Prong2PcsDurationTreatmentId, RemoveCrsFDHeadTreatment } from \"@msnews/experiences-constants\";\n/**\n * Remove the prefix and suffix of flightInfo and generate a flight list for prong 2.\n * @param flightInfo sample: \"f:prg-sp-liveapi,cprg-c-ads-dl;\"\n * @returns flight string list\n */\nexport function getProng2FlightList(flightInfo) {\n if (flightInfo.startsWith(\"f:\")) {\n flightInfo = flightInfo.substring(2);\n }\n if (flightInfo.endsWith(\";\")) {\n flightInfo = flightInfo.substring(0, flightInfo.length - 1);\n }\n return flightInfo.split(\",\");\n}\n/**\n * Check if Git configs should be used\n * @param {string} version - CRS version. Example: v2 or v3 (case sensitive)\n * @param {string} configIndexDocId. Example: cms/api/amp/experienceConfigIndex/BBUsYQa\n * @param {string} apptype. Example: edgeChromium\n * @returns true if git configs are supported\n */\nexport function shouldUseGitConfigs(version, configIndexDocId, apptype) {\n // If app type is not defined or empty, do not use Git configs.\n // For local dev scenarion of individual experiences running in standalone, app type is blank.\n // Also app type is MUST param in Git configs, if app type is not present, we do not want to attempt Git configs too in prod.\n // If version is not present or it is not v3 and or v3.1, do not support Git configs\n if (!apptype || !version || (version < CrsV3Endpoint)) {\n return false;\n }\n // Return true if this does not have configIndexDocId\n return !configIndexDocId;\n}\n/**\n * Checks if flight exist (prg-crs31) if it does out new crs version will point to V3.1,\n * otherwise we will point to the value that is in PCS head data. (Service endpoints).\n * @param version CRS Version from PCS head data\n * @param flights flights from current request.\n * @returns version of crs to be used. (V3 or V3.1) V3.1 will be flight based.\n */\nexport function tryGetCrsVersion(version, flights, appType) {\n try {\n // Excluding weather and fiance app types from this flight b/c they are SSR enabled, therefore not going to afd\n // when making the crs request, which is necessary for this flight.\n return version &&\n flights &&\n flights.includes(RemoveCrsFDHeadTreatment) &&\n (appType !== \"weather\" /* AppType.Weather */ && appType !== \"finance\" /* AppType.Finance */) ? CrsV31Endpoint : version;\n }\n catch (error) {\n // flights is not an array\n }\n return version;\n}\n/**\n * Determine if 1S request should use fdhead QSP.\n */\nexport function shouldOneServiceUseFdheadQsp(replaceOneServiceQspOverrides, isNtpSsr = false) {\n const { itemOverrides } = replaceOneServiceQspOverrides || {};\n // Check override QSP. Example: item=should1sUseFdheadQsp:true or item=should1sUseFdheadQsp:false\n const itemQsp = itemOverrides && itemOverrides.find(item => item.key === \"should1sUseFdheadQsp\");\n if (itemQsp && itemQsp.value) {\n return itemQsp.value === \"true\";\n }\n // NTP SSR do not use fdhead QSP.\n if (isNtpSsr) {\n return false;\n }\n // Debug/test flags\n const qspFlights = itemOverrides && itemOverrides.find(item => item.key === \"flights\" || item.key.toLowerCase() === \"appendflights\");\n if (qspFlights && qspFlights.value && qspFlights.value.length > 0) {\n return true;\n }\n // Default\n return false;\n}\nfunction hasFlightInPcsResponse(pcsResponse, targetFlight) {\n const flightInfo = pcsResponse?.pcsData?.info || \"\";\n const flights = flightInfo.substring(2, flightInfo.length - 1).split(\",\");\n return flights.includes(targetFlight);\n}\n/**\n * Determine which PCS cache duration to use for Prong2.\n */\nexport function shouldDisableProng2CustomPcsCacheDuration(pcsResponse) {\n // If the flight is present, do not use the custom cache duration.\n return hasFlightInPcsResponse(pcsResponse, Prong2PcsDurationTreatmentId);\n}\n/**\n * Determine if Prong2 timeout PCS cache should be disabled.\n */\nexport function shouldDisableProng2TimeoutPcsCache(flights) {\n return !!(flights && flights.includes(Prong2ManualPcsCacheTreatmentId));\n}\n/**\n * Determine if we should only check Prong2 flights.\n * @param appType appType\n * @returns\n */\nexport function shouldOnlyCheckProng2Flights(appType) {\n return appType === \"winWidgets\" /* AppType.WindowsNewsWidgets */;\n}\n/**\n * Determine whether PCS requst should use Akamai endpoint\n */\nexport function shouldProng2PcsApiUseAkamaiEndpoint(pcsResponse) {\n return hasFlightInPcsResponse(pcsResponse, Prong2PcsApiUseAkamaiEndpoint);\n}\n//# sourceMappingURL=FlightHelpers.js.map","// © Microsoft Corporation. All rights reserved.\nimport * as inlineHeadCommon from \"@msnews/inline-head-common\";\nimport { CustomEventPayloadStage, CustomWidgetErrorEvent, dispatchCustomEvent } from \"./ErrorDispatcher\";\nimport { coreBundleClassName, headTagDataInfoAttribute, headTagtCanvasInfo, headTagtClientSettingAttribute, widgetGroupClassName, widgetSettingsClassName } from \"@msnews/experiences-constants\";\nimport { isOneTrustScriptData, setOneTrustScript } from \"./SetOneTrustScript\";\nimport { setLoggingMetadata, verifyJSLoading } from \"./ErrorLogging\";\nimport { addLoadingIcon } from \"./LoadingIcon\";\nimport { createScriptTag } from \"@msnews/isomorphic-util\";\nimport { getDataWidgetAttributes } from \"./GetDataWidgetAttributes\";\nimport { clearPcsCache, getPcsResponse } from \"./GetPcsResponse\";\nimport { shouldRenderWidgets } from \"./Utilities\";\nimport { getPageTimings } from \"./AddMarkerToPageTimings\";\n/**\n * Widget Initializer routine.\n * This file is not used by any code in the msnews-experinces repo.\n * This script is expected to run on non-Peregrine pages as a standalone script and help include Peregrine experiences.\n * 1. This script expects following div in the DOM.\n
\",\"pageType\":\"\",\"cm\":\"\",\"pcsAdditionalQsp\":\"\"}\">
\n * 2. This script should read the div and call PCS with above appType, pageType, cm (optional) and pcsAdditionalQsp (optional)\n * 3. Add info and clientSettings obtained from PCS response to the DOM.\n * 4. Start downloading Peregrine core bundles.\n * @param options - \"string\" for backwards compatibility to support logging telemetry join id.\n * WidgetInitializerOptions should be used going forward with a predefined contract.\n * This options are added to global object __pw_options for Peregrine bundles to consume.\n */\nexport async function startWidgetInitializer(options) {\n // Return if host page browser isn't supported.\n if (!shouldRenderWidgets()) {\n return;\n }\n // wait until network is online before trying to make network calls\n // NOTE: cacheable widget app works offline, so we don't need to wait for network to be online\n if (!window.__useCachedApp && navigator && navigator.onLine === false) {\n const waitForNetwork = new Promise(resolve => {\n window.addEventListener(\"online\", () => resolve(), { once: true });\n });\n await waitForNetwork;\n }\n // Only call PCS if the bundle