{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/diagnostics/src/AppError/AppErrorTracker.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/core/src/app/AppEnvironment.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/node_modules/@msnews/ssr-server/dist/interop/RequestData.js","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/isomorphic-util/src/SSRInteropContractHelpers.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/isomorphic-util/src/SSRInteropContract.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/core/src/request/RequestContext.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/render-cache/src/Constants.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/core/src/utilities/SingletonResetManager.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/wpo-common/src/WpoHelper.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/diagnostics/src/AppError/AppErrors.ts","webpack:///./src/startup/Startup.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/core/src/utilities/UrlUtility.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/experiences-constants/src/AppTypes.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/isomorphic-util/src/requestData.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/experiences-redux/src/constants/ConnectorConstants.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/core/src/webstorage/LocalStorage.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/core/src/webstorage/WebStorage.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/core/src/utilities/Parsing.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/render-cache/src/Helper.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/isomorphic-util/src/DOMHelpersCore.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/diagnostics/src/logging/Logger.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/core/src/utilities/Utility.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/experiences-constants/src/PageTypes.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/core/src/app/Market.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/telemetry-contracts/src/telemetry-statics/Telemetry.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/experiences-redux/src/pages/index.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/core/src/app/HeadData.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/core/src/utilities/CookieUtility.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/experiences-redux/src/reducers/DynamicReducer.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/experiences-redux/src/pages/PageHelper.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/experiences-redux/src/pages/PageBase.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/diagnostics/src/performance/PageTimings.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/core/src/constants/Constants.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/core/src/app/Environment.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/render-cache/src/PersistRenderCache.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/page-error-handling/src/PageSettings.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/page-error-handling/src/ErrorLogger.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/isomorphic-util/src/DOMHelpers.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/experiences-constants/src/AuthCookieNames.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/experiences-redux/src/reducers/DataConnectorInjector.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/diagnostics/src/performance/PerfMarker.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/diagnostics/src/logging/LiteLogger.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/diagnostics/src/logging/Util.ts","webpack:///C:/agents/peregrineAgent_selfhostw0001GE_a0/_work/1/s/libs/core/src/app/HostPage.ts"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","466","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","Severity","AppEnvironment","_serviceUrl","_configServiceUrlBase","this","initializeAppEnvironment","wpoData","addWpoFlights","activityId","ClientSettings","aid","url","URL","environmentConfigUrl","process","env","WEBPACK_DEV_SERVER","URLSearchParams","searchParams","set","searchParam","contentServiceUrlBase","currentRequestTargetScope","currentMarket","environment","serviceDomain","hostPage","appType","authCookieName","useOneServiceAuthEndpoints","accountInfoPromise","resolvedAccountInfo","buildVersion","clarityEnabled","rootTelemetryId","trackInfo","getUserMuid","userId","isDebug","showMnsCreatorDashboard","currentContentLinkHost","serviceUrlBase","feedServiceUrlBase","enterpriseServiceDomainUrl","isFrePage","disableCachingConfigs","enableConfigService","EnableCMSPPEConfigs","isMultiConfigRetrievalEnabled","disableContentPreviewCache","sendFeedCallActivityIdInHeader","queryParamOverride","getQueryParameterByName","disableContentCacheIDBRead","configServiceBaseUrl","featureFlags","configRootUrl","cacheBustingIdentifier","countryCode","toLowerCase","latitude","longitude","serviceUrl","configServiceUrlBase","_instance","appEnvironment","environmentFromHeadData","clientSettings","tryReformatGuid","Locale","apps_locale","geo_country","geo_lat","geo_long","pcsInfo","setAccountInfoPromise","apptype","getAuthCookieName","disableActivityIdInHeader","Edge","Hub","cbid","pcsVersion","propertyBagPcsVersion","v","bundleInfo","buildAlias","alias","rootElement","locationHref","locationOrigin","envQSOverwrite","prod","servicesEndpoints","serviceDomainUrl","feedService","domain","endsWith","host","enterpriseFeedService","getAttribute","undefined","getHostPageFromUrl","Number","trackPageProd","trackPageTypeVal","sitePage","page_product","page_type","createContentLinkHost","setTargetScope","useMultiConfigsRetrieval","baseUrl","getConfigServiceBaseUrl","1","true","indexOf","muid","muidCookie","relativePath","int","urlQuery","param","toLocaleLowerCase","Windows","pagetype","Anon","AppAnon","FirstParty","MicrosoftNews","Views","Weather","Finance","EdgeChromium","MMX","Office","ResolvedAccountInfo","AccountInfoPromise","Promise","resolve","chrome","authPrivate","getPrimaryAccountInfo","startTime","Math","round","performance","now","accountInfo","endTime","ZHCN","guid","matches","match","join","audienceMode","Kids","Adult","browser","deviceFormFactor","locale","os","platform","Web","pageType","stringHasData","split","language","market","CurrentFlights","pageExperiments","model","FeatureFlags","wpoEnabled","WPOModel","getWpoModel","flightsCached","currentPageExperiments","concat","getAppEnvironment","getInstance","resetInstance","RequestData","spec","qspPrefix","memo","objectFromSpecification","values","requestDataValue","clientValue","keys","reduce","pv","cv","assign","qsp","ver","forEach","qp","startsWith","verParam","current","newValue","JSON","parse","ex","params","recurse","obj","prefix","k","currentPrefix","append","stringify","sort","getURLSearchParams","toString","DefaultSize2ColumnWidth","DefaultSize3ColumnWidth","DefaultSize4ColumnWidth","SSRContract","innerWidth","innerHeight","breakpoint","locationHash","location","hash","href","locationHost","locationHostName","hostname","origin","locationPathName","pathname","locationProtocol","protocol","locationSearch","search","canUseCssGrid","CSS","supports","devicePixelRatio","document","documentElement","lang","direction","dir","requestId","requestData","loadQueryParams","RequestId","app","ActivityId","getContextData","dataGetter","dataName","throwException","Error","defaultExpirationTimeMs","defaultForceExpirationTimeMs","expirationPrefix","forceTimestampPrefix","jssMapSuffix","keysPrefix","normalizedUrlConfigkey","storagePrefix","riverRcClassName","resetCallbacks","registerResetCallback","callback","getWpoFlights","treatments","map","item","id","severity","Alert","pb","build","BUILD_NUMBER","updateAppErrorsPropertyBag","newPbInfo","getAppErrorsPropertyBag","RENDER","ssrEnvironment","ssrState","SSR","createError","baseError","message","customMessage","NoAlert","OneServiceCardProviderAppErrors","EmptyMyFeed","source","OneServiceResponseWasNullOrErroneous","ErrorFetchingOneServiceResponse","HighImpact","InvalidJsonInOneServiceResponse","InvalidFeedListInOneServiceResponse","RiverConfigurationIssue","QueryInterestContentFetchError","StaticContentLoaded","ContentPreviewAppErrors","ErrorWhileFetchingContentPreviewContent","InvalidResponseFromContentPreviewFetch","InvalidResponseFromContentPreviewResponseJson","ErrorWhileInitializingAsyncContentPreviewContent","InvalidOrMissingContentId","MissingDataForExternalContent","MissingPartnerLink","RiverSourceFile","RiverAppErrors","UnknownMetadataReceivedFromRiverCardProvider","RiverContentProviderFetchException","SkipPositionedCardsFallbackStrategyFailed","InvalidConfig","MissingExperienceTypeMap","ChildLoadError","InitialDataLoadError","DuplicateInstanceIdWarning","FullHeightFallbackStrategyFailed","UserInitiatedPageRefreshErrors","Default","SportsCardError","SportsLeaguePdpFetchError","SportsLeaguePdpInvalidResponse","SportsPlayersPdpFetchError","SportsPlayersPdpInvalidResponse","SportsTeamsPdpFetchError","SportsTeamsPdpInvalidResponse","SportsCardConfigFetchError","SportsCardGetFavoriteTeamDataError","SportsCardGetPlayerBioError","SportsCardGetLeaguesGamesArrayError","SportsCardGetPdpDataFailure","SportsCardGetLeagueSeasonYearDataFailure","SportsCardGetLocalizedTeamNameDataFailure","SportsCardGetTeamDataFailure","SportsCardGetLeagueDataFailure","MoneyCardError","MoneyQuoteSummaryGetError","MoneyQuoteSummariesGetError","MoneyPdpDataGetErrorFromService","MoneyPdpInvalidResponseFromService","MoneyQuoteSummaryGetErrorFromService","MoneyQuoteSummaryInvalidResponseFromService","TrendingNewsErrors","DataFetchError","BackupDataFetchError","GridSectionAppErrors","GridSectionCardGenerationError","MeControlAppErrors","SSOFailedError","MeControlLoadFailedError","PageClickTrackerErrors","InvalidResponse","FetchFailure","CoachmarkAppErrors","GeneralError","NotPlaceable","NotFoundComponent","CoachmarkDataConnectorUndefined","InvalidCTAType","CTATypeNotDefined","ConfigDataUndefined","FailedToFetchConfigData","ExceptionFetchingConfigData","EventNotDefined","CoachmarkStateNotDefined","CoachmarkDataAppErrors","InvalidCoachmarkMessage","IrisDataConnectorUndefined","ErrorFoundForSurface","TelemetryInfoUndefined","EventTypeUndefined","IrisActionUndefined","SpotlightPreviewAppErrors","ErrorWhileFetchingSpotlightPreviewCardInfo","NoServiceContextMetadata","SpotlightErrors","UnknownError","ContentFetchError","PartnerFetchFail","CardActionErrors","CardActionBaseExperienceError","CardActionPostActionError","CardActionDeleteActionError","CardActionGetActionError","CookieRelatedErrors","SharedStateConnectorNull","CookieNotCategorized","OverlayErrors","LoadExperienceError","ViewsCommonAppErrors","InvalidIntraArticleDataError","InvalidDocumentContentError","ViewsPaddleDataLoadError","ViewsErrorPage","ProviderMapperError","ContentActionsToolbarAppErrors","ContentActionsSharingToolbarLoadError","ContentActionsArticleDatafetchError","ContentActionsBaseExperienceError","ContentActionsGetDocumentDataError","ContentActionsGetContentStatusActionError","ContentActionsDeleteActionError","ContentActionsPostActionError","ContentActionsExperienceLoadError","ContentActionsFlipToolbarError","ContentActionsContentStatusFetchError","ContentActionsContentPreviewFetchError","ContentSharingToolbarAppErrors","ContentSharingToolbarInitializationError","ContentProviderAppErrors","InvalidSourceIdError","ProviderDetailsFetchError","ProviderFeedFetchError","InvalidLayoutTemplate","ViewsGalleryAppErrors","InvalidGalleryIdError","GalleryDataLoadError","GalleryImagesLoadError","VideoListAppErrors","VideoListDataLoadError","ViewsArticleAppErrors","InvalidArticleIdError","ArticleDataLoadError","IntraArticleComponentLoadError","InlineGalleryInvokeError","InterestsSearchAppErrors","ErrorResponseFromOneService","ErrorResponseFromOneServiceIsInvalid","InvalidUrlFoundForElement","SelectedItemNotFoundInSuggestions","SelectedItemIsInvalid","InterestsAppErrors","InterestsRetrieveTopicsError","InterestsRetrieveFollowedTopicsError","InterestsRetrieveMutedPublishersError","InterestsUnMutePublisherError","InterestsFollowTopicError","InterestsUnfollowTopicError","InterestsTopicStateUndefined","InterestsShouldHaveRendered","InterestsRetrieveTopicError","InterestsRetrieveSavedStoriesError","InterestsSavedStoriesInvalidConfigError","InterestsSavedStoriesChildLoadError","InterestsSavedStoriesInvalidJsonError","InterestsSavedStoriesInvalidListError","InterestsRetrieveRecommendedTopicsError","UndefinedTopicDataConnector","InterestsRetrieveReadStoriesError","InterestsReadStoriesInvalidConfigError","InterestsReadStoriesChildLoadError","InterestsReadStoriesInvalidJsonError","InterestsReadStoriesInvalidListError","FailedRestoringDefaultTopicsError","TopicsFailedIndexedDBConnection","TopicsFailedGettingIndexedDB","TopicsFailedUpdatingIndexedDB","TopicsFailedCheckingLimitedFeed","ComponentConnector","ComponentConnectorAppErrors","DuplicateChildInstanceFound","BundleLoadError","ChildConfigInfoListNull","ListStartPositionInvalid","ChildDelayLoadError","ExperienceDependencyTimeout","LoadDataConnectorConfigFailed","LoadDataConnectorFailed","ChildWithInvalidExperience","ExperienceLoaderAppErrors","InsufficientLoadArgs","ConnectComponentFailureError","LoadComponentFailureError","SearchError","MissingFormCode","RecommendedSearchErrors","ResponseParsingFailed","InvalidJsonResponse","ServiceCallFailed","RenderFailed","Timeout","PollsCardAppErrors","Critical","PollsListFetchError","PollDataFetchError","PollsCardInvalidPoll","PollsCardInvalidQuizPoll","PollsCardVoteError","PollsCardMapStateToPropsError","PollsUnknownError","PollsResultPercentageError","PollAutoCuratedErrors","PollAutoCuratedContentError","PollAutoCuratedInvalid","PollAutoCuratedResultsFetchError","PollAutoCuratedResultsTransformError","MonetizationAppErrors","PlacementManagerLoadError","ArrangementPositionLoadError","GetCMSContentError","GetSAMRTBResponseError","MediaNetEOABError","InvalidPromoModuleConfig","CookieSyncDownloadExternalScriptError","CookieSyncMissingExternalScriptUrl","CookieSyncTimeout","CookieSyncPartnerScriptError","CookieSyncPixelPartnerDownloadError","CMSOrBackfillNativeAdLoadError","MissingRequiredPropertyPlacementManagerConfig","NativeAdTargetScopeError","RiverVideoAdPartnerError","JsTrackerPartnerScriptLoadError","ViglinkError","MissingTopicId","TopicIdNotFound","GetSAMRTBResponseErrorNoAlert","DisplayAdsOathLoadError","DisplayAdsApnLoadError","DisplayAdsApnEmptyProvider","DisplayAdsAdsDetectionNotInit","DisplayAdsMoatLoadError","DisplayAdsNoAdObjects","DisplayAdsProviderIdEncode","TaboolaRiverAppErrors","TaboolaRiverFetchError","CoreLibAppErrors","DeprecatedCompositionLayoutUsed","InvalidColumnInGridConfig","ErrorLoadingBundle","GenericJSException","LocalStorageDoesntExist","SessionStorageDoesntExist","ReactRenderException","ResolverAppErrors","IndexedDbWriteFailed","IndexedDbReadFailed","CrsFetchError","ReceivedConfigFromCdnAsCrsFetchFailed","GetConfigException","IndexedDbBulkReadFailed","IndexedDbFailedToRemoveCachedConfig","IndexedDbFailedToClearAllCachedConfigs","RenderCachePurgedDueToChangesInConfig","FailedToPurgeRenderCache","RefreshConfigCacheFailed","IndexedDbInitFailed","DifferentCbid","PrgFlightLsWriteError","PrgFlightLsReadError","ResolverErrorConfigsDownloadedByCdn","CachedConfigsForDifferentFlight","ConfigCrsFetchNon200Response","ConfigCdnFetchNon200Response","BingCardsAppErrors","BingCardGetHotelAnswersError","BingCardGetHotelErrorFromService","BingCardGetAnswersError","BingCardInvalidEntityType","BingCardErrorOut","BingAnswersAppErrors","FailedToLoadData","NoCardsContentType","NoCardsRelated","BingShoppingLifestyleCardError","LifestyleShopCardServiceFetchError","LifestyleShopCardServiceFetchInvalidResponse","LifestyleShopCardServiceEmptyResponse","LifestyleShopCardServiceInvalidResponse","LifestyleShopCardCdnServiceFetchError","LifestyleShopCardCdnServiceFetchInvalidResponse","LifestyleShopCardCdnServiceInvalidResponse","LifestyleShopAutosuggestServiceFetchError","LifestyleShopAutosuggestServiceFetchInvalidResponse","LifestyleShopAutosuggestServiceEmptyResponse","LifestyleShopAutosuggestServiceInvalidResponse","LifestyleShopAutosuggestInvalidSuggestionUrl","BingMiniShoppingServiceClientSourceFile","BingMiniShoppingError","BingMiniShoppingServiceFetchError","BingMiniShoppingServiceEmptyResponse","BingMiniShoppingServiceInvalidResponse","BingMiniShoppingServiceInsufficientDealsItems","BingMiniShoppingServiceInsufficientActiveDealsItems","BingMiniShoppingServiceInsufficientTrendingItems","BingMiniShoppingServiceInsufficientTrendingCategories","BingShoppingMeStripeServiceFetchError","BingShoppingMeStripeServiceEmptyResponse","BingShoppingMeStripeServiceInvalidResponse","BingShoppingMeStripeServiceMissingRequiredFields","ShoppingCarouselEntitiesDataServiceFetchError","ShoppingCarouselEntitiesDataServiceEmptyResponse","ShoppingCarouselEntitiesDataServiceInvalidResponse","ShoppingCarouselEntitiesDataServiceInsufficientItems","ShoppingCarouselGenericError","ShoppingCarouselRenderError","ShoppingContentCardServiceFetchError","ShoppingContentCardServiceEmptyResponse","ShoppingContentServiceInvalidData","ShoppingContentServiceInsufficientActiveItems","ShoppingContentServiceMissingFields","OneServiceContentDataConnector","FailedToUpdateBypassValueConnectorNotInitialized","FailedToGetBypassValueConnectorNotInitialized","NotificationBellErrors","JsonParseError","NewsItemDataFetchError","MalformedNewsItemResponseError","ElectionResultMapConnectorErrors","ElectionResultMapInspectorErrors","EmptyResultSummaryError","ElectionResultMapErrors","FetchAndUpdateElectionDataError","ElectionDelegateCounterErrors","TopicByNameFetchFailed","RecommendedTopicsErrors","TopicsDataConnectorFailed","InvalidTopicClick","WebWorkerErrors","FileNotFound","RuntimeError","MessageTimeout","HandledError","WindowsShellInvalidShellContentResponse","WindowsShellInvalidContentResponse","SSRAppErrors","UntrackedClick","FragmentFetchFailed","DidUseBrowserCacheAPIError","DidUseBrowserCachePolyfillResponseHeaderInvalid","ServerCacheFetchFailed","ConnectorMapInvalid","FetchSSRPageFailed","FetchSSRPageFailedFromInvalidWindowInnerWidth","ServerCacheRefreshFailed","AppError_InvalidQParams_35001","AppError_ArcResponseNotOk_35003","AppError_ArcResponseUnparsable_35004","AppError_UnknownIrisErrorFound_35006","AppError_TimeoutIrisErrorFound_35007","AppError_TemplateIrisErrorFound_35008","AppError_ClientErrorIrisErrorFound_35009","AppError_DSourceIrisErrorFound_35010","AppError_ActionResponseFailure_35013","AppError_UncaughtErrorDetected_35014","AppError_UnconvertableCreative_35015","AppError_InvalidResponseFormat_35016","AppError_TimeoutErrorDiscovered_35017","AppError_UnparsableSingleResponseJSON_35018","SubscriberNotFound","CreativeCountNegativeOrZero","MissingIrisParameterForConditionalBanner","SubscriberNotFoundInIrisPlacementDictionary","FailedToReadNurturingAcceptedFlag","EdgeChromiumAPIsNotAvailable","AcquireAccessTokenFailed","AcquireAccessTokenHandledFailure","RenderCacheErrors","JssStyleMismatchWarning","JssStyleCriticalMismatchError","PreloadReportingMessages","TtvrMissing","TfprMissing","TtvrSearchBoxMissing","TtfSearchBoxMissing","PushNotificationsLibErrors","FetchKeyError","SubscribeUnsubscribeError","ContentTruncationErrors","OverTruncationError","EmptyFeedWithFeedId","EmptySearchedFeedWithFeedId","EmptySearchedFeedWithFeedQuery","EmptyKidsModeFeed","FallingBackToSkipStrategy","FallingBackToFullHeightStrategy","SocialNoModuleName","SocialExperienceReducerIncorrectArgumentError","SocialAPIRequestErrorUnknown","SocialAPIRequestErrorContents","SocialAPIRequestErrorComments","SocialAPIRequestErrorUsers","SocialExperienceRenderErrorComment","SocialExperienceRenderErrorProfilePage","SocialExperienceRenderErrorProfileCard","SocialExperienceRenderErrorProfileTabs","SocialExperienceRenderErrorSocialBar","SocialExperienceRenderErrorReactionBreakdown","SocialExperienceRenderErrorGuideline","SocialExperienceRenderErrorMultilineLogin","SocialExperienceRenderErrorNotificationTray","SocialExperienceRenderErrorOnboarding","SocialExperienceRenderErrorOnbardingThirdParty","SocialExperienceRenderErrorUnknownComponent","UnknownBulkLoadGraphActionType","WindowsCardProviderResponseWasNullOrErroneous","WindowsCardProviderErrorFetchingData","CommonHeaderNavigationFailed","CommonHeaderInvalidConfig","CommonHeaderMissingFormCode","CommonHeaderRenderError","NtpSettingsPrivateNotAvailable","FailedToSaveToNtpPrivatePreference","FailedToReadNtpPrivatePreference","AppPinningPrivateException","start","UrlUtility","primeForbiddenCharacters","getParamsFromUrl","decodeComponents","getParams","decodeURIComponentWithPlusSign","val","replace","decodeURIComponent","queryString","substring","queryArray","ndx","parts","queryKey","queryValue","newParam","existingParam","entry","encodeURIComponentForPrime","uriComponent","encodeURIComponent","getParamsWithItems","queryItems","findIndex","hrefParamsObj","paramsObj","paramArray","keyValuePair","getParamsObj","isValidUrl","validateScheme","keyValueArrayToQueryString","filter","kv","isKeyValuePair","joinSubpathToURL","subPath","trimmedEndSlashFromHref","trimmedStartSlashFromSubpath","updateSearchParam","appendSearchParam","fallback","getAbsoluteUrl","partialUrl","AppType","cookie","referer","global","resetRequestData","getRequestData","ConnectorConstants","connectorStateKey","renderAction","dataConnectorMergeInitAction","localStorage","storage","supported","getItem","defaultValue","parsedObj","index","setItem","removeItem","e","logError","matchingKeys","storageKey","includes","super","tryParseJson","jsonString","tryParseInt","parseInt","isNaN","tryStringifyJson","jsonObj","renderCacheObject","windowAvailable","batchCSS","batchCss","styles","getElementsByTagName","dataset","jss","innerHTML","scrapeDom","includeNewsFeed","root","getElementById","rivers","getElementsByClassName","river","outerHTML","getStateFromRenderCache","renderCache","getStorage","renderCacheKeys","renderCacheStoredKeys","renderCacheKeyOfNormalizedKeys","error","keyn","expn","frcn","jssn","cacheExpirationTimestamp","parsedCacheExpirationTimestamp","Date","getTime","renderCacheStorage","dom","batch_css","getRenderCache","state","initialState","reduxStoreStringifyReviver","getNormalizedLocationHref","configParamsList","normalizeKeyParamsList","normalizeUrlQsp","getNormalizeKeyParamsList","normalizedParams","setNormalizeKeyParamsList","dataType","Map","canUseDOM","createElement","logger","Utility","isNotNullOrUndefined","isDefined","potentialKeyValuePair","isKey","isValue","isNonNullObject","isNotNull","isNullOrWhiteSpace","trim","toNumber","arrayHasData","constructor","Array","objectToString","firstRun","attribute","removeHyphens","input","PageType","AudienceModeType","Market","Telemetry","HeadData","clientData","enableCMSPPEConfigs","initializeHeadData","marketDir","currentFlights","userIsSignedIn","isPreload","isPrerender","isAppcache","isEnterprise","isOfficeDefaultPivot","isServiceWorkerCache","lastKnownAppVersion","anonCookieName","ssoComplete","aadState","headData","initializeFromData","newRidNeeded","lastUsedActivityIdBacking","htmlElement","html","headElement","head","applicationCache","initializeFromDom","manifestAttributeName","navigator","serviceWorker","controller","initializeFromStorage","initializeLastUsedActivityId","clientSettingsLocaleExists","script","setQueryItemProvidedValues","headDataJs","headJs","anonckname","signedin","visibilityState","setIsEnterprise","setIsOfficeDefaultPivot","getStoredActivityIdKey","storedActivityIdJson","ts","getStoredHeadDataKey","storedHeadDataJson","headDataResponse","setFlights","clientInfo","dataClientSettings","calculateForwardableParams","pageTypeFromSettings","storedVersions","getObject","pageVersions","currentDomVersion","setObject","log","logPrefix","currentPageStoredHeadData","storedHeadData","populateFromApiResponse","response","responseClientSettings","responseFlights","info","pageGenTime","domQueryParams","queryparams","currentPageVersion","lowerCaseParams","availableParams","paramValue","x","forwardablequeryparams","lastUsedAid","lastUsedActivityId","currentAid","pageGenTimestamp","flightString","exec","IsEnterprise","Enterprise","cmsItem","find","setCurrentFlightsTestOverride","flights","IsOfficeDefaultPivot","getHeadData","getCookie","cookieString","RegExp","getMuidCookie","setRequireFunctionalCookie","expiryDays","path","secure","expiryDate","builder","date","setTime","toUTCString","_connectorMap","_globalConnectors","_allConnectors","_getDataConnectorPendingPromises","namespace","dataConnector","connector","pendingPromise","promise","resolveCallback","rejectCallback","reject","actionPayload","newState","stateChanged","typeIsString","type","statePropertyKey","connectorState","experienceFullNamespace","dataConnectorName","initializeExperience","isGlobal","merge","connectorReducerResult","computeNextStateForConnector","reportStateChange","fullNamespace","has","delete","store","dispatch","connectorPreviousState","nextStateForConnector","subReduce","reducer","connectorStateChanged","previousState","reducedState","designSystemMap","designSystemIndexMap","createGenerateClassName","designSystem","dsKey","dsName","dsIndex","rulesMap","rule","sheet","enhancer","middlewares","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","trace","traceLimit","_rootReducer","needsHydrate","hasPreHydrateState","_store","rootReducer","connectors","onApplicationStart","connectedTopLevelElement","hostElement","bypassJSS","isSSR","updateJssManagerInstance","pageTimings","startMark","hydrate","endMark","render","jssInstance","plugins","_pageTimings","_secondaryPageTimings","getPageTimings","incrementCounter","counterName","existingCount","ariaLabelAttribute","rootElementId","htmlElementIds","body","applicationCacheConstants","pagesRefreshData","pagetypeSettings","js","telemetryId","trackPageProduct","trackPageType","minimumHostPagePathSegments","appAnonCookieExistsCookieName","childCookieName","nurturingAcceptedStateKey","oneServiceHeaders","authorization","oneServiceQueryStringKeys","apiKey","complexInfoPaneEnabled","contentType","delta","disableTypeSerialization","infopaneCount","fdhead","feedLayoutRequestType","ids","ocid","parentContentId","parentNamespace","parentTitle","queryQ","query","queryType","qScope","responseSchema","select","session","signInCookieName","skip","timeOut","top","user","wrapOData","AriaRoles","DeviceOrientation","CoreLocalStorageKeys","defaultOneServiceApiKey","Environment","getEnvironmentFromString","int1","intpr","intpef","jssGeneratedClassesMap","jssCaptureCompleted","removeRenderCache","removeSubstringKeys","captureJssGeneratedClasses","renderCacheEnabled","loggingEndpoint","Product","mmx","edge","edgeChromium","hybrid","hub","microsoftNews","office","appErrorId","propertyBag","settingsObject","settingsJson","getPageSettings","uploadTime","isProd","cors","apikey","w","anoncknm","getLoggingParameters","iKey","iKeyIndex","getIKeyValue","payload","pageProduct","getCookieConsentRequired","console","time","baseData","baseType","page","product","clientId","request","mkt","extSchema","getLoggingPayload","formatParams","XMLHttpRequest","open","send","canMatchMedia","matchMedia","maxWidthValues","minWidthValues","minWidth","maxWidth","Infinity","minBreakpoint","breakpoints","maxBreakpoint","getLocationHref","getLocationHostname","getLocationHost","getLocationOrigin","getLocationSearch","getCookieString","getDocumentElementById","elementId","getDocumentElementsByTagName","tagName","getIndexedDB","indexedDB","getInnerHeight","createScriptTag","src","loadAsync","scriptElement","async","NONCE_ID","nonce","AuthCookieName","AuthCookieExistsCookieName","dataConnectorToExperienceKeyMap","createStatePropertyKey","dataConnectorInjector","registerInjection","experienceSet","Set","add","appState","experienceStatePropertyKey","initialDataConnectorState","dataConnectorNamespace","newDataConnectorState","experienceKeys","experienceKey","experiencePreviousState","PerfMarker","endMarkSuffix","initialize","instance","singleMark","measureStartEnd","mark","getPromise","experienceName","perfMarkers","perfEntries","getEntriesByType","markerName","perfMarkerDetail","PerfMarkerDetail","processPerfEntry","isValid","measure","perfMarker","duration","perfEntry","firstStartTime","LiteLogger","isDebugEnabled","webpackRequire","tags","getMessage","nameRegEx","queryNameValueMatches","HostPage","pathnameSegments","topDomainName","originalUrl","categoryKey","verticalKey","hostName","topDomain","indexOffset","subcategoryKey"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,E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AMxN,EAAM,IAAIC,IAAIuN,GAEdjI,EAAOvF,EAAI2N,SACXi+B,EAAmB5rC,EAAI8N,SAASnE,MAAM,KAGtCkiC,GAAiBtmC,EAAKuD,MAAM,oBAAsB,IAAI,IAAM,GAMlE,GAAI8iC,EAAiB7vC,QAAU,IAC3B,MAAO,CACH+vC,YAAat+B,EACbu+B,YAAa,KACbC,YAAa,KACbC,SAAU1mC,EACV2mC,UAAWL,GAUnB,MACMM,EADiD,IAA/BP,EAAiB,GAAG7vC,QAA0D,IAA1C6vC,EAAiB,GAAGjiC,MAAM,KAAK5N,OACrD,EAAI,EAEpCgF,EAAsB,CACxB+qC,YAAat+B,EACbu+B,YAAaH,EAAiB,EAAIO,GAClCH,YAAaJ,EAAiB,EAAIO,GAClCF,SAAU1mC,EACV2mC,UAAWL,GAMf,OAHID,EAAiB7vC,QAAU,MAC3BgF,EAASqrC,eAAiBR,EAAiB,EAAIO,IAE5CprC,GApDf,CAAiB4qC,MAAQ","file":"startup.4c9aa5da21b6f6295fef.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t466: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/bundles/v1/hybrid/20201031.2/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([1350,0]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * The app error object that contains the data of an app error\r\n */\r\nexport interface AppError {\r\n /** error id */\r\n id: number;\r\n\r\n /** source file */\r\n source: string;\r\n\r\n /** Message or data */\r\n message?: string;\r\n\r\n /** severity */\r\n severity: Severity;\r\n\r\n /** Property Bag */\r\n pb?: AppErrorPropertyBag;\r\n\r\n /** optional property: Bug meta data for auto bug creation from app error */\r\n bug?: any;\r\n}\r\n\r\n/**\r\n * The app error property bag that will be used for build number etc.\r\n */\r\nexport interface AppErrorPropertyBag {\r\n /** Build alias. Examples: latest, rolling, latest/debug, etc */\r\n buildAlias?: string;\r\n\r\n /** Build number */\r\n build?: string,\r\n\r\n /** Custom message */\r\n customMessage?: string,\r\n\r\n /**\r\n * Equal to \"Server\" if the error occurred server side, \"Client\" for client side.\r\n *\r\n * App types without starting with SSRUtil's WebEntry will assume to have no SSR\r\n * and therefore remain undefined and not part of the app error payload.\r\n */\r\n ssrEnvironment?: string,\r\n\r\n /**\r\n * Relevant to client side AppErrors SSR state if SSR is enabled for the app type.\r\n * False by default if error occurred server side\r\n *\r\n * App types without starting with SSRUtil's WebEntry will assume to have no SSR\r\n * and therefore remain undefined and not part of the app error payload.\r\n */\r\n ssrState?: string,\r\n\r\n /** PCS build version */\r\n pcsVersion?: string;\r\n\r\n /** The error source. */\r\n source?: string;\r\n\r\n /** The line number of the error. */\r\n line?: number;\r\n\r\n /** The column number of the error. */\r\n column?: number;\r\n\r\n /** The stack trace for the error. */\r\n stack?: string;\r\n\r\n /** Network status */\r\n networkStatus?: number;\r\n\r\n /** Boolean indicating if this is a preloaded page */\r\n isPreload?: boolean;\r\n\r\n /** Boolean indicating if this is a pre-rendered page */\r\n isPrerender?: boolean;\r\n\r\n /** Additional dynamic properties */\r\n [index: string]: any;\r\n}\r\n\r\n/**\r\n * The interface that defines a generic app error tracker\r\n */\r\nexport interface AppErrorTracker {\r\n /**\r\n * Report an app error\r\n * @param {AppError} error - the app error to report\r\n */\r\n trackError(error: AppError): Promise;\r\n}\r\n\r\n/**\r\n * This will decide whether to create Alert for this app error or no alert. This can generate IcM ticket.\r\n * Alerts ones are tracked at http://aka.ms/AppErrors\r\n * NoAlerts will have separate tab just next to Errors aka Warnings. IcM ticket won't be generated when NoAlert is set.\r\n */\r\nexport enum Severity {\r\n /**\r\n * This is app error with default severity\r\n */\r\n Alert,\r\n\r\n /**\r\n * This is app warning\r\n */\r\n NoAlert,\r\n\r\n /**\r\n * This app error has high user impact\r\n */\r\n HighImpact,\r\n\r\n /**\r\n * This is fatal app error\r\n */\r\n Critical\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppType, AudienceModeType, AuthCookieName, PageType } from \"@msnews/experiences-constants\";\r\nimport { AppErrorPropertyBag, getAppErrorsPropertyBag, getPageTimings, updateAppErrorsPropertyBag } from \"@msnews/diagnostics\";\r\nimport { appAnonCookieExistsCookieName, childCookieName, rootElementId, serviceUrl, telemetryId, trackPageProduct, trackPageType } from \"../constants\";\r\nimport { Environment, getEnvironmentFromString } from \"./Environment\";\r\nimport { HostPage, IHostPage } from \"./HostPage\";\r\nimport { WpoModel, getWpoFlights } from \"@msnews/wpo-common\";\r\nimport { canUseDOM, getDocumentElementById, getLocationHostname, getLocationHref, getLocationOrigin, getLocationSearch } from \"@msnews/isomorphic-util\";\r\nimport { getCookie, getMuidCookie } from \"../utilities/CookieUtility\";\r\n\r\nimport { AccountInfo } from \"./Enterprise\";\r\nimport { Market } from \"./Market\";\r\nimport { PageRequestTargetScope } from \"./PageRequestTargetScope\";\r\nimport { PlatformType } from \"cms-models-msn/configuration/types/PlatformType\";\r\nimport { UrlUtility } from \"../utilities/UrlUtility\";\r\nimport { Utility } from \"../utilities/Utility\";\r\nimport { headData } from \"./HeadData\";\r\nimport { isString } from \"lodash-es\";\r\nimport { tryParseJson } from \"../utilities/Parsing\";\r\n\r\n/**\r\n * chrome\r\n * The chrome API is not defined in Typescript\r\n */\r\ndeclare global {\r\n interface Window { chrome: any; }\r\n}\r\n\r\n/**\r\n * Page level experience tracking info\r\n */\r\nexport interface ITrackInfo {\r\n sitePage: {\r\n page_product: string,\r\n page_type: string\r\n }\r\n}\r\n\r\nexport class AppEnvironment {\r\n /**\r\n * The single instance of the AppEnvironment class.\r\n * @type {AppEnvironment}\r\n */\r\n private static _instance: AppEnvironment;\r\n\r\n /**\r\n * the activity id for the current page view\r\n */\r\n private activityId: string;\r\n\r\n /**\r\n * Base url for the content service, endpoints/queries are appended for specific content calls.\r\n * This is an akamai url for highly cacheable content.\r\n * Possible values are enumerated on ContentServiceConfig.ts\r\n *\r\n * @private\r\n * @type {string}\r\n * @memberof AppEnvironment\r\n */\r\n private contentServiceUrlBase: URL;\r\n\r\n private currentRequestTargetScope: PageRequestTargetScope;\r\n\r\n private currentMarket: Market;\r\n private hostPage: IHostPage;\r\n\r\n /** The hostname to use for content links. */\r\n private currentContentLinkHost: string;\r\n\r\n /**\r\n * Indicates that the page is running as an FRE page (i.e. the url contains fre=1)\r\n * Does not indicate that the FRE itself is currently displayed over the page.\r\n */\r\n private isFrePage: boolean;\r\n\r\n /**\r\n * Base for the service url, endpoints/queries are appended for specific service calls.\r\n * This is the OneService url used for personalized content.\r\n * Possible values are enumerated on OneServiceConfig.ts\r\n *\r\n * @private\r\n * @type {string}\r\n * @memberof AppEnvironment\r\n */\r\n private serviceUrlBase: URL;\r\n\r\n /**\r\n * Base URL for the feed service\r\n */\r\n private feedServiceUrlBase: URL;\r\n\r\n /**\r\n * Base domain for the feed service\r\n */\r\n private serviceDomainUrl: string;\r\n\r\n /**\r\n * Base domain host for the feed service\r\n */\r\n private serviceDomain: string;\r\n\r\n /**\r\n * Base domain for the enterprise feed service\r\n */\r\n private enterpriseServiceDomainUrl: string;\r\n\r\n /**\r\n * The account info for the current page user wrapped in a promise\r\n */\r\n private accountInfoPromise: Promise;\r\n\r\n /**\r\n * The resolved account info. This is only set when the account info promise is resolved.\r\n */\r\n private resolvedAccountInfo: AccountInfo;\r\n\r\n private appType: string;\r\n private authCookieName: AuthCookieName;\r\n private buildVersion: string;\r\n\r\n private environmentConfigUrl: URL;\r\n\r\n private rootTelemetryId: number;\r\n private trackInfo: ITrackInfo;\r\n private userId: string;\r\n private countryCode: string;\r\n private latitude: string;\r\n private longitude: string;\r\n private environment: Environment;\r\n private featureFlags: any;\r\n private disableCachingConfigs: boolean;\r\n private enableConfigService: boolean;\r\n private isMultiConfigRetrievalEnabled: boolean;\r\n private configServiceBaseUrl: URL;\r\n private disableContentPreviewCache: boolean;\r\n private disableContentCacheIDBRead: boolean;\r\n private sendFeedCallActivityIdInHeader: boolean;\r\n private useOneServiceAuthEndpoints: boolean;\r\n private clarityEnabled: boolean;\r\n\r\n /** True if query string has appropriate debug flag */\r\n private isDebug: boolean;\r\n\r\n /** True if query string has appropriate flag to show msnCreatorDashboard (msnDash=) */\r\n private showMnsCreatorDashboard: boolean;\r\n\r\n /** Config Root Url */\r\n private configRootUrl: URL;\r\n\r\n /** Cache busting identifier received from pcs */\r\n private cacheBustingIdentifier: string;\r\n\r\n /** The WPOData we get from localStorage using the requestContext wpoData function */\r\n private wpoData: string;\r\n public get WpoData(): string { return this.wpoData; }\r\n public set WpoData(value: string) {\r\n this.wpoData = value;\r\n this.addWpoFlights();\r\n }\r\n\r\n /**\r\n * ActivityId value from initial server response, use telemetry's requestId instead for associating with current page client navigation\r\n */\r\n public get ActivityId(): string { return this.activityId; }\r\n public set ActivityId(value: string) {\r\n this.activityId = value;\r\n headData.ClientSettings = {\r\n ...headData.ClientSettings,\r\n aid: value\r\n };\r\n }\r\n\r\n /**\r\n * Getter for the base url for the content service, endpoints/queries are appended for specific content calls.\r\n * This is an akamai url for highly cacheable content.\r\n * Possible values are enumerated on ContentServiceConfig.ts\r\n *\r\n * @readonly\r\n * @type {URL}\r\n * @memberof AppEnvironment\r\n */\r\n public get EnvironmentConfigUrl(): URL {\r\n // If I mutate the same object, I will need to revert to the original state somewhere.\r\n // For safety reason, it is better to use a new Object\r\n const url = new URL(\"\", this.environmentConfigUrl);\r\n\r\n if (process.env.WEBPACK_DEV_SERVER || new URLSearchParams(getLocationSearch()).get(\"env\") === \"dev\") {\r\n url.searchParams.set(\"env.config\", \"dev\");\r\n }\r\n\r\n const searchParam = new URLSearchParams(getLocationSearch()).get(\"env.config\");\r\n if (searchParam) {\r\n url.searchParams.set(\"env.config\", searchParam);\r\n }\r\n\r\n return url;\r\n }\r\n\r\n /**\r\n * Getter for the base url for the content service, endpoints/queries are appended for specific content calls.\r\n * This is an akamai url for highly cacheable content.\r\n * Possible values are enumerated on ContentServiceConfig.ts\r\n *\r\n * @readonly\r\n * @type {URL}\r\n * @memberof AppEnvironment\r\n */\r\n public get ContentServiceUrlBase(): URL {\r\n // If I mutate the same object, I will need to revert to the original state somewhere.\r\n // For safety reason, it is better to use a new Object\r\n const url = new URL(\"\", this.contentServiceUrlBase);\r\n\r\n if (process.env.WEBPACK_DEV_SERVER || new URLSearchParams(getLocationSearch()).get(\"env\") === \"dev\") {\r\n url.searchParams.set(\"env.content\", \"dev\");\r\n }\r\n\r\n const searchParam = new URLSearchParams(getLocationSearch()).get(\"env.content\");\r\n if (searchParam) {\r\n url.searchParams.set(\"env.content\", searchParam);\r\n }\r\n\r\n return url;\r\n }\r\n\r\n public get CurrentRequestTargetScope(): PageRequestTargetScope { return this.currentRequestTargetScope; }\r\n public set CurrentRequestTargetScope(value: PageRequestTargetScope) { this.currentRequestTargetScope = value; }\r\n\r\n public get CurrentMarket(): Market { return this.currentMarket; }\r\n public set CurrentMarket(value: Market) { this.currentMarket = value; }\r\n\r\n public get Environment(): Environment { return this.environment; }\r\n public set Environment(value: Environment) { this.environment = value; }\r\n\r\n public get ServiceDomain(): string { return this.serviceDomain; }\r\n\r\n public get HostPage(): IHostPage { return this.hostPage; }\r\n public set HostPage(value: IHostPage) { this.hostPage = value; }\r\n\r\n public get AppType(): string { return this.appType; }\r\n\r\n public get AuthCookieName(): AuthCookieName { return this.authCookieName; }\r\n public set AuthCookieName(value: AuthCookieName) { this.authCookieName = value; }\r\n\r\n public get UseOneServiceAuthEndpoints(): boolean { return this.useOneServiceAuthEndpoints; }\r\n public set UseOneServiceAuthEndpoints(value: boolean) { this.useOneServiceAuthEndpoints = value; }\r\n\r\n public get AccountInfoPromise(): Promise { return this.accountInfoPromise; }\r\n public set AccountInfoPromise(value: Promise) { this.accountInfoPromise = value; }\r\n\r\n public get ResolvedAccountInfo(): AccountInfo { return this.resolvedAccountInfo; }\r\n public set ResolvedAccountInfo(value: AccountInfo) { this.resolvedAccountInfo = value; }\r\n\r\n public get BuildVersion(): string { return this.buildVersion || \"\"; }\r\n\r\n public get ClarityEnabled(): boolean { return this.clarityEnabled; }\r\n public set ClarityEnabled(value: boolean) { this.clarityEnabled = value; }\r\n\r\n public get RootTelemetryId(): number { return this.rootTelemetryId; }\r\n public set RootTelemetryId(value: number) { this.rootTelemetryId = value; }\r\n\r\n public get TrackInfo(): ITrackInfo { return this.trackInfo; }\r\n public set TrackInfo(value: ITrackInfo) { this.trackInfo = value; }\r\n\r\n public get UserId(): string { return this.getUserMuid() || this.userId; }\r\n public set UserId(value: string) { this.userId = value; }\r\n\r\n /** True if query string has appropriate debug flag */\r\n public get IsDebug(): boolean { return this.isDebug; }\r\n\r\n /** True if query string has appropriate flag to show msnCreatorDashboard (msnDash=) */\r\n public get ShowMnsCreatorDashboard(): boolean { return this.showMnsCreatorDashboard; }\r\n\r\n /**\r\n * Gets the host to use when linking to content.\r\n */\r\n public get contentLinkHost(): string { return this.currentContentLinkHost; }\r\n\r\n /**\r\n * Getter for the base for the service url, endpoints/queries are appended for specific service calls.\r\n * This is the oneservice url used for personalized content.\r\n * Possible values are enumerated on OneServiceConfig.ts\r\n *\r\n * @type {URL}\r\n * @memberof AppEnvironment\r\n */\r\n public get ServiceUrlBase(): URL {\r\n const url = new URL(\"\", this.serviceUrlBase);\r\n\r\n if (process.env.WEBPACK_DEV_SERVER || new URLSearchParams(getLocationSearch()).get(\"env\") === \"dev\") {\r\n url.searchParams.set(\"env.service\", \"dev\");\r\n }\r\n\r\n const searchParam = new URLSearchParams(getLocationSearch()).get(\"env.service\");\r\n if (searchParam) {\r\n url.searchParams.set(\"env.service\", searchParam);\r\n }\r\n\r\n return url;\r\n }\r\n\r\n /**\r\n * Base URL for the feed service\r\n */\r\n public get FeedServiceUrlBase(): URL {\r\n if (!this.feedServiceUrlBase) {\r\n return null;\r\n }\r\n\r\n const url = new URL(\"\", this.feedServiceUrlBase);\r\n\r\n if (process.env.WEBPACK_DEV_SERVER || new URLSearchParams(getLocationSearch()).get(\"env\") === \"dev\") {\r\n url.searchParams.set(\"env.service\", \"dev\");\r\n }\r\n\r\n const searchParam = new URLSearchParams(getLocationSearch()).get(\"env.service\");\r\n if (searchParam) {\r\n url.searchParams.set(\"env.service\", searchParam);\r\n }\r\n\r\n return url;\r\n }\r\n\r\n /**\r\n * Base URL for the enterprise service\r\n */\r\n public get EnterpriseServiceUrlBase(): URL {\r\n if (!this.enterpriseServiceDomainUrl) {\r\n return;\r\n }\r\n\r\n const url = new URL(\"\", this.enterpriseServiceDomainUrl);\r\n\r\n if (process.env.WEBPACK_DEV_SERVER || new URLSearchParams(getLocationSearch()).get(\"env\") === \"dev\") {\r\n url.searchParams.set(\"env.service\", \"dev\");\r\n }\r\n\r\n const searchParam = new URLSearchParams(getLocationSearch()).get(\"env.service\");\r\n if (searchParam) {\r\n url.searchParams.set(\"env.service\", searchParam);\r\n }\r\n\r\n return url;\r\n }\r\n\r\n public get IsFrePage(): boolean { return this.isFrePage; }\r\n\r\n /**\r\n * This is the switch to turn on/off indexed db operation used as a caching layer in config resolver (Resolver.ts)\r\n */\r\n public get DisableCachingConfigs(): boolean { return this.disableCachingConfigs; }\r\n\r\n /**\r\n * This is the switch to turn on/off config service operation in Resolver.ts\r\n */\r\n public get EnableConfigService(): boolean { return this.enableConfigService; }\r\n\r\n /**\r\n * This indicates whether we will use CMS PPE configs or not\r\n */\r\n public get EnableCMSPPEConfigs(): boolean { return headData && headData.EnableCMSPPEConfigs; }\r\n\r\n /**\r\n * Check whether multi config retrieval is supported.\r\n */\r\n public get IsMultiConfigRetrievalEnabled(): boolean { return this.isMultiConfigRetrievalEnabled; }\r\n\r\n /**\r\n * This is the switch to turn on/off content preview caching in core/cache/ContentPreview.ts\r\n */\r\n public get DisableContentPreviewCache(): boolean {\r\n return this.disableContentPreviewCache;\r\n }\r\n\r\n /**\r\n * Returns a flag indicating whether the one service feed fetch call should send activityID\r\n * in the request header or as a QSP in the URL (current behavior is via QSP).\r\n */\r\n public get SendFeedCallActivityIdInHeader(): boolean {\r\n return this.sendFeedCallActivityIdInHeader;\r\n }\r\n\r\n /**\r\n * This is the switch to turn off hydrating content preview cache from IndexedDB.\r\n * Default is false\r\n */\r\n public get DisableContentCacheIDBRead(): boolean {\r\n const queryParamOverride = UrlUtility.getQueryParameterByName(\"disableContentCacheIDBRead\", getLocationSearch());\r\n\r\n if (queryParamOverride) {\r\n return queryParamOverride === \"true\";\r\n }\r\n\r\n return this.disableContentCacheIDBRead;\r\n }\r\n\r\n /**\r\n * Get base url of Config Service.\r\n */\r\n public get ConfigServiceBaseUrl(): URL { return this.configServiceBaseUrl; }\r\n\r\n /**\r\n * This returns feature flags client settings stamped by PCS.\r\n */\r\n public get FeatureFlags(): any { return this.featureFlags; }\r\n\r\n /**\r\n * This returns config root url\r\n */\r\n public get ConfigRootUrl(): URL {\r\n if (!this.configRootUrl) {\r\n return null;\r\n }\r\n\r\n const url = new URL(\"\", this.configRootUrl);\r\n\r\n if (process.env.WEBPACK_DEV_SERVER || new URLSearchParams(getLocationSearch()).get(\"env\") === \"dev\") {\r\n url.searchParams.set(\"env.config\", \"dev\");\r\n }\r\n\r\n const searchParam = new URLSearchParams(getLocationSearch()).get(\"env.config\");\r\n if (searchParam) {\r\n url.searchParams.set(\"env.config\", searchParam);\r\n }\r\n\r\n return url;\r\n }\r\n\r\n /**\r\n * Returns cache busting identifier from PCS.\r\n */\r\n public get CacheBustingIdentifier(): string { return this.cacheBustingIdentifier; }\r\n\r\n /**\r\n * Returns the country code. For example \"br\"\r\n */\r\n public get CountryCode(): string { return this.countryCode; }\r\n public set CountryCode(value: string) { this.countryCode = value; }\r\n\r\n /// / FIXME: hyphen has a second 'h'\r\n /// / Bug 24228723: [Peregrine] ActivityIdLowerCaseNoHypens misspells \"Hyphen\"\r\n /**\r\n * Gets the Activity ID in lower case and without any hyphens. This helper method should be where parity with Prime is required.\r\n * Use telemetry's requestId instead for associating with current page client navigation\r\n */\r\n public get ActivityIdLowerCaseNoHypens(): string { return ((headData && headData.ClientSettings && headData.ClientSettings.aid) || \"\").toLowerCase(); }\r\n\r\n /**\r\n * Returns the latitude. For example \"42.361145\"\r\n */\r\n public get Latitude(): string { return this.latitude; }\r\n\r\n /**\r\n * Returns the longitude. For example \"-71.057083\"\r\n */\r\n public get Longitude(): string { return this.longitude; }\r\n\r\n /**\r\n * Initialize the AppEnvironment singleton instance.\r\n * @param _serviceUrl Optional URL to initialize the ServiceUrlBase.\r\n * @param _configServiceUrlBase ConfigServiceUrlBase provided during server side rendering this is the ServiceFabric ClusterRegionUrl.\r\n */\r\n private constructor(_serviceUrl: URL, _configServiceUrlBase: string) {\r\n this.initializeAppEnvironment(_serviceUrl, _configServiceUrlBase);\r\n }\r\n\r\n /**\r\n * Returns singleton class instance.\r\n * @returns {AppEnvironment}\r\n */\r\n public static getInstance(serviceUrl: URL = null, configServiceUrlBase: string = null): AppEnvironment {\r\n return AppEnvironment._instance || (AppEnvironment._instance = new AppEnvironment(serviceUrl, configServiceUrlBase));\r\n }\r\n\r\n /**\r\n * Reinitialize the singleton class instance.\r\n * @param serviceUrl OneService service url to initialize to.\r\n * @param configServiceUrlBase Config service url to initialize to.\r\n * @returns {AppEnvironment}\r\n */\r\n public static resetInstance(serviceUrl: URL = null, configServiceUrlBase: string = null): AppEnvironment {\r\n AppEnvironment._instance = new AppEnvironment(serviceUrl, configServiceUrlBase);\r\n appEnvironment = AppEnvironment._instance;\r\n return AppEnvironment._instance;\r\n }\r\n\r\n /**\r\n * Initializes App environment. This is normally only called by the constructor (singleton pattern)\r\n * It is made public so that it can be also called by test code.\r\n */\r\n public initializeAppEnvironment(_serviceUrl?: URL, configServiceUrlBase?: string): void {\r\n\r\n let environmentFromHeadData: Environment = null;\r\n const clientSettings = headData && headData.ClientSettings;\r\n\r\n if (clientSettings) {\r\n this.activityId = this.tryReformatGuid(clientSettings.aid);\r\n this.currentMarket = (headData.Locale || clientSettings.apps_locale) as Market;\r\n this.countryCode = clientSettings.geo_country;\r\n this.latitude = clientSettings.geo_lat;\r\n this.longitude = clientSettings.geo_long;\r\n this.configRootUrl = clientSettings.configRootUrl ? new URL(\"\", clientSettings.configRootUrl) : null;\r\n environmentFromHeadData = getEnvironmentFromString(clientSettings.pcsInfo && clientSettings.pcsInfo.env || \"prod\");\r\n\r\n this.setAccountInfoPromise();\r\n this.appType = clientSettings.apptype || \"\";\r\n this.authCookieName = this.getAuthCookieName();\r\n this.useOneServiceAuthEndpoints = false;\r\n\r\n this.featureFlags = clientSettings.featureFlags;\r\n\r\n this.disableCachingConfigs =\r\n this.featureFlags && this.featureFlags.disableCachingConfigs\r\n ? this.featureFlags.disableCachingConfigs === \"true\"\r\n : false;\r\n\r\n this.enableConfigService =\r\n this.featureFlags && this.featureFlags.enableConfigService\r\n ? this.featureFlags.enableConfigService === \"true\"\r\n : true;\r\n\r\n this.disableContentPreviewCache =\r\n this.featureFlags && this.featureFlags.disableContentPreviewCache\r\n ? this.featureFlags.disableContentPreviewCache === \"true\"\r\n : false;\r\n\r\n this.disableContentCacheIDBRead = this.featureFlags && this.featureFlags.disableContentCacheIDBRead\r\n ? this.featureFlags.disableContentCacheIDBRead === \"true\"\r\n : false;\r\n\r\n // Use feature flag as a switch to disable the feature (will need a PCS deployment)\r\n this.sendFeedCallActivityIdInHeader = this.featureFlags && this.featureFlags.disableActivityIdInHeader && this.featureFlags.disableActivityIdInHeader === \"true\"\r\n ? false\r\n : this.appType === AppType.Edge || this.appType === AppType.Hub;\r\n\r\n this.cacheBustingIdentifier = clientSettings.cbid;\r\n\r\n if (clientSettings.pcsInfo && !getAppErrorsPropertyBag().pcsVersion) {\r\n const propertyBagPcsVersion: AppErrorPropertyBag = {\r\n pcsVersion: clientSettings.pcsInfo.v\r\n };\r\n\r\n updateAppErrorsPropertyBag(propertyBagPcsVersion);\r\n }\r\n\r\n const bundleInfo = clientSettings.bundleInfo;\r\n\r\n if (bundleInfo) {\r\n this.buildVersion = bundleInfo.v || \"\";\r\n\r\n const buildAlias = bundleInfo.alias;\r\n\r\n if (buildAlias) {\r\n updateAppErrorsPropertyBag({ buildAlias });\r\n }\r\n }\r\n }\r\n\r\n const rootElement = canUseDOM() ? getDocumentElementById(rootElementId) : null;\r\n const locationHref = getLocationHref();\r\n const locationOrigin = getLocationOrigin();\r\n\r\n // env is read from\r\n // - query string param env, if present\r\n // - headData.ClientSettings.pcsInfo.env\r\n // - defaults to prod otherwise\r\n const envQSOverwrite = getEnvironmentFromString(UrlUtility.getQueryParameterByName(\"env\", locationHref));\r\n this.environment =\r\n envQSOverwrite\r\n || environmentFromHeadData\r\n || Environment.prod;\r\n\r\n const servicesEndpoints = clientSettings && clientSettings.servicesEndpoints;\r\n if (canUseDOM()) {\r\n // Get from headdata if possible.\r\n // Else using locationOrigin is okay (current MMX scenario) since it'd use .cn version for China.\r\n // todo: pass this to SW to override regex in service-worker/src/swConstants/DefaultRoutes.enum.ts\r\n this.serviceDomainUrl = servicesEndpoints && servicesEndpoints.feedService && servicesEndpoints.feedService.domain || locationOrigin;\r\n } else {\r\n // temporary override for SSR scenario. Will be removed when the work below completes.\r\n // Task 29673879: Deploy render service to one service test cluster\r\n // On the server side use assets.msn.com to improve river feed call latency.\r\n this.serviceDomainUrl = getLocationHostname().endsWith(\".cn\") ? \"https://assets.msn.cn\" : \"https://assets.msn.com\";\r\n }\r\n\r\n this.serviceDomain = new URL(this.serviceDomainUrl).host;\r\n this.enterpriseServiceDomainUrl = servicesEndpoints && servicesEndpoints.enterpriseFeedService && servicesEndpoints.enterpriseFeedService.domain;\r\n\r\n this.serviceUrlBase = _serviceUrl || (rootElement && rootElement.getAttribute(serviceUrl) && new URL(\"\", rootElement.getAttribute(serviceUrl))) || new URL(\"/service/\", this.serviceDomainUrl);\r\n this.feedServiceUrlBase = this.serviceDomainUrl ? new URL(\"/service/\", this.serviceDomainUrl) : undefined;\r\n\r\n // Get the hostPage from the request url\r\n this.hostPage = HostPage.getHostPageFromUrl(locationHref);\r\n\r\n // Determine if the page is running as an FRE page\r\n this.isFrePage = (UrlUtility.getQueryParameterByName(\"fre\", locationHref) === \"1\");\r\n\r\n this.userId = this.getUserMuid();\r\n\r\n // Get attributes from the head (full page Peregrine experience) or from the spa \"root\" element (PrimeHybrid case)\r\n // TODO, determine where in the element attributes these values should be set\r\n this.rootTelemetryId = rootElement ? Number(rootElement.getAttribute(telemetryId)) : 0;\r\n const trackPageProd = rootElement && rootElement.getAttribute(trackPageProduct);\r\n const trackPageTypeVal = rootElement && rootElement.getAttribute(trackPageType);\r\n this.trackInfo = { sitePage: { page_product: trackPageProd, page_type: trackPageTypeVal } };\r\n\r\n this.contentServiceUrlBase = this.serviceDomainUrl ? new URL(\"/content/\", this.serviceDomainUrl) : undefined;\r\n\r\n this.currentContentLinkHost = this.createContentLinkHost();\r\n\r\n this.setTargetScope();\r\n\r\n this.isMultiConfigRetrievalEnabled = this.useMultiConfigsRetrieval();\r\n\r\n const baseUrl = this.getConfigServiceBaseUrl(this.isMultiConfigRetrievalEnabled, configServiceUrlBase);\r\n this.configServiceBaseUrl = baseUrl ? new URL(\"\", baseUrl) : null;\r\n\r\n this.environmentConfigUrl = this.serviceDomainUrl ? new URL(\"/config/v1/\", this.serviceDomainUrl) : undefined;\r\n\r\n this.isDebug = ((UrlUtility.getQueryParameterByName(\"debug\", locationHref) || \"\").toLowerCase() in { 1: 1, true: 1 })\r\n || (UrlUtility.getQueryParameterByName(\"item\", locationHref) || \"\").toLowerCase().indexOf(\"/debug\") > 0;\r\n\r\n this.showMnsCreatorDashboard = UrlUtility.getQueryParameterByName(\"mnsDash\", locationHref) != null;\r\n }\r\n\r\n /**\r\n * Get the UserMuid from the muid cookie\r\n */\r\n private getUserMuid(): string {\r\n let muid: string;\r\n const muidCookie: string = getMuidCookie();\r\n if (isString(muidCookie)) {\r\n muid = \"m-\" + muidCookie;\r\n }\r\n return muid;\r\n }\r\n\r\n /**\r\n * Get config service base url\r\n * @param isMultiConfigRetrievalEnabled if multiple config retrieval is supported.\r\n * @param configServiceUrlBase externally configured config service url (from SSR environment)\r\n * @returns {string} - config service base url.\r\n */\r\n private getConfigServiceBaseUrl(isMultiConfigRetrievalEnabled = true, configServiceUrlBase?: string): string {\r\n const relativePath = `/resolver/api/resolve/${isMultiConfigRetrievalEnabled ? \"v2/\" : \"\"}configindex/`;\r\n\r\n if (configServiceUrlBase) {\r\n // When doing server side rendering the ClusterRegionUrl env variable should be set, use this to avoid calls to CRS going outside of the cluster.\r\n return configServiceUrlBase + relativePath;\r\n } else if (process.env.WEBPACK_DEV_SERVER || this.environment === Environment.int) {\r\n // int and localhost to use int.msn.com for config service.\r\n return \"https://int.msn.com\" + relativePath;\r\n } else {\r\n return getLocationOrigin() ? getLocationOrigin() + relativePath : null;\r\n }\r\n }\r\n\r\n /**\r\n * Function checks if ConfigService should return multiple configs\r\n * @returns true if supported else false.\r\n */\r\n private useMultiConfigsRetrieval(): boolean {\r\n const urlQuery = getLocationSearch();\r\n if (urlQuery) {\r\n const param = UrlUtility.getQueryParameterByName(\"isMultiConfigRetrievalEnabled\", urlQuery);\r\n if (param) {\r\n return param.toLocaleLowerCase() === \"true\";\r\n }\r\n }\r\n\r\n // PCS flag to turn on/off multi config retrieval.\r\n if (this.featureFlags\r\n && this.featureFlags.isMultiConfigRetrievalEnabled) {\r\n return this.featureFlags.isMultiConfigRetrievalEnabled === \"true\";\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * Get the auth cookie name based on the app type of the page\r\n * @returns {AuthCookieName} - the name of the auth cookie to use\r\n */\r\n private getAuthCookieName(): AuthCookieName {\r\n const clientSettings = headData && headData.ClientSettings;\r\n const appType: AppType = (clientSettings.apptype || \"\") as AppType;\r\n let authCookieName: AuthCookieName;\r\n switch (appType) {\r\n case AppType.Windows:\r\n authCookieName = headData.ClientSettings.pagetype === PageType.Windows ? AuthCookieName.Anon : AuthCookieName.AppAnon;\r\n break;\r\n case AppType.FirstParty:\r\n case AppType.Hub:\r\n case AppType.MicrosoftNews:\r\n case AppType.Views:\r\n case AppType.Weather:\r\n case AppType.Finance:\r\n authCookieName = AuthCookieName.Anon;\r\n break;\r\n case AppType.Edge:\r\n case AppType.EdgeChromium:\r\n case AppType.MMX:\r\n case AppType.Office:\r\n default:\r\n authCookieName = AuthCookieName.AppAnon;\r\n }\r\n\r\n return authCookieName;\r\n }\r\n\r\n /**\r\n * Sets the AccountInfoPromise for the current user.\r\n * If unable to await, ResolvedAccountInfo is also set when the promise is resolved.\r\n */\r\n private setAccountInfoPromise(): void {\r\n this.ResolvedAccountInfo = null;\r\n this.AccountInfoPromise = new Promise((resolve) => {\r\n if (!canUseDOM() || !window.chrome || !window.chrome.authPrivate || !window.chrome.authPrivate.getPrimaryAccountInfo) {\r\n return resolve(null);\r\n }\r\n\r\n const markerName = \"Auth.GetPrimaryAccountInfo\";\r\n const startTime = Math.round(performance.now());\r\n\r\n window.chrome.authPrivate.getPrimaryAccountInfo((accountInfo) => {\r\n const endTime = Math.round(performance.now());\r\n const pageTimings = getPageTimings();\r\n pageTimings[markerName] = endTime - startTime;\r\n\r\n this.ResolvedAccountInfo = accountInfo;\r\n return resolve(accountInfo);\r\n });\r\n });\r\n\r\n // Start the promise asynchronously.\r\n this.AccountInfoPromise;\r\n }\r\n\r\n /**\r\n * Determines the content link host to use.\r\n * @returns The content link host.\r\n */\r\n private createContentLinkHost(): string {\r\n const topLevelDomain = this.currentMarket === Market.ZHCN ? \"cn\" : \"com\";\r\n return \"www.msn.\" + topLevelDomain;\r\n }\r\n\r\n /**\r\n * Reformats the given guid without dashes to a guid string with dashes.\r\n * @param {string} guid - The guid without dashes.\r\n * @returns {string} - The reformatted GUI with dashes.\r\n */\r\n private tryReformatGuid(guid: string): string {\r\n if (guid && guid.length === 32) {\r\n // use a regex to extract the specific substrings to reformat the guid\r\n const matches = guid.match(/(\\w{8})(\\w{4})(\\w{4})(\\w{4})(\\w{12})/i);\r\n if (matches) {\r\n // join all the captured groups from 1-5 to format the final guid string\r\n guid = matches.slice(1).join(\"-\");\r\n }\r\n }\r\n\r\n return guid;\r\n }\r\n\r\n /**\r\n * Sets target scope for current request.\r\n */\r\n private setTargetScope(): void {\r\n if (!headData || !headData.ClientSettings) {\r\n return;\r\n }\r\n\r\n // If user is signed in and \"child\" Cookie exists - set Kids audience mode, otherwise use PCS provided Audience mode.\r\n let audienceMode: AudienceModeType;\r\n if (getCookie(appAnonCookieExistsCookieName) && getCookie(childCookieName)) {\r\n audienceMode = AudienceModeType.Kids;\r\n } else {\r\n audienceMode = headData.ClientSettings.audienceMode || AudienceModeType.Adult;\r\n }\r\n\r\n const { browser, deviceFormFactor, domain, locale, os, pagetype } = headData.ClientSettings;\r\n\r\n this.currentRequestTargetScope = {\r\n audienceMode: audienceMode,\r\n browser: browser,\r\n deviceFormFactor: deviceFormFactor,\r\n domain: domain,\r\n locale: locale,\r\n os: os,\r\n platform: PlatformType.Web,\r\n pageType: pagetype\r\n };\r\n\r\n // if locale is not defined in client settings, try reading it from headData for backward compatibility\r\n if (!this.currentRequestTargetScope.locale && Utility.stringHasData(headData.Locale)) {\r\n const locale = headData.Locale.split(\"-\");\r\n if (locale.length > 1) {\r\n this.currentRequestTargetScope.locale = {\r\n language: locale[0],\r\n // Some spartan locale are in format \"ha-latn-ng\". Here the market is \"ng\" and language is \"ha\"\r\n market: locale[locale.length - 1]\r\n };\r\n }\r\n }\r\n\r\n if (Utility.stringHasData(headData.CurrentFlights)) {\r\n this.currentRequestTargetScope.pageExperiments = headData.CurrentFlights.split(\",\");\r\n }\r\n\r\n this.addWpoFlights();\r\n }\r\n\r\n /**\r\n * Get WpoModel from WpoData that we got from localStorage given the specific WPO\r\n * key\r\n */\r\n private getWpoModel(wpoData: string): WpoModel {\r\n let model: WpoModel;\r\n if (wpoData != null) {\r\n model = tryParseJson(wpoData);\r\n if (model != null) {\r\n model;\r\n }\r\n }\r\n return model;\r\n }\r\n\r\n /**\r\n * Adds WPO flights to the current request target scope pageExperiments.\r\n */\r\n private addWpoFlights(): void {\r\n if (!this.FeatureFlags || !this.FeatureFlags.wpoEnabled) {\r\n return;\r\n }\r\n const WPOModel = this.getWpoModel(this.wpoData);\r\n const flightsCached: string[] = getWpoFlights(WPOModel);\r\n\r\n if (!flightsCached) {\r\n return;\r\n }\r\n const currentPageExperiments = this.currentRequestTargetScope.pageExperiments || [];\r\n this.currentRequestTargetScope.pageExperiments = currentPageExperiments.concat(flightsCached);\r\n }\r\n}\r\n\r\nexport const getAppEnvironment = AppEnvironment.getInstance;\r\n\r\n// appEnvironment can be reinitialized for server side rendering through resetAppEnvironment.\r\nexport let appEnvironment = AppEnvironment.getInstance();\r\n\r\nexport const resetAppEnvironment = AppEnvironment.resetInstance;","// © Microsoft Corporation. All rights reserved.\r\n/**\r\n * Default query param prefix used if none specified\r\n */\r\nexport const DefaultQueryParamPrefix = \"rd\";\r\n/**\r\n * Generates a plain JavaScript object with the client values.\r\n * @param values The values to convert.\r\n */\r\nfunction objectFromSpecification(values) {\r\n const requestDataValue = values;\r\n if (requestDataValue.clientValue !== undefined) {\r\n // If it's a IRequestDataValueSpecification, return the actual getter\r\n return requestDataValue.clientValue;\r\n }\r\n // Otherwise recurse for each key until we find a plain value type\r\n return Object\r\n .keys(values)\r\n .reduce((pv, cv) => (Object.assign(Object.assign({}, pv), { [cv]: objectFromSpecification(values[cv]) })), {});\r\n}\r\n/**\r\n * Allows you to pass data about a request between client and server.\r\n * This interface can be used isomorphically.\r\n *\r\n * The \"spec\" contains \"getters\" to receive the data when called client side.\r\n * To operate server-side you must first serialize the client-side data and pass it via\r\n * query string parameters to the server. You then \"load\" the query string parameters using\r\n * \"loadQueryParams\". Once loaded you can request the data server-side with the same\r\n * interface as the client.\r\n *\r\n * NOTE: The use of URLSearchParams makes this not IE11 compatible without polyfill.\r\n *\r\n * @example\r\n * interface IRequestContext extends IRequestDataObject {\r\n * window: {\r\n * innerWidth: IRequestDataValue\r\n * }\r\n * }\r\n *\r\n * // On client and server\r\n * const rd = new RequestData(\r\n * {\r\n * window: {\r\n * innerWidth: {\r\n * clientValue: window.innerWidth\r\n * }\r\n * }\r\n * });\r\n *\r\n * // Client-side\r\n * const innerWidth = rd.data.window.innerWidth();\r\n *\r\n * const serialized = rd.getSerializedData();\r\n * // Make-call to server\r\n * fetch(`https://assets.msn.com/render?${serialized}`);\r\n *\r\n * // Server-side (in default module)\r\n * requestData.loadQueryParams(req.query)\r\n * const innerWidth = rd.data.window.innerWidth();\r\n */\r\nexport class RequestData {\r\n /**\r\n * @param spec Spec contains serialization metadata as well as client and server value getters\r\n * @param qspPrefix Prefix to append to serialized query string parameters\r\n */\r\n constructor(spec, qspPrefix) {\r\n this.spec = spec;\r\n this.qspPrefix = qspPrefix || DefaultQueryParamPrefix;\r\n }\r\n get verParam() {\r\n return `${this.qspPrefix}.ver`;\r\n }\r\n /**\r\n * Will return memoized values in the same structure as IRequestDataSpecification,\r\n * or the data loaded into\r\n */\r\n get data() {\r\n if (this.memo === undefined) {\r\n // Assume we're client-side if we haven't memoized query string params\r\n this.memo = objectFromSpecification(this.spec.spec);\r\n }\r\n return this.memo;\r\n }\r\n /**\r\n * Loads all query string parameters prefixed with qspPrefix into request data.\r\n * @param qsp The query string params to parse. It is safe to pass in the entire query--not just data prefixed by qspPrefix.\r\n */\r\n loadQueryParams(qsp) {\r\n if (this.memo !== undefined) {\r\n throw \"overwriting existing query string parameters.\";\r\n }\r\n const ver = qsp.get([this.qspPrefix, \"ver\"].join(\".\"));\r\n if (ver !== this.spec.ver) {\r\n throw `unmatched spec version: expected \"${this.spec.ver}\" but got ${ver}.`;\r\n }\r\n this.memo = {};\r\n // Load each query string parameter one at a time\r\n qsp.forEach((value, qp) => {\r\n if (!qp.startsWith(this.qspPrefix)) {\r\n // We don't belong in this set (we don't have the right prefix)--ignore.\r\n return;\r\n }\r\n if (qp === this.verParam) {\r\n // Skip version\r\n return;\r\n }\r\n // Split key by dots and remove prefix\r\n const split = qp.split(\".\").slice(1);\r\n let current = this.memo;\r\n split.forEach((key, i) => {\r\n let newValue = {}; // assume object unless last in list\r\n if (i === split.length - 1) {\r\n try {\r\n newValue = () => JSON.parse(value);\r\n }\r\n catch (ex) {\r\n // Reset memo to undefined and re-throw\r\n this.memo = undefined;\r\n throw ex;\r\n }\r\n }\r\n if (!Object.prototype.hasOwnProperty.call(current, key)) {\r\n current[key] = newValue;\r\n }\r\n if (typeof newValue === \"object\") {\r\n // Already exists--don't overwrite\r\n current = current[key];\r\n return;\r\n }\r\n });\r\n });\r\n }\r\n /**\r\n * Gets the stored values serialized as strings\r\n */\r\n getURLSearchParams() {\r\n const params = new URLSearchParams();\r\n /**\r\n * recurse traverses the data object to build dotted prefixes.\r\n * e.g.\r\n * { a: { b: { c: 5 } } } becomes a.b.c=5\r\n */\r\n const recurse = (obj, prefix) => {\r\n Object.keys(obj).forEach(k => {\r\n const current = obj[k];\r\n const currentPrefix = [...prefix, k];\r\n if (typeof current === \"object\") {\r\n recurse(current, currentPrefix);\r\n return;\r\n }\r\n // This will put explicit quotes (%22) around strings in the query, which is intentional\r\n // so JSON.parse is able to determine the correct type for the value.\r\n params.append(currentPrefix.join(\".\"), JSON.stringify(current()));\r\n });\r\n };\r\n recurse(this.data, [this.qspPrefix]);\r\n params.sort();\r\n // Version is always at the end\r\n params.append(this.verParam, this.spec.ver);\r\n return params;\r\n }\r\n /**\r\n * Sort the search params and serialize them to string.\r\n */\r\n getSerializedData() {\r\n return this.getURLSearchParams().toString();\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n// These values should match those found in experiences-base/ColumnWidths.ts\r\nconst DefaultSize2ColumnWidth = 624;\r\nconst DefaultSize3ColumnWidth = 948;\r\nconst DefaultSize4ColumnWidth = 1272;\r\n\r\nconst contentBuffer = 32;\r\n\r\n// The breakpoints to determine the breakpoint from\r\nexport const breakpoints: number[] = [\r\n 0,\r\n DefaultSize2ColumnWidth + contentBuffer,\r\n DefaultSize3ColumnWidth + contentBuffer,\r\n DefaultSize4ColumnWidth + contentBuffer\r\n];","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { identifyBreakpoint } from \"@microsoft/fast-layouts-react\";\r\nimport { breakpoints } from \"./SSRInteropContractHelpers\";\r\n\r\n/**\r\n * The param-name prefix used when serializing params onto the query string.\r\n */\r\nexport const SSRRequestDataPrefix = \"rd\";\r\n\r\n/**\r\n * Defines the \"interop\" contract between client and server-side renderer.\r\n * All of these values will be serialized into request parameters to be passed\r\n * on the HTTP request to the SSR server.\r\n */\r\nexport const SSRContract = {\r\n ver: \"0.1.0\",\r\n spec: {\r\n // IWindow\r\n innerWidth: {\r\n clientValue: () => window.innerWidth\r\n },\r\n innerHeight: {\r\n clientValue: () => window.innerHeight\r\n },\r\n breakpoint: {\r\n clientValue: () => identifyBreakpoint(window.innerWidth, breakpoints)\r\n },\r\n locationHash: {\r\n clientValue: () => window.location.hash\r\n },\r\n locationHref: {\r\n clientValue: () => window.location.href\r\n },\r\n locationHost: {\r\n clientValue: () => window.location.host\r\n },\r\n locationHostName: {\r\n clientValue: () => window.location.hostname\r\n },\r\n locationOrigin: {\r\n clientValue: () => window.location.origin\r\n },\r\n locationPathName: {\r\n clientValue: () => window.location.pathname\r\n },\r\n locationProtocol: {\r\n clientValue: () => window.location.protocol\r\n },\r\n locationSearch: {\r\n clientValue: () => window.location.search\r\n },\r\n // IBrowser\r\n canUseCssGrid: {\r\n clientValue: () => ((window.CSS && window.CSS.supports && CSS.supports(\"display\", \"grid\")) || false)\r\n },\r\n // IDevice\r\n devicePixelRatio: {\r\n clientValue: () => window.devicePixelRatio\r\n },\r\n // ILocale\r\n language: {\r\n clientValue: () => document.documentElement.lang\r\n },\r\n direction: {\r\n clientValue: () => document.documentElement.dir\r\n }\r\n }\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppEnvironment, appEnvironment } from \"..\";\r\nimport { IRequestContext, IRequestData } from \"./IRequestContext\";\r\nimport { IRequestDataInteropValue, IRequestDataSpecification, RequestData } from \"@msnews/ssr-server\";\r\nimport { SSRContract, SSRRequestDataPrefix } from \"@msnews/isomorphic-util\";\r\n\r\n/**\r\n * Defines the parameters used to create a request contract.\r\n * Destructured from an object due to the combinations of parameters that are valid.\r\n */\r\nexport interface IRequestContextContract {\r\n /**\r\n * URL Search params that contain request data (client-side values sent to the server).\r\n * Only required when called server-side\r\n */\r\n params?: URLSearchParams;\r\n\r\n /**\r\n * The prefix to use to pull query params related to request data.\r\n */\r\n qspPrefix?: string;\r\n\r\n /**\r\n * The specification defining what request data should be passed between client and server.\r\n */\r\n spec?: IRequestDataSpecification;\r\n}\r\n\r\n/**\r\n * Used to propagate client-only data (like window.innerWidth) and singletons (like AppEnvironment)\r\n * in a non-global way to assist in making all libs/components/experiences isomorphic.\r\n */\r\nexport class RequestContext implements IRequestContext {\r\n private requestData: RequestData;\r\n private RequestId: string;\r\n\r\n /**\r\n * Create a new request context.\r\n *\r\n * If spec or qspPrefix is not provided it will use the defaults specified in \"@msnews/isomorphic-util\"\r\n *\r\n * @param IRequestContextContract parameters used to initialize the request context\r\n */\r\n constructor({ params, qspPrefix, spec }: IRequestContextContract = {}, requestId?: string) {\r\n this.requestData = new RequestData(spec || SSRContract, qspPrefix || SSRRequestDataPrefix);\r\n if (params) {\r\n this.requestData.loadQueryParams(params);\r\n }\r\n if (requestId) {\r\n this.RequestId = requestId;\r\n }\r\n }\r\n\r\n /**\r\n * The request ID is used to distinguish requests server-side.\r\n * This method passes through the app environment ActivityId\r\n */\r\n public get requestId(): string {\r\n return this.RequestId || this.app.ActivityId;\r\n }\r\n\r\n /**\r\n * The current app environment.\r\n */\r\n public get app(): AppEnvironment {\r\n // TODO: Remove global reference and add to the constructor parameters.\r\n // The constructor should create a new app environment or accept an optional override.\r\n return appEnvironment;\r\n }\r\n\r\n /**\r\n * The current request data. i.e. client-side data that is passed\r\n * between client and server.\r\n */\r\n public get data(): IRequestData {\r\n return this.requestData.data;\r\n }\r\n}\r\n\r\n/**\r\n * Get clientValue from data getter.\r\n * @param dataGetter the data getter to get client-side value from spec\r\n * @param dataName the data name\r\n * @param throwException If true, throws an exception\r\n */\r\nexport function getContextData(dataGetter: any, dataName: string, throwException = true) {\r\n if ((typeof(dataGetter) === \"function\")) {\r\n const value = dataGetter();\r\n if (value || value === 0) {\r\n return value;\r\n }\r\n }\r\n if (throwException) {\r\n throw new Error(\"Expected \" + dataName + \" to return value. Possible invalid RequestContext spec used or the spec doesn't contain this data.\");\r\n }\r\n return undefined;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * locationHref of page\r\n */\r\nexport const locationHref = (typeof (window) !== \"undefined\" ? window.location.href : \"\");\r\n\r\n/**\r\n * Render-cache expiration time in ms\r\n * 86400000 = 24 hours in milliseconds\r\n */\r\nexport const defaultExpirationTimeMs = 86400000;\r\n\r\n/**\r\n * Render-cache force expiration time in ms\r\n * 129600000 = 36 hours in milliseconds\r\n */\r\nexport const defaultForceExpirationTimeMs = 129600000;\r\n\r\n/**\r\n * localStorage key prefix for render cache expiration timestamp\r\n * Stores the sliding window expiration\r\n */\r\nexport const expirationPrefix = \"timestamp_\";\r\n\r\n/**\r\n * Force timestamp prefix for render cache values\r\n * Stores the absolute window expiration\r\n */\r\nexport const forceTimestampPrefix = \"force_timestamp_\";\r\n\r\n/**\r\n * Jss map suffix for render cache values\r\n * Stores the jss class list map\r\n */\r\nexport const jssMapSuffix = \"_jssMap\";\r\n\r\n/**\r\n * Prefix for render cache keys\r\n * Stores the collection of all render cache keys\r\n */\r\nexport const keysPrefix = \"keys_\";\r\n\r\n/**\r\n * Prefix for render cache qsp to remove and normlize the url\r\n */\r\nexport const normalizedUrlConfigkey = \"rcqsp\";\r\n\r\n/**\r\n * localStorage key prefix for render cache object\r\n * Stores the render cache snapshot\r\n */\r\nexport const storagePrefix = \"lastKnown_\";\r\n\r\n/**\r\n * River Render Cache ClassName\r\n */\r\nexport const riverRcClassName = \"river-rc\";\r\n\r\n/**\r\n * localStorage key for JSS Map object\r\n */\r\nexport const jssMapKey = `${storagePrefix}${locationHref}_jssmap`;\r\n\r\n/**\r\n * localStorage key for render cache object\r\n */\r\nexport const renderCacheKey = `${storagePrefix}${locationHref}`;\r\n\r\n/**\r\n * localStorage key for render cache expiration timestamp\r\n */\r\nexport const renderCacheExpirationKey = `${expirationPrefix}${locationHref}`;\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * A callback to reset singleton data. Used for server side rendering.\r\n */\r\nexport type ResetCallback = () => void;\r\n\r\n/**\r\n * Global array of callbacks that are used for resetting singleton data.\r\n */\r\nconst resetCallbacks: ResetCallback[] = [];\r\n\r\n/**\r\n * Adds a callback to the global array of reset callbacks.\r\n * This should only be used to reset singleton data.\r\n * @param callback The function that resets the singleton data.\r\n */\r\nexport function registerResetCallback(callback: ResetCallback): void {\r\n resetCallbacks.push(callback);\r\n}\r\n\r\n/**\r\n * Calls all of the reset functions in resetCallbacks.\r\n * This gets called once on the server side at the beginning of each request.\r\n */\r\nexport function invokeResetCallbacks(): void {\r\n for (const resetCallback of resetCallbacks) {\r\n resetCallback();\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { WpoModel } from \".\";\r\nimport { ITargetScope } from \"cms-models-msn/configuration/ITargetScope\";\r\n\r\n/**\r\n * Get storage cache key used to store WPO service response.\r\n * @param {string} appType - The appType value.\r\n * @param {ITargetScope} targetScope - The current page request target scope.\r\n * @returns string - Cache key string.\r\n */\r\nexport function getWpoStorageCacheKey(appType: string, targetScope: ITargetScope): string {\r\n const { audienceMode = \"\", locale = {}, pageType = \"\" } = targetScope || {};\r\n const { language, market } = locale;\r\n\r\n return `wpo_data_ ${audienceMode}_${language}_${market}_${pageType}_${appType}`;\r\n}\r\n\r\n/**\r\n * Extracts the WPO flight ids from the WPOModel object.\r\n * @param {WpoModel} wpoData - The WPOModel object.\r\n * @returns string[] - Array of WPO recommended flight ids\r\n */\r\nexport function getWpoFlights(wpoData: WpoModel): string[] | null {\r\n if (!wpoData || !wpoData.treatments) {\r\n return null;\r\n }\r\n\r\n return wpoData.treatments.map(item => item.id);\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { AppError, AppErrorPropertyBag, Severity } from \"./AppErrorTracker\";\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\n/**\r\n * This file contains the list of errors to log to the server for each feature.\r\n * We are centralizing errors here to make sure we do not have any dupes\\conflicts.\r\n * The idea is that each feature would have their own range of values.\r\n *\r\n * IMPORTANT: Please do not add strings to this file. Please map messages to send in your\r\n * code.\r\n */\r\n\r\n/**\r\n * All app errors are set to create IcM ticket by default unless specified in individual error code otherwise.\r\n */\r\nconst severity = Severity.Alert;\r\n\r\n// Webpack defines the BUILD_NUMBER of client code build number.\r\ndeclare let BUILD_NUMBER: string;\r\n\r\n/**\r\n * Get build number from web pack. If not present, return empty\r\n */\r\nconst pb: AppErrorPropertyBag = {\r\n build: typeof BUILD_NUMBER === \"undefined\"\r\n ? \"\"\r\n : BUILD_NUMBER\r\n};\r\n\r\nexport function updateAppErrorsPropertyBag(newPbInfo: Partial): void {\r\n Object.assign(pb, newPbInfo);\r\n}\r\n\r\nexport function getAppErrorsPropertyBag(): AppErrorPropertyBag {\r\n\r\n const hasSSR = !canUseDOM() || (window as any).RENDER != undefined;\r\n if (hasSSR) {\r\n return {\r\n ...pb,\r\n ssrEnvironment: canUseDOM() ? \"Client\" : \"Server\",\r\n ssrState: canUseDOM() ? (window as any).SSR : false\r\n };\r\n }\r\n\r\n return pb;\r\n}\r\n\r\n/**\r\n * Helper to create an error for logging with message and customMessage properties without having\r\n * to go manually clone the error object, or property bag, etc.\r\n * @param baseError - The base error object to use as prototype for creating the error\r\n * @param message - The custom message to use for the error\r\n * @param customMessage - The custom message that may contain strings that do not aggregate well (i.e., unique / per request data)\r\n */\r\nexport function createError(baseError: AppError, message: string, customMessage?: string): AppError {\r\n return {\r\n ...baseError,\r\n message: message || baseError.message,\r\n pb: customMessage\r\n ? { ...baseError.pb, customMessage }\r\n : baseError.pb\r\n };\r\n}\r\n\r\n/**\r\n * Error during app initialization for Edge page experience.\r\n * Need to mimic the prime one since telemetry cooking logic looks for this\r\n */\r\nexport const EstablishSignedInState: AppError = {\r\n id: 1405,\r\n source: \"EstablishSignInStateHelpers.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Represents a ServiceUI related error */\r\nexport const ServiceUiError: AppError = {\r\n id: 5100,\r\n source: \"ServiceUiComm.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents a Top Sites related error */\r\nexport const TopSitesError: AppError = {\r\n id: 8010,\r\n source: \"TopSites.tsx\",\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents a Top Sites error when there are zero rendered top sites */\r\nexport const ZeroTopSitesError: AppError = {\r\n id: 8011,\r\n source: \"TopSites.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/** Curated sites list is empty */\r\nexport const CuratedSitesEmpty: AppError = {\r\n id: 8012,\r\n source: \"TopSites.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\nconst TopSitesEdgeConnectorFileName = \"TopSitesEdge.connector.tsx\";\r\nconst TopSitesEdgeStorageFileName = \"TopSitesStorage.ts\";\r\n\r\nexport const TopSitesEdgeAppErrors = {\r\n ZeroTopSitesError: {\r\n id: 8013,\r\n source: TopSitesEdgeConnectorFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n CuratedSitesEmpty: {\r\n id: 8014,\r\n source: TopSitesEdgeStorageFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n ComponentMountFailed: {\r\n id: 8015,\r\n source: TopSitesEdgeConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n ErrorFetchingRichTopSitesDataCollectionFromCms: {\r\n id: 8016,\r\n source: TopSitesEdgeStorageFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst TopSitesEdgeNextConnectorFileName = \"TopSitesEdgeNext.connector.tsx\";\r\n\r\nexport const TopSitesEdgeNextAppErrors = {\r\n\r\n /** The React component failed to mount */\r\n ComponentMountFailed: {\r\n id: 8020,\r\n source: TopSitesEdgeNextConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Represents a Top Sites error when there are zero rendered top sites */\r\n ZeroTopSitesError: {\r\n id: 8021,\r\n source: TopSitesEdgeNextConnectorFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nexport const TopSiteDialogAppErrors = {\r\n /** The React component failed to mount */\r\n TopSitesDialogFailedToMount: {\r\n id: 8025,\r\n source: \"TopSitesDialog.tsx\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst OneServiceCardProviderFileName = \"OneServiceCardProvider.ts\";\r\n\r\nexport const OneServiceCardProviderAppErrors = {\r\n EmptyMyFeed: {\r\n id: 8030,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n OneServiceResponseWasNullOrErroneous: {\r\n id: 8031,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n ErrorFetchingOneServiceResponse: {\r\n id: 8032,\r\n source: OneServiceCardProviderFileName,\r\n severity: Severity.HighImpact,\r\n pb\r\n },\r\n\r\n InvalidJsonInOneServiceResponse: {\r\n id: 8033,\r\n source: OneServiceCardProviderFileName,\r\n severity: Severity.HighImpact,\r\n pb\r\n },\r\n\r\n InvalidFeedListInOneServiceResponse: {\r\n id: 8034,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n RiverConfigurationIssue: {\r\n id: 8035,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load views river content based on current vertical/category. */\r\n QueryInterestContentFetchError: {\r\n id: 8036,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n StaticContentLoaded: {\r\n id: 8037,\r\n source: OneServiceCardProviderFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nconst OneServiceDailyBriefApi = \"dailyBriefServiceClient.ts\";\r\n\r\nexport const DailyBriefServiceClientAppErrors = {\r\n OneServiceResponseWasNullOrErroneous: {\r\n id: 8038,\r\n source: OneServiceDailyBriefApi,\r\n severity,\r\n pb\r\n },\r\n\r\n OneServiceArticleListWasNullOrErroneous: {\r\n id: 8039,\r\n source: OneServiceDailyBriefApi,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst ContentPreviewSourceFile = \"ContentPreview.connector.ts\";\r\nconst ContentPreviewDataSourceFile = \"ContentPreviewData.ts\";\r\nconst ExternalContentMapperHelperFile = \"ExternalContentMapperHelper.ts\";\r\n\r\nexport const ContentPreviewAppErrors = {\r\n\r\n ErrorWhileFetchingContentPreviewContent: {\r\n id: 8041,\r\n source: ContentPreviewDataSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n InvalidResponseFromContentPreviewFetch: {\r\n id: 8042,\r\n source: ContentPreviewDataSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n InvalidResponseFromContentPreviewResponseJson: {\r\n id: 8043,\r\n source: ContentPreviewDataSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n ErrorWhileInitializingAsyncContentPreviewContent: {\r\n id: 8044,\r\n source: ContentPreviewSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n InvalidOrMissingContentId: {\r\n id: 8045,\r\n source: ContentPreviewDataSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n MissingDataForExternalContent: {\r\n id: 8046,\r\n source: ExternalContentMapperHelperFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nexport const MissingPartnerLink: AppError = {\r\n id: 8047,\r\n source: ContentPreviewDataSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst RiverSourceFile = \"River.connector.ts\";\r\n\r\nexport const RiverAppErrors = {\r\n UnknownMetadataReceivedFromRiverCardProvider: {\r\n id: 8051,\r\n source: RiverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n RiverContentProviderFetchException: {\r\n id: 8052,\r\n source: RiverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n SkipPositionedCardsFallbackStrategyFailed: {\r\n id: 8053,\r\n source: RiverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n InvalidConfig: {\r\n id: 8054,\r\n source: RiverSourceFile,\r\n severity: Severity.HighImpact,\r\n pb\r\n },\r\n\r\n MissingExperienceTypeMap: {\r\n id: 8055,\r\n source: RiverSourceFile,\r\n severity: Severity.HighImpact,\r\n pb\r\n },\r\n\r\n ChildLoadError: {\r\n id: 8056,\r\n source: RiverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n InitialDataLoadError: {\r\n id: 8057,\r\n source: RiverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Warning for when the ordinal children we get from config contains a duplicate instance id. */\r\n DuplicateInstanceIdWarning: {\r\n id: 8058,\r\n source: RiverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nexport const FullHeightFallbackStrategyFailed: AppError = {\r\n id: 8059,\r\n source: RiverSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst UserInitiatedPageRefreshSourceFile = \"UserInitiatedPageRefresh.ts\";\r\nexport const UserInitiatedPageRefreshErrors = {\r\n Default: {\r\n id: 8060,\r\n source: UserInitiatedPageRefreshSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst PivotContentSourceFile = \"PivotContent.connector.ts\";\r\nexport const PivotContentErrors = {\r\n LoadFailure: {\r\n id: 8070,\r\n source: PivotContentSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst PivotContentV2SourceFile = \"PivotContentV2.connector.ts\";\r\nexport const PivotContentV2Errors = {\r\n LoadFailure: {\r\n id: 8071,\r\n source: PivotContentV2SourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst PivotsNavSourceFile = \"PivotsNav.connector.ts\";\r\nexport const PivotsNavErrors = {\r\n TopicDataConnectorUnavailable: {\r\n id: 8075,\r\n source: PivotsNavSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n NavigationDataConnectorUnavailable: {\r\n id: 8076,\r\n source: PivotsNavSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n DynamicPivotsHelperLoaderFailed: {\r\n id: 8077,\r\n source: PivotsNavSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n LayoutPreferenceDataConnectorUnavailable: {\r\n id: 8078,\r\n source: PivotsNavSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst PivotsNavV2SourceFile = \"PivotsNavV2.connector.ts\";\r\nexport const PivotsNavV2Errors = {\r\n PivotHoverLoadFailure: {\r\n id: 8079,\r\n source: PivotsNavV2SourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Smart list is empty */\r\nexport const SmartListEmpty: AppError = {\r\n id: 8080,\r\n source: \"SmartList.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents BingWebSSO related App errors */\r\nconst BingWebSSOSourceFile = \"BingWebSSO.tsx\";\r\nexport const BingWebSSOAppErrors = {\r\n /** Failed to render bing websso iframe */\r\n BingWebSSORenderFailed: {\r\n id: 8090,\r\n source: BingWebSSOSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** User signed-in to MSA on page but bing SSO returned authentication failed response */\r\n BingWebSSOSignInFailed: {\r\n id: 8091,\r\n source: BingWebSSOSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Bing SSO process did not complete withing required time */\r\n BingWebSSOTimeout: {\r\n id: 8092,\r\n source: BingWebSSOSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst WeatherDataConnectorSourceFile = \"WeatherData.connector.ts\";\r\nconst WeatherCardConnectorSourceFile = \"WeatherCard.connector.ts\";\r\nconst WeatherPdpClientSourceFile = \"WeatherPdpClient.ts\";\r\n/** Failed to fetch weather summary */\r\nexport const WeatherSummaryFetchError: AppError = {\r\n id: 8100,\r\n source: WeatherDataConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** No valid Location set from User */\r\nexport const WeatherLocationEmpty: AppError = {\r\n id: 8101,\r\n source: WeatherDataConnectorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Not able to read from PDP */\r\nexport const WeatherPDPReadFailed: AppError = {\r\n id: 8102,\r\n source: WeatherPdpClientSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Not able to write home location to PDP */\r\nexport const WeatherPDPHomeLocationWriteFailed: AppError = {\r\n id: 8103,\r\n source: WeatherPdpClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Not able to write display Unit to PDP */\r\nexport const WeatherPDPDisplayUnitWriteFailed: AppError = {\r\n id: 8104,\r\n source: WeatherPdpClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Not able to localize Location */\r\nexport const WeatherLocalizeLocationFailed: AppError = {\r\n id: 8105,\r\n source: WeatherDataConnectorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nexport const WeatherCardAppErrors = {\r\n /** Failed to fetch local news */\r\n WeatherLocalNewsFetchError: {\r\n id: 8106,\r\n source: WeatherCardConnectorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** Failed to fetch autosuggest for locations */\r\n WeatherAutoSuggestFetchError: {\r\n id: 8107,\r\n source: WeatherCardConnectorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** No valid Location set from User */\r\n WeatherLocationEmpty: {\r\n id: 8108,\r\n source: WeatherCardConnectorSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Failed to fetch autosuggest for locations */\r\nexport const WeatherAutoSuggestFetchError: AppError = {\r\n id: 8109,\r\n source: WeatherDataConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** for more error about Weather, use 295XX */\r\n\r\nconst SportsPdpServiceClientSourceFile = \"SportsPdpServiceClient.ts\";\r\nexport const SportsCardError = {\r\n /** Failed to fetch league sports pdp */\r\n SportsLeaguePdpFetchError: {\r\n id: 8110,\r\n source: SportsPdpServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to fetch league sports pdp */\r\n SportsLeaguePdpInvalidResponse: {\r\n id: 8111,\r\n source: SportsPdpServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to fetch players sports pdp */\r\n SportsPlayersPdpFetchError: {\r\n id: 8112,\r\n source: SportsPdpServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to fetch players sports pdp */\r\n SportsPlayersPdpInvalidResponse: {\r\n id: 8113,\r\n source: SportsPdpServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to fetch teams sports pdp */\r\n SportsTeamsPdpFetchError: {\r\n id: 8114,\r\n source: SportsPdpServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to fetch teams sports pdp */\r\n SportsTeamsPdpInvalidResponse: {\r\n id: 8115,\r\n source: SportsPdpServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get sports card config */\r\n SportsCardConfigFetchError: {\r\n id: 8116,\r\n source: \"SportsCardConfigReader.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get Team Data */\r\n SportsCardGetFavoriteTeamDataError: {\r\n id: 8117,\r\n source: \"SportsCard.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get Team Data */\r\n SportsCardGetPlayerBioError: {\r\n id: 8118,\r\n source: \"SportsCard.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n SportsCardGetLeaguesGamesArrayError: {\r\n id: 8119,\r\n source: \"SportsCard.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n SportsCardGetPdpDataFailure: {\r\n id: 8120,\r\n source: \"SportsCard.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n SportsCardGetLeagueSeasonYearDataFailure: {\r\n id: 8121,\r\n source: \"SportsCardServiceClient.ts\",\r\n severity,\r\n pb\r\n },\r\n SportsCardGetLocalizedTeamNameDataFailure: {\r\n id: 8122,\r\n source: \"SportsCardServiceClient.ts\",\r\n severity,\r\n pb\r\n },\r\n SportsCardGetTeamDataFailure: {\r\n id: 8123,\r\n source: \"SportsCardServiceClient.ts\",\r\n severity,\r\n pb\r\n },\r\n SportsCardGetLeagueDataFailure: {\r\n id: 8124,\r\n source: \"SportsCardServiceClient.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst MoneyCardConnectorFile = \"MoneyCard.connector.ts\";\r\nconst MoneyPdpServiceClientFile = \"MoneyPdpServiceClient.ts\";\r\nexport const MoneyCardError = {\r\n /** Failed to get quote summary for user */\r\n MoneyQuoteSummaryGetError: {\r\n id: 8130,\r\n source: MoneyCardConnectorFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get quote summaries */\r\n MoneyQuoteSummariesGetError: {\r\n id: 8131,\r\n source: MoneyCardConnectorFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get pdp data */\r\n MoneyPdpDataGetErrorFromService: {\r\n id: 8132,\r\n source: MoneyPdpServiceClientFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get pdp data because of invalid response */\r\n MoneyPdpInvalidResponseFromService: {\r\n id: 8133,\r\n source: MoneyPdpServiceClientFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get quote summary response for user from service client */\r\n MoneyQuoteSummaryGetErrorFromService: {\r\n id: 8134,\r\n source: MoneyPdpServiceClientFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get quote summary response for user from service client because of invalid response */\r\n MoneyQuoteSummaryInvalidResponseFromService: {\r\n id: 8135,\r\n source: MoneyPdpServiceClientFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst TrendingNewsConnectorFile = \"TrendingNews.connector.ts\";\r\nexport const TrendingNewsErrors = {\r\n /** Failed to fetch the trending news stories */\r\n DataFetchError: {\r\n id: 8140,\r\n source: TrendingNewsConnectorFile,\r\n severity,\r\n pb\r\n },\r\n /** Failed to fetch the backup data for trending news stories */\r\n BackupDataFetchError: {\r\n id: 8141,\r\n source: TrendingNewsConnectorFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst ComplexContentPreviewSourceFile = \"ComplexContentPreview.connector.ts\";\r\nexport const ComplexContentPreviewErrors = {\r\n InitError: {\r\n id: 8150,\r\n source: ComplexContentPreviewSourceFile,\r\n severity,\r\n pb\r\n },\r\n LoadError: {\r\n id: 8151,\r\n source: ComplexContentPreviewSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n ContentError: {\r\n id: 8152,\r\n source: ComplexContentPreviewSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const GridSectionAppErrors = {\r\n /** Unable to generate river section cards */\r\n GridSectionCardGenerationError: {\r\n id: 8160,\r\n source: \"GridSection.tsx\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst MmxEntryPointFileName = \"MMXPage.connector.ts\";\r\n\r\nexport const MmxEntryPointAppErrors = {\r\n /**\r\n * MMX river is not able to load Error Page.\r\n */\r\n MmxErrorPage: {\r\n id: 8170,\r\n source: MmxEntryPointFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Error fetching the APP_ANON cookie on MMX page load\r\n */\r\n ErrorFetchingAppAnonCookie: {\r\n id: 8171,\r\n source: \"page.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Warning that MMX server side rendering is skipped and client side rendering is triggered\r\n * due to either server error or slow server response.\r\n */\r\n MMXSSRSkip: {\r\n id: 8172,\r\n source: MmxEntryPointFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\n/**\r\n * Errors related to Background image\r\n * More errors can be found on 386XX\r\n */\r\nconst irisImageHotspotsProviderFile = \"IrisImageHotspotsProvider.ts\";\r\nconst irisMuseumCardFile = \"IrisMuseumCard.tsx\";\r\nconst irisHotspotCtaFile = \"Hotspot.cta.ts\";\r\nconst bingImageProvider = \"BingImageOfTheDayProvider.ts\";\r\nconst freImageProvider = \"FREBackgroundProvider.ts\";\r\n\r\n/** The Bing Image of the Day failed to load properly */\r\nexport const BingIOTDFailedToLoad: AppError = {\r\n id: 8180,\r\n source: bingImageProvider,\r\n severity,\r\n pb\r\n};\r\n\r\n/** The FRE image method has not been implemented */\r\nexport const FREImageMethodNotImplemented: AppError = {\r\n id: 8181,\r\n source: freImageProvider,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Iris call from museum card failed */\r\nexport const ImageMuseumIrisDataFetchFailed: AppError = {\r\n id: 8182,\r\n source: irisMuseumCardFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Hotspots data found for the off page navigation failed inspection. */\r\nexport const InvalidOffPageNavCTA: AppError = {\r\n id: 8183,\r\n source: irisHotspotCtaFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Hotspots cta type or metadata not defined */\r\nexport const CTATypeOrMetdataNotDefined: AppError = {\r\n id: 8184,\r\n source: irisHotspotCtaFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Event not defined */\r\nexport const EventNotDefined: AppError = {\r\n id: 8185,\r\n source: irisHotspotCtaFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Hotspot call to action state not defined */\r\nexport const HotspotCtaStateNotDefined: AppError = {\r\n id: 8186,\r\n source: irisHotspotCtaFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Iris data connector not defined */\r\nexport const ImageIrisDataConnectorUndefined: AppError = {\r\n id: 8187,\r\n source: irisImageHotspotsProviderFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Iris data connector not defined on Museum card */\r\nexport const ImageIrisDataConnectorUndefinedMuseumCard: AppError = {\r\n id: 8188,\r\n source: irisMuseumCardFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Iris data call failed */\r\nexport const ImageIrisDataFetchFailed: AppError = {\r\n id: 8189,\r\n source: irisImageHotspotsProviderFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SettingsDialogAppErrors = {\r\n /** Failed to get the saved layout preferences */\r\n ReadPreferencesFailed: {\r\n id: 8190,\r\n source: \"SettingsDialogEdgeNext.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to fetch the ConfigData object from the client API */\r\n FetchNtpConfigDataFailed: {\r\n id: 8191,\r\n source: \"SettingsDialogEdgeNextBase.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n ChromiumClientEmbededsearchAPIError: {\r\n id: 8192,\r\n source: \"SettingsDialogEdgeNext.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst MsnSettingMenuConnectorFileName = \"MsnSettingMenuConnector.connector.ts\";\r\n\r\nexport const MsnSettingsMenuAppErrors = {\r\n /** Failed to get feedback dialog connector */\r\n FailedToGetFeedbackDialogConnector: {\r\n id: 8193,\r\n source: MsnSettingMenuConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** Failed to get feedback data connector */\r\n FailedToGetFeedbackDataConnector: {\r\n id: 8194,\r\n source: MsnSettingMenuConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** The Msn settings menu failed to load valid config settings */\r\n MsnSettingsMenuFailedToFetchConfig: {\r\n id: 8195,\r\n source: MsnSettingMenuConnectorFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const EdgePageSettingsAppErrors = {\r\n ServiceUiError: {\r\n id: 8196,\r\n source: \"EdgeSettingsProvider.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst ShowFeedConnectorFileName = \"ShowFeed.connector.ts\";\r\n\r\nexport const ShowFeedAppErrors = {\r\n ExpectedDataMissing: {\r\n id: 8198,\r\n source: ShowFeedConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n MissingPageSettings: {\r\n id: 8199,\r\n source: ShowFeedConnectorFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst InfopaneSourceFile = \"Infopane.connector.ts\";\r\nexport const InfopaneErrors = {\r\n InitializeError: {\r\n id: 8201,\r\n source: InfopaneSourceFile,\r\n severity,\r\n pb\r\n },\r\n InvalidConfig: {\r\n id: 8202,\r\n source: InfopaneSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const FeedbackLinkAppErrors = {\r\n /** The Feedback link failed to load valid config settings */\r\n FeedbackLinkFailedToFetchConfig: {\r\n id: 8210,\r\n source: \"FeedbackLink.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n /** Failed to get feedback dialog connector */\r\n FailedToGetFeedbackDialogConnector: {\r\n id: 8211,\r\n source: \"FeedbackLink.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n /** Failed to get feedback data connector */\r\n FailedToGetFeedbackDataConnector: {\r\n id: 8212,\r\n source: \"FeedbackLink.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst FeedbackServiceClientSourceFile = \"FeedbackServiceClient.ts\";\r\nexport const FeedbackDialogAppErrors = {\r\n /** Failed to get feedback data connector */\r\n FailedToGetFeedbackDataConnector: {\r\n id: 8213,\r\n source: \"FeedbackDialog.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n /** Request is not valid, it has no content, or the manifest is not formatted correctly */\r\n BadRequestReportingFeedback: {\r\n id: 8214,\r\n source: FeedbackServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n /** Exception thrown when reporting feedback to OCV */\r\n ExceptionReportingFeedback: {\r\n id: 8215,\r\n source: FeedbackServiceClientSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst WindowsShellSettingFeedbackFileName = \"HeaderWindowsShell.connector.ts\";\r\n\r\n/** The Setting Feedback menu failed to load valid config settings */\r\nexport const WindowsShellSettingFeedbackMenuFailedToFetchConfig: AppError = {\r\n id: 8216,\r\n source: WindowsShellSettingFeedbackFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** The Setting Feedback menu Failed to get feedback dialog connector */\r\nexport const WindowsShellSettingFeedbackMenuFailedToGetFeedbackDialogConnector: AppError = {\r\n id: 8217,\r\n source: WindowsShellSettingFeedbackFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** The Setting Feedback menu Failed to get feedback data connector */\r\nexport const WindowsShellSettingFeedbackMenuFailedToGetFeedbackDataConnector: AppError = {\r\n id: 8218,\r\n source: WindowsShellSettingFeedbackFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst OneFooterConnectorFileName = \"OneFooter.connector.ts\";\r\nexport const OneFooterErrors = {\r\n InvalidConfig: {\r\n id: 8220,\r\n source: OneFooterConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** Failed to get feedback data connector */\r\n FailedToGetFeedbackDataConnector: {\r\n id: 8221,\r\n source: OneFooterConnectorFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const PoweredByLegendAppErrors = {\r\n /** The PoweredBy legend failed to load expected config settings */\r\n PoweredByLegendInvalidConfig: {\r\n id: 8230,\r\n source: \"PoweredByLegend.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst EdgeHeaderConnectorFileName = \"EdgeHeader.connector.ts\";\r\n\r\nexport const EdgeHeaderAppErrors = {\r\n /** The BingImageData Connector was not loaded */\r\n BingImageDataConnectorNotLoaded: {\r\n id: 8240,\r\n source: EdgeHeaderConnectorFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst MicrosoftNewsPageConnectorFileName = \"MicrosoftNewsPage.connector.ts\";\r\n\r\nexport const MicrosoftNewsPageAppErrors = {\r\n /** The BingImageData Connector was not loaded */\r\n BingImageDataConnectorNotLoaded: {\r\n id: 8241,\r\n source: MicrosoftNewsPageConnectorFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst WindowsPageConnectorFileName = \"WindowsPage.connector.ts\";\r\n\r\nexport const WindowsPageAppErrors = {\r\n /** The BingImageData Connector was not loaded */\r\n BingImageDataConnectorNotLoaded: {\r\n id: 8242,\r\n source: WindowsPageConnectorFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst TabbedInfopaneSourceFile = \"TabbedInfopane.connector.ts\";\r\nexport const TabbedInfopaneErrors = {\r\n InitializeError: {\r\n id: 8250,\r\n source: TabbedInfopaneSourceFile,\r\n severity,\r\n pb\r\n },\r\n InvalidConfig: {\r\n id: 8251,\r\n source: TabbedInfopaneSourceFile,\r\n severity,\r\n pb\r\n },\r\n ChildLoadError: {\r\n id: 8252,\r\n source: TabbedInfopaneSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const MeControlAppErrors = {\r\n /** The SSO call failed to return valid SSO sign-in information. */\r\n SSOFailedError: {\r\n id: 8260,\r\n source: \"MeControl.tsx\",\r\n severity,\r\n pb\r\n },\r\n /** The Me Control failed to load */\r\n MeControlLoadFailedError: {\r\n id: 8261,\r\n source: \"MeControl.tsx\",\r\n severity: Severity.HighImpact,\r\n pb\r\n }\r\n};\r\n\r\nconst TabbedInfopaneTabPreviewSourceFile = \"TabbedInfopaneTabPreview.connector.ts\";\r\nexport const TabbedInfopaneTabPreviewErrors = {\r\n InitError: {\r\n id: 8270,\r\n source: TabbedInfopaneTabPreviewSourceFile,\r\n severity,\r\n pb\r\n },\r\n InvalidConfig: {\r\n id: 8271,\r\n source: TabbedInfopaneTabPreviewSourceFile,\r\n severity,\r\n pb\r\n },\r\n LoadError: {\r\n id: 8272,\r\n source: TabbedInfopaneTabPreviewSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const HeaderNavigationLogoAppErrors = {\r\n MegaMenuDataError: {\r\n id: 8280,\r\n source: \"HeaderNavigationLogoConnector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst pageClicksTrackerFileName = \"pageClicksTracker.ts\";\r\nexport const PageClickTrackerErrors = {\r\n InvalidResponse: {\r\n id: 8290,\r\n severity: Severity.NoAlert,\r\n source: pageClicksTrackerFileName,\r\n pb\r\n },\r\n FetchFailure: {\r\n id: 8291,\r\n severity: Severity.NoAlert,\r\n source: pageClicksTrackerFileName,\r\n pb\r\n }\r\n};\r\n\r\nconst TargetingSystemSourceFile = \"TargetingSystem.ts\";\r\nexport const TargetingSystemAppErrors = {\r\n GeneralError: {\r\n id: 8310,\r\n source: TargetingSystemSourceFile,\r\n severity,\r\n pb\r\n },\r\n TopLevelDataMissing: {\r\n id: 8311,\r\n source: TargetingSystemSourceFile,\r\n severity,\r\n pb\r\n },\r\n TrackingDataUPSMissing: {\r\n id: 8312,\r\n source: TargetingSystemSourceFile,\r\n severity,\r\n pb\r\n },\r\n AppEnvironmentValuesMissing: {\r\n id: 8313,\r\n source: TargetingSystemSourceFile,\r\n severity,\r\n pb\r\n },\r\n CallingOneServiceFailed: {\r\n id: 8314,\r\n source: TargetingSystemSourceFile,\r\n severity,\r\n pb\r\n },\r\n CallingUPSServiceFailed: {\r\n id: 8315,\r\n source: TargetingSystemSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst CoachmarkSourceFile = \"Coachmark.connector.ts\";\r\nconst CoachmarkTSX = \"Coachmark.tsx\";\r\nconst CoachmarkCTA = \"Coachmark.cta.ts\";\r\nexport const CoachmarkAppErrors = {\r\n GeneralError: {\r\n id: 8320,\r\n source: CoachmarkTSX,\r\n severity,\r\n pb\r\n },\r\n NotPlaceable: {\r\n id: 8321,\r\n source: CoachmarkTSX,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n NotFoundComponent: {\r\n id: 8322,\r\n source: CoachmarkTSX,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n CoachmarkDataConnectorUndefined: {\r\n id: 8323,\r\n source: CoachmarkSourceFile,\r\n severity,\r\n pb\r\n },\r\n InvalidCTAType: {\r\n id: 8324,\r\n source: CoachmarkCTA,\r\n severity,\r\n pb\r\n },\r\n CTATypeNotDefined: {\r\n id: 8325,\r\n source: CoachmarkCTA,\r\n severity,\r\n pb\r\n },\r\n ConfigDataUndefined: {\r\n id: 8326,\r\n source: CoachmarkSourceFile,\r\n severity,\r\n pb\r\n },\r\n FailedToFetchConfigData: {\r\n id: 8327,\r\n source: CoachmarkSourceFile,\r\n severity,\r\n pb\r\n },\r\n ExceptionFetchingConfigData: {\r\n id: 8328,\r\n source: CoachmarkSourceFile,\r\n severity,\r\n pb\r\n },\r\n EventNotDefined: {\r\n id: 8329,\r\n source: CoachmarkCTA,\r\n severity,\r\n pb\r\n },\r\n CoachmarkStateNotDefined: {\r\n id: 8330,\r\n source: CoachmarkCTA,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst CoachmarkDataConnectorSourceFile = \"CoachmarkData.connector.ts\";\r\nconst CoachmarkPayloadSourceFile = \"CoachmarkPayload.ts\";\r\nconst IrisHandlerSourceFile = \"IrisHandler.ts\";\r\nexport const CoachmarkDataAppErrors = {\r\n InvalidCoachmarkMessage: {\r\n id: 8331,\r\n source: CoachmarkPayloadSourceFile,\r\n severity,\r\n pb\r\n },\r\n IrisDataConnectorUndefined: {\r\n id: 8332,\r\n source: IrisHandlerSourceFile,\r\n severity,\r\n pb\r\n },\r\n ErrorFoundForSurface: {\r\n id: 8334,\r\n source: IrisHandlerSourceFile,\r\n severity,\r\n pb\r\n },\r\n TelemetryInfoUndefined: {\r\n id: 8335,\r\n source: CoachmarkDataConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n EventTypeUndefined: {\r\n id: 8336,\r\n source: CoachmarkDataConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n IrisActionUndefined: {\r\n id: 8337,\r\n source: CoachmarkDataConnectorSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst AppTraceFile = \"AppTrace\";\r\nexport const AppTraceErrors = {\r\n /** Error for when app trace upload fails */\r\n UploadError: {\r\n id: 8350,\r\n source: AppTraceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst ConditionalBannerPayloadSourceFile = \"ConditionalBannerPayload.ts\";\r\nconst ConditionalBannerIrisHandlerSourceFile = \"ConditionalBannerIrisHandler.ts\";\r\n\r\nexport const ConditionalBannerInvalidConditionalBannerMessage: AppError = {\r\n id: 8363,\r\n source: ConditionalBannerPayloadSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ConditionalBannerIrisDataConnectorUndefined: AppError = {\r\n id: 8364,\r\n source: ConditionalBannerIrisHandlerSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ConditionalBannerNoSurfaceFoundForCampaign: AppError = {\r\n id: 8365,\r\n source: ConditionalBannerIrisHandlerSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ConditionalBannerErrorFoundForSurface: AppError = {\r\n id: 8366,\r\n source: ConditionalBannerIrisHandlerSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ConditionalBannerTelemetryInfoUndefined: AppError = {\r\n id: 8367,\r\n source: ConditionalBannerIrisHandlerSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ConditionalBannerEventTypeUndefined: AppError = {\r\n id: 8368,\r\n source: ConditionalBannerIrisHandlerSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ConditionalBannerIrisActionUndefined: AppError = {\r\n id: 8369,\r\n source: ConditionalBannerIrisHandlerSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst SpotlightPreviewSourceFile = \"SpotlightPreview.connector.ts\";\r\n\r\nexport const SpotlightPreviewAppErrors = {\r\n ErrorWhileFetchingSpotlightPreviewCardInfo: {\r\n id: 8401,\r\n source: SpotlightPreviewSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n NoServiceContextMetadata: {\r\n id: 8402,\r\n source: SpotlightPreviewSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst SpotlightSourceFile = \"Spotlight.connector.ts\";\r\nexport const SpotlightErrors = {\r\n UnknownError: {\r\n id: 8500,\r\n source: SpotlightSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n ContentFetchError: {\r\n id: 8501,\r\n source: SpotlightSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n PartnerFetchFail: {\r\n id: 8502,\r\n source: \"PartnerService.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const CommentsErrors: { [key: string]: AppError } = {\r\n NoPost: {\r\n id: 8510,\r\n source: \"Comments.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const CardActionErrors = {\r\n /** Error catch in base CardAction experience container */\r\n CardActionBaseExperienceError: {\r\n id: 8600,\r\n source: \"CardAction.tsx\",\r\n severity,\r\n pb\r\n },\r\n /** Post action failed (Like/Dislike) */\r\n CardActionPostActionError: {\r\n id: 8601,\r\n source: \"CarActionServiceClient.tsx\",\r\n severity,\r\n pb\r\n },\r\n /** Delete action failed (Unlike/Undislike) */\r\n CardActionDeleteActionError: {\r\n id: 8602,\r\n source: \"CardActionServiceClient.tsx\",\r\n severity,\r\n pb\r\n },\r\n /** Get action failed (GetPublisherDetails) */\r\n CardActionGetActionError: {\r\n id: 8603,\r\n source: \"CardActionServiceClient.tsx\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst ContentRelatedSourceFile = \"ContentRelated.connector.ts\";\r\nexport const ContentRelatedErrors = {\r\n /**\r\n * Missing source Id error\r\n */\r\n MissingSourceIdError: {\r\n id: 8700,\r\n source: ContentRelatedSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Invalid sourceIdError\r\n */\r\n InvalidSourceIdError: {\r\n id: 8701,\r\n source: ContentRelatedSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Related contents feed fetch error\r\n */\r\n ContentRelatedFeedFetchError: {\r\n id: 8702,\r\n source: ContentRelatedSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst CookieConsentBannerHelper = \"MsccCookieConsentHelper.ts\";\r\nexport const CookieConsentBannerHelperErrors = {\r\n FailedToParseStaticsUrls: {\r\n id: 8810,\r\n source: CookieConsentBannerHelper,\r\n severity: Severity.HighImpact,\r\n pb\r\n },\r\n ScriptsNotFound: {\r\n id: 8811,\r\n source: CookieConsentBannerHelper,\r\n severity: Severity.HighImpact,\r\n pb\r\n },\r\n StyleSheetsNotFound: {\r\n id: 8812,\r\n source: CookieConsentBannerHelper,\r\n severity: Severity.HighImpact,\r\n pb\r\n },\r\n FailedToMountScript: {\r\n id: 8813,\r\n source: CookieConsentBannerHelper,\r\n severity: Severity.HighImpact,\r\n pb\r\n },\r\n FailedToMountStyleSheet: {\r\n id: 8814,\r\n source: CookieConsentBannerHelper,\r\n severity: Severity.HighImpact,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents IFrame related errors */\r\nconst IFrameSourceFile = \"IFrame.tsx\";\r\nexport const IFrameErrors = {\r\n /** Message received by event listener not from expected origin */\r\n IFrameUnallowedOriginMessage: {\r\n id: 8820,\r\n source: IFrameSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nexport const RightRailCarouselAppErrors = {\r\n NoChildrenExperienceFoundError: {\r\n id: 8830,\r\n source: \"RightRailCarousel.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst Cookies = \"Cookies.ts\";\r\nexport const CookieRelatedErrors = {\r\n SharedStateConnectorNull: {\r\n id: 8840,\r\n source: Cookies,\r\n severity,\r\n pb\r\n },\r\n\r\n CookieNotCategorized: {\r\n id: 8841,\r\n source: Cookies,\r\n severity: Severity.HighImpact,\r\n pb\r\n }\r\n};\r\n\r\nexport const BreakingNewsErrors = {\r\n /** Error fetching Breaking News content */\r\n ContentFetchError: {\r\n id: 8901,\r\n source: \"BreakingNews.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n /** Error fetching Blowout content */\r\n BlowoutDocumentFetchError: {\r\n id: 8902,\r\n source: \"BreakingNews.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const BlowoutErrors = {\r\n /** Error fetching Blowout content */\r\n ContentFetchError: {\r\n id: 8921,\r\n source: \"Blowout.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const OverlayErrors: { [name: string]: AppError } = {\r\n /** Error loading experience */\r\n LoadExperienceError: {\r\n id: 8941,\r\n source: \"Overlay.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const ViewsCommonAppErrors = {\r\n /** Invalid intra article component metadata passed. */\r\n InvalidIntraArticleDataError: {\r\n id: 9001,\r\n source: \"IntraArticleHelper.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to fetch from data api. */\r\n DataFetchError: {\r\n id: 9002,\r\n source: \"ViewsServiceClient.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Invalid content markup encountered. */\r\n InvalidDocumentContentError: {\r\n id: 9003,\r\n source: \"ViewsUtility.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load views paddle data from data api. */\r\n ViewsPaddleDataLoadError: {\r\n id: 9004,\r\n source: \"ViewsPaddle.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Error during app initialization for views page experience. */\r\n ViewsErrorPage: {\r\n id: 9005,\r\n source: \"page.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Error during mapping provider data for views content header experience */\r\n ProviderMapperError: {\r\n id: 9006,\r\n source: \"ViewContentHeader.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const LegacySharingToolbarAppErrors = {\r\n /** Failed to invoke legacy sharing toolbar. */\r\n LegacySharingToolbarInvokeError: {\r\n id: 9100,\r\n source: \"SharingHelper.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load sharing toolbar. */\r\n SharingToolbarLoadError: {\r\n id: 9101,\r\n source: \"LegacySharingToolbar.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Invalid source content id passed in. */\r\n InvalidContentIdError: {\r\n id: 9102,\r\n source: \"LegacySharingToolbar.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents ContentActionsToolbar experience related errors */\r\nconst ContentActionsToolbarConnectorSourceFile = \"ContentActionToolbar.connector.ts\";\r\nconst ContentActionsToolbarSourceFile = \"ContentActionToolbar.tsx\";\r\nconst ContentActionsToolbarServiceClientSourceFile = \"ContentActionToolbarServiceClient.tsx\";\r\nexport const ContentActionsToolbarAppErrors = {\r\n /** Failed to load sharing toolbar - 9120 */\r\n ContentActionsSharingToolbarLoadError: {\r\n id: 9120,\r\n source: ContentActionsToolbarConnectorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** Error fetching article data - 9121 */\r\n ContentActionsArticleDatafetchError: {\r\n id: 9121,\r\n source: ContentActionsToolbarConnectorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** Base Experience error - 9122 */\r\n ContentActionsBaseExperienceError: {\r\n id: 9122,\r\n source: ContentActionsToolbarSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** Get content views action failed (getContentViewsRequest) - 9123 */\r\n ContentActionsGetDocumentDataError: {\r\n id: 9123,\r\n source: ContentActionsToolbarServiceClientSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** Get content status action failed (getContentStatusRequest) - 9124 */\r\n ContentActionsGetContentStatusActionError: {\r\n id: 9124,\r\n source: ContentActionsToolbarServiceClientSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** Delete action failed (Unlike/Undislike) - 9125 */\r\n ContentActionsDeleteActionError: {\r\n id: 9125,\r\n source: ContentActionsToolbarServiceClientSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** Post action failed (Like/Dislike) - 9126 */\r\n ContentActionsPostActionError: {\r\n id: 9126,\r\n source: ContentActionsToolbarServiceClientSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** Prime hybrid error loading the experience - 9127 */\r\n ContentActionsExperienceLoadError: {\r\n id: 9127,\r\n source: ContentActionsToolbarSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** Missing vert/horiz placeholder to flip toolbar - 9128 */\r\n ContentActionsFlipToolbarError: {\r\n id: 9128,\r\n source: ContentActionsToolbarSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** Failed fetching contentStatus - 9129 */\r\n ContentActionsContentStatusFetchError: {\r\n id: 9129,\r\n source: ContentActionsToolbarServiceClientSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /** Failed fetching contentPreview - 9130 */\r\n ContentActionsContentPreviewFetchError: {\r\n id: 9130,\r\n source: ContentActionsToolbarServiceClientSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nexport const ContentSharingToolbarAppErrors = {\r\n ContentSharingToolbarInitializationError: {\r\n id: 9150,\r\n source: \"ContentSharingToolbar.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const ContentProviderAppErrors = {\r\n /** Invalid source article/gallery id passed in. */\r\n InvalidSourceIdError: {\r\n id: 9200,\r\n source: \"ContentProvider.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to fetch provider details. */\r\n ProviderDetailsFetchError: {\r\n id: 9201,\r\n source: \"ContentProvider.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to fetch provider feed. */\r\n ProviderFeedFetchError: {\r\n id: 9202,\r\n source: \"ContentProvider.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Invalid layout template passed in. */\r\n InvalidLayoutTemplate: {\r\n id: 9203,\r\n source: \"ContentProvider.templates.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** ApplicationCache related messages */\r\nconst refreshHeadDataFile = \"Appcache/RefreshHeadDataAppCache.ts\";\r\nconst edgeAppCacheHelperFile = \"Appcache/EdgeApplicationCacheHelper.ts\";\r\nconst refreshHeadDataAppCacheFile = \"page-error-handling/AppCacheErrorHandler.ts\";\r\n\r\nexport const ApplicationCacheMessages = {\r\n FailedToFetchHeadData: {\r\n id: 9310,\r\n source: refreshHeadDataFile,\r\n severity,\r\n pb\r\n },\r\n CatastrophicFailedToFetchHeadData: {\r\n id: 9311,\r\n source: refreshHeadDataFile,\r\n severity,\r\n pb\r\n },\r\n StaleActivityIdEncountered: {\r\n id: 9312,\r\n source: refreshHeadDataFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /**\r\n * The current DOM that is in AppCache doesn't match what should be getting served\r\n * to the user due to the existence of the ntps cookie that defines what the locale should be.\r\n * In this case, we must bypass AppCache to get the proper DOM from PCS.\r\n */\r\n LocaleMismatch: {\r\n id: 9313,\r\n source: edgeAppCacheHelperFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n /**\r\n * Our checks determining we need to bypass appcache for the user are failing\r\n * to detect that the appcache refresh has succeeded. We've tried, for the current page view, to\r\n * bypass without any success.\r\n */\r\n RapidAppcacheForcedRefreshes: {\r\n id: 9314,\r\n source: edgeAppCacheHelperFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n ApplicationCacheAPIErrorEvent: {\r\n id: 9317,\r\n source: refreshHeadDataAppCacheFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n ApplicationCacheAPIObsoleteEvent: {\r\n id: 9318,\r\n source: refreshHeadDataAppCacheFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nconst MsRewardsConnectorSourceFile = \"MsRewards.connector.ts\";\r\nexport const MsRewardsAppErrors = {\r\n RewardsDataConnectorUndefined: {\r\n id: 9400,\r\n source: MsRewardsConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n CategoryKeyOrAppTypeUndefined: {\r\n id: 9401,\r\n source: MsRewardsConnectorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n FailedToFetchCoachmarkUXConfig: {\r\n id: 9402,\r\n source: MsRewardsConnectorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n ConfigDataUndefined: {\r\n id: 9403,\r\n source: MsRewardsConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n FailedToFetchConfigData: {\r\n id: 9404,\r\n source: MsRewardsConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n ExceptionFetchingConfigData: {\r\n id: 9405,\r\n source: MsRewardsConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n ChromiumPageSettingsDataConnectorUndefined: {\r\n id: 9406,\r\n source: MsRewardsConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n PageSettingsStateUndefined: {\r\n id: 9407,\r\n source: MsRewardsConnectorSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst RewardsDataConnectorSourceFile = \"RewardsData.connector.ts\";\r\nconst RewardsPayloadSourceFile = \"RewardsPayload.ts\";\r\nconst RewardsServiceClientSourceFile = \"RewardsServiceClient.ts\";\r\nexport const RewardsDataAppErrors = {\r\n InvalidCreative: {\r\n id: 9420,\r\n source: RewardsPayloadSourceFile,\r\n severity,\r\n pb\r\n },\r\n IrisDataConnectorUndefined: {\r\n id: 9421,\r\n source: IrisHandlerSourceFile,\r\n severity,\r\n pb\r\n },\r\n ErrorFoundForSurface: {\r\n id: 9423,\r\n source: IrisHandlerSourceFile,\r\n severity,\r\n pb\r\n },\r\n CoachmarkDataConnectorUndefined: {\r\n id: 9424,\r\n source: RewardsDataConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n ErrorFetchingUserProfile: {\r\n id: 9425,\r\n source: RewardsServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ExceptionFetchingUserProfile: {\r\n id: 9426,\r\n source: RewardsServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ExceptionReportingRewardActivity: {\r\n id: 9427,\r\n source: RewardsServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n BadRequestReportingRewardActivity: {\r\n id: 9428,\r\n source: RewardsServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n OfferIdNotDefined: {\r\n id: 9429,\r\n source: RewardsDataConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n ActionNameNotDefined: {\r\n id: 9430,\r\n source: RewardsDataConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n InvalidParameters: {\r\n id: 9431,\r\n source: RewardsServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n UnknownErrorsReportingRewardActivity: {\r\n id: 9432,\r\n source: RewardsServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n UnknownErrorOccurred: {\r\n id: 9433,\r\n source: RewardsServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n MaxRetryReachedForUpdatingRewardsPoints: {\r\n id: 9434,\r\n source: RewardsDataConnectorSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst TrendingNewsCardConnectorFile = \"mobile-feed/trending-news/TrendingNews.connector.ts\";\r\n/** Failed to fetch the trending news card in mobile feed */\r\nexport const TrendingNewsDataFetchError: AppError = {\r\n id: 9501,\r\n source: TrendingNewsCardConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to parse JSON data for trending news in mobile feed */\r\nexport const TrendingNewsDataParseError: AppError = {\r\n id: 9502,\r\n source: TrendingNewsCardConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Received null or empty response for trending news in mobile feed */\r\nexport const TrendingNewsEmptyResponseDataError: AppError = {\r\n id: 9503,\r\n source: TrendingNewsCardConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst LocalNewsCardConnectorFile = \"LocalNews.connector.ts\";\r\n/** Failed to fetch the local news card in mobile feed*/\r\nexport const LocalNewsDataFetchError: AppError = {\r\n id: 9601,\r\n source: LocalNewsCardConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to parse JSON data for local news in mobile feed */\r\nexport const LocalNewsDataParseError: AppError = {\r\n id: 9602,\r\n source: LocalNewsCardConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Received null or empty response for local news in mobile feed */\r\nexport const LocalNewsEmptyResponseDataError: AppError = {\r\n id: 9603,\r\n source: LocalNewsCardConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst MobileFeedConnectorFile = \"mobile-feed/MobileFeed.connector.ts\";\r\n/** Failed to prefetch data for mobile feed in super app */\r\nexport const MobileFeedPrefetchError: AppError = {\r\n id: 9701,\r\n source: MobileFeedConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to JSON prase prefetched data for mobile feed in super app */\r\nexport const MobileFeedPrefetchParseError: AppError = {\r\n id: 9702,\r\n source: MobileFeedConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Sesion id not found on next page url in oneservice response */\r\nexport const MobileFeedSessionIdNotFound: AppError = {\r\n id: 9703,\r\n source: MobileFeedConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst MobileFeedShoppingFile = \"mobile-feed/shopping-connector/ShoppingServiceClient.ts\";\r\n/** Failed to prefetch data for mobile feed shopping in super app */\r\nexport const MobileFeedShoppingPrefetchError: AppError = {\r\n id: 9711,\r\n source: MobileFeedShoppingFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to JSON prase prefetched data for mobile feed shopping in super app */\r\nexport const MobileFeedShoppingPrefetchParseError: AppError = {\r\n id: 9712,\r\n source: MobileFeedShoppingFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst MobileFeedFinanceGlanceCardFile = \"mobile-feed/glance-stripe/FinanceGlanceCard.connector.ts\";\r\n/** Failed to prefetch data for mobile feed fiance glance card in super app */\r\nexport const MobileFeedFinanceGlanceCardPrefetchError: AppError = {\r\n id: 9721,\r\n source: MobileFeedFinanceGlanceCardFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to JSON prase prefetched data for mobile feed finance glance card in super app */\r\nexport const MobileFeedFinanceGlanceCardPrefetchParseError: AppError = {\r\n id: 9722,\r\n source: MobileFeedFinanceGlanceCardFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst MobileFeedEsportsGlanceCardFile = \"mobile-feed/glance-stripe/EsportsGlanceCard.connector.ts\";\r\n/** Failed to prefetch data for mobile feed Esports glance card in super app */\r\nexport const MobileFeedEsportsGlanceCardPrefetchError: AppError = {\r\n id: 9731,\r\n source: MobileFeedEsportsGlanceCardFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to JSON prase prefetched data for mobile feed Esports glance card in super app */\r\nexport const MobileFeedEsportsGlanceCardPrefetchParseError: AppError = {\r\n id: 9732,\r\n source: MobileFeedEsportsGlanceCardFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst SuperAppHomepageFile = \"app-types/superapp/Homepage.ts\";\r\nconst SuperAppPersonalizeFile = \"app-types/superapp/Personalize.ts\";\r\n/** Failed to prefetch mobile feed config in super app */\r\nexport const MobileFeedConfigPrefetchError: AppError = {\r\n id: 9741,\r\n source: SuperAppHomepageFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to JSON prase prefetched config for mobile feed in super app */\r\nexport const MobileFeedConfigPrefetchParseError: AppError = {\r\n id: 9742,\r\n source: SuperAppHomepageFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to fetch mobile feed config in super app */\r\nexport const MobileFeedConfigFetchError: AppError = {\r\n id: 9743,\r\n source: SuperAppHomepageFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to JSON prase fetched config for mobile feed in super app */\r\nexport const MobileFeedConfigFetchParseError: AppError = {\r\n id: 9744,\r\n source: SuperAppHomepageFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to generate config url in super app */\r\nexport const MobileFeedConfigGetUrlError: AppError = {\r\n id: 9745,\r\n source: SuperAppPersonalizeFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to fetch InterestV3 config in super app */\r\nexport const InterestV3ConfigFetchError: AppError = {\r\n id: 9746,\r\n source: SuperAppPersonalizeFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst MobileFeedRewardsGlanceCardFile = \"mobile-feed/src/glance-stripe/rewards/RewardsGlanceCard.connector.ts\";\r\n/** Failed to prefetch data for mobile feed rewards glance card in super app */\r\nexport const MobileFeedRewardsGlanceCardPrefetchError: AppError = {\r\n id: 9751,\r\n source: MobileFeedRewardsGlanceCardFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to JSON prase prefetched data for mobile feed finance glance card in super app */\r\nexport const MobileFeedRewardsGlanceCardPrefetchParseError: AppError = {\r\n id: 9752,\r\n source: MobileFeedRewardsGlanceCardFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst TopicCarouselConnectorFile = \"TopicCarousel.connector.ts\";\r\n/** Failed to fetch the topic carousel in mobile feed*/\r\nexport const TopicCarouselDataFetchError: AppError = {\r\n id: 9801,\r\n source: TopicCarouselConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Received null or empty response for topic carousel in mobile feed */\r\nexport const TopicCarouselEmptyResponseDataError: AppError = {\r\n id: 9802,\r\n source: TopicCarouselConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst ViewsGallerySourceFile = \"ViewsGallery.connector.ts\";\r\nexport const ViewsGalleryAppErrors = {\r\n /** Invalid gallery id passed. */\r\n InvalidGalleryIdError: {\r\n id: 10001,\r\n source: ViewsGallerySourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load gallery data. */\r\n GalleryDataLoadError: {\r\n id: 10010,\r\n source: ViewsGallerySourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load images. */\r\n GalleryImagesLoadError: {\r\n id: 10020,\r\n source: ViewsGallerySourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst SlideShowConnectorFile = \"SlideShow.connector.ts\";\r\nconst SlideShowCarouselFile = \"SlideShowCarousel.tsx\";\r\nexport const SlideShowAppErrors = {\r\n /** Invalid slideshow id passed. */\r\n InvalidSlideShowIdError: {\r\n id: 10100,\r\n source: SlideShowConnectorFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load slideshow data. */\r\n SlideShowDataLoadError: {\r\n id: 10110,\r\n source: SlideShowConnectorFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load images. */\r\n SlideShowImagesLoadError: {\r\n id: 10120,\r\n source: SlideShowConnectorFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to ads refresh. */\r\n SlideShowAdsRefreshError: {\r\n id: 10130,\r\n source: SlideShowCarouselFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load image. */\r\n SlideShowImageLoadFailed: {\r\n id: 10135,\r\n source: SlideShowCarouselFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const VideoListAppErrors = {\r\n /** Failed to load the video list data. */\r\n VideoListDataLoadError: {\r\n id: 11001,\r\n source: \"VideoList.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst VideoContentSourceFile = \"VideoContent.connector.ts\";\r\nexport const VideoContentAppErrors = {\r\n /** Failed to load the video content data. */\r\n InvalidResponseFromVideoContentResponseJson: {\r\n id: 11101,\r\n source: VideoContentSourceFile,\r\n severity\r\n },\r\n /** Failed to fetch the video content data from server. */\r\n ErrorWhileFetchingContentPreviewContent: {\r\n id: 11102,\r\n source: VideoContentSourceFile,\r\n severity\r\n }\r\n};\r\n\r\nconst ViewsArticleSourceFile = \"ViewsArticle.connector.ts\";\r\nexport const ViewsArticleAppErrors = {\r\n /** Invalid article id passed. */\r\n InvalidArticleIdError: {\r\n id: 12001,\r\n source: ViewsArticleSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load article data. */\r\n ArticleDataLoadError: {\r\n id: 12002,\r\n source: ViewsArticleSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load intra-article component. */\r\n IntraArticleComponentLoadError: {\r\n id: 12003,\r\n source: ViewsArticleSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to invoke inline gallery experience. */\r\n InlineGalleryInvokeError: {\r\n id: 12004,\r\n source: ViewsArticleSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/**\r\n * Set of errors in Article Page.\r\n */\r\nconst ArticleParserFileName = \"ArticleParser.ts\";\r\nconst ArticleVideoParserFileName = \"VideoParser.ts\";\r\nexport const ArticleInvalidContentError: AppError = {\r\n id: 12100,\r\n source: ArticleParserFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ArticleInvalidVideoIdError: AppError = {\r\n id: 12101,\r\n source: ArticleParserFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ArticleInvalidSlideshowIdError: AppError = {\r\n id: 12102,\r\n source: ArticleParserFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ArticleInvalidVideoContentError: AppError = {\r\n id: 12103,\r\n source: ArticleVideoParserFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ArticleCopyrightTruncateError: AppError = {\r\n id: 12104,\r\n source: ArticleParserFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const InterestsSearchAppErrors = {\r\n /** Received non 200 from OneService */\r\n ErrorResponseFromOneService: {\r\n id: 13000,\r\n source: \"InterestsSearchServiceClient.ts\",\r\n severity,\r\n pb\r\n },\r\n /** Received a response from 200 but didn't have expected structure */\r\n ErrorResponseFromOneServiceIsInvalid: {\r\n id: 13001,\r\n source: \"InterestsSearchServiceClient.ts\",\r\n severity,\r\n pb\r\n },\r\n /**\r\n * When building the XFeed URL for one of the suggestion items,\r\n * we weren't able to build a valid URL\r\n */\r\n InvalidUrlFoundForElement: {\r\n id: 13002,\r\n source: \"InterestsSearch.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n /**\r\n * When building the XFeed URL for one of the suggestion items,\r\n * we weren't able to build a valid URL\r\n */\r\n SelectedItemNotFoundInSuggestions: {\r\n id: 13003,\r\n source: \"InterestsSearch.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n /**\r\n * When building the XFeed URL for one of the suggestion items,\r\n * we weren't able to build a valid URL\r\n */\r\n SelectedItemIsInvalid: {\r\n id: 13004,\r\n source: \"InterestsSearch.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst InterestsConnectorFileName = \"Interests.connector.ts\";\r\nconst SettingsConnectorManagerFileName = \"Setting.connector.manager.ts\";\r\nconst TopicDataConnectorFileName = \"TopicData.connector.ts\";\r\nconst TopicCacheFileName = \"TopicCache.ts\";\r\nconst XfeedConnectorFileName = \"Xfeed.connector.ts\";\r\nexport const InterestsAppErrors = {\r\n /** We could not retrieve the list of Topics from OneService */\r\n InterestsRetrieveTopicsError: {\r\n id: 13100,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** We could not retrieve the user's list of Followed Topics from OneService */\r\n InterestsRetrieveFollowedTopicsError: {\r\n id: 13101,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** We could not retrieve the user's list of Muted Publishers from OneService */\r\n InterestsRetrieveMutedPublishersError: {\r\n id: 13102,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** We could not UnMute a Muted Publisher */\r\n InterestsUnMutePublisherError: {\r\n id: 13103,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** We could not follow a new interests topic */\r\n InterestsFollowTopicError: {\r\n id: 13104,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** We could not unfollow an interests topic */\r\n InterestsUnfollowTopicError: {\r\n id: 13105,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** TopicState should not be undefined */\r\n InterestsTopicStateUndefined: {\r\n id: 13106,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** Topics should have rendered */\r\n InterestsShouldHaveRendered: {\r\n id: 13107,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** Could not retrieve a specific topic */\r\n InterestsRetrieveTopicError: {\r\n id: 13108,\r\n source: XfeedConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** We could not retrieve the user's list of Saved Stories from OneService */\r\n InterestsRetrieveSavedStoriesError: {\r\n id: 13109,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** Saved stories config is invalid */\r\n InterestsSavedStoriesInvalidConfigError: {\r\n id: 13110,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** We could not load saved stories children */\r\n InterestsSavedStoriesChildLoadError: {\r\n id: 13111,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** OneService response for saved stories had invalid json */\r\n InterestsSavedStoriesInvalidJsonError: {\r\n id: 13112,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** OneService response for saved stories had invalid list of response */\r\n InterestsSavedStoriesInvalidListError: {\r\n id: 13113,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** We could not retrieve the user's list of Recommended Topics from OneService */\r\n InterestsRetrieveRecommendedTopicsError: {\r\n id: 13114,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** Topic Data Connector is not defined */\r\n UndefinedTopicDataConnector: {\r\n id: 13115,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** We could not retrieve the user's list of Read Stories from OneService */\r\n InterestsRetrieveReadStoriesError: {\r\n id: 13116,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** Read stories config is invalid */\r\n InterestsReadStoriesInvalidConfigError: {\r\n id: 13117,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** We could not load Read stories children */\r\n InterestsReadStoriesChildLoadError: {\r\n id: 13118,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** OneService response for Read stories had invalid json */\r\n InterestsReadStoriesInvalidJsonError: {\r\n id: 13119,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** OneService response for Read stories had invalid list of response */\r\n InterestsReadStoriesInvalidListError: {\r\n id: 13120,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** OneService failed resetting user default set of interests */\r\n FailedRestoringDefaultTopicsError: {\r\n id: 13121,\r\n source: InterestsConnectorFileName,\r\n severity,\r\n pb\r\n },\r\n /** Failed opening topics IndexedDB connection */\r\n TopicsFailedIndexedDBConnection: {\r\n id: 13122,\r\n source: TopicCacheFileName,\r\n severity,\r\n pb\r\n },\r\n /** Failed getting topics indexedDB */\r\n TopicsFailedGettingIndexedDB: {\r\n id: 13123,\r\n source: TopicCacheFileName,\r\n severity,\r\n pb\r\n },\r\n /** Failed updating topics indexedDB */\r\n TopicsFailedUpdatingIndexedDB: {\r\n id: 13124,\r\n source: TopicCacheFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Failed updating segment card user settings to one service */\r\nexport const FailedUpdatingUserSegmentCardsPreferences: AppError = {\r\n id: 13125,\r\n source: SettingsConnectorManagerFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed while checking if topic has limited data in feed */\r\nexport const TopicsFailedCheckingLimitedFeed: AppError = {\r\n id: 13126,\r\n source: TopicDataConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst ComponentConnector = \"ComponentConnector.ts\";\r\n\r\n/** {ComponentConnector} base app errors */\r\nexport const ComponentConnectorAppErrors = {\r\n\r\n /** Duplicate child experience instance found */\r\n DuplicateChildInstanceFound: {\r\n id: 14000,\r\n source: ComponentConnector,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load bundle */\r\n BundleLoadError: {\r\n id: 14001,\r\n source: ComponentConnector,\r\n severity,\r\n pb\r\n },\r\n\r\n /** ChildConfigInfoList is null */\r\n ChildConfigInfoListNull: {\r\n id: 14002,\r\n source: ComponentConnector,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Merge List start position must be greater than 0 */\r\n ListStartPositionInvalid: {\r\n id: 14003,\r\n source: ComponentConnector,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to delay load child bundle */\r\n ChildDelayLoadError: {\r\n id: 14004,\r\n source: ComponentConnector,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Milestone dependency failed to resolve and timeout triggered */\r\n ExperienceDependencyTimeout: {\r\n id: 14005,\r\n source: ComponentConnector,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\n/** Data connector loading failed */\r\nexport const LoadDataConnectorConfigFailed: AppError = {\r\n id: 14006,\r\n source: ComponentConnector,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Data connector loading failed */\r\nexport const LoadDataConnectorFailed: AppError = {\r\n id: 14007,\r\n source: ComponentConnector,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Attempted to load child with invalid experience */\r\nexport const ChildWithInvalidExperience: AppError = {\r\n id: 14008,\r\n source: ComponentConnector,\r\n severity,\r\n pb\r\n};\r\n\r\n/** App errors for {ExperienceLoader} */\r\nexport const ExperienceLoaderAppErrors = {\r\n /** Logged when neither the config type nor config HREF was provided to the loader */\r\n InsufficientLoadArgs: {\r\n id: 14100,\r\n source: \"ExperienceLoader.ts\",\r\n severity: Severity.HighImpact,\r\n pb\r\n }\r\n};\r\n\r\n/** Logged when ConnectComponent call in getConnectedExperience fails */\r\nexport const ConnectComponentFailureError: AppError = {\r\n id: 14101,\r\n source: \"ExperienceLoader.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/** Logged when loadComponent fails */\r\nexport const LoadComponentFailureError: AppError = {\r\n id: 14102,\r\n source: \"ExperienceLoader.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents SearchHistoryCommon related App errors */\r\nconst SearchHistoryCommonSourceFile = \"SearchHistoryCommon.tsx\";\r\nexport const SearchHistoryCommonAppErrors = {\r\n /** Failed to parse search history response */\r\n ResponseParsingFailed: {\r\n id: 15000,\r\n source: SearchHistoryCommonSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Search history service call failed */\r\n ServiceCallFailed: {\r\n id: 15001,\r\n source: SearchHistoryCommonSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to render search history */\r\n RenderFailed: {\r\n id: 15002,\r\n source: SearchHistoryCommonSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Search history api response not received within configured time */\r\n Timeout: {\r\n id: 15003,\r\n source: SearchHistoryCommonSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Search history api call unauthorized */\r\n Unauthorized: {\r\n id: 15004,\r\n source: SearchHistoryCommonSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Search history api call forbidden */\r\n Forbidden: {\r\n id: 15005,\r\n source: SearchHistoryCommonSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Search history api not able to find recent search associated with this request */\r\n NotFound: {\r\n id: 15006,\r\n source: SearchHistoryCommonSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Search history api response not received within configured time but wait for searchHistoryFetchPromise to be completed */\r\n TimeoutDetail: {\r\n id: 15007,\r\n source: SearchHistoryCommonSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents search history edgenext failed to render */\r\nexport const SearchHistoryEdgenextRenderFailed: AppError = {\r\n id: 15008,\r\n source: \"SearchHistoryEdgenext.tsx\",\r\n severity: Severity.HighImpact,\r\n pb\r\n};\r\n\r\nconst SearchHistoryEdgeNextSourceFile = \"SearchHistoryEdgenext.connector.ts\";\r\n/** Represents failed to retrieve account type */\r\nexport const FailedToRetrieveAccountType: AppError = {\r\n id: 15009,\r\n source: SearchHistoryEdgeNextSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Represents failed to retrieve account info */\r\nexport const FailedToRetrieveAccountInfo: AppError = {\r\n id: 15010,\r\n source: SearchHistoryEdgeNextSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Represents failed to get access token */\r\nexport const FailedToGetAccessToken: AppError = {\r\n id: 15011,\r\n source: SearchHistoryEdgeNextSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Represents a Search related error */\r\nexport const SearchError: AppError = {\r\n id: 15100,\r\n source: \"SearchBox.tsx\",\r\n severity: Severity.HighImpact,\r\n pb\r\n};\r\n\r\n/** Represents missing form code/parameters related App errors */\r\nexport const MissingFormCode: AppError = {\r\n id: 15101,\r\n source: \"SearchBoxCommon.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents RecommendedSearch related App errors */\r\nconst RecommendedSearchSourceFile = \"RecommendedSearchDataService.ts\";\r\nexport const RecommendedSearchErrors = {\r\n /** Warning for failed to parse recommended search response */\r\n ResponseParsingFailed: {\r\n id: 15200,\r\n source: RecommendedSearchSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** warning for recommended search service returned invalid Json response */\r\n InvalidJsonResponse: {\r\n id: 15201,\r\n source: RecommendedSearchSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** Warning for recommended search service call failed */\r\n ServiceCallFailed: {\r\n id: 15202,\r\n source: RecommendedSearchSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** Failed to render recommended searches */\r\n RenderFailed: {\r\n id: 15203,\r\n source: RecommendedSearchSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Warning for recommended search api response not received within configured time */\r\n Timeout: {\r\n id: 15204,\r\n source: RecommendedSearchSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** recommended search back fill failed to fetch content from CMS */\r\n ContentFetchError: {\r\n id: 15205,\r\n source: RecommendedSearchSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents recommende search below search box rendered failed to render */\r\nexport const RecommendedSearchBelowSearchBoxRenderFailed: AppError = {\r\n id: 15211,\r\n source: \"RecommendedSearchBelowSearchBox.tsx\",\r\n severity: Severity.Critical,\r\n pb\r\n};\r\n\r\n/** Represents Trending Now related app errors */\r\nconst TrendingNowSourceFile = \"TrendingNow.connector.ts\";\r\nexport const TrendingNowErrors = {\r\n /** Failed to fetch Trending now content from CMS */\r\n ContentFetchError: {\r\n id: 15250,\r\n source: TrendingNowSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to fetch child experience config */\r\n FailedToFetchConfig: {\r\n id: 15251,\r\n source: TrendingNowSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load child experience */\r\n FailedToLoadChildExperience: {\r\n id: 15252,\r\n source: TrendingNowSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** OCID not set for canvas */\r\n OCIDNotSetWarning: {\r\n id: 15253,\r\n source: \"TrendingNowServiceClient.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nconst RelatedSearchesCardConnectorFile = \"RelatedSearchesCard.connector.ts\";\r\nexport const RelatedSearchesNoSearchTerm: AppError = {\r\n id: 15260,\r\n source: RelatedSearchesCardConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const RelatedSearchesServiceCallError: AppError = {\r\n id: 15261,\r\n source: RelatedSearchesCardConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const RelatedSearchesResponseEmpty: AppError = {\r\n id: 15262,\r\n source: RelatedSearchesCardConnectorFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Represents Voice Search related app errors */\r\nexport const VoiceSearchErrors = {\r\n /** Failed to render Voice Search */\r\n RenderFailed: {\r\n id: 15300,\r\n source: \"VoiceSearch.tsx\",\r\n severity: Severity.Critical,\r\n pb\r\n },\r\n\r\n /** Represents SearchBoxCommon Voice Search not configured App errors */\r\n SearchBoxCommonVoiceSearchError: {\r\n id: 15301,\r\n source: \"SearchBoxCommon.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Represents SearchBoxEdgeNext Voice Search not configured App errors */\r\n SearchBoxEdgeNextVoiceSearchError: {\r\n id: 15302,\r\n source: \"SearchBoxEdgeNext.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Represents Voice Search communication App errors */\r\n CommunicationsError: {\r\n id: 15303,\r\n source: \"VoiceSearch.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst PollsCardConnectorSourceFile = \"PollsCard.connector.ts\";\r\nconst PollsCardSchemaTransformerFile = \"PollsCard.SchemaTransformer.ts\";\r\nexport const PollsCardAppErrors = {\r\n /**\r\n * Failed to fetch polls list\r\n */\r\n PollsListFetchError: {\r\n id: 18000,\r\n source: PollsCardConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Failed to fetch poll data\r\n */\r\n PollDataFetchError: {\r\n id: 18001,\r\n source: PollsCardConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * No data{questions} for poll\r\n */\r\n PollsCardInvalidPoll: {\r\n id: 18002,\r\n source: PollsCardConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Invalid Poll Quiz\r\n */\r\n PollsCardInvalidQuizPoll: {\r\n id: 18003,\r\n source: PollsCardConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * PollsVoteError\r\n */\r\n PollsCardVoteError: {\r\n id: 18004,\r\n source: PollsCardConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * PollsMapStateToPropsError\r\n */\r\n PollsCardMapStateToPropsError: {\r\n id: 18005,\r\n source: PollsCardConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * PollsUnknownError\r\n */\r\n PollsUnknownError: {\r\n id: 18006,\r\n source: PollsCardConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Poll Result Percentage Error\r\n */\r\n PollsResultPercentageError: {\r\n id: 18007,\r\n source: PollsCardConnectorSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const PollAutoCuratedErrors = {\r\n /**\r\n * Poll Auto curate content error\r\n */\r\n PollAutoCuratedContentError: {\r\n id: 18008,\r\n source: PollsCardConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Poll Auto curate content error\r\n */\r\n PollAutoCuratedInvalid: {\r\n id: 18009,\r\n source: PollsCardSchemaTransformerFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Poll Auto curate content error\r\n */\r\n PollAutoCuratedResultsFetchError: {\r\n id: 18010,\r\n source: PollsCardConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n PollAutoCuratedResultsTransformError: {\r\n id: 18011,\r\n source: PollsCardSchemaTransformerFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const EdgeNextAppErrors = {\r\n /**\r\n * Error during a critical error on the EdgeNext page. This can be during initialization or a react rendering error.\r\n */\r\n EdgeNextErrorPage: {\r\n id: 19000,\r\n source: \"page.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Error fetching the APP_ANON cookie on EdgeNext page load */\r\n ErrorFetchingAppAnonCookie: {\r\n id: 19001,\r\n source: \"page.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Tracking errors where we ended up showing the local ntp page on bundle syntax errors.\r\n */\r\n EdgeNextLocalNTPPageShownSyntaxErrors: {\r\n id: 19002,\r\n source: \"page.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Tracking errors where we ended up showing the local ntp page on bundle failures.\r\n */\r\n EdgeNextLocalNTPPageShownBundleFailureErrors: {\r\n id: 19003,\r\n source: \"page.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Tracking errors where we ended up showing the local ntp page on page exception.\r\n */\r\n EdgeNextLocalNTPPageShownPageExceptionError: {\r\n id: 19004,\r\n source: \"page.ts\",\r\n severity: Severity.Critical,\r\n pb\r\n },\r\n\r\n /**\r\n * Tracking errors where we ended up showing the local ntp page on page exception.\r\n */\r\n EdgeNextLocalNTPPageShownJSSMismatchExceptionError: {\r\n id: 19005,\r\n source: \"page.ts\",\r\n severity: Severity.Critical,\r\n pb\r\n },\r\n\r\n /**\r\n * Tracking errors where we ended up reloading the NTP page on jss mismatch exception.\r\n */\r\n EdgeNextPageReloadedPageExceptionError: {\r\n id: 19010,\r\n source: \"page.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Tracking errors where we ended up reloading the NTP page on jss mismatch exception.\r\n */\r\n EdgeNextPageReloadedJSSMismatchExceptionError: {\r\n id: 19011,\r\n source: \"PersistRenderCache.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst AdRefreshSourceFile = \"AdsRefresh.ts\";\r\nconst ApnWrapperSourceFile = \"AppnexusWrapper.ts\";\r\nconst DisplayAdsAdsDetectionSourceFile = \"AdsDetection.ts\";\r\nconst DisplayAdsConnectorSourceFile = \"DisplayAds.connector.ts\";\r\nconst DisplayAdsManagerConnectorSourceFile = \"DisplayAdsManager.connector.ts\";\r\nconst NativeAdConnectorSourceFile = \"NativeAd.connector.ts\";\r\nconst OathWrapperSourceFile = \"OathAdsWrapper.ts\";\r\nconst PlacementManagerConnectorSourceFile = \"PlacementManager.connector.ts\";\r\nconst PlacementManagerCookieSyncSourceFile = \"PlacementManagerCookieSync.ts\";\r\nconst PlacementManagerCMSServiceSourceFile = \"PlacementManagerCMSService.ts\";\r\nconst NativeAdClientConnectorSourceFile = \"NativeAdClient.connector.ts\";\r\nconst PartnerScriptLoaderFile = \"PartnerScriptLoader.ts\";\r\nconst NativeAdBeaconSourceFile = \"Beacon.ts\";\r\n\r\nexport const MonetizationAppErrors = {\r\n /** Failed to load Placement Manager. */\r\n PlacementManagerLoadError: {\r\n id: 20000,\r\n source: NativeAdConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load arrangement position on native ad experience. */\r\n ArrangementPositionLoadError: {\r\n id: 20001,\r\n source: NativeAdConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get CMS Content. */\r\n GetCMSContentError: {\r\n id: 20002,\r\n source: PlacementManagerCMSServiceSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get SAM RTB Response. */\r\n GetSAMRTBResponseError: {\r\n id: 20003,\r\n source: PlacementManagerConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load MediaNet End Of Article Block. */\r\n MediaNetEOABError: {\r\n id: 20005,\r\n source: \"medianetNativeAdOnArticle.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** Invalid promo module config */\r\n InvalidPromoModuleConfig: {\r\n id: 20006,\r\n source: NativeAdConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to download cookie sync external script. */\r\n CookieSyncDownloadExternalScriptError: {\r\n id: 20007,\r\n source: PlacementManagerCookieSyncSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Missing cookie sync external script. */\r\n CookieSyncMissingExternalScriptUrl: {\r\n id: 20008,\r\n source: PlacementManagerCookieSyncSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Cookie sync timeout. */\r\n CookieSyncTimeout: {\r\n id: 20009,\r\n source: PlacementManagerCookieSyncSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Cookie sync partner script error */\r\n CookieSyncPartnerScriptError: {\r\n id: 20010,\r\n source: PlacementManagerCookieSyncSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Cookie pixel sync partner download error */\r\n CookieSyncPixelPartnerDownloadError: {\r\n id: 20011,\r\n source: PlacementManagerCookieSyncSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load cms or backfill native ad. */\r\n CMSOrBackfillNativeAdLoadError: {\r\n id: 20012,\r\n source: NativeAdConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Missing required property on placement manager config */\r\n MissingRequiredPropertyPlacementManagerConfig: {\r\n id: 20014,\r\n source: PlacementManagerConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Missing page type target scope. */\r\n NativeAdTargetScopeError: {\r\n id: 20016,\r\n source: NativeAdConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** River video ad partner error. */\r\n RiverVideoAdPartnerError: {\r\n id: 20017,\r\n source: PartnerScriptLoaderFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** JsTracker ad partner script load error. */\r\n JsTrackerPartnerScriptLoadError: {\r\n id: 20018,\r\n source: NativeAdBeaconSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Viglink load error. */\r\n ViglinkError: {\r\n id: 20019,\r\n source: PartnerScriptLoaderFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Missing topic id for stripe native ad */\r\n MissingTopicId: {\r\n id: 20020,\r\n source: NativeAdConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Topic id not found for stripe native ad */\r\n TopicIdNotFound: {\r\n id: 20021,\r\n source: NativeAdConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to get SAM RTB Response. This App error doesn't trigger alert */\r\n GetSAMRTBResponseErrorNoAlert: {\r\n id: 20022,\r\n source: PlacementManagerConnectorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** Failed to load Oath JS */\r\n DisplayAdsOathLoadError: {\r\n id: 20050,\r\n source: OathWrapperSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Failed to load AppNexus JS */\r\n DisplayAdsApnLoadError: {\r\n id: 20051,\r\n source: ApnWrapperSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** AppNexus Provider was empty */\r\n DisplayAdsApnEmptyProvider: {\r\n id: 20052,\r\n source: ApnWrapperSourceFile,\r\n severity: Severity.Alert\r\n },\r\n\r\n /** Ads Detection no initialized properly Provider was empty */\r\n DisplayAdsAdsDetectionNotInit: {\r\n id: 20053,\r\n source: DisplayAdsAdsDetectionSourceFile,\r\n severity: Severity.Alert,\r\n pb\r\n },\r\n\r\n /** Failed to load Moat JS */\r\n DisplayAdsMoatLoadError: {\r\n id: 20054,\r\n source: DisplayAdsManagerConnectorSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Display ad objects were not available for refresh */\r\n DisplayAdsNoAdObjects: {\r\n id: 20055,\r\n source: AdRefreshSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** There was a problem in encoding CMS provider ID from base 62 to 32 */\r\n DisplayAdsProviderIdEncode: {\r\n id: 20056,\r\n source: DisplayAdsConnectorSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const TaboolaRiverAppErrors = {\r\n /** Failed to fetch taboola river data. */\r\n TaboolaRiverFetchError: {\r\n id: 20100,\r\n source: \"TaboolaRiver.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst NativeAdServiceFile = \"NativeAdService.ts\";\r\nconst CMSAdServiceFile = \"CMSAdService.ts\";\r\nconst SAMAdServiceFile = \"SAMAdService.ts\";\r\n\r\n/** Failed to get valid Response from AdService library */\r\nexport const GetNativeAdRequestError: AppError = {\r\n id: 20150,\r\n source: NativeAdServiceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get valid Response from AdService library */\r\nexport const GetNativeAdResponseError: AppError = {\r\n id: 20151,\r\n source: NativeAdServiceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get valid CMS Response from AdService library */\r\nexport const GetCMSAdResponseError: AppError = {\r\n id: 20152,\r\n source: CMSAdServiceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get valid SAM Response from AdService library */\r\nexport const GetSAMRTBResponseErrorNoAlert: AppError = {\r\n id: 20153,\r\n source: SAMAdServiceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Failed to get valid SAM Response from AdService library */\r\nexport const GetSAMRTBRequestError: AppError = {\r\n id: 20154,\r\n source: SAMAdServiceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get valid SAM Response from AdService library */\r\nexport const GetSAMRTBResponseError: AppError = {\r\n id: 20155,\r\n source: SAMAdServiceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get valid SAM Response from AdService library */\r\nexport const GetSAMRTBResponseParseError: AppError = {\r\n id: 20156,\r\n source: SAMAdServiceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get valid SAM Response from AdService library */\r\nexport const GetSAMRTBResponseException: AppError = {\r\n id: 20157,\r\n source: SAMAdServiceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst NativeAdFeedCardFile = \"NativeAdFeedCard.connector.ts\";\r\nconst NativeAdGlanceCardFile = \"NativeAdGlanceCard.connector.ts\";\r\n\r\n/** Failed to get valid Response from AdService library in SuperApp Feed card*/\r\nexport const GetNativeAdFeedCardError: AppError = {\r\n id: 20160,\r\n source: NativeAdFeedCardFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Failed to get valid Response from AdService library in SuperApp Glance card*/\r\nexport const GetNativeAdGlanceCardError: AppError = {\r\n id: 20161,\r\n source: NativeAdGlanceCardFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nconst PCSPageHTMLFile = \"PCS-Page.cshtml\";\r\nexport const CoreLibAppErrors = {\r\n /** Deprecated composition layout config in use */\r\n DeprecatedCompositionLayoutUsed: {\r\n id: 20200,\r\n source: \"LayoutBase.inspector.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** Deprecated composition layout config in use */\r\n InvalidColumnInGridConfig: {\r\n id: 20201,\r\n source: \"GridBase.inspector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Error during loading of page bundles.\r\n */\r\n ErrorLoadingBundle: {\r\n id: 20202,\r\n source: PCSPageHTMLFile,\r\n severity: Severity.HighImpact,\r\n pb\r\n },\r\n\r\n /**\r\n * Generic JS exceptions.\r\n */\r\n GenericJSException: {\r\n id: 20203,\r\n source: PCSPageHTMLFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Missing localStorage exception\r\n */\r\n LocalStorageDoesntExist: {\r\n id: 20204,\r\n source: \"WebStorage.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Missing sessionStorage exception\r\n */\r\n SessionStorageDoesntExist: {\r\n id: 20205,\r\n source: \"WebStorage.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Exception thrown during rendering in React, with no additional handling specified.\r\n * This means React has unmounted your DOM tree and you'll be getting a blank page.\r\n */\r\n ReactRenderException: {\r\n id: 20206,\r\n source: PCSPageHTMLFile,\r\n severity: Severity.Critical,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents Authenticatedfetch related App errors */\r\nconst AuthenticatedFetchSourceFile = \"AuthenticatedFetch.ts\";\r\nexport const AuthenticatedFetchErrors = {\r\n ErrorCodeReceived: {\r\n id: 20302,\r\n source: AuthenticatedFetchSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n CallFailed: {\r\n id: 20303,\r\n source: AuthenticatedFetchSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst resolverSourceFile = \"resolver.ts\";\r\nexport const ResolverAppErrors = {\r\n /**\r\n * IndexedDb write failed in resolver.\r\n */\r\n IndexedDbWriteFailed: {\r\n id: 22010,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * IndexedDb read failed in resolver.\r\n */\r\n IndexedDbReadFailed: {\r\n id: 22011,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Config Service Resolver fetch errors.\r\n */\r\n CrsFetchError: {\r\n id: 22012,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Config Service Resolver was enabled but we still went to Assets to getConfig and merge configs at client (classic resolver).\r\n */\r\n ReceivedConfigFromCdnAsCrsFetchFailed: {\r\n id: 22013,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Exception In GetConfig function.\r\n */\r\n GetConfigException: {\r\n id: 22014,\r\n source: resolverSourceFile,\r\n severity: Severity.Critical,\r\n pb\r\n },\r\n\r\n /**\r\n * IndexedDb bulk read failed in resolver.\r\n */\r\n IndexedDbBulkReadFailed: {\r\n id: 22015,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * IndexedDb failed to remove cached config\r\n */\r\n IndexedDbFailedToRemoveCachedConfig: {\r\n id: 22016,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * IndexedDb failed to clear all configs\r\n */\r\n IndexedDbFailedToClearAllCachedConfigs: {\r\n id: 22017,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Render cache is purged due to changes in config\r\n */\r\n RenderCachePurgedDueToChangesInConfig: {\r\n id: 22018,\r\n source: resolverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Render cache failed purge even though config changes were detected.\r\n */\r\n FailedToPurgeRenderCache: {\r\n id: 22019,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Failed to refresh config cache\r\n */\r\n RefreshConfigCacheFailed: {\r\n id: 22020,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Failed to initialize indexedDb\r\n */\r\n IndexedDbInitFailed: {\r\n id: 22021,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Different cache busting identifier\r\n */\r\n DifferentCbid: {\r\n id: 22022,\r\n source: resolverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error writing prg flights to localStorage\r\n */\r\n PrgFlightLsWriteError: {\r\n id: 22023,\r\n source: resolverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error reading prg flights to localStorage\r\n */\r\n PrgFlightLsReadError: {\r\n id: 22024,\r\n source: resolverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\n/**\r\n * Configs served from CDN after CRS fetch failed\r\n */\r\nexport const ResolverErrorConfigsDownloadedByCdn: AppError = {\r\n id: 22025,\r\n source: resolverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * Cached configs are for different flight\r\n */\r\nexport const CachedConfigsForDifferentFlight: AppError = {\r\n id: 22026,\r\n source: resolverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * CRS sent non-200 response\r\n */\r\nexport const ConfigCrsFetchNon200Response: AppError = {\r\n id: 22027,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Cdn config fetch received non-200 response\r\n */\r\nexport const ConfigCdnFetchNon200Response: AppError = {\r\n id: 22028,\r\n source: resolverSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const HubAppErrors = {\r\n /**\r\n * Error during app initialization for hub page experience.\r\n */\r\n HubErrorPage: {\r\n id: 22100,\r\n source: \"page.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Warning that hub server side rendering is skipped and client side rendering is triggered\r\n * due to either server error or slow server response.\r\n */\r\n HubSSRSkip: {\r\n id: 22110,\r\n source: \"page.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nconst EdgePageFileName = \"Edge/page.ts\";\r\n\r\n/** Edge App Type errors. */\r\nexport const EdgeAppErrors = {\r\n ErrorFetchingChildCookie: {\r\n id: 23000,\r\n source: EdgePageFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Error during app initialization for Edge page experience.\r\n */\r\n EdgeErrorPage: {\r\n id: 23001,\r\n source: EdgePageFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Error fetching the APP_ANON cookie on Edge page load\r\n */\r\n ErrorFetchingAppAnonCookie: {\r\n id: 23002,\r\n source: EdgePageFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Error during set flight instrumentation data\r\n */\r\n ErrorSetFlightInstrumentation: {\r\n id: 23003,\r\n source: EdgePageFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Warning that edge server side rendering is skipped and client side rendering is triggered\r\n * due to either server error or slow server response.\r\n */\r\n EdgeSSRSkip: {\r\n id: 23004,\r\n source: EdgePageFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nexport const BingCardsAppErrors = {\r\n BingCardGetHotelAnswersError: {\r\n id: 24001,\r\n source: \"BingCardsServiceClient.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n BingCardGetHotelErrorFromService: {\r\n id: 24002,\r\n source: \"BingCardsServiceClient.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n BingCardGetAnswersError: {\r\n id: 24003,\r\n source: \"BingCardsExperience.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n BingCardInvalidEntityType: {\r\n id: 24004,\r\n source: \"BingCardsExperience.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n BingCardErrorOut: {\r\n id: 24005,\r\n source: \"BingCardsExperience.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const BingAnswersAppErrors = {\r\n UnknownError: {\r\n id: 24101,\r\n source: \"BingAnswers.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n FailedToLoadData: {\r\n id: 24102,\r\n source: \"BingAnswers.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n NoCardsContentType: {\r\n id: 24103,\r\n source: \"BingAnswers.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n NoCardsRelated: {\r\n id: 24104,\r\n source: \"BingAnswers.connector.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nconst BingShoppingShopCardServiceClientSourceFile =\r\n \"bing-shopping/ShopCardServiceClient.ts\";\r\n\r\nexport const BingShoppingShopCardError = {\r\n ShopCardServiceFetchError: {\r\n id: 24200,\r\n source: BingShoppingShopCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ShopCardServiceFetchInvalidResponse: {\r\n id: 24201,\r\n source: BingShoppingShopCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ShopCardServiceEmptyPersonalizedResponse: {\r\n id: 24202,\r\n source: BingShoppingShopCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ShopCardServiceInvalidPersonalizedResponse: {\r\n id: 24203,\r\n source: BingShoppingShopCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ShopCardServiceEmptyTrendingResponse: {\r\n id: 24204,\r\n source: BingShoppingShopCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ShopCardServiceInvalidTrendingResponse: {\r\n id: 24205,\r\n source: BingShoppingShopCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst BingShoppingLifestyleCardServiceClientSourceFile =\r\n \"bing-shopping-lifestyle-card/BingShoppingLifestyleCardServiceClient.ts\";\r\n\r\nconst BingShoppingLifestyleCardCdnServiceClientSourceFile =\r\n \"bing-shopping-lifestyle-card/BingShoppingLifestyleCardCdnServiceClient.ts\";\r\n\r\nconst BingShoppingLifestyleAutosuggestServiceClientSourceFile =\r\n \"bing-shopping-lifestyle-card/BingShoppingLifestyleAutosuggestServiceClient.ts\";\r\n\r\nconst BingShoppingLifestyleConnectorSourceFile =\r\n \"bing-shopping-lifestyle-card/BingShoppingLifestyleCard.connector.ts\";\r\nexport const BingShoppingLifestyleCardError = {\r\n // Lifestyle Shopcard service Errors\r\n LifestyleShopCardServiceFetchError: {\r\n id: 24300,\r\n source: BingShoppingLifestyleCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n LifestyleShopCardServiceFetchInvalidResponse: {\r\n id: 24301,\r\n source: BingShoppingLifestyleCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n LifestyleShopCardServiceEmptyResponse: {\r\n id: 24302,\r\n source: BingShoppingLifestyleCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n LifestyleShopCardServiceInvalidResponse: {\r\n id: 24303,\r\n source: BingShoppingLifestyleCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n // Lifestyle Shopcard Cdn service Errors\r\n LifestyleShopCardCdnServiceFetchError: {\r\n id: 24304,\r\n source: BingShoppingLifestyleCardCdnServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n LifestyleShopCardCdnServiceFetchInvalidResponse: {\r\n id: 24305,\r\n source: BingShoppingLifestyleCardCdnServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n LifestyleShopCardCdnServiceInvalidResponse: {\r\n id: 24306,\r\n source: BingShoppingLifestyleCardCdnServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n // Lifestyle Autosuggest service Errors\r\n LifestyleShopAutosuggestServiceFetchError: {\r\n id: 24310,\r\n source: BingShoppingLifestyleAutosuggestServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n LifestyleShopAutosuggestServiceFetchInvalidResponse: {\r\n id: 24311,\r\n source: BingShoppingLifestyleAutosuggestServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n LifestyleShopAutosuggestServiceEmptyResponse: {\r\n id: 24312,\r\n source: BingShoppingLifestyleAutosuggestServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n LifestyleShopAutosuggestServiceInvalidResponse: {\r\n id: 24313,\r\n source: BingShoppingLifestyleAutosuggestServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n LifestyleShopAutosuggestInvalidSuggestionUrl: {\r\n id: 24314,\r\n source: BingShoppingLifestyleConnectorSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst ShoppingSmartListServiceClientSourceFile =\r\n \"shopping-smart-list/ShoppingSmartListServiceClient.ts\";\r\n\r\nconst ShoppingSmartListConnectorSourceFile =\r\n \"shopping-smart-list/ShoppingSmartList.connector.ts\";\r\n\r\nexport const ShoppingSmartListError = {\r\n ShoppingSmartListServiceEmptyResponse: {\r\n id: 24400,\r\n source: ShoppingSmartListServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ShoppingSmartListServiceFetchError: {\r\n id: 24401,\r\n source: ShoppingSmartListServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ShoppingSmartListServiceInvalidResponse: {\r\n id: 24402,\r\n source: ShoppingSmartListServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ShoppingSmartListServiceMissingRequiredFields: {\r\n id: 24403,\r\n source: ShoppingSmartListServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n ShoppingSmartListChromiumApiConfigDataFetchFailure: {\r\n id: 24404,\r\n source: ShoppingSmartListConnectorSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst BingMiniShoppingServiceClientSourceFile =\r\n \"bing-mini-shopping/BingMiniShoppingServiceClient.ts\";\r\n\r\nexport const BingMiniShoppingError = {\r\n // Bing-MiniShopping service Errors\r\n BingMiniShoppingServiceFetchError: {\r\n id: 24500,\r\n source: BingMiniShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n BingMiniShoppingServiceEmptyResponse: {\r\n id: 24501,\r\n source: BingMiniShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n BingMiniShoppingServiceInvalidResponse: {\r\n id: 24502,\r\n source: BingMiniShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n BingMiniShoppingServiceInsufficientDealsItems: {\r\n id: 24503,\r\n source: BingMiniShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n BingMiniShoppingServiceInsufficientActiveDealsItems: {\r\n id: 24504,\r\n source: BingMiniShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n BingMiniShoppingServiceInsufficientTrendingItems: {\r\n id: 24505,\r\n source: BingMiniShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n },\r\n BingMiniShoppingServiceInsufficientTrendingCategories: {\r\n id: 24506,\r\n source: BingMiniShoppingServiceClientSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst BingShoppingMeStripeServiceClientSourceFile =\r\n \"bing-shopping-mestripe/BingShoppingMeStripeServiceClient.ts\";\r\n\r\nexport const BingShoppingMeStripeServiceFetchError: AppError = {\r\n id: 24510,\r\n source: BingShoppingMeStripeServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const BingShoppingMeStripeServiceEmptyResponse: AppError = {\r\n id: 24511,\r\n source: BingShoppingMeStripeServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const BingShoppingMeStripeServiceInvalidResponse: AppError = {\r\n id: 24512,\r\n source: BingShoppingMeStripeServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const BingShoppingMeStripeServiceMissingRequiredFields: AppError = {\r\n id: 24513,\r\n source: BingShoppingMeStripeServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst ShoppingCarouselServiceClientSourceFile =\r\n \"shopping-carousel/ShoppingCarouselServiceClient.ts\";\r\n\r\nexport const ShoppingCarouselEntitiesDataServiceFetchError: AppError = {\r\n id: 24520,\r\n source: ShoppingCarouselServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingCarouselEntitiesDataServiceEmptyResponse: AppError = {\r\n id: 24521,\r\n source: ShoppingCarouselServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingCarouselEntitiesDataServiceInvalidResponse: AppError = {\r\n id: 24522,\r\n source: ShoppingCarouselServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingCarouselEntitiesDataServiceInsufficientItems: AppError = {\r\n id: 24523,\r\n source: ShoppingCarouselServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst ShoppingCarouselConnectorSourceFile =\r\n \"shopping-carousel/ShoppingCarousel.connector.ts\";\r\n\r\nexport const ShoppingCarouselGenericError: AppError = {\r\n id: 24524,\r\n source: ShoppingCarouselConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst ShoppingCarouselSourceFile =\r\n \"shopping-carousel/ShoppingCarousel.tsx\";\r\n\r\nexport const ShoppingCarouselRenderError: AppError = {\r\n id: 24525,\r\n source: ShoppingCarouselSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst ShoppingContentCardServiceClientSourceFile =\r\n \"ShoppingContentCard.serviceClient.ts\";\r\n\r\nexport const ShoppingContentCardServiceFetchError: AppError = {\r\n id: 24530,\r\n source: ShoppingContentCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingContentCardServiceEmptyResponse: AppError = {\r\n id: 24531,\r\n source: ShoppingContentCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingContentServiceInvalidData: AppError = {\r\n id: 24532,\r\n source: ShoppingContentCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingContentServiceInsufficientActiveItems: AppError = {\r\n id: 24533,\r\n source: ShoppingContentCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ShoppingContentServiceMissingFields: AppError = {\r\n id: 24534,\r\n source: ShoppingContentCardServiceClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error in page.ts of Shopping app type.\r\n */\r\nexport const ShoppingErrorPage: AppError = {\r\n id: 24900,\r\n source: \"Shopping/page.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\nexport const PageSettingsDataConnectorAppErrors = {\r\n PageSettingsGetInitialState: {\r\n id: 26001,\r\n source: \"PageSettingsData.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst MicrosoftNewsEntryPointFileName = \"MicrosoftNews.connector.ts\";\r\nexport const MicrosoftNewsEntryPointAppErrors = {\r\n /**\r\n * Error during app initialization for MicrosoftNews page experience.\r\n */\r\n MicrosoftNewsErrorPage: {\r\n id: 27000,\r\n source: MicrosoftNewsEntryPointFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const NavigationDataConnectorAppErrors = {\r\n /**\r\n * Error while trying to fetch the Navigation Items\r\n */\r\n NavigationDataGetNavigationItems: {\r\n id: 28000,\r\n source: \"NavigationData.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n NavigationDataIndexedDbInitializationFailed: {\r\n id: 28001,\r\n source: \"NavigationData.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n NavigationDataIndexedDbWriteFailed: {\r\n id: 28002,\r\n source: \"NavigationData.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n NavigationDataIndexedDbBulkReadFailed: {\r\n id: 28003,\r\n source: \"NavigationData.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const CategoryDataConnectorAppErrors = {\r\n /**\r\n * Error while to get the category details\r\n */\r\n CategoryDataGetCategoryDetail: {\r\n id: 28100,\r\n source: \"CategoryData.connector.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n CategoryDataIndexedDbInitializationFailed: {\r\n id: 28101,\r\n source: \"CategoryData.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n CategoryDataIndexedDbWriteFailed: {\r\n id: 28102,\r\n source: \"CategoryData.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n CategoryDataIndexedDbBulkReadFailed: {\r\n id: 28103,\r\n source: \"CategoryData.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/**\r\n * App reporting messages related to OneService Content Data Connector\r\n */\r\nexport const OneServiceContentDataConnector = {\r\n /**\r\n * Message sent when a feature tries to update\r\n * the cache bypass value but the connector was not initialized\r\n * for the page\r\n */\r\n FailedToUpdateBypassValueConnectorNotInitialized: {\r\n id: 28200,\r\n source: \"OneServiceContentHelper.ts\",\r\n severity,\r\n pb\r\n },\r\n /**\r\n * Message sent when a feature tries to update\r\n * the cache bypass value but the connector was not initialized\r\n * for the page\r\n */\r\n FailedToGetBypassValueConnectorNotInitialized: {\r\n id: 28201,\r\n source: \"OneServiceContentHelper.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/**\r\n * App reporting messages related to Stripe Experience\r\n */\r\nexport const StripeAppErrors = {\r\n InvalidConfig: {\r\n id: 28300,\r\n source: \"Stripe.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const NotificationBellErrors = {\r\n /** Failed to fetch the notification bell data content */\r\n DataFetchError: {\r\n id: 28400,\r\n source: \"NotificationBell.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n JsonParseError: {\r\n id: 28401,\r\n source: \"LocalStorageSettings.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n NewsItemDataFetchError: {\r\n id: 28402,\r\n source: \"NotificationBellServiceClient.ts\",\r\n severity,\r\n pb\r\n },\r\n MalformedNewsItemResponseError: {\r\n id: 28403,\r\n source: \"NotificationBellServiceClient.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents Layout Preference Data Connector related App errors */\r\nconst LayoutPreferenceDataSourceFile = \"LayoutPreferenceData.connector.ts\";\r\nexport const LayoutPreferenceDataErrors = {\r\n /** Failed to retrieve Layout Preference Data */\r\n LayoutPreferenceDataGetFailed: {\r\n id: 28500,\r\n source: LayoutPreferenceDataSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/**\r\n * App reporting messages related to StripeView Experience\r\n */\r\nexport const StripeViewAppErrors = {\r\n InvalidConfig: {\r\n id: 28600,\r\n source: \"StripeView.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n ChildLoadError: {\r\n id: 28601,\r\n source: \"StripeView.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents Sentiment Line Chart Connector related app errors */\r\nconst SentimentLineChartSourceFile = \"SentimentLineChart.connector.ts\";\r\nexport const SentimentLineChartErrors = {\r\n ContentFetchError: {\r\n id: 28700,\r\n source: SentimentLineChartSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents Sentiment Result Card Connector related app errors */\r\nconst SentimentResultCardSourceFile = \"SentimentResultCard.connector.ts\";\r\nexport const SentimentResultCardErrors = {\r\n ContentFetchError: {\r\n id: 28710,\r\n source: SentimentResultCardSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents Sentiment Map Connector related app errors */\r\nconst SentimentMapSourceFile = \"SentimentMap.connector.ts\";\r\nexport const SentimentMapErrors = {\r\n ContentFetchError: {\r\n id: 28720,\r\n source: SentimentMapSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents Election Results Card Connector related app errors */\r\nconst ElectionResultsCardFile = \"ElectionResultsCard.connector.ts\";\r\nexport const ElectionResultsCardErrors = {\r\n ContentFetchError: {\r\n id: 28730,\r\n source: ElectionResultsCardFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents Sentiment Bar chart Connector related app errors */\r\nconst SentimentBarChartSourceFile = \"SentimentBarChart.connector.ts\";\r\nexport const SentimentBarChartErrors = {\r\n ContentFetchError: {\r\n id: 28740,\r\n source: SentimentBarChartSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Elction Result Map connector App errors */\r\nconst ElectionResultMapConnectorSourceFile = \"ElectionResultMap.connector.ts\";\r\nexport const ElectionResultMapConnectorErrors = {\r\n UnknownError: {\r\n id: 28750,\r\n source: ElectionResultMapConnectorSourceFile,\r\n severity\r\n },\r\n\r\n ContentFetchError: {\r\n id: 28751,\r\n source: ElectionResultMapConnectorSourceFile,\r\n severity\r\n }\r\n};\r\n\r\n/** Elction Result Map Inspector App errors */\r\nconst ElectionResultMapInspectorSourceFile = \"ElectionResultMap.inspector.ts\";\r\nexport const ElectionResultMapInspectorErrors = {\r\n EmptyResultSummaryError: {\r\n id: 28752,\r\n source: ElectionResultMapInspectorSourceFile,\r\n severity\r\n }\r\n};\r\n/** Elction Result Map App errors */\r\nconst ElectionResultMapSourceFile = \"ElectionResultMap.tsx\";\r\nexport const ElectionResultMapErrors = {\r\n FetchAndUpdateElectionDataError: {\r\n id: 28753,\r\n source: ElectionResultMapSourceFile,\r\n severity\r\n }\r\n};\r\n\r\n/** Election Editor's Note App errors */\r\nexport const ElectionEditorsNoteErrors = {\r\n\r\n ContentFetchError: {\r\n id: 28760,\r\n source: \"ElectionEditorsNote.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents Election Delegate Counter related app errors */\r\nexport const ElectionDelegateCounterErrors = {\r\n ContentFetchError: {\r\n id: 28770,\r\n source: \"ElectionDelegateCounter.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents fetch failure for Feed visualizer experience */\r\nexport const FeedVisualizerFetchFailed: AppError = {\r\n id: 28780,\r\n source: \"FeedVisualizer.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Topics hub - failed to fetch topic by name\r\n */\r\nexport const TopicByNameFetchFailed: AppError = {\r\n id: 28790,\r\n source: \"TopicsHub.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * App reporting messages related to Partner Widget Experience\r\n */\r\nexport const PartnerWidgetAppErrors = {\r\n /** default breakpoint settings missing */\r\n DefaultBreakpointSettingsMissing: {\r\n id: 28801,\r\n source: \"PartnerWidget.connector.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n /** non whitelisted source url */\r\n NonWhitelistedSourceUrl: {\r\n id: 28802,\r\n source: \"PartnerWidget.connector.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents RecommendedSearch related App errors */\r\nconst RecommendedTopicsSourceFile = \"RecommendedTopics.connector.ts\";\r\nexport const RecommendedTopicsErrors = {\r\n /** Failed to connect to the Topics Data Connector */\r\n TopicsDataConnectorFailed: {\r\n id: 28901,\r\n source: RecommendedTopicsSourceFile,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Topic Clicked was null */\r\n InvalidTopicClick: {\r\n id: 28902,\r\n source: RecommendedTopicsSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst webWorkerSource = \"Web worker\";\r\nconst webWorkerUtility = \"WebWorkerUtility.ts\";\r\nexport const WebWorkerErrors = {\r\n /** Web worker script load error (404 response) */\r\n FileNotFound: {\r\n id: 29000,\r\n source: webWorkerUtility,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Web worker runtime error, fired by web worker on unhandled exceptions */\r\n RuntimeError: {\r\n id: 29001,\r\n source: webWorkerSource,\r\n severity,\r\n pb\r\n },\r\n\r\n /** Web worker message timeout */\r\n MessageTimeout: {\r\n id: 29002,\r\n source: webWorkerUtility,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /** Web worker handled errors. These are the errors received as messages from web worker */\r\n HandledError: {\r\n id: 29003,\r\n source: webWorkerSource,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst PageTimingsSource = \"entry-point-shared-utils/src/PageTimings.ts\";\r\n/**\r\n * Indicates that for some reason the page never received all the perf markers it was waiting for\r\n * resulting in the timeout logic kicking in.\r\n */\r\nexport const WaitForAllPerfMarkersTimeoutInvoked: AppError = {\r\n id: 29100,\r\n source: PageTimingsSource,\r\n severity: Severity.Alert,\r\n pb\r\n};\r\n\r\n/**\r\n * Indicates that for some reason the page never received all the secondary perf markers\r\n * it was waiting for, resulting in the timeout logic kicking in.\r\n */\r\nexport const WaitForAllSecondaryPerfMarkersTimeoutInvoked: AppError = {\r\n id: 29101,\r\n source: PageTimingsSource,\r\n severity: Severity.Alert,\r\n pb\r\n};\r\n\r\nconst PageLoadTimeSource = \"entry-point-shared-utils/src/TrackPageLoadTime.ts\";\r\n/**\r\n * Indicates that for some reason the page load time is not able to be sent out.\r\n */\r\nexport const PageLoadTimeError: AppError = {\r\n id: 29102,\r\n source: PageLoadTimeSource,\r\n severity: Severity.Alert,\r\n pb\r\n};\r\n\r\nconst FirstPartyEntryPointFileName = \"FirstParty.connector.ts\";\r\nconst FirstPartyPageFileName = \"page.ts\";\r\nexport const FirstPartyEntryPointAppErrors = {\r\n /**\r\n * Error during app initialization for FirstParty page experience.\r\n */\r\n FirstPartyErrorPage: {\r\n id: 29200,\r\n source: FirstPartyEntryPointFileName,\r\n severity,\r\n pb\r\n },\r\n /** Error during initial SSO call, either the call failed of the user was not signed in */\r\n SSOFailedError: {\r\n id: 29250,\r\n source: FirstPartyPageFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst HomePageEntryPointFileName = \"HomePage.connector.ts\";\r\nconst HomePageFileName = \"page.ts\";\r\nexport const HomePageEntryPointAppErrors = {\r\n /**\r\n * Error during app initialization for Home page experience.\r\n */\r\n HomePageErrorPage: {\r\n id: 29300,\r\n source: HomePageEntryPointFileName,\r\n severity,\r\n pb\r\n },\r\n /** Error during initial SSO call, either the call failed of the user was not signed in */\r\n SSOFailedError: {\r\n id: 29301,\r\n source: HomePageFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst WindowsEntryPointFileName = \"Windows.connector.ts\";\r\nconst WindowsPageFileName = \"page.ts\";\r\n\r\nexport const WindowsEntryPointAppErrors = {\r\n /**\r\n * Error during app initialization for Windows page experience.\r\n */\r\n WindowsErrorPage: {\r\n id: 29400,\r\n source: WindowsEntryPointFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Tracking errors where we ended up showing the local ntp page on page exception.\r\n */\r\n WindowsPageShownPageExceptionError: {\r\n id: 29401,\r\n source: WindowsPageFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Tracking errors where we ended up reloading the NTP page on jss mismatch exception.\r\n */\r\n WindowsPageReloadedPageExceptionError: {\r\n id: 29402,\r\n source: WindowsPageFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Error fetching the APP_ANON cookie on Windows page load\r\n */\r\n ErrorFetchingAppAnonCookie: {\r\n id: 29403,\r\n source: WindowsPageFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst WeatherAppEntrySourceFile = \"Weather.connector.ts\";\r\nconst WeatherLocationSearchSourceFile = \"WeatherLocationSearch.connector.ts\";\r\nconst WeatherMapSourceFile = \"WeatherMap.connector.ts\";\r\n\r\n/** Error during 'weather' app initialization. */\r\nexport const WeatherEntryPointAppError: AppError = {\r\n id: 29500,\r\n source: WeatherAppEntrySourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Fetch no data when search for locations from msn api */\r\nexport const WeatherLocationSearchNullError: AppError = {\r\n id: 29501,\r\n source: WeatherDataConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Exception to fetch search for locations from msn api */\r\nexport const WeatherLocationSearchFetchError: AppError = {\r\n id: 29502,\r\n source: WeatherDataConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Warnings when the alert title is too long to display */\r\nexport const WeatherAlertTitleTooLongError: AppError = {\r\n id: 29503,\r\n source: WeatherCardConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Warnings when the alert title is too long to display */\r\nexport const WeatherLocationSearchInvalidSuggestionIdError: AppError = {\r\n id: 29504,\r\n source: WeatherLocationSearchSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Exception when fail to fetch hurricane data */\r\nexport const WeatherMapHurricaneApiError: AppError = {\r\n id: 29505,\r\n source: WeatherMapSourceFile,\r\n severity: Severity.HighImpact,\r\n pb\r\n};\r\n\r\n/** Exception when Hurricane schema broken */\r\nexport const WeatherMapHurricaneSchemaError: AppError = {\r\n id: 29506,\r\n source: WeatherMapSourceFile,\r\n severity: Severity.Alert,\r\n pb\r\n};\r\n\r\n/** Exception when write user weather settings to pdp */\r\nexport const WeatherPDPUserSettingsWriteFailed: AppError = {\r\n id: 29507,\r\n source: WeatherPdpClientSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst WeatherInfoCardConnectorSourceFile = \"WeatherInfoCard.connector.ts\";\r\n\r\n/** Exception when OneService response is incorrect */\r\nexport const WeatherCardOneServiceDataError: AppError = {\r\n id: 29508,\r\n source: WeatherInfoCardConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Exception when weather card is in invalid state */\r\nexport const WeatherCardInvalidStateError: AppError = {\r\n id: 29509,\r\n source: WeatherCardConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst WindowsShellPage = \"windows-shell/page.ts\";\r\n/**\r\n * Windows Shell Page level exception was thrown\r\n */\r\nexport const WindowsShellPageError: AppError = {\r\n\r\n id: 29600,\r\n source: WindowsShellPage,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Windows Shell Page Error fetching the APP_ANON cookie\r\n */\r\nexport const WindowsShellPageErrorFetchingAppAnonCookie: AppError = {\r\n id: 29601,\r\n source: WindowsShellPage,\r\n severity,\r\n pb\r\n};\r\n\r\nconst WindowsShellCardProvider = \"WindowsShellCardProvider.ts\";\r\n/**\r\n * Content that was retrieved from shell was invalid\r\n */\r\nexport const WindowsShellInvalidShellContentResponse: AppError = {\r\n id: 29602,\r\n source: WindowsShellCardProvider,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Content format was invalid\r\n */\r\nexport const WindowsShellInvalidContentResponse: AppError = {\r\n id: 29603,\r\n source: WindowsShellCardProvider,\r\n severity,\r\n pb\r\n};\r\n\r\nconst WindowsShellConnector = \"WindowsShellConnector.connector.ts\";\r\n\r\nexport const WindowsShellEmptyHeaderResponse: AppError = {\r\n id: 29700,\r\n source: WindowsShellConnector,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Auth related app messages (errors|warnings) */\r\nexport const AuthenticationAppMessages = {\r\n AuthRefreshBlockedError: {\r\n id: 33000,\r\n source: \"\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error fetching the APP_ANON cookie\r\n */\r\n ErrorFetchingAppAnonCookie: {\r\n id: 33001,\r\n source: \"\",\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Error during app initialization for migration consent\r\n */\r\n EstablishMigrationConsent: {\r\n id: 33010,\r\n source: \"EstablishMigrationConsent.ts\",\r\n severity,\r\n pb\r\n },\r\n\r\n MigrationConsentServiceClient: {\r\n id: 33011,\r\n source: \"MigrationConsentServiceClient.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Server side rendering error */\r\nexport const RenderServerError: AppError = {\r\n id: 34000,\r\n source: \"service-render-app.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * SSR Inline script errors\r\n */\r\nexport const SSRAppErrors = {\r\n /**\r\n * Warning that user clicked on the page before hydration and telemetry is initialized.\r\n */\r\n UntrackedClick: {\r\n id: 34001,\r\n source: \"\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Warning that SSR fragment fetch failed\r\n */\r\n FragmentFetchFailed: {\r\n id: 34002,\r\n source: \"SSRInline.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error that the Performance API was not available.\r\n */\r\n DidUseBrowserCacheAPIError: {\r\n id: 34003,\r\n source: \"SSRInline.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error that the expected response header was not available.\r\n */\r\n DidUseBrowserCachePolyfillResponseHeaderInvalid: {\r\n id: 34004,\r\n source: \"SSRInline.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error that when SSR failed to getConfig.\r\n */\r\n ServerCacheFetchFailed: {\r\n id: 34005,\r\n source: \"Resolver.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error that when connectorMap is invalid.\r\n */\r\n ConnectorMapInvalid: {\r\n id: 34006,\r\n source: \"Resolver.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error that fetchSSRPage failed.\r\n */\r\n FetchSSRPageFailed: {\r\n id: 34007,\r\n source: \"inline-head.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error that no window.innerWidth was reported.\r\n * Devices on mobile may report a window.innerWidth of 0 or undefined until the window.onLoad page completes.\r\n * This error is thrown when window.innerWidth is still 0 or undefined when onload has completed.\r\n * We expect this error to never throw.\r\n */\r\n FetchSSRPageFailedFromInvalidWindowInnerWidth: {\r\n id: 34008,\r\n source: \"inline-head.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n /**\r\n * Error that when Server Cache config refresh failed\r\n */\r\n ServerCacheRefreshFailed: {\r\n id: 34009,\r\n source: \"Resolver.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nconst irisArcCallerFileName = \"Iris.arcCaller.ts\";\r\nconst irisArcParserFileName = \"Iris.arcParser.ts\";\r\nconst irisMasterFileName = \"Iris.master.ts\";\r\n\r\n/** Generic Unknown related to the Iris system. Investigate. */\r\nexport const AppError_IrisUnknown_35000: AppError = {\r\n id: 35000,\r\n source: \"Iris\",\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n/** The query parameters presented to the arc caller were found to be invalid. */\r\nexport const AppError_InvalidQParams_35001: AppError = {\r\n id: 35001,\r\n source: irisArcCallerFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_ArcCallFailed_35002: AppError = {\r\n id: 35002,\r\n source: irisArcCallerFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_ArcResponseNotOk_35003: AppError = {\r\n id: 35003,\r\n source: irisArcCallerFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\nexport const AppError_ArcResponseUnparsable_35004: AppError = {\r\n id: 35004,\r\n source: irisArcCallerFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_UnknownIrisErrorFound_35006: AppError = {\r\n id: 35006,\r\n source: irisArcParserFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_TimeoutIrisErrorFound_35007: AppError = {\r\n id: 35007,\r\n source: irisArcParserFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_TemplateIrisErrorFound_35008: AppError = {\r\n id: 35008,\r\n source: irisArcParserFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_ClientErrorIrisErrorFound_35009: AppError = {\r\n id: 35009,\r\n source: irisArcParserFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_DSourceIrisErrorFound_35010: AppError = {\r\n id: 35010,\r\n source: irisArcParserFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_ActionCallFailure_35011: AppError = {\r\n id: 35011,\r\n source: irisArcCallerFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_ActionFetchFailure_35012: AppError = {\r\n id: 35012,\r\n source: irisArcCallerFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_ActionResponseFailure_35013: AppError = {\r\n id: 35013,\r\n source: irisArcCallerFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\nexport const AppError_UncaughtErrorDetected_35014: AppError = {\r\n id: 35014,\r\n source: irisMasterFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_UnconvertableCreative_35015: AppError = {\r\n id: 35015,\r\n source: irisMasterFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_InvalidResponseFormat_35016: AppError = {\r\n id: 35016,\r\n source: irisMasterFileName,\r\n severity,\r\n pb\r\n};\r\nexport const AppError_TimeoutErrorDiscovered_35017: AppError = {\r\n id: 35017,\r\n source: irisMasterFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\nexport const AppError_UnparsableSingleResponseJSON_35018: AppError = {\r\n id: 35018,\r\n source: irisMasterFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents Iris data connector related App errors */\r\nconst IrisDataConnectorSourceFile = \"IrisData.connector.ts\";\r\nconst SubscriberValidatorSourceFile = \"SubscriberValidator.ts\";\r\nconst IrisPersistentStorageUtilityFile = \"IrisPersistentStorageUtility.ts\";\r\n\r\nexport const SubscriberNotFound: AppError = {\r\n id: 35117,\r\n source: SubscriberValidatorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const CreativeCountNegativeOrZero: AppError = {\r\n id: 35118,\r\n source: IrisDataConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const MissingIrisParameterForConditionalBanner: AppError = {\r\n id: 35119,\r\n source: SubscriberValidatorSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nexport const ErrorFoundForSurface: AppError = {\r\n id: 35120,\r\n source: IrisDataConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SubscriberNotFoundInIrisPlacementDictionary: AppError = {\r\n id: 35121,\r\n source: IrisDataConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ConfigDataUndefined: AppError = {\r\n id: 35122,\r\n source: IrisPersistentStorageUtilityFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const FailedToFetchConfigData: AppError = {\r\n id: 35123,\r\n source: IrisPersistentStorageUtilityFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const ExceptionFetchingConfigData: AppError = {\r\n id: 35124,\r\n source: IrisPersistentStorageUtilityFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const FailedToReadNurturingAcceptedFlag: AppError = {\r\n id: 35125,\r\n source: IrisPersistentStorageUtilityFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Error when Iris fails to return Hotspots Data to the client. Previous #8181 */\r\nexport const FailedHotSpotsDataDelivery: AppError = {\r\n id: 35126,\r\n source: IrisPersistentStorageUtilityFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Hotspots data that was returned failed to validate. Previous #8182 */\r\nexport const IncompleteHotSpotsContract: AppError = {\r\n id: 35127,\r\n source: IrisPersistentStorageUtilityFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents AccessTokens related App errors */\r\nconst AccessTokensSourceFile = \"AadAuthHelper.ts\";\r\nconst PivotContentErrorPlaceholderFile = \"AadErrorPlaceholder.tsx\";\r\nexport const EdgeChromiumAPIsNotAvailable: AppError = {\r\n id: 35200,\r\n source: AccessTokensSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const AcquireAccessTokenFailed: AppError = {\r\n id: 35201,\r\n source: AccessTokensSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const AcquireAccessTokenFailedForPivotContent: AppError = {\r\n id: 35202,\r\n source: PivotContentErrorPlaceholderFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const AcquireAccessTokenHandledFailure: AppError = {\r\n id: 35203,\r\n source: AccessTokensSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nexport const AcquireAccessTokenHandledFailureForPivotContent: AppError = {\r\n id: 35204,\r\n source: PivotContentErrorPlaceholderFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Represents Render Cache errors*/\r\nconst PersistRenderCacheFile = \"PersistRenderCache.ts\";\r\nexport const RenderCacheErrors = {\r\n JssStyleMismatchWarning: {\r\n id: 35300,\r\n source: PersistRenderCacheFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n\r\n JssStyleCriticalMismatchError: {\r\n id: 35301,\r\n source: PersistRenderCacheFile,\r\n severity: Severity.Alert,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents OcvFeedbackData related App errors */\r\nconst OcvFeedbackDataSourceFile = \"OcvFeedbackData.ts\";\r\nexport const OcvFeedbackDataErrors = {\r\n UndefinedDataNotAvailable: {\r\n id: 35400,\r\n source: OcvFeedbackDataSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nexport const PivotHoverErrors = {\r\n /** Failed to fetch feed summary data for the Pivot Hover list. */\r\n FeedSummaryFetchError: {\r\n id: 35500,\r\n source: \"FeedSummaryFetcher.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst PreloadActionHelpers = \"PreloadActionHelpers.ts\";\r\nexport const PreloadReportingMessages = {\r\n TtvrMissing: {\r\n id: 35600,\r\n source: PreloadActionHelpers,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n TfprMissing: {\r\n id: 35601,\r\n source: PreloadActionHelpers,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n TtvrSearchBoxMissing: {\r\n id: 35602,\r\n source: PreloadActionHelpers,\r\n severity: Severity.NoAlert,\r\n pb\r\n },\r\n TtfSearchBoxMissing: {\r\n id: 35603,\r\n source: PreloadActionHelpers,\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\nconst PrerenderPageTimingHelper = \"PrerenderPageTimingHelper.ts\";\r\nexport const PrerenderTtvrMissing: AppError = {\r\n id: 35604,\r\n source: PrerenderPageTimingHelper,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nexport const PrerenderTtprMissing: AppError = {\r\n id: 35605,\r\n source: PreloadActionHelpers,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nexport const PrerenderTtvrSearchBoxMissing: AppError = {\r\n id: 35606,\r\n source: PrerenderPageTimingHelper,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\nexport const PrerenderTtfSearchBoxMissing: AppError = {\r\n id: 35607,\r\n source: PrerenderPageTimingHelper,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Represents push notifications lib App errors */\r\nconst PushNotificationsLibFile = \"PushNotifications.ts\";\r\nexport const PushNotificationsLibErrors = {\r\n FetchKeyError: {\r\n id: 35700,\r\n source: PushNotificationsLibFile,\r\n severity,\r\n pb\r\n },\r\n SubscribeUnsubscribeError: {\r\n id: 35701,\r\n source: PushNotificationsLibFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Represents content truncation lib App errors */\r\nconst ContentTruncationSourceFile = \"ContentTruncation.ts\";\r\nexport const ContentTruncationErrors = {\r\n OverTruncationError: {\r\n id: 35800,\r\n source: ContentTruncationSourceFile,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\nconst SuperAppEntryPointFileName = \"SuperAppPage.connector.ts\";\r\n\r\nexport const SuperAppEntryPointAppErrors = {\r\n /**\r\n * Super app river is not able to load Error Page.\r\n */\r\n SuperAppErrorPage: {\r\n id: 35901,\r\n source: SuperAppEntryPointFileName,\r\n severity,\r\n pb\r\n },\r\n\r\n /**\r\n * Error fetching the APP_ANON cookie on super app page load\r\n */\r\n ErrorFetchingAppAnonCookie: {\r\n id: 35902,\r\n source: \"page.ts\",\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/** Error fetching feed with location in Local News experience */\r\nconst LocalNewsFileName = \"LocalNews.connector.ts\";\r\nexport const LocalNewsInterestByLocationFetchFailed: AppError = {\r\n id: 36001,\r\n source: LocalNewsFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** 361XX represent office related errors */\r\nconst GenerateShareUiFile = \"GenerateShareUi.tsx\";\r\nconst OfficeShareUiFile = \"OfficeShareUi.tsx\";\r\nconst OfficeFallbackHandlerFileName = \"OfficeFallbackHandler.ts\";\r\nconst EnterpriseWaffleFile = \"EnterpriseWaffle.connector.ts\";\r\nconst OfficeDocumentsTableConnectorFile = \"OfficeDocumentsTable.connector.ts\";\r\nconst OfficeDocumentsTableMruUtilitiesFile = \"mru-plusplus.utility.ts\";\r\nconst OfficeSharePointSitesTableConnectorFile = \"SharePointSitesTable.connector.ts\";\r\nconst OfficeDocumentsTableDiscoverFile = \"DiscoverDocumentProvider.ts\";\r\nconst RecommendedDocumentsConnectorFile = \"RecommendedDocuments.connector.ts\";\r\nconst ShellNewTabDataFileName = \"ShellNewTabData.connector.ts\";\r\n\r\nexport const OfficeFallbackHandlerAppErrors = {\r\n /**\r\n * Tracking errors where we ended up reloading the office content on jss mismatch exception.\r\n */\r\n OfficeContentReloadedJSSMismatchExceptionError: {\r\n id: 36101,\r\n source: OfficeFallbackHandlerFileName,\r\n severity,\r\n pb\r\n }\r\n};\r\n\r\n/**\r\n * Error for failure to generate office share ui\r\n */\r\nexport const OfficeGenerateShareUiError: AppError = {\r\n id: 36105,\r\n source: GenerateShareUiFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error for failure inside office share ui\r\n */\r\nexport const OfficeShareUiError: AppError = {\r\n id: 36106,\r\n source: OfficeShareUiFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error for Enterprise Waffle not able to retrieve app links from ShellNewTabData\r\n */\r\nexport const EnterpriseWaffleAppError: AppError = {\r\n id: 36107,\r\n source: EnterpriseWaffleFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error for failed call to Shell NTP API for Enterprise waffle and company logo\r\n */\r\nexport const ShellNewTabDataAPIError: AppError = {\r\n id: 36108,\r\n source: ShellNewTabDataFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Tracking errors when Office Documents Table type is not provided\r\n */\r\nexport const OfficeDocumentsTableInvalidTypeError: AppError = {\r\n id: 36110,\r\n source: OfficeDocumentsTableConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Tracking errors when Office Documents Table fails to fetch documents\r\n */\r\nexport const OfficeDocumentsTableDocumentFetchFailedError: AppError = {\r\n id: 36111,\r\n source: OfficeDocumentsTableConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Tracking errors when Office Documents Table fails to fetch documents\r\n */\r\nexport const OfficeDocumentsTableLinkFetchFailedError: AppError = {\r\n id: 36112,\r\n source: OfficeDocumentsTableConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Tracking errors when Office Documents Table fails to update document properties\r\n */\r\nexport const OfficeDocumentsTableUpdateDocumentPropertiesFailed: AppError = {\r\n id: 36113,\r\n source: OfficeDocumentsTableMruUtilitiesFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n* Tracking errors when Office Documents Table fails to fetch activity data\r\n*/\r\nexport const OfficeDocumentsTableFetchActivitiesFailed: AppError = {\r\n id: 36114,\r\n source: OfficeDocumentsTableDiscoverFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n* Tracking errors when Office Documents Table fails to fetch sharepoint data\r\n*/\r\nexport const OfficeDocumentsTableFetchSharepointFailed: AppError = {\r\n id: 36115,\r\n source: OfficeDocumentsTableDiscoverFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Tracking errors when Office Share Point Table fails to fetch sites\r\n */\r\nexport const OfficeSharepointSitesTableFetchFailedError: AppError = {\r\n id: 36120,\r\n source: OfficeSharePointSitesTableConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Tracking errors when failed to get Recommended Documents\r\n */\r\nexport const RecommendedDocumentsFetchFailedError: AppError = {\r\n id: 36130,\r\n source: RecommendedDocumentsConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Tracking errors when failed to fetch preview image for recommended documents\r\n */\r\nexport const RecommendedDocumentsImageFetchFailedError: AppError = {\r\n id: 36131,\r\n source: RecommendedDocumentsConnectorFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Represents autos experiences App errors */\r\nconst AutosExperienceConnectorFile = \"AutosCard.connector.ts\";\r\nconst AutosExperienceServiceClientFile = \"AutosServiceClient.ts\";\r\n\r\n/**\r\n * Error while fetching research make models\r\n */\r\nexport const FetchResearchMakeModelDocumentError: AppError = {\r\n id: 36200,\r\n source: AutosExperienceServiceClientFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * Error while fetching Film Strip Document Error\r\n */\r\nexport const FetchFilmStripDocumentError: AppError = {\r\n id: 36201,\r\n source: AutosExperienceServiceClientFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * Error while fetching lead classified cms documents\r\n */\r\nexport const FetchClassifiedLeadCMSDocumentsError: AppError = {\r\n id: 36202,\r\n source: AutosExperienceServiceClientFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * Error while fetching lead classified make models\r\n */\r\nexport const FetchLeadClassifiedMakeModelDocumentError: AppError = {\r\n id: 36203,\r\n source: AutosExperienceServiceClientFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * Error for incorrect tab configuration\r\n */\r\nexport const TabsIncorrectConfiguration: AppError = {\r\n id: 36204,\r\n source: AutosExperienceConnectorFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Whole Page Optimization(WPO) App errors */\r\n\r\nconst WpoServiceFileName = \"WpoServiceClient.ts\";\r\n\r\n/**\r\n * WPO service call failure.\r\n */\r\nexport const WpoServiceCallFailure: AppError = {\r\n id: 36301,\r\n source: WpoServiceFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error updating local storage with wpo service call response.\r\n */\r\nexport const WpoFailedToStoreToLocalStorage: AppError = {\r\n id: 36302,\r\n source: WpoServiceFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Whole Page Optimization(WPO) App errors in SuperApp */\r\nconst WpoServiceHelperFileName = \"WPOServiceHelper.ts\";\r\n\r\n/**\r\n * WPO service call failure for glance cards in SA.\r\n */\r\nexport const WpoGlanceServiceCallFailure: AppError = {\r\n id: 36303,\r\n source: WpoServiceHelperFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * WPO service call no content respose for glance cards in SA.\r\n */\r\nexport const WpoGlanceServiceCallNoContent: AppError = {\r\n id: 36304,\r\n source: WpoServiceHelperFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * WPO service call failure for feed modules in SA.\r\n */\r\nexport const WpoFeedServiceCallFailure: AppError = {\r\n id: 36305,\r\n source: WpoServiceHelperFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * WPO service call no content respose for feed modules in SA.\r\n */\r\nexport const WpoFeedServiceCallNoContent: AppError = {\r\n id: 36306,\r\n source: WpoServiceHelperFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error updating local storage with wpo service call response in SuperApp.\r\n */\r\nexport const WpoFailedToStoreToSALocalStorage: AppError = {\r\n id: 36307,\r\n source: WpoServiceHelperFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** MarketSelector App errors */\r\nconst MarketSelectorFileName = \"marketSetting/index.ts\";\r\n\r\n/**\r\n * Error when load current market setting when initialize market selector\r\n */\r\nexport const MarketSelectorFailedToReadCurrentMarket: AppError = {\r\n id: 36401,\r\n source: MarketSelectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** FlyoutCard App errors */\r\nconst FlyoutCardFileName = \"FlyoutCard.connector.ts\";\r\n\r\n/**\r\n * Error when fetching feed in FlyoutCard experience\r\n */\r\nexport const FlyoutCardFailedToLoadOneServiceData: AppError = {\r\n id: 36410,\r\n source: FlyoutCardFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** The Microsoft logo component inside of the HeaderEdgeNext experience */\r\nconst MicrosoftLogo = \"MicrosoftLogo.tsx\";\r\n\r\n/** Represents a Microsoft Logo related error */\r\nexport const MicrosoftLogoErrors: AppError = {\r\n id: 36420,\r\n source: MicrosoftLogo,\r\n severity: Severity.HighImpact,\r\n pb\r\n};\r\n\r\n/**\r\n * Clarity Script App Errors\r\n */\r\nconst ClarityScriptLoaderFile = \"ScriptLoader.ts\";\r\n\r\n/**\r\n * Error loading clarity script.\r\n */\r\nexport const LoadScriptError: AppError = {\r\n id: 36500,\r\n source: ClarityScriptLoaderFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error starting clarity script.\r\n */\r\nexport const ScriptStartError: AppError = {\r\n id: 36501,\r\n source: ClarityScriptLoaderFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** 366XX are River OneService App Errors */\r\nexport const EmptyFeedWithFeedId: AppError = {\r\n id: 36600,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const EmptySearchedFeedWithFeedId: AppError = {\r\n id: 36601,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const EmptySearchedFeedWithFeedQuery: AppError = {\r\n id: 36602,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const EmptyKidsModeFeed: AppError = {\r\n id: 36603,\r\n source: OneServiceCardProviderFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** 367XX are River App Errors */\r\nexport const FallingBackToSkipStrategy: AppError = {\r\n id: 36700,\r\n source: RiverSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const FallingBackToFullHeightStrategy: AppError = {\r\n id: 36701,\r\n source: RiverSourceFile,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/** Represents OutlookEmailPreview related App errors */\r\nconst OutlookEmailPreviewDataSourceFile = \"OutlookEmailPreviewDataHelper.ts\";\r\n\r\nexport const OutlookEmailPreviewEmailFetchError: AppError = {\r\n id: 36800,\r\n source: OutlookEmailPreviewDataSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const OutlookEmailPreviewUnreadEmailCountFetchError: AppError = {\r\n id: 36801,\r\n source: OutlookEmailPreviewDataSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst FinancePageFilename = \"Finance.connector.ts\";\r\nconst FinanceUserServiceImplFile = \"FinanceUserServiceImpl.ts\";\r\nconst FinanceServiceImplFile = \"FinanceServiceImpl.ts\";\r\nconst FinanceAutoSuggestServiceImplFile = \"AutoSuggestServiceImpl\";\r\n\r\n/**\r\n * Error when initializing Finance page experience.\r\n */\r\nexport const FinanceEntryPointAppErrors: AppError = {\r\n id: 36900,\r\n source: FinancePageFilename,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get autosuggest because of unsuccessful fetch */\r\nexport const FinanceAutoSuggestFetchError: AppError = {\r\n id: 36901,\r\n source: FinanceAutoSuggestServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get autosuggest because the http code is not 20x */\r\nexport const FinanceAutoSuggestStatusError: AppError = {\r\n id: 36902,\r\n source: FinanceAutoSuggestServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get autosuggest because the response body is not valid */\r\nexport const FinanceAutoSuggestInvalidResponseBody: AppError = {\r\n id: 36903,\r\n source: FinanceAutoSuggestServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get MostActiveQuotes because unsuccess fetch */\r\nexport const FinanceMostActiveQuotesFetchError: AppError = {\r\n id: 36904,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get MostActiveQuotes because the http code is not 20x */\r\nexport const FinanceMostActiveQuotesStatusError: AppError = {\r\n id: 36905,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get MostActiveQuotes because the response body is not valid */\r\nexport const FinanceMostActiveQuotesInvalidResponseBody: AppError = {\r\n id: 36906,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Exception when fetch watchlist */\r\nexport const FinanceWatchListFetchFailed: AppError = {\r\n id: 36907,\r\n source: FinanceUserServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get Chart because unsuccess fetch */\r\nexport const FinanceChartFetchError: AppError = {\r\n id: 36908,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get Chart because the http code is not 20x */\r\nexport const FinanceChartStatusError: AppError = {\r\n id: 36909,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get Chart because the response body is not valid */\r\nexport const FinanceChartInvalidResponseBody: AppError = {\r\n id: 36910,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get QuoteSummary because unsuccess fetch */\r\nexport const FinanceQuoteSummaryFetchError: AppError = {\r\n id: 36911,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get QuoteSummary because the http code is not 20x */\r\nexport const FinanceQuoteSummaryStatusError: AppError = {\r\n id: 36912,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get QuoteSummary because the response body is not valid */\r\nexport const FinanceQuoteSummaryInvalidResponseBody: AppError = {\r\n id: 36913,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get Exchange because unsuccess fetch */\r\nexport const FinanceExchangeFetchError: AppError = {\r\n id: 36914,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get Exchange because the http code is not 20x */\r\nexport const FinanceExchangeStatusError: AppError = {\r\n id: 36915,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get Exchange because the response body is not valid */\r\nexport const FinanceExchangeInvalidResponseBody: AppError = {\r\n id: 36916,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get indices because of unsuccessful fetch */\r\nexport const FinanceIndicesFetchError: AppError = {\r\n id: 36917,\r\n source: FinanceAutoSuggestServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get indices because the http code is not 20x */\r\nexport const FinanceIndicesStatusError: AppError = {\r\n id: 36918,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get indices because the response body is not valid */\r\nexport const FinanceIndicesInvalidResponseBody: AppError = {\r\n id: 36919,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get equities because of unsuccessful fetch */\r\nexport const FinanceEquitiesFetchError: AppError = {\r\n id: 36920,\r\n source: FinanceAutoSuggestServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get equities because the http code is not 20x */\r\nexport const FinanceEquitiesStatusError: AppError = {\r\n id: 36921,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get equities because the response body is not valid */\r\nexport const FinanceEquitiesInvalidResponseBody: AppError = {\r\n id: 36922,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get equity financials because of unsuccessful fetch */\r\nexport const FinanceEquityFinancialsFetchError: AppError = {\r\n id: 36923,\r\n source: FinanceAutoSuggestServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get equity financials because the http code is not 20x */\r\nexport const FinanceEquityFinancialsStatusError: AppError = {\r\n id: 36924,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get equity financials because the response body is not valid */\r\nexport const FinanceEquityFinancialsInvalidResponseBody: AppError = {\r\n id: 36925,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst MoneyInfoCardConnectorSourceFile = \"MoneyInfoCard.connector.ts\";\r\n\r\n/** Exception when OneService response is incorrect */\r\nexport const MoneyInfoCardOneServiceDataError: AppError = {\r\n id: 36926,\r\n source: MoneyInfoCardConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get all currencies because of unsuccessful fetch */\r\nexport const FinanceGetAllCurrenciesFetchError: AppError = {\r\n id: 36927,\r\n source: FinanceAutoSuggestServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get all currencies because the http code is not 20x */\r\nexport const FinanceGetAllCurrenciesStatusError: AppError = {\r\n id: 36928,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get all currencies because the response body is not valid */\r\nexport const FinanceGetAllCurrenciesInvalidResponseBody: AppError = {\r\n id: 36929,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get microsoft id because of unsuccessful fetch */\r\nexport const FinanceGetMicrosoftIdFetchError: AppError = {\r\n id: 36930,\r\n source: FinanceAutoSuggestServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get microsoft id because the http code is not 20x */\r\nexport const FinanceGetMicrosoftIdStatusError: AppError = {\r\n id: 36931,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to get microsoft id because the response body is not valid */\r\nexport const FinanceGetMicrosoftIdInvalidResponseBody: AppError = {\r\n id: 36932,\r\n source: FinanceServiceImplFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error when initializing Social page experience.\r\n */\r\nconst SocialPreviewSourceFile = \"Social.connector.ts\";\r\n\r\nexport const SocialNoModuleName: AppError = {\r\n id: 37000,\r\n source: SocialPreviewSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error when Social experience reducer recieves incorrect arguments\r\n */\r\n\r\nconst SocialExperienceReducerFile = \"Social.reducer.ts\";\r\n\r\nexport const SocialExperienceReducerIncorrectArgumentError: AppError = {\r\n id: 37001,\r\n source: SocialExperienceReducerFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Errors on Social experience http requests\r\n */\r\n\r\nconst SocialAPISourceFile = \"Social.api.ts\";\r\n\r\nexport const SocialAPIRequestErrorUnknown: AppError = {\r\n id: 37020,\r\n source: SocialAPISourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialAPIRequestErrorContents: AppError = {\r\n id: 37021,\r\n source: SocialAPISourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialAPIRequestErrorComments: AppError = {\r\n id: 37022,\r\n source: SocialAPISourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialAPIRequestErrorUsers: AppError = {\r\n id: 37023,\r\n source: SocialAPISourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Errors on Social experience component renders\r\n */\r\n\r\nconst SocialExperienceFile = \"Social.tsx\";\r\n\r\nexport const SocialExperienceRenderErrorComment: AppError = {\r\n id: 37050,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialExperienceRenderErrorProfilePage: AppError = {\r\n id: 37051,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialExperienceRenderErrorProfileCard: AppError = {\r\n id: 37052,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialExperienceRenderErrorProfileTabs: AppError = {\r\n id: 37053,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialExperienceRenderErrorSocialBar: AppError = {\r\n id: 37054,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialExperienceRenderErrorReactionBreakdown: AppError = {\r\n id: 37055,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialExperienceRenderErrorGuideline: AppError = {\r\n id: 37057,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\nexport const SocialExperienceRenderErrorMultilineLogin: AppError = {\r\n id: 37058,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialExperienceRenderErrorNotificationTray: AppError = {\r\n id: 37059,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialExperienceRenderErrorOnboarding: AppError = {\r\n id: 37060,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialExperienceRenderErrorOnbardingThirdParty: AppError = {\r\n id: 37061,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SocialExperienceRenderErrorUnknownComponent: AppError = {\r\n id: 37062,\r\n source: SocialExperienceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst LocationSelectorConnectorFileName = \"LocationSelector.connector.ts\";\r\n/**\r\n * Suggestion Id is out of bounds or it doesn't exist;\r\n */\r\nexport const LocationSelectorInvalidSuggestionId: AppError = {\r\n id: 37100,\r\n source: LocationSelectorConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const CommunityErrorPage: AppError = {\r\n id: 37200,\r\n source: \"app-types/community/src/page.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * PDP Service library errors - 3730X\r\n */\r\nexport const UnknownBulkLoadGraphActionType: AppError = {\r\n id: 37300,\r\n source: \"PdpServiceClient.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * Head data refresh errors - 3731X\r\n */\r\nexport const HeadDataRefreshErrors = {\r\n /** Refresh of stale head data was needed for service worker. */\r\n RefreshRequiredOnServiceWorker: {\r\n id: 37310,\r\n source: \"RefreshHeadDataServiceWorker.ts\",\r\n severity: Severity.NoAlert,\r\n pb\r\n }\r\n};\r\n\r\n/**\r\n * Set of errors in story-snippet experience.\r\n */\r\nexport const StorySnippetInvalidStoryData: AppError = {\r\n id: 37450,\r\n source: \"StorySnippet.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Erro when Story Snippet experience receives invalid data schema from related content cluster endpoint.\r\n */\r\nexport const StorySnippetInvalidRelatedContentClusterData: AppError = {\r\n id: 37451,\r\n source: \"StorySnippet.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Errors related to MyBriefRiverCard\r\n */\r\nconst MyBriefRiverCardFileName = \"MyBriefRiverCard.connector.ts\";\r\nexport const MyBriefRiverCardMissingConfig: AppError = {\r\n id: 37500,\r\n source: MyBriefRiverCardFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const MyBriefRiverCardEmptyOrNullResponse: AppError = {\r\n id: 37501,\r\n source: MyBriefRiverCardFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst WindowsCardProviderFileName = \"WindowsCardProvider.ts\";\r\nexport const WindowsCardProviderResponseWasNullOrErroneous: AppError = {\r\n id: 37550,\r\n source: WindowsCardProviderFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const WindowsCardProviderErrorFetchingData: AppError = {\r\n id: 37551,\r\n source: WindowsCardProviderFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error related to Traffic experiences.\r\n */\r\nconst TrafficPageFileName = \"traffic/page.ts\";\r\nexport const TrafficEntryPointAppError: AppError = {\r\n id: 37600,\r\n source: TrafficPageFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst TrafficCardConnectorFileName = \"traffic-card/TrafficCard.connector.ts\";\r\nexport const TrafficIncidentsError: AppError = {\r\n id: 37601,\r\n source: TrafficCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst TrafficAutoSuggestClientFileName = \"traffic-card/AutoSuggest/DirectionsAutoSuggestClient.ts\";\r\nexport const TrafficAutoSuggestError: AppError = {\r\n id: 37602,\r\n source: TrafficAutoSuggestClientFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const TrafficSettingsSaveError: AppError = {\r\n id: 37603,\r\n source: TrafficCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const TrafficCardOneServiceJsonError: AppError = {\r\n id: 37604,\r\n source: TrafficCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Represents GmailEmailPreview related App errors\r\n */\r\nconst GmailEmailPreviewDataSourceFile = \"GmailEmailPreview.connector.ts\";\r\nexport const GmailEmailPreviewGoogleAPIError: AppError = {\r\n id: 37700,\r\n source: GmailEmailPreviewDataSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const GmailEmailPreviewGmailAPIError: AppError = {\r\n id: 37701,\r\n source: GmailEmailPreviewDataSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\nconst LocalNewsViewCardConnectorFileName = \"LocalNewsViewCard.connector.ts\";\r\n/**\r\n * Data connector fails to be found or to get the cards from;\r\n */\r\nexport const LocalNewsViewCardDataConnectorAppError: AppError = {\r\n id: 37800,\r\n source: LocalNewsViewCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * LocationFeedData Errors\r\n */\r\nexport const LocationFeedDataConnectorAppError: AppError = {\r\n id: 37900,\r\n source: \"LocationFeed.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Errors related to Admin Portal\r\n */\r\nconst AdminPortalConnectorFileName = \"AdminPortalData.connector.ts\";\r\nexport const AdminPortalSettingsFetchAppError: AppError = {\r\n id: 38000,\r\n source: AdminPortalConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const AdminPortalShimUiShown: AppError = {\r\n id: 38001,\r\n source: AdminPortalConnectorFileName,\r\n severity: Severity.NoAlert,\r\n pb\r\n};\r\n\r\n/**\r\n * Errors related to Desktop Feed\r\n */\r\nconst DesktopFeedConnectorFileName = \"DesktopFeed.connector.ts\";\r\nexport const DesktopFeedRiverContentFetchFailed: AppError = {\r\n id: 38010,\r\n source: DesktopFeedConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const DesktopFeedUnsupportedCardType: AppError = {\r\n id: 38011,\r\n source: DesktopFeedConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const DesktopFeedWindowsTopStripeContentFetchFailed: AppError = {\r\n id: 38012,\r\n source: DesktopFeedConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const DesktopFeedFeedNativeAdServiceFetchFailed: AppError = {\r\n id: 38013,\r\n source: DesktopFeedConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Errors related to Common Header\r\n */\r\nconst CommonHeaderConnectorFileName = \"CommonHeader.connector.ts\";\r\nconst CommonHeaderTsxFileName = \"CommonHeader.tsx\";\r\nexport const CommonHeaderNavigationFailed: AppError = {\r\n id: 38020,\r\n source: CommonHeaderConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const CommonHeaderInvalidConfig: AppError = {\r\n id: 38021,\r\n source: CommonHeaderConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const CommonHeaderMissingFormCode: AppError = {\r\n id: 38022,\r\n source: CommonHeaderConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const CommonHeaderRenderError: AppError = {\r\n id: 38023,\r\n source: CommonHeaderTsxFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const CommonHeaderSSOFailed: AppError = {\r\n id: 38024,\r\n source: CommonHeaderTsxFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const CommonHeaderMeControlLoadFailed: AppError = {\r\n id: 38025,\r\n source: CommonHeaderTsxFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Set of errors in video-card experience.\r\n */\r\nexport const VideoCardInvalidVideoData: AppError = {\r\n id: 38100,\r\n source: \"VideoCard.connector.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\nconst NewsbarFeedConnectorFileName = \"NewsbarFeed.connector.ts\";\r\nexport const NewsbarFeedNativeAdServiceFetchFailed: AppError = {\r\n id: 38200,\r\n source: NewsbarFeedConnectorFileName,\r\n severity,\r\n pb\r\n};\r\nexport const NewsbarFeedNativeWindowsServiceFetchFailed: AppError = {\r\n id: 38201,\r\n source: NewsbarFeedConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Set of errors in sports-card experience.\r\n */\r\nconst SportsDataServiceFileName = \"SportsDataService.ts\";\r\nexport const SportsDataServiceResponseWasNullOrErroneous: AppError = {\r\n id: 38300,\r\n source: SportsDataServiceFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nexport const SportsDataServiceFetchFailed: AppError = {\r\n id: 38301,\r\n source: SportsDataServiceFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Set of errors in the sports-matchup-card experience\r\n */\r\n\r\nconst SportsMatchupCardConnectorSourceFile = \"SportsMatchupCard.connector.ts\";\r\n\r\n/** Exception when OneService response is incorrect */\r\nexport const SportsMatchupCardOneServiceDataError: AppError = {\r\n id: 38310,\r\n source: SportsMatchupCardConnectorSourceFile,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Set of errors in ugc app type.\r\n */\r\nexport const UgcErrorPage: AppError = {\r\n id: 38400,\r\n source: \"UGC/page.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Errors related to Modern Right Rail\r\n */\r\nconst ModernRightRailConnectorFileName = \"ModernRightRail.connector.ts\";\r\nconst ContentProviderServiceFileName = \"ContentProvider.services.ts\";\r\nconst TrendingNewsServiceFileName = \"ContentProvider.services.ts\";\r\n/** Failed to fetch provider details. */\r\nexport const ProviderDetailsFetchError: AppError = {\r\n id: 38500,\r\n source: ContentProviderServiceFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** No content on fetching provider feed. */\r\nexport const ProviderFeedFetchEmpty: AppError = {\r\n id: 38501,\r\n source: ContentProviderServiceFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to fetch trending news card data. */\r\nexport const TrendingNewsFetchError: AppError = {\r\n id: 38502,\r\n source: TrendingNewsServiceFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Failed to fetch trending news card backup data. */\r\nexport const TrendingNewsBackupFetchError: AppError = {\r\n id: 38503,\r\n source: TrendingNewsServiceFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Native Ad fetch failed */\r\nexport const NativeAdFetchFailed: AppError = {\r\n id: 38504,\r\n source: ModernRightRailConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Set of errors for UserNurturingManager.\r\n */\r\nconst UserNurturingManagerFileName = \"UserNurturingManager.ts\";\r\n\r\n/**\r\n * window.chrome.ntpSettingsPrivate API is not available\r\n */\r\nexport const NtpSettingsPrivateNotAvailable: AppError = {\r\n id: 38600,\r\n source: UserNurturingManagerFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error updating ntp private settings preference.\r\n */\r\nexport const FailedToSaveToNtpPrivatePreference: AppError = {\r\n id: 38601,\r\n source: UserNurturingManagerFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error reading ntp private settings preference.\r\n */\r\nexport const FailedToReadNtpPrivatePreference: AppError = {\r\n id: 38602,\r\n source: UserNurturingManagerFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Error reading ntp private settings preference.\r\n */\r\nexport const AppPinningPrivateException: AppError = {\r\n id: 38603,\r\n source: \"TargetAction.cta.ts\",\r\n severity,\r\n pb\r\n};\r\n\r\n/**\r\n * Errors related to Background image\r\n * More errors can be found on 818X\r\n */\r\nconst enterpriseImageProvider = \"EnterpriseImageProvider.ts\";\r\n\r\n/** Failed to fetch provider details. */\r\nexport const CopyrightParseError: AppError = {\r\n id: 38700,\r\n source: bingImageProvider,\r\n severity,\r\n pb\r\n};\r\n\r\n/** FRE image invalid index */\r\nexport const FREImageInvalidIndex: AppError = {\r\n id: 38701,\r\n source: bingImageProvider,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Enterprise image unexpected call */\r\nexport const EnterpriseImageUnexpected: AppError = {\r\n id: 38702,\r\n source: enterpriseImageProvider,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Enterprise image invalid index */\r\nexport const EnterpriseInvalidIndex: AppError = {\r\n id: 38703,\r\n source: enterpriseImageProvider,\r\n severity,\r\n pb\r\n};\r\n\r\nconst summaryCardConnectorFileName = \"SummaryCard.connector.ts\";\r\n\r\n/** Error fetching weather data */\r\nexport const SummaryCardFetchWeatherData: AppError = {\r\n id: 38800,\r\n source: summaryCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Error fetching weather auto suggest data */\r\nexport const SummaryCardFetchAutoSuggestWeatherData: AppError = {\r\n id: 38801,\r\n source: summaryCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Error refreshing weather data */\r\nexport const SummaryCardRefreshWeatherData: AppError = {\r\n id: 38802,\r\n source: summaryCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n/** Error connecting summary card component */\r\nexport const SummaryCardConnectComponent: AppError = {\r\n id: 38803,\r\n source: summaryCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst todaysEventsCardConnectorFileName = \"TodaysEventsCard.connector.ts\";\r\n\r\n/** Error fetching today's events */\r\nexport const TodaysEventsCardFetch: AppError = {\r\n id: 38900,\r\n source: todaysEventsCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst todaysEventsCardManagerFileName = \"EventManager.ts\";\r\n\r\n/** Error determining todays event's conflicts */\r\nexport const TodaysEventsCardManagerConflict: AppError = {\r\n id: 38901,\r\n source: todaysEventsCardManagerFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst frequentSitesCardConnectorFileName = \"FrequentSitesCard.connector.ts\";\r\n\r\n// Error Fetching Frequent Sites Data\r\nexport const FrequentSitesCardFetch: AppError = {\r\n id: 39000,\r\n source: frequentSitesCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst recommendedCardConnectorFileName = \"RecommendedCard.connector.ts\";\r\nconst recommendedCardInspectorFileName = \"RecommendedCard.inspector.ts\";\r\n\r\n// Error Fetching Recommended Card Documents\r\nexport const RecommendedCardConnectorFetchDocuments: AppError = {\r\n id: 39100,\r\n source: recommendedCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n// Error Fetching All Recommended Card Preview Images\r\nexport const RecommendedCardConnectorFetchImages: AppError = {\r\n id: 39101,\r\n source: recommendedCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n// Error Fetching Recommended Card Preview Image\r\nexport const RecommendedCardConnectorFetchImage: AppError = {\r\n id: 39102,\r\n source: recommendedCardConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\n// Error creating file item props\r\nexport const RecommendedCardInspectorBuildFileItems: AppError = {\r\n id: 39103,\r\n source: recommendedCardInspectorFileName,\r\n severity,\r\n pb\r\n};\r\n\r\nconst productivityHubContainerConnectorFileName = \"ProductivityHubContainer.connector.ts\";\r\n\r\n/** Error loading child experiences */\r\nexport const ProductivityHubContainerLoadChildren: AppError = {\r\n id: 39200,\r\n source: productivityHubContainerConnectorFileName,\r\n severity,\r\n pb\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { PageBase } from \"@msnews/experiences-redux\";\r\nimport { RequestContext } from \"@msnews/core\";\r\n\r\n// export default function bootstrapPrimeHybrid(): void {\r\n// Get an instance of the PageBase for this app, and start the app\r\nconst app = PageBase.getInstance();\r\n\r\nconst requestContext = new RequestContext();\r\n\r\n// Start the App\r\napp.start();\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { KeyValueArray, KeyValuePair, Utility } from \"./Utility\";\r\nimport { findIndex, isArray, isEmpty, isString, trimEnd, trimStart } from \"lodash-es\";\r\n\r\nimport { StringMap } from \"../types\";\r\nimport { getLocationOrigin } from \"@msnews/isomorphic-util\";\r\n\r\nexport namespace UrlUtility {\r\n\r\n /**\r\n * Characters that, if present on a url, will make prime routing misbehave\r\n *\r\n * These are the characters we know cause problems:\r\n * - spaces\r\n * - slashes\r\n * - punctuation: !?.:\r\n * - ampersands\r\n *\r\n * As we don't know all the offending characters, we are just removing every character that is not alphanumeric\r\n */\r\n const primeForbiddenCharacters = /[^A-Za-z0-9]+/g;\r\n\r\n /**\r\n * Parse parameters from the given URL\r\n * @param {string} url - the URL to parse for parameters\r\n * @param {boolean} decodeComponents - flag to indicate whether the query param key and value should be URL decoded\r\n * @returns {KeyValueArray} - the parsed query key/value collection\r\n */\r\n export function getParamsFromUrl(url: string, decodeComponents = false): KeyValueArray {\r\n if (!isString(url)) {\r\n return null;\r\n }\r\n\r\n const queryString: string = (url || \"\").split(\"?\")[1];\r\n return getParams(queryString, decodeComponents);\r\n }\r\n\r\n /**\r\n * Decode the given URL encoded string that may contain plus signs\r\n * @param {string} val - The value to decode.\r\n * @returns {string} - the decoded value\r\n */\r\n function decodeURIComponentWithPlusSign(val: string): string {\r\n val = val.replace(/\\+/g, \" \");\r\n val = decodeURIComponent(val);\r\n return val;\r\n }\r\n\r\n /**\r\n * Encode uri components in a way that won't break prime routing system\r\n * @param uriComponent the uriComponent to be encoded\r\n */\r\n export function encodeURIComponentForPrime(uriComponent: string): string {\r\n return encodeURIComponent(uriComponent.replace(primeForbiddenCharacters, \"-\"));\r\n }\r\n\r\n /**\r\n * Parse parameters from the given query string\r\n * @param {string} queryString - the query string to parse for parameters\r\n * @param {boolean} decodeComponents - flag to indicate whether the query param key and value should be URL decoded\r\n * @returns {KeyValueArray} - the parsed query key/value collection\r\n */\r\n export function getParams(queryString: string, decodeComponents = false): KeyValueArray {\r\n const params: KeyValueArray = [];\r\n // Remove the leading ? if it is present\r\n if (queryString && queryString.startsWith(\"?\")) {\r\n queryString = queryString.substring(1);\r\n }\r\n\r\n if (queryString) {\r\n // remove hash part.\r\n queryString = queryString.split(\"#\")[0];\r\n const queryArray = queryString.split(\"&\");\r\n for (let ndx = 0; ndx < queryArray.length; ndx++) {\r\n const parts = queryArray[ndx].split(\"=\");\r\n let queryKey = parts[0];\r\n let queryValue = parts[1];\r\n\r\n if (decodeComponents) {\r\n queryKey = decodeURIComponentWithPlusSign(queryKey);\r\n if (queryValue) {\r\n queryValue = decodeURIComponentWithPlusSign(queryValue);\r\n }\r\n }\r\n\r\n // Don't allow for duplicate query string parameter keys. Take the last one\r\n const newParam: KeyValuePair = { key: queryKey, value: queryValue };\r\n const existingParam = findIndex(params, (entry) => entry.key === newParam.key);\r\n if (existingParam === -1) {\r\n params.push(newParam);\r\n } else {\r\n params[existingParam] = newParam;\r\n }\r\n }\r\n }\r\n return params;\r\n }\r\n\r\n /**\r\n * Parse specific parameters from the given query string, allowing for multiple item=key:value.\r\n * This function ONLY parses qsp item=[key]:[value]\r\n * Note: Use first given rule for duplicate key!\r\n * @param {string} queryString - the query string to parse for parameters\r\n * @returns {KeyValueArray} - the parsed query key/value collection\r\n */\r\n export function getParamsWithItems(queryString: string): KeyValueArray {\r\n const params: KeyValueArray = [];\r\n\r\n const inputKey = \"item\";\r\n\r\n if (queryString) {\r\n // Remove the leading ? if it is present\r\n if (queryString.startsWith(\"?\")) {\r\n queryString = queryString.substring(1);\r\n }\r\n\r\n // split on the hashes.\r\n queryString = queryString.split(\"#\")[0];\r\n const queryArray = queryString.split(\"&\");\r\n for (let ndx = 0; ndx < queryArray.length; ndx++) {\r\n const parts = queryArray[ndx].split(\"=\");\r\n let queryKey = parts[0];\r\n let queryValue = parts[1];\r\n\r\n // If the query key is inputKey (default: \"item\"), and the query values is key:value, then convert the\r\n // value into the actual key/value\r\n if (queryKey.toLowerCase() === inputKey) {\r\n const queryItems = queryValue.split(\":\");\r\n // Ignore value not in \"key:value\" format\r\n if (queryItems.length === 2) {\r\n queryKey = queryItems[0];\r\n queryValue = queryItems[1];\r\n\r\n // Don't allow for duplicate query string parameter keys. Use first given rule for duplicate key!\r\n const newParam: KeyValuePair = { key: queryKey, value: queryValue };\r\n const existingParam = params.findIndex((entry) => entry.key === newParam.key);\r\n if (existingParam === -1) {\r\n params.push(newParam);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return params;\r\n }\r\n\r\n /**\r\n * Cache URI to paramsObj mapping\r\n */\r\n const hrefParamsObj: any = {};\r\n\r\n /**\r\n * Utility method to extract query string param in url.\r\n *\r\n * @export\r\n * @param {string} name - query param name\r\n * @param {string} href - URL\r\n * @returns {string} - query param value\r\n */\r\n export function getQueryParameterByName(name: string, href: string): string {\r\n if (!hrefParamsObj[href]) {\r\n hrefParamsObj[href] = getParamsObj(href);\r\n }\r\n\r\n const paramsObj = hrefParamsObj[href];\r\n const value = paramsObj[name];\r\n return (value !== undefined)\r\n ? value\r\n : null;\r\n }\r\n\r\n /**\r\n * Check if given url string is a valid url.\r\n * Returns true when url string is a valid url, otherwise false.\r\n *\r\n * @export\r\n * @param url {string} - Url string value to check\r\n * @param validateScheme {boolean} - Should scheme validation be forced\r\n * @return {boolean}\r\n */\r\n export function isValidUrl(url: string, validateScheme: boolean): boolean {\r\n return (isString(url) &&\r\n (url.length > 0) &&\r\n (!validateScheme ||\r\n validateScheme && url.indexOf(\"http\") === 0));\r\n }\r\n\r\n /**\r\n * Converts a keyValueArray into a set of query string parameters\r\n *\r\n * @export\r\n * @param {any} - params to be converted\r\n * @return {string}\r\n */\r\n export function keyValueArrayToQueryString(params: KeyValueArray): string {\r\n // Validate we have a nonempty array\r\n if (!isArray(params) || isEmpty(params)) {\r\n return \"\";\r\n }\r\n\r\n // Filter for valid keyValue entries, and then map them into key==value strings\r\n // joined with an &\r\n const queryString: string = params.filter(kv =>\r\n Utility.isKeyValuePair(\r\n kv,\r\n (key) => typeof (key) === \"string\",\r\n (value) => typeof (value) === \"string\"))\r\n .map(kv => kv.key + \"=\" + kv.value)\r\n .join(\"&\");\r\n\r\n return queryString;\r\n }\r\n\r\n /**\r\n * Helper method to parse the given URLs query parameters to a lookup dictionary\r\n * @param url - the URL string with the query params to parse\r\n * @returns The {StringMap} containing the key/value pairs, or empty object.\r\n */\r\n function getParamsObj(url: string): StringMap {\r\n const paramsObj = {};\r\n const paramArray = getParamsFromUrl(url, true);\r\n if (paramArray && paramArray.length) {\r\n paramArray.forEach(keyValuePair =>\r\n paramsObj[keyValuePair.key] = keyValuePair.value);\r\n }\r\n return paramsObj;\r\n }\r\n\r\n /**\r\n * For the given `url`, it appends the `subPath` to it.\r\n * It takes propers care to forward slashes characters\r\n * at the end of `url` and at the start of `subPath` parameters\r\n * @param url a valid url\r\n * @param subPath the path which is appended to `url`\r\n * @returns an URL object which is the `url` appended by `subPath`\r\n */\r\n export function joinSubpathToURL(url: URL, subPath: string): URL {\r\n const href = url.href;\r\n const trimmedEndSlashFromHref = trimEnd(href, \"/\");\r\n const trimmedStartSlashFromSubpath = trimStart(subPath, \"/\");\r\n return new URL(`${trimmedEndSlashFromHref}/${trimmedStartSlashFromSubpath}`);\r\n }\r\n\r\n /**\r\n * Updates a search parameter in the given url to map to a new value\r\n * Does not modify the url if the given search param doesn't exist\r\n * @param url the url to update\r\n * @param key the name of the search param to be updated\r\n * @param value the new value for the given search param\r\n * @returns {URL} the updated URL\r\n */\r\n export function updateSearchParam(url: URL, key: string, value: string): URL {\r\n // Note that the searchParams data member may not be compatible with older browser versions\r\n // see https://caniuse.com/#search=searchparams\r\n if (url && url.searchParams && url.searchParams.get(key)) {\r\n url.searchParams.set(key, value);\r\n }\r\n\r\n return url;\r\n }\r\n\r\n /**\r\n * Appends a search parameter to the given url\r\n * @param url the url to modify\r\n * @param key the name of the search param to be appended\r\n * @param value the new value for the given search param\r\n * @returns {URL} the modified URL\r\n */\r\n export function appendSearchParam(url: URL, key: string, value: string, fallback?: boolean): URL {\r\n if (url) {\r\n if (url.searchParams || fallback) {\r\n url.searchParams.append(key, value);\r\n } else {\r\n // TODO Bug 22390312: [Peregrine] UrlUtility appendSearchParam needs more robust polyfill\r\n url = new URL(url.href + (url.search.indexOf(\"?\") >= 0 ? \"&\" : \"?\") + key + \"=\" + value);\r\n }\r\n }\r\n\r\n return url;\r\n }\r\n\r\n /**\r\n * Returns an absolute URL if a relative on is passed in, or returns the passed in URL if already absolute\r\n * @param partialUrl The relative or absolute URL\r\n * @returns {string} the absolute URL\r\n */\r\n export function getAbsoluteUrl(partialUrl: string): string {\r\n if (partialUrl.indexOf(\"://\") > 0 || partialUrl.indexOf(\"//\") === 0) {\r\n return partialUrl;\r\n } else {\r\n return getLocationOrigin() + partialUrl;\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Enum for different app types\r\n * @enum\r\n */\r\nexport enum AppType {\r\n Edge = \"edge\",\r\n EdgeChromium = \"edgeChromium\",\r\n Finance = \"finance\",\r\n FirstParty = \"firstParty\",\r\n HomePage = \"homePage\",\r\n Hub = \"hub\",\r\n MicrosoftNews = \"microsoftNews\",\r\n MMX = \"mmx\",\r\n Office = \"office\",\r\n SuperApp = \"superApp\",\r\n Shopping = \"shopping\",\r\n Traffic = \"traffic\",\r\n UGC = \"ugc\",\r\n Views = \"views\",\r\n Weather = \"weather\",\r\n Windows = \"windows\",\r\n WindowsShell = \"windowsShell\"\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Client side properties that Render Service sends to initialize RequestData.\r\n * These properties are typically passed via query param to the render service.\r\n * On the client side these are available and populated through the DOM.\r\n */\r\nexport interface RequestProps {\r\n\r\n /**\r\n * URL for the original client request.\r\n */\r\n href: string;\r\n\r\n /**\r\n * Height of client browser window.\r\n */\r\n innerHeight: number;\r\n\r\n /**\r\n * Device pixel ratio of client.\r\n */\r\n devicePixelRatio: number;\r\n\r\n /**\r\n * CSS Grid support of the client browser.\r\n */\r\n canUseCssGrid: boolean;\r\n\r\n /**\r\n * Request Id.\r\n */\r\n requestId: string;\r\n\r\n /**\r\n * The request cookie string\r\n */\r\n cookie: string;\r\n\r\n /**\r\n * The request referer string\r\n */\r\n referer: string;\r\n}\r\n\r\n/**\r\n * Singleton class to store client browser data sent through query param to Render Service.\r\n * This is only used under server environment.\r\n */\r\nclass RequestData {\r\n /**\r\n * The single instance of the RequestData class.\r\n * @type {RequestData}\r\n */\r\n private static _instance: RequestData = null;\r\n\r\n /**\r\n * URL object to be used to store original request url.\r\n */\r\n public readonly url: URL;\r\n\r\n /**\r\n * Inner height of browser from the original request.\r\n */\r\n public readonly innerHeight: number;\r\n\r\n /**\r\n * Device pixel ratio from the original request.\r\n */\r\n public readonly devicePixelRatio: number;\r\n\r\n /**\r\n * Boolean flag that represents if CSS Grid is supported by the browser from the original request.\r\n */\r\n public readonly canUseCssGrid: boolean;\r\n\r\n /**\r\n * Request Id.\r\n */\r\n public readonly requestId: string;\r\n\r\n /**\r\n * Request cookie string\r\n */\r\n public readonly cookie: string;\r\n\r\n /**\r\n * Request referer string\r\n */\r\n public readonly referer: string;\r\n\r\n /**\r\n * Initialize the request data instance with passed in client properties\r\n */\r\n private constructor(data: RequestProps) {\r\n this.url = new URL(data.href);\r\n this.innerHeight = data.innerHeight;\r\n this.devicePixelRatio = data.devicePixelRatio;\r\n this.canUseCssGrid = data.canUseCssGrid;\r\n this.requestId = data.requestId;\r\n this.cookie = data.cookie;\r\n this.referer = data.referer;\r\n }\r\n\r\n /**\r\n * Returns singleton class instance.\r\n * @returns RequestData\r\n */\r\n public static getInstance(): RequestData {\r\n if (global[\"TEST_ENV\"] && !RequestData._instance) {\r\n resetRequestData({\r\n href: \"http://localhost:8080/\",\r\n innerHeight: 768,\r\n devicePixelRatio: 1,\r\n canUseCssGrid: false,\r\n requestId: \"0\",\r\n cookie: \"\",\r\n referer: \"\"\r\n });\r\n }\r\n\r\n if (!RequestData._instance) {\r\n // Throw error if the request data has not been set as this should never be the case.\r\n // This likely highlights that the request data was not initialized when handling a\r\n // request when server side rendering.\r\n // TODO - http://osgvsowi/24832691 renable throwing an error.\r\n // This is currently disabled as other singletons that are initialized at import time use\r\n // this they will throw an error before anyone has the chance to initialize the request data\r\n resetRequestData({\r\n href: \"http://localhost:8080/\",\r\n innerHeight: 0,\r\n devicePixelRatio: 0,\r\n canUseCssGrid: false,\r\n requestId: \"0\",\r\n cookie: \"\",\r\n referer: \"\"\r\n });\r\n // throw new Error(\"Request data is not initialized yet through ResetInstance.\");\r\n }\r\n return RequestData._instance;\r\n }\r\n\r\n /**\r\n * Reset singleton class instance with passed in info and client settings\r\n * @returns RequestData\r\n */\r\n public static resetInstance(data: RequestProps): RequestData {\r\n RequestData._instance = new RequestData(data);\r\n return RequestData._instance;\r\n }\r\n}\r\n\r\n/**\r\n * Export function to reset the request data singleton.\r\n * This must be used to set the request data.\r\n */\r\nexport const resetRequestData = RequestData.resetInstance;\r\n\r\n/**\r\n * Export get instance function for testing\r\n */\r\nexport const getRequestData = () => (RequestData.getInstance());","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Constants that are used throughout the library\r\n */\r\nexport namespace ConnectorConstants {\r\n /**\r\n * The key within a state JSON document used to store a connectors individual state\r\n */\r\n export const connectorStateKey = \"_@STATE@_\";\r\n\r\n export const renderAction = \"@@connector-view/RENDER\";\r\n\r\n export const dataConnectorMergeInitAction = \"@@data-connector/MERGE-INIT\";\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { WebStorage } from \"./WebStorage\";\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\n/**\r\n * Local storage class for persistent storage\r\n */\r\nexport class LocalStorage extends WebStorage {\r\n constructor() {\r\n let storage: Storage = null;\r\n\r\n if (canUseDOM()) {\r\n try {\r\n storage = window.localStorage;\r\n } catch (ex) {\r\n // Getting local storage failed. Can happen in Chrome when user has disabled cookies.\r\n }\r\n }\r\n\r\n super(storage);\r\n }\r\n}\r\n\r\n/**\r\n * Set the local storage instance. Useful when setting up mock storage instance.\r\n * @param _storage The local storage instance to change to.\r\n */\r\nexport function setLocalStorage(_storage: WebStorage): void {\r\n localStorage = _storage;\r\n}\r\n\r\nexport let localStorage: WebStorage = new LocalStorage();","// © Microsoft Corporation. All rights reserved.\r\n// Provides utility functions to get and set data from browser webStorage.\r\n\r\nimport { tryParseJson } from \"../utilities/Parsing\";\r\nimport { logger } from \"@msnews/diagnostics\";\r\n\r\n/**\r\n * Base class for localeStorage and sessionStorage abstractions\r\n */\r\nexport class WebStorage {\r\n\r\n /**\r\n * Check if the web storage is supported\r\n * @returns {boolean} true if supported\r\n */\r\n public get supported(): boolean {\r\n return !!this.storage;\r\n }\r\n\r\n /**\r\n * Local storage object for persistent storage\r\n * @param storage Storage used.\r\n */\r\n constructor(private readonly storage: Storage) {\r\n }\r\n\r\n /**\r\n * Get given key's value from web storage\r\n * @param {string} key - Key name\r\n * @returns {string} Key value\r\n */\r\n public getItem(key: string): string {\r\n if (this.supported) {\r\n return this.storage.getItem(key);\r\n }\r\n }\r\n\r\n /**\r\n * Gets the value from local storage using the key.\r\n * @param {string} key - the storage key to store under\r\n * @param {T} defaultValue - the default value to return if parsing fails\r\n * @returns {T} The parsed JSON value\r\n */\r\n public getObject(key: string, defaultValue?: T): T {\r\n const value = this.getItem(key);\r\n if (value != null) {\r\n const parsedObj = tryParseJson(value);\r\n if (parsedObj != null) {\r\n return parsedObj;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }\r\n\r\n /**\r\n * Gets given index location key from web storage\r\n * @param {string} key - Key name\r\n * @returns {string} Key value\r\n */\r\n public key(index: number): string {\r\n if (this.supported && index >= 0) {\r\n return this.storage.key(index);\r\n }\r\n }\r\n\r\n /**\r\n * Sets the given value after stringifying as JSON\r\n * @param {string} key - the storage key to store under\r\n * @param {T} value - the value to serialize and store\r\n */\r\n public setObject(key: string, value: T): void {\r\n (value !== undefined)\r\n ? this.setItem(key, JSON.stringify(value))\r\n : this.removeItem(key);\r\n }\r\n\r\n /**\r\n * Removes the given key from storage and returns the existing value parsed\r\n * @param {string} key - the key to remove.\r\n */\r\n public removeObject(key: string): T {\r\n const value = this.removeItem(key);\r\n if (value != null) {\r\n return tryParseJson(value);\r\n }\r\n }\r\n\r\n /**\r\n * Set given key's value to local storage\r\n * @param {string} key - Key name\r\n * @param {string} value - Key value\r\n */\r\n public setItem(key: string, value: string): void {\r\n if (this.supported) {\r\n // Catch quota exceeded exception\r\n try {\r\n this.storage.setItem(key, value);\r\n } catch (e) {\r\n logger.logError(e);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Remove key item from local storage\r\n * @param {string} key - Key name\r\n * @returns {string} Key value\r\n */\r\n public removeItem(key: string): string {\r\n if (this.supported) {\r\n const value = this.getItem(key);\r\n this.storage.removeItem(key);\r\n return value;\r\n }\r\n }\r\n\r\n /**\r\n * Removes all keys containing the given substring in the storage key\r\n * @param {string} substring The substring to check\r\n */\r\n public removeSubstringKeys(substring: string): void {\r\n if (!this.supported || !substring) {\r\n return;\r\n }\r\n\r\n const matchingKeys = [];\r\n for (let index = 0; index < this.storage.length; index++) {\r\n const storageKey = this.key(index);\r\n if (storageKey && storageKey.includes(substring)) {\r\n matchingKeys.push(storageKey);\r\n }\r\n }\r\n\r\n for (let index = 0; index < matchingKeys.length; index++) {\r\n this.removeItem(matchingKeys[index]);\r\n }\r\n }\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Attempts to parse a given string to a JSON object\r\n * @param {string} jsonString - The string to parse.\r\n * @returns {any} - the parsed object if successful, or null otherwise.\r\n */\r\nexport function tryParseJson(jsonString: string): any {\r\n try {\r\n return JSON.parse(jsonString);\r\n } catch {\r\n return null;\r\n }\r\n}\r\n\r\n/**\r\n * Attempts to parse the given value as a integer and if failed will return the defaultValue.\r\n * @param {string} value - The value to parse.\r\n * @param {number} defaultValue - The default value to return if parsing fails\r\n * @returns {number} the parsed value if it was a valid number or otherwise the default value if specified.\r\n */\r\nexport function tryParseInt(value: string, defaultValue: number): number {\r\n const n = parseInt(value);\r\n return isNaN(n) ? defaultValue : n;\r\n}\r\n\r\n/**\r\n * Attempts to convert the given JSON object to a string.\r\n * @param jsonObj - The JSON object to convert.\r\n * @returns {string} - the converted string if successful, or null otherwise.\r\n */\r\nexport function tryStringifyJson(jsonObj: {}): string {\r\n try {\r\n return JSON.stringify(jsonObj);\r\n } catch {\r\n return null;\r\n }\r\n}\r\n","\r\n// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { RenderCache, RenderCacheKeys } from \"./RenderCache\";\r\nimport { keysPrefix, locationHref, normalizedUrlConfigkey, riverRcClassName } from \"./Constants\";\r\n\r\nimport { KeyValueArray } from \"@msnews/core\";\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\nlet renderCacheObject: RenderCache;\r\n\r\nexport const windowAvailable = !!((typeof(window) !== \"undefined\") && window);\r\n\r\n/**\r\n * Function to get render cache if it's valid.\r\n * @returns Render cache object if it exists and is valid otherwise null.\r\n */\r\nexport function getRenderCache(): RenderCache {\r\n if (renderCacheObject) {\r\n return renderCacheObject;\r\n }\r\n\r\n const storage = getStorage();\r\n if (!storage) {\r\n return null;\r\n }\r\n\r\n // get all normalized render cache keys from local storage\r\n let renderCacheKeys: RenderCacheKeys;\r\n const renderCacheStoredKeys = storage.getItem(renderCacheKeyOfNormalizedKeys);\r\n try {\r\n renderCacheKeys = renderCacheStoredKeys && JSON.parse(renderCacheStoredKeys);\r\n } catch (error) {\r\n return null; // keys not parsable.\r\n }\r\n\r\n if (!renderCacheKeys || !renderCacheKeys.keyn || !renderCacheKeys.expn || !renderCacheKeys.frcn || !renderCacheKeys.jssn) {\r\n return null;\r\n }\r\n\r\n const cacheExpirationTimestamp = storage.getItem(renderCacheKeys.expn);\r\n if (!cacheExpirationTimestamp) {\r\n return null; // Cache Expiration Timestamp not exist\r\n }\r\n\r\n const parsedCacheExpirationTimestamp = parseInt(cacheExpirationTimestamp);\r\n if (!parsedCacheExpirationTimestamp) {\r\n return null; // Cache Expiration Timestamp broken.\r\n }\r\n\r\n const currentTimestamp: number = new Date().getTime();\r\n if (currentTimestamp >= parsedCacheExpirationTimestamp) {\r\n return null; // cache expired.\r\n }\r\n\r\n const renderCacheStorage = storage.getItem(renderCacheKeys.keyn);\r\n if (!renderCacheStorage) {\r\n return null; // Cache object is missing.\r\n }\r\n\r\n try {\r\n renderCacheObject = JSON.parse(renderCacheStorage);\r\n } catch (error) {\r\n return null; // Cache object not parsable.\r\n }\r\n\r\n if (!renderCacheObject || !renderCacheObject.dom || !renderCacheObject.batch_css) {\r\n renderCacheObject = null; // Cache object is broken\r\n }\r\n\r\n return renderCacheObject;\r\n}\r\n\r\n/**\r\n * Batch All styles into one object.\r\n */\r\nexport function batchCSS(): string {\r\n let batchCss = \"\";\r\n\r\n // Enumerate and write out all of the JSS styles\r\n const styles = document.getElementsByTagName(\"style\");\r\n const length = styles.length;\r\n\r\n for (let i = 0; i < length; i++) {\r\n // Skip any styles that do not have a data-jss attribute to always pick newer styles added by jss\r\n if (styles[i].dataset.jss != null) {\r\n batchCss += styles[i].innerHTML;\r\n }\r\n }\r\n\r\n return batchCss;\r\n}\r\n\r\n/**\r\n * Scrapes Dom and remove River.\r\n */\r\nexport function scrapeDom(includeNewsFeed: boolean): string {\r\n const root = document.getElementById(\"root\");\r\n\r\n if (!root || !root.innerHTML) {\r\n return \"\";\r\n }\r\n\r\n /* Currently we don't have functionality to include experiences separately,\r\n because of that we do return whole dom if river included in render cache and exclude river otherwise */\r\n if (includeNewsFeed) {\r\n return root.innerHTML;\r\n }\r\n\r\n const rivers = document.getElementsByClassName(riverRcClassName);\r\n\r\n if (!rivers || !rivers.length) {\r\n return root.innerHTML;\r\n }\r\n\r\n const river = rivers[0] as HTMLElement;\r\n\r\n return root.innerHTML.replace(river.outerHTML, \"\");\r\n}\r\n\r\n/**\r\n * Gets the state object from render cache.\r\n * @returns The redux state object.\r\n */\r\nexport function getStateFromRenderCache(): any {\r\n // Check to see if this app instance was bootstrapped with a render-cache\r\n const renderCache = getRenderCache();\r\n\r\n if (!renderCache || !renderCache.state) {\r\n return null; // Render Cache missing or it does not include State.\r\n }\r\n\r\n let initialState;\r\n\r\n try {\r\n initialState = JSON.parse(renderCache.state, reduxStoreStringifyReviver);\r\n } catch (error) {\r\n // Cache state object is not parsable.\r\n }\r\n\r\n return initialState;\r\n}\r\n\r\n/**\r\n * Redux Store Stringify replacer HOF, generates store stringify.\r\n * @param storeExceptions list of store namespaces which will not be included in result.\r\n */\r\nexport function reduxStoreStringifyReplacer(key: string, value: any): any {\r\n const originalObject = this[key];\r\n if (originalObject instanceof Map) {\r\n return {\r\n dataType: \"Map\",\r\n value: [...originalObject]\r\n };\r\n } else {\r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * Function to normalize current URL\r\n * Example:\r\n * For normalizeKeyParamsList = [\"startpage\", \"prerender\"]\r\n * https://ntp.msn.com/edge/ntp?locale=en-us&startpage=1 is normalized to https://ntp.msn.com/edge/ntp?locale=en-us\r\n * https://ntp.msn.com/edge/ntp?startpage=1&locale=en-us is normalized to https://ntp.msn.com/edge/ntp?locale=en-us\r\n * https://ntp.msn.com/edge/ntp?locale=en-us&startpage=1&prerender=1 is normalized to https://ntp.msn.com/edge/ntp?locale=en-us\r\n * @returns normalized location href\r\n */\r\nexport function getNormalizedLocationHref(configParamsList?: [string]) {\r\n\r\n // get the url\r\n const normalizeKeyParamsList = configParamsList || getNormalizeKeyParamsList();\r\n\r\n if (!normalizeKeyParamsList || !normalizeKeyParamsList.length) {\r\n return locationHref;\r\n }\r\n\r\n const searchParams: URLSearchParams = new URLSearchParams(location.search);\r\n if (!searchParams) {\r\n return locationHref;\r\n }\r\n\r\n const normalizedParams: KeyValueArray = [];\r\n searchParams.forEach((value, key) => {\r\n if (!normalizeKeyParamsList.includes(key)) {\r\n normalizedParams.push({ key, value });\r\n }\r\n });\r\n\r\n // Filter for valid keyValue entries, and then map them into key==value strings\r\n // joined with an &\r\n const queryString = normalizedParams.map(kv => kv.key + \"=\" + kv.value).join(\"&\");\r\n const basePath = (locationHref || \"\").split(\"?\")[0];\r\n return basePath + (queryString ? \"?\" + queryString : \"\");\r\n}\r\n\r\n/**\r\n * set normalized param list to localStorage\r\n */\r\nexport function setNormalizeKeyParamsList(normalizeKeyParamsList: Array): void {\r\n if (normalizeKeyParamsList) {\r\n const storage = getStorage();\r\n if (storage) {\r\n storage.setItem(normalizedUrlConfigkey, normalizeKeyParamsList.toString());\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * The key for storing all render cache normalized keys\r\n * Maintain a single entry for collection of all render cache keys\r\n * Example: for https://ntp.msn.com/edge/ntp?locale=en-us URL,\r\n * we have one key with all the following render cache keys values\r\n *\r\n * key: keys_https://ntp.msn.com/edge/ntp?locale=en-us&startpage=1\r\n * value: {\r\n * keyn: \"lastKnown_https://ntp.msn.com/edge/ntp?locale=en-us\", // render cache key\r\n * expn: \"timestamp_https://ntp.msn.com/edge/ntp?locale=en-us\", // expiration key\r\n * frcn: \"force_timestamp_https://ntp.msn.com/edge/ntp?locale=en-us\", // force timestamp key\r\n * jssn: \"lastKnown_https://ntp.msn.com/edge/ntp?locale=en-us_jssMap\" // jss map key\r\n * }\r\n */\r\nexport const renderCacheKeyOfNormalizedKeys = `${keysPrefix}${(typeof (window) !== \"undefined\" ? getNormalizedLocationHref() : \"\")}`;\r\n\r\n/**\r\n * Custom JSON.stringify reviver that will create Map objects from a string/JSON representation\r\n * @param key not used\r\n * @param value The value being converted from a string\r\n */\r\nfunction reduxStoreStringifyReviver(key: any, value: any): any {\r\n // If the value being restored is a object, check it it was a map\r\n if (typeof value === \"object\" && value !== null) {\r\n // If the object value being restored was a map, that was custom written, then revive it by creating a map\r\n if (value.dataType === \"Map\") {\r\n return new Map(value.value);\r\n }\r\n }\r\n\r\n // Return the original value being restored\r\n return value;\r\n}\r\n\r\n/**\r\n * Returns local storage object, or null if it is not accessible.\r\n */\r\nfunction getStorage(): Storage {\r\n try {\r\n return localStorage;\r\n } catch (ex) {\r\n return null;\r\n }\r\n}\r\n\r\n/**\r\n * get normalized param list from localStorage\r\n */\r\nfunction getNormalizeKeyParamsList(): Array {\r\n if (!canUseDOM()) {\r\n return null;\r\n }\r\n\r\n const storage = getStorage();\r\n if (!storage) {\r\n return null;\r\n }\r\n\r\n const normalizeUrlQsp = storage.getItem(normalizedUrlConfigkey);\r\n return normalizeUrlQsp ? normalizeUrlQsp.split(\",\") : null;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n// Split from DOMHelper to aid treeshaking\r\n// which currently adds class definition dependency (eg. RequestData)\r\n// even if they aren't used by code that only uses canUseDOM\r\n//\r\n// This being used in PCS inline scripts so only add to here\r\n// if critically important and do not have any other dependencies;\r\n// otherwise add to DOMHelpers\r\n\r\n/**\r\n * Checks if the DOM is available to access and use.\r\n * @returns {boolean} - true if DOM is available, or false if it is not. This is typically true for\r\n * client side rendering and false for server side rendering.\r\n */\r\nexport function canUseDOM(): boolean {\r\n return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { LiteLogger } from \"./LiteLogger\";\r\nimport { ILoggingService } from \"clientcore-infrastructure-analytics/ILoggingService\";\r\n\r\n/**\r\n * Interface for logger so different implementation of logger could be used.\r\n */\r\nexport interface Logger {\r\n\r\n /**\r\n * Returns the logging service\r\n * @returns {ILoggingService}\r\n */\r\n getLoggingService(): ILoggingService;\r\n\r\n /**\r\n * Checks whether we're running in debug mode.\r\n * @returns True when either debug=1 or debug=true is present as a query param, otherwise false.\r\n */\r\n isDebug(): boolean;\r\n\r\n /**\r\n * Override the isDebug setting. Useful when server side rendering.\r\n */\r\n setDebug(isDebug: boolean): void;\r\n\r\n /**\r\n * Set the tags to filter logs.\r\n * @param tags Tags to filter logs. If empty, do not filter.\r\n */\r\n setTags(tags: string[]): void;\r\n\r\n /**\r\n * Log console message.\r\n * Note that these are not output to the console unless you're in debug mode.\r\n * @param message - Message to log.\r\n * @param tags - Optional tags for specifying log type for filtering logs.\r\n */\r\n log(message: string, tags?: string[]): void;\r\n\r\n /**\r\n * Log error message.\r\n * @param message - Message to log\r\n */\r\n logError(message: string): void;\r\n\r\n /**\r\n * Lazy log console message. Use this when the message being constructed is complex or expensive so that it's only evaluated if needed.\r\n * Note that the callback is not invoked and the message is not output unless you're in debug mode.\r\n * @param getMessage - The function to call to get message to log\r\n */\r\n logCallback(getMessage: () => string): void;\r\n\r\n /**\r\n * Log the object to the console.\r\n * Note that these are not output to the console unless you're in debug mode.\r\n * @param message - Array of messages to log\r\n */\r\n logObjects(...message: any[]): void;\r\n}\r\n\r\n/**\r\n * Set the logger instance.\r\n * @param _logger The logger instance to change to.\r\n */\r\nexport function setLogger(_logger: Logger): void {\r\n logger = _logger;\r\n}\r\n\r\n/** Logger used by everyone. Default is LiteLogger. Please set up desired logger implementaiton with setLogger(). */\r\nexport let logger: Logger = new LiteLogger();\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { toNumber as _toNumber, isString } from \"lodash-es\";\r\n\r\nexport type KeyValuePair = { key: K, value: V };\r\nexport type KeyValueArray = KeyValuePair[];\r\n\r\nexport namespace Utility {\r\n /**\r\n * Check if given value is not null. Returns true when not null, otherwise false.\r\n *\r\n * @export\r\n * @param {any} value - Value to check for not null\r\n * @return {boolean}\r\n */\r\n export function isNotNullOrUndefined(value: any): boolean {\r\n return typeof value !== \"undefined\" && value !== null;\r\n }\r\n\r\n export interface IHashable {\r\n /**\r\n * This function will return the string representation of the complex object\r\n * @type {function}\r\n */\r\n toString(): string;\r\n }\r\n\r\n /**\r\n * Check if given value is defined. Returns true when defined, otherwise false.\r\n *\r\n * @export\r\n * @param {any} value - Value to check for defined\r\n * @return {boolean}\r\n */\r\n export function isDefined(value: any): boolean {\r\n return (typeof value !== \"undefined\");\r\n }\r\n\r\n /**\r\n * Check if a given value is a valid key value pair\r\n *\r\n * @export\r\n * @param potentialKeyValuePair\r\n * @return {boolean}\r\n */\r\n export function isKeyValuePair(potentialKeyValuePair: { key: K, value: V },\r\n isKey: (key: K) => boolean,\r\n isValue: (value: V) => boolean): boolean {\r\n return Utility.isNonNullObject(potentialKeyValuePair)\r\n && isKey(potentialKeyValuePair.key)\r\n && isValue(potentialKeyValuePair.value);\r\n }\r\n\r\n /**\r\n * Check if given value is a non null object. Returns true when value is non null , otherwise false.\r\n *\r\n * @export\r\n * @param {any} value - Value to check for non null\r\n * @return {boolean}\r\n */\r\n export function isNonNullObject(value: any): boolean {\r\n return value && typeof value === \"object\";\r\n }\r\n\r\n /**\r\n * Check if given value is not null. Returns true when not null, otherwise false.\r\n *\r\n * @export\r\n * @param {any} value - Value to check for not null\r\n * @return {boolean}\r\n */\r\n export function isNotNull(value: any): boolean {\r\n return value !== null;\r\n }\r\n\r\n /**\r\n * Check if given value is a a non-null or non-empty string. Returns true when it is, otherwise false.\r\n *\r\n * @export\r\n * @param {string} value - Value to check for string\r\n * @return {boolean}\r\n */\r\n export function isNullOrWhiteSpace(value: string): boolean {\r\n return !isString(value) || value.trim() === \"\";\r\n }\r\n\r\n /**\r\n * Converts string to number\r\n *\r\n * @export\r\n * @param {string} value - string to convert to a number\r\n * @param {number} defaultValue - number to return if there is an error\r\n * @return {number}\r\n */\r\n export function toNumber(value: string, defaultValue = -1): number {\r\n if (!value) {\r\n return defaultValue;\r\n }\r\n\r\n const result = _toNumber(value);\r\n if (!isNaN(result)) {\r\n return result;\r\n } else {\r\n return defaultValue;\r\n }\r\n }\r\n\r\n /**\r\n * Check if given value is an array with content in it.\r\n * Returns true when value is an array with content, otherwise false.\r\n *\r\n * @export\r\n * @param {any[]} value - Value to check for array with content\r\n * @return {boolean}\r\n */\r\n export function arrayHasData(value: any[]): boolean {\r\n if (isNotNullOrUndefined(value)) {\r\n return ((value.constructor === Array) && (value.length > 0));\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Check if given value is a string with content in it.\r\n * Returns true when value is a string with content, otherwise false.\r\n *\r\n * @export\r\n * @param {string} value - Value to check for string with content\r\n * @return {boolean}\r\n */\r\n export function stringHasData(value: string): boolean {\r\n return (isString(value) && (value.trim().length > 0));\r\n }\r\n\r\n /**\r\n * Convert object to string representation for it's values.\r\n * @param {object} object - The object to convert\r\n * @returns {string}\r\n */\r\n export function objectToString(object: object): string {\r\n let value = \"\";\r\n let firstRun = true;\r\n\r\n if (typeof object !== \"object\") {\r\n return value;\r\n }\r\n\r\n for (const attribute in object) {\r\n if (typeof object[attribute] === \"object\") {\r\n value += firstRun ? `${objectToString(object[attribute])}` : `-${objectToString(object[attribute])}`;\r\n } else {\r\n value += firstRun ? `${object[attribute]}` : `-${object[attribute]}`;\r\n }\r\n\r\n firstRun = false;\r\n }\r\n\r\n return value;\r\n }\r\n\r\n /**\r\n * Helper function to replace hyphens with empty strings\r\n *\r\n * @param {string} input - Input string\r\n * @returns {string}\r\n */\r\n export function removeHyphens(input: string): string {\r\n if (!input) {\r\n return;\r\n }\r\n return input.replace(/-/g, \"\");\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Enum for different page types\r\n * @enum\r\n */\r\nexport enum PageType {\r\n Article = \"article\",\r\n ArticleFullScreen = \"articlefullscreen\",\r\n DHP = \"dhp\",\r\n Gallery = \"gallery\",\r\n GalleryFullScreen = \"galleryfullscreen\",\r\n Launcher = \"launcher\",\r\n MMX = \"mmx\",\r\n Newsbar = \"newsbar\",\r\n NTP = \"ntp\",\r\n Story = \"story\",\r\n Video = \"video\",\r\n Windows = \"windowshp\",\r\n WindowsShell = \"shellhp\"\r\n}\r\n\r\n/** The AudienceMode enum */\r\nexport enum AudienceModeType {\r\n Adult = \"adult\",\r\n Enterprise = \"enterprise\",\r\n Kids = \"kids\"\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport enum Market {\r\n BR = \"pt-br\",\r\n DEDE = \"de-de\",\r\n ENCA = \"en-ca\",\r\n ENGB = \"en-gb\",\r\n ENUS = \"en-us\",\r\n ESMX = \"es-mx\",\r\n FRCA = \"fr-ca\",\r\n FRFR = \"fr-fr\",\r\n IN = \"en-in\",\r\n JAJP = \"ja-jp\",\r\n PTBR = \"pt-br\",\r\n KOKR = \"ko-kr\",\r\n ZHCN = \"zh-cn\"\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { TelemetryLibraryBase } from \"../telemetry-interfaces\";\r\n\r\n/**\r\n * Static global variables used to reference to Telemetry library implementation.\r\n * @var TelemetryLibraryBase\r\n */\r\nexport let Telemetry: TelemetryLibraryBase = null;\r\n\r\n/**\r\n * Initialize Telemetry\r\n * @param telemetry TelemetryLibraryBase implementation\r\n */\r\nexport function initTelemetry(telemetry: TelemetryLibraryBase): void {\r\n Telemetry = telemetry;\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport PageBase from \"./PageBase\";\r\n\r\nexport default PageBase;\r\nexport * from \"./PageBase\";\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { canUseDOM, getDocumentElementsByTagName, getLocationSearch, getLocationHostname } from \"@msnews/isomorphic-util\";\r\nimport { applicationCacheConstants, clientSettings, dir, htmlElementIds, info, js, lang, pagetypeSettings, CoreLocalStorageKeys } from \"../constants\";\r\n\r\nimport { AudienceModeType } from \"@msnews/experiences-constants\";\r\nimport { DeviceFormFactorType } from \"cms-models-msn/configuration/types/DeviceFormFactorType\";\r\nimport { ILocale } from \"cms-models-msn/configuration/ILocale\";\r\nimport { IPcsBrowserScope } from \"../types/PcsBrowsersType\";\r\nimport { IPcsInformation } from \"../types/PcsInformation\";\r\nimport { IBundleInformation } from \"../types/BundleInformation\";\r\nimport { IServicesEndpoints } from \"@msnews/core-contracts\";\r\nimport { MarketProperties } from \"./MarketProperties\";\r\nimport { WebClientData } from \"../types/WebClientData\";\r\nimport { OperatingSystemType } from \"cms-models-msn/configuration/types/OperatingSystemType\";\r\nimport { UrlUtility } from \"../utilities/UrlUtility\";\r\nimport { localStorage } from \"../webstorage\";\r\nimport { tryParseJson } from \"../utilities/Parsing\";\r\nimport { KeyValueArray } from \"../utilities\";\r\nimport { logger, updateAppErrorsPropertyBag } from \"@msnews/diagnostics\";\r\nimport { parseISO } from \"date-fns\";\r\n\r\n/**\r\n * Format used for activity ID stored in storage\r\n */\r\nexport type StoredActivityId = {\r\n /**\r\n * ID value\r\n */\r\n id: string;\r\n\r\n /**\r\n * Timestamp of when value was stored\r\n */\r\n ts: number;\r\n};\r\n\r\n/**\r\n * The response from the HeadData API\r\n */\r\nexport interface HeadDataResponse {\r\n /** The client settings object. */\r\n clientSettings: IClientSettings;\r\n\r\n /** The info string, containing flights. */\r\n info: string;\r\n}\r\n\r\n/**\r\n * JSON data contract / interface for settings in the element that are part of the data-client-settings attribute.\r\n */\r\nexport interface IClientSettings {\r\n aid: string,\r\n apptype: string,\r\n apps_locale: string,\r\n audienceMode?: AudienceModeType,\r\n browser?: IPcsBrowserScope,\r\n configIndexDocId?: string,\r\n configRootUrl?: string,\r\n deviceFormFactor?: DeviceFormFactorType,\r\n domain?: string,\r\n featureFlags?: any,\r\n contentId?: string,\r\n\r\n /** The schema://domain to be used for the main feed URL */\r\n feedBaseDomain?: string;\r\n\r\n categoryKey?: string;\r\n functionalonly_cookie_experience: boolean;\r\n functional_cookie_patterns: string;\r\n functional_cookies: string;\r\n geo_city?: string;\r\n geo_country?: string;\r\n geo_countryname?: string;\r\n geo_lat: string;\r\n geo_long: string;\r\n geo_subdivision?: string;\r\n geo_zip?: string;\r\n locale?: ILocale;\r\n market?: MarketProperties;\r\n os?: OperatingSystemType;\r\n pageGenTime?: string;\r\n pagetype?: string;\r\n\r\n /** Query params in the format \"?key=value&...\" as observed from the PCS origin server */\r\n queryparams?: string;\r\n /** Some explicit parameters need to be forwardable to downstream canvases, such as fdhead */\r\n forwardablequeryparams?: string,\r\n\r\n static_page?: string;\r\n verticalKey?: string;\r\n\r\n /** cache busting identifier sent by pcs */\r\n cbid?: string;\r\n\r\n /** PCS information */\r\n pcsInfo?: IPcsInformation;\r\n\r\n /** Bundle information */\r\n bundleInfo?: IBundleInformation;\r\n\r\n /** Services Endpoints */\r\n servicesEndpoints?: IServicesEndpoints;\r\n\r\n /** Environment information */\r\n env?: string;\r\n}\r\n\r\nexport const EnterpiseFlightId = \"prg-enterpriseblended-t\";\r\nexport const OfficeDefaultPivotFlightId = \"prg-officedefault-t\";\r\n\r\n/** Type for storing app versions for different page types */\r\nexport type PageAppVersions = { [pageType: string]: string };\r\n\r\n/**\r\n * Class for getting the head data information.\r\n */\r\nclass HeadData {\r\n /**\r\n * The single instance of the HeadData class.\r\n * @type {HeadData}\r\n */\r\n private static _instance: HeadData;\r\n\r\n private anonCookieName: string;\r\n private locale: string;\r\n private marketDir: string;\r\n private currentFlights: string;\r\n private clientSettings: IClientSettings;\r\n private enableCMSPPEConfigs = false;\r\n private userIsSignedIn: boolean; // Always signed out on server side: https://dev.azure.com/microsoft/OS/_workitems/edit/25344027\r\n private isPreload: boolean;\r\n private isPrerender: boolean;\r\n private headElement: any;\r\n private htmlElement: any;\r\n private applicationCache: any;\r\n private isAppcache: boolean;\r\n private isEnterprise: boolean;\r\n private isOfficeDefaultPivot: boolean;\r\n private isServiceWorkerCache: boolean;\r\n private ssoComplete: boolean;\r\n private aadState: boolean;\r\n private locationSearch: string;\r\n private lastKnownAppVersion: string;\r\n\r\n // TODO: Task 24890741: refactor this class to use the current singleton pattern with ES6 modules\r\n // This will also clean up these getters/setters\r\n public get Locale(): string { return this.locale; }\r\n\r\n public get MarketDir(): string { return this.marketDir; }\r\n public set MarketDir(value: string) { this.marketDir = value; }\r\n\r\n public get CurrentFlights(): string { return this.currentFlights || \"\"; }\r\n public set CurrentFlights(value: string) { this.currentFlights = value; }\r\n\r\n public get ClientSettings(): IClientSettings { return this.clientSettings; }\r\n public set ClientSettings(value: IClientSettings) { this.clientSettings = value; }\r\n\r\n public get EnableCMSPPEConfigs(): boolean { return this.enableCMSPPEConfigs; }\r\n\r\n public get UserIsSignedIn(): boolean { return this.userIsSignedIn; }\r\n public set UserIsSignedIn(value: boolean) { this.userIsSignedIn = value; }\r\n\r\n public get IsPreload(): boolean { return this.isPreload; }\r\n public set IsPreload(value: boolean) { this.isPreload = value; }\r\n\r\n public get IsPrerender(): boolean { return this.isPrerender; }\r\n public set IsPrerender(value: boolean) { this.isPrerender = value; }\r\n\r\n public get IsAppCache(): boolean { return this.isAppcache; }\r\n\r\n public get IsEnterprise(): boolean { return this.isEnterprise; }\r\n public set IsEnterprise(value: boolean) { this.isEnterprise = value; }\r\n\r\n public get IsOfficeDefaultPivot(): boolean { return this.isOfficeDefaultPivot; }\r\n public set IsOfficeDefaultPivot(value: boolean) { this.isOfficeDefaultPivot = value; }\r\n\r\n public get IsServiceWorkerCache(): boolean { return this.isServiceWorkerCache; }\r\n\r\n /**\r\n * The last known app version for the currently loaded page type.\r\n * To get the current page version, use clientSettings.bundleInfo.v value.\r\n */\r\n public get LastKnownAppVersion(): string { return this.lastKnownAppVersion; }\r\n\r\n // TODO: Dependencies that some client side code expects headData to specify but doesn't due to PCS\r\n public get AnonCookieName(): string { return this.anonCookieName; }\r\n public set AnonCookieName(value: string) { this.anonCookieName = value; }\r\n\r\n public get SsoComplete(): boolean { return this.ssoComplete; }\r\n\r\n public get AadState(): boolean { return this.aadState; }\r\n public set AadState(value: boolean) { this.aadState = value; }\r\n\r\n public set LocaleName(value: string) { this.locale = value; }\r\n\r\n /**\r\n * True if we need to generate a new RID for telemetry.\r\n * In normal scenarios the ActivityID and telemetry RID will match. But sometimes we are unable to refresh the head data\r\n * to get a new activity ID. In those cases we need to generate a fresh RID for telemetry, and the ActivityID and RID will\r\n * not match.\r\n */\r\n public newRidNeeded: boolean;\r\n\r\n /**\r\n * Initialize the head data instance, on server side provide the client info & client settings\r\n * @param {WebClientData} clientData Data object containing both client info and settings\r\n */\r\n private constructor(clientData?: WebClientData) {\r\n this.initializeHeadData(clientData);\r\n }\r\n\r\n /**\r\n * Returns singleton class instance.\r\n * @returns {HeadData}\r\n */\r\n public static getInstance(): HeadData { return HeadData._instance || (HeadData._instance = new HeadData()); }\r\n\r\n /**\r\n * Reset singleton class instance with passed in info and client settings. Used on server side to reset HeadData for each request.\r\n * @param {WebClientData} clientData Data object containing both client info and settings\r\n * @returns {HeadData}\r\n */\r\n public static resetInstance(clientData?: WebClientData): HeadData {\r\n HeadData._instance = new HeadData(clientData);\r\n headData = HeadData._instance;\r\n return HeadData._instance;\r\n }\r\n\r\n /**\r\n * Initializes head data. If WebClientData is provided use that, otherwise do client side initialization.\r\n * @param {WebClientData} clientData - Data object containing both client info and settings\r\n */\r\n public initializeHeadData(clientData?: WebClientData): void {\r\n if (clientData) {\r\n // Data is passed in only from Render Service under Node.JS environment since there is no DOM.\r\n this.initializeFromData(clientData);\r\n return;\r\n }\r\n\r\n this.newRidNeeded = undefined;\r\n this.lastUsedActivityIdBacking = undefined;\r\n this.locationSearch = getLocationSearch();\r\n this.htmlElement = canUseDOM() ? getDocumentElementsByTagName(htmlElementIds.html)[0] : null;\r\n this.headElement = canUseDOM() ? getDocumentElementsByTagName(htmlElementIds.head)[0] : null;\r\n this.applicationCache = canUseDOM() ? window.applicationCache : null;\r\n\r\n if (!this.htmlElement || !this.headElement) {\r\n return;\r\n }\r\n\r\n // We always initialize from DOM first because\r\n // even if we are in an appcache/service worker case, we still need some data from the DOM\r\n // and we will fallback to DOM if there are no items found in storage\r\n this.initializeFromDom();\r\n\r\n // Attempt to override with local storage item when in appcache scenario\r\n // In service worker scenario, just update the storage activity id\r\n if (this.applicationCache && this.htmlElement.getAttribute(applicationCacheConstants.manifestAttributeName)) {\r\n this.isAppcache = true;\r\n } else if (window && window.navigator && window.navigator.serviceWorker && window.navigator.serviceWorker.controller) {\r\n this.isServiceWorkerCache = true;\r\n }\r\n\r\n if (this.isAppcache || this.isServiceWorkerCache) {\r\n // First apply head data from local storage. This might change the AID\r\n this.initializeFromStorage();\r\n\r\n // Now update last used activity ID based on the current activity ID\r\n this.initializeLastUsedActivityId();\r\n }\r\n\r\n // Below items are common for both scenarios\r\n const clientSettingsLocaleExists = this.clientSettings && this.clientSettings.locale && this.clientSettings.locale.language && this.clientSettings.locale.market;\r\n this.locale = clientSettingsLocaleExists &&\r\n (\r\n this.clientSettings.locale.language\r\n + \"-\"\r\n + (this.clientSettings.locale.script ? this.clientSettings.locale.script + \"-\" : \"\")\r\n + this.clientSettings.locale.market\r\n ).toLowerCase() || \"\";\r\n\r\n const marketDir = this.htmlElement.getAttribute(dir);\r\n this.marketDir = marketDir && marketDir.toLocaleLowerCase() || \"\";\r\n\r\n this.setQueryItemProvidedValues();\r\n\r\n // Note: This isn't currently being stamped by PCS\r\n const headDataJs = this.headElement.getAttribute(js);\r\n if (headDataJs) {\r\n const headJs = <{ anonckname: string, signedin: number }>tryParseJson(headDataJs);\r\n this.anonCookieName = headJs.anonckname;\r\n this.userIsSignedIn = headJs.signedin === 1;\r\n }\r\n\r\n // Checks if current request is background preload\r\n if (UrlUtility.getQueryParameterByName(\"backgroundpreload\", this.locationSearch)) {\r\n this.isPreload = true;\r\n updateAppErrorsPropertyBag({ isPreload: true });\r\n }\r\n\r\n // Checks if current request is prerender request\r\n if (UrlUtility.getQueryParameterByName(\"prerender\", this.locationSearch)\r\n && document.visibilityState === \"hidden\") {\r\n this.isPrerender = true;\r\n updateAppErrorsPropertyBag({ isPrerender: true });\r\n }\r\n\r\n // Determine if we are in Enterprise version or not\r\n this.setIsEnterprise();\r\n\r\n // Determine if Office is the default pivot\r\n this.setIsOfficeDefaultPivot();\r\n }\r\n\r\n private lastUsedActivityIdBacking: StoredActivityId;\r\n\r\n /**\r\n * Gets the last used activity ID, or null if there is none stored.\r\n */\r\n public get lastUsedActivityId(): StoredActivityId {\r\n if (this.lastUsedActivityIdBacking) {\r\n return this.lastUsedActivityIdBacking;\r\n }\r\n\r\n const storageKey: string = this.getStoredActivityIdKey();\r\n const storedActivityIdJson: string = localStorage.getItem(storageKey);\r\n if (storedActivityIdJson) {\r\n this.lastUsedActivityIdBacking = tryParseJson(storedActivityIdJson);\r\n }\r\n\r\n return this.lastUsedActivityIdBacking;\r\n }\r\n\r\n /**\r\n * Sets the last used activity ID. Pass in null to clear the stored data.\r\n */\r\n public set lastUsedActivityId(activityId: StoredActivityId) {\r\n const storageKey: string = this.getStoredActivityIdKey();\r\n if (activityId) {\r\n if (activityId.id && activityId.ts) {\r\n localStorage.setItem(storageKey, JSON.stringify(activityId));\r\n this.lastUsedActivityIdBacking = activityId;\r\n }\r\n } else {\r\n localStorage.removeItem(storageKey);\r\n }\r\n }\r\n\r\n /**\r\n * Gets the stored head data, or null if none is stored.\r\n */\r\n public get storedHeadData(): HeadDataResponse {\r\n const storageKey: string = this.getStoredHeadDataKey();\r\n const storedHeadDataJson: string = localStorage.getItem(storageKey);\r\n if (storedHeadDataJson) {\r\n return tryParseJson(storedHeadDataJson);\r\n }\r\n }\r\n\r\n /**\r\n * Sets the stored head data. Pass in null to clear the stored data.\r\n */\r\n public set storedHeadData(headDataResponse: HeadDataResponse) {\r\n const storageKey: string = this.getStoredHeadDataKey();\r\n\r\n if (headDataResponse) {\r\n localStorage.setItem(storageKey, JSON.stringify(headDataResponse));\r\n } else {\r\n localStorage.removeItem(storageKey);\r\n }\r\n }\r\n\r\n /**\r\n * Initializes the client settings and info from client data passed in externally (render service query param)\r\n * @param {WebClientData} clientData Data object containing both client info and settings\r\n */\r\n private initializeFromData(clientData: WebClientData): void {\r\n this.clientSettings = clientData.clientSettings;\r\n\r\n this.setFlights(clientData.clientInfo);\r\n\r\n this.setQueryItemProvidedValues();\r\n\r\n const clientSettingsLocaleExists = this.clientSettings && this.clientSettings.locale && this.clientSettings.locale.language && this.clientSettings.locale.market;\r\n this.locale = clientSettingsLocaleExists &&\r\n (\r\n this.clientSettings.locale.language\r\n + \"-\"\r\n + (this.clientSettings.locale.script ? this.clientSettings.locale.script + \"-\" : \"\")\r\n + this.clientSettings.locale.market\r\n ).toLowerCase() || \"\";\r\n this.marketDir = clientData.marketDir && clientData.marketDir.toLocaleLowerCase() || \"\";\r\n\r\n // Determine if we are in Enterprise version or not\r\n this.setIsEnterprise();\r\n\r\n // Determine if Office is the default pivot\r\n this.setIsOfficeDefaultPivot();\r\n }\r\n\r\n /**\r\n * Initializes the client settings and info from DOM element\r\n */\r\n private initializeFromDom(): void {\r\n\r\n this.setFlights(this.headElement.getAttribute(info));\r\n\r\n const dataClientSettings = this.headElement.getAttribute(clientSettings);\r\n if (!dataClientSettings) {\r\n return;\r\n }\r\n\r\n this.clientSettings = tryParseJson(dataClientSettings);\r\n if (!this.clientSettings) {\r\n return;\r\n }\r\n\r\n this.calculateForwardableParams();\r\n const { pagetype } = this.clientSettings;\r\n\r\n // If clientSettings.pagetype does not exist, try getting from data-pagetype.\r\n // For Peregrine full spa page: pagetype is part of data-client-settings. There is no data-pagetype.\r\n // For Prime/Hybrid, pagetype is outside of data-client-settings and it belongs to data-pagetype\r\n if (!pagetype) {\r\n const pageTypeFromSettings = this.headElement.getAttribute(pagetypeSettings);\r\n this.clientSettings.pagetype = pageTypeFromSettings == null ? undefined : pageTypeFromSettings;\r\n }\r\n\r\n // try to get the previously store page version from local storage for this page type,\r\n // and store back the current version\r\n if (pagetype) {\r\n try {\r\n const storedVersions = localStorage.getObject(CoreLocalStorageKeys.pageVersions) || {};\r\n this.lastKnownAppVersion = storedVersions[pagetype];\r\n\r\n // update the dictionary with the new value if different, and store it back to local storage\r\n const { bundleInfo: currentDomVersion } = this.clientSettings;\r\n if (currentDomVersion && this.lastKnownAppVersion !== currentDomVersion) {\r\n storedVersions[pagetype] = currentDomVersion.v;\r\n localStorage.setObject(CoreLocalStorageKeys.pageVersions, storedVersions);\r\n }\r\n } catch {\r\n logger.log(`${this.logPrefix()} couldn't complete localStorage related operation.`);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Initializes headData client settings and info from the value found in storage\r\n * and if none is found, falls back to using the DOM element\r\n */\r\n private initializeFromStorage(): void {\r\n const currentPageStoredHeadData = this.storedHeadData;\r\n\r\n if (currentPageStoredHeadData) {\r\n this.populateFromApiResponse(currentPageStoredHeadData);\r\n }\r\n }\r\n\r\n /**\r\n * Populates fields based on a HeadData API response.\r\n * @param response The response to populate from.\r\n */\r\n private populateFromApiResponse(response: HeadDataResponse) {\r\n if (!response) {\r\n return;\r\n }\r\n\r\n const responseClientSettings = response.clientSettings;\r\n const responseFlights = response.info;\r\n\r\n // The stored head data is corrupt, bail\r\n if (!responseClientSettings || !responseFlights) {\r\n return;\r\n }\r\n\r\n // If DOM page gen time is later than response page gen time, bail. We don't want to load stale head data from storage.\r\n if (this.clientSettings.pageGenTime >= responseClientSettings.pageGenTime) {\r\n // Purge obsolete stored head data.\r\n this.storedHeadData = null;\r\n return;\r\n }\r\n\r\n // Hold on to the current DOM queryparams as we will need to override\r\n // what we get from what is in storage\r\n const domQueryParams = this.clientSettings.queryparams;\r\n\r\n // save the current version if available in a temp variable so we can\r\n // restore it back after updating the clientSettings object with the one from\r\n // storage (which came from head data API, which does not contain the version info\r\n // by design, because version is tied with the static bundles, which should represent the currently\r\n // loaded page.\r\n const currentPageVersion = this.clientSettings && this.clientSettings.bundleInfo && this.clientSettings.bundleInfo.v;\r\n this.clientSettings = responseClientSettings;\r\n\r\n // restore the version after the object update\r\n this.clientSettings.bundleInfo = Object.assign(this.clientSettings.bundleInfo || {}, { v: currentPageVersion });\r\n\r\n // restore the queryParams base on what is found in DOM\r\n // as we want the DOM value to be what is used\r\n // and not what is found in storage for this field\r\n // We want these to stay true to what PCS generated for the page\r\n // and avoid desync when reading what comes from future headData API calls.\r\n this.clientSettings.queryparams = domQueryParams;\r\n this.calculateForwardableParams();\r\n\r\n this.setFlights(responseFlights);\r\n }\r\n\r\n /**\r\n * Initializes the queryparams from parameters\r\n */\r\n private calculateForwardableParams() {\r\n const params = this.clientSettings ? this.clientSettings.queryparams : \"\";\r\n if (!params) {\r\n return;\r\n }\r\n const forwardableParams = [\"fdhead\", \"item\"];\r\n const lowerCaseParams = params.toLocaleLowerCase();\r\n const availableParams = forwardableParams.map((key) => {\r\n const paramValue = UrlUtility.getQueryParameterByName(key, lowerCaseParams);\r\n if (!paramValue) {\r\n return null;\r\n }\r\n return `${key}=${encodeURIComponent(paramValue)}`;\r\n }).filter(x => x);\r\n this.clientSettings.forwardablequeryparams = availableParams.join(\"&\");\r\n }\r\n\r\n /**\r\n * Initializes the \"newRidNeeded\" value based on the page generation time and last used activity ID timestamp.\r\n * Updates the stored \"last used activity ID\"\r\n */\r\n private initializeLastUsedActivityId() {\r\n // Read the \"last used activity ID\"\r\n const lastUsedAid = this.lastUsedActivityId;\r\n\r\n // The activity ID that the page is currently planning on using. This may have been embedded or it may have been loaded up from stored head data.\r\n const currentAid = this.clientSettings.aid;\r\n const pageGenTimeDate: Date = parseISO(this.clientSettings.pageGenTime);\r\n const pageGenTimestamp: number = pageGenTimeDate.getTime();\r\n\r\n // Three conditions need to be met to generate a new RID\r\n // 1) The user has stored a previously used activity ID\r\n // 2) We have a valid page generation timestamp from PCS. PCS embeds pageGenTimestamp in the client settings to tell us\r\n // when it ran and generated the page. This will not be the case for localhost requests because they do not use PCS and instead\r\n // use a static App.html file. For localhost we do not need to generate a new RID.\r\n // 3) The current ActivityId matches the previously used one\r\n this.newRidNeeded = !!(lastUsedAid && pageGenTimestamp && lastUsedAid.id === currentAid);\r\n\r\n // If we have a proper timestamp and it's more recent than the last stored one\r\n if (pageGenTimestamp && (!lastUsedAid || pageGenTimestamp > lastUsedAid.ts)) {\r\n // Store the current activity ID as last used.\r\n this.lastUsedActivityId = { id: currentAid, ts: pageGenTimestamp };\r\n }\r\n }\r\n\r\n /**\r\n * Parses flights from provided string (if in proper format of f:{flights})\r\n * and sets it to the headData object\r\n */\r\n private setFlights(flightString: string): void {\r\n // The comma separated list of flights enabled in current request\r\n this.currentFlights = ((/f:\\s*([^;]+)/i.exec(flightString) || {})[1] || \"\").toLowerCase();\r\n }\r\n\r\n /**\r\n * Determines if we are in Enterprise version based on clientSettings and currentFlights\r\n */\r\n private setIsEnterprise(): void {\r\n // We know we are in the Enterpise version of the page when both the audience mode is set to Enterprise\r\n // and the correct flight id is set.\r\n this.IsEnterprise = this.clientSettings &&\r\n this.currentFlights &&\r\n this.currentFlights.includes(EnterpiseFlightId) &&\r\n this.clientSettings.audienceMode === AudienceModeType.Enterprise;\r\n }\r\n\r\n /**\r\n * Read query items to determine the headdata variable values.\r\n */\r\n private setQueryItemProvidedValues(): void {\r\n // This only finds multiples of item=key:value qsp. If keys are the same, first given will be used (similar to UrlSearchParamsHelper).\r\n const queryItems = UrlUtility.getParamsWithItems(getLocationSearch());\r\n const cmsItem = queryItems.find(item => item.key === \"cms\");\r\n this.enableCMSPPEConfigs = (cmsItem && cmsItem.value === \"ppe\");\r\n\r\n // Test override to add flights for scope purposes\r\n this.setCurrentFlightsTestOverride(queryItems);\r\n }\r\n\r\n /**\r\n * Overrides currentFlights when hostname is localhost. Used for testing.\r\n */\r\n private setCurrentFlightsTestOverride(queryItems: KeyValueArray): void {\r\n if (getLocationHostname().toLowerCase().includes(\"localhost\") && queryItems) {\r\n const flights = queryItems.find(item => item.key === \"flights\");\r\n if (flights) {\r\n this.currentFlights = flights.value;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Determines if Office is the default pivot based on flight id.\r\n */\r\n private setIsOfficeDefaultPivot(): void {\r\n // There is work scheduled to have \"sticky\" pivots stored in some form of local storage which will\r\n // replace this check. Until then, the only way to know if Office is the default pivot is to check\r\n // for this flight id\r\n this.IsOfficeDefaultPivot = this.currentFlights && this.currentFlights.includes(OfficeDefaultPivotFlightId);\r\n }\r\n\r\n /**\r\n * Gets the local storage key for the head data.\r\n */\r\n private getStoredHeadDataKey(): string {\r\n return \"shd_\" + this.clientSettings.pagetype;\r\n }\r\n\r\n /**\r\n * Gets the local storage key for the head data.\r\n */\r\n private getStoredActivityIdKey(): string {\r\n return \"sai_\" + this.clientSettings.pagetype;\r\n }\r\n\r\n /**\r\n * Prefix for headdata logs. Server side add the head and html elements.\r\n * @returns the prefix string for logger message.\r\n */\r\n private logPrefix(): string {\r\n // Request Id is only available on server side.\r\n return `HeadData:${(canUseDOM() ? \"\" : ` [Head:${this.headElement}] and [Html:${this.htmlElement}]`)}`;\r\n }\r\n}\r\n\r\nexport const getHeadData = HeadData.getInstance;\r\n\r\n// headData can be reinitialized through resetHeadData.\r\nexport let headData = HeadData.getInstance();\r\n\r\n/**\r\n * Export function to reset headData based on WebClientData\r\n */\r\nexport const resetHeadData = HeadData.resetInstance;","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { canUseDOM, getCookieString } from \"@msnews/isomorphic-util\";\r\n\r\n/**\r\n * Returns the cookie content given a name\r\n *\r\n * @param name {string} - cookie name\r\n * @returns the value of the cookie or `null`, if the key is not found.\r\n */\r\nexport function getCookie(name: string): string {\r\n const cookieString = getCookieString();\r\n\r\n if (cookieString) {\r\n const re = new RegExp(\"\\\\b\" + name + \"\\\\s*=\\\\s*([^;]*)\", \"i\");\r\n const match = re.exec(cookieString);\r\n return (match && match.length > 1 ? match[1] : null);\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/**\r\n * Helper function that retrieves the MUID from the document.cookie\r\n * or uses the saved value if the cookie was retrieved for the current page instance\r\n */\r\nexport function getMuidCookie(): string {\r\n return getCookie(\"MUID\");\r\n}\r\n\r\n/**\r\n * Helper function used to set a cookie\r\n * NOTE: THIS BYPASSES ANY GDPR CHECK AND HENCE ONLY REQUIRED FUNCTIONAL COOKIES SHOULD BE SET USING THIS\r\n * IF YOU DO NOT KNOW IF YOUR COOKIE IS ONE THEN PLEASE USE Cookies.ts setCookie THAT MAKES USE OF GDPR LOGIC CHECKS\r\n * When expiryDays is equal to -1 it will unset the cookie\r\n * * @param {string} name Cookie name\r\n * * @param {string} value Cookie value\r\n * * @param {number} expiryDays Cookie expiry days\r\n * * @param {string} domain Cookie domain\r\n * * @param {string} path Cookie path\r\n * * @param {boolean} secure Is it a https only cookie\r\n */\r\nexport function setRequireFunctionalCookie(name: string, value: string, expiryDays?: number, domain?: string, path?: string, secure?: boolean): void {\r\n let expiryDate;\r\n const builder = [name, \"=\", value];\r\n if (-1 === expiryDays) {\r\n // Expires date format is supposed to be in GMT.\r\n expiryDate = \"Fri, 31 Dec 1999 23:59:59 GMT\";\r\n } else if (expiryDays) {\r\n const date = new Date();\r\n date.setTime(date.getTime() + (expiryDays * 86400000)); // 86400000 == 24*60*60*1000 (ms/day)\r\n expiryDate = date.toUTCString();\r\n }\r\n\r\n if (expiryDate) { builder.push(\";expires=\", expiryDate); }\r\n if (domain) { builder.push(\";domain=\", domain); }\r\n if (path) { builder.push(\";path=\", path); }\r\n if (secure) { builder.push(\";secure\"); }\r\n\r\n if (canUseDOM() && document) {\r\n document.cookie = builder.join(\"\");\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { assign, get, merge, set } from \"lodash-es\";\r\n\r\nimport { ConnectorConstants } from \"../constants/ConnectorConstants\";\r\nimport { ConnectorNamespaces } from \"@msnews/experiences-constants\";\r\nimport { IActionPayload } from \"./IActionPayload\";\r\nimport { IDataConnector } from \"../connectors/IDataConnector\";\r\nimport { IReducer } from \"./IReducer\";\r\nimport { dataConnectorInjector } from \"./DataConnectorInjector\";\r\nimport { isNullOrUndefined } from \"util\";\r\nimport { logError } from \"@msnews/page-error-handling\";\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\n/** Resolve & Reject Function Signature */\r\ntype ResolveConnectorSignature = (connector: IDataConnector) => void;\r\ntype RejectConnectorSignature = (error: Error) => void;\r\n\r\n/**\r\n * Pending getDataConnector Promise\r\n */\r\ninterface PendingConnectorPromise {\r\n /** Promise */\r\n promise: Promise>;\r\n /** callback to resolve the promise */\r\n resolve: ResolveConnectorSignature;\r\n /** callback to reject the promise */\r\n reject: RejectConnectorSignature;\r\n}\r\n\r\n/** Result from running a reducer. */\r\ninterface ReducerResult {\r\n /** The new state calculated by the reducer */\r\n newState: any;\r\n\r\n /** True if the state changed. */\r\n stateChanged: boolean;\r\n}\r\n\r\n/**\r\n * A reducer that can dynamically add and remove individual sub-reducers\r\n * @class\r\n */\r\nexport class DynamicReducer {\r\n\r\n /**\r\n * A map of connectors, which maintain the sub-spaced state. Reducers and connectors are keyed by namespace\r\n */\r\n private readonly _connectorMap: {[key: string]: IDataConnector} = {};\r\n\r\n /**\r\n * The list of global connectors. Used for fast lookup instead of iterating through _connectorMap keys and toArray methods.\r\n */\r\n private readonly _globalConnectors: IDataConnector[] = [];\r\n\r\n /**\r\n * The list of all connectors. Used for fast lookup instead of iterating through _connectorMap keys and toArray methods.\r\n */\r\n private readonly _allConnectors: IDataConnector[] = [];\r\n\r\n /**\r\n * The list of all pending promises for the get data connector call. Used to resolve the promise when data connector is instantiated.\r\n */\r\n private readonly _getDataConnectorPendingPromises: Map = new Map();\r\n\r\n /**\r\n * Creates an instance of the `DynamicReducer` class.\r\n * @constructor\r\n * @param {string} type The action type.\r\n */\r\n constructor() {\r\n // bind the reduce method to this instance\r\n this.reduce = this.reduce.bind(this);\r\n }\r\n\r\n /**\r\n * Returns an array of connectors that have their reducers registered with this instance\r\n * @method\r\n * @returns {IDataConnector} A simple arry of all connectors\r\n */\r\n public connectors(): IDataConnector[] {\r\n return this._allConnectors;\r\n }\r\n\r\n /**\r\n * Returns an array of connectors that have their reducers registered with this instance\r\n * @method\r\n * @param {string} namespace The namespace of the connector to return, if it is in the map\r\n * @returns {IDataConnector | undefined} A simple arry of all connectors\r\n */\r\n public connector(namespace: string): IDataConnector | undefined {\r\n return (this._connectorMap[namespace]);\r\n }\r\n\r\n /**\r\n * Returns an array of connectors that have state that is global\r\n * @method\r\n * @returns {IDataConnector} A simple arry of connectors that have global state\r\n */\r\n public globalConnectors(): IDataConnector[] {\r\n return this._globalConnectors;\r\n }\r\n\r\n /**\r\n * Returns a promise which resolves immediately if the data connector is already present on the page,\r\n * otherwise resolves when the data connector is instantiated on the Page later in the lifecycle.\r\n * @method\r\n * @param namespace The namespace of data connector to return\r\n */\r\n public getDataConnector(namespace: ConnectorNamespaces): Promise> {\r\n // Check for data connector, if it is already present resolve immediately\r\n const dataConnector = this.connector(namespace);\r\n if (dataConnector) {\r\n return Promise.resolve(dataConnector);\r\n }\r\n\r\n // Check if we have an entry for the namespace in pending promise map, if present return the same promise\r\n const pendingPromise = this._getDataConnectorPendingPromises.get(namespace);\r\n if (pendingPromise) {\r\n return pendingPromise.promise;\r\n }\r\n\r\n // If the data connector is not on the page and has no entry in the pending promise map, create a new promise\r\n let resolveCallback: ResolveConnectorSignature;\r\n let rejectCallback: RejectConnectorSignature;\r\n const promise = new Promise>((resolve, reject) => {\r\n // Get the reference to the resolve & reject which can be called later when the data connector is instantiated on the Page\r\n resolveCallback = resolve;\r\n rejectCallback = reject;\r\n });\r\n\r\n // Add the promise to the pending promise map\r\n this._getDataConnectorPendingPromises.set(namespace, { promise: promise, resolve: resolveCallback, reject: rejectCallback });\r\n\r\n // Return the promise\r\n return promise;\r\n }\r\n\r\n /**\r\n * Produces the next state based on the given action. The state to be reduced is an aggregate of the reducers for all of the connectors\r\n * that have been added.\r\n * The overall state looks something like:\r\n * This will be the state for the redux-subspace for the connector. It is of the form:\r\n * {\r\n * FOO: {\r\n * _@STATE@_: {\r\n * \r\n * },\r\n * BAR: {\r\n * _@STATE@_: {\r\n * \r\n * },\r\n * },\r\n * }\r\n * }\r\n * @function\r\n * @param state {any} The previous state of the application. The application state, will contain one or more sub-states, which will be individually reduced\r\n * @param actionPayload {IActionPayload} The action detail to update the state with.\r\n * @returns {any} The next state for the application, containing the next state for each connector (a.k.a subspace)\r\n */\r\n public reduce(state: any, actionPayload: IActionPayload): any {\r\n // If the initial state is undefined, then create an empty object to start with\r\n if (isNullOrUndefined(state)) {\r\n state = {};\r\n }\r\n\r\n let newState = { ...state };\r\n let stateChanged = false;\r\n\r\n // See if we need to reduce for a specific connector. This is the common case.\r\n if (actionPayload !== undefined && actionPayload.key !== undefined) {\r\n // If this is a special action, used to force a re-render, then we need to set stateChanged to true, and create a clone of the existing scoped state\r\n const typeIsString: boolean = typeof actionPayload.type === \"string\";\r\n if (typeIsString && actionPayload.type.endsWith(ConnectorConstants.renderAction)) {\r\n const statePropertyKey = actionPayload.key + \".\" + ConnectorConstants.connectorStateKey;\r\n const connectorState = assign({}, get(state, statePropertyKey, undefined));\r\n set(newState, statePropertyKey, connectorState);\r\n stateChanged = true;\r\n } else if (typeIsString && actionPayload.type.endsWith(ConnectorConstants.dataConnectorMergeInitAction)) {\r\n const experienceFullNamespace: string = actionPayload.key;\r\n const dataConnectorName: ConnectorNamespaces = actionPayload.params[0];\r\n\r\n if (dataConnectorName) {\r\n dataConnectorInjector.initializeExperience(newState, experienceFullNamespace, dataConnectorName);\r\n stateChanged = true;\r\n }\r\n } else {\r\n // If the connector doing the reducing is global, then create a deep copy of state, so that all the connected\r\n // components think the state is new, and run their mappers. Connected components are subscribed to, and only see\r\n // changed in their subspace portion of the state tree. The redux connect implementation uses strict equal comparison,\r\n // meaning it consider the state change if it is a new object reference, even if all the properties are still the same\r\n if (this._connectorMap[actionPayload.key]) {\r\n if (this._connectorMap[actionPayload.key].isGlobal) {\r\n newState = merge({}, newState);\r\n }\r\n\r\n const connectorReducerResult = this.computeNextStateForConnector(newState, actionPayload.key, actionPayload);\r\n stateChanged = connectorReducerResult.stateChanged;\r\n\r\n if (stateChanged) {\r\n // Check to see if any experiences are including this data connector state. If so, update those too.\r\n dataConnectorInjector.reportStateChange(newState, actionPayload.key, connectorReducerResult.newState);\r\n }\r\n } else {\r\n // If connectorMap is undefined, throw error immediately during SSR.\r\n if (!canUseDOM()) {\r\n logError(`ConnectorMap for ${actionPayload.key} is undefined.`, 34006, {});\r\n throw new Error(\"Reducer for: \" + actionPayload.key + \" must not return undefined.\");\r\n }\r\n }\r\n }\r\n } else {\r\n // Iterate over the full list of connectors calling each reducer. This is not the common case, and is typically done\r\n // for actions that come from Redux, during initialization\r\n Object.keys(this._connectorMap).forEach(key => {\r\n if (this.computeNextStateForConnector(newState, key, actionPayload).stateChanged) {\r\n stateChanged = true;\r\n }\r\n });\r\n }\r\n\r\n // Return the newState, as modified by the reducer(s) if it was changed, otherwise return the original state\r\n if (stateChanged) {\r\n return newState;\r\n } else {\r\n return state;\r\n }\r\n }\r\n\r\n /**\r\n * Adds a sub reducer for a connector to the sub-reducer collection.\r\n * @method\r\n * @param {IDataConnector} connector The connector to add.\r\n */\r\n public addSubReducerForConnector(connector: IDataConnector): void {\r\n if (!connector) {\r\n throw new Error(\"The parameter 'connector' cannot be null.\");\r\n }\r\n\r\n // Add the sub-reducer and connector into their maps, based on the connector's namespace\r\n const key = connector.fullNamespace;\r\n this._connectorMap[key] = connector;\r\n\r\n // update the all and global connector fast lookup lists\r\n this._allConnectors.push(connector);\r\n\r\n if (connector.isGlobal) {\r\n this._globalConnectors.push(connector);\r\n }\r\n\r\n // Check if there is a pending promise for the data connector\r\n // DO NOT CHANGE namespace to fullnamespace, data connectors are supposed to be queried using just the namespace by design.\r\n if (this._getDataConnectorPendingPromises.has(connector.namespace)) {\r\n // Get the resolve callback for the pending promise and resolve it\r\n const pendingPromise = this._getDataConnectorPendingPromises.get(connector.namespace);\r\n\r\n try {\r\n pendingPromise.resolve(connector);\r\n } catch (error) {\r\n pendingPromise.reject(error);\r\n }\r\n\r\n // Delete the entry from the pending promise map\r\n this._getDataConnectorPendingPromises.delete(connector.namespace);\r\n }\r\n\r\n connector.store.dispatch({ key: key, type: \"@@connector-view/INIT\" });\r\n }\r\n\r\n /**\r\n * Helper method to compute the next state for a given connector. This method will get the connector's actual state\r\n * from the state tree, call the reducer, and then state the state in the passed in object that is to receive the new state\r\n * @param {any} state The current subspace (or root) state object, which will be updated\r\n * @param {string} key The key to the connector in the connector map\r\n * @param {IActionPayload} actionPayload The action to apply\r\n * @returns Information on how the connector state was changed\r\n */\r\n private computeNextStateForConnector(state: any, key: string, actionPayload: IActionPayload): ReducerResult {\r\n // Get the connector, so that we can call the reducer\r\n const connector = this._connectorMap[key];\r\n\r\n // Setup the key and get the actual state property for the connector. lodash uses dotted notation\r\n // so the key will be something like: namespace._@STATE@_\r\n const statePropertyKey = key + \".\" + ConnectorConstants.connectorStateKey;\r\n const connectorPreviousState = get(state, statePropertyKey, undefined);\r\n\r\n // Call the reducer for the connector, and validate that we received a state object back.\r\n const nextStateForConnector = this.subReduce(connector.reducer, connectorPreviousState, actionPayload);\r\n if (typeof nextStateForConnector === \"undefined\") {\r\n throw new Error(\"Reducer for: \" + key + \" must not return undefined.\");\r\n }\r\n\r\n // If the state changed, then set the new connector state in the overall state object\r\n const connectorStateChanged: boolean = nextStateForConnector !== connectorPreviousState;\r\n if (connectorStateChanged) {\r\n set(state, statePropertyKey, nextStateForConnector);\r\n }\r\n\r\n return { newState: nextStateForConnector, stateChanged: connectorStateChanged };\r\n }\r\n\r\n /**\r\n * Calls the reducer that has been registered to handle the state associated with a specific subspace\r\n * @param {Reducer} reducer The reducer to call\r\n * @param {TSubReducerState} state The state object for the subreducer\r\n * @param {IActionPayload} actionPayload The action to apply\r\n */\r\n private subReduce(reducer: IReducer, previousState: TSubReducerState, actionPayload: IActionPayload): TSubReducerState {\r\n const reducedState: TSubReducerState = reducer.reduce(previousState, actionPayload);\r\n if (reducedState !== previousState) {\r\n return reducedState;\r\n } else {\r\n return previousState;\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { captureJssGeneratedClasses } from \"@msnews/render-cache\";\r\nimport { registerResetCallback } from \"@msnews/core\";\r\n\r\n/**\r\n * Map which is used to store DesignSystem to GenerateClassName Callback.\r\n * Serialized designSystem is used as the key to ensure designSystemIndex is incremented if the designSystem is updated.\r\n * Weakmap is not used as identical designSystem objects should not be treated as different designSystems, an example is PivotContent.tsx progressive hydration.\r\n * Objects potentially garbage collected in WeakMap will also result in designSystemIndexMap being out of sync.\r\n */\r\nlet designSystemMap = new Map();\r\n\r\n/**\r\n * Map which will store number of DesignSystem appearances with same name.\r\n */\r\nlet designSystemIndexMap = new Map();\r\n\r\n/**\r\n * Register a callback to reset the designSystem globals.\r\n * The callback is registered once when the module is loaded and invoked once on the server side at the beginning of each request.\r\n */\r\nregisterResetCallback(() => {\r\n designSystemMap = new Map();\r\n designSystemIndexMap = new Map();\r\n});\r\n\r\n/**\r\n * JSS callback function that defines the class name generation logic\r\n * The default jss manager class name generation logic increments counter based on order\r\n * of how the experiences are rendered. We cannot guarantee the order due to async nature\r\n * of experiences which potentially causes different class names on every reload/refresh.\r\n * Instead here with this callback, we start the counter from 1 per rule to ensure class\r\n * names stays consistent irrespective of when they are rendered.\r\n *\r\n * Design system is taken into account since a change in it can result in potential different\r\n * styling being needed even if that rule was already used in a previous design system.\r\n *\r\n * For example:\r\n * For TopSites, with this override the class name would be generated as \"topSites-DS-default1-1\"\r\n * (jss manager by default would have generated it something like \"topSites-0-1-305\")\r\n * If the design system were to be updated and the same rule would be passed then you would\r\n * get topsites-DS-default2-1.\r\n */\r\nexport function createGenerateClassName(designSystem: any): (rule: any, sheet: any) => string {\r\n if (!designSystem) {\r\n return;\r\n }\r\n\r\n const dsKey = JSON.stringify(designSystem);\r\n let callback = designSystemMap.get(dsKey);\r\n\r\n if (!callback) {\r\n const dsName = designSystem.name || \"unknown\";\r\n const dsIndex = designSystemIndexMap.get(dsName) + 1 || 1;\r\n const rulesMap: any = {};\r\n callback = (rule: any, sheet: any) => {\r\n const key = rule.key;\r\n\r\n if (!rulesMap[key]) {\r\n rulesMap[key] = 1;\r\n } else {\r\n rulesMap[key]++;\r\n }\r\n\r\n const name = `DS-${dsName}${dsIndex}-${rulesMap[key]}`;\r\n captureJssGeneratedClasses(key, name);\r\n\r\n return `${key}-${name}`;\r\n };\r\n\r\n designSystemMap.set(dsKey, callback);\r\n designSystemIndexMap.set(dsName, dsIndex);\r\n }\r\n\r\n return callback;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { Provider, connect } from \"react-redux\";\r\nimport { Store, StoreEnhancer, compose, createStore } from \"redux\";\r\nimport { getPageTimings, logger, perfMarker } from \"@msnews/diagnostics\";\r\n\r\nimport { DynamicReducer } from \"../reducers\";\r\nimport { IDataConnector } from \"../connectors/IDataConnector\";\r\nimport { JSSManager } from \"@microsoft/fast-jss-manager-react\";\r\nimport React from \"react\";\r\nimport ReactDom from \"react-dom\";\r\nimport { applyMiddleware } from \"redux-subspace\";\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\nimport { create } from \"jss\";\r\nimport { createGenerateClassName } from \"./PageHelper\";\r\nimport { getStateFromRenderCache } from \"@msnews/render-cache\";\r\nimport jssGlobal from \"jss-global\";\r\nimport jssNested from \"jss-nested\";\r\n\r\ndeclare global {\r\n interface Window {\r\n\r\n /**\r\n * Enable redux devtools extension debugging\r\n */\r\n __REDUX_DEVTOOLS_EXTENSION_COMPOSE__?: any;\r\n\r\n /**\r\n * Boolean flag to indicate if render cache hydration is happening\r\n */\r\n needsHydrate?: boolean;\r\n\r\n /**\r\n * Boolean flag to indicate if state is stored in render cache along with DOM\r\n */\r\n hasPreHydrateState?: boolean;\r\n }\r\n}\r\n\r\n/**\r\n * Page Base.\r\n * Each page or hybrid page/experience must have an instance of the PageBase, which contains the the store, and dynamic reducer\r\n * for the experience/app.\r\n * PageBase is setup as a singleton, so the proper usage in consumers is:\r\n * var pageBase = PageBase.getInstance();\r\n * @export\r\n * @class\r\n */\r\nclass PageBase {\r\n /**\r\n * The singleton instance of this class\r\n * @type: {PageBase}\r\n */\r\n private static _instance: PageBase;\r\n\r\n /**\r\n * The Dynamic reducer for this app/experience\r\n * @type: {DynamicReducer}\r\n */\r\n private _rootReducer: DynamicReducer;\r\n\r\n /**\r\n * The Redux store containing the top level application state. All component and data connectors will manage namespaced subspaces within\r\n * this store\r\n * @type {Store}\r\n */\r\n private _store: Store;\r\n\r\n /**\r\n * Constructor for PageBase class\r\n * @constructor\r\n * @param {any} initialState Optional initial redux state provided as part of SSR response during hydration\r\n */\r\n private constructor(initialState?: any) {\r\n /**\r\n * In debug build, add the option to turn on redux-devtools-extension debugging.\r\n * More info here https://github.com/zalmoxisus/redux-devtools-extension\r\n */\r\n let enhancer: StoreEnhancer;\r\n const middlewares: any = [];\r\n if (canUseDOM() && ((typeof logger !== \"undefined\") && logger ? logger.isDebug() : false)) {\r\n const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({ trace: true, traceLimit: 25 }) || compose;\r\n enhancer = composeEnhancers(applyMiddleware(...middlewares)\r\n );\r\n } else {\r\n enhancer = applyMiddleware(...middlewares);\r\n }\r\n\r\n // Create the root reducer\r\n this._rootReducer = new DynamicReducer();\r\n\r\n // Check to see if this app instance was bootstrapped with a render-cache\r\n initialState = initialState || (canUseDOM() && window.needsHydrate && getStateFromRenderCache()) || {};\r\n if (canUseDOM()) {\r\n window.hasPreHydrateState = !!(initialState && Object.keys(initialState).length !== 0);\r\n }\r\n\r\n // create the store with a basic root reducer\r\n this._store = createStore(this.rootReducer.reduce, initialState, enhancer);\r\n\r\n }\r\n\r\n /**\r\n * Reset PageBase. Useful when handling multiple requests when server side rendering.\r\n */\r\n public static resetPageBaseInstance(initialState?: any): void {\r\n this._instance = new PageBase(initialState);\r\n }\r\n\r\n /**\r\n * Gets the Redux store for this app/experience\r\n * @method\r\n * @returns {Store} The overall state for the App, which contains sub-states for each connector\r\n */\r\n public get store(): Store {\r\n return this._store;\r\n }\r\n\r\n /**\r\n * Gets the root reducer for this app/experience\r\n * @returns {DynamicReducer} The reducer for the app/experience\r\n */\r\n public get rootReducer(): DynamicReducer {\r\n return this._rootReducer;\r\n }\r\n\r\n /**\r\n * Gets the singleton instance of this class for the app/experience\r\n * @returns {PageBase} The instance of PageBase for the page/hybrid experience\r\n */\r\n public static getInstance(initialState?: any): PageBase {\r\n return this._instance || (this._instance = new this(initialState));\r\n }\r\n\r\n /**\r\n * Starts the application by calling the onApplicationStart method for each connector that has been added to the app.\r\n * @function\r\n * @method\r\n */\r\n public start(): void {\r\n // Iterate over all of the connector's and call their OnApplicationStart method\r\n const allConnectors: IDataConnector[] = this.rootReducer.connectors();\r\n allConnectors.forEach(connector => connector.onApplicationStart());\r\n }\r\n\r\n /**\r\n * Creates and renders a root element, that is connected to the store.\r\n * The root element will created with the passed in connected element as a child.\r\n * @function\r\n * @param {React.ReactElement} connectedTopLevelElement The top level rendering element for the page/application.\r\n * @param {HTMLElement} hostElement The host element (usually a
) to contain the msnews-experiences-redux application\r\n * @param {Function} callback An optional callback to be fired after hydration is complete, used when hydrating server side rendered content.\r\n * @param {boolean} bypassJSS To bypass JSSManager instance update set this to false\r\n * @param {Boolean} isSSR An optional flag to signal page is server side rendered and hydration is needed instead of render.\r\n * @method\r\n */\r\n public renderRootElement(\r\n connectedTopLevelElement: React.ReactElement,\r\n hostElement: HTMLElement,\r\n callback?: Function,\r\n bypassJSS?: Boolean,\r\n isSSR?: Boolean): void {\r\n // Update the base JSS manager instance\r\n if (bypassJSS !== true) {\r\n this.updateJssManagerInstance();\r\n }\r\n\r\n // Create a ReactElement, that contains the Redux provider with the store, passing the incoming top level element in as a child, so that\r\n // the pageElement wraps the top level element with the redux store\r\n const rootElement = React.createElement(Provider, { store: this._store }, connectedTopLevelElement);\r\n\r\n // Capture Render cache state in page timings\r\n const pageTimings = getPageTimings();\r\n\r\n if (isSSR) {\r\n pageTimings[\"isRenderCachePresent\"] = 0;\r\n perfMarker.startMark(\"SSR.Hydrate\");\r\n ReactDom.hydrate(rootElement, hostElement, callback);\r\n perfMarker.endMark(\"SSR.Hydrate\");\r\n window.needsHydrate = false;\r\n } else if (window.needsHydrate) {\r\n ReactDom.hydrate(rootElement, hostElement);\r\n pageTimings[\"isRenderCachePresent\"] = 1;\r\n window.needsHydrate = false;\r\n } else {\r\n perfMarker.startMark(\"CSR.Render\");\r\n pageTimings[\"isRenderCachePresent\"] = 0;\r\n ReactDom.render(rootElement, hostElement);\r\n perfMarker.endMark(\"CSR.Render\");\r\n }\r\n }\r\n\r\n /**\r\n * Updates the base JSSManager instance with the correct default plugins\r\n */\r\n public updateJssManagerInstance(): void {\r\n const jssInstance: ReturnType = create({\r\n plugins: [jssNested(), jssGlobal()]\r\n });\r\n\r\n JSSManager.createGenerateClassName = createGenerateClassName;\r\n JSSManager.jss = jssInstance;\r\n }\r\n}\r\n\r\nexport default PageBase;","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\nconst pageTimings = canUseDOM() ? (window._pageTimings || (window._pageTimings = {})) : {};\r\nconst secondaryPageTimings = canUseDOM() ? (window._secondaryPageTimings || (window._secondaryPageTimings = {})) : {};\r\n\r\n/**\r\n * Gets current window._pageTimings object\r\n */\r\nexport function getPageTimings(): object {\r\n return pageTimings;\r\n}\r\n\r\n/**\r\n * Gets current window._secondaryPageTimings object\r\n */\r\nexport function getSecondaryPageTimings(): object {\r\n return secondaryPageTimings;\r\n}\r\n\r\n/**\r\n * Creates or updates a new counter under the page timings\r\n * @param counterName - the name of the counter to increment.\r\n */\r\nexport function incrementCounter(counterName: string): void {\r\n if (counterName && pageTimings) {\r\n const existingCount = pageTimings[counterName] || (pageTimings[counterName] = 0);\r\n pageTimings[counterName] = existingCount + 1;\r\n }\r\n}\r\n\r\n/**\r\n * Reset pageTimings object\r\n */\r\nexport function resetPageTimings(): void {\r\n Object.keys(pageTimings).forEach(key => delete pageTimings[key]);\r\n Object.keys(secondaryPageTimings).forEach(key => delete secondaryPageTimings[key]);\r\n}\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * The aria-label html attribute\r\n * @type {string}\r\n */\r\nexport const ariaLabelAttribute = \"aria-label\";\r\n\r\n/**\r\n * The id attribute on the
element that is the root element for Peregrine Pages / Experiences.\r\n * There is only ever 1 root element on a page\r\n * @type {string}\r\n */\r\nexport const rootElementId = \"msnewsroot\";\r\n\r\n/**\r\n * Element names that are commonly used in Peregrine pages and experiences\r\n * @type {object}\r\n */\r\nexport const htmlElementIds: any = {\r\n html: \"html\",\r\n head: \"head\",\r\n body: \"body\"\r\n};\r\n\r\n/**\r\n * Constants used by application cache related scenarios\r\n */\r\nexport const applicationCacheConstants = {\r\n /**\r\n * Attribute name on html tag that is set when appcache is being used on the page\r\n */\r\n manifestAttributeName: \"manifest\",\r\n\r\n /**\r\n * Local storage key that holds the appcache info used to determine page refresh needs\r\n * for different page types.\r\n */\r\n pagesRefreshData: \"ac_prd\"\r\n};\r\n\r\n/**\r\n * The attributes that are part of markup elements that we care about\r\n */\r\nexport const clientSettings = \"data-client-settings\";\r\nexport const pagetypeSettings = \"data-pagetype\";\r\nexport const id = \"data-id\";\r\nexport const info = \"data-info\";\r\nexport const js = \"data-js\";\r\nexport const t = \"data-t\";\r\nexport const lang = \"lang\";\r\nexport const dir = \"dir\";\r\nexport const serviceUrl = \"data-service-url\";\r\nexport const telemetryId = \"data-telemetry-id\";\r\nexport const trackPageProduct = \"data-page-product\";\r\nexport const trackPageType = \"data-page-type\";\r\n\r\n/**\r\n * The number of characters that our Service Request Ids must have. This is currently defined by OneService\r\n * @type {number}\r\n */\r\nexport const numberOfCharactersNeededForUniqueRequestId = 32;\r\n\r\n/**\r\n * The minimum number of path segments that will be in the URL which hosts MS News Experience pages.\r\n * The first path segment should be the vertical key, e.g. spartan and the second path segment\r\n * should be the the category key, e.g. ntp\r\n * @type {number}\r\n */\r\nexport const minimumHostPagePathSegments = 2;\r\n\r\n/**\r\n * Default value we use for the name of the cookie that holds the ANID\r\n */\r\nexport const anonCookieName = \"APP_ANON\";\r\n\r\n/**\r\n * App Anon Cookie Exists Cookie Name. This cookie is a marker if APP_ANON exist or not.\r\n * This is necessary because APP_ANON is HTTP cookie and not accessible by JS.\r\n */\r\nexport const appAnonCookieExistsCookieName = \"aace\";\r\n\r\n/**\r\n * Child cookie name, used to signal if rpsUser is child account.\r\n */\r\nexport const childCookieName = \"child\";\r\n\r\n/**\r\n * Tracks user engagement for the Meet Now feature via the first day it was shown\r\n */\r\nexport const meetNowEngagementDayFirstShown = \"meetnow-day-first-shown\";\r\n\r\n/**\r\n * Tracks user engagment for the Meet Now feature via the number of clicks\r\n */\r\nexport const meetNowEngagementNumberOfClicks = \"meetnow-number-clicks\";\r\n\r\n/**\r\n * Tracks whether user engagement requirements for the Meet Now feature have been met\r\n */\r\nexport const meetNowengagementReached = \"meetnow-engagement-reached\";\r\n\r\n/**\r\n * Migration consent state cookie, indicates user has already granted or denied migration consent\r\n */\r\nexport const migrationConsentStateKey = \"migration-state\";\r\n\r\n/**\r\n * Id of MSCC cookie banner container element.\r\n */\r\nexport const msccCookieBannerElementId = \"consent-banner-container\";\r\n\r\n/**\r\n * Nurturing accepted state key is intended to be used in local storage, indicates user has opted in or out of Iris targeted content.\r\n */\r\nexport const nurturingAcceptedStateKey = \"nurturingAccepted\";\r\n\r\n/**\r\n * Recommended search key is intended to be used in local storage,\r\n * indicates user has opted in or out to show recommended search below search box\r\n */\r\nexport const recommendedSearchKey = \"recommended-search-enabled\";\r\n\r\n/**\r\n * Search history key is intended to be used in local storage, indicates user has opted in or out to show search history\r\n */\r\nexport const searchHistoryKey = \"search-history-enabled\";\r\n\r\n/**\r\n * Local storage key to indicated if no search history is expected based on auth logic\r\n * If it is expected then do not show search history toggle, otherwise show search history toggle in settings dialog\r\n */\r\nexport const noSearchHistoryExpectedKey = \"no-search-history-expected-auth\";\r\n\r\n/**\r\n * Headers used for one service requests\r\n */\r\nexport const oneServiceHeaders = {\r\n activityId: \"x-client-activityid\",\r\n authorization: \"Authorization\"\r\n};\r\n\r\n/**\r\n * used query string params in OneService requests\r\n */\r\nexport const oneServiceQueryStringKeys = {\r\n activityId: \"activityId\",\r\n apiKey: \"apikey\",\r\n complexInfoPaneEnabled: \"cipenabled\",\r\n contentType: \"contentType\",\r\n delta: \"delta\",\r\n disableTypeSerialization: \"DisableTypeSerialization\",\r\n infopaneCount: \"infopaneCount\",\r\n fdhead: \"fdhead\",\r\n feedLayoutRequestType: \"t\",\r\n filter: \"$filter\",\r\n ids: \"ids\",\r\n location: \"location\",\r\n market: \"market\",\r\n ocid: \"ocid\",\r\n parentContentId: \"parent-content-id\",\r\n parentNamespace: \"parent-ns\",\r\n parentTitle: \"parent-title\",\r\n queryQ: \"q\",\r\n query: \"query\",\r\n queryType: \"queryType\",\r\n qScope: \"qscope\",\r\n responseSchema: \"responseschema\",\r\n select: \"$select\",\r\n session: \"session\",\r\n signInCookieName: \"scn\",\r\n skip: \"$skip\",\r\n source: \"source\",\r\n timeOut: \"timeOut\",\r\n top: \"$top\",\r\n type: \"type\",\r\n user: \"user\",\r\n wrapOData: \"wrapodata\"\r\n};\r\n\r\n/**\r\n * Constants to use as role attribute value for elements\r\n */\r\nexport enum AriaRoles {\r\n /**\r\n * Presentation role is used to remove semantic meaning from an element and any of its related child elements.\r\n */\r\n Presentation = \"presentation\"\r\n}\r\n\r\n/**\r\n * Basic enum values for mobile device orientation\r\n */\r\nexport enum DeviceOrientation {\r\n Unknown = \"Unknown\",\r\n Portrait = \"Portrait\",\r\n Landscape = \"Landscape\"\r\n}\r\n\r\n/**\r\n * Common local storage keys\r\n */\r\nexport const CoreLocalStorageKeys = {\r\n /**\r\n * This key is used to store a dictionary of app versions per app type based on the current page version from the DOM.\r\n * Note that the version value will represent the current **loaded page** version and **not the new version** in scenarios\r\n * where the page is cached and require a new version to be loaded upon version detection (i.e., appcache, or service worker).\r\n * In these cached/refresh scenarios, we still want to store the version that the page was actually loaded from.\r\n */\r\n pageVersions: \"pageVersions\"\r\n};\r\n\r\n/**\r\n * The default APIKey for OneService requests\r\n */\r\nexport const defaultOneServiceApiKey = \"0QfOX3Vn51YCzitbLaRkTTBadtWpgTN8NZLW0C1SEM\";\r\n\r\n/**\r\n * Url for microsoft news page\r\n */\r\nexport const MicrosoftNewsUrl = \"https://microsoftnews.msn.com/\";\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nexport enum Environment {\r\n prod = \"prod\",\r\n int1 = \"int1\",\r\n int = \"int\",\r\n intpr = \"intPR\",\r\n intpef = \"intPef\"\r\n}\r\n\r\n/**\r\n * Parses from string to Environment enum.\r\n * Defaults to null\r\n *\r\n * @export\r\n * @param {(string | null | undefined)} environment - string being parsed\r\n * @returns {(Environment | null)} - the parsed Environment enum, or null.\r\n */\r\nexport function getEnvironmentFromString(environment: string | null | undefined): Environment | null {\r\n switch (environment) {\r\n case Environment.prod:\r\n return Environment.prod;\r\n case Environment.int1:\r\n return Environment.int1;\r\n case Environment.int:\r\n case Environment.intpr:\r\n case Environment.intpef:\r\n return Environment.int;\r\n default:\r\n return null;\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { IsForceTimestampExpired, RenderCacheConfig, getRenderCacheKeys } from \".\";\r\nimport { RenderCache, RenderCacheKeys } from \"./RenderCache\";\r\nimport { RenderCacheErrors, logger } from \"@msnews/diagnostics\";\r\nimport { appEnvironment, localStorage } from \"@msnews/core\";\r\nimport { batchCSS, renderCacheKeyOfNormalizedKeys, scrapeDom, windowAvailable } from \"./Helper\";\r\nimport { defaultExpirationTimeMs, expirationPrefix, forceTimestampPrefix, jssMapSuffix, keysPrefix, storagePrefix } from \"./Constants\";\r\n\r\nimport { Telemetry } from \"@msnews/telemetry-contracts\";\r\nimport { userInteractionHappened } from \"./UserInteractionWatcher\";\r\n\r\nconst jssGeneratedClassesMap: { [instanceId: string]: Array } = {};\r\nlet jssCaptureCompleted = false;\r\n\r\n/**\r\n * Persist the complete render state (DOM and Styles) necessary to restore the rendered Peregrine SPA page, without needing to\r\n * first load all of the Peregrine experience bundles.\r\n * This is the equivalent of using Server Side Rendering to generate the initial DOM, though in this case the initial DOM elements and styles\r\n * are persisted and loaded locally on the client.\r\n * @param config Render cache configuration.\r\n * @param stateJson The state to persist in JSON form.\r\n * @param markers List of performance markers, which will be fired upon cache restore.\r\n * @param invokeFallback Canvas specific fallback function to be executed on jss exception.\r\n */\r\nexport function persistRenderCache(config: RenderCacheConfig, stateJson?: string, markers?: string[], invokeFallback?: (message: string) => void): void {\r\n jssCaptureCompleted = true;\r\n\r\n if (!config || !localStorage.supported || !window.renderCacheEnabled) {\r\n return;\r\n }\r\n\r\n // Get normalized render cache keys\r\n const renderCacheKeys: RenderCacheKeys = getRenderCacheKeys(config && config.normalizeKeyParamsList);\r\n\r\n // Check if we need to refresh cache by force. Used as Failsafe if user stuck in broken render cache loop.\r\n if (IsForceTimestampExpired(config && config.forceExpirationTime)) {\r\n removeRenderCache();\r\n logger.log(\"[RC Info] Force timestamp expired: removing render cache\");\r\n return;\r\n }\r\n\r\n // Found an issue with User interaction check. Its inconsistent and as we are not deleting RC on this,\r\n // users may get stuck in this state.\r\n if (userInteractionHappened()) {\r\n return;\r\n }\r\n\r\n // When critical jss mismatch is detected - do not persist and based on config decide to purge and fallback\r\n if (criticalJssMismatchDetected(config, invokeFallback)) {\r\n return;\r\n }\r\n\r\n let { includeNewsFeed, expirationTime, newsFeedExpirationTime } = config;\r\n\r\n // Persist build version recorded for the page being render cached\r\n const buildVersion = appEnvironment.BuildVersion || \"\";\r\n\r\n // Form Cache Object\r\n const renderCacheStorageObj: RenderCache = {\r\n dom: scrapeDom(includeNewsFeed),\r\n batch_css: batchCSS(),\r\n build_version: buildVersion,\r\n markers,\r\n state: stateJson\r\n };\r\n\r\n expirationTime = (includeNewsFeed ? newsFeedExpirationTime : expirationTime)\r\n || defaultExpirationTimeMs;\r\n\r\n // Try to persist Render Cache and Timestamp\r\n const expiresOn: number = new Date().getTime() + expirationTime;\r\n\r\n localStorage.setObject(renderCacheKeys.expn, expiresOn);\r\n localStorage.setObject(renderCacheKeys.keyn, renderCacheStorageObj);\r\n}\r\n\r\n/**\r\n * Deletes render cache local storage for all domains\r\n */\r\nexport function removeRenderCache(): void {\r\n if (!localStorage.supported) {\r\n return;\r\n }\r\n\r\n // The render cache Urls are currently not normalized, so we have different render\r\n // cache saved for DHP and NTP page. But, some of the properties (example: market)\r\n // is shared between those pages. To ensure a purge on render cache on one page,\r\n // does purge the other render cache as well, and avoid breaking the page layout,\r\n // we remove all render cache keys on removeRenderCache\r\n localStorage.removeSubstringKeys(storagePrefix);\r\n localStorage.removeSubstringKeys(expirationPrefix);\r\n localStorage.removeSubstringKeys(forceTimestampPrefix);\r\n localStorage.removeSubstringKeys(keysPrefix);\r\n localStorage.removeSubstringKeys(jssMapSuffix);\r\n}\r\n\r\n/**\r\n * Deletes render cache local storage only for current href\r\n */\r\nexport function removeCurrentRenderCache(): void {\r\n if (!localStorage.supported) {\r\n return;\r\n }\r\n\r\n const renderCacheKeys: RenderCacheKeys = getRenderCacheKeys();\r\n localStorage.removeObject(renderCacheKeys.keyn);\r\n localStorage.removeObject(renderCacheKeys.frcn);\r\n localStorage.removeObject(renderCacheKeys.expn);\r\n localStorage.removeObject(renderCacheKeys.jssn);\r\n localStorage.removeObject(renderCacheKeyOfNormalizedKeys);\r\n}\r\n\r\n/**\r\n * Capture class names generated by JSS and maintain inside a dictionary.\r\n * @param key key for class name\r\n * @param val JSS val for class name\r\n */\r\nexport function captureJssGeneratedClasses(key: string, val: string): void {\r\n if (jssCaptureCompleted || !(windowAvailable && window.renderCacheEnabled)) {\r\n return;\r\n }\r\n\r\n if (jssGeneratedClassesMap[key]) {\r\n jssGeneratedClassesMap[key].push(val);\r\n } else {\r\n jssGeneratedClassesMap[key] = [val];\r\n }\r\n}\r\n\r\n/**\r\n * Compares stored JSS Map with current JSS Map and log corresponding app errors\r\n * @param config Render cache configuration.\r\n * @param invokeFallback Canvas specific fallback function to be executed on jss exception.\r\n * @returns boolean - returns true when there is critical jss mismatch, otherwise false\r\n */\r\nexport function criticalJssMismatchDetected(config: RenderCacheConfig, invokeFallback?: (message: string) => void): boolean {\r\n // if we haven't captured any generated classes log an app error and return\r\n if (Object.keys(jssGeneratedClassesMap).length === 0) {\r\n logJssMismatchAppError(RenderCacheErrors.JssStyleMismatchWarning, \"Generated classes map is empty. \");\r\n return false;\r\n }\r\n\r\n const { isJssIdentical, isCriticalJssIdentical, jssWarningMessage, jssErrorMessage } = compareJssMap(config);\r\n\r\n // in case of non critical JSS mismatch we just log an app warning\r\n if (!isJssIdentical) {\r\n if (config && config.enableJssMismatchWarningLogs) {\r\n logJssMismatchAppError(RenderCacheErrors.JssStyleMismatchWarning, jssWarningMessage);\r\n }\r\n } else {\r\n // in case there are no mismatches - write back the newly generated class map back to localstorage\r\n Object.keys(jssGeneratedClassesMap).length && localStorage.setObject(getRenderCacheKeys().jssn, jssGeneratedClassesMap);\r\n logger.log(\"[RC Info] No style mismatch found\");\r\n }\r\n\r\n // in case of critical JSS mismatch, log an app error and based on config\r\n // decide to purge and invoke canvas specific fallback\r\n if (!isCriticalJssIdentical) {\r\n logJssMismatchAppError(RenderCacheErrors.JssStyleCriticalMismatchError, jssErrorMessage);\r\n\r\n if (config && config.enablePurgeOnJssMismatch) {\r\n removeRenderCache();\r\n\r\n if (config && config.enableFallbackOnJssMismatch && invokeFallback && typeof invokeFallback === \"function\") {\r\n invokeFallback(jssErrorMessage);\r\n }\r\n }\r\n }\r\n\r\n return !isCriticalJssIdentical;\r\n}\r\n\r\n/**\r\n * Compares stored JSS Map with current JSS Map and identifies if those are critical vs non critical error message with corresponding error message\r\n * @param config Render cache configuration.\r\n * @returns object - returns mismatch and error information\r\n */\r\nfunction compareJssMap(config: RenderCacheConfig): { isJssIdentical: boolean, isCriticalJssIdentical: boolean, jssWarningMessage: string, jssErrorMessage: string } {\r\n let jssErrorMessage = \"\";\r\n let jssWarningMessage = \"\";\r\n let isCriticalJssIdentical = true;\r\n let isJssIdentical = true;\r\n\r\n const jssCriticalClassListMap: { [className: string]: boolean } = getJssCriticalClassListMap(config && config.jssCriticalClassList || []);\r\n\r\n const storedMap = localStorage.getObject(getRenderCacheKeys().jssn);\r\n if (storedMap && typeof storedMap === \"object\" && Object.keys(storedMap).length) {\r\n // this for loop compares every item in stored Map of Css class names to the current page instance map\r\n for (const key in storedMap) {\r\n const storedClasses = storedMap[key];\r\n\r\n // if stored class isn't correctly set, log a non critical app app warning and return\r\n if (!Array.isArray(storedClasses)) {\r\n return { isJssIdentical: false, isCriticalJssIdentical: true, jssWarningMessage: `Stored classes expected to be an array, but received something else. stored val: ${storedClasses}. `, jssErrorMessage: \"\" };\r\n }\r\n\r\n /*\r\n We only care about extra classes being present in the stored classes. If the current page\r\n instance has new class names not present in the stored map, we do not consider this a mismatch\r\n since the render cache snapshot won't be broken due to this scenario. Also if there are no\r\n classes corresponding to a key in the current map, detect that as a mismatch as well.\r\n\r\n --- Scenario 1: (detect as a mismatch) ---\r\n storedClasses : k1: { [c1, c2, c3] }\r\n currentClasses: k1: { [c1, c2] }\r\n\r\n --- Scenario 2: (do not detect as a mismatch) ---\r\n storedClasses : k1: { [c1, c2] }\r\n currentClasses: k1: { [c1, c2, c3] }\r\n\r\n --- Scenario 3: (detect as a mismatch) ---\r\n storedClasses : k1: { [c1, c2] }\r\n currentClasses: k2: { [c3, c4, c5] }\r\n */\r\n const currentClasses = jssGeneratedClassesMap[key];\r\n if (currentClasses) {\r\n if (storedClasses.some(className => currentClasses.indexOf(className) === -1)) {\r\n const errorMessage = `JSSError: val mismatch for key: ${key}, val stored: ${storedClasses}, new val: ${currentClasses}. `;\r\n if (jssCriticalClassListMap[key]) {\r\n jssErrorMessage += errorMessage;\r\n isCriticalJssIdentical = false;\r\n }\r\n\r\n jssWarningMessage += errorMessage;\r\n isJssIdentical = false;\r\n }\r\n } else {\r\n const errorMessage = `JSSError: val mismatch for key: ${key}, val stored: ${storedClasses}, new val: '' (empty). `;\r\n if (jssCriticalClassListMap[key]) {\r\n jssErrorMessage += errorMessage;\r\n isCriticalJssIdentical = false;\r\n }\r\n\r\n jssWarningMessage += errorMessage;\r\n isJssIdentical = false;\r\n }\r\n }\r\n }\r\n\r\n return {\r\n isJssIdentical: isJssIdentical,\r\n isCriticalJssIdentical: isCriticalJssIdentical,\r\n jssWarningMessage: jssWarningMessage,\r\n jssErrorMessage: jssErrorMessage\r\n };\r\n}\r\n\r\n/**\r\n * Helper function to log render cache jss mismatch app errors\r\n * @param errorParams The error params.\r\n * @param customMessage The custom message to be logged.\r\n */\r\nfunction logJssMismatchAppError(errorParams: any, customMessage: string): void {\r\n Telemetry.sendAppErrorEvent({\r\n ...errorParams,\r\n message: \"RC JSS mismatch issue\",\r\n pb: {\r\n ...errorParams.pb,\r\n customMessage: customMessage\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * Helper function to generate critical class list map\r\n * @param jssCriticalClassList The critical class list array\r\n * @returns jssCriticalClassListMap The map of critical class list\r\n */\r\nfunction getJssCriticalClassListMap(jssCriticalClassList: [string?]) {\r\n const jssCriticalClassListMap: { [className: string]: boolean } = {};\r\n jssCriticalClassList.forEach((key) => {\r\n jssCriticalClassListMap[key] = true;\r\n jssCriticalClassListMap[key + \" - jssStyleSheet\"] = true;\r\n });\r\n\r\n return jssCriticalClassListMap;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nlet clientSettings: ClientSettings;\r\n\r\n/** The client settings object. */\r\nexport interface ClientSettings {\r\n /** The name of the app */\r\n apptype: string;\r\n\r\n /** The name of the page */\r\n pagetype: string;\r\n\r\n /** The activity ID */\r\n aid: string;\r\n\r\n /** The PCS page generation time in ISO 8601 format, UTC. */\r\n pageGenTime?: string;\r\n\r\n /** Information about the JS bundles we are running. */\r\n bundleInfo: {\r\n /** The build number for the JS bundles. */\r\n v: string;\r\n }\r\n\r\n /** Information about PCS that created the page. */\r\n pcsInfo: {\r\n /** The environment we are on */\r\n env: string;\r\n\r\n /** The build number for PCS. */\r\n v: string;\r\n }\r\n}\r\n\r\n/**\r\n * Gets the client settings object.\r\n */\r\nexport function getPageSettings(): ClientSettings {\r\n if (!clientSettings) {\r\n const settingsJson: string = document.head.getAttribute(\"data-client-settings\");\r\n if (settingsJson) {\r\n clientSettings = JSON.parse(settingsJson);\r\n }\r\n }\r\n\r\n return clientSettings;\r\n}\r\n\r\n/**\r\n * Checks if the DOM is available to access and use.\r\n * @returns {boolean} - true if DOM is available, or false if it is not. This is typically true for\r\n * client side rendering and false for server side rendering.\r\n */\r\nexport function canUseDOM(): boolean {\r\n return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ClientSettings, getPageSettings } from \"./PageSettings\";\r\n\r\n/** Declared in webworker inline script. */\r\ndeclare function getCookie(cookieName: string): string;\r\n\r\n/** Declared cookie consent required function on PCS side. */\r\nexport declare function getCookieConsentRequired(): boolean;\r\n\r\nlet loggingEndpoint;\r\nconst Product = {\r\n mmx: \"emmx\",\r\n edge: \"spartan\",\r\n edgeChromium: \"anaheim\",\r\n hybrid: \"spartan\",\r\n hub: \"prime\",\r\n microsoftNews: \"msnews\",\r\n office: \"entnews\"\r\n};\r\n\r\n/**\r\n * Logs error to the given endpoint (e.g. otf)\r\n * @param message - The error message\r\n * @param appErrorId - The app error id to be logged\r\n * @param propertyBag - The blob to store additional error information\r\n */\r\nexport function logError(message: string, appErrorId: number, propertyBag: any): void {\r\n try {\r\n const settingsObject: ClientSettings = getPageSettings();\r\n const params: object = getLoggingParameters(settingsObject);\r\n\r\n let iKey = \"\";\r\n if (params && params[\"apikey\"] && params[\"apikey\"] !== \"\") {\r\n iKey = getIKeyValue(params[\"apikey\"]);\r\n }\r\n\r\n const payload: string = getLoggingPayload(appErrorId, message, settingsObject, iKey, propertyBag);\r\n if (params && payload) {\r\n\r\n console.error(payload);\r\n\r\n const url: string = \"https://\" + loggingEndpoint + \"/OneCollector/1.0\" + formatParams(params);\r\n const request = new XMLHttpRequest();\r\n request.open(\"POST\", url);\r\n request.send(payload); // fire and forget\r\n } else {\r\n console.log(\"missing parameters in data-client-settings. \" + message);\r\n }\r\n } catch {\r\n console.log(\"error logging the app error. \" + message);\r\n }\r\n}\r\n\r\n/**\r\n * Gets data to set the logging parameters\r\n * @param settingsObject - The object containing client settings\r\n */\r\nfunction getLoggingParameters(settingsObject: ClientSettings): object {\r\n if (settingsObject) {\r\n const { pcsInfo, pageGenTime } = settingsObject;\r\n const uploadTime = new Date(pageGenTime).getTime();\r\n const isProd: boolean = !pcsInfo || pcsInfo.env === \"prod\";\r\n\r\n // JSLL endpoints\r\n loggingEndpoint = isProd ? \"browser.events.data.msn.com\" : \"events-sandbox.data.msn.com\";\r\n const apikey = isProd\r\n ? \"0ded60c75e44443aa3484c42c1c43fe8-9fc57d3f-fdac-4bcf-b927-75eafe60192e-7279\"\r\n : \"f8857dedc6f54ca8962cfb713e01e7d7-e9250191-fe0b-446f-95ae-07516262f98c-7028\";\r\n\r\n return {\r\n cors: \"true\",\r\n \"content-type\": \"application/x-json-stream\",\r\n \"client-id\": \"NO_AUTH\",\r\n \"client-version\": \"1DS-Web-JS-2.2.2\",\r\n apikey: apikey,\r\n \"upload-time\": uploadTime,\r\n w: \"0\",\r\n anoncknm: \"app_anon\"\r\n };\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/**\r\n * Gets data to set the logging payload\r\n * @param appErrorId - The app error id to be logged\r\n * @param message - The error message\r\n * @param iKey - The key for authenticating on 1DS endpoint\r\n * @param propertyBag - The blob to store additional error information\r\n */\r\nfunction getLoggingPayload(appErrorId: number, message: string, settingsObject: ClientSettings, iKey: string, propertyBag: any): string {\r\n if (settingsObject) {\r\n propertyBag = propertyBag || {};\r\n const { apptype, pagetype, pageGenTime, bundleInfo } = settingsObject;\r\n\r\n propertyBag.pageGenTime = pageGenTime;\r\n propertyBag.build = bundleInfo && bundleInfo.v;\r\n\r\n const pageProduct = Product[apptype] ? Product[apptype] : apptype;\r\n const source = apptype + \"-\" + pagetype;\r\n const market = document.getElementsByTagName(\"html\")[0].getAttribute(\"lang\");\r\n\r\n let muid = \"\";\r\n try {\r\n const isCookieConsentRequired: boolean = getCookieConsentRequired && typeof getCookieConsentRequired === \"function\" && getCookieConsentRequired();\r\n if (!isCookieConsentRequired && getCookie && typeof getCookie === \"function\") {\r\n muid = getCookie(\"muid\");\r\n }\r\n } catch {\r\n console.log(\"error fetching muid.\");\r\n }\r\n\r\n const payload = {\r\n name: \"MS.News.Web.AppError\",\r\n time: pageGenTime,\r\n ver: \"4.0\",\r\n iKey: `o:${iKey}`,\r\n data: {\r\n baseData: {},\r\n baseType: \"MS.News.Web.Base\",\r\n page: {\r\n name: \"default\",\r\n product: pageProduct,\r\n type: pagetype\r\n },\r\n browser: {\r\n clientId: muid\r\n },\r\n request: {\r\n activityId: settingsObject.aid\r\n },\r\n locale: {\r\n mkt: market\r\n },\r\n extSchema: {\r\n id: appErrorId,\r\n source: source,\r\n severity: 0,\r\n pb: propertyBag,\r\n message: message\r\n }\r\n }\r\n };\r\n\r\n return payload ? JSON.stringify(payload) : null;\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/**\r\n * Format query string parameters\r\n * @param params - The logging params\r\n */\r\nfunction formatParams(params: object): string {\r\n return \"?\" + Object\r\n .keys(params)\r\n .map(function (key: string): string {\r\n return key + \"=\" + encodeURIComponent(params[key]);\r\n }).join(\"&\");\r\n}\r\n\r\n/**\r\n * Extracts the value of iKey from apikey\r\n * @param apikey - The value of apikey for 1DS authentication\r\n */\r\nexport function getIKeyValue(apikey: string): string {\r\n\r\n if (apikey) {\r\n const iKeyIndex = apikey.indexOf(\"-\");\r\n if (iKeyIndex > 0) {\r\n return apikey.substring(0, iKeyIndex);\r\n }\r\n }\r\n\r\n return \"\";\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { identifyBreakpoint, BreakpointTracker } from \"@microsoft/fast-layouts-react\";\r\n\r\nimport { canUseDOM } from \"./DOMHelpersCore\";\r\nimport { getRequestData } from \"./requestData\";\r\n\r\n/**\r\n * Checks if a given JS media query matches in an isomorphic manner\r\n * NOTE: Only supports min/max-width queries outside of the web client\r\n * @param query The media query\r\n * @param breakpoint The current breakpoint, needed if SSR\r\n */\r\nexport function canMatchMedia(query: string, breakpoint?: number): boolean {\r\n if (canUseDOM()) {\r\n return window.matchMedia(query).matches;\r\n }\r\n\r\n if (breakpoint === undefined) {\r\n throw Error(\"Breakpoint must be supplied when server side rendering\");\r\n }\r\n\r\n const maxWidthValues = /max-width:\\s?(\\d+)/.exec(query);\r\n const minWidthValues = /min-width:\\s?(\\d+)/.exec(query);\r\n\r\n const minWidth = minWidthValues && minWidthValues.length ? minWidthValues[1] : 0;\r\n const maxWidth = maxWidthValues && maxWidthValues.length ? maxWidthValues[1] : Infinity;\r\n\r\n const minBreakpoint = identifyBreakpoint(parseInt(minWidth.toString()), BreakpointTracker.breakpoints);\r\n const maxBreakpoint = maxWidth === Infinity ?\r\n BreakpointTracker.breakpoints.length - 1 : identifyBreakpoint(parseInt(maxWidth.toString()), BreakpointTracker.breakpoints);\r\n\r\n return breakpoint >= minBreakpoint && breakpoint <= maxBreakpoint;\r\n}\r\n\r\n/**\r\n * Get window.location.href in an isomorphic manner.\r\n */\r\nexport function getLocationHref(): string {\r\n return canUseDOM() ? window.location.href : getRequestData().url.href;\r\n}\r\n\r\n/**\r\n * Get window.location.hostname in an isomorphic manner.\r\n */\r\nexport function getLocationHostname(): string {\r\n return canUseDOM() ? window.location.hostname : getRequestData().url.hostname;\r\n}\r\n\r\n/**\r\n * Get window.location.host in an isomorphic manner.\r\n */\r\nexport function getLocationHost(): string {\r\n return canUseDOM() ? window.location.host : getRequestData().url.host;\r\n}\r\n\r\n/**\r\n * Get window.location.origin in an isomorphic manner.\r\n */\r\nexport function getLocationOrigin(): string {\r\n return canUseDOM() ? window.location.origin : getRequestData().url.origin;\r\n}\r\n\r\n/**\r\n * Get window.location.search in an isomorphic manner.\r\n */\r\nexport function getLocationSearch(): string {\r\n return canUseDOM() ? window.location.search : getRequestData().url.search;\r\n}\r\n\r\n/**\r\n * Get window.location.pathname in an isomorphic manner.\r\n */\r\nexport function getLocationPathname(): string {\r\n return canUseDOM() ? window.location.pathname : getRequestData().url.pathname;\r\n}\r\n\r\n/**\r\n * Get window.location.protocol in an isomorphic manner.\r\n */\r\nexport function getLocationProtocol(): string {\r\n return canUseDOM() ? window.location.protocol : getRequestData().url.protocol;\r\n}\r\n\r\n/**\r\n * Get window.location.hash in an isomorphic manner.\r\n */\r\nexport function getLocationHash(): string {\r\n return canUseDOM() ? window.location.hash : getRequestData().url.hash;\r\n}\r\n\r\n/**\r\n * Get document.cookie in an isomorphic manner.\r\n */\r\nexport function getCookieString(): string {\r\n return canUseDOM() ? window.document.cookie : getRequestData().cookie;\r\n}\r\n\r\n/**\r\n * Get window.document.getElementById(elementId).\r\n */\r\nexport function getDocumentElementById(elementId: string): HTMLElement {\r\n if (!canUseDOM()) {\r\n throw new Error(\"getDocumentElementById is unsupported server side. This call should be wrapped in canUseDOM().\");\r\n }\r\n\r\n return window.document.getElementById(elementId);\r\n}\r\n\r\n/**\r\n * Get window.document.getDocumentElementsByTagName(elementId).\r\n */\r\nexport function getDocumentElementsByTagName(tagName: string): HTMLCollectionOf {\r\n if (!canUseDOM()) {\r\n throw new Error(\"getDocumentElementsByTagName is unsupported server side. This call should be wrapped in canUseDOM().\");\r\n }\r\n\r\n return window.document.getElementsByTagName(tagName);\r\n}\r\n\r\n/**\r\n * Get localStorage in an isomorphic manner.\r\n * Todo (http://osgvsowi/23753462), provide actual functionality for localStorage on the server side.\r\n */\r\nexport function getLocalStorage(): Storage {\r\n return canUseDOM() ? window.localStorage : null;\r\n}\r\n\r\n/**\r\n * Get indexedDB in an isomorphic manner.\r\n * Todo (http://osgvsowi/23753462), provide actual functionality for indexedDB on the server side.\r\n */\r\nexport function getIndexedDB(): IDBFactory {\r\n return canUseDOM() ? window.indexedDB : null;\r\n}\r\n\r\n/**\r\n * Get window.innerHeight in an isomorphic manner.\r\n * Todo (http://osgvsowi/23876778), remove the need for server to know about innerWidth by limiting layout options or use CSS based solution.\r\n */\r\nexport function getInnerHeight(): number {\r\n return canUseDOM() ? window.innerHeight : getRequestData().innerHeight;\r\n}\r\n\r\n/**\r\n * Get window.devicePixelRatio in an isomorphic manner.\r\n */\r\nexport function getDevicePixelRatio(): number {\r\n return canUseDOM() ? window.devicePixelRatio : getRequestData().devicePixelRatio;\r\n}\r\n\r\n/**\r\n * Get CSS Grid support in an isomorphic manner\r\n */\r\nexport function getCssGridSupport(): boolean {\r\n return !!(canUseDOM() ? (window.CSS && window.CSS.supports && CSS.supports(\"display\", \"grid\")) : getRequestData().canUseCssGrid);\r\n}\r\n\r\n/**\r\n * Get variable font support in an isomorphic manner\r\n * TODO: SSR currently does not support custom fonts.\r\n */\r\nexport function getVariableFontSupport(): boolean {\r\n if (!canUseDOM()) {\r\n throw new Error(\"SSR currently does not support custom fonts.\");\r\n }\r\n\r\n return !!(window.CSS && window.CSS.supports && CSS.supports(\"(font-variation-settings: normal)\"));\r\n}\r\n\r\n/**\r\n * Returns a script element using several default values.\r\n * Not supported server side.\r\n * @param src The absolute URL for the script src. Default is undefined, blank is okay.\r\n * @param id The id to assign the script element. default is \"\" so no id.\r\n * @param loadAsync Should the script load asynchronously. Default is true.\r\n * @returns {HTMLScriptElement} the script element. not using const so it can be overridden by caller.\r\n */\r\nexport function createScriptTag(src: string = undefined, id = undefined, loadAsync = true): HTMLScriptElement {\r\n if (!canUseDOM()) {\r\n throw new Error(\"createScriptTag is unsupported server side. This call should be wrapped in canUseDOM().\");\r\n }\r\n\r\n const scriptElement: HTMLScriptElement = document.createElement(\"script\");\r\n if (id) {\r\n scriptElement.id = id;\r\n }\r\n scriptElement.type = \"text/javascript\";\r\n if (src) {\r\n scriptElement.src = src;\r\n scriptElement.async = loadAsync;\r\n }\r\n // @ts-ignore\r\n if (window && window.NONCE_ID) {\r\n // @ts-ignore\r\n scriptElement.nonce = window.NONCE_ID;\r\n }\r\n\r\n return scriptElement;\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Enum for different auth cookie names\r\n * @enum\r\n */\r\nexport enum AuthCookieName {\r\n Anon = \"ANON\",\r\n AppAnon = \"APP_ANON\",\r\n Unknown = \"\"\r\n}\r\n\r\n/**\r\n * List of http-readable cookies that indicate the presence of an auth cookie\r\n */\r\nexport enum AuthCookieExistsCookieName {\r\n AnonCookieExists = \"ace\",\r\n AppAnonCookieExists = \"aace\"\r\n}\r\n\r\n/**\r\n * Original source is Constants.ts\r\n * Child cookie name, used to signal if rpsUser is child account.\r\n */\r\nexport const childCookieName = \"child\";","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { get, set } from \"lodash-es\";\r\n\r\nimport { ConnectorConstants } from \"../constants/ConnectorConstants\";\r\nimport { ConnectorNamespaces } from \"@msnews/experiences-constants\";\r\n\r\n/**\r\n * Maps the data connector name to the set of experience keys it is injected into.\r\n * The values include the \"._@STATE@_\" portion needed to pull experience state out of the app state object.\r\n */\r\nconst dataConnectorToExperienceKeyMap: Map> = new Map>();\r\n\r\n/**\r\n * Register a data connector to inject into an experience.\r\n * @param experienceFullNamespace The full namespace of the experience to inject into.\r\n * @param dataConnectorName The name for the data connector to inject.\r\n */\r\nfunction registerInjection(\r\n experienceFullNamespace: string,\r\n dataConnectorName: ConnectorNamespaces): void {\r\n let experienceSet: Set = dataConnectorToExperienceKeyMap.get(dataConnectorName);\r\n if (!experienceSet) {\r\n experienceSet = new Set();\r\n dataConnectorToExperienceKeyMap.set(dataConnectorName, experienceSet);\r\n }\r\n\r\n experienceSet.add(createStatePropertyKey(experienceFullNamespace));\r\n}\r\n\r\n/**\r\n * Initializes the shared data connector state for the given experience.\r\n * @param appState The global app state to modify.\r\n * @param experienceFullNamespace The full namespace of the experience to host the data connector state.\r\n * @param dataConnectorName The name of the data connector to use.\r\n */\r\nfunction initializeExperience(\r\n appState: any,\r\n experienceFullNamespace: string,\r\n dataConnectorName: ConnectorNamespaces): void {\r\n\r\n // Setup the key and get the actual state property for the connector. lodash uses dotted notation\r\n // so the key will be something like: namespace._@STATE@_\r\n const experienceStatePropertyKey = createStatePropertyKey(experienceFullNamespace);\r\n const connectorPreviousState = get(appState, experienceStatePropertyKey, undefined);\r\n\r\n // Find the initial data connector state\r\n const initialDataConnectorState = get(appState, createStatePropertyKey(dataConnectorName), undefined);\r\n\r\n // Create the new experience connector state\r\n const nextStateForConnector = { ...connectorPreviousState, [dataConnectorName]: initialDataConnectorState };\r\n set(appState, experienceStatePropertyKey, nextStateForConnector);\r\n}\r\n\r\n/**\r\n * Updates the data connector state on all experiences that include it.\r\n * @param appState The global app state object.\r\n * @param dataConnectorNamespace The namespace of the data connector that's been updated.\r\n * @param newDataConnectorState The new data connector state object.\r\n */\r\nfunction reportStateChange(\r\n appState: any,\r\n dataConnectorNamespace: string,\r\n newDataConnectorState: any): void {\r\n\r\n const experienceKeys: Set = dataConnectorToExperienceKeyMap.get(dataConnectorNamespace);\r\n if (experienceKeys) {\r\n for (const experienceKey of experienceKeys) {\r\n const experiencePreviousState: any = get(appState, experienceKey, undefined);\r\n\r\n if (experiencePreviousState) {\r\n set(appState, experienceKey, { ...experiencePreviousState, [dataConnectorNamespace]: newDataConnectorState });\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Creates the lodash property key to get or set the experience or data connector state.\r\n * @param fullNamespace The full namespace of the experience or data connector.\r\n */\r\nfunction createStatePropertyKey(fullNamespace: string): string {\r\n return fullNamespace + \".\" + ConnectorConstants.connectorStateKey;\r\n}\r\n\r\n/** Methods to support injecting data connector state into experiences */\r\nexport const dataConnectorInjector = {\r\n registerInjection,\r\n initializeExperience,\r\n reportStateChange\r\n};\r\n","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { logger } from \"../logging\";\r\n\r\n/** Perf marker start suffix */\r\nconst StartMarkSuffix = \"-start\";\r\n\r\n/**\r\n * PerfMarker facilitates adding and measuring performance markers.\r\n */\r\nclass PerfMarker {\r\n /** The single instance of the PerfMarker class. */\r\n private static instance: PerfMarker;\r\n\r\n /** The performance object. */\r\n private performance: Performance;\r\n\r\n /** Perf marker end suffix */\r\n private readonly endMarkSuffix: string = \"-end\";\r\n\r\n /**\r\n * The constructor.\r\n */\r\n private constructor() {\r\n if (typeof window !== \"undefined\") {\r\n this.initialize(window.performance);\r\n }\r\n }\r\n\r\n /**\r\n * Returns singleton class instance.\r\n * @returns The class instance\r\n */\r\n public static getInstance(): PerfMarker {\r\n if (!PerfMarker.instance) {\r\n PerfMarker.instance = new PerfMarker();\r\n }\r\n\r\n return PerfMarker.instance;\r\n }\r\n\r\n /**\r\n * Initialize the member variables.\r\n * @param performance - The performance object instance.\r\n */\r\n public initialize(performance: Performance): void {\r\n this.performance = performance;\r\n }\r\n\r\n /**\r\n * Adds given perf marker to browser.\r\n * @param name - Perf marker to start\r\n */\r\n public startMark(name: string): void {\r\n this.singleMark(name + StartMarkSuffix);\r\n }\r\n\r\n /**\r\n * Adds given perf marker to browser.\r\n * @param name - Perf marker to end\r\n */\r\n public endMark(name: string): void {\r\n this.singleMark(name + this.endMarkSuffix);\r\n this.measureStartEnd(name);\r\n }\r\n\r\n /**\r\n * Adds a single performance marker via the performance API.\r\n * @param name - the name of the perf marker\r\n */\r\n public singleMark(name: string): void {\r\n const performance = this.performance;\r\n if (performance && performance.mark) {\r\n performance.mark(name);\r\n }\r\n }\r\n\r\n /**\r\n * Utility method to add start/end marker around a promise.\r\n * @param name - The name of perf marker\r\n * @param getPromise - The callback\r\n * @returns The promise\r\n */\r\n public async measurePromise(name: string, getPromise: () => Promise): Promise {\r\n this.startMark(name);\r\n const result = await getPromise();\r\n this.endMark(name);\r\n return result;\r\n }\r\n\r\n /**\r\n * Telemetry call this method to collect existing perf markers that each Experience has added.\r\n * @param experienceName - Perf marker name in case of custom marker / Experience name\r\n * @returns {IPerfMarkers}\r\n */\r\n public measurePerfMarker(experienceName: string): IPerfMarkers {\r\n\r\n if (!this.performance) {\r\n return;\r\n }\r\n\r\n const perfMarkers: { [id: string]: PerfMarkerDetail; } = {};\r\n\r\n // Get all perf markers from browser.\r\n const perfEntries = this.performance.getEntriesByType(\"mark\");\r\n if (!perfEntries) {\r\n return perfMarkers;\r\n }\r\n\r\n // Iterate through perfEntries received from browser.\r\n for (let i = 0; i < perfEntries.length; i++) {\r\n\r\n // if marker name in perfEntries object is null\r\n let markerName: string = perfEntries[i].name;\r\n if (!markerName || perfEntries[i].startTime == null) {\r\n continue;\r\n }\r\n\r\n // Remove start and end suffix.\r\n markerName = markerName.replace(/-(end|start)$/i, \"\");\r\n\r\n // if marker name retrieved from browser is not for this experience then continue with next marker.\r\n if (!markerName.startsWith(experienceName)) {\r\n continue;\r\n }\r\n\r\n const perfMarkerDetail = perfMarkers[markerName] || new PerfMarkerDetail(markerName);\r\n perfMarkerDetail.processPerfEntry(perfEntries[i]);\r\n if (perfMarkerDetail.isValid) {\r\n perfMarkers[markerName] = perfMarkerDetail;\r\n }\r\n }\r\n\r\n return perfMarkers;\r\n }\r\n\r\n /**\r\n * Measures the given marker name's start/end markers.\r\n * @param name - The name of the marker whose -start and -end to measure\r\n */\r\n private measureStartEnd(name: string): void {\r\n const performance = this.performance;\r\n if (performance && performance.measure) {\r\n try {\r\n performance.measure(\r\n name,\r\n name + StartMarkSuffix,\r\n name + this.endMarkSuffix\r\n );\r\n } catch (ex) {\r\n // An exception will be thrown if either start/end marker didn't exist.\r\n // We swallo this exception and log an error so that actual code's execution\r\n // would not be effected due to performance measurement code.\r\n logger.logError(`Error while attempting to measure start/end of '${name}'. Error: ${ex}`);\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport const perfMarker = PerfMarker.getInstance();\r\n\r\n/**\r\n * Interface defining attributes of each per marker.\r\n */\r\nexport interface IPerfMarkers {\r\n [key: string]: PerfMarkerDetail;\r\n}\r\n\r\n/**\r\n * Interface defining perf markers.\r\n */\r\nclass PerfMarkerDetail {\r\n /** marker name */\r\n public readonly markerName: string;\r\n /** first start time */\r\n public firstStartTime: number;\r\n /** start time */\r\n public startTime: number;\r\n /** duration */\r\n public duration = 0;\r\n\r\n /**\r\n * Sets marker name.\r\n */\r\n constructor(markerName: string) {\r\n this.markerName = markerName;\r\n }\r\n\r\n /**\r\n * Check if given marker is valid. If marker has a start time then it is a valid marker.\r\n * @returns True if valid else false.\r\n */\r\n get isValid(): boolean {\r\n return this.startTime != null;\r\n }\r\n\r\n /**\r\n * Sum up start and end marker duraiton per marker name.\r\n */\r\n public processPerfEntry(perfEntry: PerformanceEntry): void {\r\n\r\n // If given mark is a start mark\r\n if (perfEntry.name.endsWith(StartMarkSuffix)) {\r\n\r\n // If this is a start mark and firstStartTime is undefined then assign value of startTime now.\r\n if (!this.firstStartTime) {\r\n this.firstStartTime = perfEntry.startTime;\r\n }\r\n\r\n // Change start time to start time of current mark.\r\n this.startTime = perfEntry.startTime;\r\n\r\n } else if (this.startTime != null) {\r\n // This is is not a start mark. Assuming this is end mark, check start time of this mark is set earlier. if set properly then proceed.\r\n // else likely a candiddate to skip \"if\" part.\r\n\r\n // This is a end mark. Add earlier duration plus current start time minus this start time.\r\n this.duration += perfEntry.startTime - this.startTime;\r\n\r\n // reset start time so we can recalculate the next start/end pair correctly\r\n this.startTime = null;\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { ILoggingService } from \"clientcore-infrastructure-analytics/ILoggingService\";\r\nimport { Logger, logger } from \"./Logger\";\r\nimport { getQueryParameterByName } from \"./Util\";\r\nimport { canUseDOM } from \"@msnews/isomorphic-util\";\r\n\r\ndeclare global {\r\n interface Window {\r\n webpackRequire: any;\r\n }\r\n}\r\n\r\ndeclare let __webpack_require__: any;\r\n\r\n/**\r\n * Logger that simply logs to console with minimum dependencies.\r\n * Used for bootstrap/inline script where we don't need any logging nor its dependencies.\r\n */\r\nexport class LiteLogger implements Logger {\r\n\r\n /** Backing field for the isDebug function */\r\n private isDebugEnabled: boolean;\r\n\r\n /**\r\n * The constructor\r\n */\r\n public constructor() {\r\n if (canUseDOM()) {\r\n this.isDebugEnabled = ((getQueryParameterByName(window.location.href, \"debug\") || \"\").toLowerCase() in { 1: 1, true: 1 });\r\n\r\n // On debug mode, make webpack_require available as global function\r\n // so any code in packages could be triggered from console. Handy for debugging.\r\n if (this.isDebugEnabled && !global[\"TEST_ENV\"]) {\r\n window.webpackRequire = __webpack_require__;\r\n }\r\n } else {\r\n this.isDebugEnabled = false; // isDebugEnabled should be set explictly using the setDebug method\r\n }\r\n }\r\n\r\n /**\r\n * Returns the logging service\r\n * @returns {ILoggingService}\r\n */\r\n public getLoggingService(): ILoggingService {\r\n return null;\r\n }\r\n\r\n /**\r\n * Checks whether we're running in debug mode.\r\n * @returns True when either debug=1 or debug=true is present as a query param, otherwise false.\r\n */\r\n public isDebug(): boolean {\r\n return this.isDebugEnabled;\r\n }\r\n\r\n /**\r\n * Override the isDebug setting. Useful when server side rendering.\r\n */\r\n public setDebug(isDebug: boolean): void {\r\n this.isDebugEnabled = isDebug;\r\n }\r\n\r\n /**\r\n * Set the tags to filter logs.\r\n * @param tags Tags to filter logs. If empty, do not filter.\r\n */\r\n public setTags(tags: string[]): void {\r\n // Not supported in console logger at the moment\r\n }\r\n\r\n /**\r\n * Log console message.\r\n * Note that these are not output to the console unless you're in debug mode.\r\n * @param message - Message to log.\r\n * @param tags - Optional tags for specifying log type for filtering logs.\r\n */\r\n public log(message: string, tags?: string[]): void {\r\n if (this.isDebug()) {\r\n console.info(message);\r\n }\r\n }\r\n\r\n /**\r\n * Log error message.\r\n * @param message - Message to log\r\n */\r\n public logError(message: string): void {\r\n console.error(message);\r\n }\r\n\r\n /**\r\n * Lazy log console message. Use this when the message being constructed is complex or expensive so that it's only evaluated if needed.\r\n * Note that the callback is not invoked and the message is not output unless you're in debug mode.\r\n * @param getMessage - The function to call to get message to log\r\n */\r\n public logCallback(getMessage: () => string): void {\r\n if (this.isDebug()) {\r\n console.info(getMessage());\r\n }\r\n }\r\n\r\n /**\r\n * Log the object to the console.\r\n * Note that these are not output to the console unless you're in debug mode.\r\n * @param message - Array of messages to log\r\n */\r\n public logObjects(...message: any[]): void {\r\n if (this.isDebug()) {\r\n console.log(...message);\r\n }\r\n }\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\n/**\r\n * Utility method to extract query string param in url.\r\n * @param name - Query param name\r\n * @returns Query param value\r\n */\r\nexport function getQueryParameterByName(locationHref: string, name: string): string {\r\n\r\n const nameRegEx = name.replace(/[[\\]]/g, \"\\\\$&\");\r\n const regex: any = new RegExp(\"[?&]\" + nameRegEx + \"(=([^&#]*)|&|#|$)\");\r\n\r\n const queryNameValueMatches: any = regex.exec(locationHref);\r\n if (!queryNameValueMatches) {\r\n return null;\r\n }\r\n\r\n // the second group would contain the value of the param\r\n const queryValue = queryNameValueMatches[2];\r\n\r\n return decodeURIComponent(queryValue.replace(/\\+/g, \" \")) || \"\";\r\n}","// © Microsoft Corporation. All rights reserved.\r\n\r\nimport { minimumHostPagePathSegments } from \"../constants\";\r\n\r\n/**\r\n * The HostPage interface uses words defined by the Prime project for us to locate in what hostpage\r\n * the Feeds project is running.\r\n */\r\nexport interface IHostPage {\r\n originalUrl: string; // ex: https://www.msn.com/spartan/ntp/interests/my?fdhead=gizmodemo\r\n verticalKey: string, // ex: spartan or compass\r\n categoryKey: string, // ex: dhp or ntp\r\n hostName: string, // ex: www.msn.com\r\n topDomain: string, // ex: msn.com or msn.cn\r\n subcategoryKey?: string // ex: interests or discover\r\n}\r\n\r\nexport namespace HostPage {\r\n /**\r\n * This function extracts the hostPage information from the passed in href. This is based on the\r\n * Prime pathname convention of \"/vertical/category/subcategory\". If the passed href does not have at least the\r\n * category, then null is returned instead as this is considered an invalid URL.\r\n * @param {string} href - The URL, which will be used to extract the hostPage\r\n * @returns {IHostPage | null}\r\n */\r\n export function getHostPageFromUrl(href: string): IHostPage | null {\r\n if (!href) { return; }\r\n const url = new URL(href);\r\n\r\n const host = url.hostname;\r\n const pathnameSegments = url.pathname.split(\"/\");\r\n\r\n // for cookie stamping that needs the msn.com or msn.cn path isntead of using the full host value\r\n const topDomainName = (host.match(/[^.]+\\.[^.\\d]+$/) || {})[0] || \"\";\r\n\r\n /**\r\n * The + 1 in the following statement is take into account the empty string \"segment\"\r\n * that would be to the left of the first backslash in a valid path like \"/spartan/ntp\"\r\n */\r\n if (pathnameSegments.length <= minimumHostPagePathSegments) {\r\n return {\r\n originalUrl: href,\r\n categoryKey: null,\r\n verticalKey: null,\r\n hostName: host,\r\n topDomain: topDomainName\r\n }; // When the user url doesn't have atleast two pathsegments the vertical and category keys are null\r\n }\r\n\r\n /**\r\n * Consider path segments that have market in it e.g.\r\n * /en-us/news/other/title/ar-cmsId\r\n * /en-us/video/animals\r\n * /en-us/sports/nfl/scores\r\n */\r\n const isMarketPresent = pathnameSegments[1].length === 5 && pathnameSegments[1].split(\"-\").length === 2;\r\n const indexOffset = isMarketPresent ? 1 : 0;\r\n\r\n const hostPage: IHostPage = {\r\n originalUrl: href,\r\n categoryKey: pathnameSegments[2 + indexOffset],\r\n verticalKey: pathnameSegments[1 + indexOffset],\r\n hostName: host,\r\n topDomain: topDomainName\r\n };\r\n\r\n if (pathnameSegments.length >= minimumHostPagePathSegments) {\r\n hostPage.subcategoryKey = pathnameSegments[3 + indexOffset];\r\n }\r\n return hostPage;\r\n }\r\n}"],"sourceRoot":""}