{"version":3,"file":"main.9412184acf381f06.js","sources":["webpack://storefronts/./rspack/polyfills.js","webpack://storefronts/./src/State.tsx","webpack://storefronts/./src/appsource/components/HiddenComponentWrapper/HiddenComponentWrapper.tsx","webpack://storefronts/./src/appsource/components/RecommendationsRibbonWrapper/RecommendationsRibbonWrapper.tsx","webpack://storefronts/./src/appsource/components/UsefulInfo.tsx","webpack://storefronts/./src/appsource/components/billingFrequencyChoiceGroup/billingFrequencyChoiceGroup.tsx","webpack://storefronts/./src/appsource/components/billingTermChoiceGroup/billingTermChoiceGroup.tsx","webpack://storefronts/./src/appsource/components/saasPricingTable/saasPricingTable.tsx","webpack://storefronts/./src/appsource/components/orderLoading/orderLoading.tsx","webpack://storefronts/./src/appsource/components/redirectModal/redirectModal.tsx","webpack://storefronts/./src/appsource/components/busyLoader/busyLoader.tsx","webpack://storefronts/./src/appsource/components/MSuserErrorBanner/MSuserErrorBanner.tsx","webpack://storefronts/./src/appsource/components/thumbsUpDown/thumbsUpDown.tsx","webpack://storefronts/./src/appsource/containers/LegacyCheckoutHydration.tsx","webpack://storefronts/./src/shared/utils/popupDisplayManager.ts","webpack://storefronts/./src/appsource/containers/appDetails.tsx","webpack://storefronts/./src/shared/components/longContent.tsx","webpack://storefronts/./src/shared/components/reviewQAContent.tsx","webpack://storefronts/./src/shared/components/appReviewItem/appReviewItem.tsx","webpack://storefronts/./src/shared/components/ratingPercentages.tsx","webpack://storefronts/./src/shared/components/ratingSummary.tsx","webpack://storefronts/./src/shared/components/reviewsDropDowns.tsx","webpack://storefronts/./src/shared/components/noReviewsToShow.tsx","webpack://storefronts/./src/shared/components/externalRatingSummary.tsx","webpack://storefronts/./src/shared/components/externalRatingSummaries.tsx","webpack://storefronts/./src/shared/containers/externalRatingSummaries.tsx","webpack://storefronts/./src/appsource/components/userTerms/userTerms.tsx","webpack://storefronts/./src/appsource/components/appReviewCollection.tsx","webpack://storefronts/./src/appsource/containers/appReviewCollection.tsx","webpack://storefronts/./src/shared/components/sortedTable/sortedTableColumn.tsx","webpack://storefronts/./src/shared/components/sortedTable/sortedTable.tsx","webpack://storefronts/./src/shared/components/sortedTable/sortedTH.tsx","webpack://storefronts/./src/shared/components/simplePriceCell.tsx","webpack://storefronts/./src/shared/components/simplePlanPricing.tsx","webpack://storefronts/./src/shared/components/microsoftManagedIndicatorWrapper.tsx","webpack://storefronts/./src/shared/utils/localeUtils.ts","webpack://storefronts/./src/appsource/components/linkedin/linkedinProductGroupBar.tsx","webpack://storefronts/./src/appsource/components/linkedin/linkedinUpcomingEvent.tsx","webpack://storefronts/./src/appsource/components/linkedin/linkedinFeaturedCustomer.tsx","webpack://storefronts/./src/shared/components/featureFeedback.tsx","webpack://storefronts/./src/appsource/components/linkedin/linkedinProductGroup.tsx","webpack://storefronts/./src/appsource/components/Badge.tsx","webpack://storefronts/./src/appsource/components/appDetails.tsx","webpack://storefronts/./src/shared/utils/capabilities.tsx","webpack://storefronts/./src/shared/utils/autoruns.tsx","webpack://storefronts/./src/appsource/components/overview.tsx","webpack://storefronts/./src/appsource/containers/overview.tsx","webpack://storefronts/./src/appsource/containers/serviceDetails.tsx","webpack://storefronts/./src/appsource/components/serviceDetails.tsx","webpack://storefronts/./src/shared/actions/tileDataThunkActions.tsx","webpack://storefronts/./src/shared/msal/loginRedirect.ts","webpack://storefronts/./src/shared/msal/logout.ts","webpack://storefronts/./src/shared/components/FederatedModules/RestClient.tsx","webpack://storefronts/./src/appsource/refreshTokenHandler.tsx","webpack://storefronts/./src/shared/msal/postRedirect.ts","webpack://storefronts/./src/appsource/App.tsx","webpack://storefronts/./src/shared/handlers/recoverableHydrationError.ts","webpack://storefronts/./src/shared/utils/pltUtils.ts","webpack://storefronts/./src/shared/actions/tileDataActions.tsx","webpack://storefronts/./src/shared/actions/queryActions.tsx","webpack://storefronts/./src/shared/components/LoadingSpinner.tsx","webpack://storefronts/./src/shared/hooks/useClientRoutes.tsx","webpack://storefronts/./src/appsource/pathsViewMap.ts","webpack://storefronts/./src/shared/utils/signin.tsx","webpack://storefronts/./src/shared/components/modals/signInModal.tsx","webpack://storefronts/./src/shared/components/modals/mediaModal.tsx","webpack://storefronts/./src/shared/components/modals/videoModal.tsx","webpack://storefronts/./src/shared/components/modals/driveModal.tsx","webpack://storefronts/./src/shared/utils/fieldHubUtils.ts","webpack://storefronts/./src/shared/components/modals/fieldHubModal.tsx","webpack://storefronts/./src/shared/containers/modals/fieldHubModal.tsx","webpack://storefronts/./src/shared/components/modals/errorModal.tsx","webpack://storefronts/./src/shared/containers/modals/errorModal.tsx","webpack://storefronts/./src/shared/components/modals/animationModal.tsx","webpack://storefronts/./src/shared/components/modals/disclaimerModal.tsx","webpack://storefronts/./src/shared/components/modals/npsModal.tsx","webpack://storefronts/./src/shared/components/modals/instructionsModalBody.tsx","webpack://storefronts/./src/shared/components/modals/instructionsModal.tsx","webpack://storefronts/./src/shared/components/modals/downloadSampleModal.tsx","webpack://storefronts/./src/shared/store/createStore.ts","webpack://storefronts/./src/shared/reducers/searchReducer.tsx","webpack://storefronts/./src/shared/reducers/modalReducer.tsx","webpack://storefronts/./src/shared/reducers/commonEntityDataReducer.tsx","webpack://storefronts/./src/embed/reducers/pbiAppDataReducer.tsx","webpack://storefronts/./src/embed/reducers/partnerAppDataReducer.tsx","webpack://storefronts/./src/shared/reducers/appDataReducer.tsx","webpack://storefronts/./src/shared/reducers/userDataReducer.tsx","webpack://storefronts/./src/shared/reducers/checkoutReducer.ts","webpack://storefronts/./src/shared/reducers/partnersReducer.ts","webpack://storefronts/./src/shared/reducers/serviceDataReducer.tsx","webpack://storefronts/./src/shared/reducers/reducers.tsx","webpack://storefronts/./src/shared/reducers/cloudsIndustryDataReducer.tsx","webpack://storefronts/./src/shared/reducers/configReducer.tsx","webpack://storefronts/./src/shared/reducers/dynamicCampaignReducer.tsx","webpack://storefronts/./src/shared/reducers/userFavouriteReducer.tsx","webpack://storefronts/./src/shared/utils/errorHandlerUtil.tsx","webpack://storefronts/./src/embed/actions/embedThunks.tsx","webpack://storefronts/./src/embed/embedMessaging.tsx","webpack://storefronts/./src/appsource/components/modals/userProfileModal/userProfileModal.tsx","webpack://storefronts/./src/appsource/containers/modals/userProfileModal/userProfileModal.tsx","webpack://storefronts/./src/appsource/components/modals/successConsentModal/successConsentModal.tsx","webpack://storefronts/./src/appsource/components/modals/failureConsentModal/failureConsentModal.tsx","webpack://storefronts/./src/appsource/components/modals/consentModal/consentModalContent.tsx","webpack://storefronts/./src/shared/utils/InputValidationUtils.tsx","webpack://storefronts/./src/appsource/components/modals/consentModal/consentModal.tsx","webpack://storefronts/./src/appsource/containers/modals/consentModal/consentModal.tsx","webpack://storefronts/./src/shared/components/modals/reviewActionModal.tsx","webpack://storefronts/./src/shared/components/modals/submitReviewResponseModal.tsx","webpack://storefronts/./src/shared/components/modals/ratingModal.tsx","webpack://storefronts/./src/shared/containers/modals/ratingModal.tsx","webpack://storefronts/./src/shared/components/modals/reportAbuseModal.tsx","webpack://storefronts/./src/shared/containers/modals/reportAbuseModal.tsx","webpack://storefronts/./src/shared/components/modals/reviewCommentModal/reviewCommentModal.tsx","webpack://storefronts/./src/shared/containers/modals/reviewCommentModal.tsx","webpack://storefronts/./src/shared/components/modals/reviewMarkAsHelpfulModal/reviewMarkAsHelpfulModalErrorDialog.tsx","webpack://storefronts/./src/shared/components/modals/reviewMarkAsHelpfulModal/reviewMarkAsHelpfulModal.tsx","webpack://storefronts/./src/shared/components/modals/modal.tsx","webpack://storefronts/./src/shared/handlers/reportAbuseModalHandler.tsx","webpack://storefronts/./src/shared/handlers/consentModalHandler.tsx","webpack://storefronts/./src/shared/handlers/ratingModalHandler.tsx","webpack://storefronts/./src/shared/containers/modals/modal.tsx","webpack://storefronts/./src/shared/components/footer.tsx","webpack://storefronts/./src/shared/containers/footer.tsx","webpack://storefronts/./src/shared/utils/appViewUtils.tsx","webpack://storefronts/./src/appsource/components/modals/npsPreviewModal.tsx","webpack://storefronts/./src/appsource/components/modals/npsSubmittedModal.tsx","webpack://storefronts/./src/appsource/components/modals/npsSurveyModal.tsx","webpack://storefronts/./src/appsource/components/modals/npsModal/npsModal.tsx","webpack://storefronts/./src/appsource/components/nps.tsx","webpack://storefronts/./src/shared/components/cookieBanner.tsx","webpack://storefronts/./src/shared/containers/cookieBanner.tsx","webpack://storefronts/./src/shared/components/loader.tsx","webpack://storefronts/./src/shared/msal/user.ts","webpack://storefronts/./src/shared/components/SilentClientLogin.tsx","webpack://storefronts/./src/shared/components/appView.tsx","webpack://storefronts/./src/shared/utils/cookieBannerUtils.ts","webpack://storefronts/./src/shared/handlers/appViewHandler.tsx","webpack://storefronts/./src/shared/containers/AppView.tsx","webpack://storefronts/./src/shared/actions/queryThunkActions.tsx","webpack://storefronts/./src/appsource/Router.tsx","webpack://storefronts/./src/shared/hooks/useLocationChange.tsx","webpack://storefronts/./src/shared/handlers/rootHandler.tsx","webpack://storefronts/./src/shared/components/scrollToTopButton.tsx","webpack://storefronts/./src/shared/services/http/tokenRestClient.ts","webpack://storefronts/./src/shared/utils/locales.tsx","webpack://storefronts/./src/shared/utils/debug.ts","webpack://storefronts/./src/shared/i18n/client.ts","webpack://storefronts/./src/shared/handlers/onError.ts","webpack://storefronts/./src/shared/handlers/seo.ts","webpack://storefronts/./src/appsource/mainClientHookup.tsx","webpack://storefronts/./src/shared/services/init/initBrowser.ts","webpack://storefronts/./src/appsource/utils/comscore.ts","webpack://storefronts/./src/appsource/utils/consultingServicesUtils.ts","webpack://storefronts/./src/appsource/utils/feedback.ts","webpack://storefronts/./src/appsource/utils/nps/nps.ts","webpack://storefronts/./src/embed/constants.tsx","webpack://storefronts/./src/embed/embedHostUtils.tsx","webpack://storefronts/./src/logger/logger.ts","webpack://storefronts/./src/logger/index.ts","webpack://storefronts/./src/server/LogHelper.tsx","webpack://storefronts/./rspack/paths.ts","webpack://storefronts/./src/server/api/ApiVersion.ts","webpack://storefronts/./src/server/Utils.ts","webpack://storefronts/./src/server/serverLogger/serverLogger.ts","webpack://storefronts/./src/shared/AzureEnvironmentSettings.tsx","webpack://storefronts/./src/shared/Models.tsx","webpack://storefronts/./src/shared/actions/actions.tsx","webpack://storefronts/./src/shared/actions/checkoutActions.ts","webpack://storefronts/./src/shared/actions/partnersActions.ts","webpack://storefronts/./src/shared/actions/privateOffersThunkActions.tsx","webpack://storefronts/./src/interfaces/IBilling.tsx","webpack://storefronts/./src/shared/utils/leadsUtils.tsx","webpack://storefronts/./src/shared/services/http/leadgenRestClient.ts","webpack://storefronts/./src/shared/services/http/reviewRestClient.ts","webpack://storefronts/./src/shared/services/http/fieldHubRestClient.ts","webpack://storefronts/./src/shared/services/http/dynamicCampaignRestClient.ts","webpack://storefronts/./src/shared/services/http/purchaseRestClient.ts","webpack://storefronts/./src/shared/services/http/commerceApiRestClient.ts","webpack://storefronts/./src/shared/services/http/reviewCommentsRestClient.ts","webpack://storefronts/./src/shared/services/http/reviewMarkAsHelpfulRestClient.ts","webpack://storefronts/./src/shared/services/http/reviewsCatalogRestClient.ts","webpack://storefronts/./src/shared/services/http/linkedInRestClient.ts","webpack://storefronts/./src/shared/services/http/reportReviewRestClient.ts","webpack://storefronts/./src/shared/services/http/graphRestClient.ts","webpack://storefronts/./src/shared/services/http/reviewAppReviewsRestClient.ts","webpack://storefronts/./src/shared/services/http/userReviewRestClient.ts","webpack://storefronts/./src/shared/services/http/authRestClient.ts","webpack://storefronts/./src/shared/services/product/product.ts","webpack://storefronts/./src/shared/actions/thunkActions.tsx","webpack://storefronts/./src/shared/services/http/catalogApiRestClient.ts","webpack://storefronts/./src/shared/utils/thunkActionUtils.tsx","webpack://storefronts/./src/shared/services/http/userRestClient.ts","webpack://storefronts/./src/shared/actions/userFavouriteActions.tsx","webpack://storefronts/./src/shared/services/http/userFavouriteRestClient.ts","webpack://storefronts/./src/shared/actions/userFavouriteThunkActions.tsx","webpack://storefronts/./src/shared/utils/userFavouriteThunkActionUtils.tsx","webpack://storefronts/./src/shared/components/ButtonLink.tsx","webpack://storefronts/./src/appsource/components/ShowingResultsFor/ShowingResultsFor.tsx","webpack://storefronts/./src/shared/components/FilteredGalleryHeader/FilteredGalleryHeader.tsx","webpack://storefronts/./src/shared/components/ItemsTooltip.tsx","webpack://storefronts/./src/shared/components/successStory.tsx","webpack://storefronts/./src/shared/components/Testimonials/Testimonials.data.ts","webpack://storefronts/./src/shared/components/Testimonials/Testimonials.tsx","webpack://storefronts/./src/shared/components/animation.tsx","webpack://storefronts/./src/shared/components/appDetailsHeaderRatingBar/appDetailsHeaderRatingBar.tsx","webpack://storefronts/./src/shared/components/appDetailsLinkedItems/appDetailsLinkedItems.tsx","webpack://storefronts/./src/shared/components/appReviewCommentCollection/appReviewItemCommentPagination/appReviewItemCommentPagination.tsx","webpack://storefronts/./src/shared/components/appReviewCommentCollection/appReviewItemCommentEmptyMessage/appReviewItemCommentEmptyMessage.tsx","webpack://storefronts/./src/shared/components/appReviewCommentCollection/appReviewItemCommentCollectionListSection/appReviewItemCommentCollectionListSection.tsx","webpack://storefronts/./src/shared/components/appReviewCommentCollection/appReviewCommentCollection.tsx","webpack://storefronts/./src/shared/components/appReviewCommentCollection/appReviewCommentCollectionPaginationButton/appReviewCommentCollectionPaginationButton.tsx","webpack://storefronts/./src/shared/components/appReviewCommentItem/appReviewCommentItem.tsx","webpack://storefronts/./src/shared/components/appReviewCommentItemToolbar/appReviewCommentItemToolbar.tsx","webpack://storefronts/./src/shared/components/appReviewItemCommentComposer.tsx","webpack://storefronts/./src/shared/components/appReviewItemToolbar/appReviewItemToolbar.tsx","webpack://storefronts/./src/shared/components/reviewIsvReply.tsx","webpack://storefronts/./src/shared/containers/appReviewCommentCollection.tsx","webpack://storefronts/./src/shared/components/appReviewSocialContent/appReviewSocialContent.tsx","webpack://storefronts/./src/shared/components/appTile/appTile.tsx","webpack://storefronts/./src/shared/components/appTileLinkedItems/appTileLinkedItems.tsx","webpack://storefronts/./src/shared/components/baseCtaButton.tsx","webpack://storefronts/./src/shared/components/breadcrumbUrl.tsx","webpack://storefronts/./src/shared/components/card.tsx","webpack://storefronts/./src/shared/components/commonTile.tsx","webpack://storefronts/./src/shared/components/contentStyles.ts","webpack://storefronts/./src/shared/components/ctaButtons/ctaButtons.tsx","webpack://storefronts/./src/shared/components/customMeterPricing/customMeterPricing.tsx","webpack://storefronts/./src/shared/components/externalLink.tsx","webpack://storefronts/./src/shared/utils/externalLinkUtils.tsx","webpack://storefronts/./src/shared/components/futurePriceTooltip.tsx","webpack://storefronts/./src/shared/components/futurePriceWarning.tsx","webpack://storefronts/./src/shared/components/iconLink.tsx","webpack://storefronts/./src/shared/components/badges/freeTrialBadge.tsx","webpack://storefronts/./src/shared/components/badges/privatePlanBadge.tsx","webpack://storefronts/./src/shared/components/saasPricingTableBase/saasPlanNameCell.tsx","webpack://storefronts/./src/shared/components/saasPricingTableBase/saasPricingCell.tsx","webpack://storefronts/./src/shared/components/saasPricingTableBase/saasSubtotalCell/saasSubtotalCell.tsx","webpack://storefronts/./src/shared/components/saasPricingTableBase/saasPricingTableColumns/saasPricingTableColumns.tsx","webpack://storefronts/./src/shared/components/saasPricingTableBase/saasPricingRow/saasPricingRow.tsx","webpack://storefronts/./src/shared/components/saasPricingTableBase/saasPricingTableBase/saasPricingTableBase.tsx","webpack://storefronts/./src/shared/components/internalLink.tsx","webpack://storefronts/./src/shared/components/itemsContainer.tsx","webpack://storefronts/./src/shared/components/linkedItem/linkedItem.tsx","webpack://storefronts/./src/shared/components/modals/submittedModal.tsx","webpack://storefronts/./src/shared/components/msClarity/msClarity.tsx","webpack://storefronts/./src/shared/components/products.tsx","webpack://storefronts/./src/shared/components/pureSpzaComponent.tsx","webpack://storefronts/./src/shared/components/ratings/ratingsInfo.tsx","webpack://storefronts/./src/shared/components/ribbon.tsx","webpack://storefronts/./src/shared/utils/richTextDropDownUtils.tsx","webpack://storefronts/./src/shared/components/richTextDropDown.tsx","webpack://storefronts/./src/shared/components/safeHtmlWrapper/safeHtmlWrapper.tsx","webpack://storefronts/./src/shared/components/sortingDropdown/sortingDropdown.tsx","webpack://storefronts/./src/shared/components/spzaComponent.tsx","webpack://storefronts/./src/shared/components/stickyCard.tsx","webpack://storefronts/./src/shared/components/tabs.tsx","webpack://storefronts/./src/shared/components/telemetryImage.tsx","webpack://storefronts/./src/shared/components/tooltip.tsx","webpack://storefronts/./src/shared/containers/appTile.tsx","webpack://storefronts/./src/shared/components/userFavouriteTileButton.tsx","webpack://storefronts/./src/shared/containers/userFavouriteTileButton.tsx","webpack://storefronts/./src/shared/components/baseTile.tsx","webpack://storefronts/./src/shared/containers/baseTile.tsx","webpack://storefronts/./src/shared/components/dynamicCampaign.tsx","webpack://storefronts/./src/shared/containers/dynamicCampaign.tsx","webpack://storefronts/./src/shared/components/serviceTile.tsx","webpack://storefronts/./src/shared/containers/serviceTile.tsx","webpack://storefronts/./src/shared/components/userFavouriteTileDetailButton.tsx","webpack://storefronts/./src/shared/containers/userFavouriteTileDetailButton.tsx","webpack://storefronts/./src/shared/hooks/useMsClarity.tsx","webpack://storefronts/./src/shared/hooks/useHydration.tsx","webpack://storefronts/./src/shared/hooks/useSpzaInstrumentService.tsx","webpack://storefronts/./src/shared/services/telemetry/1DSClient.tsx","webpack://storefronts/./src/shared/hooks/useTelemetry.tsx","webpack://storefronts/./src/shared/logger/client.ts","webpack://storefronts/./src/shared/logger/base.ts","webpack://storefronts/./src/shared/logger/system.ts","webpack://storefronts/./src/shared/logger/config.ts","webpack://storefronts/./src/shared/msal/client.ts","webpack://storefronts/./src/shared/msal/config.ts","webpack://storefronts/./src/shared/msal/scopes.ts","webpack://storefronts/./src/shared/msal/tokens.ts","webpack://storefronts/./src/shared/msal/windowUtils.ts","webpack://storefronts/./src/shared/oneTaxonomy/utils.ts","webpack://storefronts/./src/shared/utils/xssUtils.ts","webpack://storefronts/./src/shared/routerHistory.tsx","webpack://storefronts/./src/shared/services/feedback/index.ts","webpack://storefronts/./src/shared/services/http/armRestClient.ts","webpack://storefronts/./src/shared/services/http/entityRestClient.ts","webpack://storefronts/./src/shared/services/http/httpProtocol.ts","webpack://storefronts/./src/server/errors/httpError.tsx","webpack://storefronts/./src/shared/services/init/appConfig.ts","webpack://storefronts/./src/shared/services/telemetry/core/action.ts","webpack://storefronts/./src/shared/services/telemetry/core/buffer.ts","webpack://storefronts/./src/shared/services/telemetry/core/consumer.ts","webpack://storefronts/./src/shared/services/telemetry/core/instrument.ts","webpack://storefronts/./src/shared/services/telemetry/core/provider.ts","webpack://storefronts/./src/shared/services/telemetry/providers/staticProvider.ts","webpack://storefronts/./src/shared/services/telemetry/shared/sharedTelemetry.ts","webpack://storefronts/./src/shared/services/telemetry/shared/sharedInstrument.ts","webpack://storefronts/./src/shared/services/telemetry/spza/spzaTelemetry.ts","webpack://storefronts/./src/shared/services/telemetry/spza/spzaInstrument.ts","webpack://storefronts/./src/shared/services/window.tsx","webpack://storefronts/./src/shared/specifics.tsx","webpack://storefronts/./src/shared/utils/accessToken/accessToken.ts","webpack://storefronts/./src/shared/utils/countryCodeMap.ts","webpack://storefronts/./src/shared/utils/optimizeUrlHelper.ts","webpack://storefronts/./src/server/utils/func.ts","webpack://storefronts/./src/shared/services/http/urlUtils.ts","webpack://storefronts/./src/shared/utils/appUtils.tsx","webpack://storefronts/./src/shared/utils/browserStorageUtils.tsx","webpack://storefronts/./src/shared/utils/cookieUtils.tsx","webpack://storefronts/./src/shared/utils/businessConstants.ts","webpack://storefronts/./src/shared/utils/checkoutUtils.tsx","webpack://storefronts/./src/shared/utils/constants.tsx","webpack://storefronts/./src/shared/utils/dataMappingConstants.ts","webpack://storefronts/./src/shared/utils/consultingServicesUtils.ts","webpack://storefronts/./src/shared/utils/dataMapping.tsx","webpack://storefronts/./src/shared/utils/dataMappingUtils.tsx","webpack://storefronts/./src/shared/utils/datamappingHelpers.tsx","webpack://storefronts/./src/shared/utils/detailUtils.tsx","webpack://storefronts/./src/shared/utils/entityRegistration.tsx","webpack://storefronts/./src/shared/utils/errorUtils.ts","webpack://storefronts/./src/shared/utils/filterHelpers.tsx","webpack://storefronts/./src/shared/utils/filterModule.tsx","webpack://storefronts/./src/shared/utils/futurePricesUtils/futurePricesUtils.ts","webpack://storefronts/./src/shared/utils/hashMapUtils.tsx","webpack://storefronts/./src/shared/utils/httpClientUtil.tsx","webpack://storefronts/./src/shared/utils/modals.tsx","webpack://storefronts/./src/shared/utils/npsUtils.tsx","webpack://storefronts/./src/shared/utils/objectUtils.tsx","webpack://storefronts/./src/shared/utils/onetimepaymentoffers/oneTimePaymentOffers.tsx","webpack://storefronts/./src/shared/utils/partnerManifestLoader.ts","webpack://storefronts/./src/shared/utils/pricing/pricing.tsx","webpack://storefronts/./src/shared/utils/privacyUtils.ts","webpack://storefronts/./src/shared/utils/reactUtils.tsx","webpack://storefronts/./src/shared/utils/reviewsUtils.tsx","webpack://storefronts/./src/shared/utils/routeUtils.ts","webpack://storefronts/./src/shared/utils/search.tsx","webpack://storefronts/./src/shared/utils/seoUtils.ts","webpack://storefronts/./src/shared/utils/serviceOffersSupportedStatesCodes.ts","webpack://storefronts/./src/shared/utils/silentLogInUtils.tsx","webpack://storefronts/./src/shared/utils/stringUtils.tsx","webpack://storefronts/./src/shared/utils/telemetryUtils.tsx","webpack://storefronts/./src/shared/utils/urlUtils.tsx","webpack://storefronts/./src/shared/utils/userFavouriteDedicatedUtils.tsx","webpack://storefronts/./src/shared/utils/userFavouriteUtils.tsx","webpack://storefronts/./src/shared/utils/userUtils.tsx"],"sourcesContent":["module.exports = ()=>{};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { UserSegment } from '@shared/Models';\nimport { Constants } from '@shared/utils/constants';\nimport { enrichReviewCommentsApiVersion } from '@shared/specifics';\nconst initialAppReviewsDataState = {\n entityId: '',\n reviews: [],\n isPurchased: false,\n reviewComments: {},\n markedAsHelpful: {\n userReviewIdsMarkedAsHelpful: [],\n userReviewIdsLoading: {}\n }\n};\n// add your feature flags here\n// for now the type should be string\n// we can explore other types in the future\n// DON'T FORGET to initialize it in the constructor\n// ALSO DON'T FORGET to initialize it in the initial state\n// your new feature flag value will be automatically update in\n// state.config.featureFlags.myNewFeatureFlag\nexport class IFeatureFlags {\n constructor(){\n // i.e. myNewFeatureFlag: string;\n _define_property(this, \"AppReviews\", void 0);\n _define_property(this, \"ProfileExp\", void 0);\n _define_property(this, \"AltAuth\", void 0);\n _define_property(this, \"SaasLinkingEnabled\", void 0);\n _define_property(this, \"RedesignEnabled\", void 0);\n _define_property(this, \"ShowPopularity\", void 0);\n _define_property(this, \"UseSecondarySearch\", void 0);\n _define_property(this, \"privateOffers\", void 0);\n _define_property(this, \"purchaseBlends\", void 0);\n _define_property(this, \"newCustomerFlow\", void 0);\n _define_property(this, \"PartnersEnabled\", void 0);\n _define_property(this, \"forceCompletePurchase\", void 0);\n _define_property(this, \"allowAdminUser\", void 0);\n _define_property(this, \"showConsent\", void 0);\n _define_property(this, \"ensureprewarm\", void 0);\n _define_property(this, \"useSearchV2\", void 0);\n _define_property(this, \"ReviewsMyCommentsFilter\", void 0);\n _define_property(this, \"sortByRecentlyUpdatedEnabled\", void 0);\n _define_property(this, \"sortByRatingEnabled\", void 0);\n _define_property(this, \"allNewSortsEnabled\", void 0);\n _define_property(this, \"I18nextEnabled\", void 0);\n _define_property(this, \"cloudMarketplaceModeOn\", void 0);\n _define_property(this, \"recommendations\", void 0);\n _define_property(this, \"openInNewWindowButton\", void 0);\n _define_property(this, \"logToConsole\", void 0);\n _define_property(this, \"expredirect\", void 0);\n _define_property(this, \"partnersTestMode\", void 0);\n _define_property(this, \"cloudMarketplaceModeFF\", [\n 'newHeader'\n ]);\n _define_property(this, \"activeCloudMarketplaceFeatures\", ()=>{\n if (this.cloudMarketplaceModeOn) {\n this.cloudMarketplaceModeFF.forEach((ff)=>{\n this[`${ff}`] = true;\n });\n }\n });\n // i.e. this.myNewFeatureFlag = 'false';\n this.AppReviews = 'false';\n this.ProfileExp = 'false';\n this.AltAuth = 'false';\n this.SaasLinkingEnabled = 'false';\n this.RedesignEnabled = 'false';\n this.ShowPopularity = 'false';\n this.UseSecondarySearch = 'false';\n this.privateOffers = 'false';\n this.purchaseBlends = 'false';\n this.newCustomerFlow = 'false';\n this.PartnersEnabled = 'false';\n this.forceCompletePurchase = 'false';\n this.allowAdminUser = 'false';\n this.showConsent = 'false';\n this.ensureprewarm = 'false';\n this.useSearchV2 = 'false';\n this.ReviewsMyCommentsFilter = 'true';\n this.sortByRecentlyUpdatedEnabled = 'false';\n this.sortByRatingEnabled = 'false';\n this.allNewSortsEnabled = 'false';\n this.I18nextEnabled = 'false';\n this.cloudMarketplaceModeOn = false;\n this.recommendations = true;\n this.openInNewWindowButton = false;\n this.logToConsole = false;\n this.expredirect = false;\n this.partnersTestMode = false;\n }\n}\nconst initialRecommendedSizesState = {\n loading: false,\n entityId: '',\n planId: '',\n recommendedSizes: []\n};\nexport const initialUserFavouriteState = {\n fetchDataStatus: Constants.UserFavourite.FetchDataStatus.Invalid,\n apps: [],\n services: []\n};\nexport const initialDynamicCampaignState = {\n html: ''\n};\nexport const initialSearchState = {\n searchText: '',\n searchSortingOption: Constants.SearchSortingOption.BestMatch,\n appSearchResults: [],\n servicesSearchResults: [],\n filteredAppSearchResults: [],\n filteredServicesSearchResults: [],\n filteredCloudsIndustrySearchResults: [],\n appsCount: 0,\n servicesCount: 0,\n cloudsIndustryCount: 0,\n searchIdCurrentlyOngoing: 0,\n partnerSearchResults: [],\n requestId: Constants.ReservedCorrelationIds.EmptyId\n};\nexport const initialModalState = {\n appId: '',\n parnerId: '',\n modalId: 0,\n isSignedIn: false,\n showModal: false,\n payload: null,\n entityType: Constants.EntityType.App,\n isOpenedFromPDP: false\n};\nexport const initialEntityDataState = {\n idMap: {},\n dataList: [],\n dataMap: {},\n dataMapLoaded: false,\n entityIdFailed: '',\n entityIdLoading: '',\n activeFilters: [],\n count: 0,\n curatedData: {},\n dataLoaded: {},\n curatedDataLoaded: {},\n subsetData: [],\n subsetSearchQuery: '',\n tileDataRequestId: '',\n relatedAppsItems: {\n entityId: '',\n items: {\n suggestedItems: [],\n saasLinkingItems: [],\n linkedAddIns: []\n }\n },\n appReviewsData: initialAppReviewsDataState,\n linkedInProductGroup: null\n};\nexport const initialAppDataState = {\n idMap: {},\n dataList: [],\n recommendedApps: {\n whatsNewApps: [],\n trendingApps: [],\n microsoft365WhatsNewApps: [],\n microsoft365TrendingApps: []\n },\n dataMap: {},\n dataMapLoaded: false,\n entityIdFailed: '',\n entityIdLoading: '',\n activeFilters: [],\n count: 0,\n curatedData: {},\n dataLoaded: {},\n pricingPayload: null,\n partnerAppDataLoaded: false,\n curatedDataLoaded: {},\n subsetData: [],\n subsetSearchQuery: '',\n tileDataRequestId: '',\n relatedAppsItems: {\n entityId: '',\n items: {\n suggestedItems: [],\n saasLinkingItems: [],\n linkedAddIns: []\n }\n },\n appReviewsData: initialAppReviewsDataState,\n recommendedSizesState: initialRecommendedSizesState,\n linkedInProductGroup: null\n};\nexport const initialCloudsIndustryDataState = {\n idMap: {},\n dataList: [],\n dataMap: {},\n dataMapLoaded: false,\n entityIdFailed: '',\n entityIdLoading: '',\n activeFilters: [],\n count: 0,\n curatedData: {},\n dataLoaded: {},\n pricingPayload: null,\n curatedDataLoaded: {},\n subsetData: [],\n subsetSearchQuery: '',\n tileDataRequestId: '',\n relatedAppsItems: {\n entityId: '',\n items: {\n suggestedItems: [],\n saasLinkingItems: [],\n linkedAddIns: []\n }\n },\n appReviewsData: initialAppReviewsDataState,\n linkedInProductGroup: null\n};\nexport const initialUserDataState = {\n assignmentContext: '',\n id: '',\n group: [\n ''\n ],\n signedIn: false,\n idToken: '',\n idTokenPayload: '',\n accessToken: {},\n refreshToken: '',\n firstName: '',\n lastName: '',\n uniqueName: '',\n displayName: '',\n oid: '',\n tid: '',\n puid: '',\n email: '',\n graphApi: process.env.graphApi,\n alternateEmail: '',\n isMSAUser: false,\n userSegment: UserSegment.unauthenticated,\n hasReview: false,\n fieldHubUserType: Constants.FieldHubUserType.None,\n isLoadingUserProfile: false,\n loading: true,\n givenName: '',\n familyName: '',\n profile: {\n firstName: '',\n lastName: '',\n email: '',\n phone: '',\n country: '',\n company: '',\n title: '',\n updateRequired: null,\n isLatestProfile: false,\n uiRole: null,\n managedLicenses: []\n },\n tenantsDetails: {\n details: {\n countryCode: null,\n defaultDomain: null,\n displayName: null,\n domains: null,\n id: null,\n tenantCategory: null,\n tenantId: null,\n tenantType: null,\n azureSubscriptions: {}\n },\n status: {\n hasError: false,\n isLoading: false\n }\n },\n purchases: {},\n privateOffers: {\n dataList: [],\n loading: true\n },\n roleDefinitions: [],\n accounts: {\n isEAAccount: false,\n isLoading: false,\n accounts: null,\n hasError: false\n },\n isMaccTenant: false\n};\nexport const initialExperimentState = {\n abTestingVersion_AMP: Constants.VaritionKey.Default,\n abTestingVersion_newFilterAMP: Constants.VaritionKey.Default\n};\nexport const initialConfigState = {\n initLoading: true,\n isEmbedded: false,\n experiment: initialExperimentState,\n embedHost: null,\n locStrings: '',\n locale: 'en-us',\n user: '',\n flightCodes: null,\n partnersIframeUrl: '',\n partnersApiHost: '',\n partnersIframeUrlTest: '',\n correlationId: '',\n currentView: 'home',\n landingView: '',\n currentGalleryViewIsCurated: false,\n breadcrumbUrl: null,\n appViewTelemetryLoggedCount: 0,\n nationalCloud: '',\n billingCountryCode: 'us',\n pricingDataLoaded: false,\n featureFlags: new IFeatureFlags(),\n marketplaceApiHost: '',\n saasRPHost: '',\n MPRPHost: '',\n armApiHost: '',\n isMobile: false,\n isAppSource: process.env ? process.env.applicationTarget === Constants.appSourceApplicationTargetName : false,\n pidlEnv: '',\n query: {},\n requestFilteredLoading: false,\n requestFilteredEntityType: Constants.TileDataEntityType.All,\n requestFilteredQuery: {},\n responseFilteredQuery: {},\n cookiesConsent: {\n isManageModalOpen: false,\n WCPConsent: {\n Advertising: false,\n Analytics: false,\n Required: true,\n SocialMedia: false\n },\n isConsentRequired: false\n },\n siteEnvironment: '',\n newNpsEnabled: false,\n pcaInstanceInitialized: false,\n npsLogicVerified: false,\n reviewsAPIVersion: enrichReviewCommentsApiVersion,\n showContextPanel: false,\n commerceApiHost: '',\n storefrontName: null,\n marketplaceLeadsHost: '',\n marketplaceLeadsAudienceId: '',\n agreementAppId: ''\n};\nexport const initialServiceDataState = {\n idMap: {},\n dataList: [],\n recommendedServices: {\n whatsNewService: [],\n trendingService: []\n },\n countriesList: {},\n dataMap: {},\n dataMapLoaded: false,\n entityIdFailed: '',\n entityIdLoading: '',\n activeFilters: [],\n count: 0,\n curatedData: {},\n dataLoaded: {},\n curatedDataLoaded: {},\n subsetData: [],\n subsetSearchQuery: '',\n tileDataRequestId: '',\n entityType: Constants.EntityType.Service,\n selectedCountry: Constants.usCountryCode.toUpperCase(),\n selectedRegion: Constants.allStatesCode.toUpperCase(),\n relatedAppsItems: {\n entityId: '',\n items: {\n suggestedItems: [],\n saasLinkingItems: [],\n linkedAddIns: []\n }\n },\n appReviewsData: initialAppReviewsDataState,\n linkedInProductGroup: null\n};\nexport const initialCheckoutState = {\n items: [],\n customers: null,\n activeCustomer: null,\n publisherToken: null,\n error: false,\n currentStep: 0,\n purchaseAttempt: 0,\n billingAddress: null,\n checkoutId: ''\n};\nexport const initialPartnersState = {\n filterLocation: null,\n contactDetails: null\n};\nexport const initialState = {\n search: initialSearchState,\n modal: initialModalState,\n apps: initialAppDataState,\n cloudsIndustry: initialCloudsIndustryDataState,\n users: initialUserDataState,\n config: initialConfigState,\n services: initialServiceDataState,\n dynamicCampaign: initialDynamicCampaignState,\n userFavourite: initialUserFavouriteState,\n checkout: initialCheckoutState,\n partners: initialPartnersState\n};\n// This function does a deep copy a 'DataMap' object\n// It is sometimes used (in the server code) after calling 'performFilter' to\n// ignore objects that have a 'count' property set to '0'. This removes 'filters'\n// from the filter pane that aren't applicable to a specific group of data\nexport function deepCopyDataMap(DataMap) {\n const newDataMap = {};\n if (DataMap == null || typeof DataMap !== 'object') {\n return DataMap;\n } else if (DataMap.count === 0) {\n return null;\n }\n for(const k in DataMap){\n const prop = DataMap[`${k}`];\n const copy = deepCopyDataMap(prop);\n if (copy) {\n newDataMap[`${k}`] = copy;\n }\n }\n return newDataMap;\n}\nexport function copyState(oldState) {\n const newState = {};\n for(const k in oldState){\n newState[`${k}`] = oldState[`${k}`];\n }\n return newState;\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { mergeStyleSets } from '@fluentui/react';\nimport classNames from 'classnames';\nconst contentStyles = mergeStyleSets({\n hiddenClass: {\n display: 'none'\n }\n});\nexport const HiddenComponentWrapper = ({ className, hide, children })=>{\n const containerClass = classNames({\n [className]: (className === null || className === void 0 ? void 0 : className.length) > 0,\n [contentStyles.hiddenClass]: hide\n });\n return /*#__PURE__*/ _jsx(\"div\", {\n className: containerClass,\n children: children\n });\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { createElement as _createElement } from \"react\";\nimport React from 'react';\nimport Ribbon from '@shared/components/ribbon';\nimport NewBadge from '@shared/images/NewBadge.svg';\nconst maxRibbonItems = 5;\nexport const RecommendationsRibbon = ({ recommendedItems = [], title, ribbonKey, selectedCountry, selectedLocale, tileType: TileType })=>{\n return /*#__PURE__*/ _jsx(_Fragment, {\n children: recommendedItems.length >= maxRibbonItems && /*#__PURE__*/ _jsx(Ribbon, {\n title: title,\n imgSource: NewBadge,\n children: recommendedItems.map((item, index)=>{\n return /*#__PURE__*/ _createElement(TileType, _object_spread_props(_object_spread({}, item), {\n item: item,\n key: item.entityId,\n customCSSClass: 'tile' + index,\n tileIndex: index,\n totalTiles: recommendedItems.length,\n selectedLocale: selectedLocale,\n countryContext: selectedCountry,\n ribbonKey: `Recommended_${ribbonKey}`\n }));\n })\n })\n });\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from '../../shared/components/spzaComponent';\nimport { Constants } from '../../shared/utils/constants';\nimport { InternalLink } from '../../shared/components/internalLink';\nimport * as DetailUtils from '../../shared/utils/detailUtils';\nimport { urlPush } from '../../shared/routerHistory';\nexport var UsefulInfoMetadataCellItemType = /*#__PURE__*/ function(UsefulInfoMetadataCellItemType) {\n UsefulInfoMetadataCellItemType[UsefulInfoMetadataCellItemType[\"Filter\"] = 0] = \"Filter\";\n UsefulInfoMetadataCellItemType[UsefulInfoMetadataCellItemType[\"Label\"] = 1] = \"Label\";\n UsefulInfoMetadataCellItemType[UsefulInfoMetadataCellItemType[\"Link\"] = 2] = \"Link\";\n UsefulInfoMetadataCellItemType[UsefulInfoMetadataCellItemType[\"Modal\"] = 3] = \"Modal\";\n UsefulInfoMetadataCellItemType[UsefulInfoMetadataCellItemType[\"InternalLink\"] = 4] = \"InternalLink\";\n return UsefulInfoMetadataCellItemType;\n}({});\nconst isUsefulInfoMetadataCellItemFilter = (object)=>{\n return object.type === 0;\n};\nconst isUsefulInfoMetadataCellItemInternalLink = (object)=>{\n return object.type === 4;\n};\nconst isUsefulInfoMetadataCellItemLink = (object)=>{\n return object.type === 2;\n};\nconst isUsefulInfoMetadataCellItemModal = (object)=>{\n return object.type === 3;\n};\nexport class UsefulInfo extends SpzaComponent {\n getLinkElement(item) {\n if (item.information) {\n return /*#__PURE__*/ _jsx(\"a\", _object_spread_props(_object_spread({\n className: \"c-hyperlink\",\n rel: \"noreferrer\",\n target: \"_blank\",\n href: item.information,\n title: this.context.loc(item.text),\n onClick: ()=>{\n DetailUtils.generateLinkPayloadAndLogTelemetry(this.props.ownerType, item.entityId, item.id, item.information, 'Default');\n }\n }, item.props), {\n children: this.context.loc(item.text)\n }));\n } else {\n return null;\n }\n }\n getInternalLinkElement(item) {\n return /*#__PURE__*/ _jsx(InternalLink, _object_spread_props(_object_spread({\n className: \"c-hyperlink\",\n href: item.information,\n onClick: item.onClick\n }, item.props), {\n children: this.context.loc(item.text)\n }));\n }\n getFilterElement(item) {\n const filter = item.filter;\n if (item.nationalCloud) {\n return /*#__PURE__*/ _jsx(\"div\", {\n children: this.context.loc(filter.locKey, filter.title)\n }, filter.title);\n } else {\n return /*#__PURE__*/ _jsxs(InternalLink, _object_spread_props(_object_spread({\n className: \"c-hyperlink detailsCategories\",\n href: filter.newPath,\n title: this.context.loc(filter.locKey, filter.title),\n onClick: (e)=>{\n DetailUtils.generateLinkPayloadAndLogTelemetry(DetailUtils.OwnerType.App, item.entityId, filter.filterItem, filter.newPath, 'Default');\n // The embedded app needs to open these links in a new window\n if (item.isEmbedded) {\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n window.open(window.location.origin + filter.newPath, '_blank');\n } else {\n urlPush(filter.newPath);\n window.scrollTo(0, 0);\n }\n // The preventDefault prevents the route from transitioning and thus refreshing the page.\n e.preventDefault();\n },\n accEnabled: true\n }, item.props), {\n children: [\n /*#__PURE__*/ _jsx(\"span\", {\n children: this.context.loc(filter.locKey, filter.title)\n }),\n filter.filterItem === Constants.filterMaps.categories ? /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"applicationCategory\",\n content: this.context.loc(filter.locKey, filter.title)\n }) : null\n ]\n }), filter.title);\n }\n }\n renderImpl() {\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"usefulInfo \",\n children: this.props.metadata.map((col)=>{\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"usefulInfoColumn\",\n children: [\n /*#__PURE__*/ _jsx(\"h3\", {\n className: \"columnTitle\",\n children: this.context.loc(col.title, col.titleFallback || col.title)\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"columnCells\",\n children: col.cells.map((cell)=>{\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"cell\",\n itemProp: cell.id,\n children: [\n cell.title && /*#__PURE__*/ _jsx(\"header\", {\n \"aria-label\": cell.title,\n children: this.context.loc(cell.title, cell.titleFallback || cell.title)\n }),\n cell.cellItems.map((item)=>{\n if (isUsefulInfoMetadataCellItemFilter(item)) {\n return this.getFilterElement(item);\n } else if (isUsefulInfoMetadataCellItemLink(item)) {\n return this.getLinkElement(item);\n } else if (isUsefulInfoMetadataCellItemModal(item)) {\n return item.getContent();\n } else if (isUsefulInfoMetadataCellItemInternalLink(item)) {\n return this.getInternalLinkElement(item);\n } else {\n return /*#__PURE__*/ _jsx(\"span\", _object_spread_props(_object_spread({\n className: \"cellLabel\"\n }, item.props), {\n children: this.context.loc(item.text)\n }), item.text);\n }\n })\n ]\n }, cell.id);\n }).filter(Boolean)\n })\n ]\n }, col.id);\n })\n });\n }\n constructor(...args){\n super(...args), _define_property(this, \"context\", void 0);\n }\n}\nUsefulInfo.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n renderErrorModal: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React, { useCallback } from 'react';\nimport * as PropTypes from 'prop-types';\nimport { Text, Icon, Label, Stack, ChoiceGroup } from '@fluentui/react';\nimport { Constants } from '@shared/utils/constants';\nimport { IAvailabilityActions } from '@shared/Models';\nimport { convertTermToString } from '@shared/utils/checkoutUtils';\nimport Tooltip from '@shared/components/tooltip';\nimport { addFuturePricing } from '@shared/utils/pricing';\nconst pbTelemetry = Constants.Telemetry.PurchaseBlendsTelemetry;\nexport const GenerateLabelAndTooltip = ({ context })=>{\n return /*#__PURE__*/ _jsx(Label, {\n className: \"mt-20\",\n children: /*#__PURE__*/ _jsx(Stack, {\n horizontal: true,\n verticalAlign: \"center\",\n wrap: false,\n children: /*#__PURE__*/ _jsxs(Text, {\n className: \"ms-fontWeight-semibold \",\n children: [\n `${context.loc('Checkout_PriceAndPaymentOptions', 'Price/payment options')} `,\n /*#__PURE__*/ _jsx(Tooltip, {\n tooltipHostProps: {\n content: context.loc('Checkout_PriceAndBilling_Tooltip_PaymentOptions', \"The plan's price and payment frequency\"),\n calloutProps: {\n gapSpace: 0\n }\n },\n children: /*#__PURE__*/ _jsx(Icon, {\n iconName: \"Info\",\n ariaLabel: context.loc('Checkout_PriceAndBilling_Tooltip_PaymentOptions', \"The plan's price and payment frequency\")\n })\n }),\n /*#__PURE__*/ _jsx(Text, {\n className: \"requiredColor\",\n children: ` *`\n })\n ]\n })\n })\n });\n};\nexport const getBillingFrequencyOptions = ({ billingCountryCode, items, futurePriceMonthly, futurePriceYearly, locale }, context)=>{\n const { product, id, termDuration, hasFreeTrial } = items[0];\n const plan = product.getPlanByPlanId(id);\n const availability = plan.availabilities.find((availability)=>{\n const { actions } = availability;\n return actions.includes(IAvailabilityActions.Renew) && actions.includes(IAvailabilityActions.Browse);\n });\n const termsByBillingTermDuration = availability.terms.filter((term)=>term.termUnits === termDuration);\n const billingFrequencyOptions = termsByBillingTermDuration.map((term)=>{\n const termEntity = product.getTermByTermId({\n planId: id,\n termId: term.termId\n });\n if (!termEntity) {\n return null;\n }\n return {\n // If there's no free trial termId, assign the renew termId\n key: termEntity.freeTrialTermId || termEntity.renewTermId,\n // This value isn't displayed, but rather used to pass in the relevant contract term in the case there's only one option\n value: termEntity.renewTermUnits,\n text: convertTermToString({\n context,\n term: termEntity,\n countryCode: billingCountryCode,\n isQuantifiable: items[0].isQuantifiable,\n hasFreeTrial,\n locale\n }),\n onRenderLabel: (option, defaultRender)=>/*#__PURE__*/ _jsxs(_Fragment, {\n children: [\n defaultRender(option),\n addFuturePricing(term.renewTermUnits, futurePriceMonthly, futurePriceYearly)\n ]\n })\n };\n }).filter(Boolean);\n return billingFrequencyOptions;\n};\nexport const getDefaultOrSelectedBillingFrequency = ({ items }, options)=>{\n var _items_, _items_1;\n const availableTermFrequencies = options === null || options === void 0 ? void 0 : options.map((option)=>option.key);\n const defaultBillingFrequency = (availableTermFrequencies === null || availableTermFrequencies === void 0 ? void 0 : availableTermFrequencies.includes((_items_ = items[0]) === null || _items_ === void 0 ? void 0 : _items_.termId)) ? (_items_1 = items[0]) === null || _items_1 === void 0 ? void 0 : _items_1.termId : availableTermFrequencies[0];\n return defaultBillingFrequency || '';\n};\nexport const BillingFrequencyChoiceGroup = (props, context)=>{\n const { setSelectedTerm, futurePriceMonthly, futurePriceYearly, billingCountryCode, items, locale } = props;\n const { termId, id } = items[0];\n const options = useCallback(()=>getBillingFrequencyOptions({\n billingCountryCode,\n items,\n futurePriceMonthly,\n futurePriceYearly,\n locale\n }, context), [\n billingCountryCode,\n items,\n futurePriceMonthly,\n futurePriceYearly,\n context,\n locale\n ]);\n const { text, value } = options()[0];\n return /*#__PURE__*/ _jsxs(_Fragment, {\n children: [\n /*#__PURE__*/ _jsx(GenerateLabelAndTooltip, {\n context: context\n }),\n /*#__PURE__*/ _jsx(Stack, {\n horizontal: true,\n tokens: {\n childrenGap: 10\n },\n children: /*#__PURE__*/ _jsx(Stack.Item, {\n children: options().length > 1 ? /*#__PURE__*/ _jsx(ChoiceGroup, {\n \"data-bi-id\": pbTelemetry.PickBillingFrequency,\n \"data-bi-name\": pbTelemetry.BillingFrequencyComponent,\n options: options(),\n onChange: (_, option)=>setSelectedTerm({\n id,\n termId: option.key\n }),\n selectedKey: termId,\n defaultSelectedKey: getDefaultOrSelectedBillingFrequency(props, options()),\n ariaLabelledBy: 'billTermSelection'\n }) : /*#__PURE__*/ _jsxs(_Fragment, {\n children: [\n /*#__PURE__*/ _jsx(Text, {\n children: text\n }),\n addFuturePricing(value, futurePriceMonthly, futurePriceYearly)\n ]\n })\n })\n })\n ]\n });\n};\nBillingFrequencyChoiceGroup.contextTypes = {\n locParams: PropTypes.func,\n loc: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React, { useMemo } from 'react';\nimport * as PropTypes from 'prop-types';\nimport { Constants } from '@shared/utils/constants';\nimport { Text, Icon, Label, Stack, ChoiceGroup } from '@fluentui/react';\nimport Tooltip from '@shared/components/tooltip';\nimport { TermsStrings } from '@shared/Models';\nimport { getBillingTermTranslated } from '@shared/utils/pricing';\nconst pbTelemetry = Constants.Telemetry.PurchaseBlendsTelemetry;\nexport const BillingTermChoiceGroup = ({ setSelectedTerm, setBillingTerm, items }, context)=>{\n const { id: planId, product, hasFreeTrial, termDuration } = items[0];\n const handleBillingTermChanges = ({ setSelectedTerm, setBillingTerm, planId, product, hasFreeTrial, option })=>{\n const firstTerm = product.getTermByPlanAndBillingTermDuration({\n planId,\n billingTermDuration: option.key\n });\n setBillingTerm({\n id: planId,\n termDuration: option.key\n });\n setSelectedTerm({\n id: planId,\n termId: hasFreeTrial ? firstTerm.freeTrialTermId : firstTerm.termId\n });\n };\n const generateBillingOption = (term, context)=>{\n return {\n key: term,\n text: `${getBillingTermTranslated({\n context,\n term,\n isSubscription: true\n })}`\n };\n };\n const getTermMapping = (context)=>{\n return {\n [TermsStrings.MonthString.toLowerCase()]: generateBillingOption(TermsStrings.Term1MString, context),\n [TermsStrings.Term1MString.toLowerCase()]: generateBillingOption(TermsStrings.Term1MString, context),\n [TermsStrings.YearString.toLowerCase()]: generateBillingOption(TermsStrings.Term1YString, context),\n [TermsStrings.Term1YString.toLowerCase()]: generateBillingOption(TermsStrings.Term1YString, context),\n [TermsStrings.Term2YString.toLowerCase()]: generateBillingOption(TermsStrings.Term2YString, context),\n [TermsStrings.Term3YString.toLowerCase()]: generateBillingOption(TermsStrings.Term3YString, context)\n };\n };\n const getBillingOptions = (items, context)=>{\n // Since sort happens in place, cloning list instead of messing up redux.\n const listOfTerms = [\n ...items[0].product.getTermDurationsByPlanId(items[0].id)\n ];\n return listOfTerms.sort().map((term)=>{\n const billingOptionsMap = getTermMapping(context);\n return billingOptionsMap[term.toLowerCase()];\n });\n };\n const options = useMemo(()=>getBillingOptions(items, context), [\n items,\n context\n ]);\n return /*#__PURE__*/ _jsxs(_Fragment, {\n children: [\n /*#__PURE__*/ _jsx(Label, {\n children: /*#__PURE__*/ _jsx(Stack, {\n horizontal: true,\n verticalAlign: \"center\",\n wrap: false,\n children: /*#__PURE__*/ _jsxs(Text, {\n className: \"ms-fontWeight-semibold\",\n children: [\n `${context.loc('Checkout_PriceAndBilling_BillingTerm', 'Billing term')} `,\n /*#__PURE__*/ _jsx(Tooltip, {\n tooltipHostProps: {\n content: context.loc('Checkout_PriceAndBilling_Tooltip_BillingTerm', \"This is the plan's subscription period.\"),\n calloutProps: {\n gapSpace: 0\n }\n },\n children: /*#__PURE__*/ _jsx(Icon, {\n iconName: \"Info\",\n ariaLabel: context.loc('Checkout_PriceAndBilling_Tooltip_BillingTerm', \"This is the plan's subscription period.\")\n })\n }),\n /*#__PURE__*/ _jsx(Text, {\n className: \"requiredColor\",\n children: ` *`\n })\n ]\n })\n })\n }),\n /*#__PURE__*/ _jsx(Stack, {\n horizontal: true,\n tokens: {\n childrenGap: 10\n },\n children: /*#__PURE__*/ _jsx(Stack.Item, {\n children: (options === null || options === void 0 ? void 0 : options.length) > 1 ? /*#__PURE__*/ _jsx(ChoiceGroup, {\n \"data-bi-id\": pbTelemetry.PickBillingTerm,\n \"data-bi-name\": pbTelemetry.BillingTermComponent,\n options: options,\n onChange: (_, option)=>handleBillingTermChanges({\n product,\n planId,\n setBillingTerm,\n setSelectedTerm,\n hasFreeTrial,\n option\n }),\n defaultSelectedKey: termDuration || ''\n }) : /*#__PURE__*/ _jsx(Text, {\n children: options === null || options === void 0 ? void 0 : options[0].text\n })\n })\n })\n ]\n });\n};\nBillingTermChoiceGroup.contextTypes = {\n locParams: PropTypes.func,\n loc: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { useRef, useState } from 'react';\nimport FuturePriceWarning from '@shared/components/futurePriceWarning';\nimport { SaasPricingTableBase } from '@shared/components';\nimport { connect } from 'react-redux';\nimport { mergeStyleSets } from '@fluentui/react';\nimport classNames from 'classnames';\nconst classes = mergeStyleSets({\n limitHeight: {\n height: '70vh'\n }\n});\nexport const SaasPricingTableComponent = ({ app, billingCountry, onGetInNowClicked, shouldBlockPrices, config: { locale } })=>{\n var _globalThis_document;\n const [isHorizontalScrollbarPresent, setIsHorizontalScrollbarPresent] = useState(false);\n const containerRef = useRef();\n const { futurePricesInformation: futurePrices } = app;\n // In SSR context there's no body\n const bodyElement = (_globalThis_document = globalThis.document) === null || _globalThis_document === void 0 ? void 0 : _globalThis_document.body;\n const isDocumentScrollableVertically = (bodyElement === null || bodyElement === void 0 ? void 0 : bodyElement.scrollHeight) > (bodyElement === null || bodyElement === void 0 ? void 0 : bodyElement.clientHeight);\n return /*#__PURE__*/ _jsxs(\"div\", {\n ref: containerRef,\n className: classNames({\n [classes.limitHeight]: isDocumentScrollableVertically && isHorizontalScrollbarPresent\n }),\n children: [\n /*#__PURE__*/ _jsx(FuturePriceWarning, {\n futurePrices: futurePrices\n }),\n /*#__PURE__*/ _jsx(SaasPricingTableBase, {\n app: app,\n billingCountry: billingCountry,\n locale: locale,\n onGetInNowClicked: onGetInNowClicked,\n shouldBlockPrices: shouldBlockPrices\n })\n ]\n });\n};\nconst mapStateToProps = ({ config })=>({\n config\n });\nexport const SaasPricingTable = connect(mapStateToProps)(SaasPricingTableComponent);\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { useEffect } from 'react';\nimport { mergeStyleSets, Stack, Text, FontSizes, ProgressIndicator, ScreenWidthMinXLarge } from '@fluentui/react';\nimport OptimizingImage from '@shared/images/optimizingImage.svg';\nimport { TelemetryImage } from '@shared/components/telemetryImage';\nconst OrderLoadingStyles = {\n itemDescription: {\n textAlign: 'center'\n }\n};\nconst contentStyles = mergeStyleSets({\n itemName: {\n fontSize: FontSizes.size28,\n fontWeight: 900,\n marginTop: '20px',\n textAlign: 'center'\n },\n progressContainer: {\n width: '640px',\n height: '680px',\n zIndex: '101',\n backgroundColor: '#FFFFFF',\n position: 'absolute',\n margin: 'auto',\n top: '0',\n right: '0',\n bottom: '0',\n left: '0',\n padding: '120px 80px',\n [`@media (max-width: ${ScreenWidthMinXLarge}px)`]: {\n width: '320px',\n height: '440px',\n padding: '60px 40px'\n }\n }\n});\nexport const OrderLoading = ({ context })=>{\n const progressMessages = [\n 'Loader_Starting',\n 'Loader_Verifiying',\n 'Loader_Processing'\n ];\n const intervalDelay = 2500;\n const intervalIncrement = 0.1;\n const [progressMessage, setProgressMessage] = React.useState(progressMessages[0]);\n const [percentComplete, setPercentComplete] = React.useState(0);\n useEffect(()=>{\n if (percentComplete <= 0.9) {\n const id = setInterval(()=>{\n setPercentComplete((intervalIncrement + percentComplete) % 1);\n switch(Math.round(percentComplete * 10 / 2)){\n case 0:\n case 1:\n setProgressMessage(progressMessages[0]);\n break;\n case 2:\n setProgressMessage(progressMessages[1]);\n break;\n case 3:\n setProgressMessage(progressMessages[2]);\n break;\n }\n }, intervalDelay);\n return ()=>{\n clearInterval(id);\n };\n }\n }, [\n percentComplete,\n progressMessages\n ]);\n return /*#__PURE__*/ _jsxs(Stack, {\n className: contentStyles.progressContainer,\n tokens: {\n childrenGap: 20\n },\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n align: \"center\",\n children: /*#__PURE__*/ _jsx(TelemetryImage, {\n alt: \"placeOrderImage\",\n src: OptimizingImage\n })\n }),\n /*#__PURE__*/ _jsx(Text, {\n title: context.loc(progressMessage),\n className: contentStyles.itemName,\n children: context.loc(progressMessage)\n }),\n /*#__PURE__*/ _jsx(ProgressIndicator, {\n description: context.loc('Loader_Description'),\n percentComplete: percentComplete,\n barHeight: 2,\n styles: OrderLoadingStyles\n })\n ]\n });\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { useEffect } from 'react';\nimport { useSelector } from 'react-redux';\nimport { FontSizes, FontWeights, mergeStyleSets, PrimaryButton, ScreenWidthMinXLarge, Stack, Text } from '@fluentui/react';\nimport { Constants } from '@shared/utils/constants';\nimport { logger } from '@src/logger';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nconst contentStyles = mergeStyleSets({\n title: {\n fontSize: FontSizes.size20,\n fontWeight: FontWeights.semibold\n },\n container: {\n width: '560px',\n height: '216px',\n zIndex: '101',\n backgroundColor: '#FFFFFF',\n position: 'absolute',\n margin: 'auto',\n top: '0',\n right: '0',\n bottom: '0',\n left: '0',\n padding: '24px',\n [`@media (max-width: ${ScreenWidthMinXLarge}px)`]: {\n width: '90%'\n }\n }\n});\nconst logClickEvent = ({ userType, checkoutId })=>{\n const payload = {\n page: location.pathname,\n action: Constants.Telemetry.Action.Checkout,\n actionModifier: Constants.Telemetry.ActionModifier.RedirectButton,\n details: JSON.stringify({\n userType,\n checkoutId\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n appName: payload.appName\n });\n};\nexport const RedirectModal = ({ onClick, context, userType })=>{\n const checkoutId = useSelector(({ checkout })=>checkout.checkoutId);\n useEffect(()=>{\n const payload = {\n page: location.pathname,\n action: Constants.Telemetry.Action.Checkout,\n actionModifier: Constants.Telemetry.ActionModifier.RedirectModal,\n details: JSON.stringify({\n userType,\n checkoutId\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n page: payload.page\n });\n }, []);\n return /*#__PURE__*/ _jsxs(Stack, {\n className: contentStyles.container,\n verticalAlign: \"space-between\",\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n align: \"start\",\n children: /*#__PURE__*/ _jsx(Text, {\n className: contentStyles.title,\n children: context.loc('Checkout_Error_Title')\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n align: \"start\",\n children: /*#__PURE__*/ _jsx(Text, {\n children: context.loc('Checkout_Error_Description')\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n align: \"end\",\n children: /*#__PURE__*/ _jsx(PrimaryButton, {\n \"data-bi-id\": Constants.JsllCheckout.RedirectButton,\n onClick: ()=>{\n onClick();\n logClickEvent(userType);\n },\n children: context.loc('Checkout_Error_Button')\n })\n })\n ]\n });\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { useEffect } from 'react';\n// eslint-disable-next-line import/named\nimport { mergeStyleSets, Stack, Text, FontSizes, ScreenWidthMinXLarge, Spinner } from '@fluentui/react';\nconst contentStyles = mergeStyleSets({\n itemName: {\n fontSize: FontSizes.size28,\n fontWeight: 600,\n marginTop: '20px',\n textAlign: 'center'\n },\n progressContainer: {\n width: '560px',\n height: '280px',\n zIndex: '101',\n backgroundColor: '#FFFFFF',\n position: 'absolute',\n margin: 'auto',\n top: '0',\n right: '0',\n bottom: '0',\n left: '0',\n padding: '120px 80px',\n [`@media (max-width: ${ScreenWidthMinXLarge}px)`]: {\n width: '90%',\n height: '280px'\n }\n }\n});\nconst spinnerStyles = {\n circle: {\n width: '56px',\n height: '56px'\n }\n};\nexport const BusyLoader = ({ context })=>{\n const progressMessages = [\n 'Loading_Selection',\n 'Working',\n 'Updating'\n ];\n const intervalDelay = 2500;\n const intervalIncrement = 0.1;\n const [progressMessage, setProgressMessage] = React.useState(progressMessages[0]);\n const [percentComplete, setPercentComplete] = React.useState(0);\n useEffect(()=>{\n if (percentComplete <= 0.9) {\n const id = setInterval(()=>{\n setPercentComplete((intervalIncrement + percentComplete) % 1);\n switch(Math.round(percentComplete * 10 / 2)){\n case 0:\n case 1:\n setProgressMessage(progressMessages[0]);\n break;\n case 2:\n setProgressMessage(progressMessages[1]);\n break;\n case 3:\n setProgressMessage(progressMessages[2]);\n break;\n }\n }, intervalDelay);\n return ()=>{\n clearInterval(id);\n };\n }\n }, [\n percentComplete,\n progressMessages\n ]);\n return /*#__PURE__*/ _jsxs(Stack, {\n className: contentStyles.progressContainer,\n tokens: {\n childrenGap: 20\n },\n verticalAlign: \"center\",\n children: [\n /*#__PURE__*/ _jsx(Spinner, {\n styles: spinnerStyles\n }),\n /*#__PURE__*/ _jsx(Text, {\n title: context.loc(progressMessage),\n className: contentStyles.itemName,\n children: context.loc(progressMessage)\n })\n ]\n });\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { mergeStyleSets, MessageBar, MessageBarType } from '@fluentui/react';\nimport { Constants } from '@shared/utils/constants';\nconst contentStyles = mergeStyleSets({\n root: {\n marginBottom: '10px'\n }\n});\nexport const MSuserErrorBanner = ({ context, tenantId })=>{\n return tenantId === Constants.MSTenantId && /*#__PURE__*/ _jsx(\"div\", {\n className: contentStyles.root,\n children: /*#__PURE__*/ _jsx(MessageBar, {\n role: \"status\",\n messageBarType: MessageBarType.error,\n children: context.loc('MSuser_Banner', 'As a Microsoft Employee, you are not allowed to complete a purchase in AppSource')\n })\n });\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { useState } from 'react';\nimport * as PropTypes from 'prop-types';\nimport { Text, mergeStyleSets, Stack, Icon } from '@fluentui/react';\nimport classNames from 'classnames';\nimport { isNil } from 'lodash-es';\nimport { useSelector } from 'react-redux';\nimport { NeutralColors, SharedColors } from '@fluentui/theme';\nimport { storeFeedback } from 'services/feedback';\nimport { Constants } from '@shared/utils/constants';\nimport { logTelemetry } from '@shared/utils/telemetryUtils';\nconst contentStyles = mergeStyleSets({\n containerClass: {\n paddingTop: 8\n },\n feedbackButtons: {\n color: NeutralColors.gray160,\n '&:hover': {\n color: SharedColors.cyanBlue10\n }\n },\n feedbackButtonsSelected: {\n color: SharedColors.cyanBlue10,\n cursor: 'default'\n },\n defaultCursor: {\n cursor: 'default'\n },\n pointerCursor: {\n cursor: 'pointer'\n }\n});\nconst Negative = 'Negative';\nconst Positive = 'Positive';\nconst getAriaLabel = ({ isFeedbackNull, isFeedbackPositive, feedbackNoun, context })=>{\n const isPositiveFeedbackSelected = !isFeedbackNull && isFeedbackPositive;\n const isNegativeFeedbackSelected = !isFeedbackNull && !isFeedbackPositive;\n const selectionCondition = feedbackNoun === Negative ? isPositiveFeedbackSelected : isNegativeFeedbackSelected;\n const feedbackText = feedbackNoun === Positive ? Positive : Negative;\n return isFeedbackNull || selectionCondition ? context.loc(`Feedback_ShowingResultsFor_${feedbackText}Feedback`, `${feedbackText} feedback`) : context.loc(`Feedback_ShowingResultsFor_${feedbackText}FeedbackProvided`, `Provided ${feedbackText} feedback`);\n};\nexport const sendFeedback = ({ isPositive, requestId, showingResultsFor, didYouMean, previousSearchText })=>{\n const details = {\n positiveFeedBack: isPositive,\n requestId,\n showingResultsFor,\n didYouMean,\n searchTerm: previousSearchText\n };\n logTelemetry(Constants.Telemetry.Action.Feedback, Constants.Telemetry.ActionModifier.ShowingResultsForFeedback, JSON.stringify(details), true);\n storeFeedback({\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.ShowingResultsForFeedback,\n details: JSON.stringify(details)\n });\n};\nconst likeIconName = 'Like';\nconst solidLikeIconName = 'LikeSolid';\nconst dislikeIconName = 'Dislike';\nconst solidDislikeIconName = 'DislikeSolid';\nexport const ThumbsUpDown = ({ localizedQuestion = '' }, context)=>{\n const { containerClass, feedbackButtons, feedbackButtonsSelected, defaultCursor, pointerCursor } = contentStyles;\n const [isFeedbackPositive, setFeedback] = useState(null);\n const { requestId, showingResultsFor, didYouMean, previousSearchText } = useSelector(({ search: { requestId, showingResultsFor, didYouMean, previousSearchText } })=>({\n requestId,\n showingResultsFor,\n didYouMean,\n previousSearchText\n }));\n const isFeedbackNull = isNil(isFeedbackPositive);\n const likeAria = getAriaLabel({\n isFeedbackNull,\n feedbackNoun: Positive,\n isFeedbackPositive,\n context\n });\n const dislikeAria = getAriaLabel({\n isFeedbackNull,\n feedbackNoun: Negative,\n isFeedbackPositive,\n context\n });\n const handleFeedbackClick = ({ isPositive })=>{\n if (isFeedbackNull) {\n setFeedback(isPositive);\n sendFeedback({\n isPositive,\n requestId,\n showingResultsFor,\n didYouMean,\n previousSearchText\n });\n }\n };\n const detectKeyboardClick = ({ event: { key }, isPositive })=>{\n if (key === Constants.SystemKeyAsString.Enter || key === Constants.SystemKeyAsString.Space) {\n handleFeedbackClick({\n isPositive\n });\n }\n };\n const positiveIconName = isFeedbackNull ? likeIconName : isFeedbackPositive ? solidLikeIconName : likeIconName;\n const negativeIconName = isFeedbackNull ? dislikeIconName : !isFeedbackPositive ? solidDislikeIconName : dislikeIconName;\n const thumbsUpClass = classNames({\n [defaultCursor]: !isFeedbackNull && !isFeedbackPositive,\n [feedbackButtons]: isFeedbackNull,\n [pointerCursor]: isFeedbackNull,\n [feedbackButtonsSelected]: !isFeedbackNull && isFeedbackPositive\n });\n const thumbsDownClass = classNames({\n [defaultCursor]: !isFeedbackNull && isFeedbackPositive,\n [feedbackButtons]: isFeedbackNull,\n [pointerCursor]: isFeedbackNull,\n [feedbackButtonsSelected]: !isFeedbackNull && !isFeedbackPositive\n });\n return /*#__PURE__*/ _jsx(\"div\", {\n children: /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n className: containerClass,\n tokens: {\n childrenGap: 6\n },\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(Text, {\n children: localizedQuestion\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(Icon, {\n role: 'button',\n \"aria-label\": likeAria,\n tabIndex: 0,\n onClick: ()=>handleFeedbackClick({\n isPositive: true\n }),\n onKeyDown: (event)=>detectKeyboardClick({\n event,\n isPositive: true\n }),\n iconName: positiveIconName,\n className: thumbsUpClass\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(Icon, {\n role: 'button',\n \"aria-label\": dislikeAria,\n tabIndex: 0,\n onClick: ()=>handleFeedbackClick({\n isPositive: false\n }),\n onKeyDown: (event)=>detectKeyboardClick({\n event,\n isPositive: false\n }),\n iconName: negativeIconName,\n className: thumbsDownClass\n })\n })\n ]\n })\n });\n};\nThumbsUpDown.contextTypes = {\n loc: PropTypes.func\n};\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React, { Suspense, useCallback, useEffect, useRef, useState } from 'react';\nimport { render, unmountComponentAtNode } from 'react-dom';\nimport { Provider, useStore } from 'react-redux';\nimport { unstable_HistoryRouter as HistoryRouter, Routes, Route } from 'react-router-dom';\nimport PropTypes from 'prop-types';\nimport { appHistory } from '@shared/routerHistory';\nimport { useHydration } from '@shared/hooks/useHydration';\nimport { ensureCheckoutApp } from '@shared/actions/thunkActions';\nconst Checkout = /*#__PURE__*/ React.lazy(()=>import('./checkout'));\n/**\n * This component is in charge of hydrating only the PurchaseBlends Checkout wrapper by using React 17's hydrate function\n * on a pre-defined <div /> root because The PurchaseBlends UI does not support React 18.\n * @param _ props is never used\n * @param context React.context inherited by <AppView />\n * @returns JSX\n */ const LegacyCheckoutHydration = (_, context)=>{\n const checkoutDOMRef = useRef(null);\n const [contextValue] = useState(()=>{\n return _object_spread({}, context);\n });\n const isHydrated = useHydration();\n const store = useStore();\n const renderCheckout = useCallback(()=>{\n render(/*#__PURE__*/ _jsx(Provider, {\n store: store,\n children: /*#__PURE__*/ _jsx(HistoryRouter, {\n history: appHistory,\n children: /*#__PURE__*/ _jsx(Routes, {\n children: /*#__PURE__*/ _jsx(Route, {\n path: \":locale/marketplace/checkout/:entityId\",\n element: /*#__PURE__*/ _jsx(Suspense, {\n fallback: null,\n children: /*#__PURE__*/ _jsx(Checkout, {\n context: contextValue\n })\n })\n })\n })\n })\n }), checkoutDOMRef.current);\n }, [\n store,\n contextValue\n ]);\n useEffect(()=>{\n if (!isHydrated) {\n return;\n }\n const current = checkoutDOMRef.current;\n if (current && !current.children.length) {\n renderCheckout();\n }\n return ()=>{\n if (current) {\n unmountComponentAtNode(current);\n }\n };\n }, [\n checkoutDOMRef,\n renderCheckout,\n isHydrated\n ]);\n return /*#__PURE__*/ _jsx(\"div\", {\n \"data-react-legacy-root\": \"checkout\",\n ref: checkoutDOMRef\n });\n};\nLegacyCheckoutHydration.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n locDateString: PropTypes.func,\n locale: PropTypes.string,\n buildHref: PropTypes.func,\n ctaCallback: PropTypes.func,\n contactCallback: PropTypes.func,\n openTileCallback: PropTypes.func,\n renderErrorModal: PropTypes.func,\n reportAbuseCallback: PropTypes.func,\n getAppHeaderHeight: PropTypes.func\n};\nexport const ensureAsyncDataSSR = /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState, params) {\n const { entityId } = params;\n yield dispatch(ensureCheckoutApp({\n entityId\n }));\n });\n return function ensureAsyncDataSSR(dispatch, getState, params) {\n return _ref.apply(this, arguments);\n };\n}();\nexport default LegacyCheckoutHydration;\n","import { getSessionStorageItem, getLocalStorageItem, saveSessionStorageItem, saveLocalStorageItem } from '@shared/utils/browserStorageUtils';\nexport const POPUP_DISPLAYED = 'PopupDisplayed';\n// The different types of popups - add new popup here.\nexport var PopupType = /*#__PURE__*/ function(PopupType) {\n PopupType[\"LinkedinTeachingBubble\"] = \"LinkedinTeachingBubble\";\n return PopupType;\n}({});\n// Map used to define the display logic for each popup.\nconst popups = new Map([\n [\n \"LinkedinTeachingBubble\",\n {\n maxDisplayCount: 5,\n DisplayOnceInSession: true\n }\n ]\n]);\nfunction getTotalDisplayCount(popupType) {\n const storageDisplayCount = getLocalStorageItem(popupType);\n return storageDisplayCount ? parseInt(storageDisplayCount) : 0;\n}\nfunction didPopupDisplayedInThisSession(popupType) {\n const displayedInSession = getSessionStorageItem(popupType);\n return POPUP_DISPLAYED === displayedInSession;\n}\nfunction didPopupExceededMaxCount(popupType, displayLogic) {\n return displayLogic.maxDisplayCount <= getTotalDisplayCount(popupType);\n}\n// True if popup should be displayed according to its display history and display logic.\nexport function shouldDisplayPopup(popupType) {\n const displayLogic = popups.get(popupType);\n if (displayLogic.DisplayOnceInSession) {\n return !didPopupDisplayedInThisSession(popupType) && !didPopupExceededMaxCount(popupType, displayLogic);\n } else {\n return !didPopupExceededMaxCount(popupType, displayLogic);\n }\n}\n// Call when popup displayed. This call update the popup's display history.\nexport function popupDisplayed(popupType) {\n const displayLogic = popups.get(popupType);\n const updatedTotalDisplayCount = getTotalDisplayCount(popupType) + 1;\n if (displayLogic.DisplayOnceInSession) {\n saveSessionStorageItem(popupType, POPUP_DISPLAYED);\n }\n saveLocalStorageItem(popupType, updatedTotalDisplayCount.toString());\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withRouter } from '@shared/routerHistory';\nimport { AppDetails as AppDetailsComponent } from '@appsource/components/appDetails';\nimport { ensureAppDetailsData, ensureAppReviewsData, loadLinkedInProductGroup } from '@shared/actions/thunkActions';\nimport { createInstructionsModalAction, createRatingAction } from '@shared/actions/actions';\nimport { getTelemetryDetailContentCurrentView, getTransactCTATypes } from '@shared/utils/appUtils';\nimport { isOneTimePaymentOffer } from '@shared/utils/onetimepaymentoffers';\nimport { withHydration } from '@shared/hooks/useHydration';\nimport { createSetCheckoutSource } from '@shared/actions/checkoutActions';\nimport { getUserPrivateOffers } from '@shared/actions/privateOffersThunkActions';\nexport const mapStateToProps = (state, ownProps)=>{\n var _state_users_profile, _state_apps_relatedAppsItems_items, _state_apps_relatedAppsItems, _state_apps_relatedAppsItems_items1, _state_apps_relatedAppsItems1, _state_apps_relatedAppsItems_items2, _state_apps_relatedAppsItems2;\n const entityId = ownProps.routeParams.entityId.toString().toLowerCase();\n const isPrivate = !!ownProps.routeParams.privateOffer;\n const { billingCountryCode, breadcrumbUrl: stateBreadcrumbUrl, correlationId, currentGalleryViewIsCurated, currentView, featureFlags, locale, nationalCloud, isEmbedded } = state.config;\n const { openInNewWindowButton } = featureFlags;\n const appList = state.apps.dataList;\n const hashMap = state.apps.idMap;\n const query = ownProps.location ? ownProps.location.query : null;\n const appIndex = hashMap[`${entityId}`];\n let targetApp = null;\n if (appIndex >= 0) {\n targetApp = appList[`${appIndex}`];\n }\n const uiRole = state.users.profile && state.users.profile.uiRole;\n const managedLicenses = ((_state_users_profile = state.users.profile) === null || _state_users_profile === void 0 ? void 0 : _state_users_profile.managedLicenses) || [];\n const doesTenantHasLicenseForApp = Boolean(targetApp === null || targetApp === void 0 ? void 0 : targetApp.bigId) && managedLicenses.some((x)=>x.productId === targetApp.bigId);\n const ctaTypes = getTransactCTATypes(targetApp, uiRole, doesTenantHasLicenseForApp, isEmbedded, billingCountryCode);\n if (ctaTypes) {\n targetApp.ctaTypes = ctaTypes;\n }\n const breadcrumbUrl = stateBreadcrumbUrl || '/' + locale + '/marketplace/apps';\n const defaultTab = (query === null || query === void 0 ? void 0 : query.tab) ? query.tab : null;\n const isOneTimePayment = isOneTimePaymentOffer(entityId);\n const hideBreadcrumbUrl = isOneTimePayment;\n var _state_apps_relatedAppsItems_items_saasLinkingItems, _state_apps_relatedAppsItems_items_linkedAddIns;\n return _object_spread_props(_object_spread({}, ownProps), {\n entityId,\n app: targetApp,\n startingPrice: targetApp ? targetApp.startingPrice : null,\n breadcrumbUrl,\n defaultTab,\n allApps: appList,\n nationalCloud,\n billingCountryCode,\n correlationId,\n currentView: getTelemetryDetailContentCurrentView(currentView, currentGalleryViewIsCurated),\n userInfo: state.users,\n isLoadingUserData: state.users.loading,\n isLoadingUserProfile: state.users.isLoadingUserProfile,\n parentApps: (_state_apps_relatedAppsItems_items_saasLinkingItems = (_state_apps_relatedAppsItems = state.apps.relatedAppsItems) === null || _state_apps_relatedAppsItems === void 0 ? void 0 : (_state_apps_relatedAppsItems_items = _state_apps_relatedAppsItems.items) === null || _state_apps_relatedAppsItems_items === void 0 ? void 0 : _state_apps_relatedAppsItems_items.saasLinkingItems) !== null && _state_apps_relatedAppsItems_items_saasLinkingItems !== void 0 ? _state_apps_relatedAppsItems_items_saasLinkingItems : null,\n linkedAddIns: (_state_apps_relatedAppsItems_items_linkedAddIns = (_state_apps_relatedAppsItems1 = state.apps.relatedAppsItems) === null || _state_apps_relatedAppsItems1 === void 0 ? void 0 : (_state_apps_relatedAppsItems_items1 = _state_apps_relatedAppsItems1.items) === null || _state_apps_relatedAppsItems_items1 === void 0 ? void 0 : _state_apps_relatedAppsItems_items1.linkedAddIns) !== null && _state_apps_relatedAppsItems_items_linkedAddIns !== void 0 ? _state_apps_relatedAppsItems_items_linkedAddIns : null,\n locale,\n suggestedItems: ((_state_apps_relatedAppsItems2 = state.apps.relatedAppsItems) === null || _state_apps_relatedAppsItems2 === void 0 ? void 0 : (_state_apps_relatedAppsItems_items2 = _state_apps_relatedAppsItems2.items) === null || _state_apps_relatedAppsItems_items2 === void 0 ? void 0 : _state_apps_relatedAppsItems_items2.suggestedItems) || [],\n uiRole,\n isPrivate,\n isEmbedded,\n doesTenantHasLicenseForApp,\n hideBreadcrumbUrl,\n linkedInProductGroup: state.apps.linkedInProductGroup,\n openInNewWindowButtonFlag: openInNewWindowButton\n });\n};\nfunction ensureAsyncData(dispatch, entityId, isPrivate) {\n return dispatch(ensureAppDetailsData(entityId, isPrivate));\n}\nexport const mapDispatchToProps = (dispatch)=>{\n return {\n setCheckoutSourcePDP: ({ source })=>dispatch(createSetCheckoutSource({\n source\n })),\n ensureAsyncData: ({ entityId, isPrivate })=>ensureAsyncData(dispatch, entityId, isPrivate),\n ensureAppReviewsData: (entityId, forceUpdate = false)=>dispatch(ensureAppReviewsData(entityId, forceUpdate)),\n openInstructionsModal: ()=>dispatch(createInstructionsModalAction({\n showModal: true,\n isFromDownload: false\n })),\n openRatingModal: (app, accessKey, ctaType, callback)=>dispatch(createRatingAction({\n showModal: true,\n app: app,\n accessKey: accessKey,\n ctaType: ctaType,\n callback: callback\n })),\n fetchUserPrivateOffers: ()=>dispatch(getUserPrivateOffers()),\n loadLinkedInProductGroup: (args)=>dispatch(loadLinkedInProductGroup(args))\n };\n};\nconst AppDetails = withRouter(connect(mapStateToProps, mapDispatchToProps)(withHydration(AppDetailsComponent)));\nexport const ensureAsyncDataSSR = /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState, params) {\n const isPrivate = !!params.privateOffer;\n if (isPrivate) {\n return;\n }\n yield ensureAsyncData(dispatch, params.entityId, false);\n });\n return function ensureAsyncDataSSR(dispatch, getState, params) {\n return _ref.apply(this, arguments);\n };\n}();\nexport default AppDetails;\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from './spzaComponent';\nimport { getElement } from '../utils/appUtils';\nimport { Constants } from '../utils/constants';\nimport { SpzaInstrumentService } from '../services/telemetry/spza/spzaInstrument';\nimport { getWindow } from '../services/window';\nimport { logger } from '@src/logger';\n// Displays long content with more and less switches\nexport class LongContent extends SpzaComponent {\n changeExpandedState() {\n this.setState((prevState)=>{\n return {\n isExpanded: !prevState.isExpanded,\n showExpansionButton: prevState.showExpansionButton,\n processed: prevState.processed\n };\n });\n const payload = {\n page: getWindow().location.href,\n action: this.state.isExpanded ? Constants.Telemetry.Action.Collapse : Constants.Telemetry.Action.Expand,\n // if this is used somewhere else than my reviews need to update it by passing in with props\n // to determine where is 'more' clicked\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemMoreButton\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info('', {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n }\n isLongContent() {\n const longContent = getElement(Constants.SearchBy.Id, this.longContentIdPrefix + this.props.entityId);\n return longContent && longContent.offsetHeight > this.props.clipHeight;\n }\n setStateBasedOnContentLength() {\n if (this.isLongContent()) {\n this.setState({\n isExpanded: false,\n showExpansionButton: true,\n processed: true\n });\n } else {\n // Just updating the processed flag.\n this.setState((prevState)=>{\n return {\n isExpanded: prevState.isExpanded,\n showExpansionButton: prevState.showExpansionButton,\n processed: true\n };\n });\n }\n }\n componentDidMount() {\n this.setStateBasedOnContentLength();\n }\n componentDidUpdate() {\n if (!this.state.processed) {\n this.setStateBasedOnContentLength();\n }\n }\n UNSAFE_componentWillReceiveProps() {\n // Reset to the original state so that more/less can be recalculated.\n this.state = {\n // By default every content is expanded\n isExpanded: true,\n // By default we should not show the expansion button\n showExpansionButton: false,\n // When new props are received, we have to reprocess this component.\n processed: false\n };\n }\n renderImpl() {\n if (!this.props.content) {\n return null;\n }\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"c-content-toggle\",\n children: [\n /*#__PURE__*/ _jsx(\"p\", {\n // eslint-disable-next-line react/forbid-dom-props\n id: this.longContentIdPrefix + this.props.entityId,\n className: this.state.isExpanded ? 'longContentExpanded' : 'longContentContracted',\n children: /*#__PURE__*/ _jsx(\"span\", {\n itemProp: \"description\",\n children: this.props.content\n })\n }),\n !this.state.showExpansionButton ? null : /*#__PURE__*/ _jsx(\"button\", {\n className: \"expansionButton\",\n onClick: this.changeExpandedState.bind(this),\n children: this.state.isExpanded ? this.context.loc('LongContent_Less_Text') : this.context.loc('LongContent_More_Text')\n })\n ]\n });\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"context\", void 0), _define_property(this, \"longContentIdPrefix\", 'longContent');\n this.state = {\n // By default every content is expanded\n isExpanded: true,\n // By default we should not show the expansion button\n showExpansionButton: false,\n processed: false\n };\n }\n}\nLongContent.contextTypes = {\n loc: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Stack } from '@fluentui/react';\nimport * as React from 'react';\nexport const ReviewQAContent = ({ QAs = [] })=>{\n return /*#__PURE__*/ _jsx(Stack, {\n tokens: {\n childrenGap: 14,\n padding: 1\n },\n children: QAs === null || QAs === void 0 ? void 0 : QAs.map((reviewQA, index)=>/*#__PURE__*/ _jsxs(\"div\", {\n className: \"reviewQAContent\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"reviewContentQuestion\",\n children: reviewQA.question\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"reviewContentAnswer\",\n children: reviewQA.answer\n })\n ]\n }, `reviewQAContent-${index}`))\n });\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { useEffect, useRef } from 'react';\nimport { NeutralColors, SharedColors } from '@fluentui/theme';\nimport { Link, mergeStyles, mergeStyleSets, Persona, PersonaSize, Rating, RatingSize, Stack, Text, Icon } from '@fluentui/react';\nimport * as PropTypes from 'prop-types';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { getWindow } from '@shared/services/window';\nimport { Constants } from '@shared/utils/constants';\nimport { LongContent } from '@shared/components/longContent';\nimport { getLocaleDate } from '@shared/utils/appUtils';\nimport { ReviewQAContent } from '@shared/components/reviewQAContent';\nimport { getProviderNameByReviewSource, launchTelemetry } from '@shared/utils/reviewsUtils';\nimport { logger } from '@src/logger';\nimport { AppReviewSocialContent } from '@shared/components/appReviewSocialContent';\nimport { noop } from 'lodash-es';\n// 60px is the height of 3 lines.\nconst contentClipHeight = 60;\nconst contentStyles = mergeStyleSets({\n providerLogo: {\n height: 16,\n width: 16,\n marginRight: 10\n },\n reviewLinkToSource: {\n ':link': {\n color: SharedColors.cyanBlue10,\n textDecoration: 'underline'\n }\n },\n externalReviewProvider: {\n display: 'inline-flex',\n alignItems: 'center'\n },\n providedByWrapper: [\n 'providedBy',\n 'c-paragraph-3',\n {\n lineHeight: 14,\n fontSize: 10,\n color: NeutralColors.gray130,\n display: 'flex',\n width: '75%',\n borderTopStyle: 'solid',\n borderTopWidth: 0.5,\n borderTopColor: NeutralColors.gray30\n }\n ],\n reviewContent: [\n 'reviewContent'\n ],\n reviewAndIsvReply: [\n 'reviewAndIsvReply'\n ],\n reviewItem: [\n 'reviewItem'\n ],\n authorDetailsContainer: [\n 'authorName',\n 'c-paragraph-3'\n ],\n authorPersona: [\n 'spza-user-default-thumbnail-image',\n {\n marginBottom: 8\n }\n ],\n reviewRating: [\n 'reviewRating'\n ],\n reviewTitle: [\n 'c-heading-6',\n 'contentHeader'\n ],\n reviewRightContent: [\n 'rightContent',\n {\n overflow: 'hidden'\n }\n ],\n reviewDateWrapper: [\n 'c-paragraph-3',\n {\n marginBottom: 4\n }\n ],\n dateLabel: {\n fontSize: 12,\n lineHeight: 16\n },\n editedLabel: {\n color: NeutralColors.gray130,\n overflow: 'hidden'\n },\n externalSummaryUrlImage: {\n height: 13,\n width: 13,\n color: SharedColors.cyanBlue10,\n marginTop: 1\n }\n});\n// Displays an individual app review\nexport const AppReviewItem = ({ authorPersona = false, appId, reviewItemShown = noop, review, locale, isEmbed, publisher, iconUrl, isSignedIn = false, isMarkedAsHelpful = false, onToggleMarkAsHelpful, openSignInModal, fallbackReviewSourceName, dateLabelClassName }, context)=>{\n var _review_review_content;\n const rootDivRef = useRef();\n const instrument = SpzaInstrumentService.getProvider();\n useEffect(()=>{\n if (review) {\n reviewItemShown(review.id, rootDivRef);\n }\n }, []);\n useEffect(()=>{\n if (review) {\n reviewItemShown(review.id, rootDivRef);\n }\n }, [\n review === null || review === void 0 ? void 0 : review.id\n ]);\n const showReportAbuseDialog = ()=>{\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.ReportCTA,\n appName: appId\n };\n instrument.probe('logAndFlushTelemetryInfo', payload);\n logger.info('', {\n action: payload.action,\n actionModifier: payload.actionModifier,\n appName: payload.appName\n });\n context.reportAbuseCallback(appId, review.id, review.title, review.source);\n };\n const getFullName = (review)=>{\n var _review_customer_info;\n let result = '';\n if (review.customer_info && review.customer_info.name) {\n result += review.customer_info.name;\n }\n if ((_review_customer_info = review.customer_info) === null || _review_customer_info === void 0 ? void 0 : _review_customer_info.is_anonymous) {\n result = '';\n }\n if (!result) {\n return context.loc('ReviewItem_AnonymousName');\n }\n return result;\n };\n const renderProviderSection = (isThirdPartyReview)=>{\n return /*#__PURE__*/ _jsx(\"div\", {\n className: contentStyles.providedByWrapper,\n children: isThirdPartyReview ? /*#__PURE__*/ _jsx(\"div\", {\n className: contentStyles.externalReviewProvider,\n children: /*#__PURE__*/ _jsx(Text, {\n block: true,\n variant: \"xSmall\",\n children: /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n tokens: {\n childrenGap: 4\n },\n children: [\n /*#__PURE__*/ _jsxs(Link, {\n className: contentStyles.reviewLinkToSource,\n href: review.third_party_review_url,\n target: \"_blank\",\n onClick: ()=>{\n launchTelemetry(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.ExternalReviewLink, {\n offerId: review.offer_id,\n source: review.source,\n reviewId: review.id\n });\n logger.info(JSON.stringify({\n offerId: review.offer_id,\n source: review.source,\n reviewId: review.id\n }), {\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.ExternalReviewLink\n });\n },\n children: [\n getProviderNameByReviewSource(review.source, fallbackReviewSourceName),\n ' ',\n context.loc('Global_Loc_review', 'review')\n ]\n }),\n /*#__PURE__*/ _jsx(Icon, {\n iconName: \"NavigateExternalInline\",\n className: contentStyles.externalSummaryUrlImage\n })\n ]\n })\n })\n }) : /*#__PURE__*/ _jsx(Text, {\n variant: \"xSmall\",\n children: context.loc('Global_Loc_Marketplace_review', 'Marketplace review')\n })\n });\n };\n const getAriaLabel = (review)=>(rating, max)=>context.locParams('ReviewItem_AriaText', [\n `${rating}`,\n `${max}`,\n getFullName(review)\n ]);\n const isReviewEdited = (review)=>review.updated_at !== review.created_at;\n const reviewerName = getFullName(review);\n const isThirdPartyReview = review.source === Constants.StorefrontName.G2;\n return /*#__PURE__*/ _jsx(\"div\", {\n ref: rootDivRef,\n className: contentStyles.reviewAndIsvReply,\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: contentStyles.reviewItem,\n itemProp: \"review\",\n itemScope: true,\n itemType: \"https://schema.org/Review\",\n children: [\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"leftBar\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: contentStyles.reviewRating,\n children: /*#__PURE__*/ _jsx(Rating, {\n max: 5,\n size: RatingSize.Small,\n rating: review.rating,\n styles: {\n ratingStarBack: {\n color: NeutralColors.gray100\n }\n },\n getAriaLabel: getAriaLabel(review),\n readOnly: true\n })\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: contentStyles.reviewDateWrapper,\n children: /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n verticalAlign: \"center\",\n tokens: {\n childrenGap: 8\n },\n children: [\n /*#__PURE__*/ _jsx(Text, {\n block: true,\n className: mergeStyles(contentStyles.dateLabel, dateLabelClassName),\n children: getLocaleDate(review.updated_at, locale)\n }),\n isReviewEdited(review) && /*#__PURE__*/ _jsx(Text, {\n variant: \"xSmall\",\n className: contentStyles.editedLabel,\n children: context.loc('ReviewItem_EditedLabel')\n })\n ]\n })\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: contentStyles.authorDetailsContainer,\n title: reviewerName,\n itemProp: \"author\",\n itemScope: true,\n itemType: \"https://schema.org/Person\",\n children: [\n authorPersona ? /*#__PURE__*/ _jsx(Persona, {\n className: contentStyles.authorPersona,\n text: reviewerName,\n size: PersonaSize.size24\n }) : reviewerName,\n /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"name\",\n content: getFullName(review)\n })\n ]\n }),\n renderProviderSection(isThirdPartyReview)\n ]\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: contentStyles.reviewRightContent,\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"rightBar\",\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: contentStyles.reviewContent,\n children: [\n review.title ? /*#__PURE__*/ _jsx(\"h5\", {\n className: contentStyles.reviewTitle,\n children: review.title\n }) : null,\n /*#__PURE__*/ _jsx(LongContent, {\n entityId: review.id,\n content: isThirdPartyReview ? ReviewQAContent({\n QAs: (_review_review_content = review.review_content) === null || _review_review_content === void 0 ? void 0 : _review_review_content.question_answer_content\n }) : review.content,\n clipHeight: contentClipHeight\n })\n ]\n })\n }),\n /*#__PURE__*/ _jsx(AppReviewSocialContent, {\n iconUrl: iconUrl,\n isEmbed: isEmbed,\n locale: locale,\n onReportClick: ()=>showReportAbuseDialog(),\n publisherName: publisher,\n review: review,\n isSignedIn: isSignedIn,\n isMarkedAsHelpful: isMarkedAsHelpful,\n onToggleMarkAsHelpful: onToggleMarkAsHelpful,\n openSignInModal: openSignInModal\n })\n ]\n })\n ]\n })\n });\n};\nAppReviewItem.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n reportAbuseCallback: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { Label, mergeStyleSets } from '@fluentui/react';\nexport const getClassNames = (fill)=>{\n return mergeStyleSets({\n fillWidth: {\n width: `${fill}%`\n }\n });\n};\nexport const RatingPercentages = ({ context, numberOfStars = 0, percentagesOfTotal = 0 })=>{\n const classNames = require('classnames');\n const { fillWidth } = getClassNames(percentagesOfTotal);\n const chartClasses = classNames('ratingsPercentagesChartFill', fillWidth);\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"ratingPercentagesContainer\",\n children: [\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"ratingPercentagesDetails\",\n children: [\n /*#__PURE__*/ _jsxs(Label, {\n className: \"ratingPercentagesNumOfStars\",\n children: [\n numberOfStars,\n \" \",\n context === null || context === void 0 ? void 0 : context.loc('Global_Loc_starsLower', 'stars')\n ]\n }),\n /*#__PURE__*/ _jsxs(\"text\", {\n className: \"percentagesOfTotal\",\n children: [\n \"(\",\n percentagesOfTotal,\n \"%)\"\n ]\n })\n ]\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"ratingsPercentagesChart\",\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: chartClasses\n })\n })\n ]\n });\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { Stack, Label, Text, mergeStyleSets, Icon, Image } from '@fluentui/react';\nimport { NeutralColors } from '@fluentui/theme';\nimport { RatingPercentages } from './ratingPercentages';\nimport microsoftLogo from '@shared/images/microsoft-icon.svg';\nconst contentStyles = mergeStyleSets({\n ratingSummaryContainer: [\n 'ratingSummaryContainer',\n {\n minWidth: 280\n }\n ],\n singleInternalRatingSourceImage: {\n width: 16,\n height: 16,\n marginRight: 10,\n marginTop: 3\n },\n ratingSummaryAverageSection: [\n 'ratingSummaryAverageSection',\n {\n margin: '16px 0'\n }\n ]\n});\nexport function getPercentagesOfTotal(params) {\n const percentages = params.totalRatings ? params.timesRated * 100 / params.totalRatings : 0;\n return Math.round(percentages);\n}\nexport function getEmptyRatingSummary() {\n return {\n AverageRating: 0,\n TotalRatings: 0,\n Source: '',\n OfferId: null,\n CreatedAt: null,\n StarsDistribution: {\n OneStars: 0,\n TwoStars: 0,\n ThreeStars: 0,\n FourStars: 0,\n FiveStars: 0\n }\n };\n}\nexport function getAverageRatingToDisplay(ratingSummary) {\n return ratingSummary.AverageRating && !isNaN(ratingSummary.AverageRating) ? ratingSummary.AverageRating.toFixed(1) : '0';\n}\nexport const renderRatingPercentagesByNumOfStars = (numOfStars, timesRated, totalRatings, context)=>{\n return /*#__PURE__*/ _jsx(RatingPercentages, {\n context: context,\n numberOfStars: numOfStars,\n percentagesOfTotal: getPercentagesOfTotal({\n timesRated,\n totalRatings\n })\n });\n};\nexport const RatingSummary = ({ ratingSummary = getEmptyRatingSummary(), context = null, title = 'Rating Summary' })=>{\n var _totalRatingSummary_StarsDistribution, _totalRatingSummary_StarsDistribution1, _totalRatingSummary_StarsDistribution2, _totalRatingSummary_StarsDistribution3, _totalRatingSummary_StarsDistribution4;\n const totalRatingSummary = ratingSummary || getEmptyRatingSummary();\n const averageRating = getAverageRatingToDisplay(totalRatingSummary);\n const ratingSummaryAriaText = context === null || context === void 0 ? void 0 : context.locParams('Reviews_Summary_AriaText', [\n averageRating,\n '5',\n `${totalRatingSummary.TotalRatings}`\n ]);\n const iconStyles = {\n root: [\n 'ratingSummaryStar',\n {\n fontSize: 17\n },\n !totalRatingSummary.TotalRatings && {\n color: NeutralColors.gray90\n }\n ]\n };\n var _totalRatingSummary_StarsDistribution_FiveStars, _totalRatingSummary_StarsDistribution_FourStars, _totalRatingSummary_StarsDistribution_ThreeStars, _totalRatingSummary_StarsDistribution_TwoStars, _totalRatingSummary_StarsDistribution_OneStars;\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: contentStyles.ratingSummaryContainer,\n children: [\n /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n children: [\n /*#__PURE__*/ _jsx(Image, {\n src: microsoftLogo,\n className: contentStyles.singleInternalRatingSourceImage,\n alt: \"Microsoft Logo\"\n }),\n /*#__PURE__*/ _jsx(\"text\", {\n className: \"ratingSummaryTitle\",\n children: title\n })\n ]\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: contentStyles.ratingSummaryAverageSection,\n \"aria-label\": ratingSummaryAriaText,\n children: [\n /*#__PURE__*/ _jsx(Icon, {\n iconName: totalRatingSummary.TotalRatings ? 'FavoriteStarFill' : 'FavoriteStar',\n styles: iconStyles,\n \"aria-label\": context === null || context === void 0 ? void 0 : context.loc('Ratings_Review_Star', 'Ratings review star')\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"ratingSummaryAverageSectionText\",\n children: [\n /*#__PURE__*/ _jsx(Label, {\n className: \"ratingSummaryNumOfStars\",\n children: averageRating\n }),\n /*#__PURE__*/ _jsxs(Text, {\n className: \"numOfRatingText\",\n variant: \"mediumPlus\",\n children: [\n \"(\",\n totalRatingSummary.TotalRatings,\n \" \",\n context === null || context === void 0 ? void 0 : context.loc('Global_Loc_ratingsLower', 'ratings'),\n \")\"\n ]\n })\n ]\n })\n ]\n }),\n totalRatingSummary.TotalRatings >= 5 && /*#__PURE__*/ _jsxs(Stack, {\n tokens: {\n childrenGap: 2,\n padding: 1\n },\n children: [\n renderRatingPercentagesByNumOfStars(5, (_totalRatingSummary_StarsDistribution_FiveStars = (_totalRatingSummary_StarsDistribution = totalRatingSummary.StarsDistribution) === null || _totalRatingSummary_StarsDistribution === void 0 ? void 0 : _totalRatingSummary_StarsDistribution.FiveStars) !== null && _totalRatingSummary_StarsDistribution_FiveStars !== void 0 ? _totalRatingSummary_StarsDistribution_FiveStars : 0, totalRatingSummary.TotalRatings, context),\n renderRatingPercentagesByNumOfStars(4, (_totalRatingSummary_StarsDistribution_FourStars = (_totalRatingSummary_StarsDistribution1 = totalRatingSummary.StarsDistribution) === null || _totalRatingSummary_StarsDistribution1 === void 0 ? void 0 : _totalRatingSummary_StarsDistribution1.FourStars) !== null && _totalRatingSummary_StarsDistribution_FourStars !== void 0 ? _totalRatingSummary_StarsDistribution_FourStars : 0, totalRatingSummary.TotalRatings, context),\n renderRatingPercentagesByNumOfStars(3, (_totalRatingSummary_StarsDistribution_ThreeStars = (_totalRatingSummary_StarsDistribution2 = totalRatingSummary.StarsDistribution) === null || _totalRatingSummary_StarsDistribution2 === void 0 ? void 0 : _totalRatingSummary_StarsDistribution2.ThreeStars) !== null && _totalRatingSummary_StarsDistribution_ThreeStars !== void 0 ? _totalRatingSummary_StarsDistribution_ThreeStars : 0, totalRatingSummary.TotalRatings, context),\n renderRatingPercentagesByNumOfStars(2, (_totalRatingSummary_StarsDistribution_TwoStars = (_totalRatingSummary_StarsDistribution3 = totalRatingSummary.StarsDistribution) === null || _totalRatingSummary_StarsDistribution3 === void 0 ? void 0 : _totalRatingSummary_StarsDistribution3.TwoStars) !== null && _totalRatingSummary_StarsDistribution_TwoStars !== void 0 ? _totalRatingSummary_StarsDistribution_TwoStars : 0, totalRatingSummary.TotalRatings, context),\n renderRatingPercentagesByNumOfStars(1, (_totalRatingSummary_StarsDistribution_OneStars = (_totalRatingSummary_StarsDistribution4 = totalRatingSummary.StarsDistribution) === null || _totalRatingSummary_StarsDistribution4 === void 0 ? void 0 : _totalRatingSummary_StarsDistribution4.OneStars) !== null && _totalRatingSummary_StarsDistribution_OneStars !== void 0 ? _totalRatingSummary_StarsDistribution_OneStars : 0, totalRatingSummary.TotalRatings, context)\n ]\n })\n ]\n });\n};\n","/* eslint-disable react/forbid-dom-props */ import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { launchTelemetry } from '@shared/utils/reviewsUtils';\nimport { Constants } from '@shared/utils/constants';\nimport { Dropdown } from '@fluentui/react';\nimport { logger } from '@src/logger';\nexport var SourceFilterOptions = /*#__PURE__*/ function(SourceFilterOptions) {\n SourceFilterOptions[\"AllReviews\"] = \"All reviews\";\n SourceFilterOptions[\"MarketplaceReviews\"] = \"Marketplace reviews\";\n SourceFilterOptions[\"G2Reviews\"] = \"G2 reviews\";\n SourceFilterOptions[\"MyReview\"] = \"My review\";\n SourceFilterOptions[\"MyComments\"] = \"My comments\";\n return SourceFilterOptions;\n}({});\nexport var RatingsFilterOptions = /*#__PURE__*/ function(RatingsFilterOptions) {\n RatingsFilterOptions[\"AllRatings\"] = \"All ratings\";\n RatingsFilterOptions[\"OneStar\"] = \"1 star\";\n RatingsFilterOptions[\"TwoStars\"] = \"2 stars\";\n RatingsFilterOptions[\"ThreeStars\"] = \"3 stars\";\n RatingsFilterOptions[\"FourStars\"] = \"4 stars\";\n RatingsFilterOptions[\"FiveStars\"] = \"5 stars\";\n return RatingsFilterOptions;\n}({});\nexport var SortByOptions = /*#__PURE__*/ function(SortByOptions) {\n SortByOptions[\"MostRecent\"] = \"Most recent\";\n SortByOptions[\"HighToLow\"] = \"High to low\";\n SortByOptions[\"LowToHigh\"] = \"Low to high\";\n SortByOptions[\"MostHelpful\"] = \"Most Helpful\";\n return SortByOptions;\n}({});\nexport const isUserCommentsExist = (userCommentedReviewIds)=>userCommentedReviewIds.length > 0;\nexport function getFilterBySourceCategories(context, externalReviewsExist, userReviewExists, internalReviewsExist, userCommentsExist = false, showMyCommentsFilter = false) {\n const filterBySourceCategories = [\n {\n text: context.loc('AppReviewCollection_sourceFilter_AllReviews', 'All reviews'),\n key: \"All reviews\"\n }\n ];\n filterBySourceCategories.push({\n text: context.loc('AppReviewCollection_sourceFilter_MarketplaceReviews', 'Marketplace reviews'),\n key: \"Marketplace reviews\",\n disabled: !internalReviewsExist\n });\n filterBySourceCategories.push({\n text: context.loc('AppReviewCollection_sourceFilter_G2Reviews', 'G2 reviews'),\n key: \"G2 reviews\",\n disabled: !externalReviewsExist\n });\n filterBySourceCategories.push({\n text: context.loc('AppReviewCollection_sourceFilter_MyReview', 'My review'),\n key: \"My review\",\n disabled: !userReviewExists\n });\n if (showMyCommentsFilter) {\n filterBySourceCategories.push({\n text: context.loc('AppReviewCollection_sourceFilter_MyComments', 'My comments'),\n key: \"My comments\",\n disabled: !userCommentsExist\n });\n }\n return filterBySourceCategories;\n}\nexport function getSourceFilterOptionByLocaliztionText({ text, context, userCommentsExist = false, showMyCommentsFilter = false }) {\n const allSourceOptions = getFilterBySourceCategories(context, true, true, true, userCommentsExist, showMyCommentsFilter);\n const optionsByText = allSourceOptions.find((option)=>option.text === text);\n return optionsByText || allSourceOptions[0];\n}\nexport function getSortByCategories(context) {\n const sortByCategories = [\n {\n text: context.loc('AppReviewCollection_sortReviews_MostRecent', 'Most recent'),\n key: \"Most recent\"\n },\n {\n text: context.loc('AppReviewCollection_sortReviews_ByRatingHighToLow', 'Highest rating'),\n key: \"High to low\"\n },\n {\n text: context.loc('AppReviewCollection_sortReviews_ByRatingLowToHigh', 'Lowest rating'),\n key: \"Low to high\"\n },\n {\n text: context.loc('AppReviewCollection_sortReviews_MostHelpful', 'Most helpful'),\n key: \"Most Helpful\"\n }\n ];\n return sortByCategories;\n}\nexport function getSortByOptionByLocaliztionText(text, context) {\n const allSortByOptions = getSortByCategories(context);\n const optionsByText = allSortByOptions.find((option)=>option.text === text);\n return optionsByText || allSortByOptions[0];\n}\nexport function getRatingsFilterNumber(option) {\n switch(option.key){\n case \"1 star\":\n return 1;\n case \"2 stars\":\n return 2;\n case \"3 stars\":\n return 3;\n case \"4 stars\":\n return 4;\n case \"5 stars\":\n return 5;\n default:\n return null;\n }\n}\nexport function getRatingsFilterOptionByRating(rating, context) {\n switch(rating){\n case 1:\n return {\n text: context.loc('AppReviewCollection_ratingsFilter_OneStar', '1 star'),\n key: \"1 star\"\n };\n case 2:\n return {\n text: context.loc('AppReviewCollection_ratingsFilter_TwoStars', '2 stars'),\n key: \"2 stars\"\n };\n case 3:\n return {\n text: context.loc('AppReviewCollection_ratingsFilter_ThreeStars', '3 stars'),\n key: \"3 stars\"\n };\n case 4:\n return {\n text: context.loc('AppReviewCollection_ratingsFilter_FourStars', '4 stars'),\n key: \"4 stars\"\n };\n case 5:\n return {\n text: context.loc('AppReviewCollection_ratingsFilter_FiveStars', '5 stars'),\n key: \"5 stars\"\n };\n default:\n return {\n text: context.loc('AppReviewCollection_ratingsFilter_AllRatings', 'All ratings'),\n key: \"All ratings\"\n };\n }\n}\nexport function getRatingsFilterCategories(context) {\n const ratingsFilterCategories = [\n {\n text: context.loc('AppReviewCollection_ratingsFilter_AllRatings', 'All ratings'),\n key: \"All ratings\"\n },\n {\n text: context.loc('AppReviewCollection_ratingsFilter_OneStar', '1 star'),\n key: \"1 star\"\n },\n {\n text: context.loc('AppReviewCollection_ratingsFilter_TwoStars', '2 stars'),\n key: \"2 stars\"\n },\n {\n text: context.loc('AppReviewCollection_ratingsFilter_ThreeStars', '3 stars'),\n key: \"3 stars\"\n },\n {\n text: context.loc('AppReviewCollection_ratingsFilter_FourStars', '4 stars'),\n key: \"4 stars\"\n },\n {\n text: context.loc('AppReviewCollection_ratingsFilter_FiveStars', '5 stars'),\n key: \"5 stars\"\n }\n ];\n return ratingsFilterCategories;\n}\nexport function handleRatingsFilter(option, isDropDownChanged, originalReviewList) {\n let filteredArray = [];\n const updatedRatingsFilter = getRatingsFilterNumber(option);\n if (isDropDownChanged) {\n filteredArray = updatedRatingsFilter ? originalReviewList.filter((review)=>review.rating === updatedRatingsFilter) : originalReviewList;\n const telemetryDetails = {\n ratingsFilter: updatedRatingsFilter\n };\n launchTelemetry(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.FilterPDPReviews, telemetryDetails);\n logger.info(JSON.stringify(telemetryDetails), {\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.FilterPDPReviews\n });\n }\n return filteredArray;\n}\nexport function filterBySource(option, reviewsList, userReview, userCommentedReviewIds) {\n switch(option.key){\n case \"Marketplace reviews\":\n return reviewsList.filter((review)=>Constants.InternalStoreFronts.indexOf(review.source) > -1);\n case \"G2 reviews\":\n return reviewsList.filter((review)=>review.source === Constants.StorefrontName.G2);\n case \"My review\":\n reviewsList = userReview ? [\n userReview\n ] : [];\n return reviewsList;\n case \"My comments\":\n return reviewsList.filter((review)=>userCommentedReviewIds.indexOf(review.id) > -1);\n default:\n return reviewsList;\n }\n}\nexport function handleSourceFilter(option, isDropDownChanged, reviewsList, userReview, userCommentedReviewIds) {\n let filteredArray = [];\n if (isDropDownChanged) {\n filteredArray = filterBySource(option, reviewsList, userReview, userCommentedReviewIds);\n const telemetryDetails = {\n reviewsSourceFilter: option.text\n };\n launchTelemetry(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.FilterPDPReviews, telemetryDetails);\n logger.info(JSON.stringify(telemetryDetails), {\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.FilterPDPReviews\n });\n }\n return filteredArray;\n}\nexport function getSortByStatus(curReviewsList, option, isDropDownChanged, curSortBy, context) {\n const sortByHelper = {\n sortedReviewsList: curReviewsList,\n updatedSortBy: curSortBy\n };\n switch(option.key){\n case \"High to low\":\n sortByHelper.updatedSortBy = context.loc('AppReviewCollection_sortReviews_ByRatingHighToLow');\n if (isDropDownChanged) {\n sortByHelper.sortedReviewsList = sortByHelper.sortedReviewsList.sort((first, second)=>second.rating - first.rating);\n }\n break;\n case \"Low to high\":\n sortByHelper.updatedSortBy = context.loc('AppReviewCollection_sortReviews_ByRatingLowToHigh');\n if (isDropDownChanged) {\n sortByHelper.sortedReviewsList = sortByHelper.sortedReviewsList.sort((first, second)=>first.rating - second.rating);\n }\n break;\n case \"Most Helpful\":\n sortByHelper.updatedSortBy = context.loc('AppReviewCollection_sortReviews_MostHelpful');\n if (isDropDownChanged) {\n sortByHelper.sortedReviewsList = sortByHelper.sortedReviewsList.sort((first, second)=>second.mark_as_helpful_count - first.mark_as_helpful_count);\n }\n break;\n default:\n sortByHelper.updatedSortBy = context.loc('AppReviewCollection_sortReviews_MostRecent');\n if (isDropDownChanged) {\n sortByHelper.sortedReviewsList = sortByHelper.sortedReviewsList.sort((first, second)=>new Date(second.updated_at).valueOf() - new Date(first.updated_at).valueOf());\n }\n break;\n }\n return sortByHelper;\n}\nexport function handleSortBy(option, updatedReviewsList, curReviewsList, isDropDownChanged, sortBy, context, updateReviewsSortByState) {\n const sortByHelper = getSortByStatus(updatedReviewsList, option, isDropDownChanged, sortBy, context);\n if (curReviewsList && isDropDownChanged) {\n updateReviewsSortByState(sortByHelper.updatedSortBy);\n const telemetryDetails = {\n sortBy: sortByHelper.updatedSortBy\n };\n launchTelemetry(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.SortPDPReviews, telemetryDetails);\n logger.info(JSON.stringify(telemetryDetails), {\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.SortPDPReviews\n });\n }\n return sortByHelper.sortedReviewsList;\n}\nexport function handleDropDowns(sourceFilterOption, ratingFilterOption, sortByOption, updateReviewsState, originalReviewList, curReviewsList, sourceFilter, sortBy, ratingFilter, context, userReview, userCommentedReviewIds = []) {\n const updatedRatingsFilter = getRatingsFilterNumber(ratingFilterOption);\n const isDropDownChanged = ratingFilter !== updatedRatingsFilter || sortBy !== sortByOption.text || sourceFilterOption.text !== sourceFilter;\n let filteredArray = handleRatingsFilter(ratingFilterOption, isDropDownChanged, originalReviewList);\n filteredArray = handleSourceFilter(sourceFilterOption, isDropDownChanged, filteredArray, userReview, userCommentedReviewIds);\n const fliteredAndSortedArray = handleSortBy(sortByOption, filteredArray, curReviewsList, isDropDownChanged, sortBy, context, updateReviewsState.updateStateBySortFilter);\n if (isDropDownChanged) {\n updateReviewsState.updateStateByFilters(updatedRatingsFilter, fliteredAndSortedArray, sourceFilterOption.text);\n }\n // Go to first page and update pagination if the reviews list was changed\n if (fliteredAndSortedArray.length) {\n const updatedCurrentEnd = Constants.MaxItemsPerPageInReviews < filteredArray.length ? Constants.MaxItemsPerPageInReviews : filteredArray.length;\n updateReviewsState.updatePaginationState(1, 1, updatedCurrentEnd);\n }\n}\nexport function renderSourceFilterDropDown({ curSortBy, curRatingFilter, context, updateReviewsState, originalReviewList, curReviewsList, curSourceFilter, externalReviewsExist, userReview, internalReviewsExist, userCommentedReviewIds, showMyCommentsFilter }) {\n const sourceFilterCategories = getFilterBySourceCategories(context, externalReviewsExist, !!userReview, internalReviewsExist, isUserCommentsExist(userCommentedReviewIds), showMyCommentsFilter);\n let activeFilterOption = sourceFilterCategories.find((option)=>option.text === curSourceFilter);\n activeFilterOption = activeFilterOption !== null && activeFilterOption !== void 0 ? activeFilterOption : sourceFilterCategories[0];\n return /*#__PURE__*/ _jsx(Dropdown, {\n className: \"reviewDropDown sourceFilter\",\n defaultSelectedKey: activeFilterOption.key,\n options: sourceFilterCategories,\n dropdownWidth: 'grow',\n ariaLabel: activeFilterOption.text,\n onChange: (e, option)=>{\n const sortBy = getSortByOptionByLocaliztionText(curSortBy, context);\n const ratingFilter = getRatingsFilterOptionByRating(curRatingFilter, context);\n handleDropDowns(option, ratingFilter, sortBy, updateReviewsState, originalReviewList, curReviewsList, curSourceFilter, curSortBy, curRatingFilter, context, userReview, userCommentedReviewIds);\n }\n });\n}\nexport function renderRatingFilterDropDown(curSortBy, curSourceFilter, updateReviewsState, originalReviewList, curReviewsList, curRatingFilter, context, userReview, userCommentedReviewIds, showMyCommentsFilter) {\n const ratingsFilterCategories = getRatingsFilterCategories(context);\n const curRatingFilterOption = getRatingsFilterOptionByRating(curRatingFilter, context);\n let activeFilterOption = ratingsFilterCategories.find((option)=>option.text === curRatingFilterOption.text);\n activeFilterOption = activeFilterOption !== null && activeFilterOption !== void 0 ? activeFilterOption : ratingsFilterCategories[0];\n return /*#__PURE__*/ _jsx(Dropdown, {\n className: \"reviewDropDown ratingFilter\",\n defaultSelectedKey: activeFilterOption.key,\n options: ratingsFilterCategories,\n ariaLabel: curRatingFilterOption.text,\n dropdownWidth: 'grow',\n onChange: (e, option)=>{\n const sortBy = getSortByOptionByLocaliztionText(curSortBy, context);\n const sourceFilter = getSourceFilterOptionByLocaliztionText({\n text: curSourceFilter,\n context: context,\n userCommentsExist: isUserCommentsExist(userCommentedReviewIds),\n showMyCommentsFilter: showMyCommentsFilter\n });\n handleDropDowns(sourceFilter, option, sortBy, updateReviewsState, originalReviewList, curReviewsList, curSourceFilter, curSortBy, curRatingFilter, context, userReview, userCommentedReviewIds);\n }\n });\n}\nexport function renderSortByDropDown({ curRatingFilter, context, curSourceFilter, updateReviewsState, originalReviewList, curReviewsList, curSortBy, userReview, userCommentedReviewIds, showMyCommentsFilter }) {\n const sortByCategories = getSortByCategories(context);\n let activeFilterOption = sortByCategories.find((option)=>option.text === curSortBy);\n activeFilterOption = activeFilterOption !== null && activeFilterOption !== void 0 ? activeFilterOption : sortByCategories[0];\n return /*#__PURE__*/ _jsx(Dropdown, {\n className: \"reviewDropDown sortByDropDown\",\n defaultSelectedKey: activeFilterOption.key,\n options: sortByCategories,\n \"aria-labelledby\": \"reviewsSortByLabel\",\n dropdownWidth: 'grow',\n ariaLabel: context.loc('AppReviewCollection_sortReviews_TitleText', 'Sort by'),\n onChange: (e, option)=>{\n const ratingFilter = getRatingsFilterOptionByRating(curRatingFilter, context);\n const sourceFilter = getSourceFilterOptionByLocaliztionText({\n text: curSourceFilter,\n context: context,\n userCommentsExist: isUserCommentsExist(userCommentedReviewIds),\n showMyCommentsFilter: showMyCommentsFilter\n });\n handleDropDowns(sourceFilter, ratingFilter, option, updateReviewsState, originalReviewList, curReviewsList, curSourceFilter, curSortBy, curRatingFilter, context, userReview, userCommentedReviewIds);\n }\n });\n}\nexport const ReviewsDropDowns = ({ curSourceFilter = null, curSortBy = null, curRatingFilter = null, context = null, updateReviewsState = null, originalReviewList = [], curReviewsList = [], externalReviewsExist = false, userReview = null, internalReviewsExist = false, userCommentedReviewIds = [], showMyCommentsFilter = false })=>{\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"reviewsTopBarDropDowns\",\n children: [\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"reviewsFilter\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"sourceFilterIcon\"\n }),\n renderSourceFilterDropDown({\n curSortBy,\n curRatingFilter,\n context,\n updateReviewsState,\n originalReviewList,\n curReviewsList,\n curSourceFilter,\n externalReviewsExist,\n internalReviewsExist,\n userReview,\n userCommentedReviewIds,\n showMyCommentsFilter\n })\n ]\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"reviewsFilter\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"ratingsFilterIcon\"\n }),\n renderRatingFilterDropDown(curSortBy, curSourceFilter, updateReviewsState, originalReviewList, curReviewsList, curRatingFilter, context, userReview, userCommentedReviewIds, showMyCommentsFilter)\n ]\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"reviewsSortBy\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"sortByIconAndText\",\n id: \"reviewsSortByLabel\",\n children: context.loc('AppReviewCollection_sortReviews_TitleText')\n }),\n renderSortByDropDown({\n curRatingFilter,\n context,\n curSourceFilter,\n updateReviewsState,\n originalReviewList,\n curReviewsList,\n curSortBy,\n userReview,\n userCommentedReviewIds,\n showMyCommentsFilter\n })\n ]\n })\n ]\n });\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { PrimaryButton, Stack } from '@fluentui/react';\nimport noReviewsImg from '@shared/images/noReviewsImg.svg';\nimport { Constants } from '@shared/utils/constants';\nexport const getDescriptionText = (context, isOfferPurchased)=>{\n if (isOfferPurchased) {\n return context.loc('NoReviewsToShow_addReviewDescription_WriteReviewText', \"This offer doesn't have any reviews yet. \\nBe the first to add a review.\");\n }\n return context.loc('NoReviewsToShow_addReviewDescription_PurchaseNeededText', \"This offer doesn't have any reviews yet. \\nTo add the first review, get the offer and write your review.\");\n};\nexport const NoReviewsToShow = ({ context, isOfferPurchased = false, openReviewModal })=>{\n return /*#__PURE__*/ _jsxs(Stack, {\n className: \"NoReviewsToShowContainer\",\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n align: \"center\",\n children: /*#__PURE__*/ _jsx(\"img\", {\n className: \"NoReviewsToShowImg\",\n src: noReviewsImg,\n alt: context.loc('NoReviewsToShow_addReviewTitle_Text', 'No reviews yet')\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n className: \"NoReviewsToShowTitle\",\n align: \"center\",\n children: /*#__PURE__*/ _jsx(\"span\", {\n className: \"NoReviewsToShowTitleText\",\n children: context.loc('NoReviewsToShow_addReviewTitle_Text', 'No reviews yet')\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n className: \"NoReviewsToShowDescription\",\n align: \"center\",\n children: /*#__PURE__*/ _jsx(\"span\", {\n className: \"NoReviewsToShowDescriptionText\",\n children: getDescriptionText(context, isOfferPurchased)\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n align: \"center\",\n children: /*#__PURE__*/ _jsx(PrimaryButton, {\n className: \"NoReviewsToShowCTA\",\n text: context.loc('AppReviewCollection_Button_Text_Write', 'Write a review'),\n onClick: ()=>openReviewModal(),\n \"data-bi-id\": Constants.JsllCTAId.WriteReview,\n \"data-bi-area\": \"Review\",\n disabled: !isOfferPurchased\n })\n })\n ]\n });\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { Link, Image, Text, mergeStyleSets, Stack } from '@fluentui/react';\nimport { getEmptyRatingSummary } from './ratingSummary';\nimport redirectLogo from '@shared/images/Redirect.svg';\nimport { launchTelemetry } from '@shared/utils/reviewsUtils';\nimport { Constants } from '@shared/utils/constants';\nimport { logger } from '@src/logger';\nimport * as PropTypes from 'prop-types';\nexport function getExternalProductLink(productName) {\n return productName ? `https://www.g2.com/products/${productName}/reviews` : '';\n}\nconst contentStyles = mergeStyleSets({\n externalRatingSummariesTitle: {\n fontSize: 16,\n lineHeight: 22,\n fontWeight: 600\n },\n externalRatingSourceImage: {\n width: 16,\n height: 16,\n marginTop: 3,\n marginRight: 10\n },\n externalSummaryUrlImage: {\n height: 13,\n width: 13,\n marginBottom: 1\n }\n});\nexport const ExternalRatingSummary = ({ ratingSummary = getEmptyRatingSummary(), image = '', showImage = true, source }, context)=>{\n ratingSummary = ratingSummary || getEmptyRatingSummary();\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"externalRatingSummaryContainer\",\n children: [\n showImage && /*#__PURE__*/ _jsx(\"div\", {\n className: contentStyles.externalRatingSourceImage,\n children: /*#__PURE__*/ _jsx(Image, {\n src: image,\n className: \"externalRatingSummaryImage\",\n alt: context.loc('External_Rating_Summary_Image_Alt', 'Rating summary image')\n })\n }),\n /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n tokens: {\n childrenGap: 8\n },\n children: [\n /*#__PURE__*/ _jsx(Text, {\n className: contentStyles.externalRatingSummariesTitle,\n children: context.loc(`ExternalRatingSummaries_${source}_Title`, `${source} ratings`)\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"externalRatingSummaryRightContainer\",\n children: /*#__PURE__*/ _jsx(Link, {\n className: \"externalSummaryUrl\",\n href: getExternalProductLink(ratingSummary.ExternalOfferReference),\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n onClick: ()=>{\n launchTelemetry(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.ExternalRatingSummaryLink, {\n source: ratingSummary.Source\n });\n logger.info(JSON.stringify({\n source: ratingSummary.Source\n }), {\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.ExternalRatingSummaryLink\n });\n },\n children: /*#__PURE__*/ _jsx(Image, {\n src: redirectLogo,\n className: contentStyles.externalSummaryUrlImage,\n alt: context.loc('ExternalRatingSummaries_External_Summary_Logo_Alt', 'External rating provider logo')\n })\n })\n })\n ]\n })\n ]\n }, `externalRatingSummaryContainer${ratingSummary.Source}`);\n};\nExternalRatingSummary.contextTypes = {\n loc: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { Label, Stack, Text, mergeStyleSets, Image } from '@fluentui/react';\nimport { ExternalRatingSummary } from './externalRatingSummary';\nimport ratingStar from '@shared/images/RatingStarFilled.svg';\nimport { getTotalExternalRatingSummariesInfo } from '@shared/utils/reviewsUtils';\nimport * as PropTypes from 'prop-types';\nconst contentStyles = mergeStyleSets({\n ratingDisplayWrapper: {\n marginTop: 16\n },\n externalRatingSummariesAverage: [\n 'externalRatingSummariesAverage',\n {\n '& .externalRatingSummariesNumOfStars': {\n padding: 0\n }\n }\n ]\n});\nexport const ExternalRatingSummaries = ({ externalRatingSummaries = [] }, context)=>{\n const rawRatingSummaries = externalRatingSummaries === null || externalRatingSummaries === void 0 ? void 0 : externalRatingSummaries.map((externalRatingSummary)=>externalRatingSummary.ratingSummary);\n const externalSummariesInfo = getTotalExternalRatingSummariesInfo(rawRatingSummaries);\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"externalRatingSummariesContainer\",\n children: [\n /*#__PURE__*/ _jsx(Stack, {\n tokens: {\n childrenGap: 2,\n padding: 1\n },\n children: externalRatingSummaries === null || externalRatingSummaries === void 0 ? void 0 : externalRatingSummaries.map((externalRatingSummary)=>/*#__PURE__*/ _jsx(_Fragment, {\n children: /*#__PURE__*/ _jsx(ExternalRatingSummary, {\n ratingSummary: externalRatingSummary.ratingSummary,\n image: externalRatingSummary.image,\n showImage: true,\n source: externalRatingSummary.ratingSummary.Source\n }, `${externalRatingSummary.ratingSummary.Source}-ExternalRatingSummary`)\n }))\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n children: externalRatingSummaries && /*#__PURE__*/ _jsx(Stack, {\n horizontal: true,\n className: contentStyles.ratingDisplayWrapper,\n children: /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n className: contentStyles.externalRatingSummariesAverage,\n children: [\n /*#__PURE__*/ _jsx(Image, {\n className: \"externalRatingSummariesStar\",\n src: ratingStar,\n alt: context.loc('Rating_Star_Image_Alt', 'Rating star')\n }),\n /*#__PURE__*/ _jsx(Label, {\n className: \"externalRatingSummariesNumOfStars\",\n children: externalSummariesInfo.averageRatings.toFixed(1)\n }),\n /*#__PURE__*/ _jsxs(Text, {\n className: \"externalRatingSummariesNumOfRatingText\",\n variant: \"mediumPlus\",\n children: [\n \"(\",\n context.locParams('Global_Loc_NumOfRatingsLower', [\n externalSummariesInfo.totalRatings.toString()\n ]),\n \")\"\n ]\n })\n ]\n })\n })\n })\n ]\n });\n};\nExternalRatingSummaries.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { ExternalRatingSummaries as ExternalRatingSummariesComponent } from '@shared/components/externalRatingSummaries';\nimport { connect } from 'react-redux';\nexport const mapStateToProps = (state, ownProps)=>{\n return _object_spread_props(_object_spread({}, ownProps), {\n storefrontName: state.config.storefrontName\n });\n};\nexport const ExternalRatingSummaries = connect(mapStateToProps)(ExternalRatingSummariesComponent);\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { SafeHtmlWrapper } from '@shared/components/safeHtmlWrapper';\nimport { Constants } from '@shared/utils/constants';\nconst getTermsLink = (app)=>{\n const { UsesEnterpriseContract = false, licenseTermsUrl = '' } = app;\n let terms;\n if (UsesEnterpriseContract) {\n terms = {\n link: Constants.enterpriseContractLink,\n locKey: 'ECA_Link'\n };\n } else {\n terms = {\n link: licenseTermsUrl,\n locKey: 'TRY_Terms2'\n };\n }\n return terms;\n};\nconst generateLink = (text, link)=>{\n return `<a href='${link}' rel='noopener' target='_blank'>${text}</a>`;\n};\nexport const UserTerms = ({ app }, context)=>{\n const terms = getTermsLink(app);\n const { detailInformation } = app;\n const privacyPolicyUrl = detailInformation === null || detailInformation === void 0 ? void 0 : detailInformation.PrivacyPolicyUrl;\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n const termsOfUse = generateLink(context.loc('Provider_Terms', 'terms of use'), terms.link);\n const privacyPolicy = generateLink(context.loc('TRY_PrivacyPolicy', 'privacy policy'), privacyPolicyUrl);\n const termsLink = generateLink(context.loc('TRY_Terms', 'terms'), Constants.MicrosoftTermsURL);\n const privacyLink = generateLink(context.loc('TRY_Privacy', 'privacy'), Constants.MicrosoftPrivacyStatementURL);\n const userTermsFallback = `By getting this product, I give Microsoft permission to use or share my account\n information so that the provider can contact me regarding this product and related products.\n I agree to the provider's ${termsOfUse} and ${privacyPolicy} and understand that the rights to use this product do not come from Microsoft, unless Microsoft is the provider.\n Use of AppSource is governed by separate ${termsLink} and ${privacyLink}.`;\n return /*#__PURE__*/ _jsx(SafeHtmlWrapper, {\n html: context.locParams('Apps_PDP_Consent_Disclaimer', [\n termsOfUse,\n privacyPolicy,\n termsLink,\n privacyLink\n ], userTermsFallback)\n });\n};\nUserTerms.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from '@shared/components/spzaComponent';\nimport { AppReviewItem } from '@shared/components/appReviewItem';\nimport { Constants } from '@shared/utils/constants';\nimport { RatingSummary } from '@shared/components/ratingSummary';\nimport { createDeepLinkPagination, createDefaultPagination, getAddReviewSectionDescription, getReviewCtaButtonText, launchTelemetry, getExternalRatingSummaries, findReviewsSources, getRatingSummaryByType } from '@shared/utils/reviewsUtils';\nimport { ReviewsDropDowns } from '@shared/components/reviewsDropDowns';\nimport { DefaultButton, mergeStyleSets, Spinner, Stack, ScreenWidthMinXLarge, ScreenWidthMinXXLarge } from '@fluentui/react';\nimport { NoReviewsToShow } from '@shared/components/noReviewsToShow';\nimport { getWindow } from '@shared/services/window';\nimport { logger } from '@src/logger';\nimport { isSignedInChanged } from '@shared/utils/appUtils';\nimport { NeutralColors, CommunicationColors } from '@fluentui/theme';\nimport { ExternalRatingSummaries } from '@shared/containers/externalRatingSummaries';\nimport { shouldShowUserTerms } from '@shared/utils/detailUtils';\nimport { UserTerms } from '@appsource/components/userTerms';\nimport classNames from 'classnames';\nconst DEFAULT_STICKY_HEIGHT = 64;\nconst DEFAULT_MENU_HEIGHT = 54;\nconst SCROLL_TO_REVIEW_TOP_MARGIN = 16;\nconst contentStyles = mergeStyleSets({\n reviewsTopBar: [\n 'reviewsTopBar',\n {\n marginBottom: 24\n }\n ],\n reviewsDateLabel: {\n color: NeutralColors.gray130\n },\n reviewsDetailsTopBlockContainer: {\n display: 'flex',\n width: '100%',\n [`@media (min-width: ${ScreenWidthMinXLarge}px)`]: {\n flexDirection: 'row'\n },\n [`@media (max-width: ${ScreenWidthMinXLarge - 1}px)`]: {\n flexDirection: 'column-reverse'\n }\n },\n reviewsTabTop: {\n paddingTop: 24,\n [`@media (max-width: ${ScreenWidthMinXLarge - 1}px)`]: {\n paddingTop: 0\n }\n },\n reviewsContainer: {\n display: 'flex',\n flexWrap: 'wrap'\n },\n userTermsContainer: {\n backgroundColor: NeutralColors.white,\n border: '1px solid #EAEAEA',\n borderRadius: '2px',\n height: 'fit-content',\n [`@media (max-width: ${ScreenWidthMinXLarge - 1}px)`]: {\n margin: '36 0 24 0'\n },\n [`@media (min-width: ${ScreenWidthMinXLarge - 1}px)`]: {\n marginBottom: 28\n },\n [`@media (min-width: ${ScreenWidthMinXLarge}px) and (max-width: ${ScreenWidthMinXXLarge - 1}px)`]: {\n marginLeft: 40,\n minWidth: 200,\n maxWidth: 200\n },\n [`@media (min-width: ${ScreenWidthMinXXLarge}px)`]: {\n marginLeft: 32,\n minWidth: 256,\n maxWidth: 256\n },\n '& a:link': {\n color: CommunicationColors.primary,\n textDecoration: 'underline'\n },\n '& a:visited': {\n color: CommunicationColors.primary\n },\n '& a:hover': {\n color: CommunicationColors.shade20\n },\n '& a:active': {\n color: CommunicationColors.shade30\n }\n }\n});\nconst consentDisclaimerTokens = {\n padding: 16\n};\n// Displays a collection of AppReviews\nexport class AppReviewCollection extends SpzaComponent {\n componentDidMount() {\n const { ensureAppReviewsData, appId, userInfo } = this.props;\n ensureAppReviewsData(appId).then(()=>this.loadReviewsToState(true));\n if (userInfo.signedIn) {\n this.loadReviewIdsMarkedAsHelpful();\n this.loadUserProductReviewMetadata();\n }\n }\n componentDidUpdate(prevProps) {\n const { ensureAppReviewsData, appId } = this.props;\n if (prevProps.reviewsData !== this.props.reviewsData) {\n this.loadReviewsToState(false);\n }\n if (isSignedInChanged(this.props.userInfo.signedIn, prevProps.userInfo.signedIn)) {\n ensureAppReviewsData(appId);\n this.loadReviewIdsMarkedAsHelpful();\n this.loadUserProductReviewMetadata();\n }\n this.scrollToReviewIfNeeded();\n }\n loadReviewIdsMarkedAsHelpful() {\n const { loadReviewIdsMarkedAsHelpful, appId: offerId } = this.props;\n loadReviewIdsMarkedAsHelpful({\n offerId\n });\n }\n loadUserProductReviewMetadata() {\n const { loadUserProductReviewMetadata, appId: legacyId } = this.props;\n loadUserProductReviewMetadata({\n legacyId\n });\n }\n loadReviewsToState(deepLinkMode) {\n const reviews = this.props.reviewsData.reviews;\n // If there are no reviews we get an empty string, we just need to convert it into an array.\n let returnedReviews = [];\n if (reviews && Array.isArray(returnedReviews)) {\n // Filter out any reviews that lack both a title and a description\n returnedReviews = reviews.filter((review)=>review.content || review.title);\n }\n let pagination = createDefaultPagination(returnedReviews);\n let scrollToReview = false;\n // Deep link into review. Select the right page and \"trigger\" scroll action.\n if (deepLinkMode && this.props.reviewId) {\n pagination = createDeepLinkPagination(reviews, this.props.reviewId);\n scrollToReview = true;\n }\n this.setState({\n reviewList: returnedReviews,\n originalReviewList: returnedReviews,\n currentStart: pagination.startIndex,\n currentEnd: pagination.endIndex,\n currentPageNumber: pagination.pageIndex,\n scrollToReview: scrollToReview\n });\n return pagination;\n }\n renderReviews(start, end, reviewList) {\n const { appId, locale, isEmbed, appData, userInfo, openSignInModal, reviewsData, markedAsHelpful } = this.props;\n const { userReviewIdsMarkedAsHelpful = [] } = markedAsHelpful;\n if (!reviewList) {\n return [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"reviewsLoadingSpinner\",\n children: /*#__PURE__*/ _jsx(Spinner, {\n label: this.context.loc('AppDetail_LoadingText', 'Loading...'),\n ariaLive: \"assertive\",\n labelPosition: \"left\"\n })\n }, \"reviewsLoading\")\n ];\n }\n if (reviewList && reviewList.length === 0) {\n return [\n /*#__PURE__*/ _jsx(NoReviewsToShow, {\n context: this.context,\n isOfferPurchased: reviewsData.isPurchased,\n openReviewModal: this.openReviewModal\n }, 0)\n ];\n }\n // This is to handle the last page. If there number of reviews is less than the end of page, then\n // we don't have to loop until end. We can stop at the point when there are no more reviews.\n const listEnd = reviewList.length < end ? reviewList.length : end;\n const appReviewItems = [];\n let i = 0;\n // 'start' begins from 1.\n for(i = start - 1; i < listEnd; i++){\n const review = reviewList[`${i}`];\n appReviewItems.push(/*#__PURE__*/ _jsx(AppReviewItem, {\n reviewItemShown: this.onReviewItemShown,\n appId: appId,\n review: review,\n locale: locale,\n isEmbed: isEmbed,\n publisher: appData ? appData.publisher : '',\n iconUrl: appData ? appData.iconURL : '',\n isSignedIn: userInfo.signedIn,\n isMarkedAsHelpful: userReviewIdsMarkedAsHelpful.includes(review.id),\n onToggleMarkAsHelpful: ({ isHelpful })=>this.toggleMarkAsHelpful({\n review,\n isHelpful\n }),\n openSignInModal: openSignInModal,\n fallbackReviewSourceName: Constants.StorefrontName.AppSource,\n authorPersona: true,\n dateLabelClassName: contentStyles.reviewsDateLabel\n }));\n }\n return appReviewItems;\n }\n toggleMarkAsHelpful(args) {\n const { appId: offerId, toggleMarkAsHelpful } = this.props;\n toggleMarkAsHelpful(_object_spread_props(_object_spread({}, args), {\n offerId\n }));\n }\n getReviewCounterText() {\n var _this_state_currentStart, _this_state_currentEnd, _this_state_reviewList_length;\n if (!this.state.reviewList || this.state.reviewList.length === 0) {\n return null;\n }\n return this.context.locParams('ReviewCollection_ReviewsCounterOfTotal', [\n ((_this_state_currentStart = this.state.currentStart) === null || _this_state_currentStart === void 0 ? void 0 : _this_state_currentStart.toString()) || '',\n ((_this_state_currentEnd = this.state.currentEnd) === null || _this_state_currentEnd === void 0 ? void 0 : _this_state_currentEnd.toString()) || '',\n ((_this_state_reviewList_length = this.state.reviewList.length) === null || _this_state_reviewList_length === void 0 ? void 0 : _this_state_reviewList_length.toString()) || ''\n ], 'Showing {0}-{1} of {2} reviews');\n }\n setCurrentPage(event) {\n var _event_target;\n const idClicked = event === null || event === void 0 ? void 0 : (_event_target = event.target) === null || _event_target === void 0 ? void 0 : _event_target.id;\n if (!idClicked) {\n return;\n }\n // This indicates the current page which should be displayed\n let pageNumberClicked = 0;\n if (idClicked === 'previous') {\n pageNumberClicked = this.state.currentPageNumber - 1;\n } else if (idClicked === 'next') {\n pageNumberClicked = this.state.currentPageNumber + 1;\n } else {\n // if it was not prev/next, then we have a page number.\n pageNumberClicked = parseInt(idClicked, 10);\n }\n // Page number * number of items per page gives the total number of items displayed.\n // Since we want the total number of items displayed so far, we do -1.\n const startArrayIndex = (pageNumberClicked - 1) * Constants.MaxItemsPerPageInReviews;\n // startArrayIndex is the total number of items displayed so far. We don't want to display the\n // last item from the prev page. So currentPageStart should be a +1 from that.\n const currentPageStart = startArrayIndex + 1;\n let currentPageEnd = startArrayIndex + Constants.MaxItemsPerPageInReviews;\n // the number of reviews in the last page can be less then 10, in this case currentPageEnd should be the current total number of reviews\n currentPageEnd = currentPageEnd > this.state.reviewList.length ? this.state.reviewList.length : currentPageEnd;\n this.setState((prevState)=>{\n return {\n reviewList: prevState.reviewList,\n currentStart: currentPageStart,\n currentEnd: currentPageEnd,\n currentPageNumber: pageNumberClicked\n };\n });\n const telemetryDetails = {\n currentPageNumber: pageNumberClicked,\n previousPageNumber: this.state.currentPageNumber,\n currentReviewListStart: currentPageStart,\n currentReviewListEnd: currentPageEnd,\n reviewListLength: this.state.reviewList && this.state.reviewList.length || 0\n };\n launchTelemetry(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.ReviewPageNavigationButton, telemetryDetails);\n logger.info(JSON.stringify(telemetryDetails), {\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewPageNavigationButton\n });\n }\n getPaginationList() {\n // If the number of reviews is less than the items per page, then pagination div is not necessary.\n if (!this.state.reviewList || this.state.reviewList.length < Constants.MaxItemsPerPageInReviews) {\n return null;\n }\n const reviewListLength = this.state.reviewList.length;\n let numberOfPages = Math.floor(reviewListLength / Constants.MaxItemsPerPageInReviews);\n // The final page has lesser number of items than 'MaxItemsPerPageInReviews'\n // then we'll have a reminder set of reviews which should go into its own page.\n if (reviewListLength % Constants.MaxItemsPerPageInReviews > 0) {\n numberOfPages++;\n }\n let i = 0;\n const pageNumberList = [];\n // Only for pages greater than 1 we would show 'previous'.\n if (this.state.currentPageNumber > 1) {\n pageNumberList.push(/*#__PURE__*/ _jsx(\"li\", {\n children: /*#__PURE__*/ _jsx(\"a\", {\n href: \"#\",\n className: \"c-glyph paginationPrevious\",\n \"aria-label\": \"Previous page\",\n // eslint-disable-next-line react/forbid-dom-props\n id: \"previous\",\n onClick: (event)=>this.setCurrentPage(event),\n children: this.context.loc('PAGINATION_Previous')\n })\n }, \"prev\"));\n }\n let pageNumberStart = 0;\n let pageNumberEnd = Math.min(numberOfPages, 9);\n if (this.state.currentPageNumber > 4 && numberOfPages >= 9) {\n // if there are more than 9 pages, then we want to show only 9 at a time.\n // 4 (or how many ever exists) after the current one - if exists. Otherwise upto the maximum number of pages.\n pageNumberEnd = Math.min(this.state.currentPageNumber + 4, numberOfPages);\n // pageNumberStart should be 4 pages before the current one.\n // pageNumberStart can never be negative for the following reasons.\n // This condition is executed only if number of pages is greater than 9.\n // Also min value of currentPageNumber > 4 is 5. pageNumberEnd can either be currentPageNumber + 4 (which is 9)\n // or number of pages (which, if it has entered this block is at least 9).\n pageNumberStart = pageNumberEnd - 9;\n }\n for(i = pageNumberStart; i < pageNumberEnd; i++){\n const isActive = this.state.currentPageNumber === i + 1;\n pageNumberList.push(/*#__PURE__*/ _jsx(\"li\", {\n className: isActive ? 'f-active' : null,\n children: /*#__PURE__*/ _jsx(\"a\", {\n href: \"#\",\n \"aria-current\": isActive,\n \"aria-label\": 'Page ' + (i + 1),\n // eslint-disable-next-line react/forbid-dom-props\n id: (i + 1).toString(),\n onClick: (event)=>this.setCurrentPage(event),\n children: i + 1\n })\n }, i));\n }\n // If we are at the last page we shouldn't show the 'next' button.\n if (this.state.currentPageNumber < numberOfPages) {\n pageNumberList.push(/*#__PURE__*/ _jsx(\"li\", {\n children: /*#__PURE__*/ _jsx(\"a\", {\n href: \"#\",\n className: \"c-glyph paginationNext\",\n \"aria-label\": \"Next page\",\n // eslint-disable-next-line react/forbid-dom-props\n id: \"next\",\n onClick: (event)=>this.setCurrentPage(event),\n children: this.context.loc('PAGINATION_Next')\n })\n }, \"next\"));\n }\n return /*#__PURE__*/ _jsx(\"ul\", {\n className: \"m-pagination\",\n children: pageNumberList\n });\n }\n renderReviewsDetailsTopBlock(externalRatingSummaries) {\n const { appData, billingCountryCode } = this.props;\n const internalSummaries = getRatingSummaryByType(appData === null || appData === void 0 ? void 0 : appData.ratingSummaries, Constants.Reviews.ReviewsSource.Internal);\n const textButton = getReviewCtaButtonText(this.context, this.props.reviewsData.userReview);\n return this.props.reviewsData.entityId === this.props.appId && /*#__PURE__*/ _jsx(Stack.Item, {\n className: classNames([\n 'reviewTabTop',\n contentStyles.reviewsTabTop\n ]),\n children: /*#__PURE__*/ _jsxs(Stack, {\n className: contentStyles.reviewsDetailsTopBlockContainer,\n children: [\n /*#__PURE__*/ _jsxs(Stack.Item, {\n grow: true,\n className: contentStyles.reviewsContainer,\n children: [\n /*#__PURE__*/ _jsx(RatingSummary, {\n ratingSummary: internalSummaries || (appData === null || appData === void 0 ? void 0 : appData.ratingSummary),\n context: this.context,\n title: internalSummaries ? this.context.loc('RatingSummary_Title', 'Marketplace ratings') : this.context.loc('AppDetails_ASRatings', 'AppSource ratings')\n }),\n (externalRatingSummaries === null || externalRatingSummaries === void 0 ? void 0 : externalRatingSummaries.length) > 0 && /*#__PURE__*/ _jsx(ExternalRatingSummaries, {\n externalRatingSummaries: externalRatingSummaries\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"addReview\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"addReviewTitle\",\n children: this.context.loc('AppReviewCollection_SubHeaderTitle_Text', 'Your review')\n }),\n /*#__PURE__*/ _jsx(DefaultButton, {\n className: \"reviewCTA\",\n text: textButton,\n onClick: this.openReviewModal,\n \"data-bi-id\": Constants.JsllCTAId.WriteReview,\n \"data-bi-area\": \"Review\",\n \"aria-label\": textButton,\n disabled: !this.props.reviewsData.isPurchased\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"addReviewDescription\",\n children: getAddReviewSectionDescription(this.context, this.props.reviewsData.isPurchased)\n })\n ]\n })\n ]\n }),\n shouldShowUserTerms({\n app: appData,\n billingCountryCode\n }) && /*#__PURE__*/ _jsx(Stack.Item, {\n tokens: consentDisclaimerTokens,\n className: contentStyles.userTermsContainer,\n children: /*#__PURE__*/ _jsx(UserTerms, {\n app: appData\n })\n })\n ]\n })\n });\n }\n renderImpl() {\n var _this_props_appData;\n const externalRatingSummaries = getExternalRatingSummaries((_this_props_appData = this.props.appData) === null || _this_props_appData === void 0 ? void 0 : _this_props_appData.ratingSummaries);\n const updateStateByFilters = {\n updatePaginationState: this.updatePaginationState,\n updateStateByFilters: this.updateStateByFilters,\n updateStateBySortFilter: this.updateStateBySortFilter\n };\n const { userCommentedReviewIds, reviewsData, showMyCommentsFilter } = this.props;\n const { hasInternalReviews, hasExternalReviews } = findReviewsSources(reviewsData);\n return /*#__PURE__*/ _jsxs(Stack, {\n className: \"spza_ASappReviewContainer\",\n children: [\n this.props.isEmbed ? null : this.renderReviewsDetailsTopBlock(externalRatingSummaries),\n this.props.reviewsData.entityId === this.props.appId && /*#__PURE__*/ _jsxs(\"div\", {\n className: contentStyles.reviewsTopBar,\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"reviewCounter\",\n children: /*#__PURE__*/ _jsx(\"div\", {\n children: this.getReviewCounterText()\n })\n }),\n /*#__PURE__*/ _jsx(ReviewsDropDowns, {\n curSourceFilter: this.state.sourceFilter,\n curSortBy: this.state.sortBy,\n curRatingFilter: this.state.ratingsFilter,\n context: this.context,\n updateReviewsState: updateStateByFilters,\n originalReviewList: this.state.originalReviewList,\n curReviewsList: this.state.reviewList,\n externalReviewsExist: hasExternalReviews,\n internalReviewsExist: hasInternalReviews,\n userReview: reviewsData.userReview,\n userCommentedReviewIds: userCommentedReviewIds,\n showMyCommentsFilter: showMyCommentsFilter\n })\n ]\n }),\n this.renderReviews(this.state.currentStart, this.state.currentEnd, this.state.reviewList),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"reviewCounter-bottom\",\n children: this.state.reviewList && this.state.reviewList.length >= Constants.MaxItemsPerPageInReviews ? this.getReviewCounterText() : null\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"reviewPagination\",\n children: this.getPaginationList()\n }, this.state.currentPageNumber)\n ]\n });\n }\n constructor(props, state){\n super(props), _define_property(this, \"context\", void 0), _define_property(this, \"onReviewItemShown\", (reviewId, reviewCompRef)=>{\n if (this.props.reviewId && reviewCompRef && this.props.reviewId === reviewId) {\n this.setState({\n scrollToReviewItemRef: reviewCompRef\n });\n }\n }), _define_property(this, \"scrollToReviewIfNeeded\", ()=>{\n if (this.state.scrollToReview && this.state.scrollToReviewItemRef && this.props.reviewId && this.state.scrollToReviewItemRef.current) {\n const elementPosition = this.state.scrollToReviewItemRef.current.getBoundingClientRect().top;\n const offsetPosition = elementPosition - this.getReviewsScrollOffset();\n getWindow().scrollTo({\n top: offsetPosition,\n behavior: 'smooth'\n });\n this.setState({\n scrollToReview: false\n });\n }\n }), _define_property(this, \"getReviewsScrollOffset\", ()=>{\n const stickyCardHeight = this.context.getAppDetailsStickyCardHeight();\n const mainMenuHeight = this.context.getAppHeaderHeight();\n const headerOffset = (stickyCardHeight || DEFAULT_STICKY_HEIGHT) + (mainMenuHeight || DEFAULT_MENU_HEIGHT) + SCROLL_TO_REVIEW_TOP_MARGIN;\n return headerOffset;\n }), _define_property(this, \"openReviewModal\", ()=>{\n var _this_props_location_query, _this_props_location;\n let ctaType = null;\n if ((_this_props_location = this.props.location) === null || _this_props_location === void 0 ? void 0 : (_this_props_location_query = _this_props_location.query) === null || _this_props_location_query === void 0 ? void 0 : _this_props_location_query.ctatype) {\n ctaType = this.props.location.query.ctatype;\n }\n launchTelemetry(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.OpenRatingModalFromReviewTab, {\n appId: this.props.appId\n });\n logger.info(JSON.stringify({\n appId: this.props.appId\n }), {\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.OpenRatingModalFromReviewTab\n });\n this.props.openRatingModal(this.props.appData, null, ctaType, ()=>{\n launchTelemetry(Constants.Telemetry.Action.Open, Constants.Telemetry.ActionModifier.OpenRatingModalFromReviewTab, {\n appId: this.props.appId\n });\n logger.info(JSON.stringify({\n appId: this.props.appId\n }), {\n action: Constants.Telemetry.Action.Open,\n actionModifier: Constants.Telemetry.ActionModifier.OpenRatingModalFromReviewTab\n });\n this.clearFiltersByState();\n });\n }), _define_property(this, \"updatePaginationState\", (curPageNumber, curStart, currentEnd)=>{\n this.setState({\n currentPageNumber: curPageNumber,\n currentStart: curStart,\n currentEnd: currentEnd\n });\n }), _define_property(this, \"updateStateByFilters\", (updatedRatingsFilter, updatedReviewList, updatedSourceFilter)=>{\n this.setState({\n ratingsFilter: updatedRatingsFilter,\n reviewList: updatedReviewList,\n sourceFilter: updatedSourceFilter\n });\n }), _define_property(this, \"clearFiltersByState\", ()=>{\n this.setState({\n sourceFilter: null,\n ratingsFilter: null,\n sortBy: null\n });\n }), _define_property(this, \"updateStateBySortFilter\", (updatedSortBy)=>{\n this.setState({\n sortBy: updatedSortBy\n });\n });\n this.state = state || {\n currentStart: 1,\n currentEnd: 1,\n currentPageNumber: 1,\n scrollToReview: false,\n scrollToReviewItemRef: null\n };\n }\n}\nAppReviewCollection.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n getAppDetailsStickyCardHeight: PropTypes.func,\n getAppHeaderHeight: PropTypes.func\n};\n","import * as React from 'react';\nimport { AppReviewCollection as AppReviewCollectionComponent } from '@appsource/components/appReviewCollection';\nimport { ensureAppReviewsData, loadUserMarkedAsHelpfulReviews, setReviewMarkedAsHelpful, loadUserProductReviewMetadata } from '@shared/actions/thunkActions';\nimport { createModalAction, createRatingAction } from '@shared/actions/actions';\nimport { Constants } from '@shared/utils/constants';\nimport { connect } from 'react-redux';\nimport { withRouter } from '@shared/routerHistory';\nexport const mapStateToProps = (state, ownProps)=>{\n var _state_config_query;\n return {\n reviewsData: state.apps.appReviewsData,\n appId: ownProps.appId,\n locale: state.config.locale,\n appData: ownProps.appData,\n location: ownProps.location,\n reviewId: (_state_config_query = state.config.query) === null || _state_config_query === void 0 ? void 0 : _state_config_query.reviewId,\n userInfo: state.users,\n markedAsHelpful: state.apps.appReviewsData.markedAsHelpful,\n userCommentedReviewIds: state.apps.appReviewsData.userCommentedReviewIds,\n billingCountryCode: state.config.billingCountryCode,\n showMyCommentsFilter: state.config.featureFlags.ReviewsMyCommentsFilter === 'true'\n };\n};\nconst mapDispatchToProps = (dispatch)=>{\n return {\n ensureAppReviewsData: (entityId, forceUpdate = false)=>dispatch(ensureAppReviewsData(entityId, forceUpdate)),\n openRatingModal: (app, accessKey, ctaType, callback)=>dispatch(createRatingAction({\n showModal: true,\n app: app,\n accessKey: accessKey,\n ctaType: ctaType,\n callback: callback\n })),\n openSignInModal: ()=>dispatch(createModalAction({\n showModal: true,\n modalId: Constants.ModalType.SignIn\n })),\n toggleMarkAsHelpful: (args)=>dispatch(setReviewMarkedAsHelpful(args)),\n loadReviewIdsMarkedAsHelpful: (args)=>dispatch(loadUserMarkedAsHelpfulReviews(args)),\n loadUserProductReviewMetadata: (args)=>dispatch(loadUserProductReviewMetadata(args))\n };\n};\nexport const AppReviewCollection = withRouter(connect(mapStateToProps, mapDispatchToProps)(AppReviewCollectionComponent));\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nconst MultilineColumn = ({ columnKey, columnValue, shouldUseSetInnerHTML })=>{\n const lines = columnValue.map((item, key)=>{\n if (shouldUseSetInnerHTML) {\n return(// eslint-disable-next-line react/no-danger\n /*#__PURE__*/ _jsx(\"span\", {\n dangerouslySetInnerHTML: {\n __html: item\n },\n children: /*#__PURE__*/ _jsx(\"br\", {})\n }, key));\n }\n return /*#__PURE__*/ _jsxs(\"span\", {\n children: [\n item,\n /*#__PURE__*/ _jsx(\"br\", {})\n ]\n }, key);\n });\n return(// eslint-disable-next-line react/forbid-dom-props\n /*#__PURE__*/ _jsx(\"td\", {\n id: columnKey,\n className: columnKey,\n children: lines\n }));\n};\nexport const SortedTableColumn = ({ columnKey, columnValue, className, tableProps })=>{\n const { spanColumns, setInnerHTMLColumns, multiLineColumns } = tableProps;\n if (!columnValue) {\n return null;\n }\n const columnClassName = `${columnKey} ${className}`;\n // If this flag is set a span tag is added around the content of table data. Default - no span tag added.\n const shouldAddSpanTag = spanColumns ? spanColumns.indexOf(columnKey) >= 0 : false;\n // If this flag is set, we will use dangerouslySetInnerHTML\n const shouldUseSetInnerHTML = setInnerHTMLColumns ? setInnerHTMLColumns.indexOf(columnKey) >= 0 : false;\n // If this flag is set the content of table data can have breaks within it. Default - A single line.\n const shouldShowMultiLine = multiLineColumns ? multiLineColumns.indexOf(columnKey) >= 0 : false;\n if (columnValue instanceof Array && shouldShowMultiLine) {\n return /*#__PURE__*/ _jsx(MultilineColumn, {\n columnKey: columnKey,\n columnValue: columnValue,\n shouldUseSetInnerHTML: shouldUseSetInnerHTML\n });\n } else if (typeof columnValue === 'string' || typeof columnValue === 'number' || typeof columnValue === 'object') {\n if (shouldAddSpanTag) {\n return(// eslint-disable-next-line react/forbid-dom-props\n /*#__PURE__*/ _jsx(\"td\", {\n id: columnKey,\n className: columnClassName,\n children: /*#__PURE__*/ _jsx(\"span\", {\n children: columnValue\n })\n }));\n } else if (shouldUseSetInnerHTML) {\n return /*#__PURE__*/ _jsx(\"td\", {\n // eslint-disable-next-line react/forbid-dom-props\n id: columnKey,\n className: columnClassName,\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML: {\n __html: columnValue\n }\n });\n } else {\n return(// eslint-disable-next-line react/forbid-dom-props\n /*#__PURE__*/ _jsx(\"td\", {\n id: columnKey,\n className: columnClassName,\n children: columnValue\n }));\n }\n }\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport SpzaComponent from '../spzaComponent';\nimport { SortedTableColumn } from './sortedTableColumn';\nconst SortOrder = {\n None: 'none',\n Ascending: 'ascending',\n Descending: 'descending'\n};\nfunction SortArrayByProperty(inputArray, propertyName, order) {\n const comparer = function(arg0, arg1) {\n if (typeof arg0[`${propertyName}`] !== 'number' || typeof arg1[`${propertyName}`] !== 'number') {\n return 0;\n }\n return order === SortOrder.Ascending ? arg0[`${propertyName}`] - arg1[`${propertyName}`] : arg1[`${propertyName}`] - arg0[`${propertyName}`];\n };\n return inputArray.sort(comparer);\n}\nexport class SortedTable extends SpzaComponent {\n renderImpl() {\n var _multiLineRowsConfiguration_multilineColumns;\n const { multiLineRowsConfiguration, tbody, defaultSortingDisabled } = this.props;\n let tableData = defaultSortingDisabled ? tbody : tbody.sort((a, b)=>{\n const titleA = a.title ? a.title.toUpperCase() : a.category.toUpperCase();\n const titleB = b.title ? b.title.toUpperCase() : b.category.toUpperCase();\n return titleA < titleB ? 1 : titleA > titleB ? -1 : 0;\n });\n tableData = this.props.sortConfig.sortColumnName ? SortArrayByProperty(tableData, this.props.sortConfig.sortColumnName, this.props.sortConfig.sortOrder) : tableData;\n const hasMultilineConfig = !!(multiLineRowsConfiguration === null || multiLineRowsConfiguration === void 0 ? void 0 : (_multiLineRowsConfiguration_multilineColumns = multiLineRowsConfiguration.multilineColumns) === null || _multiLineRowsConfiguration_multilineColumns === void 0 ? void 0 : _multiLineRowsConfiguration_multilineColumns.length);\n const rowRenderingFunction = hasMultilineConfig ? this.renderMultilineRow(multiLineRowsConfiguration) : this.renderOldSingleLineRow;\n return /*#__PURE__*/ _jsxs(\"table\", {\n \"data-f-sort\": \"true\",\n children: [\n /*#__PURE__*/ _jsx(\"thead\", {\n children: this.props.thead\n }),\n /*#__PURE__*/ _jsx(\"tbody\", {\n children: tableData.map((row)=>rowRenderingFunction(row))\n })\n ]\n });\n }\n constructor(...args){\n super(...args), // This is the old implementation of the component and new implemnantion is under multiyear feature flag\n _define_property(this, \"renderOldSingleLineRow\", (row)=>{\n const columns = [];\n Object.keys(row).forEach((propertyName)=>{\n // If this flag is set the property is not rendered. Default - property is rendered.\n const shouldIgnore = this.props.ignore ? this.props.ignore.indexOf(propertyName) >= 0 : false;\n // If this flag is set a span tag is added around the content of table data. Default - no span tag added.\n const shouldAddSpanTag = this.props.spanColumns ? this.props.spanColumns.indexOf(propertyName) >= 0 : false;\n // If this flag is set, we will use dangerouslySetInnerHTML\n const shouldUseSetInnerHTML = this.props.setInnerHTMLColumns ? this.props.setInnerHTMLColumns.indexOf(propertyName) >= 0 : false;\n // If this flag is set the content of table data can have breaks within it. Default - A single line.\n const shouldShowMultiLine = this.props.multiLineColumns ? this.props.multiLineColumns.indexOf(propertyName) >= 0 : false;\n if (!shouldIgnore && row[`${propertyName}`]) {\n if (row[`${propertyName}`] instanceof Array && shouldShowMultiLine) {\n if (row[`${propertyName}`]) {\n const lines = row[`${propertyName}`].map(function(item, key) {\n if (shouldUseSetInnerHTML) {\n return(// eslint-disable-next-line react/no-danger\n /*#__PURE__*/ _jsx(\"span\", {\n dangerouslySetInnerHTML: {\n __html: item\n },\n children: /*#__PURE__*/ _jsx(\"br\", {})\n }, key));\n }\n return /*#__PURE__*/ _jsxs(\"span\", {\n children: [\n item,\n /*#__PURE__*/ _jsx(\"br\", {})\n ]\n }, key);\n });\n columns.push(// eslint-disable-next-line react/forbid-dom-props\n /*#__PURE__*/ _jsx(\"td\", {\n id: propertyName,\n className: propertyName,\n children: lines\n }));\n }\n } else if (typeof row[`${propertyName}`] === 'string' || typeof row[`${propertyName}`] === 'number' || typeof row[`${propertyName}`] === 'object') {\n if (shouldAddSpanTag) {\n columns.push(// eslint-disable-next-line react/forbid-dom-props\n /*#__PURE__*/ _jsx(\"td\", {\n id: propertyName,\n className: propertyName,\n children: /*#__PURE__*/ _jsx(\"span\", {\n children: row[`${propertyName}`]\n })\n }));\n } else if (shouldUseSetInnerHTML) {\n columns.push(/*#__PURE__*/ _jsx(\"td\", {\n // eslint-disable-next-line react/forbid-dom-props\n id: propertyName,\n className: propertyName,\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML: {\n __html: row[`${propertyName}`]\n }\n }));\n } else {\n columns.push(// eslint-disable-next-line react/forbid-dom-props\n /*#__PURE__*/ _jsx(\"td\", {\n id: propertyName,\n className: propertyName,\n children: row[`${propertyName}`]\n }));\n }\n }\n }\n });\n return /*#__PURE__*/ _jsx(\"tr\", {\n className: row.rowClassName,\n children: columns\n }, row.rowKey);\n }), _define_property(this, \"getColumnKeysToRender\", (row)=>{\n if (!row) {\n return [];\n }\n const { columns } = this.props;\n if (columns) {\n return columns;\n }\n return Object.keys(row).filter((columnKey)=>{\n var _this_props_ignore;\n const columnValue = row[columnKey.toString()];\n const shouldIgnore = (_this_props_ignore = this.props.ignore) === null || _this_props_ignore === void 0 ? void 0 : _this_props_ignore.some((ignoreKey)=>ignoreKey === columnKey);\n return columnValue && !shouldIgnore;\n });\n }), _define_property(this, \"renderSingleLineRow\", (row)=>{\n const { columnsClasses } = this.props;\n const columns = this.getColumnKeysToRender(row).map((columnKey)=>/*#__PURE__*/ _jsx(SortedTableColumn, {\n columnKey: columnKey,\n className: columnsClasses === null || columnsClasses === void 0 ? void 0 : columnsClasses[`${columnKey}`],\n columnValue: row[`${columnKey}`],\n tableProps: this.props\n }, columnKey));\n return /*#__PURE__*/ _jsx(\"tr\", {\n className: row.rowClassName,\n children: columns\n }, row.rowKey);\n }), _define_property(this, \"renderMultilineRow\", (multilineConfig)=>(rowData)=>{\n var _rowData_multilineColumns_;\n const { columnsClasses } = this.props;\n const { multilineColumns, emptyColumnClassName, lastRowClassName, multilineColumnClass } = multilineConfig;\n if (!multilineColumns.length) {\n return null;\n }\n const numberOfMultilineRows = ((_rowData_multilineColumns_ = rowData[multilineColumns[0]]) === null || _rowData_multilineColumns_ === void 0 ? void 0 : _rowData_multilineColumns_.length) || 0;\n const rows = [];\n for(let rowIndex = 0; rowIndex < numberOfMultilineRows; rowIndex++){\n const columns = this.getColumnKeysToRender(rowData).map((columnKey)=>{\n const columnValue = rowData[columnKey.toString()];\n const isMultilineColumn = multilineColumns.find((x)=>x === columnKey);\n if (rowIndex === 0) {\n return /*#__PURE__*/ _jsx(SortedTableColumn, {\n columnKey: columnKey,\n columnValue: isMultilineColumn ? columnValue[`${rowIndex}`] : columnValue,\n tableProps: this.props,\n className: classNames(columnsClasses === null || columnsClasses === void 0 ? void 0 : columnsClasses[`${columnKey}`], {\n [multilineColumnClass]: isMultilineColumn\n })\n }, columnKey);\n } else {\n if (isMultilineColumn) {\n return /*#__PURE__*/ _jsx(SortedTableColumn, {\n columnKey: columnKey,\n columnValue: columnValue[`${rowIndex}`],\n tableProps: this.props,\n className: classNames(multilineColumnClass, columnsClasses === null || columnsClasses === void 0 ? void 0 : columnsClasses[`${columnKey}`])\n }, columnKey);\n } else {\n return /*#__PURE__*/ _jsx(\"td\", {\n className: classNames(columnKey, emptyColumnClassName, columnsClasses === null || columnsClasses === void 0 ? void 0 : columnsClasses[`${columnKey}`])\n }, columnKey);\n }\n }\n });\n rows.push(columns);\n }\n return rows.map((row, index)=>/*#__PURE__*/ _jsx(\"tr\", {\n className: `${rowData.rowClassName} ${index === rows.length - 1 ? lastRowClassName : ''}`,\n children: row\n }, rowData.rowKey));\n });\n }\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport SpzaComponent from '../spzaComponent';\nexport const SortOrder = {\n None: 'none',\n Ascending: 'ascending',\n Descending: 'descending'\n};\nexport const SortOrderStyles = {\n NoneStyle: 'c-glyph',\n AscendingStyle: 'c-glyph f-ascending',\n DescendingStyle: 'c-glyph f-descending'\n};\nexport class SortedTH extends SpzaComponent {\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.props.boundProperty !== nextProps.currentlySelected) {\n this.setState({\n ariaSort: SortOrder.None,\n buttonClass: SortOrderStyles.NoneStyle\n });\n }\n }\n handleHeaderClick() {\n let newState = {\n ariaSort: SortOrder.None,\n buttonClass: SortOrderStyles.NoneStyle\n };\n if (this.state.ariaSort === SortOrder.None || this.state.ariaSort === SortOrder.Descending) {\n newState = {\n ariaSort: SortOrder.Ascending,\n buttonClass: SortOrderStyles.AscendingStyle\n };\n } else {\n newState = {\n ariaSort: SortOrder.Descending,\n buttonClass: SortOrderStyles.DescendingStyle\n };\n }\n this.setState(newState);\n this.props.handleSortChange(this.props.boundProperty, newState.ariaSort);\n }\n renderImpl() {\n return /*#__PURE__*/ _jsx(\"th\", {\n scope: \"col\",\n className: \"f-sortable\",\n \"aria-sort\": this.state.ariaSort,\n children: /*#__PURE__*/ _jsx(\"button\", {\n className: this.state.buttonClass,\n \"aria-pressed\": \"mixed\",\n \"aria-label\": `${this.props.children} current sorting mode is ${this.state.ariaSort}`,\n onClick: ()=>this.handleHeaderClick(),\n children: this.props.children\n })\n });\n }\n constructor(props){\n super(props);\n this.state = {\n ariaSort: SortOrder.None,\n buttonClass: SortOrderStyles.NoneStyle\n };\n }\n}\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from './spzaComponent';\nimport FuturePriceTooltip from 'components/futurePriceTooltip';\nexport class SimplePriceCell extends SpzaComponent {\n renderImpl() {\n const { price, futurePrice, className } = this.props;\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: `simplePriceCell ${className}`,\n children: [\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"price\",\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML: {\n __html: price\n }\n }),\n futurePrice && /*#__PURE__*/ _jsx(FuturePriceTooltip, {\n futurePrice: futurePrice\n })\n ]\n });\n }\n}\nSimplePriceCell.contextTypes = {\n renderErrorModal: PropTypes.func\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { renderNotAvailablePriceUI, getVariablePriceStringWithDefault } from '@shared/utils/pricing';\nimport { SortedTable, SortedTH, SortOrder } from './sortedTable';\nimport { Plan } from '@shared/utils/constants';\nimport { SimplePriceCell } from './simplePriceCell';\nimport FuturePriceWarning from '@shared/components/futurePriceWarning';\nimport PureSpzaComponent from '@shared/components/pureSpzaComponent';\nimport pdpPrivateBadge from '@shared/images/pdp-privateBadge.svg';\nexport class SimplePlanPricing extends PureSpzaComponent {\n handleSortChange(sortColumnName, order) {\n this.setState({\n sortConfig: {\n sortColumnName,\n sortOrder: order\n }\n });\n }\n showColumnByUnit(skus, unit) {\n return skus.some((sku)=>sku.termPrices && sku.termPrices.some((termPrice)=>termPrice.unit.toLowerCase() === unit));\n }\n getBadge(sku) {\n if (sku.isPrivate) {\n return /*#__PURE__*/ _jsx(\"img\", {\n className: \"banner\",\n src: pdpPrivateBadge\n });\n }\n }\n getPriceColumnsData(skus, renderBadges) {\n const { futurePrices, isOneTimePaymentOffer } = this.props;\n const showPriceColumn = skus.some((sku)=>!!sku.startingPrice);\n const showYearlyPrice = this.showColumnByUnit(skus, 'year');\n let showMonthlyPrice = this.showColumnByUnit(skus, 'month');\n // If the offer is Microsoft managed and without prices.\n if (this.props.isMicrosoftManaged && skus.length && !showYearlyPrice && !showMonthlyPrice) {\n showMonthlyPrice = true;\n }\n const formattedSkus = skus.map((sku)=>{\n var _sku_startingPrice;\n const futureSku = futurePrices === null || futurePrices === void 0 ? void 0 : futurePrices.skus.find((futurePriceSku)=>futurePriceSku.id === sku.id);\n const { monthly, yearly, price, futurePriceMonthly, futurePriceYearly } = getVariablePriceStringWithDefault({\n sku,\n showPriceColumn,\n showYearlyPrice,\n showMonthlyPrice,\n isMicrosoftManaged: this.props.isMicrosoftManaged,\n countryCode: this.props.billingCountry.countryCode,\n currency: this.props.billingCountry.currency,\n context: this.context,\n futureSku,\n isOneTimePaymentOffer,\n locale: this.props.locale,\n shouldBlockPrices: this.props.shouldBlockPrices\n });\n let row = {\n title: sku.title,\n description: sku.description,\n displayRank: sku.displayRank,\n monthly: monthly && /*#__PURE__*/ _jsx(SimplePriceCell, {\n price: monthly,\n futurePrice: futurePriceMonthly\n }),\n yearly: yearly && /*#__PURE__*/ _jsx(SimplePriceCell, {\n price: yearly,\n futurePrice: futurePriceYearly\n }),\n price: ((_sku_startingPrice = sku.startingPrice) === null || _sku_startingPrice === void 0 ? void 0 : _sku_startingPrice.meterId) ? `${price}/${sku.startingPrice.meterId}` : price,\n priceInternal: showPriceColumn && sku.startingPrice ? sku.startingPrice.value : 0,\n rowClassName: 'pricingListItem',\n rowKey: sku.title\n };\n if (renderBadges) {\n row = _object_spread({\n badge: renderBadges && this.getBadge(sku) || ' '\n }, row);\n }\n return row;\n });\n const showGeneralPrice = showPriceColumn && !showMonthlyPrice && !showYearlyPrice;\n return {\n showMonthlyPrice,\n showYearlyPrice,\n formattedSkus,\n showGeneralPrice\n };\n }\n renderImpl() {\n const { pricing, isOneTimePaymentOffer } = this.props;\n if (!pricing) {\n return /*#__PURE__*/ _jsx(\"div\", {\n children: this.context.loc('Loading', 'Loading...')\n });\n }\n const skus = pricing.skus;\n const hasBadges = skus.some((sku)=>sku.isPrivate === true);\n const { showMonthlyPrice, showYearlyPrice, showGeneralPrice, formattedSkus } = this.getPriceColumnsData(skus, hasBadges);\n return skus.length === 0 ? renderNotAvailablePriceUI(this.context) : /*#__PURE__*/ _jsx(\"div\", {\n className: \"pricing simplePlanPricing\",\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: \"c-table f-divided\",\n children: [\n /*#__PURE__*/ _jsx(FuturePriceWarning, {\n futurePrices: this.props.futurePrices\n }),\n /*#__PURE__*/ _jsx(SortedTable, {\n thead: [\n /*#__PURE__*/ _jsxs(\"tr\", {\n className: \"pricingListItem\",\n children: [\n hasBadges && /*#__PURE__*/ _jsx(\"th\", {\n className: \"f-sortable\",\n colSpan: 1,\n \"aria-sort\": \"none\",\n scope: \"col\"\n }),\n /*#__PURE__*/ _jsx(\"th\", {\n className: \"f-sortable\",\n colSpan: 1,\n \"aria-sort\": \"none\",\n scope: \"col\",\n children: this.context.loc('Plan', 'Plan')\n }),\n /*#__PURE__*/ _jsx(\"th\", {\n className: \"f-sortable\",\n colSpan: 1,\n \"aria-sort\": \"none\",\n scope: \"col\",\n children: this.context.loc('Description', 'Description')\n }),\n showMonthlyPrice ? /*#__PURE__*/ _jsx(SortedTH, {\n boundProperty: \"priceInternal\",\n handleSortChange: this.handleSortChange,\n currentlySelected: this.state.sortConfig.sortColumnName,\n children: isOneTimePaymentOffer ? this.context.loc('Price', 'Price') : this.context.loc('Monthly_Price', 'Monthly Price')\n }) : null,\n showYearlyPrice ? /*#__PURE__*/ _jsx(SortedTH, {\n boundProperty: \"priceInternal\",\n handleSortChange: this.handleSortChange,\n currentlySelected: this.state.sortConfig.sortColumnName,\n children: this.context.loc('Annual_Price', 'Annual Price')\n }) : null,\n showGeneralPrice ? /*#__PURE__*/ _jsx(SortedTH, {\n boundProperty: \"priceInternal\",\n handleSortChange: this.handleSortChange,\n currentlySelected: this.state.sortConfig.sortColumnName,\n children: this.context.loc('Price', 'Price')\n }) : null\n ]\n }, \"0\")\n ],\n tbody: formattedSkus,\n sortConfig: this.state.sortConfig,\n ignore: [\n 'rowKey',\n 'rowClassName',\n 'priceInternal',\n Plan.displayRank\n ],\n setInnerHTMLColumns: [\n 'description'\n ],\n multiLineColumns: [\n 'monthly',\n 'yearly',\n 'title'\n ]\n })\n ]\n })\n });\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"context\", void 0);\n this.state = {\n sortConfig: {\n sortColumnName: Plan.displayRank,\n sortOrder: SortOrder.Ascending\n }\n };\n this.handleSortChange = this.handleSortChange.bind(this);\n }\n}\nSimplePlanPricing.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n buildHref: PropTypes.func,\n ctaCallback: PropTypes.func,\n renderErrorModal: PropTypes.func\n};\n","import React from 'react';\nimport { Constants } from '../../shared/utils/constants';\nimport SpzaComponent from '../../shared/components/spzaComponent';\nexport class MicrosoftManagedIndicatorWrapper extends SpzaComponent {\n renderImpl() {\n var _app_licenseManagement;\n const { uiRole, app, isAvailableInRegion, renderIndicator } = this.props;\n const userIsAdmin = uiRole === Constants.UiRole.Admin;\n if (!(app === null || app === void 0 ? void 0 : (_app_licenseManagement = app.licenseManagement) === null || _app_licenseManagement === void 0 ? void 0 : _app_licenseManagement.isMicrosoftManaged) || !isAvailableInRegion || !uiRole || userIsAdmin) {\n return null;\n }\n return renderIndicator();\n }\n}\n","import { Constants } from '@shared/utils/constants';\nconst fallbackCountryCode = 'US';\nexport const getLocaleLanguage = ({ locale })=>{\n const localeLanguage = (locale === null || locale === void 0 ? void 0 : locale.includes('-')) ? locale.split('-')[0] : Constants.DefaultLocale.split('-')[0];\n return localeLanguage;\n};\nfunction getCountryCodeRegion({ countryCode }) {\n const countryCodeRegion = countryCode ? countryCode.includes('-') ? countryCode.split('-')[1] : countryCode : fallbackCountryCode;\n return countryCodeRegion;\n}\nexport function getLocale({ locale, countryCode }) {\n const localeLanguage = getLocaleLanguage({\n locale\n });\n const countryCodeRegion = getCountryCodeRegion({\n countryCode\n });\n const localeString = `${localeLanguage.toLowerCase()}-${countryCodeRegion.toUpperCase()}`;\n return localeString;\n}\nexport function timeToLocalLocaleString({ timeUTCSeconds, locale, countryCode }) {\n const date = new Date(timeUTCSeconds * 1000);\n const localeString = getLocale({\n locale,\n countryCode\n });\n return date.toLocaleTimeString(localeString);\n}\nexport function timeToLocalString({ timeUTCSeconds, locale, countryCode }) {\n const date = new Date(timeUTCSeconds * 1000);\n const localeString = getLocale({\n locale,\n countryCode\n });\n return date.toLocaleString(localeString);\n}\nexport function numberToLocaleString({ number, locale, countryCode }) {\n const localeString = getLocale({\n locale,\n countryCode\n });\n return number.toLocaleString(localeString);\n}\nconst catalogSupportedLocales = [\n 'en',\n 'cs',\n 'de',\n 'es',\n 'fr',\n 'hu',\n 'it',\n 'ja',\n 'ko',\n 'nl',\n 'pl',\n 'ru',\n 'sv',\n 'tr',\n 'pt-br',\n 'pt-pt',\n 'zh-hans',\n 'zh-hant'\n];\nconst languageCodesThatShouldUseLocaleInstead = [\n 'pt',\n 'zh'\n];\nexport const doesSearchSupportLanguage = ({ language })=>catalogSupportedLocales.indexOf(language) >= 0;\nexport const shouldUseLocaleInsteadOfLanguageCode = ({ language })=>languageCodesThatShouldUseLocaleInstead.indexOf(language) >= 0;\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { FontIcon, Link, Text, mergeStyleSets, Stack } from '@fluentui/react';\nimport { numberToLocaleString } from '@shared/utils/localeUtils';\nimport { CommunicationColors } from '@fluentui/theme';\nimport { Constants } from '@shared/utils/constants';\nimport { SpzaInstrumentService } from 'services/telemetry/spza/spzaInstrument';\nimport { withRouter } from '@shared/routerHistory';\nimport { logger } from '@src/logger';\nconst contentStyles = mergeStyleSets({\n linkedinSection: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n marginTop: 8\n },\n linkedinLogoIcon: {\n width: 18,\n height: 18,\n padding: 0,\n lineHeight: 20,\n verticalAlignment: 'center',\n color: CommunicationColors.primary\n },\n linkedinMembersText: {\n marginLeft: 6,\n fontSize: 14,\n lineHeight: 20,\n fontWeight: 400\n },\n linkedinLink: {\n marginLeft: 8,\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n textDecoration: 'none'\n },\n linkedinLinkText: {\n fontSize: 14,\n fontWeight: 400,\n textDecoration: 'underline'\n },\n externallinkIcon: {\n paddingLeft: 4,\n width: 13,\n height: 13,\n color: CommunicationColors.primary,\n lineHeight: 20\n }\n});\nconst LinkedinProductGroupBarFunction = ({ linkedInProductGroup, locale, countryCode, location }, context)=>{\n const onLinkClick = ()=>{\n const payload = {\n page: location === null || location === void 0 ? void 0 : location.pathname,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.LinkedinLink,\n details: JSON.stringify({\n offerId: linkedInProductGroup.offerId\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n page: payload.page,\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n };\n return /*#__PURE__*/ _jsxs(Stack, {\n className: contentStyles.linkedinSection,\n children: [\n /*#__PURE__*/ _jsx(FontIcon, {\n iconName: \"LinkedInLogo\",\n className: contentStyles.linkedinLogoIcon\n }),\n /*#__PURE__*/ _jsx(Text, {\n className: contentStyles.linkedinMembersText,\n children: context.locParams('Linkedin_Members', [\n numberToLocaleString({\n number: linkedInProductGroup.membersCount,\n locale,\n countryCode\n })\n ])\n }),\n /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n children: [\n /*#__PURE__*/ _jsx(Link, {\n className: contentStyles.linkedinLink,\n href: linkedInProductGroup.detailsUrl,\n target: \"_blank\",\n onClick: onLinkClick,\n children: /*#__PURE__*/ _jsxs(Text, {\n className: contentStyles.linkedinLinkText,\n children: [\n \" \",\n context.loc('Explore_Group_On_Linkedin')\n ]\n })\n }),\n /*#__PURE__*/ _jsx(FontIcon, {\n iconName: \"OpenInNewWindow\",\n className: contentStyles.externallinkIcon\n })\n ]\n })\n ]\n });\n};\nexport const LinkedinProductGroupBar = withRouter(LinkedinProductGroupBarFunction);\nLinkedinProductGroupBarFunction.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { DefaultButton, FontIcon, Stack, Image, Text, mergeStyleSets, ImageFit } from '@fluentui/react';\nimport { numberToLocaleString, timeToLocalLocaleString, timeToLocalString } from '@shared/utils/localeUtils';\nimport { NeutralColors } from '@fluentui/theme';\nconst contentStyles = mergeStyleSets({\n upcomingEvent: {\n width: 512,\n borderStyle: 'solid',\n borderWidth: 1,\n borderColor: NeutralColors.gray30,\n padding: 16,\n display: 'flex',\n flexDirection: 'column'\n },\n upcomingEventLogo: {\n width: 60,\n height: 60,\n position: 'relative',\n overflow: 'hidden'\n },\n upcomingEventLargeIcon: {\n width: 60,\n height: 60,\n position: 'relative',\n overflow: 'hidden',\n color: '#69AFE5'\n },\n upcomingEventLargeIconImg: {\n width: '100%',\n height: '100%'\n },\n upcomingEventNameText: {\n marginTop: 8,\n fontSize: 18,\n lineHeight: 24,\n fontWeight: 600,\n color: NeutralColors.gray160\n },\n upcomingEventDefaultIcon: {\n fontSize: 40,\n width: 40,\n height: 50,\n color: '#69AFE5'\n },\n upcomingEventDefaultPanel: {\n padding: 10,\n width: 60,\n height: 60,\n backgroundColor: '#EFF6FC'\n },\n upcomingEventNormalText: {\n marginTop: 8,\n fontSize: 12,\n lineHeight: 16,\n fontWeight: 600,\n color: NeutralColors.gray130\n },\n upcomingEventLinkButton: {\n width: 212,\n marginTop: 24,\n fontSize: 14,\n lineHeight: 20,\n fontWeight: 600,\n color: NeutralColors.gray190\n },\n externallinkIcon: {\n marginLeft: 8,\n height: 24,\n fontSize: 14,\n color: NeutralColors.gray190\n }\n});\nexport const LinkedinUpcomingEvent = ({ event, locale, countryCode, onExternalLinkClick }, context)=>{\n const { startTime, endTime, name, logoUrl, eventType, attendeeCount, detailsUrl } = event;\n const startTimeStr = timeToLocalString({\n timeUTCSeconds: startTime / 1000,\n locale,\n countryCode\n });\n const endTimeStr = timeToLocalLocaleString({\n timeUTCSeconds: endTime / 1000,\n locale,\n countryCode\n });\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: contentStyles.upcomingEvent,\n children: [\n logoUrl ? /*#__PURE__*/ _jsx(\"div\", {\n className: contentStyles.upcomingEventLogo,\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: contentStyles.upcomingEventLargeIcon,\n children: /*#__PURE__*/ _jsx(Image, {\n imageFit: ImageFit.contain,\n className: contentStyles.upcomingEventLargeIconImg,\n src: logoUrl\n })\n })\n }) : /*#__PURE__*/ _jsx(\"div\", {\n className: contentStyles.upcomingEventDefaultPanel,\n children: /*#__PURE__*/ _jsx(FontIcon, {\n \"aria-label\": \"Calendar\",\n iconName: \"Calendar\",\n className: contentStyles.upcomingEventDefaultIcon\n })\n }),\n /*#__PURE__*/ _jsx(Text, {\n className: contentStyles.upcomingEventNameText,\n children: name\n }),\n /*#__PURE__*/ _jsx(Text, {\n className: contentStyles.upcomingEventNormalText,\n children: eventType\n }),\n /*#__PURE__*/ _jsx(Text, {\n className: contentStyles.upcomingEventNormalText,\n children: context.locParams('Linkedin_Event_Time', [\n startTimeStr,\n endTimeStr\n ])\n }),\n /*#__PURE__*/ _jsx(Text, {\n className: contentStyles.upcomingEventNormalText,\n children: context.locParams('Linkedin_Attendees_Count', [\n numberToLocaleString({\n number: attendeeCount,\n locale,\n countryCode\n })\n ])\n }),\n /*#__PURE__*/ _jsx(DefaultButton, {\n className: contentStyles.upcomingEventLinkButton,\n href: detailsUrl,\n target: \"_blank\",\n onClick: onExternalLinkClick,\n children: /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n children: [\n context.loc('Linkedin_Event_Link', 'View event on LinkedIn'),\n /*#__PURE__*/ _jsx(FontIcon, {\n iconName: \"OpenInNewWindow\",\n className: contentStyles.externallinkIcon\n })\n ]\n })\n })\n ]\n });\n};\nLinkedinUpcomingEvent.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { numberToLocaleString } from '@shared/utils/localeUtils';\nimport { Image, ImageFit, mergeStyleSets, Text } from '@fluentui/react';\nimport { NeutralColors } from '@fluentui/theme';\nconst contentStyles = mergeStyleSets({\n featuredCustomer: {\n width: 240,\n height: 190,\n borderStyle: 'solid',\n borderWidth: 1,\n borderColor: NeutralColors.gray30,\n padding: 16,\n display: 'flex',\n flexDirection: 'column'\n },\n featuredCustomerLogo: {\n width: 60,\n height: 60,\n position: 'relative',\n overflow: 'hidden'\n },\n featuredCustomerLargeIcon: {\n width: 60,\n height: 60,\n position: 'relative',\n overflow: 'hidden'\n },\n featuredCustomerLargeIconImg: {\n width: '100%',\n height: '100%'\n },\n featuredCustomerNameText: {\n marginTop: 8,\n fontSize: 18,\n lineHeight: 24,\n fontWeight: 600,\n color: NeutralColors.gray160\n },\n featuredCustomerNormalText: {\n marginTop: 8,\n fontSize: 12,\n lineHeight: 16,\n fontWeight: 600,\n color: NeutralColors.gray130\n }\n});\nexport const LinkedinFeaturedCustomer = ({ customer, locale, countryCode }, context)=>{\n const { name, logoUrl, businessCategory, followersCount } = customer;\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"featuredCustomerBox\",\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: contentStyles.featuredCustomer,\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: contentStyles.featuredCustomerLogo,\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: contentStyles.featuredCustomerLargeIcon,\n children: /*#__PURE__*/ _jsx(Image, {\n imageFit: ImageFit.contain,\n className: contentStyles.featuredCustomerLargeIconImg,\n src: logoUrl\n })\n })\n }),\n /*#__PURE__*/ _jsx(Text, {\n className: contentStyles.featuredCustomerNameText,\n children: name\n }),\n /*#__PURE__*/ _jsx(Text, {\n className: contentStyles.featuredCustomerNormalText,\n children: businessCategory\n }),\n /*#__PURE__*/ _jsx(Text, {\n className: contentStyles.featuredCustomerNormalText,\n children: context.locParams('Linkedin_Followers_Count', [\n numberToLocaleString({\n number: followersCount,\n locale,\n countryCode\n })\n ])\n })\n ]\n })\n });\n};\nLinkedinFeaturedCustomer.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { useState } from 'react';\nimport * as PropTypes from 'prop-types';\nimport { Text, mergeStyleSets, TextField, Separator, Checkbox, Dialog, PrimaryButton, Stack, IconButton, ButtonType, DefaultButton, Link, FontIcon } from '@fluentui/react';\nimport { NeutralColors, SharedColors } from '@fluentui/theme';\nimport { storeFeedback } from '@shared/services/feedback';\nimport { Constants } from '@shared/utils/constants';\nimport { useSpzaInstrumentService } from '@shared/hooks';\nimport { getWindow } from '@shared/services/window';\nimport { SubmittedModal } from '@shared/components/modals/submittedModal';\nimport { useLocation } from 'react-router-dom';\nconst subTextStyles = {\n root: {\n color: NeutralColors.gray130,\n lineHeight: 20\n }\n};\nexport const FeatureFeedbackSubmittedModal = ({ hidden, onDismiss, context })=>{\n return /*#__PURE__*/ _jsx(SubmittedModal, {\n hidden: hidden,\n onDismiss: onDismiss,\n title: context.loc('Nps_SubmittedModal_Title', 'Feedback received'),\n context: context,\n children: /*#__PURE__*/ _jsx(Text, {\n block: true,\n styles: subTextStyles,\n children: context.loc('Nps_SubmittedModal_Summary_Text', 'Thanks for taking the time to share your thoughts!')\n })\n });\n};\nconst DIALOG_MAX_WIDTH = 560;\nconst DIALOG_MIN_WIDTH = 300;\nconst DIALOG_MINI_MODE_WIDTH = 480;\nconst NO_SCORE = -1;\nconst buttonStyles = {\n root: {\n minWidth: 40,\n height: 48,\n maxWidth: 40,\n border: '1px solid #E1E3E5'\n },\n rootChecked: {\n color: NeutralColors.white,\n backgroundColor: SharedColors.cyanBlue10\n },\n rootCheckedHovered: {\n color: NeutralColors.white,\n backgroundColor: SharedColors.cyanBlue10\n }\n};\nconst contentStyles = mergeStyleSets({\n feedback: {\n width: 'auto',\n height: 'auto'\n },\n defaultText: [\n {\n color: NeutralColors.gray130\n }\n ],\n stackdiv: {\n display: 'flex',\n flexDirection: 'column'\n },\n openQuestionDiv: {\n display: 'flex',\n flexDirection: 'column',\n marginTop: 40\n },\n checksDiv: {\n display: 'flex',\n flexDirection: 'column',\n marginTop: 40\n },\n title: {\n fontSize: 20,\n lineHeight: 28,\n fontWeight: 600\n },\n scoreDiv: {\n marginTop: 48\n },\n checkBox: {\n marginTop: 16,\n lineHeight: 16\n },\n scorePanel: {\n marginTop: 18\n },\n scoreSubtitle: {\n lineHeight: 20,\n fontSize: 14,\n fontWeight: 600\n },\n scoreMiniSecondLine: {\n marginTop: 8\n },\n checksSubtitle: {\n lineHeight: 20,\n fontSize: 14,\n fontWeight: 600\n },\n openQuestionTextField: {\n height: 96\n },\n inputSectionSeparator: {\n marginTop: 32\n },\n emailConsentCheck: {\n marginTop: 9\n },\n footer: {\n marginTop: 5,\n height: 96\n },\n privacyStatement: {\n marginTop: 7\n },\n submitButton: {\n alignSelf: 'start',\n width: 86,\n lineHeight: 24,\n marginTop: 9\n },\n faceButtonSelected: {\n backgroundColor: NeutralColors.gray20\n },\n faceButtonNotSelected: {\n backgroundColor: 'transparent'\n },\n requiredIcon: {\n fontSize: 7,\n padding: 2,\n color: '#A80000'\n },\n closeButton: {\n alignSelf: 'end',\n float: 'right'\n },\n closeIcon: {\n fontSize: 16,\n color: NeutralColors.gray160\n },\n closeIconRoot: {\n width: 24,\n height: 24\n }\n});\nexport const scoreValues = [\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10\n];\nexport const scoreValuesMiniLine1 = [\n 0,\n 1,\n 2,\n 3,\n 4,\n 5\n];\nexport const scoreValuesMiniLine2 = [\n 6,\n 7,\n 8,\n 9,\n 10\n];\nexport function FeatureFeedbackScoreSection({ viewContent, score, onScoreChange }, context) {\n var _getWindow;\n const miniMode = ((_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : _getWindow.innerWidth) <= DIALOG_MINI_MODE_WIDTH;\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: contentStyles.scoreDiv,\n children: [\n /*#__PURE__*/ _jsxs(Stack, {\n verticalAlign: \"center\",\n horizontal: true,\n children: [\n /*#__PURE__*/ _jsx(Text, {\n className: contentStyles.scoreSubtitle,\n children: (viewContent === null || viewContent === void 0 ? void 0 : viewContent.scoreTitle) || context.loc('Feature_Feedback_Score_Title', 'How valuable do you find the information provided by LinkedIn?')\n }),\n /*#__PURE__*/ _jsx(FontIcon, {\n iconName: \"Asterisk\",\n className: contentStyles.requiredIcon\n })\n ]\n }),\n /*#__PURE__*/ _jsxs(Stack, {\n className: contentStyles.scorePanel,\n tokens: {\n childrenGap: 8\n },\n children: [\n /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n horizontalAlign: \"space-between\",\n children: [\n /*#__PURE__*/ _jsx(Text, {\n variant: \"smallPlus\",\n className: contentStyles.defaultText,\n children: (viewContent === null || viewContent === void 0 ? void 0 : viewContent.scoreMinLabel) || context.loc('Feature_Feedback_Score_Min_Title', 'Min')\n }),\n /*#__PURE__*/ _jsx(Text, {\n variant: \"smallPlus\",\n className: contentStyles.defaultText,\n children: viewContent.scoreMaxLabel || context.loc('Feature_Feedback_Score_Max_Title', 'Max')\n })\n ]\n }),\n miniMode ? /*#__PURE__*/ _jsxs(\"div\", {\n children: [\n /*#__PURE__*/ _jsx(Stack, {\n horizontal: true,\n tokens: {\n childrenGap: 8\n },\n children: scoreValuesMiniLine1.map((ratingValue)=>/*#__PURE__*/ _jsx(DefaultButton, {\n toggle: true,\n buttonType: score === ratingValue ? ButtonType.primary : ButtonType.default,\n checked: score === ratingValue,\n styles: buttonStyles,\n text: `${ratingValue}`,\n onClick: ()=>onScoreChange(ratingValue)\n }, ratingValue))\n }),\n /*#__PURE__*/ _jsx(Stack, {\n className: contentStyles.scoreMiniSecondLine,\n horizontal: true,\n tokens: {\n childrenGap: 8\n },\n children: scoreValuesMiniLine2.map((ratingValue)=>/*#__PURE__*/ _jsx(DefaultButton, {\n toggle: true,\n buttonType: score === ratingValue ? ButtonType.primary : ButtonType.default,\n checked: score === ratingValue,\n styles: buttonStyles,\n text: `${ratingValue}`,\n onClick: ()=>onScoreChange(ratingValue)\n }, ratingValue))\n })\n ]\n }) : /*#__PURE__*/ _jsx(Stack, {\n horizontal: true,\n tokens: {\n childrenGap: 8\n },\n children: scoreValues.map((ratingValue)=>/*#__PURE__*/ _jsx(DefaultButton, {\n toggle: true,\n buttonType: score === ratingValue ? ButtonType.primary : ButtonType.default,\n checked: score === ratingValue,\n styles: buttonStyles,\n text: `${ratingValue}`,\n onClick: ()=>onScoreChange(ratingValue)\n }, ratingValue))\n })\n ]\n })\n ]\n });\n}\nexport function FeatureFeedbackTitleSection({ viewContent, onDialogDismissed }, context) {\n return /*#__PURE__*/ _jsx(\"div\", {\n className: contentStyles.stackdiv,\n children: /*#__PURE__*/ _jsxs(\"div\", {\n children: [\n /*#__PURE__*/ _jsx(Text, {\n className: contentStyles.title,\n children: (viewContent === null || viewContent === void 0 ? void 0 : viewContent.title) || context.loc('Feature_Feedback_Dialog_Title', 'We’d love your feedback')\n }),\n /*#__PURE__*/ _jsx(IconButton, {\n className: contentStyles.closeButton,\n styles: {\n icon: contentStyles.closeIcon,\n root: contentStyles.closeIconRoot\n },\n iconProps: {\n iconName: 'ChromeClose'\n },\n \"aria-label\": context.loc('Dialog_Close', 'Close'),\n onClick: onDialogDismissed\n })\n ]\n })\n });\n}\nexport function FeatureFeedbackChecksSection({ viewContent, checks, setCheckChange }, context) {\n var _viewContent_checks;\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: contentStyles.checksDiv,\n children: [\n /*#__PURE__*/ _jsx(Text, {\n className: contentStyles.checksSubtitle,\n children: (viewContent === null || viewContent === void 0 ? void 0 : viewContent.checksTitle) || context.loc('Feature_Feedback_Checks_Title', 'Which of the following contributed to your experience?')\n }),\n viewContent === null || viewContent === void 0 ? void 0 : (_viewContent_checks = viewContent.checks) === null || _viewContent_checks === void 0 ? void 0 : _viewContent_checks.map((featureCheckDef)=>{\n return /*#__PURE__*/ _jsx(Checkbox, {\n className: contentStyles.checkBox,\n label: featureCheckDef.text,\n checked: checks[featureCheckDef.key] && checks[featureCheckDef.key],\n onChange: (element, checked)=>setCheckChange(featureCheckDef.key, checked)\n }, featureCheckDef.key);\n })\n ]\n });\n}\nexport function FeatureFeedbackInputSection({ viewContent, userComment, setUserComment }, context) {\n return /*#__PURE__*/ _jsx(\"div\", {\n className: contentStyles.openQuestionDiv,\n children: /*#__PURE__*/ _jsx(TextField, {\n value: userComment,\n label: (viewContent === null || viewContent === void 0 ? void 0 : viewContent.openQuestionFieldTitle) || context.loc('Feature_Feedback_Open_Question_Title', 'What can we do to improve your experience?'),\n placeholder: (viewContent === null || viewContent === void 0 ? void 0 : viewContent.openQuestionFieldPlaceholder) || context.loc('Feature_Feedback_Open_Question_Placeholder', 'Tell us about your experience...'),\n className: contentStyles.openQuestionTextField,\n multiline: true,\n rows: 4,\n onChange: (ev, newValue)=>setUserComment(newValue)\n })\n });\n}\nexport function FeatureFeedbackEmailSection({ email, emailConsent, setEmailConsent }, context) {\n return /*#__PURE__*/ _jsxs(\"div\", {\n children: [\n /*#__PURE__*/ _jsx(Separator, {\n className: contentStyles.inputSectionSeparator\n }),\n email && /*#__PURE__*/ _jsx(Checkbox, {\n label: context.locParams('Feature_Feedback_Email_Concent', [\n email\n ], `Microsoft can email you to ${email} about your feedback`),\n className: contentStyles.emailConsentCheck,\n checked: emailConsent,\n onChange: (ev, checked)=>{\n setEmailConsent(checked);\n }\n })\n ]\n });\n}\nexport function FeatureFeedbackFooterSection({ onSubmitClick, submitDisabled }, context) {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: contentStyles.stackdiv,\n children: [\n /*#__PURE__*/ _jsx(Link, {\n underline: true,\n target: \"_blank\",\n rel: \"noreferrer\",\n href: \"https://aka.ms/AppSourcePrivacyStatement\",\n className: contentStyles.privacyStatement,\n children: context.loc('Feedback_privacy', 'Privacy statement')\n }),\n /*#__PURE__*/ _jsx(PrimaryButton, {\n disabled: submitDisabled,\n onClick: onSubmitClick,\n className: contentStyles.submitButton,\n text: context.loc('Feature_FeedbackSubmit_Button', 'Submit')\n })\n ]\n });\n}\n/* Feature feedback dialog.\n This component can be customize to allow getting feedback for diffrent features.\n To cistomize its content use 'viewContent' property.\n The component handle feedback submission (to log/data table) and trigger event after feedback has been submitted.\n When dialod in react component tree, it is always visible.\n User should handle dialog visibility externaly by using 'onFeedbackSubmitted' and 'onDialogDismissed' callbacks.\n*/ function FeatureFeedbackInternal({ featureName, viewContent, email, onFeedbackSubmitted, onDialogDismissed }) {\n const location = useLocation();\n const [score, setScore] = useState(NO_SCORE);\n const [emailConsent, setEmailConsent] = useState(false);\n const [userComment, setUserComment] = useState('');\n const [instrument] = useSpzaInstrumentService();\n const [checks, setChecks] = React.useState((viewContent === null || viewContent === void 0 ? void 0 : viewContent.checks) ? viewContent.checks.map((featureCheck)=>{\n return {\n [featureCheck.key]: false\n };\n }) : []);\n const setCheckChange = (key, checked)=>setChecks(_object_spread_props(_object_spread({}, checks), {\n [key]: checked\n }));\n const getEmail = ()=>{\n return emailConsent ? email : '';\n };\n const onSubmitClick = ()=>{\n const userFeedbackContent = {\n score,\n checks,\n comments: userComment,\n email: getEmail()\n };\n // New logger\n storeFeedback({\n action: Constants.Telemetry.Action.CVA,\n actionModifier: featureName,\n details: JSON.stringify(userFeedbackContent)\n });\n // Old logger\n const payload = {\n page: location === null || location === void 0 ? void 0 : location.pathname,\n action: Constants.Telemetry.Action.CVA,\n actionModifier: featureName,\n details: JSON.stringify(userFeedbackContent),\n isFeedback: true\n };\n instrument.probe('logAndFlushTelemetryInfo', payload);\n onFeedbackSubmitted === null || onFeedbackSubmitted === void 0 ? void 0 : onFeedbackSubmitted();\n };\n return /*#__PURE__*/ _jsx(Dialog, {\n maxWidth: DIALOG_MAX_WIDTH,\n minWidth: DIALOG_MIN_WIDTH,\n hidden: false,\n onDismiss: onDialogDismissed,\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: contentStyles.feedback,\n children: [\n /*#__PURE__*/ _jsx(FeatureFeedbackTitleSection, {\n viewContent: viewContent,\n onDialogDismissed: onDialogDismissed\n }),\n /*#__PURE__*/ _jsx(FeatureFeedbackScoreSection, {\n viewContent: viewContent,\n onScoreChange: setScore,\n score: score\n }),\n /*#__PURE__*/ _jsx(FeatureFeedbackChecksSection, {\n viewContent: viewContent,\n checks: checks,\n setCheckChange: setCheckChange\n }),\n /*#__PURE__*/ _jsx(FeatureFeedbackInputSection, {\n viewContent: viewContent,\n userComment: userComment,\n setUserComment: setUserComment\n }),\n /*#__PURE__*/ _jsx(FeatureFeedbackEmailSection, {\n email: email,\n emailConsent: emailConsent,\n setEmailConsent: setEmailConsent\n }),\n /*#__PURE__*/ _jsx(FeatureFeedbackFooterSection, {\n onSubmitClick: onSubmitClick,\n submitDisabled: (viewContent === null || viewContent === void 0 ? void 0 : viewContent.scoreRequired) && score === NO_SCORE\n })\n ]\n })\n });\n}\nexport const FeatureFeedback = FeatureFeedbackInternal;\nFeatureFeedbackTitleSection.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\nFeatureFeedbackScoreSection.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\nFeatureFeedbackChecksSection.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\nFeatureFeedbackInputSection.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\nFeatureFeedbackEmailSection.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\nFeatureFeedbackFooterSection.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { useEffect, useState } from 'react';\nimport * as PropTypes from 'prop-types';\nimport { Link, Text, mergeStyleSets, TeachingBubble, Stack, DirectionalHint, FontIcon, DefaultButton } from '@fluentui/react';\nimport Ribbon from '@shared/components/ribbon';\nimport { LinkedinUpcomingEvent } from '@appsource/components/linkedin/linkedinUpcomingEvent';\nimport { LinkedinFeaturedCustomer } from '@appsource/components/linkedin/linkedinFeaturedCustomer';\nimport { CommunicationColors, NeutralColors } from '@fluentui/theme';\nimport { FeatureFeedback, FeatureFeedbackSubmittedModal } from '@shared/components/featureFeedback';\nimport { Constants } from '@shared/utils/constants';\nimport { getNpsModule } from '@appsource/utils/nps';\nimport { popupDisplayed, PopupType, shouldDisplayPopup } from '@shared/utils/popupDisplayManager';\nimport { withRouter } from '@shared/routerHistory';\nimport { SpzaInstrumentService } from 'services/telemetry/spza/spzaInstrument';\nimport { logger } from '@src/logger';\nconst smallTextSize = 12;\nconst normalTextSize = 14;\nconst largeTextSize = 18;\nconst contentStyles = mergeStyleSets({\n linkedin: {\n minHeight: 200,\n paddingBottom: 20,\n paddingTop: 32\n },\n featuredCustomersPanel: {\n marginTop: 44\n },\n featuredCustomersTitle: {\n fontSize: largeTextSize,\n fontWight: 400,\n lineHeight: 24\n },\n featuredCustomersList: {\n marginTop: 16,\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fill, 240px)',\n gridGap: 24\n },\n featuredCustomersRibbon: {\n marginTop: 16,\n display: 'grid',\n '.ribbon': {\n marginTop: 0,\n '.ribbonTiles': {\n marginLeft: 0,\n '.ribbonSlider': {\n height: 'auto'\n },\n '.slick-list': {\n marginLeft: 16\n }\n }\n }\n },\n upcomingEventLargeIconImg: {\n position: 'absolute',\n display: 'block',\n width: '100%',\n height: '100%'\n },\n upcomingEventNameText: {\n marginTop: 8,\n fontSize: largeTextSize,\n lineHeight: 24,\n fontWeight: 600,\n color: NeutralColors.gray160\n },\n upcomingEventNormalText: {\n marginTop: 8,\n fontSize: smallTextSize,\n lineHeight: 16,\n fontWeight: 600,\n color: NeutralColors.gray130\n },\n upcomingEventLinkButton: {\n width: 212,\n marginTop: 24,\n fontSize: normalTextSize,\n lineHeight: 20,\n fontWeight: 600,\n color: NeutralColors.gray190\n },\n externallinkIcon: {\n marginLeft: 8,\n height: 24,\n fontSize: normalTextSize,\n color: NeutralColors.gray190\n },\n upcomingEventsTitlePanel: {\n marginTop: 44,\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'flex-start'\n },\n emptyEventsPanel: {\n paddingTop: 8\n },\n emptyEventsIcon: {\n fontSize: 22,\n color: '#69AFE5'\n },\n emptyEventsText: {\n lineHeight: 24,\n fontWeight: 400,\n padding: 8,\n fontSize: normalTextSize,\n color: NeutralColors.gray130\n },\n upcomingEventsTitle: {\n fontSize: largeTextSize,\n fontWeight: 400,\n lineHeight: 24\n },\n upcomingEventsLink: {\n marginLeft: 8,\n fontSize: normalTextSize,\n fontWeight: 400,\n lineHeight: 24,\n verticalAlignment: 'center',\n textDecoration: 'underline'\n },\n upcomingEventsList: {\n marginTop: 16,\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fill, 512px)',\n gridGap: 24\n },\n feedbackTitle: {\n fontSize: 18,\n fontWeight: 400,\n lineHeight: 24\n },\n feedbackItem: {\n marginTop: 16,\n fontSize: normalTextSize,\n fontWeight: 400,\n lineHeight: 20\n },\n feedbackItemBold: {\n marginLeft: 4,\n fontSize: normalTextSize,\n fontWeight: 600,\n lineHeight: 20\n },\n linkedinLogoIcon: {\n fontSize: 20,\n lineHeight: 20,\n verticalAlignment: 'center',\n color: CommunicationColors.primary\n }\n});\nconst MAX_CUSTOMERS_SLIDES = 4;\nexport function FeaturedCustomersList({ linkedInProductGroup, offerName, locale, countryCode }, context) {\n var _linkedInProductGroup_featuredCustomers;\n if (((_linkedInProductGroup_featuredCustomers = linkedInProductGroup.featuredCustomers) === null || _linkedInProductGroup_featuredCustomers === void 0 ? void 0 : _linkedInProductGroup_featuredCustomers.length) > 0) {\n const customerElements = linkedInProductGroup.featuredCustomers.map((customer, index)=>{\n return /*#__PURE__*/ _jsx(LinkedinFeaturedCustomer, {\n locale: locale,\n countryCode: countryCode,\n customer: customer\n }, 'featuredCustomer_' + index.toString());\n });\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: contentStyles.featuredCustomersPanel,\n children: [\n /*#__PURE__*/ _jsx(Text, {\n className: contentStyles.featuredCustomersTitle,\n children: context.locParams('Linked_Featured_Customers_Title', [\n offerName\n ])\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n children: customerElements.length < MAX_CUSTOMERS_SLIDES ? /*#__PURE__*/ _jsx(\"div\", {\n className: contentStyles.featuredCustomersList,\n children: customerElements\n }) : /*#__PURE__*/ _jsx(\"div\", {\n className: contentStyles.featuredCustomersRibbon,\n children: /*#__PURE__*/ _jsx(Ribbon, {\n carousel: true,\n children: customerElements\n })\n })\n })\n ]\n });\n }\n return null;\n}\nexport function UpcomingEventsList({ linkedInProductGroup, offerName, locale, countryCode, onExternalLinkClick }, context) {\n var _linkedInProductGroup_upcomingEvents;\n if (((_linkedInProductGroup_upcomingEvents = linkedInProductGroup.upcomingEvents) === null || _linkedInProductGroup_upcomingEvents === void 0 ? void 0 : _linkedInProductGroup_upcomingEvents.length) > 0) {\n return /*#__PURE__*/ _jsxs(\"div\", {\n children: [\n /*#__PURE__*/ _jsxs(Stack, {\n className: contentStyles.upcomingEventsTitlePanel,\n children: [\n /*#__PURE__*/ _jsxs(Text, {\n className: contentStyles.upcomingEventsTitle,\n children: [\n \" \",\n context.locParams('Linkedin_Events_Title', [\n offerName\n ])\n ]\n }),\n linkedInProductGroup.eventsUrl && /*#__PURE__*/ _jsx(Link, {\n className: contentStyles.upcomingEventsLink,\n target: \"_blank\",\n href: linkedInProductGroup.eventsUrl,\n onClick: onExternalLinkClick,\n children: context.loc('Linkedin_Events_Link')\n })\n ]\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: contentStyles.upcomingEventsList,\n children: linkedInProductGroup.upcomingEvents.map((event, index)=>{\n return /*#__PURE__*/ _jsx(LinkedinUpcomingEvent, {\n locale: locale,\n countryCode: countryCode,\n event: event,\n onExternalLinkClick: onExternalLinkClick\n }, 'upcomingEvent_' + index.toString());\n })\n })\n ]\n });\n } else return /*#__PURE__*/ _jsxs(Stack, {\n children: [\n /*#__PURE__*/ _jsx(Stack, {\n className: contentStyles.upcomingEventsTitlePanel,\n children: /*#__PURE__*/ _jsxs(Text, {\n className: contentStyles.upcomingEventsTitle,\n children: [\n \" \",\n context.locParams('Linkedin_Events_Title', [\n offerName\n ])\n ]\n })\n }),\n /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n verticalAlign: \"center\",\n className: contentStyles.emptyEventsPanel,\n children: [\n /*#__PURE__*/ _jsx(FontIcon, {\n iconName: \"Calendar\",\n className: contentStyles.emptyEventsIcon\n }),\n /*#__PURE__*/ _jsx(Text, {\n className: contentStyles.emptyEventsText,\n children: context.locParams('Linkedin_Events_Empty_Message', [\n offerName\n ])\n })\n ]\n })\n ]\n });\n}\nexport function FeedbackSection({ onFeedbackClick }, context) {\n return /*#__PURE__*/ _jsxs(Stack, {\n tokens: {\n childrenGap: 16\n },\n horizontalAlign: \"start\",\n children: [\n /*#__PURE__*/ _jsxs(Stack, {\n tokens: {\n childrenGap: 12\n },\n horizontal: true,\n verticalAlign: \"center\",\n children: [\n /*#__PURE__*/ _jsx(FontIcon, {\n iconName: \"LinkedInLogo\",\n className: contentStyles.linkedinLogoIcon\n }),\n /*#__PURE__*/ _jsx(Text, {\n className: contentStyles.feedbackTitle,\n children: context.loc('Linkedin_Connected_Title', 'Stay connected to the community')\n })\n ]\n }),\n /*#__PURE__*/ _jsxs(Text, {\n className: contentStyles.feedbackItem,\n children: [\n context.loc('Linkedin_Connected_Content_1', 'Explore and connect with other companies interested in this topic. The following information is provided directly from LinkedIn.'),\n /*#__PURE__*/ _jsx(\"span\", {\n className: contentStyles.feedbackItemBold,\n children: context.loc('Linkedin_Connected_Content_2', 'Let us know if this is useful to you!')\n })\n ]\n }),\n /*#__PURE__*/ _jsx(DefaultButton, {\n className: contentStyles.feedbackItem,\n text: context.loc('Linkedin_Feedback_Section_Action', 'Give feedback'),\n onClick: onFeedbackClick\n })\n ]\n });\n}\nconst LinkedinProductGroupFunction = ({ linkedInProductGroup, offerName, locale, countryCode, userEmail, feedbackScoreRequired, location, parentTabQuery }, context)=>{\n const [feedbackMode, setFeedbackMode] = useState(false);\n const [teachingBubbleMode, setTeachingBubbleMode] = useState(false);\n const [feedbackSentMode, setFeedbackSentMode] = useState(false);\n const featureFeedbackContent = {\n title: context.loc('Linkedin_Feedback_Dialog_Title', 'We’d love your feedback'),\n scoreTitle: context.loc('Linkedin_Feedback_Score_Title', 'How valuable do you find the information provided by LinkedIn?'),\n scoreMinLabel: context.loc('Linkedin_Feedback_Score_Min_Title', 'Not valuable'),\n scoreMaxLabel: context.loc('Linkedin_Feedback_Score_Max_Title', 'Very valuable'),\n scoreRequired: feedbackScoreRequired,\n checksTitle: context.loc('Linkedin_Feedback_Checks_Title', 'Which of the following contributed to your experience?'),\n checks: [\n {\n key: 'Featured customers',\n text: context.loc('Linkedin_Feedback_Featured_Customers', 'Featured customers')\n },\n {\n key: 'Upcoming events',\n text: context.loc('Linkedin_Feedback_Upcoming_Events', 'Upcoming events')\n },\n {\n key: 'Direct link to the LinkedIn community',\n text: context.loc('Linkedin_Feedback_Direct_Link', 'Direct link to the LinkedIn community')\n }\n ],\n openQuestionFieldTitle: context.loc('Linkedin_Feedback_Open_Question_Title', 'Which additional information from LinkedIn would you like to see?'),\n openQuestionFieldPlaceholder: context.loc('Linkedin_Feedback_Open_Question_Placeholder', 'For example, “I’d like to see other members from my community who use this productâ€.')\n };\n const logTelemetry = (action, actionModifier)=>{\n const payload = {\n page: location === null || location === void 0 ? void 0 : location.pathname,\n action,\n actionModifier,\n details: JSON.stringify({\n offerId: linkedInProductGroup.offerId\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n page: payload.page,\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n };\n useEffect(()=>{\n if (shouldDisplayPopup(PopupType.LinkedinTeachingBubble)) {\n setTeachingBubbleMode(true);\n popupDisplayed(PopupType.LinkedinTeachingBubble);\n logTelemetry(Constants.Telemetry.Action.TeachingBubble, Constants.Telemetry.ActionModifier.Linkedin);\n }\n }, []);\n const onFeedbackClick = ()=>{\n setTeachingBubbleMode(false);\n setFeedbackMode(true);\n logTelemetry(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.LinkedinFeedbackButton);\n };\n const onExternalEventLinkClick = ()=>{\n logTelemetry(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.LinkedinEventLink);\n };\n const onFeedbackDismiss = ()=>{\n setFeedbackMode(false);\n logTelemetry(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.LinkedinFeedbackDismiss);\n getNpsModule().npsUpdateLastDismissTime();\n };\n const onFeedbackSubmitted = ()=>{\n setFeedbackMode(false);\n getNpsModule().npsUpdateLastDismissTime();\n setFeedbackSentMode(true);\n logTelemetry(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.LinkedinFeedbackSubmit);\n };\n const onTeachingBubbleCloseClick = ()=>{\n setTeachingBubbleMode(false);\n };\n const primaryButtonProps = {\n children: context.loc('Linkedin_Feedback_Action', 'Give feedback'),\n onClick: onFeedbackClick\n };\n const secondaryButtonProps = {\n children: context.loc('Linkedin_Teaching_Bubble_Close_Action', 'Close'),\n onClick: onTeachingBubbleCloseClick\n };\n const onTeachingBubblePreventDismiss = (event)=>{\n return event.type === 'scroll';\n };\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: contentStyles.linkedin,\n children: [\n /*#__PURE__*/ _jsx(FeedbackSection, {\n onFeedbackClick: onFeedbackClick\n }),\n /*#__PURE__*/ _jsx(FeaturedCustomersList, {\n countryCode: countryCode,\n linkedInProductGroup: linkedInProductGroup,\n offerName: offerName,\n locale: locale\n }),\n /*#__PURE__*/ _jsx(UpcomingEventsList, {\n countryCode: countryCode,\n linkedInProductGroup: linkedInProductGroup,\n offerName: offerName,\n locale: locale,\n onExternalLinkClick: onExternalEventLinkClick\n }),\n feedbackMode && /*#__PURE__*/ _jsx(FeatureFeedback, {\n featureName: Constants.Telemetry.ActionModifier.Linkedin,\n viewContent: featureFeedbackContent,\n onDialogDismissed: onFeedbackDismiss,\n onFeedbackSubmitted: onFeedbackSubmitted,\n email: userEmail\n }),\n teachingBubbleMode && /*#__PURE__*/ _jsx(TeachingBubble, {\n target: parentTabQuery,\n calloutProps: {\n directionalHint: DirectionalHint.bottomCenter,\n preventDismissOnEvent: onTeachingBubblePreventDismiss\n },\n primaryButtonProps: primaryButtonProps,\n secondaryButtonProps: secondaryButtonProps,\n onDismiss: ()=>{\n setTeachingBubbleMode(false);\n },\n headline: context.loc('Linkedin_Teaching_Bubble_title', 'Stay connected to the community'),\n children: context.loc('Linkedin_Teaching_Bubble_text', 'Explore and connect with other companies interested in this topic. Let us know if this is useful to you!')\n }),\n feedbackSentMode && /*#__PURE__*/ _jsx(FeatureFeedbackSubmittedModal, {\n hidden: !feedbackSentMode,\n onDismiss: ()=>{\n setFeedbackSentMode(false);\n },\n context: context\n })\n ]\n });\n};\nexport const LinkedinProductGroup = withRouter(LinkedinProductGroupFunction);\nLinkedinProductGroupFunction.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\nFeaturedCustomersList.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\nUpcomingEventsList.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\nFeedbackSection.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { Image, Link, getWindow } from '@fluentui/react';\nimport { Constants } from '@shared/utils/constants';\nimport pdpPbiBadge from '@shared/images/pdp_pbiBadge.svg';\nimport pdpMspBadge from '@shared/images/pdp_mspBadge.svg';\nimport pdpM365CertificationBadge from '@shared/images/pdp_m365CertificationBadge.svg';\nimport freeTrial from '@shared/images/freeTrial.svg';\nimport BadgeMicrosoft365AppAward from '@shared/images/Badge_Microsoft_365_app_award.svg';\nimport pdpPreferBadge from '@shared/images/pdp_preferBadge.svg';\nimport pdpPrivateBadge from '@shared/images/pdp-privateBadge.svg';\nimport pdpAzureBenefitEligible from '@shared/images/badges/AzureBenefitEligiblePDP.svg';\nimport pdpCertifiedSoftware from '@shared/images/badges/pdp_CertifiedSoftware.svg';\nimport { logger } from '@src/logger';\nimport { SpzaInstrumentService } from 'services/telemetry/spza/spzaInstrument';\nconst ImageStyles = {\n image: {\n height: '28px'\n }\n};\nexport const badgeLinks = {\n AzureBenefitURL: 'http://aka.ms/appsource/azurebenefit',\n OfficeAwardsURL: 'https://aka.ms/microsoftappawards',\n SolutionMapURL: 'https://go.microsoft.com/fwlink/?LinkId=875247',\n PrivateOfferURL: 'https://go.microsoft.com/fwlink/?linkid=2162844',\n PBICertifiedURL: 'https://aka.ms/pbicertified',\n AzureExpertsMSPURL: 'https://aka.ms/AzureExpertMSP',\n MicrosoftCertifiedURL: 'https://aka.ms/appcertification',\n CertifiedSoftware: 'https://aka.ms/CertifiedsoftwarepartnerFAQ'\n};\nconst badgeProps = {\n FreeTrial: {\n src: freeTrial,\n locTitle: 'Global_Loc_Free_trial_badge',\n link: null,\n title: 'Free trial badge'\n },\n OfficeAwards: {\n src: BadgeMicrosoft365AppAward,\n locTitle: 'Global_Loc_Microsoft_365_App_Award',\n link: badgeLinks.OfficeAwardsURL,\n title: 'Microsoft 365 App Award'\n },\n SolutionMap: {\n src: pdpPreferBadge,\n locTitle: 'Global_Loc_Microsoft_preferred_solution',\n link: badgeLinks.SolutionMapURL,\n title: 'Microsoft preferred solution'\n },\n PrivateOffer: {\n src: pdpPrivateBadge,\n locTitle: 'Global_Loc_Private_plans',\n link: badgeLinks.PrivateOfferURL,\n title: 'Private plans'\n },\n PBICertified: {\n src: pdpPbiBadge,\n locTitle: 'Global_Loc_Microsoft_PBI_Certified',\n link: badgeLinks.PBICertifiedURL,\n title: 'Microsoft PBI Certified'\n },\n AzureExpertsMSP: {\n src: pdpMspBadge,\n locTitle: 'Global_Loc_Azure_Experts_MSP',\n link: badgeLinks.AzureExpertsMSPURL,\n title: 'Azure Experts MSP'\n },\n MicrosoftCertified: {\n src: pdpM365CertificationBadge,\n locTitle: 'Global_Loc_Microsoft_365_Certified',\n link: badgeLinks.MicrosoftCertifiedURL,\n title: 'Microsoft 365 Certified'\n },\n SelfAttested: {\n src: pdpM365CertificationBadge,\n locTitle: 'Global_Loc_Microsoft_365_Certified',\n link: badgeLinks.MicrosoftCertifiedURL,\n title: 'Microsoft 365 Certified'\n },\n AzureBenefitEligible: {\n src: pdpAzureBenefitEligible,\n locTitle: 'Global_Loc_Azure_benefit',\n link: badgeLinks.AzureBenefitURL,\n title: 'Azure benefit eligible'\n },\n CertifiedSoftware: {\n src: pdpCertifiedSoftware,\n locTitle: 'Global_Loc_Certified_Software',\n link: badgeLinks.CertifiedSoftware,\n title: 'Certified Software'\n }\n};\nconst Badge = ({ name }, context)=>{\n const handleBadgeClick = (contentName)=>{\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.Info,\n details: JSON.stringify({\n contentName\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n };\n const badge = badgeProps[`${name}`];\n if (!badge) {\n return null;\n }\n const locTitle = context.loc(badge.locTitle, badge.title);\n return badge.link ? /*#__PURE__*/ _jsx(Link, {\n href: badge.link,\n target: \"_blank\",\n rel: \"noreferrer\",\n title: locTitle,\n \"aria-label\": locTitle,\n accessibility: true,\n onClick: ()=>handleBadgeClick(locTitle),\n children: /*#__PURE__*/ _jsx(Image, {\n src: badge.src,\n alt: locTitle,\n styles: ImageStyles\n })\n }) : /*#__PURE__*/ _jsx(Image, {\n styles: ImageStyles,\n src: badge.src,\n alt: locTitle\n });\n};\nBadge.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\nexport default Badge;\n","/* eslint-disable react/forbid-dom-props */ function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React from 'react';\n// eslint-disable-next-line import/named\nimport * as PropTypes from 'prop-types';\nimport { AppTile } from '@shared/containers/appTile';\nimport { getUserFavouriteEntityAppType } from '@shared/utils/userFavouriteDedicatedUtils';\nimport { AppReviewCollection } from '../containers/appReviewCollection';\nimport Overview from '../containers/overview';\nimport { routes, urlPush, urlReplace } from '@shared/routerHistory';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { getWindow } from '@shared/services/window';\nimport { isMSASupported, isTransactApp, isAvailableInThisRegion, getPDPRoute, getGalleryRoute, isPrivateOffer, isMigratedPowerBIVisual, getAppTelemetryDetailContentText, isAppForMSAAccountOnly, isD365App, isD365BCApp, isPowerBIVisualsApp, isBagTransactable, isSignedInChanged, canRenderPricing, getActionStringForCTAType, getProductByUrlKey, getProdcutBitMaskInfo, isCertifiedSoftware } from '@shared/utils/appUtils';\nimport { Constants, OfferType } from '@shared/utils/constants';\nimport { DataMap } from '@shared/utils/dataMapping';\nimport { getPrimaryProductUrl, getProductFilter } from '@shared/utils/datamappingHelpers';\nimport * as DetailUtils from '@shared/utils/detailUtils';\nimport { getBillingCountryByCountryCode, getPriceString, getStartingFromPriceText, hidePowerBiVisualPricing } from '@shared/utils/pricing';\nimport UserFavouriteTileDetailButton from '@shared/containers/userFavouriteTileDetailButton';\nimport { AppTag, PricingStates, CheckoutSource } from '@shared/Models';\nimport { InternalLink } from '@shared/components/internalLink';\nimport { ExternalLink } from '@shared/components/externalLink';\nimport { SimplePlanPricing } from '@shared/components/simplePlanPricing';\nimport SpzaComponent from '@shared/components/spzaComponent';\nimport { Tab, Tabs, SELECTED_TAB_QUERY } from '@shared/components/tabs';\nimport { TelemetryImage } from '@shared/components/telemetryImage';\nimport { IconLink } from '@shared/components/iconLink';\nimport { Card } from '@shared/components/card';\nimport { ButtonLink } from '@shared/components/ButtonLink';\nimport { AppDetailsLinkedItems } from '@shared/components/appDetailsLinkedItems';\nimport { StickyCard } from '@shared/components/stickyCard';\nimport { UsefulInfo, UsefulInfoMetadataCellItemType } from './UsefulInfo';\nimport { getWorkBreakEnabledString } from '@shared/utils/stringUtils';\nimport { BreadcrumbUrl } from '@shared/components/breadcrumbUrl';\nimport { Icon, mergeStyleSets, Stack, ScreenWidthMinXLarge, ScreenWidthMinXXLarge, PrimaryButton, Text, Spinner } from '@fluentui/react';\nimport { MicrosoftManagedIndicatorWrapper } from 'components/microsoftManagedIndicatorWrapper';\nimport { useTelemetry } from '@shared/hooks/useTelemetry';\nimport { logger } from '@src/logger';\nimport { CtaButtons } from '@shared/components/ctaButtons';\nimport { SaasPricingTable } from '@appsource/components';\nimport { AppDetailsHeaderRatingBar } from '@shared/components/appDetailsHeaderRatingBar';\nimport { NeutralColors, CommunicationColors } from '@fluentui/theme';\nimport classNames from 'classnames';\nimport { isOneTimePaymentOffer } from '@shared/utils/onetimepaymentoffers';\nimport { UserTerms } from '@appsource/components/userTerms';\nimport { LinkedinProductGroupBar } from '@appsource/components/linkedin/linkedinProductGroupBar';\nimport { LinkedinProductGroup } from '@appsource/components/linkedin/linkedinProductGroup';\nimport noResults from '@shared/images/noResults.svg';\nimport Badge from '@appsource/components/Badge';\n// eslint-disable-next-line react-hooks/rules-of-hooks\nconst [{ pageAction }] = useTelemetry();\nconst BI_AREA = 'Private Offer';\nconst contentStyles = mergeStyleSets({\n pdpDetailsContainer: [\n 'pdpDetails',\n {\n padding: 0,\n '@media (min-width: 640px) and (max-width: 1024px)': {\n paddingLeft: '32px !important',\n paddingRight: '32px !important'\n },\n '@media (max-width: 640px)': {\n paddingLeft: '20px !important',\n paddingRight: '20px !important'\n }\n }\n ],\n autoScrollTabContent: {\n overflow: 'auto'\n },\n tabsContainer: {\n display: 'flex',\n [`@media (min-width: ${ScreenWidthMinXLarge}px)`]: {\n flexDirection: 'row'\n },\n [`@media (max-width: ${ScreenWidthMinXLarge - 1}px)`]: {\n flexDirection: 'column-reverse'\n }\n },\n userTermsContainer: {\n backgroundColor: NeutralColors.white,\n border: '1px solid #EAEAEA',\n borderRadius: '2px',\n height: 'fit-content',\n [`@media (max-width: ${ScreenWidthMinXLarge - 1}px)`]: {\n margin: '36 0 24 0'\n },\n [`@media (min-width: ${ScreenWidthMinXLarge - 1}px)`]: {\n marginBottom: 28\n },\n [`@media (min-width: ${ScreenWidthMinXLarge}px) and (max-width: ${ScreenWidthMinXXLarge - 1}px)`]: {\n marginLeft: 40,\n minWidth: 200,\n maxWidth: 200\n },\n [`@media (min-width: ${ScreenWidthMinXXLarge}px)`]: {\n marginLeft: 32,\n minWidth: 256,\n maxWidth: 256\n },\n '& a:link': {\n color: CommunicationColors.primary,\n textDecoration: 'underline'\n },\n '& a:visited': {\n color: CommunicationColors.primary\n },\n '& a:hover': {\n color: CommunicationColors.shade20\n },\n '& a:active': {\n color: CommunicationColors.shade30\n }\n },\n ctaSampleButton: {\n paddingTop: 10,\n '&:active': {\n color: '#323130'\n },\n '&:hover': {\n color: '#323130',\n opacity: '0.7'\n }\n },\n instructionLink: {\n marginTop: '10px !important'\n },\n bagdeContainer: {\n marginTop: '12px'\n }\n});\nconst consentDisclaimerTokens = {\n padding: 16\n};\nexport class AppDetails extends SpzaComponent {\n /** This temporary function blocks pricing for BAG offers that are not yet ready to be transacted. */ shouldBlockPricing() {\n // hasPrices check is necessary to ensure we don't block pricing for valid Dynamics 365 and PBI Visual offers\n const { app } = this.props;\n return [\n isD365App,\n isD365BCApp,\n isPowerBIVisualsApp\n ].some((fn)=>fn(app)) && !isBagTransactable(app) && app.hasPrices;\n }\n getProductFilterListElements(filterItem, filterTileTypes) {\n let primaryProductFilter = null;\n const filteritems = [];\n Object.keys(DataMap.products).map((value)=>{\n var _DataMap_products__match, _DataMap_products_;\n const currentDatamapBlock = DataMap.products[`${value}`];\n if (this.props.app && !currentDatamapBlock.ShortcutFilters && ((_DataMap_products_ = DataMap.products[`${value}`]) === null || _DataMap_products_ === void 0 ? void 0 : (_DataMap_products__match = _DataMap_products_.match) === null || _DataMap_products__match === void 0 ? void 0 : _DataMap_products__match.call(_DataMap_products_, this.props.app))) {\n const filter = currentDatamapBlock;\n if (!filter) {\n return null;\n }\n const pathParams = {\n industry: null,\n category: null,\n product: null,\n search: null\n };\n pathParams[`${filterTileTypes}`] = filter.ShortcutUrlKey;\n // we are preselecting L1 product in detail page category redirect link back to gallery page.\n // we are only doing this for primary product now which mean no L2 product will be preselected.\n if (filterTileTypes === Constants.filterTileTypes.category && primaryProductFilter) {\n pathParams.product = primaryProductFilter.UrlKey;\n }\n const newPath = this.context.buildHref(routes.marketplace, null, pathParams);\n // Temporary fix for PowerApps to have their builtfor displayed as Apps\n // until we come up with the complete design\n const { property, mask } = getProdcutBitMaskInfo(DataMap.products.PowerApps);\n const isPowerApp = filter.UrlKey === 'web-apps' && this.props.app.products[`${property}`] && (this.props.app.products[`${property}`] & mask) > 0;\n if (isPowerApp) {\n filter.LocKey = 'Apps';\n filter.LongTitle = 'Apps';\n }\n filteritems.push({\n filterItem,\n locKey: filter.LocKey,\n newPath,\n title: filter.LongTitle,\n urlKey: filter.UrlKey\n });\n }\n return null;\n });\n return filteritems;\n }\n showDialog(ctaType) {\n const app = _object_spread_props(_object_spread({}, this.props.app), {\n actionString: getActionStringForCTAType(ctaType)\n });\n this.context.ctaCallback({\n entity: app,\n entityType: Constants.EntityType.App,\n ctaType,\n actionModifier: Constants.Telemetry.ActionModifier.AppDetailCTAButton,\n hasLicense: this.props.doesTenantHasLicenseForApp,\n isOpenedFromPDP: true,\n ribbonKey: this.props.ribbonKey\n });\n }\n fetchData(nextProps) {\n if (nextProps.entityId) {\n const { entityId, isPrivate } = nextProps;\n const { arm } = this.props.userInfo.accessToken;\n // If it private, we must have ARM token ready\n if (isPrivate && arm) {\n this.props.ensureAsyncData({\n entityId,\n isPrivate\n });\n } else if (!isPrivate) {\n this.props.ensureAsyncData({\n entityId,\n isPrivate\n });\n }\n }\n }\n UNSAFE_componentWillReceiveProps(nextProps) {\n this.fetchData(nextProps);\n }\n componentDidMount() {\n this.fetchData(this.props);\n const { entityId, app, loadLinkedInProductGroup } = this.props;\n if (loadLinkedInProductGroup) {\n loadLinkedInProductGroup({\n legacyOfferId: entityId\n });\n }\n if (app) {\n this.telemetryPageLoad();\n // User profile isn't being loaded so we can send the log\n if (!this.props.isLoadingUserProfile) {\n this.logPageLoadAfterUserLoaded();\n }\n this.openRatingModal();\n }\n if (getWindow()) {\n getWindow().addEventListener('scroll', this.handleScroll.bind(this));\n }\n }\n componentDidUpdate(prevProps) {\n var _this_props_userInfo;\n const userProfileLoaded = prevProps.isLoadingUserProfile && !this.props.isLoadingUserProfile;\n if (userProfileLoaded && !this.state.pageLoadLogged) {\n this.logPageLoadAfterUserLoaded();\n }\n if (isSignedInChanged((_this_props_userInfo = this.props.userInfo) === null || _this_props_userInfo === void 0 ? void 0 : _this_props_userInfo.signedIn, prevProps.userInfo.signedIn)) {\n var _this_props_app;\n const entityId = ((_this_props_app = this.props.app) === null || _this_props_app === void 0 ? void 0 : _this_props_app.entityId) || this.props.entityId;\n const { arm } = this.props.userInfo.accessToken;\n const { isPrivate } = this.props;\n this.props.fetchUserPrivateOffers();\n if (!this.props.app && arm) {\n // If it is a private app, the n app will be undefined and we'll need to refetch it from private\n this.props.ensureAsyncData({\n entityId,\n isPrivate\n });\n }\n // Get review details\n this.props.ensureAppReviewsData(entityId, true);\n }\n this.handleScroll();\n }\n componentWillUnmount() {\n const curWindow = getWindow();\n if (curWindow) {\n curWindow.removeEventListener('scroll', this.handleScroll.bind(this));\n }\n }\n openRatingModal() {\n if (this.props.location && this.props.location.query && this.props.location.query.survey) {\n const accessKey = this.props.location.query.survey === 'user' ? null : this.props.location.query.survey;\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n this.props.openRatingModal(this.props.app, accessKey, this.props.app.actionString, ()=>{});\n }\n }\n getAllAppsBtn() {\n const seeAllUrl = this.context.buildHref(routes.marketplace, null, {\n category: null,\n industry: null,\n product: null,\n search: null\n });\n return /*#__PURE__*/ _jsx(InternalLink, {\n className: \"allAppsButton\",\n href: seeAllUrl,\n accEnabled: true,\n \"aria-label\": `${BI_AREA} see all apps`,\n \"data-bi-name\": `${BI_AREA} See all apps button`,\n \"data-bi-area\": BI_AREA,\n children: this.context.loc('ValueProposition_ActionBanner_Button', 'See all apps')\n });\n }\n renderEmptyPrivatePage() {\n const itemAlignmentsStackTokens = {\n childrenGap: 28,\n padding: 10\n };\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"privateOffersContainer\",\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: \"emptyGalleryWrapper\",\n children: /*#__PURE__*/ _jsxs(Stack, {\n tokens: itemAlignmentsStackTokens,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n align: \"center\",\n children: /*#__PURE__*/ _jsx(\"img\", {\n className: \"noResultsImg\",\n src: noResults,\n alt: this.context.loc('UserPrivateOffer_No_Results', 'No results')\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n align: \"center\",\n children: /*#__PURE__*/ _jsx(Text, {\n variant: \"large\",\n children: this.context.loc('UserPrivateOffer_Pdp_NoAccess', \"You don't have access to this private plan.\")\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n align: \"center\",\n children: /*#__PURE__*/ _jsx(ExternalLink, {\n \"aria-label\": this.context.loc('App_LearnMore', 'Learn more'),\n \"data-bi-name\": `${BI_AREA} learn more button`,\n \"data-bi-area\": BI_AREA,\n accessibilityEnabled: true,\n href: \"https://go.microsoft.com/fwlink/?linkid=2162844\",\n shouldOpenInTab: true,\n children: this.context.loc('App_LearnMore', 'Learn more')\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n align: \"center\",\n children: this.getAllAppsBtn()\n })\n ]\n })\n })\n });\n }\n logPageLoadAfterUserLoaded() {\n var _getWindow_location;\n const { app: appInfo, currentView, doesTenantHasLicenseForApp, nationalCloud, uiRole, billingCountryCode, isEmbedded } = this.props;\n const { entityId: appName, ctaTypes } = appInfo || {};\n const payload = {\n page: (_getWindow_location = getWindow().location) === null || _getWindow_location === void 0 ? void 0 : _getWindow_location.href,\n action: Constants.Telemetry.Action.PageLoad,\n actionModifier: Constants.Telemetry.ActionModifier.End,\n appName,\n details: getAppTelemetryDetailContentText({\n appInfo,\n isNationalCloud: !!nationalCloud,\n isEmbedded,\n ctaTypes,\n currentView,\n uiRole,\n hasLicense: uiRole ? doesTenantHasLicenseForApp : null,\n shouldShowUserTerms: appInfo && billingCountryCode ? DetailUtils.shouldShowUserTerms({\n app: appInfo,\n billingCountryCode\n }) : null\n })\n };\n this.instrument.probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n appName: payload.appName\n });\n this.setState({\n pageLoadLogged: true\n });\n }\n telemetryPageLoad() {\n const { billingCountryCode, ctaTypes, entityId, linkedAddIns, linkedSaaS } = this.props.app;\n if (ctaTypes && isTransactApp({\n isEmbedded: false,\n ctaTypes,\n appData: this.props.app,\n billingRegion: billingCountryCode\n })) {\n pageAction(null, {\n content: {\n contentType: Constants.JsllSaas.TransactableSaasPdpView\n }\n });\n }\n if (linkedAddIns && linkedAddIns.length > 0) {\n pageAction(null, {\n content: {\n contentType: Constants.Telemetry.ContentType.SaaSBundlePageView,\n areaName: Constants.Telemetry.AreaName.AppDetails,\n contentName: entityId\n }\n });\n } else if (linkedSaaS) {\n pageAction(null, {\n content: {\n contentType: Constants.Telemetry.ContentType.AddInBundlePageView,\n areaName: Constants.Telemetry.AreaName.AppDetails,\n contentName: entityId\n }\n });\n }\n }\n getOfficeWorksWithList(property) {\n const list = DetailUtils.getDetailArrayItem(this.props.app, property);\n if (!Array.isArray(list)) {\n return [];\n }\n return list.filter((item)=>!!Constants.Office365Mapping[`${item}`]).map((item)=>{\n const value = Constants.Office365Mapping[`${item}`];\n // value will be of the form\n // [actualName]\n // [localizationResource, param1, ...] or\n if (value.length === 1) {\n return value[0];\n } else {\n if (Array.isArray(value[1])) {\n return this.context.locParams(value[0], value[1]);\n } else {\n return this.context.locParams(value[0], [\n value[1]\n ]);\n }\n }\n });\n }\n checkDup(res, item) {\n for(let i = 0; i < res.length; i++){\n const existAward = res[`${i}`];\n if (existAward.length === item.length && existAward.every(function(v, j) {\n return v === item[`${j}`];\n })) {\n return true;\n }\n }\n return false;\n }\n getOfficeAwards(awardKeys) {\n const res = [];\n for(let i = 0; i < awardKeys.length; i++){\n const award = Constants.OfficeAwardsMapping[awardKeys[`${i}`]];\n if (award) {\n if (i === 0) {\n res.push(award);\n } else {\n if (!this.checkDup(res, award)) {\n res.push(award);\n }\n }\n }\n }\n return res;\n }\n isLatestAppAward(awardKeys) {\n for(let i = 0; i < awardKeys.length; i++){\n const award = Constants.OfficeAwardsMapping[awardKeys[`${i}`]];\n if (award && award[2] === this.context.loc('Latest_App_Awards_Year')) {\n return true;\n }\n }\n return false;\n }\n isPowerBICertifiedApp(keys) {\n for(let i = 0; i < keys.length; i++){\n const key = keys[`${i}`];\n if (AppTag[`${key}`] === AppTag.PowerBICertified) {\n return true;\n }\n }\n return false;\n }\n isMSPApp() {\n return this.props.app.tags && this.props.app.tags.indexOf(Constants.BadgeType.AzureExpertsMSP) >= 0;\n }\n getBreadcrumbElement() {\n const { hideBreadcrumbUrl } = this.props;\n const { href, locKey } = getGalleryRoute(this.props.app.appType);\n const linksList = [\n {\n locKey\n },\n {\n locKey: this.props.app.title\n }\n ];\n return /*#__PURE__*/ _jsx(BreadcrumbUrl, {\n href: this.context.buildHref(href, null, {}),\n linksList: linksList,\n hideBreadcrumbUrl: hideBreadcrumbUrl\n });\n }\n getIconElement() {\n const iconUri = DetailUtils.getDetailInformation(this.props.app, 'LargeIconUri');\n if (!iconUri) {\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"iconHost\"\n });\n }\n let iconBackgroundColor = DetailUtils.getDetailInformation(this.props.app, 'IconBackgroundColor');\n if (!iconBackgroundColor) {\n iconBackgroundColor = this.props.app.iconBackgroundColor;\n }\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"iconHost\",\n style: {\n backgroundColor: iconBackgroundColor\n },\n children: [\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"thumbnailSpacer\"\n }),\n /*#__PURE__*/ _jsx(TelemetryImage, {\n src: iconUri,\n className: \"appLargeIcon\",\n itemPropName: \"image\",\n title: this.props.app ? this.props.app.title : ''\n })\n ]\n });\n }\n getCTAElement() {\n const { setCheckoutSourcePDP } = this.props;\n return /*#__PURE__*/ _jsx(CtaButtons, {\n app: this.props.app,\n billingCountryCode: this.props.billingCountryCode,\n startingPrice: this.props.startingPrice,\n isLoadingUserData: this.props.isLoadingUserData,\n onCTAClick: (ctaType)=>{\n setCheckoutSourcePDP({\n source: CheckoutSource.PdpTop\n });\n this.showDialog(ctaType);\n },\n isEmbedded: false,\n openInNewWindowButtonFlag: this.props.openInNewWindowButtonFlag\n });\n }\n getDownloadSampleButton() {\n if (!this.props.app.downloadSampleLink) {\n return null;\n }\n const { app: { entityId } } = this.props;\n return /*#__PURE__*/ _jsx(PrimaryButton, {\n className: classNames([\n contentStyles.ctaSampleButton,\n 'CTAbutton',\n 'downloadSampleButton'\n ]),\n name: \"downloadSampleButton\",\n href: this.props.app.downloadSampleLink,\n target: \"_self\",\n \"data-bi-id\": Constants.JsllCTAId.DownloadSample,\n \"data-bi-type\": Constants.JsllCTAId.DownloadSample,\n \"data-bi-name\": entityId,\n onClick: ()=>{\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.DownloadPBIVisualSample,\n appName: this.props.entityId\n };\n this.instrument.probe(Constants.Telemetry.ProbeName.LogInfo, payload);\n logger.info('', {\n action: payload.action,\n actionModifier: payload.actionModifier,\n appName: payload.appName\n });\n },\n children: this.context.loc('DownloadSample', 'Download Sample')\n }, this.props.app.downloadSampleLink);\n }\n getInstructionsButton() {\n const linkTitle = 'Instructions';\n return /*#__PURE__*/ _jsx(InternalLink, {\n role: \"link\",\n onClick: this.openInstructionsModal,\n className: classNames([\n contentStyles.instructionLink,\n 'c-hyperlink instructionsButton'\n ]),\n telemetryDetails: linkTitle,\n children: this.context.loc('Instructions', linkTitle)\n });\n }\n getNotAvailableInRegionText() {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"notAvailableInRegionContainer\",\n children: [\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"icon-info-14\"\n }),\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"notAvailableInRegionText\",\n children: this.context.loc('NotAvailableInBillingRegion', 'Not available in selected billing region')\n })\n ]\n });\n }\n getUserFavouriteButton() {\n const app = this.props.app;\n if (!app || isPrivateOffer(this.props.app.appType)) {\n return null;\n }\n return /*#__PURE__*/ _jsx(UserFavouriteTileDetailButton, {\n entityId: app.entityId,\n entityType: getUserFavouriteEntityAppType(),\n item: app\n });\n }\n getMicrosoftManagedIndicator() {\n const { indicatorText, indicatorClasses, iconName, iconClasses } = this.getMicrosoftManagedIndicatorUiVariables();\n if (indicatorText) {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"microsoftManagedIndicator\",\n children: [\n /*#__PURE__*/ _jsx(Icon, {\n iconName: iconName,\n className: iconClasses\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: indicatorClasses,\n children: indicatorText\n })\n ]\n });\n }\n return null;\n }\n getMicrosoftManagedIndicatorUiVariables() {\n const indicator = {\n indicatorText: '',\n indicatorClasses: '',\n iconName: '',\n iconClasses: ''\n };\n if (isD365BCApp(this.props.app)) {\n indicator.indicatorText = this.context.loc('MicrosoftManagedIndicator_D365BC');\n indicator.indicatorClasses = 'indicatorText';\n indicator.iconName = 'Info';\n indicator.iconClasses = 'indicatorIcon';\n } else if (isD365App(this.props.app)) {\n indicator.indicatorText = this.context.loc('MicrosoftManagedIndicator_D365_NotAdmin');\n indicator.indicatorClasses = 'indicatorText';\n indicator.iconName = 'Info';\n indicator.iconClasses = 'indicatorIcon';\n }\n return indicator;\n }\n renderBadge(name) {\n return /*#__PURE__*/ _jsx(Badge, {\n name: name\n });\n }\n handleBadgeClick(contentName) {\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.Info,\n details: JSON.stringify({\n contentName\n })\n };\n this.instrument.probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n }\n // TODO: move to utils\n hasOfficeAwards() {\n if (this.props.app.awards) {\n const awards = this.getOfficeAwards(this.props.app.awards);\n if (awards && awards.length > 0) {\n return true;\n }\n }\n if (this.props.app.entityId.toUpperCase() === Constants.HyperfishEntityId.toUpperCase()) {\n const awards = this.getOfficeAwards([\n 'AppAwards_2018_BestUX_Place2'\n ]);\n if (awards && awards.length > 0) {\n return true;\n }\n }\n return false;\n }\n // TODO: move to utils\n isPBICertified() {\n if (this.props.app.tags) {\n if (this.isPowerBICertifiedApp(this.props.app.tags)) {\n return true;\n }\n }\n return false;\n }\n // TODO: move to utils\n isMicrosoftCertified() {\n if (this.props.app.CertificationState === Constants.CertificationType.MicrosoftCertified) {\n return true;\n }\n return false;\n }\n // TODO: move to utils\n isFreeTrial() {\n var _app_startingPrice, _app_pricingInformation;\n const { app } = this.props;\n if (app.actionString === Constants.ActionStrings.Try) {\n return true;\n }\n if ((_app_startingPrice = app.startingPrice) === null || _app_startingPrice === void 0 ? void 0 : _app_startingPrice.hasFreeTrial) {\n return true;\n }\n if (app.trials === DataMap.trials['free-trial'].FilterID) {\n return true;\n }\n // vm\n if ((_app_pricingInformation = app.pricingInformation) === null || _app_pricingInformation === void 0 ? void 0 : _app_pricingInformation.skus) {\n const length = app.pricingInformation.skus.length;\n // loop through all skus to see if any of them have a free trial days duration\n for(let i = 0; i < length; i++){\n const sku = app.pricingInformation.skus[`${i}`];\n if (sku.freeTrialDurationDays) {\n return true;\n }\n }\n }\n return false;\n }\n renderLinkedItems(app, nationalCloud) {\n let dataBiId = '';\n let productId = '';\n let isSaaSRendering = false;\n let headerString = '';\n if (app.linkedSaaS) {\n isSaaSRendering = true;\n dataBiId = 'View Parent';\n productId = DataMap.products.AzureforWebApps.UrlKey;\n } else if (app.linkedAddIns && app.linkedAddIns.length > 0) {\n dataBiId = 'View AddIn';\n productId = DataMap.products.Office365.UrlKey;\n }\n headerString = isSaaSRendering ? this.context.loc('Saas_Linking_App_Details_Parent_Title', 'For the full capabilities of this add-in, get the SaaS package:') : this.context.loc('Saas_Linking_App_Details_AddIns_Title', 'This app package includes premium versions of these add-ins:');\n return /*#__PURE__*/ _jsx(AppDetailsLinkedItems, {\n headerString: headerString,\n linkedItems: isSaaSRendering ? this.props.parentApps : this.props.linkedAddIns,\n isSaaSRendering: isSaaSRendering,\n productId: productId,\n dataBiId: dataBiId,\n nationalCloud: nationalCloud,\n app: app,\n billingCountryCode: this.props.billingCountryCode,\n isLoadingUserData: this.props.isLoadingUserData,\n locale: this.props.locale\n });\n }\n renderLinkedAddIns() {\n if (this.props.app.linkedAddIns && this.props.app.linkedAddIns.length) {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"addInsContainer\",\n children: [\n /*#__PURE__*/ _jsx(\"h2\", {\n className: \"addInsHeader\",\n children: this.context.loc('Saas_Linking_App_Details_AddIns_Title', 'This SaaS package includes full capability versions of these add-ins:')\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n children: this.props.app.linkedAddIns.map((addIn)=>/*#__PURE__*/ _jsx(InternalLink, {\n href: this.context.buildHref(this.getPDProute(), {\n productId: DataMap.products.Office365.UrlKey,\n entityId: addIn.entityId\n }, {\n tab: 'Overview'\n }),\n \"data-bi-id\": \"viewAddIn\",\n \"data-bi-area\": Constants.Telemetry.AreaName.AppDetails,\n \"data-bi-view\": \"SaaSBundle\",\n name: 'LinkedAddIn-' + addIn.type,\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: 'addInsIcon ms-BrandIcon--icon48 ms-BrandIcon--' + addIn.type\n })\n }, addIn.entityId))\n })\n ]\n });\n }\n }\n renderAlreadyPurchased() {\n if (this.props.app.ctaTypes && this.props.app.ctaTypes.some((ctaType)=>ctaType === Constants.CTAType.Purchase)) {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"alreadyPurchasedContainer\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"alreadyPurchasedLabel\",\n children: this.context.locParams('Saas_Linking_App_Details_Already_Title', [\n this.props.app.title\n ])\n }),\n /*#__PURE__*/ _jsx(\"button\", {\n className: \"alreadyPurchasedButton\",\n onClick: ()=>this.showDialog(Constants.CTAType.AlreadyPurchased),\n children: this.context.loc('Saas_Linking_App_Details_Already_Button')\n })\n ]\n });\n }\n }\n renderRatings() {\n return /*#__PURE__*/ _jsx(AppDetailsHeaderRatingBar, {\n app: this.props.app\n });\n }\n renderLinkedIn() {\n const { linkedInProductGroup, locale, billingCountryCode } = this.props;\n return linkedInProductGroup && /*#__PURE__*/ _jsx(LinkedinProductGroupBar, {\n linkedInProductGroup: linkedInProductGroup,\n locale: locale,\n countryCode: billingCountryCode\n });\n }\n getDetailCellElement(information, headerContent, itemPropName) {\n const microTaggingItemPropName = itemPropName || '';\n if (information) {\n if (microTaggingItemPropName === 'publisher') {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"cell\",\n itemProp: microTaggingItemPropName,\n itemScope: true,\n itemType: \"https://schema.org/Organization\",\n children: [\n /*#__PURE__*/ _jsx(\"header\", {\n role: \"complementary\",\n \"aria-label\": headerContent,\n children: headerContent\n }),\n /*#__PURE__*/ _jsx(\"span\", {\n itemProp: \"name\",\n children: information\n })\n ]\n });\n } else {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"cell\",\n itemProp: microTaggingItemPropName,\n children: [\n /*#__PURE__*/ _jsx(\"h2\", {\n role: \"complementary\",\n \"aria-label\": headerContent,\n children: headerContent\n }),\n /*#__PURE__*/ _jsx(\"span\", {\n children: information\n })\n ]\n });\n }\n } else {\n return null;\n }\n }\n // Refactor Candidate: Consider using detailsUtils.getDetailHyperlinkElement\n getDetailHyperlinkElement(information, id, locString) {\n if (information) {\n return /*#__PURE__*/ _jsx(\"a\", {\n className: \"c-hyperlink\",\n rel: \"noreferrer\",\n target: \"_blank\",\n href: information,\n title: locString,\n onClick: ()=>{\n DetailUtils.generateLinkPayloadAndLogTelemetry(DetailUtils.OwnerType.App, this.props.app.entityId, id, information, 'Default');\n },\n children: locString\n });\n } else {\n return null;\n }\n }\n changeTabCallback(tabTitle) {\n const newPath = this.getTabHref(tabTitle);\n urlReplace(newPath);\n }\n getPDProute() {\n return getPDPRoute(this.props.app.appType);\n }\n getTabHref(tabTitle) {\n const productString = getPrimaryProductUrl(this.props.app.primaryProduct);\n const productData = getProductByUrlKey({\n urlKey: productString\n });\n const product = productData ? productData.UrlKey : productString;\n return this.context.buildHref(this.getPDProute(), {\n productId: product,\n entityId: this.props.app.entityId\n }, {\n tab: tabTitle\n }, true, false, true);\n }\n getStartingPriceElement(startingPrice, isDetailed = false) {\n const { app, billingCountryCode, app: { entityId } } = this.props;\n if (startingPrice && startingPrice.pricingData && startingPrice.pricingData !== PricingStates.NoPricingData && startingPrice.pricingData !== PricingStates.NotAvailableInThisRegion && startingPrice.pricingData !== PricingStates.AlwaysAvailable && startingPrice.pricingData !== PricingStates.Loading) {\n const pricingElement = {\n type: null,\n label: '',\n value: '',\n href: ''\n };\n if (startingPrice.pricingData === PricingStates.FreeApp) {\n pricingElement.type = Constants.ButtonType.Label;\n pricingElement.label = this.context.loc('Pricing');\n pricingElement.value = this.context.loc('Pricing_Free');\n } else if (startingPrice.pricingData === PricingStates.AdditionalPurchasesRequired) {\n pricingElement.type = Constants.ButtonType.Label;\n pricingElement.label = this.context.loc('Pricing');\n pricingElement.value = this.context.loc('AdditionalPurchaseMayBeRequired');\n } else if (startingPrice.pricingData === PricingStates.StartFromFree) {\n // Freemium offers with pricing plans\n pricingElement.type = Constants.ButtonType.Label;\n pricingElement.label = this.context.loc('Pricing_StartsAt');\n pricingElement.value = this.context.loc(!this.shouldBlockPricing() && isDetailed ? 'Pricing_StartsFromFree' : 'Pricing_Free');\n } else if (startingPrice.pricingData === PricingStates.BYOL) {\n Object.assign(pricingElement, {\n type: Constants.ButtonType.Label,\n label: this.context.loc('Pricing'),\n value: this.context.loc('Bring_Your_Own_License')\n });\n } else if (typeof startingPrice.pricingData === 'object') {\n if (this.canRenderPricing()) {\n const isOneTimePayment = isOneTimePaymentOffer(entityId);\n pricingElement.href = this.getTabHref(AppDetails.pricingTabName);\n pricingElement.type = Constants.ButtonType.Link;\n pricingElement.label = this.context.loc('StartingAt');\n pricingElement.value = getStartingFromPriceText({\n startingPrice,\n offerType: app.offerType,\n context: this.context,\n countryCode: billingCountryCode,\n isOneTimePaymentOffer: isOneTimePayment,\n locale: this.props.locale\n });\n } else {\n pricingElement.type = Constants.ButtonType.Label;\n pricingElement.label = this.context.loc('Pricing');\n pricingElement.value = getPriceString({\n context: this.context,\n price: startingPrice.pricingData,\n countryCode: this.props.billingCountryCode,\n currency: startingPrice.pricingData.currency,\n locale: this.props.locale\n });\n }\n }\n if (typeof startingPrice.pricingData === 'object' && !this.canRenderPricing()) {\n if (pricingElement.value) {\n pricingElement.value = pricingElement.value + ' ' + this.context.loc('SiteLicenseAlsoAvailable');\n } else {\n pricingElement.type = Constants.ButtonType.Label;\n pricingElement.label = this.context.loc('Pricing');\n pricingElement.value = this.context.loc('SiteLicenseAlsoAvailable');\n }\n }\n return pricingElement;\n }\n return null;\n }\n bulidStartingPriceElement({ pricingLinkClassName }) {\n const { app, isEmbedded } = this.props;\n const startingPrice = this.shouldBlockPricing() ? null : this.props.startingPrice;\n const pricingElement = this.getStartingPriceElement(startingPrice);\n if (pricingElement) {\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"cell\",\n itemProp: \"offers\",\n itemScope: true,\n itemType: \"https://schema.org/Offer\",\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: \"pricingText\",\n children: [\n pricingElement && pricingElement.label && pricingElement.type && pricingElement.value && !hidePowerBiVisualPricing({\n app,\n isEmbedded\n }) ? /*#__PURE__*/ _jsx(ButtonLink, {\n href: pricingElement.href ? pricingElement.href : '',\n className: pricingLinkClassName,\n type: pricingElement.type,\n accEnabled: true,\n label: pricingElement.label,\n value: pricingElement.value\n }) : null,\n startingPrice.pricingData === PricingStates.FreeApp ? /*#__PURE__*/ _jsxs(\"div\", {\n children: [\n /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"price\",\n content: \"0\"\n }),\n /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"priceCurrency\",\n content: \"USD\"\n }),\n /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"category\",\n content: \"free\"\n })\n ]\n }) : typeof startingPrice.pricingData === 'object' ? /*#__PURE__*/ _jsxs(\"div\", {\n children: [\n /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"priceCurrency\",\n content: startingPrice.pricingData.currency\n }),\n /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"price\",\n content: getPriceString({\n context: this.context,\n price: startingPrice.pricingData,\n countryCode: this.props.billingCountryCode,\n currency: startingPrice.pricingData.currency,\n locale: this.props.locale\n }).replace(/[^0-9.]/g, '')\n })\n ]\n }) : null\n ]\n })\n });\n }\n return null;\n }\n renderAADWorkAccountMetaData() {\n const appData = this.props.app;\n const primaryProduct = appData && appData.primaryProduct;\n const products = appData && appData.products;\n const ctaTypes = appData && appData.ctaTypes || [];\n const shouldRenderAADWorkAccountMetaData = ctaTypes.some((ctaType)=>{\n return !isAppForMSAAccountOnly(primaryProduct, products, ctaType);\n });\n return shouldRenderAADWorkAccountMetaData && 'SignInModal_AccountType2';\n }\n buildFilterElements(filteritems) {\n if (filteritems) {\n let filterElements = filteritems.map((filter)=>{\n if (this.props.nationalCloud) {\n return /*#__PURE__*/ _jsx(\"div\", {\n children: this.context.loc(filter.locKey, filter.title)\n }, filter.title);\n } else {\n return /*#__PURE__*/ _jsx(IconLink, {\n iconClassName: 'icon-' + filter.urlKey + '-16',\n href: filter.newPath,\n title: this.context.loc(filter.locKey, filter.title),\n onClick: (e)=>{\n DetailUtils.generateLinkPayloadAndLogTelemetry(DetailUtils.OwnerType.App, this.props.app.entityId, filter.filterItem, filter.newPath, 'Default');\n urlPush(filter.newPath);\n window.scrollTo(0, 0);\n // The preventDefault prevents the route from transitioning and thus refreshing the page.\n e.preventDefault();\n },\n accEnabled: true,\n className: \"c-hyperlink detailsCategories\",\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: \"productItem\",\n children: [\n this.context.loc(filter.locKey, filter.title),\n filter.filterItem === Constants.filterMaps.categories ? /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"applicationCategory\",\n content: this.context.loc(filter.locKey, filter.title)\n }) : null\n ]\n })\n }, filter.title);\n }\n });\n filterElements = filterElements.filter((element)=>!!element);\n return filterElements;\n }\n return null;\n }\n /** Returns Plans + Pricing tab if any SKUs have a price, otherwise returns Plans tab */ getPlanAndPricingTabTitle() {\n var _this_props_app_pricingInformation_skus, _this_props_app_pricingInformation;\n if (!this.shouldBlockPricing() && ((_this_props_app_pricingInformation = this.props.app.pricingInformation) === null || _this_props_app_pricingInformation === void 0 ? void 0 : (_this_props_app_pricingInformation_skus = _this_props_app_pricingInformation.skus) === null || _this_props_app_pricingInformation_skus === void 0 ? void 0 : _this_props_app_pricingInformation_skus.some((sku)=>!!sku.startingPrice))) {\n return this.context.loc('Detail_PlansPricingTab');\n }\n return this.context.loc('Detail_PlansTab');\n }\n renderReviewsTab() {\n return /*#__PURE__*/ _jsx(AppReviewCollection, {\n appId: this.props.app.entityId,\n appData: this.props.app,\n location: this.props.location,\n isEmbed: false\n });\n }\n renderOverviewTab() {\n const { app, billingCountryCode, suggestedItems } = this.props;\n const { ctaTypes, detailInformation, entityId, offerType, products, shortDescription, tags, title, autoRunLaunchEvents } = app;\n const isOneTimePayment = isOneTimePaymentOffer(entityId);\n return /*#__PURE__*/ _jsx(Overview, {\n isOneTimePayment: isOneTimePayment,\n ownerType: DetailUtils.OwnerType.App,\n ownerId: entityId,\n ownerTitle: title,\n products: products,\n shortDescription: shortDescription,\n description: detailInformation.Description,\n images: detailInformation.Images,\n videos: detailInformation.DemoVideos,\n capabilities: DetailUtils.getDetailArrayItem(app, 'Capabilities'),\n autoRunLaunchEvents: autoRunLaunchEvents,\n TileType: AppTile,\n crossListings: suggestedItems,\n isPowerBICertified: tags ? this.isPowerBICertifiedApp(tags) : null,\n isSaaSTransactableApp: offerType === OfferType.SaaSApp ? isTransactApp({\n isEmbedded: false,\n ctaTypes,\n appData: app,\n billingRegion: billingCountryCode\n }) ? Constants.JsllSaas.SaasTransactable : Constants.JsllSaas.SaasNonTransactable : ''\n });\n }\n renderLinkedinTab() {\n const { linkedInProductGroup, app, locale, billingCountryCode, userInfo: { email: userEmail, signedIn: userSignedIn } } = this.props;\n return /*#__PURE__*/ _jsx(LinkedinProductGroup, {\n linkedInProductGroup: linkedInProductGroup,\n offerName: app.title,\n countryCode: billingCountryCode,\n locale: locale,\n userEmail: userSignedIn ? userEmail : null,\n feedbackScoreRequired: true,\n parentTabQuery: SELECTED_TAB_QUERY\n });\n }\n getTabChildren() {\n const tabsChilds = [\n {\n title: this.context.loc('PartnerDetail_OverviewTab', 'Overview'),\n name: Constants.Tabs.Overview,\n getContent: ()=>this.renderOverviewTab()\n }\n ];\n if (this.canRenderPricing()) {\n tabsChilds.push({\n title: this.getPlanAndPricingTabTitle(),\n name: AppDetails.pricingTabName,\n getContent: ()=>this.renderPricing()\n });\n }\n const usefulInfo = ()=>this.props.isHydrated && /*#__PURE__*/ _jsx(UsefulInfo, {\n ownerType: DetailUtils.OwnerType.App,\n metadata: this.getUsefulInfoMetadata(this.props.app)\n });\n const { app: { entityId = '' } } = this.props;\n const isOneTimePayment = isOneTimePaymentOffer(entityId);\n if (!isOneTimePayment) {\n tabsChilds.push({\n title: this.context.loc('AppDetail_ReviewsTab', 'Ratings + reviews'),\n name: Constants.Tabs.Reviews,\n getContent: ()=>this.renderReviewsTab()\n });\n }\n tabsChilds.push({\n title: this.context.loc('AppDetail_DetilsAndSupportTab', 'Details + support'),\n name: Constants.Tabs.DetailsAndSupport,\n getContent: usefulInfo\n });\n const { linkedInProductGroup } = this.props;\n if (linkedInProductGroup) {\n tabsChilds.push({\n title: this.context.loc('AppDetail_LinkedinTab', 'LinkedIn community'),\n name: Constants.Tabs.Linkedin,\n textBadge: this.context.loc('New', 'New'),\n getContent: ()=>this.renderLinkedinTab()\n });\n }\n return tabsChilds;\n }\n getTabsProps() {\n const tabsProps = {\n defaultTab: this.props.defaultTab,\n ownerType: DetailUtils.OwnerType.App,\n ownerId: this.props.app.entityId,\n changeTabCallback: this.changeTabCallback.bind(this),\n getTabHref: this.getTabHref.bind(this)\n };\n return tabsProps;\n }\n /**\n * Returns the link element for either the publisher's terms of use, the standard contract, or the standard contract\n * with amendments\n */ // TODO - move to utils\n getTermsOfUseLinks() {\n const terms = [\n {\n information: this.props.app.licenseTermsUrl,\n id: 'LicenseAgreement',\n locString: 'App_LicenseAgreement'\n }\n ];\n if (this.props.app.universalAmendmentUrl) {\n terms.push({\n information: this.props.app.universalAmendmentUrl,\n id: 'App_UniversalAmendment',\n locString: 'App_UniversalAmendment'\n });\n }\n return terms;\n }\n canRenderPricing() {\n const { app, billingCountryCode } = this.props;\n return canRenderPricing({\n app,\n isEmbedded: false,\n billingRegion: billingCountryCode\n });\n }\n renderPricing() {\n const { app, billingCountryCode } = this.props;\n const { offerType, pricingInformation, futurePricesInformation, licenseManagement, entityId } = app;\n const billingCountry = getBillingCountryByCountryCode(billingCountryCode);\n if (offerType === OfferType.SaaSApp) {\n return /*#__PURE__*/ _jsx(SaasPricingTable, {\n app: app,\n billingCountry: billingCountry,\n shouldBlockPrices: this.shouldBlockPricing(),\n onGetInNowClicked: this.getItNowTableCallback\n });\n }\n return /*#__PURE__*/ _jsx(SimplePlanPricing, {\n pricing: pricingInformation,\n futurePrices: futurePricesInformation,\n billingCountry: billingCountry,\n isMicrosoftManaged: licenseManagement === null || licenseManagement === void 0 ? void 0 : licenseManagement.isMicrosoftManaged,\n shouldBlockPrices: this.shouldBlockPricing(),\n isOneTimePaymentOffer: isOneTimePaymentOffer(entityId),\n locale: this.props.locale\n });\n }\n // TODO - move to utils\n getUsefulInfoMetadata(app) {\n const { entityId } = this.props;\n const oneTimePaymentOffer = isOneTimePaymentOffer(entityId);\n // colomn 1 - Useful Information\n const usefulInformaionCells = [];\n const supportCells = [];\n const moreLinksCells = [];\n const powerBIVisualCells = [];\n const metadata = [];\n // publisher\n usefulInformaionCells.push({\n id: 'publisher',\n title: 'App_Publisher',\n cellItems: [\n {\n id: 'publisherItem',\n type: UsefulInfoMetadataCellItemType.Label,\n text: app.publisher\n }\n ]\n });\n // MicrosoftCertified\n if (!DetailUtils.hideCertificateBadges()) {\n if (app.CertificationState === Constants.CertificationType.MicrosoftCertified || app.CertificationState === Constants.CertificationType.SelfAttested) {\n usefulInformaionCells.push({\n id: 'App_Certification',\n title: 'App_Certification',\n cellItems: [\n {\n id: 'M365ertificationDetails',\n type: UsefulInfoMetadataCellItemType.Link,\n text: app.CertificationState === Constants.CertificationType.MicrosoftCertified ? 'App_CertificationLink' : 'App_CertificationLinkSelfAttested',\n information: app.CertificationLink,\n entityId: app.entityId\n }\n ]\n });\n }\n }\n // pricing\n const isDetailedPricing = true;\n const pricingObject = this.getStartingPriceElement(this.props.startingPrice, isDetailedPricing);\n if (pricingObject) {\n let cell;\n if (pricingObject.type === Constants.ButtonType.Link) {\n cell = {\n information: pricingObject.href,\n id: 'SupportLink',\n text: this.context.locParams('StartingAtPrice', [\n pricingObject.value\n ]),\n type: UsefulInfoMetadataCellItemType.Link,\n entityId: app.entityId,\n props: {\n target: '_self',\n accEnabled: true\n }\n };\n } else {\n cell = {\n id: 'AppVersionItem',\n type: UsefulInfoMetadataCellItemType.Label,\n text: pricingObject.value\n };\n }\n usefulInformaionCells.push({\n id: 'Pricing',\n title: 'Pricing',\n cellItems: [\n cell\n ]\n });\n }\n // aad or microsoft account\n const AADWorkAccount = this.renderAADWorkAccountMetaData();\n usefulInformaionCells.push({\n id: 'Accounts_Supported',\n title: 'Accounts_Supported',\n cellItems: [\n AADWorkAccount && {\n id: 'AADWorkAccount',\n type: UsefulInfoMetadataCellItemType.Label,\n text: AADWorkAccount\n },\n isMSASupported(app.products) && {\n id: 'MSASupported',\n type: UsefulInfoMetadataCellItemType.Label,\n text: 'Microsoft_Account'\n }\n ]\n });\n // app version\n if (!oneTimePaymentOffer && DetailUtils.getDetailInformation(app, 'AppVersion')) {\n usefulInformaionCells.push({\n id: 'AppVersion',\n title: 'App_Version',\n cellItems: [\n {\n id: 'AppVersionItem',\n type: UsefulInfoMetadataCellItemType.Label,\n text: DetailUtils.getDetailInformation(app, 'AppVersion')\n }\n ]\n });\n }\n // app updated\n if (DetailUtils.getDetailInformation(app, 'ReleaseDate')) {\n usefulInformaionCells.push({\n id: 'ReleaseDate',\n title: 'App_Updated',\n cellItems: [\n {\n id: 'AppReleaseDateItem',\n type: UsefulInfoMetadataCellItemType.Label,\n text: this.context.locDateString(DetailUtils.getDetailInformation(app, 'ReleaseDate'))\n }\n ]\n });\n }\n if (!oneTimePaymentOffer && this.props.app.products && Object.keys(this.props.app.products).length > 0) {\n // products\n const products = this.getProductFilterListElements(Constants.filterMaps.products, Constants.filterTileTypes.product).map((product)=>{\n return {\n id: product.title,\n type: UsefulInfoMetadataCellItemType.Filter,\n text: product.locKey,\n entityId: app.entityId,\n filter: product,\n isEmbedded: false,\n nationalCloud: this.props.nationalCloud\n };\n });\n usefulInformaionCells.push({\n id: 'FilterType_Products',\n title: 'FilterType_Products',\n cellItems: products\n });\n }\n // categories\n const primaryProductFilter = getProductFilter(app.primaryProduct);\n const categories = this.getFilterListInfoElements({\n filterType: Constants.filterTileTypes.category,\n filterItem: Constants.filterMaps.categories,\n details: app.categoriesDetails,\n primaryProductFilter\n });\n if (categories === null || categories === void 0 ? void 0 : categories.length) {\n usefulInformaionCells.push({\n id: 'Categories',\n title: 'App_Categories',\n cellItems: categories\n });\n }\n // industries\n const industries = this.getFilterListInfoElements({\n filterType: Constants.filterTileTypes.industry,\n filterItem: Constants.filterMaps.industries,\n details: app.industriesDetails\n });\n if (industries === null || industries === void 0 ? void 0 : industries.length) {\n usefulInformaionCells.push({\n id: 'Industries',\n title: 'App_Industries',\n cellItems: industries\n });\n }\n // Work with - Products supported\n const worksWith = this.getOfficeWorksWithList('WorksWith');\n if (worksWith && worksWith.length) {\n const products = worksWith.map((productName)=>{\n return {\n id: 'WorksWith' + productName,\n type: UsefulInfoMetadataCellItemType.Label,\n text: productName\n };\n });\n if (products.length) {\n usefulInformaionCells.push({\n id: 'WorksWith',\n title: 'App_WorksWith',\n cellItems: products\n });\n }\n }\n // ### Support section ###\n // support\n if (DetailUtils.getDetailInformation(this.props.app, 'SupportLink') || DetailUtils.getDetailInformation(this.props.app, 'HelpLink')) {\n const supportitems = [];\n if (DetailUtils.getDetailInformation(this.props.app, 'SupportLink')) {\n supportitems.push({\n information: DetailUtils.getDetailInformation(this.props.app, 'SupportLink'),\n id: 'SupportLink',\n text: 'App_Support',\n type: UsefulInfoMetadataCellItemType.Link,\n entityId: app.entityId\n });\n }\n if (DetailUtils.getDetailInformation(this.props.app, 'HelpLink')) {\n supportitems.push({\n information: DetailUtils.getDetailInformation(this.props.app, 'HelpLink'),\n id: 'HelpLink',\n text: 'App_Help',\n type: UsefulInfoMetadataCellItemType.Link,\n entityId: app.entityId\n });\n }\n supportCells.push({\n id: 'supportLinks',\n title: null,\n cellItems: supportitems\n });\n }\n // Legal\n if (DetailUtils.getDetailInformation(app, 'PrivacyPolicyUrl') || app.licenseTermsUrl) {\n const cells = [\n ...this.getTermsOfUseLinks().map((link)=>{\n return {\n information: link.information,\n id: link.id,\n text: link.locString,\n type: UsefulInfoMetadataCellItemType.Link,\n entityId: app.entityId\n };\n }),\n {\n information: DetailUtils.getDetailInformation(this.props.app, 'PrivacyPolicyUrl'),\n id: 'PrivacyPolicyUrl',\n text: 'App_PrivacyPolicy',\n type: UsefulInfoMetadataCellItemType.Link,\n entityId: app.entityId\n }\n ];\n usefulInformaionCells.push({\n id: 'App_Legal',\n title: 'App_Legal',\n cellItems: cells\n });\n }\n // more links\n const documents = this.props.app.detailInformation.CollateralDocuments;\n if (documents && documents.length > 0) {\n const documentsCells = documents.map((doc)=>{\n return {\n information: doc.DocumentUri,\n id: 'LearnMore',\n text: getWorkBreakEnabledString(doc.DocumentName),\n type: UsefulInfoMetadataCellItemType.Link,\n entityId: app.entityId\n };\n });\n moreLinksCells.push({\n id: 'App_LearnMoreTitle',\n title: '',\n cellItems: documentsCells\n });\n }\n // ### Power BI Visual Instructions\n if (isPowerBIVisualsApp(this.props.app) && isMigratedPowerBIVisual(this.props.app)) {\n const cells = [\n {\n id: 'PowerBIVisual_Instructions',\n type: UsefulInfoMetadataCellItemType.Label,\n text: 'PowerBIVisual_DetailsAndSupport_Text'\n },\n {\n type: UsefulInfoMetadataCellItemType.InternalLink,\n information: '',\n text: 'PowerBIVisual_Instructions',\n onClick: ()=>this.openInstructionsModal()\n }\n ];\n powerBIVisualCells.push({\n id: 'PowerBIVisual_Instructions',\n title: '',\n cellItems: cells\n });\n }\n // create root metadata item\n if (usefulInformaionCells.length) {\n metadata.push({\n id: 'UsefulInformationDetails',\n title: 'AppDetail_UsefulInformaionDetails',\n titleFallback: 'Details',\n cells: usefulInformaionCells\n });\n }\n if (supportCells.length) {\n metadata.push({\n id: 'Support',\n title: 'AppDetail_Support',\n cells: supportCells\n });\n }\n if (moreLinksCells.length) {\n metadata.push({\n id: 'App_Links',\n title: 'App_Links',\n titleFallback: 'Links',\n cells: moreLinksCells\n });\n }\n if (powerBIVisualCells.length) {\n metadata.push({\n id: 'PowerBIVisual_DetailsAndSupport',\n title: this.context.loc('PowerBIVisual_DetailsAndSupport_Title'),\n cells: powerBIVisualCells\n });\n }\n return metadata;\n }\n renderStickyCard(tabsProps, tabsChilds) {\n return /*#__PURE__*/ _jsx(\"div\", {\n ref: this.stickyCardRef,\n children: /*#__PURE__*/ _jsxs(StickyCard, {\n title: this.props.app.title,\n logoURL: this.props.app.iconURL ? this.props.app.iconURL : '',\n tabsProps: tabsProps,\n tabsChilds: tabsChilds,\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"stickyCardPricing\",\n children: this.bulidStartingPriceElement({\n pricingLinkClassName: 'light'\n })\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"stickyCardButton\",\n children: this.getCTAElement()\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"stickyCardFavourite\",\n children: this.getUserFavouriteButton()\n })\n ]\n })\n });\n }\n getChildContext() {\n return {\n getAppDetailsStickyCardHeight: ()=>{\n var _this_stickyCardRef_current, _this_stickyCardRef;\n return (_this_stickyCardRef = this.stickyCardRef) === null || _this_stickyCardRef === void 0 ? void 0 : (_this_stickyCardRef_current = _this_stickyCardRef.current) === null || _this_stickyCardRef_current === void 0 ? void 0 : _this_stickyCardRef_current.clientHeight;\n }\n };\n }\n handleScroll() {\n const curWindow = getWindow();\n const isPageScrolled = StickyCard.handleScroll(curWindow, AppDetails.pdpTabsId);\n if (this.state.isPageScrolled !== isPageScrolled) {\n this.setState({\n isPageScrolled\n });\n }\n }\n renderTabContent(tabChild) {\n const { app, billingCountryCode } = this.props;\n return /*#__PURE__*/ _jsxs(Stack, {\n className: contentStyles.tabsContainer,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n grow: true,\n className: classNames({\n [contentStyles.autoScrollTabContent]: tabChild.name === Constants.Tabs.PlansAndPrice\n }),\n children: tabChild.getContent()\n }),\n DetailUtils.shouldShowUserTerms({\n app,\n billingCountryCode\n }) && this.props.isHydrated && tabChild.name !== Constants.Tabs.Reviews && /*#__PURE__*/ _jsx(Stack.Item, {\n tokens: consentDisclaimerTokens,\n className: contentStyles.userTermsContainer,\n children: /*#__PURE__*/ _jsx(UserTerms, {\n app: app\n })\n })\n ]\n });\n }\n renderImpl() {\n const { uiRole, entityId, userInfo, app } = this.props;\n const isOneTimePayment = isOneTimePaymentOffer(entityId);\n if (this.props.app) {\n const tabsProps = this.getTabsProps();\n const tabsChilds = this.getTabChildren();\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"ASdesktopAppDetails\",\n itemScope: true,\n itemType: \"https://schema.org/SoftwareApplication\",\n role: \"main\",\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: \"spza_detailContainer spza_partnerDetailContainer\",\n children: [\n this.state.isPageScrolled ? this.renderStickyCard(tabsProps, tabsChilds) : null,\n /*#__PURE__*/ _jsxs(\"div\", {\n className: contentStyles.pdpDetailsContainer,\n children: [\n this.getBreadcrumbElement(),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"detailContent\",\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: \"deatilPageContent\",\n children: [\n /*#__PURE__*/ _jsxs(Card, {\n title: this.props.app.title,\n subtitle: this.context.locParams('By_Publisher', [\n this.props.app.publisher\n ]),\n logoURL: DetailUtils.getDetailInformation(this.props.app, 'LargeIconUri'),\n children: [\n this.props.isHydrated && !isOneTimePayment && this.props.app.products != null ? this.buildFilterElements(this.getProductFilterListElements(Constants.filterMaps.products, Constants.filterTileTypes.product)) : null,\n /*#__PURE__*/ _jsxs(Stack, {\n className: contentStyles.bagdeContainer,\n tokens: {\n childrenGap: 5\n },\n wrap: true,\n horizontal: true,\n children: [\n isPrivateOffer(this.props.app.appType) && this.renderBadge(Constants.BadgeType.PrivateOffer),\n this.isFreeTrial() && this.renderBadge(Constants.BadgeType.FreeTrial),\n this.isMicrosoftCertified() && this.renderBadge(Constants.BadgeType.MicrosoftCertified),\n isCertifiedSoftware(app) && this.renderBadge(Constants.BadgeType.CertifiedSoftware),\n this.props.app.isSolutionMap && this.renderBadge(Constants.BadgeType.SolutionMap),\n this.hasOfficeAwards() && this.renderBadge(Constants.BadgeType.OfficeAwards),\n this.isPBICertified() && this.renderBadge(Constants.BadgeType.PBICertified),\n this.isMSPApp() && this.renderBadge(Constants.BadgeType.AzureExpertsMSP),\n app.AzureBenefitEligible && this.renderBadge(Constants.BadgeType.AzureBenefitEligible)\n ]\n }),\n this.renderRatings(),\n this.renderLinkedIn(),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"container\",\n children: [\n this.props.isHydrated && this.bulidStartingPriceElement({\n pricingLinkClassName: 'dark'\n }),\n this.getCTAElement(),\n isPowerBIVisualsApp(this.props.app) && isMigratedPowerBIVisual(this.props.app) && this.getDownloadSampleButton(),\n isPowerBIVisualsApp(this.props.app) && isMigratedPowerBIVisual(this.props.app) && this.getInstructionsButton(),\n this.getUserFavouriteButton()\n ]\n }),\n /*#__PURE__*/ _jsx(MicrosoftManagedIndicatorWrapper, {\n app: this.props.app,\n isAvailableInRegion: isAvailableInThisRegion(this.props),\n uiRole: uiRole,\n renderIndicator: this.getMicrosoftManagedIndicator.bind(this)\n }),\n !isAvailableInThisRegion(this.props) && this.getNotAvailableInRegionText()\n ]\n }),\n this.props.isHydrated && /*#__PURE__*/ _jsx(_Fragment, {\n children: this.renderLinkedItems(this.props.app, this.props.nationalCloud)\n }),\n !this.props.app.detailInformation ? null : /*#__PURE__*/ _jsx(\"div\", {\n id: AppDetails.pdpTabsId,\n className: AppDetails.pdpTabsClass,\n children: /*#__PURE__*/ _jsx(Tabs, {\n defaultTab: tabsProps.defaultTab,\n ownerType: tabsProps.ownerType,\n ownerId: tabsProps.ownerId,\n changeTabCallback: tabsProps.changeTabCallback,\n getTabHref: tabsProps.getTabHref,\n children: tabsChilds.map((tabChild)=>/*#__PURE__*/ _jsx(Tab, {\n title: tabChild.title,\n name: tabChild.name,\n textBadge: tabChild.textBadge,\n children: this.renderTabContent(tabChild)\n }, tabChild.name))\n })\n })\n ]\n })\n })\n ]\n })\n ]\n })\n });\n }\n if (!userInfo.privateOffers.loading && !userInfo.privateOffers.dataList.find((offer)=>offer.entityId === entityId)) {\n return this.renderEmptyPrivatePage();\n } else {\n // there is no app\n return /*#__PURE__*/ _jsx(Spinner, {\n className: \"nullAppContainer\",\n children: this.context.loc('AppDetail_LoadingText', 'Loading...')\n });\n }\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"stickyCardRef\", null), _define_property(this, \"instrument\", void 0), _define_property(this, \"context\", void 0), _define_property(this, \"getFilterListInfoElements\", ({ filterType, filterItem, details, primaryProductFilter })=>{\n const { app } = this.props;\n return details === null || details === void 0 ? void 0 : details.map(({ urlKey, longTitle, locKey })=>{\n const pathParams = {\n [filterType]: urlKey,\n product: primaryProductFilter === null || primaryProductFilter === void 0 ? void 0 : primaryProductFilter.UrlKey\n };\n const newPath = this.context.buildHref(routes.marketplace, null, pathParams);\n const filter = {\n filterItem,\n locKey,\n newPath,\n title: longTitle,\n urlKey\n };\n return {\n id: filter.title,\n type: UsefulInfoMetadataCellItemType.Filter,\n text: filter.locKey,\n entityId: app.entityId,\n filter,\n isEmbedded: false,\n nationalCloud: this.props.nationalCloud\n };\n });\n }), _define_property(this, \"openInstructionsModal\", ()=>{\n if (this.props.app.downloadLink) {\n this.props.openInstructionsModal();\n }\n }), _define_property(this, \"getItNowTableCallback\", (planId)=>{\n const { app, ribbonKey, setCheckoutSourcePDP } = this.props;\n setCheckoutSourcePDP({\n source: CheckoutSource.PdpTable\n });\n this.context.ctaCallback({\n entity: app,\n entityType: Constants.EntityType.App,\n ctaType: app.ctaTypes[0],\n skuId: null,\n actionModifier: Constants.Telemetry.ActionModifier.AppDetailCTAButtonFromTable,\n tileDataRequestId: null,\n hasLicense: this.props.doesTenantHasLicenseForApp,\n planId,\n ribbonKey\n });\n });\n this.instrument = SpzaInstrumentService.getProvider();\n this.stickyCardRef = /*#__PURE__*/ React.createRef();\n this.state = {\n isPageScrolled: false,\n pageLoadLogged: false\n };\n }\n}\n_define_property(AppDetails, \"pricingTabName\", 'PlansAndPrice');\n_define_property(AppDetails, \"pdpTabsId\", 'pdpTabs');\n_define_property(AppDetails, \"pdpTabsClass\", 'pdpTabs');\nAppDetails.childContextTypes = {\n getAppDetailsStickyCardHeight: PropTypes.func\n};\nAppDetails.contextTypes = {\n loc: PropTypes.func,\n locDateString: PropTypes.func,\n locParams: PropTypes.func,\n buildHref: PropTypes.func,\n ctaCallback: PropTypes.func,\n contactCallback: PropTypes.func,\n renderErrorModal: PropTypes.func,\n openTileCallback: PropTypes.func\n};\n","export const Capabilities = {\n Capability1: [\n 'CP_Office1',\n 'CP_Office2'\n ],\n Capability2: [\n 'CP_Office3',\n 'CP_Office2'\n ],\n Capability3: [\n 'CP_Office4',\n 'CP_Office2'\n ],\n Capability4: [],\n Capability5: [\n 'CP_Office2',\n 'CP_Office5'\n ],\n Capability6: [\n 'CP_Office2',\n 'CP_Office6'\n ],\n Capability7: [\n 'CP_Office2',\n 'CP_Office7'\n ],\n Capability8: [],\n Capability9: [],\n Capability10: [\n 'CP_Office2',\n 'CP_Office8'\n ],\n Capability11: [\n 'CP_Office9',\n 'CP_Office2'\n ],\n Capability14: [\n 'CP_Office10'\n ]\n};\n","export const AutoRuns = {\n OnNewMessageCompose: {\n loc: 'AutoRun_OnNewMessageCompose',\n fallback: 'The user composes a new mail.'\n },\n OnNewAppointmentOrganizer: {\n loc: 'AutoRun_OnNewAppointmentOrganizer',\n fallback: 'The user creates a new event.'\n },\n OnMessageAttachmentsChanged: {\n loc: 'AutoRun_OnMessageAttachmentsChanged',\n fallback: 'The user adds or removes attachments from an email.'\n },\n OnAppointmentAttachmentsChanged: {\n loc: 'AutoRun_OnAppointmentAttachmentsChanged',\n fallback: 'The user adds or removes attachments from an event.'\n },\n OnMessageRecipientsChanged: {\n loc: 'AutoRun_OnMessageRecipientsChanged',\n fallback: 'The user adds or removes recipients from an email.'\n },\n OnAppointmentAttendeesChanged: {\n loc: 'AutoRun_OnAppointmentAttendeesChanged',\n fallback: 'The user adds or removes attendees from an event.'\n },\n OnAppointmentTimeChanged: {\n loc: 'AutoRun_OnAppointmentTimeChanged',\n fallback: 'The user changes the date or time of an event.'\n },\n OnAppointmentRecurrenceChanged: {\n loc: 'AutoRun_OnAppointmentRecurrenceChanged',\n fallback: 'The user changes the recurrence of an event.'\n },\n OnInfoBarDismissClicked: {\n loc: 'AutoRun_OnInfoBarDismissClicked',\n fallback: 'The user dismisses a notification while composing an email or creating an event.'\n },\n OnMessageSend: {\n loc: 'AutoRun_OnMessageSend',\n fallback: 'The user sends an email.'\n },\n OnAppointmentSend: {\n loc: 'AutoRun_OnAppointmentSend',\n fallback: 'The user sends an event invite.'\n }\n};\n","/* eslint-disable react/no-danger */ function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { createElement as _createElement } from \"react\";\nimport * as React from 'react';\nimport { Text, mergeStyleSets } from '@fluentui/react';\nimport * as PropTypes from 'prop-types';\nimport { ServiceTile } from '@shared/containers/serviceTile';\nimport SpzaComponent from '@shared/components/spzaComponent';\nimport { MediaType } from '@shared/Models';\nimport { Constants } from '@shared/utils/constants';\nimport { Capabilities } from '@shared/utils/capabilities';\nimport * as DetailUtils from '@shared/utils/detailUtils';\nimport Ribbon from '@shared/components/ribbon';\nimport { TelemetryImage } from '@shared/components/telemetryImage';\nimport { AppTile } from '@shared/containers/appTile';\nimport { DataMap } from '@shared/utils/dataMapping';\nimport { ExternalLink } from '@shared/components/externalLink';\nimport { bitMasksMatch } from '@shared/utils/datamappingHelpers';\nimport { useTelemetry } from '@shared/hooks/useTelemetry';\nimport videoOverlay from '@shared/images/videoOverlay.png';\nimport classnames from 'classnames';\nimport { AutoRuns } from '@shared/utils/autoruns';\nimport { getProdcutBitMaskInfo } from '@shared/utils/appUtils';\nimport { SafeHtmlWrapper } from '@shared/components/safeHtmlWrapper';\n// eslint-disable-next-line react-hooks/rules-of-hooks\nconst [{ pageAction }] = useTelemetry();\nconst contentStyles = mergeStyleSets({\n ulAutorunStyle: {\n 'list-style': 'unset',\n 'padding-left': 40,\n 'margin-top': 8\n },\n autorunTitleStyle: {\n 'margin-top': 8\n },\n ilTextAutorunStyle: {\n 'font-size': 13\n }\n});\nexport class Overview extends SpzaComponent {\n getMedia() {\n const images = this.props.images || [];\n const videos = this.props.videos || [];\n const mediaImages = images.map((image)=>({\n name: image.ImageName,\n link: image.ImageUri,\n thumbnail: image.ImageUri,\n type: MediaType.Image\n }));\n const mediaVideos = videos.map((video)=>({\n name: video.VideoName,\n link: video.VideoLink,\n thumbnail: video.ThumbnailURL,\n type: MediaType.Video\n }));\n return [\n ...mediaVideos,\n ...mediaImages\n ];\n }\n mediaRendering() {\n const mediaRender = [];\n const list = this.getMedia();\n if (!list.length) {\n return null;\n }\n for(let i = 0; i < list.length; i++){\n const item = list[`${i}`];\n if (!this.state.failures[item.thumbnail]) {\n const isVideo = item.type === MediaType.Video;\n mediaRender.push(/*#__PURE__*/ _jsxs(\"div\", {\n className: \"imgContent\",\n tabIndex: 0,\n onKeyPress: (event)=>{\n if (event.charCode === Constants.SystemKey.Enter) {\n this.onMediaItemSelect(item, i, list);\n }\n },\n onClick: ()=>this.onMediaItemSelect(item, i, list),\n children: [\n /*#__PURE__*/ _jsx(TelemetryImage, {\n src: item.thumbnail,\n isVideo: true,\n alt: `Snapshot ${i + 1} of ${this.props.ownerTitle}`,\n ariaLabel: `At a glance ${isVideo ? 'video' : 'image'}`,\n onError: ()=>{\n this.setState({\n failures: _object_spread_props(_object_spread({}, this.state.failures), {\n [item.thumbnail]: true\n })\n });\n }\n }),\n isVideo ? /*#__PURE__*/ _jsx(TelemetryImage, {\n className: \"overlay\",\n src: videoOverlay,\n alt: \"detail page video overlay image\"\n }) : null\n ]\n }, i));\n }\n }\n if (!mediaRender.length) {\n return null;\n }\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"appDetailMedia\",\n children: [\n /*#__PURE__*/ _jsx(\"h3\", {\n className: \"thumnailsTitle\",\n children: this.context.loc('Overview_Thumbnails')\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"thumbnails\",\n children: mediaRender\n })\n ]\n });\n }\n isPowerBiVisual() {\n const { property, mask } = getProdcutBitMaskInfo(DataMap.products.PowerBICustomVisual);\n return !!(this.props.products && bitMasksMatch(this.props.products, property, mask));\n }\n createDisclaimer() {\n if (!this.isPowerBiVisual()) {\n return /*#__PURE__*/ _jsx(\"div\", {\n children: this.context.loc('CP_Disclaimer')\n });\n }\n if (this.isPowerBiVisual() && !this.props.isPowerBICertified) {\n return /*#__PURE__*/ _jsx(\"div\", {\n children: this.context.loc('CP_Disclaimer_PowerBI')\n });\n }\n return /*#__PURE__*/ _jsxs(_Fragment, {\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n children: this.context.loc('CP_Disclaimer_Certified_PowerBI')\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n children: /*#__PURE__*/ _jsx(ExternalLink, {\n className: \"c-hyperlink\",\n href: Constants.learnMoreCertifiedPBI,\n accessibilityEnabled: true,\n children: /*#__PURE__*/ _jsxs(\"span\", {\n children: [\n this.context.loc('PBI_LearnMore'),\n \".\"\n ]\n })\n })\n })\n ]\n });\n }\n capabilitiesRendering() {\n const capabilitiesPane = [];\n if (this.isPowerBiVisual() && this.props.isPowerBICertified) {\n return null;\n }\n if (this.isPowerBiVisual()) {\n return /*#__PURE__*/ _jsx(\"ul\", {\n className: \"capabilitiesList\",\n children: /*#__PURE__*/ _jsx(\"li\", {\n className: \"capabilitiesListItem\",\n children: this.context.loc('CP_10')\n }, 0)\n });\n }\n for(let i = 0; i < this.props.capabilities.length; i++){\n const capability = this.props.capabilities[`${i}`];\n const subCapabilities = Capabilities[`${capability}`];\n const subCapabilitiesCount = subCapabilities && subCapabilities.length ? subCapabilities.length : 0;\n for(let j = 0; j < subCapabilitiesCount; j++){\n capabilitiesPane.push(/*#__PURE__*/ _jsx(\"li\", {\n className: \"capabilitiesListItem\",\n children: this.context.loc(subCapabilities[`${j}`])\n }, j));\n }\n }\n return capabilitiesPane.length ? /*#__PURE__*/ _jsx(\"ul\", {\n className: \"capabilitiesList\",\n children: capabilitiesPane\n }) : null;\n }\n autorunRendering() {\n const { autoRunLaunchEvents } = this.props;\n const autorunsPane = autoRunLaunchEvents.filter((autorun)=>AutoRuns[`${autorun}`]).map((autorun)=>{\n const autorunInfo = AutoRuns[`${autorun}`];\n return /*#__PURE__*/ _jsx(\"li\", {\n children: /*#__PURE__*/ _jsx(Text, {\n className: contentStyles.ilTextAutorunStyle,\n children: this.context.loc(autorunInfo.loc, autorunInfo.fallback)\n })\n }, autorun);\n });\n return (autorunsPane === null || autorunsPane === void 0 ? void 0 : autorunsPane.length) ? /*#__PURE__*/ _jsxs(\"div\", {\n className: contentStyles.autorunTitleStyle,\n children: [\n /*#__PURE__*/ _jsx(Text, {\n variant: \"smallPlus\",\n children: this.context.loc('Autorun_Title', 'This add-in can launch itself when:')\n }),\n /*#__PURE__*/ _jsx(\"ul\", {\n className: contentStyles.ulAutorunStyle,\n children: autorunsPane\n })\n ]\n }) : null;\n }\n showMediaDialog(index, list) {\n DetailUtils.generateLinkPayloadAndLogTelemetry(this.props.ownerType, this.props.ownerId, 'OpenMediaModal', '', 'Overview');\n const jsllMediaType = list[`${index}`] ? list[`${index}`].type === MediaType.Image ? Constants.JsllSaas.ViewImage : Constants.JsllSaas.WatchVideo : '';\n pageAction(document.getElementById(this.props.ownerId), {\n contentTags: {\n contentId: jsllMediaType,\n contentName: this.props.ownerId,\n contentType: this.props.isSaaSTransactableApp\n }\n });\n this.props.openMediaModal({\n defaultIndex: index,\n media: list\n });\n }\n onMediaItemSelect(selected, index, list) {\n DetailUtils.generateLinkPayloadAndLogTelemetry(this.props.ownerType, this.props.ownerId, `Select${selected.type}`, // eslint-disable-next-line security/detect-non-literal-fs-filename\n selected.link, 'Overview');\n this.showMediaDialog(index, list);\n }\n renderDescription() {\n return /*#__PURE__*/ _jsx(SafeHtmlWrapper, {\n className: \"description\",\n html: this.props.description\n });\n }\n renderShortDescription() {\n return /*#__PURE__*/ _jsx(Text, {\n as: 'h2',\n className: this.props.description ? 'shortDescription' : 'description',\n children: /*#__PURE__*/ _jsx(\"div\", {\n dangerouslySetInnerHTML: {\n __html: this.props.shortDescription\n }\n })\n });\n }\n renderImpl() {\n var _this_props_autoRunLaunchEvents, _this_props_autoRunLaunchEvents1;\n const { TileType, crossListings } = this.props;\n const localizationTexts = [];\n let ribbonUrl = 'openTab';\n let ribbonSeeAllText = this.context.loc('Link_SeeAll', 'See all');\n let ribbonTitleParam = '';\n let ribbonKey = '';\n if (TileType === AppTile || TileType === ServiceTile) {\n var _crossListings_;\n const localizedTitleKey = this.getLocalizationKey(TileType);\n localizationTexts.push(localizedTitleKey);\n localizationTexts.push('');\n localizationTexts.push('');\n ribbonSeeAllText = '';\n ribbonUrl = null;\n ribbonTitleParam = (crossListings === null || crossListings === void 0 ? void 0 : (_crossListings_ = crossListings[0]) === null || _crossListings_ === void 0 ? void 0 : _crossListings_.publisher) || '';\n ribbonKey = `${localizedTitleKey} ${ribbonTitleParam}`;\n }\n const appDetailContentMaxWidthClasses = classnames({\n appDetailContent: true\n });\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"overview overviewContent\",\n children: [\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"detailsContentWrapper\",\n children: [\n /*#__PURE__*/ _jsxs(\"div\", {\n className: appDetailContentMaxWidthClasses,\n children: [\n /*#__PURE__*/ _jsxs(\"div\", {\n children: [\n this.renderShortDescription(),\n this.renderDescription()\n ]\n }),\n this.props.capabilities || ((_this_props_autoRunLaunchEvents = this.props.autoRunLaunchEvents) === null || _this_props_autoRunLaunchEvents === void 0 ? void 0 : _this_props_autoRunLaunchEvents.length) ? /*#__PURE__*/ _jsxs(\"div\", {\n className: \"capabilities\",\n children: [\n /*#__PURE__*/ _jsx(\"h3\", {\n className: \"c-heading-6 capabilitiesTitle\",\n children: this.context.loc(this.isPowerBiVisual() ? 'CP_Title_PowerBI' : 'CP_Title')\n }),\n this.props.capabilities && /*#__PURE__*/ _jsxs(_Fragment, {\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"disclaimer\",\n children: this.createDisclaimer()\n }),\n this.capabilitiesRendering()\n ]\n }),\n !!((_this_props_autoRunLaunchEvents1 = this.props.autoRunLaunchEvents) === null || _this_props_autoRunLaunchEvents1 === void 0 ? void 0 : _this_props_autoRunLaunchEvents1.length) && /*#__PURE__*/ _jsx(_Fragment, {\n children: this.autorunRendering()\n })\n ]\n }) : null\n ]\n }),\n this.mediaRendering()\n ]\n }),\n (crossListings === null || crossListings === void 0 ? void 0 : crossListings.length) ? /*#__PURE__*/ _jsx(Ribbon, {\n title: this.context.locParams(localizationTexts[0], [\n ribbonTitleParam\n ], localizationTexts[1]),\n seeMoreUrl: ribbonUrl,\n seeMoreText: ribbonSeeAllText,\n subHeader: this.context.locParams(localizationTexts[2], [\n this.props.ownerTitle\n ], localizationTexts[3]),\n children: crossListings.slice(0, Constants.crossListingRibbonItemCount).map((value, index, tiles)=>{\n return /*#__PURE__*/ _createElement(this.props.TileType, _object_spread_props(_object_spread({}, value), {\n item: value,\n key: index,\n customCSSClass: 'tile' + index,\n totalTiles: tiles.length,\n countryContext: this.props.countryCode,\n ribbonKey: ribbonKey\n }));\n })\n }) : null\n ]\n });\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"context\", void 0), _define_property(this, \"getLocalizationKey\", (tileType)=>{\n const { isOneTimePayment } = this.props;\n if (tileType === AppTile) {\n return isOneTimePayment ? 'AppDetails_RibbonHeader_TeamOneTimePayment' : 'AppDetails_RibbonHeader';\n }\n if (tileType === ServiceTile) {\n return 'ServiceDetails_RibbonHeader';\n }\n return ''; // Shouldn't reach this case.\n });\n this.state = {\n failures: {}\n };\n }\n}\nOverview.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n renderErrorModal: PropTypes.func\n};\n","import { connect } from 'react-redux';\nimport { Overview as OverviewComponent } from '../components/overview';\nimport { createMediaModalAction } from '@shared/actions/actions';\nexport const mapStateToProps = (state, ownProps)=>{\n return ownProps;\n};\nexport const mapDispatchToProps = (dispatch)=>{\n return {\n openMediaModal: (payload)=>{\n dispatch(createMediaModalAction({\n showModal: true,\n payload\n }));\n }\n };\n};\nconst Overview = connect(mapStateToProps, mapDispatchToProps)(OverviewComponent);\nexport default Overview;\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { ServiceDetails as ServiceDetailsComponent } from '../components/serviceDetails';\nimport { ensureServiceDetailsData } from '@shared/actions/thunkActions';\nimport { extractCountryCodeFromQueryParam } from '@shared/utils/consultingServicesUtils';\nimport { connect } from 'react-redux';\nimport { withRouter } from '@shared/routerHistory';\nimport { Constants } from '@shared/utils/constants';\nimport { isProfessionalService, getTelemetryDetailContentCurrentView } from '@shared/utils/appUtils';\nimport { withHydration } from '@shared/hooks/useHydration';\nexport const mapStateToProps = (state, ownProps)=>{\n const services = state.services.dataList;\n const hashMap = state.services.idMap;\n const query = ownProps.location ? ownProps.location.query : null;\n const serviceIndex = hashMap[ownProps.routeParams.entityId.toString().toLowerCase()];\n let targetService = null;\n if (serviceIndex >= 0) {\n targetService = services[`${serviceIndex}`];\n }\n const breadcrumbUrl = state.config.breadcrumbUrl ? state.config.breadcrumbUrl : '/' + state.config.locale + '/marketplace/consulting-services';\n const defaultTab = query && query.tab ? query.tab : null;\n // If the query has the country code that wins, else select first available country from the service.\n let countryCode = extractCountryCodeFromQueryParam(query);\n if (!countryCode && targetService && targetService.countryRegion && targetService.countryRegion[0]) {\n countryCode = targetService.countryRegion[0];\n }\n const offerIsProfessionalService = (targetService === null || targetService === void 0 ? void 0 : targetService.entityType) === Constants.EntityType.Service && isProfessionalService({\n service: targetService\n });\n return _object_spread_props(_object_spread({}, ownProps), {\n isLoadingUserData: state.users.loading,\n service: targetService,\n serviceId: ownProps.routeParams.entityId.toString().toLowerCase(),\n breadcrumbUrl,\n defaultTab,\n selectedLocale: state.config.locale,\n isNationalCloud: !!state.config.nationalCloud,\n currentView: getTelemetryDetailContentCurrentView(state.config.currentView, state.config.currentGalleryViewIsCurated),\n countryCode,\n query: query,\n isAppSource: state.config.isAppSource,\n suggestedItems: state.services.relatedAppsItems.items.suggestedItems || [],\n isProfessionalService: offerIsProfessionalService\n });\n};\nfunction ensureAsyncData(dispatch, entityId) {\n return dispatch(ensureServiceDetailsData(entityId));\n}\nexport const mapDispatchToProps = (dispatch)=>{\n return {\n ensureAsyncData: (entityId)=>ensureAsyncData(dispatch, entityId)\n };\n};\nconst ServiceDetails = withRouter(connect(mapStateToProps, mapDispatchToProps)(withHydration(ServiceDetailsComponent)));\nexport const ensureAsyncDataSSR = /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState, params) {\n yield ensureAsyncData(dispatch, params.entityId);\n });\n return function ensureAsyncDataSSR(dispatch, getState, params) {\n return _ref.apply(this, arguments);\n };\n}();\nexport default ServiceDetails;\n","/* eslint-disable react/forbid-dom-props */ /* eslint-disable no-prototype-builtins */ function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { Callout, DirectionalHint, PrimaryButton, mergeStyleSets } from '@fluentui/react';\nimport SpzaComponent from '@shared/components/spzaComponent';\nimport { getCountryRegionByCountry, getReplacedCountryQueryParam, createCountryFilterQueryParam, getStartingPriceHeader, getStartingPriceCurrency } from '@shared/utils/consultingServicesUtils';\nimport { isFilterItemMatch, getFilterItemRoute, getDetailsPageTitle } from '@appsource/utils/consultingServicesUtils';\nimport { InternalLink } from '@shared/components/internalLink';\nimport { Constants } from '@shared/utils/constants';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { DataMap } from '@shared/utils/dataMapping';\nimport { urlPush, urlReplace, routes } from 'routerHistory';\nimport { getWindow } from '@shared/services/window';\nimport { ServiceTile } from '@shared/containers/serviceTile';\nimport Overview from '@appsource/containers/overview';\nimport * as DetailUtils from '@shared/utils/detailUtils';\nimport { serviceOffersSupportedCountries, findServiceSupportedCountry } from '@shared/utils/filterHelpers';\nimport { serviceOffersSupportedCAStates, serviceOffersSupportedUSStates } from '@shared/utils/serviceOffersSupportedStatesCodes';\nimport { getServiceTelemetryDetailContentText } from '@shared/utils/appUtils';\nimport { getUserFavouriteEntityServiceType } from '@shared/utils/userFavouriteDedicatedUtils';\nimport UserFavouriteTileDetailButton from '@shared/containers/userFavouriteTileDetailButton';\nimport { Card } from '@shared/components/card';\nimport { ButtonLink } from '@shared/components/ButtonLink';\nimport { Tab, Tabs } from '@shared/components/tabs';\nimport { UsefulInfo, UsefulInfoMetadataCellItemType } from './UsefulInfo';\nimport { getWorkBreakEnabledString } from 'utils/stringUtils';\nimport { StickyCard } from 'components/stickyCard';\nimport { IconLink } from 'components/iconLink';\nimport { getTooltipSilentLogIn } from '@shared/utils/silentLogInUtils';\nimport { logger } from '@src/logger';\nimport pdpSolutionBadge from '@shared/images/pdp_solutionBadge.svg';\nimport pdpMspBadge from '@shared/images/pdp_mspBadge.svg';\nimport classNames from 'classnames';\nconst MAX_REGIONS_IN_VIEW_COUNT = 5;\nconst MAX_COUNTRIES_IN_VIEW_COUNT = 5;\nconst ctaButtonsClassNames = mergeStyleSets({\n ctaButton: {\n padding: '5px 25px',\n marginTop: 4,\n marginRight: 8\n }\n});\nexport class ServiceDetails extends SpzaComponent {\n static getRegionColumns(countryCode, regions) {\n const regionLists = [];\n if (!countryCode || !regions) {\n return regionLists;\n }\n const columnSize = 15;\n const maxColumns = 4;\n for(let i = 0; i < maxColumns; i++){\n regionLists.push(regions.slice(columnSize * i, columnSize * i + columnSize).map(function(listValue) {\n let region = {};\n if (countryCode.toLowerCase() === Constants.usCountryCode) {\n region = serviceOffersSupportedUSStates.filter((item)=>{\n return item.code === listValue;\n });\n } else {\n region = serviceOffersSupportedCAStates.filter((item)=>{\n return item.code === listValue;\n });\n }\n return region && region.length > 0 ? region[0].name : undefined;\n }));\n }\n return regionLists;\n }\n static getMoreCountriesColumns(moreCountries) {\n const countriesLists = [];\n if (!moreCountries) {\n return countriesLists;\n }\n const columnSize = 25;\n const maxColumns = 6;\n for(let i = 0; i < maxColumns; i++){\n countriesLists.push(moreCountries.slice(columnSize * i, columnSize * i + columnSize).map((moreCountryVal)=>{\n const foundCountry = serviceOffersSupportedCountries.filter((supportedCountry)=>{\n return supportedCountry.countryCode === moreCountryVal.countryCode;\n });\n return foundCountry && foundCountry.length > 0 ? moreCountryVal : undefined;\n }));\n }\n return countriesLists;\n }\n handleScroll() {\n const curWindow = getWindow();\n const isPageScrolled = StickyCard.handleScroll(curWindow, ServiceDetails.pdpTabsId);\n if (this.state.isPageScrolled !== isPageScrolled) {\n this.setState({\n isPageScrolled\n });\n }\n }\n buildGalleryLink() {\n return /*#__PURE__*/ _jsx(InternalLink, {\n href: this.props.breadcrumbUrl,\n role: \"button\",\n className: \"c-button goBackButton\",\n onClick: ()=>{\n DetailUtils.generateBreadcrumbPayloadAndLogTelemetry('Services');\n urlPush(this.props.breadcrumbUrl, true);\n },\n accEnabled: true,\n children: this.context.loc('Services_BackButton', 'Consulting services')\n });\n }\n buildStateListItems(region) {\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"column\",\n children: region.map(function(listValue) {\n return /*#__PURE__*/ _jsx(\"li\", {\n children: listValue\n }, listValue);\n })\n });\n }\n getServiceDetailsHref(countryCode) {\n const query = this.props.query;\n let countryParams = getReplacedCountryQueryParam(query, countryCode);\n if (!countryParams) {\n countryParams = createCountryFilterQueryParam(countryCode, this.props.isAppSource);\n }\n return this.context.buildHref(routes.serviceDetail, {\n entityId: this.props.service.entityId\n }, countryParams, true);\n }\n buildMoreCountriesListItems(moreCountries, colIndex) {\n const closeMoreCountriesModal = this.closeMoreCountriesModal;\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"column\",\n children: moreCountries.map((moreCountry)=>{\n const serviceDetailHref = this.getServiceDetailsHref(moreCountry.countryCode);\n return /*#__PURE__*/ _jsx(InternalLink, {\n href: serviceDetailHref,\n scrollToTop: true,\n className: \"c-hyperlink\",\n additionalCommand: closeMoreCountriesModal,\n children: moreCountry.countryDisplayName\n }, moreCountry.countryCode);\n })\n }, colIndex);\n }\n closeRegionModal(event) {\n event.stopPropagation();\n this.setState({\n showRegionModal: false\n });\n }\n buildRegionModal(regions) {\n const countryAndRegion = getCountryRegionByCountry(this.props.service.detailInformation, this.props.countryCode);\n const countryName = this.getCountryDisplayName(countryAndRegion.countryRegion);\n const regionColumns = ServiceDetails.getRegionColumns(countryAndRegion.countryRegion, regions);\n const regionLists = regionColumns.map((columnRegions)=>{\n return this.buildStateListItems(columnRegions);\n });\n return this.state.showRegionModal && /*#__PURE__*/ _jsxs(Callout, {\n onMouseLeave: this.closeRegionModal,\n target: \".regionLink\",\n directionalHint: DirectionalHint.rightCenter,\n className: \"regionCallout\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"regionsHeader\",\n children: this.context.locParams('ServicesRegions_Header', [\n countryName\n ])\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"regionColumns\",\n children: regionLists\n })\n ]\n });\n }\n buildRegionList() {\n const countryAndRegion = getCountryRegionByCountry(this.props.service.detailInformation, this.props.countryCode);\n const regions = countryAndRegion.regions;\n let regionsAddedToView = 0;\n const regionList = [];\n if (regions && regions.length > 0) {\n for(let i = 0; i < regions.length; i++){\n let region = {};\n if (countryAndRegion.countryRegion.toLowerCase() === Constants.usCountryCode) {\n region = serviceOffersSupportedUSStates.filter((item)=>{\n return item.code === regions[`${i}`];\n });\n } else if (countryAndRegion.countryRegion.toLowerCase() === Constants.caCountryCode) {\n region = serviceOffersSupportedCAStates.filter((item)=>{\n return item.code === regions[`${i}`];\n });\n }\n if (region && region.length > 0) {\n regionsAddedToView++;\n if (regionsAddedToView <= MAX_REGIONS_IN_VIEW_COUNT) {\n regionList.push(region[0].name);\n }\n }\n }\n }\n return regionList;\n }\n getShowRegionModal(regions) {\n return /*#__PURE__*/ _jsxs(\"div\", {\n children: [\n this.state.showRegionModal ? /*#__PURE__*/ _jsx(\"div\", {\n className: \"overlay\"\n }) : null,\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"regionLink\",\n onClick: ()=>{\n this.setState({\n showRegionModal: true\n });\n },\n onKeyDown: (event)=>{\n if (event.keyCode === Constants.SystemKey.Enter) {\n this.setState({\n showRegionModal: true\n });\n }\n },\n tabIndex: 0,\n children: [\n this.context.locParams('CountryLink_More', [\n regions.length.toString()\n ]),\n /*#__PURE__*/ _jsx(\"div\", {\n children: this.buildRegionModal(regions)\n })\n ]\n })\n ]\n });\n }\n getMoreCountriesCodeAndDisplay(countries) {\n const moreCountries = [];\n const countryCodeLowerCase = this.props.countryCode ? this.props.countryCode.toLowerCase() : null;\n for (const country of countries){\n if (country.countryRegion.toLowerCase() !== countryCodeLowerCase) {\n const foundCountry = findServiceSupportedCountry(country.countryRegion);\n if (foundCountry) {\n moreCountries.push({\n countryCode: country.countryRegion,\n countryDisplayName: foundCountry.name\n });\n } else {\n const errorMessage = `Country code not found in service supported countries, code = ${country.countryRegion}.`;\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Error,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: JSON.stringify(errorMessage)\n };\n const instrument = SpzaInstrumentService.getProvider();\n instrument.probe(Constants.Telemetry.ProbeName.LogInfo, payload);\n logger.error(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n }\n }\n }\n return moreCountries;\n }\n closeMoreCountriesModal(event) {\n if (event) {\n event.stopPropagation();\n }\n this.setState({\n showMoreCountriesModal: false\n });\n }\n buildMoreCountriesModal(moreCountries) {\n const moreCountriesColumns = ServiceDetails.getMoreCountriesColumns(moreCountries);\n const moreCountriesLists = moreCountriesColumns.map((columnMoreCountries, colIndex)=>{\n return this.buildMoreCountriesListItems(columnMoreCountries, colIndex);\n });\n return this.state.showMoreCountriesModal && /*#__PURE__*/ _jsxs(Callout, {\n onMouseLeave: this.closeMoreCountriesModal,\n target: \".moreCountriesLink\",\n directionalHint: DirectionalHint.rightCenter,\n className: \"regionCallout\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"regionsHeader\",\n children: this.context.loc('ServiceDetails_MoreCountries')\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"regionColumns\",\n children: moreCountriesLists\n })\n ]\n });\n }\n buildMoreCountriesList(countries) {\n const countryLists = {\n topCountries: [],\n countriesMoreModalList: []\n };\n const moreCountries = this.getMoreCountriesCodeAndDisplay(countries);\n // If any they will be shown in popup\n for(let i = 0; i < moreCountries.length; i++){\n if (i < MAX_COUNTRIES_IN_VIEW_COUNT) {\n // Set url with the right country for each link to details page.\n const serviceDetailHref = this.getServiceDetailsHref(moreCountries[`${i}`].countryCode);\n countryLists.topCountries.push({\n information: serviceDetailHref,\n id: moreCountries[`${i}`].countryCode,\n text: moreCountries[`${i}`].countryDisplayName,\n type: UsefulInfoMetadataCellItemType.InternalLink,\n props: {\n scrollToTop: true,\n additionalCommand: this.closeMoreCountriesModal,\n target: '_self'\n }\n });\n } else {\n countryLists.countriesMoreModalList.push(moreCountries[`${i}`]);\n }\n }\n return countryLists;\n }\n getMoreCountriesModal(extraMoreCountries) {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"moreCountriesLink\",\n onClick: ()=>{\n this.setState({\n showMoreCountriesModal: true\n });\n },\n onKeyDown: (event)=>{\n if (event.keyCode === Constants.SystemKey.Enter) {\n this.setState({\n showMoreCountriesModal: true\n });\n }\n },\n tabIndex: 0,\n children: [\n this.context.locParams('CountryLink_More', [\n extraMoreCountries.length.toString()\n ]),\n /*#__PURE__*/ _jsx(\"div\", {\n children: this.buildMoreCountriesModal(extraMoreCountries)\n }, \"show_more_model\")\n ]\n }, \"show_more\");\n }\n buildCompetencyList(items) {\n const itemRender = [];\n if (items && items.length > 0) {\n for(let i = 0; i < items.length; i++){\n itemRender.push(/*#__PURE__*/ _jsx(\"div\", {\n className: \"displayItem\",\n children: items[`${i}`].competencyName\n }, i));\n }\n }\n return itemRender;\n }\n buildFilterElements(filteritems) {\n if (filteritems) {\n let filterElements = filteritems.map((filter)=>{\n return /*#__PURE__*/ _jsx(IconLink, {\n iconClassName: 'icon-' + filter.urlKey + '-16',\n href: filter.newPath,\n title: this.context.loc(filter.locKey, filter.title),\n onClick: (e)=>{\n DetailUtils.generateLinkPayloadAndLogTelemetry(DetailUtils.OwnerType.Service, this.props.service.entityId, filter.filterItem, filter.newPath, 'Default');\n urlPush(filter.newPath, true);\n e.preventDefault();\n },\n accEnabled: true,\n className: \"c-hyperlink detailsCategories\",\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: \"productItem\",\n children: this.context.loc(filter.locKey, filter.title)\n })\n }, filter.title);\n });\n filterElements = filterElements.filter((element)=>!!element);\n return filterElements;\n }\n return null;\n }\n getFilterListElements(filterItem, filterTileType) {\n const filteritems = [];\n if (this.props.service) {\n Object.keys(DataMap[`${filterItem}`]).forEach((filterValue)=>{\n // Ugly but necessary. We need to show office365 product (office in data map file) even if it have ShortcutFilters.\n const filterValueAllowed = !DataMap[`${filterItem}`][`${filterValue}`].ShortcutFilters || filterTileType === Constants.filterTileTypes.product && filterValue === 'office';\n if (filterValueAllowed && (DataMap[`${filterItem}`][`${filterValue}`].match ? DataMap[`${filterItem}`][`${filterValue}`].match(this.props.service) : isFilterItemMatch({\n service: this.props.service,\n filterItem,\n filterValue\n }))) {\n const filter = DataMap[`${filterItem}`][`${filterValue}`];\n if (!filter) {\n return null;\n }\n // !!! Temporary HACK: If longTitle is 'Power BI apps' and we are in consulting services tab,\n // then we make the text 'Power BI'.\n const longTitle = filter.LongTitle || filter.title;\n if (longTitle === 'Power BI apps') {\n filter.LocKey = 'Power_BI';\n filter.LongTitle = 'Power BI';\n }\n const routeParams = getFilterItemRoute({\n filterItem,\n filterValue,\n filterTileType\n });\n const newPath = this.context.buildHref(routes.marketplaceServices, routeParams.routeArgs, routeParams.params);\n filteritems.push({\n filterItem,\n locKey: filter.LocKey,\n newPath,\n title: filter.LongTitle,\n urlKey: filter.UrlKey\n });\n }\n });\n }\n return filteritems;\n }\n showDialog() {\n this.context.ctaCallback({\n entity: this.props.service,\n entityType: Constants.EntityType.Service,\n ctaType: Constants.CTAType.Service,\n actionModifier: Constants.Telemetry.ActionModifier.ServiceDetailCTAButton,\n ribbonKey: this.props.ribbonKey\n });\n }\n getRegionList() {\n const countryLists = {\n topCountries: [],\n countriesMoreModalList: []\n };\n const countryAndRegion = getCountryRegionByCountry(this.props.service.detailInformation, this.props.countryCode);\n const regions = countryAndRegion.regions;\n let regionsAddedToView = 0;\n if (regions && regions.length > 0) {\n for(let i = 0; i < regions.length; i++){\n let region = {};\n if (countryAndRegion.countryRegion.toLowerCase() === Constants.usCountryCode) {\n region = serviceOffersSupportedUSStates.filter((item)=>{\n return item.code === regions[`${i}`];\n });\n } else if (countryAndRegion.countryRegion.toLowerCase() === Constants.caCountryCode) {\n region = serviceOffersSupportedCAStates.filter((item)=>{\n return item.code === regions[`${i}`];\n });\n }\n if (region && region.length > 0) {\n regionsAddedToView++;\n if (regionsAddedToView <= MAX_REGIONS_IN_VIEW_COUNT) {\n countryLists.topCountries.push({\n id: region[0].name,\n type: UsefulInfoMetadataCellItemType.Label,\n text: region[0].name\n });\n } else {\n countryLists.countriesMoreModalList.push(region[0].code);\n }\n }\n }\n }\n return countryLists;\n }\n ensureAsyncData(nextProps) {\n if (nextProps.serviceId) {\n this.props.ensureAsyncData(nextProps.serviceId);\n }\n }\n UNSAFE_componentWillReceiveProps(nextProps) {\n this.ensureAsyncData(nextProps);\n }\n componentDidMount() {\n this.ensureAsyncData(this.props);\n if (this.props.service) {\n this.telemetryPageLoad();\n this.updateWindowTitle();\n this.addScrollListener();\n }\n }\n componentDidUpdate() {\n this.handleScroll();\n }\n componentWillUnmount() {\n this.removeScrollListener();\n }\n telemetryPageLoad() {\n const { service: serviceInfo, currentView, isNationalCloud } = this.props;\n const { title, entityId: serviceId } = serviceInfo || {};\n const payload = {\n page: getWindow().location.href,\n appName: title,\n action: Constants.Telemetry.Action.PageLoad,\n actionModifier: Constants.Telemetry.ActionModifier.End,\n serviceId,\n details: getServiceTelemetryDetailContentText({\n serviceInfo,\n isNationalCloud,\n ctaTypes: [\n Constants.CTAType.Service\n ],\n currentView\n })\n };\n this.instrument.probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n appName: payload.appName\n });\n }\n updateWindowTitle() {\n var _document_getElementsByTagName;\n if ((_document_getElementsByTagName = document.getElementsByTagName('title')) === null || _document_getElementsByTagName === void 0 ? void 0 : _document_getElementsByTagName.length) {\n document.getElementsByTagName('title')[0].innerHTML = this.context.locParams(getDetailsPageTitle(), [\n this.props.service.title\n ]);\n }\n }\n addScrollListener() {\n if (this.curWindow) {\n this.curWindow.addEventListener('scroll', this.handleScroll.bind(this));\n }\n }\n removeScrollListener() {\n if (this.curWindow) {\n this.curWindow.addEventListener('scroll', this.handleScroll.bind(this));\n }\n }\n getBreadcrumbElement() {\n return(// eslint-disable-next-line react/forbid-dom-props\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"navigationBar\",\n id: \"maincontent\",\n children: /*#__PURE__*/ _jsxs(\"nav\", {\n className: \"breadcrumb\",\n children: [\n this.buildGalleryLink(),\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"c-glyph\",\n tabIndex: 0,\n \"aria-label\": \"greater than\",\n role: \"contentinfo\"\n }),\n /*#__PURE__*/ _jsx(\"header\", {\n className: \"appTabButton\",\n children: this.props.service.title\n })\n ]\n })\n }));\n }\n renderButtonLink({ label, value, pricingLinkClassName }) {\n return /*#__PURE__*/ _jsx(ButtonLink, {\n href: '',\n className: pricingLinkClassName,\n type: Constants.ButtonType.Label,\n accEnabled: true,\n label: label,\n value: value\n });\n }\n bulidStartingPriceElement({ pricingLinkClassName }) {\n var _service_extraData, _this_props_service_extraData, _this_props_service;\n const { service, countryCode, selectedLocale, isProfessionalService } = this.props;\n const pricingValue = getStartingPriceHeader(service === null || service === void 0 ? void 0 : (_service_extraData = service.extraData) === null || _service_extraData === void 0 ? void 0 : _service_extraData.multiCountryPricing, countryCode, selectedLocale, this.context);\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"serviceDetailsPricingSection\",\n itemProp: \"offers\",\n itemScope: true,\n itemType: \"https://schema.org/Offer\",\n children: [\n isProfessionalService ? this.renderButtonLink({\n label: this.context.loc('ProfessionalService_Price', 'Contact for price'),\n value: '',\n pricingLinkClassName\n }) : this.renderButtonLink({\n label: this.context.loc('Pricing', 'Pricing'),\n value: pricingValue,\n pricingLinkClassName\n }),\n pricingValue === this.context.loc('Pricing_Free') ? /*#__PURE__*/ _jsxs(\"div\", {\n className: \"metaTagForPrice\",\n children: [\n /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"price\",\n content: \"0\"\n }),\n /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"priceCurrency\",\n content: \"USD\"\n }),\n /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"category\",\n content: \"free\"\n })\n ]\n }) : /*#__PURE__*/ _jsxs(\"div\", {\n className: \"metaTagForPrice\",\n children: [\n /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"price\",\n content: pricingValue.replace(/[^0-9.]/g, '')\n }),\n /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"priceCurrency\",\n content: getStartingPriceCurrency((_this_props_service = this.props.service) === null || _this_props_service === void 0 ? void 0 : (_this_props_service_extraData = _this_props_service.extraData) === null || _this_props_service_extraData === void 0 ? void 0 : _this_props_service_extraData.multiCountryPricing, this.props.countryCode)\n })\n ]\n })\n ]\n });\n }\n getCTAElement() {\n const { isLoadingUserData, service } = this.props;\n const button = /*#__PURE__*/ _jsx(PrimaryButton, {\n text: this.context.loc('PartnerDetail_ContactPartner', 'CONTACT PARTNER'),\n disabled: isLoadingUserData,\n \"data-bi-id\": Constants.JsllCTAId.ContactPartner,\n \"data-bi-name\": service.entityId,\n \"data-bi-area\": \"Service Details\",\n className: classNames([\n ctaButtonsClassNames.ctaButton,\n 'requestButton'\n ]),\n onClick: this.showDialog.bind(this)\n });\n return getTooltipSilentLogIn(button, isLoadingUserData);\n }\n getUserFavouriteButton() {\n const service = this.props.service;\n if (!service) {\n return null;\n }\n return /*#__PURE__*/ _jsx(UserFavouriteTileDetailButton, {\n entityId: service.entityId,\n entityType: getUserFavouriteEntityServiceType(),\n planId: undefined,\n item: service,\n customCSS: ' AMPappDetails appSource-spza-user-favourite-tile-detail-button'\n });\n }\n getBadges() {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"badgesBlock\",\n children: [\n Constants.ServicesIdWithBadge.hasOwnProperty(this.props.service.entityId) ? /*#__PURE__*/ _jsx(\"a\", {\n href: \"https://aka.ms/integratedsolutionslearnmore\",\n rel: \"noreferrer\",\n target: \"_blank\",\n children: /*#__PURE__*/ _jsx(\"img\", {\n id: \"pdp_solution_badge\",\n className: \"banner\",\n src: pdpSolutionBadge\n })\n }) : null,\n this.props.service.tags && this.props.service.tags.indexOf(Constants.BadgeType.AzureExpertsMSP) >= 0 ? /*#__PURE__*/ _jsx(\"a\", {\n href: \"https://aka.ms/AzureExpertMSP\",\n rel: \"noreferrer\",\n target: \"_blank\",\n children: /*#__PURE__*/ _jsx(\"img\", {\n id: \"pdp_msp_badge\",\n className: \"banner\",\n src: pdpMspBadge\n })\n }) : null\n ]\n });\n }\n getChildContext() {\n return {\n openTileCallback: (detailUrl)=>{\n const detailsPaylod = {\n linkType: 'App',\n link: detailUrl\n };\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.Tile,\n details: JSON.stringify(detailsPaylod)\n };\n this.instrument.probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n this.context.openTileCallback(detailUrl);\n }\n };\n }\n getDetailCellElement(information, headerContent, itemPropName) {\n const microTaggingItemPropName = itemPropName || '';\n if (information) {\n if (microTaggingItemPropName === 'publisher') {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"cell\",\n itemProp: microTaggingItemPropName,\n itemScope: true,\n itemType: \"https://schema.org/Organization\",\n children: [\n /*#__PURE__*/ _jsx(\"h2\", {\n children: headerContent\n }),\n /*#__PURE__*/ _jsx(\"span\", {\n itemProp: \"name\",\n children: information\n })\n ]\n });\n } else {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"cell\",\n itemProp: microTaggingItemPropName,\n children: [\n /*#__PURE__*/ _jsx(\"header\", {\n children: headerContent\n }),\n /*#__PURE__*/ _jsx(\"span\", {\n children: information\n })\n ]\n });\n }\n } else {\n return null;\n }\n }\n getCountryDisplayName(countryCode) {\n const country = findServiceSupportedCountry(countryCode);\n if (country) {\n return country.name;\n }\n return '';\n }\n getCompetencyList(competencyType) {\n return this.props.service.detailInformation.competencies.filter((item)=>item.competencyLevel && item.competencyLevel.toString().toLowerCase() === competencyType);\n }\n getTabsProps() {\n const tabsProps = {\n defaultTab: this.props.defaultTab,\n ownerType: DetailUtils.OwnerType.Service,\n ownerId: this.props.service.entityId,\n changeTabCallback: this.changeTabCallback.bind(this),\n getTabHref: this.getTabHref.bind(this)\n };\n return tabsProps;\n }\n changeTabCallback(tabTitle) {\n const newPath = this.getTabHref(tabTitle);\n urlReplace(newPath);\n }\n getTabHref(tabTitle) {\n return this.context.buildHref(routes.serviceDetail, {\n entityId: this.props.service.entityId\n }, {\n tab: tabTitle\n }, true, false, true);\n }\n getTabChildren() {\n const tabsChilds = [\n {\n title: this.context.loc('PartnerDetail_OverviewTab', 'Overview'),\n name: 'Overview',\n getContent: ()=>this.renderOverviewTab()\n },\n {\n title: this.context.loc('ServiceDetail_DetilsAndSupportTab', 'Details + support'),\n name: Constants.Tabs.DetailsAndSupport,\n // eslint-disable-next-line react/display-name\n getContent: ()=>/*#__PURE__*/ _jsx(UsefulInfo, {\n ownerType: DetailUtils.OwnerType.Service,\n metadata: this.getUsefulInfoMetadata(this.props.service)\n })\n }\n ];\n return tabsChilds;\n }\n getUsefulInfoMetadata(service) {\n var _this_props_service_extraData, _this_props_service, _this_props_service_industriesDetails;\n const { isProfessionalService } = this.props;\n // colomn 1 - Useful Information\n const usefulInformaionCells = [];\n const supportCells = [];\n const moreLinksCells = [];\n const metadata = [];\n const contextCountryAndRegion = getCountryRegionByCountry(this.props.service.detailInformation, this.props.countryCode);\n const allCountryAndRegions = this.props.service.detailInformation ? this.props.service.detailInformation.MultiCountryRegions : null;\n // publisher\n usefulInformaionCells.push({\n id: 'publisher',\n title: 'App_Publisher',\n cellItems: [\n {\n id: 'publisherItem',\n type: UsefulInfoMetadataCellItemType.Label,\n text: service.publisher\n }\n ]\n });\n // pricing\n const { countryCode, selectedLocale } = this.props;\n const pricingValue = getStartingPriceHeader((_this_props_service = this.props.service) === null || _this_props_service === void 0 ? void 0 : (_this_props_service_extraData = _this_props_service.extraData) === null || _this_props_service_extraData === void 0 ? void 0 : _this_props_service_extraData.multiCountryPricing, countryCode, selectedLocale, this.context);\n if (pricingValue) {\n const cell = {\n id: 'AppVersionItem',\n type: UsefulInfoMetadataCellItemType.Label,\n text: isProfessionalService ? this.context.loc('ProfessionalService_Price', 'contact for price') : pricingValue\n };\n usefulInformaionCells.push({\n id: 'Pricing',\n title: 'Pricing',\n cellItems: [\n cell\n ]\n });\n }\n // goldCompetencies\n if (this.props.service.detailInformation && this.props.service.detailInformation.competencies && this.props.service.detailInformation.competencies.length > 0 && this.getCompetencyList('gold').length > 0) {\n const goldCompetencies = this.props.service.detailInformation.competencies.filter((item)=>item.competencyLevel && item.competencyLevel.toString().toLowerCase() === 'gold').map((goldCompetency)=>{\n return {\n id: goldCompetency.competencyName,\n type: UsefulInfoMetadataCellItemType.Label,\n text: goldCompetency.competencyName\n };\n });\n if (goldCompetencies.length) {\n usefulInformaionCells.push({\n id: 'GoldCompetencies',\n title: 'ServiceDetails_GoldCompetencies',\n cellItems: goldCompetencies\n });\n }\n }\n // silverCompetencies\n if (this.props.service.detailInformation && this.props.service.detailInformation.competencies && this.props.service.detailInformation.competencies.length > 0 && this.getCompetencyList('silver').length > 0) {\n const silverCompetencies = this.props.service.detailInformation.competencies.filter((item)=>item.competencyLevel && item.competencyLevel.toString().toLowerCase() === 'silver').map((silverCompetency)=>{\n return {\n id: silverCompetency.competencyName,\n type: UsefulInfoMetadataCellItemType.Label,\n text: silverCompetency.competencyName\n };\n });\n if (silverCompetencies.length) {\n usefulInformaionCells.push({\n id: 'SilverCompetencies',\n title: 'ServiceDetails_SilverCompetencies',\n cellItems: silverCompetencies\n });\n }\n }\n if (this.props.service.products && Object.keys(this.props.service.products).length > 0) {\n // products\n const products = this.getFilterListElements(Constants.filterMaps.products, Constants.filterTileTypes.product).map((product)=>{\n return {\n id: product.title,\n type: UsefulInfoMetadataCellItemType.Filter,\n text: product.locKey,\n entityId: service.entityId,\n filter: product\n };\n });\n usefulInformaionCells.push({\n id: 'FilterType_Products',\n title: 'FilterType_Products',\n cellItems: products\n });\n }\n if ((_this_props_service_industriesDetails = this.props.service.industriesDetails) === null || _this_props_service_industriesDetails === void 0 ? void 0 : _this_props_service_industriesDetails.length) {\n // industries\n const industries = this.getIndustriesFilterListElements();\n usefulInformaionCells.push({\n id: 'Industries',\n title: 'App_Industries',\n cellItems: industries\n });\n }\n if (this.props.service.serviceTypes > 0) {\n // type\n const serviceTypes = this.getFilterListElements(Constants.filterMaps.serviceTypes, Constants.filterTileTypes.serviceType).map((serviceType)=>{\n return {\n id: serviceType.title,\n type: UsefulInfoMetadataCellItemType.Filter,\n text: serviceType.locKey,\n entityId: service.entityId,\n filter: serviceType\n };\n });\n usefulInformaionCells.push({\n id: 'serviceTypes',\n title: 'FilterType_ServiceType',\n cellItems: serviceTypes\n });\n }\n // country\n if (contextCountryAndRegion && contextCountryAndRegion.countryRegion) {\n usefulInformaionCells.push({\n id: 'Country',\n title: 'ServiceDetails_Country',\n cellItems: [\n {\n id: 'countryRegionItem',\n type: UsefulInfoMetadataCellItemType.Label,\n text: this.getCountryDisplayName(contextCountryAndRegion.countryRegion)\n }\n ]\n });\n }\n // Region\n if (contextCountryAndRegion && contextCountryAndRegion.regions && contextCountryAndRegion.regions.length > 0) {\n const countryLists = this.getRegionList();\n if (countryLists.topCountries.length > 0) {\n if (countryLists.countriesMoreModalList && countryLists.countriesMoreModalList.length > 0) countryLists.topCountries.push({\n id: 'more',\n text: 'CountryLink_More',\n type: UsefulInfoMetadataCellItemType.Modal,\n getContent: ()=>this.getShowRegionModal(countryLists.countriesMoreModalList)\n });\n usefulInformaionCells.push({\n id: 'Region',\n title: 'ServiceDetails_Regions',\n cellItems: countryLists.topCountries\n });\n }\n }\n // MoreCountries\n if (allCountryAndRegions && allCountryAndRegions.length > 1) {\n const countryLists = this.buildMoreCountriesList(allCountryAndRegions);\n if (countryLists.topCountries.length > 0) {\n if (countryLists.countriesMoreModalList && countryLists.countriesMoreModalList.length > 0) {\n countryLists.topCountries.push({\n id: 'more',\n text: 'CountryLink_More',\n type: UsefulInfoMetadataCellItemType.Modal,\n getContent: ()=>this.getMoreCountriesModal(countryLists.countriesMoreModalList)\n });\n }\n usefulInformaionCells.push({\n id: 'MoreCountries',\n title: 'ServiceDetails_MoreCountries',\n cellItems: countryLists.topCountries\n });\n }\n }\n // more links\n const documents = this.props.service.detailInformation.CollateralDocuments;\n if (documents && documents.length > 0) {\n const documentsCells = documents.map((doc)=>{\n return {\n information: doc.DocumentUri,\n id: 'LearnMore',\n text: getWorkBreakEnabledString(doc.DocumentName),\n type: UsefulInfoMetadataCellItemType.Link,\n entityId: service.entityId\n };\n });\n moreLinksCells.push({\n id: 'App_LearnMoreTitle',\n title: '',\n cellItems: documentsCells\n });\n }\n // create root metadata item\n if (usefulInformaionCells.length) {\n metadata.push({\n id: 'UsefulInformationDetails',\n title: 'AppDetail_UsefulInformaionDetails',\n titleFallback: 'Details',\n cells: usefulInformaionCells\n });\n }\n if (supportCells.length) {\n metadata.push({\n id: 'Support',\n title: 'AppDetail_Support',\n cells: supportCells\n });\n }\n if (moreLinksCells.length) {\n metadata.push({\n id: 'App_Links',\n title: 'App_Links',\n titleFallback: 'Links',\n cells: moreLinksCells\n });\n }\n return metadata;\n }\n renderOverviewTab() {\n return this.props.service.detailInformation ? /*#__PURE__*/ _jsx(Overview, {\n ownerType: DetailUtils.OwnerType.App,\n ownerId: this.props.service.entityId,\n ownerTitle: this.props.service.title,\n shortDescription: this.props.service.extraData.shortDescription,\n description: this.props.service.detailInformation.Description,\n images: this.props.service.detailInformation.Images,\n videos: this.props.service.detailInformation.DemoVideos,\n capabilities: null,\n TileType: ServiceTile,\n crossListings: this.props.suggestedItems,\n // selectedLocale={this.props.selectedLocale}\n countryCode: this.props.countryCode\n }) : null;\n }\n renderStickyCard(tabsProps, tabsChilds) {\n return /*#__PURE__*/ _jsxs(StickyCard, {\n title: this.props.service.title,\n logoURL: DetailUtils.getDetailInformation(this.props.service, 'LargeIconUri'),\n tabsProps: tabsProps,\n tabsChilds: tabsChilds,\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"stickyCardPricing\",\n children: this.bulidStartingPriceElement({\n pricingLinkClassName: 'light'\n })\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"stickyCardButton\",\n children: this.getCTAElement()\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"stickyCardFavourite\",\n children: this.getUserFavouriteButton()\n })\n ]\n });\n }\n renderImpl() {\n if (this.props.service) {\n const tabsProps = this.getTabsProps();\n const tabsChilds = this.getTabChildren();\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"ASdesktopAppDetails\",\n tabIndex: 0,\n itemScope: true,\n itemType: \"https://schema.org/SoftwareApplication\",\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: \"spza_detailContainer spza_partnerDetailContainer\",\n children: [\n this.state.isPageScrolled ? this.renderStickyCard(tabsProps, tabsChilds) : null,\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"pdpDetails\",\n children: [\n this.getBreadcrumbElement(),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"detailContent\",\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: \"deatilPageContent\",\n children: [\n /*#__PURE__*/ _jsxs(Card, {\n title: this.props.service.title,\n subtitle: this.props.service.publisher,\n logoURL: DetailUtils.getDetailInformation(this.props.service, 'LargeIconUri'),\n children: [\n this.props.isHydrated && this.props.service.products && Object.keys(this.props.service.products).length > 0 ? this.buildFilterElements(this.getFilterListElements(Constants.filterMaps.products, Constants.filterTileTypes.product)) : null,\n this.props.isHydrated && this.getBadges(),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"container\",\n children: [\n this.bulidStartingPriceElement({\n pricingLinkClassName: 'dark'\n }),\n this.getCTAElement(),\n this.getUserFavouriteButton()\n ]\n })\n ]\n }),\n !this.props.service.detailInformation ? null : /*#__PURE__*/ _jsx(\"div\", {\n id: ServiceDetails.pdpTabsId,\n className: ServiceDetails.pdpTabsClass,\n children: /*#__PURE__*/ _jsx(Tabs, {\n defaultTab: tabsProps.defaultTab,\n ownerType: tabsProps.ownerType,\n ownerId: tabsProps.ownerId,\n changeTabCallback: tabsProps.changeTabCallback,\n getTabHref: tabsProps.getTabHref,\n children: tabsChilds.map((tabChild, index)=>/*#__PURE__*/ _jsx(Tab, {\n title: tabChild.title,\n name: tabChild.name,\n textBadge: tabChild.textBadge,\n children: tabChild.getContent()\n }, index))\n })\n })\n ]\n })\n })\n ]\n })\n ]\n })\n });\n } else {\n // there is no app\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"nullAppContainer\",\n children: this.context.loc('APPDETAIL_AppNotFound', 'App not Found')\n });\n }\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"context\", void 0), _define_property(this, \"instrument\", void 0), _define_property(this, \"curWindow\", getWindow()), _define_property(this, \"getIndustriesFilterListElements\", ()=>{\n var _service_industriesDetails;\n const { service } = this.props;\n return service === null || service === void 0 ? void 0 : (_service_industriesDetails = service.industriesDetails) === null || _service_industriesDetails === void 0 ? void 0 : _service_industriesDetails.map((industryDetail)=>{\n const { urlKey, longTitle, locKey } = industryDetail;\n const newPath = this.context.buildHref(routes.marketplaceServices, null, {\n industry: urlKey\n });\n const filter = {\n filterItem: Constants.filterMaps.industries,\n locKey,\n newPath,\n title: longTitle,\n urlKey\n };\n return {\n id: filter.title,\n type: UsefulInfoMetadataCellItemType.Filter,\n text: filter.locKey,\n entityId: service.entityId,\n filter\n };\n });\n });\n this.instrument = SpzaInstrumentService.getProvider();\n this.state = {\n showRegionModal: false,\n showMoreCountriesModal: false,\n isPageScrolled: false\n };\n this.closeRegionModal = this.closeRegionModal.bind(this);\n this.closeMoreCountriesModal = this.closeMoreCountriesModal.bind(this);\n this.getServiceDetailsHref = this.getServiceDetailsHref.bind(this);\n }\n}\n_define_property(ServiceDetails, \"pdpTabsId\", 'pdpTabs');\n_define_property(ServiceDetails, \"pdpTabsClass\", 'pdpTabs');\nServiceDetails.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n buildHref: PropTypes.func,\n ctaCallback: PropTypes.func,\n renderErrorModal: PropTypes.func,\n openTileCallback: PropTypes.func\n};\nServiceDetails.childContextTypes = {\n openTileCallback: PropTypes.func\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { isPricingFilter } from 'utils/filterHelpers';\nimport { routes } from '@shared/routerHistory';\nimport { Constants } from '@shared/utils/constants';\nimport { deepEqual } from '@shared/utils/objectUtils';\nimport { stringifyError } from '@shared/utils/errorUtils';\nimport { generateGuid, getActiveFeaturedFlags, getTileDataEntityType, getTileDataQueryParams, getProductByUrlKey } from '@shared/utils/appUtils';\nimport { createTileDataReceivedAction, createTileDataLoadingAction } from '@shared/actions/tileDataActions';\nimport { getTileData } from '@shared/services/http/entityRestClient';\nimport { getWindow } from '@shared/services/window';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { createAppsPricingDataReceivedAction, createShowingResultsForReceivedAction } from '@shared/actions/actions';\nimport { createSetRequestFilteredEntityTypeAction, createSetRequestFilteredLoadedAction, createSetRequestFilteredLoadingAction, createSetRequestFilteredQueryAction, createSetResponseFilteredQueryAction } from './queryActions';\nimport { logger } from '@src/logger';\nlet prevTileDataRequest;\nfunction generateTileDataLog(requestParams, tileData, duration) {\n var _tileData_apps_dataList_, _getWindow_location, _getWindow;\n const details = {\n duration,\n requestParams,\n searchResponseId: (_tileData_apps_dataList_ = tileData.apps.dataList[0]) === null || _tileData_apps_dataList_ === void 0 ? void 0 : _tileData_apps_dataList_.searchResponseId,\n appsResultsCount: tileData.apps && tileData.apps.count,\n appsTopResults: tileData.apps && tileData.apps.dataList && tileData.apps.dataList.slice(0, 20).map((app)=>app.entityId),\n servicesResultsCount: tileData.services && tileData.services.count,\n servicesTopResults: tileData.services && tileData.services.dataList && tileData.services.dataList.slice(0, 20).map((service)=>service.entityId)\n };\n const payload = {\n page: (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow_location = _getWindow.location) === null || _getWindow_location === void 0 ? void 0 : _getWindow_location.href,\n action: Constants.Telemetry.Action.TileData,\n actionModifier: Constants.Telemetry.ActionModifier.End,\n details: JSON.stringify(details)\n };\n SpzaInstrumentService.getProvider().probe(Constants.Telemetry.ProbeName.LogInfo, payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n}\nexport function loadTileData() {\n return function(dispatch, getState) {\n var _getProductByUrlKey, _prevTileDataRequest_request;\n const start = Date.now();\n const currentView = getState().config.currentView;\n const isBrowseView = currentView === routes.marketplace.name || currentView === routes.marketplaceServices.name || currentView === routes.marketplaceCloudsIndustry.name;\n // Load tile data only in Borwses Apps views, like Home and Gallery\n if (!isBrowseView) {\n return Promise.resolve(null);\n }\n const currentEntityType = getState().config.isAppSource ? getTileDataEntityType(currentView) : Constants.TileDataEntityType.All;\n const currentFilteredQuery = getTileDataQueryParams(getState().config.query);\n const prevEntityType = getState().config.requestFilteredEntityType;\n const prevFilteredQuery = getState().config.requestFilteredQuery;\n if (deepEqual(currentFilteredQuery, prevFilteredQuery) && currentEntityType === prevEntityType) {\n return Promise.resolve(null);\n }\n dispatch(createSetRequestFilteredEntityTypeAction({\n requestFilteredEntityType: currentEntityType\n }));\n dispatch(createSetRequestFilteredQueryAction({\n requestFilteredQuery: currentFilteredQuery\n }));\n dispatch(createSetRequestFilteredLoadingAction());\n if (currentView !== routes.home.name) {\n dispatch(createTileDataLoadingAction({\n urlQuery: currentFilteredQuery\n }));\n }\n const urlQuery = _object_spread({}, currentFilteredQuery, getActiveFeaturedFlags(getState().config.featureFlags));\n const requestParams = {\n requestId: generateGuid(),\n flightCodes: getState().config.flightCodes,\n embedHost: (_getProductByUrlKey = getProductByUrlKey({\n urlKey: getState().config.embedHost\n })) === null || _getProductByUrlKey === void 0 ? void 0 : _getProductByUrlKey.UrlKey,\n billingRegion: isPricingFilter(currentFilteredQuery) ? getState().config.billingCountryCode : '',\n urlQuery,\n entityType: currentEntityType,\n isConverged: getState().config.isConverged\n };\n prevTileDataRequest === null || prevTileDataRequest === void 0 ? void 0 : (_prevTileDataRequest_request = prevTileDataRequest.request()) === null || _prevTileDataRequest_request === void 0 ? void 0 : _prevTileDataRequest_request.abort();\n prevTileDataRequest = getTileData(requestParams);\n return prevTileDataRequest.data$.then((tileData)=>{\n prevTileDataRequest = null;\n generateTileDataLog(_object_spread_props(_object_spread({}, requestParams), {\n origin: tileData.origin,\n suggestionsRequestId: getState().search.suggestionsRequestId\n }), tileData, Date.now() - start);\n dispatch(createSetRequestFilteredLoadedAction());\n dispatch(createSetResponseFilteredQueryAction({\n responseFilteredQuery: currentFilteredQuery\n }));\n dispatch(createTileDataReceivedAction({\n entityType: Constants.EntityType.App,\n entityData: tileData.apps,\n urlQuery: currentFilteredQuery,\n requestId: requestParams.requestId\n }));\n dispatch(createTileDataReceivedAction({\n entityType: Constants.EntityType.Service,\n entityData: tileData.services,\n urlQuery: currentFilteredQuery,\n requestId: requestParams.requestId\n }));\n dispatch(createTileDataReceivedAction({\n entityType: Constants.EntityType.CloudsIndustry,\n entityData: tileData.cloudsIndustry,\n urlQuery: currentFilteredQuery,\n requestId: requestParams.requestId\n }));\n if (getState().apps.pricingPayload) {\n dispatch(createAppsPricingDataReceivedAction(getState().apps.pricingPayload));\n }\n if (getState().cloudsIndustry.pricingPayload) {\n dispatch(createAppsPricingDataReceivedAction(getState().cloudsIndustry.pricingPayload));\n }\n dispatch(createShowingResultsForReceivedAction({\n showingResultsFor: tileData.showingResultsFor,\n previousSearchText: currentFilteredQuery.search\n }));\n return tileData;\n }).catch((err)=>{\n var _getWindow_location, _getWindow;\n prevTileDataRequest = null;\n const payload = {\n page: (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow_location = _getWindow.location) === null || _getWindow_location === void 0 ? void 0 : _getWindow_location.href,\n action: Constants.Telemetry.Action.TileData,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: JSON.stringify({\n duration: Date.now() - start,\n requestParams,\n error: stringifyError(err)\n })\n };\n SpzaInstrumentService.getProvider().probe(Constants.Telemetry.ProbeName.LogInfo, payload);\n logger.error(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n throw err;\n });\n };\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport { getAppConfig } from '@shared/services/init/appConfig';\nimport AuthClient from './client';\nimport { getExtraScopesToConsent } from './scopes';\nimport { getImplicitRedirectUri } from './config';\nimport { getWindow } from '@shared/services/window';\nimport { logger } from '@src/logger';\nimport { stringifyError } from '@shared/utils/errorUtils';\nimport { Constants } from '@shared/utils/constants';\nimport { saveLocalStorageItem } from '@shared/utils/browserStorageUtils';\nconst getRedirectStartPage = ({ to })=>{\n const redirectStartPage = new URL(to);\n redirectStartPage.searchParams.set(Constants.QueryStrings.Referer, getWindow().location.href);\n redirectStartPage.searchParams.set(Constants.QueryStrings.CorrelationId, getAppConfig('correlationId'));\n return redirectStartPage.href;\n};\nexport const loginRedirectUser = /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*({ to, email }) {\n try {\n saveLocalStorageItem(Constants.LocalStorage.LoginHint, '');\n const authClient = AuthClient.getInstance();\n yield authClient.clearCache();\n yield authClient.loginRedirect({\n scopes: [],\n extraScopesToConsent: getExtraScopesToConsent(),\n loginHint: email,\n redirectUri: getImplicitRedirectUri(),\n redirectStartPage: getRedirectStartPage({\n to\n }),\n correlationId: getAppConfig('correlationId')\n });\n } catch (error) {\n logger.error(stringifyError(error), {\n action: Constants.Telemetry.Action.Login,\n actionModifier: Constants.Telemetry.ActionModifier.PreAuthRedirectFailed,\n error\n });\n }\n });\n return function loginRedirectUser(_) {\n return _ref.apply(this, arguments);\n };\n}();\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport AuthClient from './client';\nimport { getRedirectLoginUrl } from './windowUtils';\nimport { routes } from '@shared/routerHistory';\nimport { logger } from '@src/logger';\nimport { stringifyError } from '@shared/utils/errorUtils';\nimport { Constants } from '@shared/utils/constants';\nimport { saveLocalStorageItem } from '@shared/utils/browserStorageUtils';\nexport const logoutUser = /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*() {\n try {\n const { idTokenClaims } = AuthClient.getInstance().getActiveAccount();\n saveLocalStorageItem(Constants.LocalStorage.LoginHint, '');\n return yield AuthClient.getInstance().logoutRedirect({\n postLogoutRedirectUri: `${getRedirectLoginUrl()}${routes.home.getPath()}`,\n logoutHint: idTokenClaims === null || idTokenClaims === void 0 ? void 0 : idTokenClaims.login_hint\n });\n } catch (error) {\n logger.error(stringifyError(error), {\n action: Constants.Telemetry.Action.Logout,\n actionModifier: Constants.Telemetry.ActionModifier.LogoutFailed,\n error\n });\n }\n });\n return function logoutUser() {\n return _ref.apply(this, arguments);\n };\n}();\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport { fetchAccessTokens } from '@shared/msal/tokens';\nexport const getAccessTokenCB = /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(store) {\n return yield fetchAccessTokens({\n resources: [\n 'spza',\n 'arm',\n 'graph',\n 'marketplaceLeads',\n 'agreement'\n ]\n });\n });\n return function getAccessTokenCB(store) {\n return _ref.apply(this, arguments);\n };\n}();\n","// eslint-disable-next-line import/named\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport { shouldRefreshAccessToken } from '@shared/services/http/tokenRestClient';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { stringifyError } from '@shared/utils/errorUtils';\nimport { createSetAccessTokenAction } from '@shared/actions/actions';\nimport { Constants } from '@shared/utils/constants';\nimport { logger } from '@src/logger';\nimport { HttpModule } from '@shared/services/http/httpProtocol';\nimport { mergeAccessToken } from '@shared/utils/accessToken';\nimport { fetchAccessTokens } from '@shared/msal/tokens';\n// If token expiration time is less than minimum, token should be refreshed.\nconst MIN_TIME_UNTIL_EXPIRATION_SEC = 60 * 30; // 30 minutes in seconds.\nconst logErrorTelemetry = (message, error)=>{\n const payload = {\n page: window.location.href || '',\n action: Constants.Telemetry.Action.RefreshToken,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: JSON.stringify({\n message,\n error: error ? stringifyError(error) : ''\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.error(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n};\nexport const refreshTokenIfNeeded = /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(store) {\n const { accessToken } = store.getState().users;\n if (accessToken && shouldRefreshAccessToken(accessToken, MIN_TIME_UNTIL_EXPIRATION_SEC)) {\n try {\n const refreshedAccessToken = yield fetchAccessTokens({\n resources: [\n 'spza',\n 'arm',\n 'graph',\n 'commerce',\n 'jarvis',\n 'marketplaceLeads',\n 'pifd',\n 'agreement'\n ]\n });\n if (refreshedAccessToken) {\n const storedToken = mergeAccessToken({\n currentAccessToken: accessToken,\n newAccessToken: refreshedAccessToken\n });\n store.dispatch(createSetAccessTokenAction(storedToken));\n HttpModule.updateAccessToken(storedToken);\n } else {\n logErrorTelemetry('AppSourceClientHookup fail to refresh token. Null token created.');\n }\n } catch (error) {\n logErrorTelemetry('AppSourceClientHookup fail to refresh token with error', error);\n }\n }\n });\n return function refreshTokenIfNeeded(store) {\n return _ref.apply(this, arguments);\n };\n}();\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport AuthClient from './client';\nimport { getWindow } from '@shared/services/window';\nimport { Constants } from '@shared/utils/constants';\nimport { routes } from '@shared/routerHistory';\nimport { logger } from '@src/logger';\nimport { stringifyError } from '@shared/utils/errorUtils';\nexport const postRedirect = /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*() {\n try {\n const tokenResponse = yield AuthClient.getInstance().handleRedirectPromise();\n if (tokenResponse) {\n const { state } = tokenResponse;\n logger.info(JSON.stringify({\n state\n }), {\n action: Constants.Telemetry.Action.Login,\n actionModifier: Constants.Telemetry.ActionModifier.AuthRedirectSucceed\n });\n } else if (getWindow().location.pathname === routes.redirect.getPath()) {\n // User navigated to redirect route and didn't come from AAD, so will be redirected to homepage as a fallback\n const fallbackRoute = routes.home.getPath();\n logger.warning(JSON.stringify({\n to: fallbackRoute\n }), {\n action: Constants.Telemetry.Action.Login,\n actionModifier: Constants.Telemetry.ActionModifier.AuthRedirectNotFromAAD\n });\n getWindow().location.href = fallbackRoute;\n }\n } catch (error) {\n logger.error(stringifyError(error), {\n action: Constants.Telemetry.Action.Login,\n actionModifier: Constants.Telemetry.ActionModifier.AuthRedirectFailed,\n error\n });\n }\n });\n return function postRedirect() {\n return _ref.apply(this, arguments);\n };\n}();\n","// the hookup for the client, this is the code that gets executed when\n// the client finally gets its bundle.js. At that point, the dom needs to be\n// understood by react so it can take over from here on.\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { Suspense, useInsertionEffect } from 'react';\nimport { buildStore } from '@shared/store/createStore';\nimport thunk from 'redux-thunk';\nimport { Provider } from 'react-redux';\nimport { getAccessTokenCB } from '@shared/components/FederatedModules/RestClient';\nimport { ThemeProvider, initializeIcons, Stylesheet } from '@fluentui/react';\nimport { Constants } from '@shared/utils/constants';\nimport combineReducers from '@shared/reducers/reducers';\nimport { RootHandler } from '@shared/handlers/rootHandler';\nimport { getWindow } from '@shared/services/window';\nimport { decodeVulnerableDataInInitalState, generateGuid, logInitialTelemetryEvents, setProfileFeatureFlag } from '@shared/utils/appUtils';\nimport { createEnableNewNpsAction, createRehydrateClientStateAction, createChangeLocaleLanguage, createSetInitializedPCAInstanceAction } from '@shared/actions/actions';\nimport { initBrowserConfig } from '@shared/services/init/initBrowser';\nimport { changeBillingRegion, getTenantType, getUserTenantsDetails, setStorefrontName, updateUser } from '@shared/actions/thunkActions';\nimport { HttpModule } from '@shared/services/http/httpProtocol';\nimport { ensureClientLoggerInitialization, logger } from '@src/logger';\nimport { getCookieItem, saveCookieItem } from '@shared/utils/browserStorageUtils';\nimport ScrollToTopButton from '@shared/components/scrollToTopButton';\nimport Router from './Router';\nimport { refreshTokenIfNeeded } from './refreshTokenHandler';\nimport i18next from 'i18next';\nimport i18nInit from '@shared/i18n/client';\nimport { I18nextProvider } from 'react-i18next';\nimport { onError } from '@shared/handlers/onError';\nimport { appendHeaderTags } from '@shared/handlers/seo';\nimport RemoteLogger from '@layout/logger';\nimport RestClient from '@layout/RestClient';\nimport AuthClient from '@shared/msal/client';\nimport { createGuestUser } from '@shared/msal/user';\nimport { postRedirect } from '@shared/msal/postRedirect';\nimport { Hydrate, QueryClientProvider } from '@tanstack/react-query';\nimport { queryClient } from '@layout/RestClient';\nconst CHECK_TOKEN_INTERVAL_MSEC = 1000 * 60 * 10; // 10 minutes in milliseconds\nconst refreshTokenIfNeededInterval = /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(store) {\n var _getWindow;\n yield refreshTokenIfNeeded(store);\n (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : _getWindow.setTimeout(refreshTokenIfNeededInterval, CHECK_TOKEN_INTERVAL_MSEC, store);\n });\n return function refreshTokenIfNeededInterval(store) {\n return _ref.apply(this, arguments);\n };\n}();\nexport function initApp() {\n var _store_getState_users;\n const currentWindow = getWindow();\n const initialState = currentWindow.__INITIAL_STATE__;\n decodeVulnerableDataInInitalState(initialState);\n const prevCorrelationId = getCookieItem(Constants.Cookies.correlationId, false);\n if (!prevCorrelationId) {\n const correlationId = generateGuid();\n initialState.config.correlationId = correlationId;\n currentWindow.__INITIAL_STATE__ = initialState;\n saveCookieItem(Constants.Cookies.correlationId, correlationId, 'expires=0');\n }\n const store = buildStore({\n combinedReducers: combineReducers,\n initialState,\n middleware: [\n thunk\n ]\n });\n const localeFromUrl = currentWindow.location.pathname.split('/')[1];\n saveCookieItem(Constants.Cookies.LocaleCookie, localeFromUrl);\n initBrowserConfig(Constants.BrowserConfigs.appsource, store);\n initializeIcons();\n i18nInit();\n HttpModule.updateAccessToken((_store_getState_users = store.getState().users) === null || _store_getState_users === void 0 ? void 0 : _store_getState_users.accessToken);\n HttpModule.updateStore(store);\n logInitialTelemetryEvents(store);\n setProfileFeatureFlag(store);\n currentWindow === null || currentWindow === void 0 ? void 0 : currentWindow.setTimeout(refreshTokenIfNeededInterval, CHECK_TOKEN_INTERVAL_MSEC, store);\n const stylesheet = Stylesheet.getInstance();\n stylesheet.setConfig({\n namespace: Constants.AppName.AppSource\n });\n store.dispatch(setStorefrontName(Constants.StorefrontName.AppSource));\n store.dispatch(getUserTenantsDetails());\n store.dispatch(getTenantType());\n store.dispatch(changeBillingRegion({\n shouldSetCountyCodeCookie: false\n }));\n store.dispatch(createRehydrateClientStateAction());\n store.dispatch(createEnableNewNpsAction({\n enable: true\n }));\n store.dispatch(createChangeLocaleLanguage({\n locale: localeFromUrl\n }));\n onError(currentWindow, store);\n ensureClientLoggerInitialization(store);\n RemoteLogger.init(logger.clientLogger.logger, {\n correlationId: initialState.config.correlationId,\n hostType: Constants.StorefrontName.AppSource\n });\n RestClient.init(()=>getAccessTokenCB(store));\n AuthClient.initialize({\n onSuccess: ()=>{\n store.dispatch(createSetInitializedPCAInstanceAction({\n initialized: true\n }));\n postRedirect();\n },\n onFailure: ()=>store.dispatch(updateUser({\n userDetails: createGuestUser()\n }))\n });\n return store;\n}\nconst dehydratedState = window.__REACT_QUERY_STATE__;\nconst App = ({ store })=>{\n useInsertionEffect(()=>{\n appendHeaderTags(store.getState());\n }, []);\n return /*#__PURE__*/ _jsx(RootHandler, {\n landingView: store.getState().config.landingView,\n store: store,\n children: /*#__PURE__*/ _jsx(ThemeProvider, {\n children: /*#__PURE__*/ _jsx(QueryClientProvider, {\n client: queryClient,\n children: /*#__PURE__*/ _jsxs(Hydrate, {\n state: dehydratedState,\n children: [\n /*#__PURE__*/ _jsx(I18nextProvider, {\n i18n: i18next,\n children: /*#__PURE__*/ _jsx(Provider, {\n store: store,\n children: /*#__PURE__*/ _jsx(Suspense, {\n fallback: null,\n children: /*#__PURE__*/ _jsx(Router, {})\n })\n })\n }),\n /*#__PURE__*/ _jsx(ScrollToTopButton, {})\n ]\n })\n })\n })\n });\n};\nexport default App;\n","/* istanbul ignore file */ import { logClientError } from '@shared/utils/appUtils';\nimport { getWindow } from '@shared/services/window';\nconst KNOWN_HYDRATION_INTERRUPTION_ERRORS = [\n 'Root did not complete',\n 'Minified React error #345'\n];\n/**\n * We are avoiding error propagation. This error happens when the client is not fully hydrated, yet user attempts to interact with it.\n * The client is still recoverable due to server-side navigation, although we will re-attempt to hydrate and trigger the client-side for full functionality.\n */ export function handleInterruptedHydration(errorMsg) {\n const isKnownIssue = KNOWN_HYDRATION_INTERRUPTION_ERRORS.some((issue)=>{\n var _errorMsg_includes;\n return errorMsg === null || errorMsg === void 0 ? void 0 : (_errorMsg_includes = errorMsg.includes) === null || _errorMsg_includes === void 0 ? void 0 : _errorMsg_includes.call(errorMsg, issue);\n });\n if (isKnownIssue) {\n var _getWindow_HYDRATE, _getWindow;\n (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow_HYDRATE = _getWindow.HYDRATE) === null || _getWindow_HYDRATE === void 0 ? void 0 : _getWindow_HYDRATE.call(_getWindow);\n }\n return isKnownIssue;\n}\nexport function handleRecoverableHydrationError(error, env) {\n if (env !== 'prod') {\n // this error should be visible in non-production environments as awareness when recovrable hydration issues occur and should be fixed!\n console.error(error);\n throw error;\n }\n logClientError(error, `client side error: React recoverable hydration error ${error}`, '', true);\n}\n","import { getWindow } from '@shared/services/window';\nimport { Constants } from '@shared/utils/constants';\nimport { getSpzaUserIdAndNewUserModifier } from '@shared/utils/appUtils';\nconst predefinedPLT = {\n scriptStart: -1,\n hydrationStart: -1\n};\nfunction currentSinceRequestStart() {\n var _getWindow_performance, _getWindow, _getWindow_performance1, _getWindow1;\n const { navigationStart = 0, requestStart = 0 } = ((_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow_performance = _getWindow.performance) === null || _getWindow_performance === void 0 ? void 0 : _getWindow_performance.timing) || {};\n return ((_getWindow1 = getWindow()) === null || _getWindow1 === void 0 ? void 0 : (_getWindow_performance1 = _getWindow1.performance) === null || _getWindow_performance1 === void 0 ? void 0 : _getWindow_performance1.now()) - (requestStart - navigationStart);\n}\nexport function setScriptStart() {\n predefinedPLT.scriptStart = currentSinceRequestStart();\n}\nexport function setHydrationStart() {\n predefinedPLT.hydrationStart = currentSinceRequestStart();\n}\nfunction getAssetsLoadTime() {\n var _getWindow_performance, _getWindow, _getWindow_performance1, _getWindow1;\n const { navigationStart = 0, requestStart = 0 } = ((_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow_performance = _getWindow.performance) === null || _getWindow_performance === void 0 ? void 0 : _getWindow_performance.timing) || {};\n const perfEntries = ((_getWindow1 = getWindow()) === null || _getWindow1 === void 0 ? void 0 : (_getWindow_performance1 = _getWindow1.performance) === null || _getWindow_performance1 === void 0 ? void 0 : _getWindow_performance1.getEntriesByType('resource')) || [];\n return perfEntries.filter(({ initiatorType })=>initiatorType === 'script' || initiatorType === 'link').map(({ name: src, responseEnd })=>({\n src,\n requestStart,\n responseEnd,\n duration: responseEnd - (requestStart - navigationStart)\n }));\n}\nconst whiteListedAssets = [\n 'staticstorage',\n 'agorasstatic'\n];\nfunction getSlowestAssetDuration({ assets }) {\n return assets.filter(({ src })=>whiteListedAssets.some((whiteListedAsset)=>src.includes(whiteListedAsset))).sort((a, b)=>b.duration - a.duration)[0];\n}\nexport function telemetryPageLoadTime({ isEmbedded, landingView }) {\n if (!getWindow()) {\n return;\n }\n const performanceNow = getWindow().performance.now();\n const { navigationStart = 0, requestStart = 0, responseStart = 0, responseEnd = 0 } = getWindow().performance.timing;\n const duration = performanceNow - (requestStart - navigationStart);\n const { scriptStart, hydrationStart } = predefinedPLT;\n const assets = getAssetsLoadTime();\n const { duration: slowestAssetDuration, src: slowestAssetURL } = getSlowestAssetDuration({\n assets\n }) || {};\n const { spzaUserId: spzaId } = getSpzaUserIdAndNewUserModifier() || {};\n const hostType = isEmbedded ? Constants.appSourceEmbed : Constants.appSource;\n const pageLoadTime = {\n hostType,\n landingView,\n responseStart: Math.max(responseStart - requestStart, 0),\n responseEnd: Math.max(responseEnd - requestStart, 0),\n scriptStart,\n hydrationStart,\n performanceNow,\n duration,\n durationSinceRequestStart: duration,\n slowestAssetDuration,\n slowestAssetURL\n };\n getWindow().pageLoadTime = pageLoadTime;\n getWindow().telemetry({\n action: Constants.Telemetry.Action.RootHandler,\n actionModifier: Constants.Telemetry.ActionModifier.End,\n details: pageLoadTime,\n spzaId\n });\n getWindow().telemetry({\n action: Constants.Telemetry.Action.PerfResources,\n actionModifier: Constants.Telemetry.ActionModifier.Complete,\n details: {\n length: assets.length,\n assets\n },\n spzaId\n });\n getWindow().flushTelemetry();\n}\n","import { actionCreator } from '@shared/actions/actions';\nexport const TileDataLoadingAction = 'TileDataLoadingAction';\nexport const createTileDataLoadingAction = actionCreator(TileDataLoadingAction);\nexport const TileDataReceivedAction = 'TileDataReceivedAction';\nexport const createTileDataReceivedAction = actionCreator(TileDataReceivedAction);\n","import { actionCreator } from './actions';\nexport const SetQueryAction = 'SetQueryAction';\nexport const createSetQueryAction = actionCreator(SetQueryAction);\nexport const SetRequestFilteredQueryAction = 'SetRequestFilteredQueryAction';\nexport const createSetRequestFilteredQueryAction = actionCreator(SetRequestFilteredQueryAction);\nexport const SetResponseFilteredQueryAction = 'SetResponseFilteredQueryAction';\nexport const createSetResponseFilteredQueryAction = actionCreator(SetResponseFilteredQueryAction);\nexport const SetRequestFilteredEntityTypeAction = 'SetRequestFilteredEntityTypeAction';\nexport const createSetRequestFilteredEntityTypeAction = actionCreator(SetRequestFilteredEntityTypeAction);\nexport const SetRequestFilteredLoadingAction = 'SetRequestFilteredLoadingAction';\nexport const createSetRequestFilteredLoadingAction = actionCreator(SetRequestFilteredLoadingAction);\nexport const SetRequestFilteredLoadedAction = 'SetRequestFilteredLoadedAction';\nexport const createSetRequestFilteredLoadedAction = actionCreator(SetRequestFilteredLoadedAction);\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { mergeStyleSets, Spinner } from '@fluentui/react';\nimport propTypes from 'prop-types';\nimport classNames from 'classnames';\nconst styles = mergeStyleSets({\n container: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n width: '100%',\n height: '50vh'\n }\n});\nconst LoadingSpinner = (_, context)=>/*#__PURE__*/ _jsx(\"div\", {\n className: classNames([\n 'loading',\n styles.container\n ]),\n children: /*#__PURE__*/ _jsx(Spinner, {\n label: context.loc('Gallery_Loading', 'Loading...'),\n ariaLive: \"assertive\",\n labelPosition: \"left\"\n })\n });\nLoadingSpinner.contextTypes = {\n loc: propTypes.func\n};\nexport default LoadingSpinner;\n","/* istanbul ignore file */ function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React, { Suspense, useMemo, useState } from 'react';\nimport { matchPath, useLocation } from 'react-router-dom';\nimport { useSelector } from 'react-redux';\nimport LoadingSpinner from '@shared/components/LoadingSpinner';\nconst withSuspense = (Component)=>{\n return /*#__PURE__*/ _jsx(Suspense, {\n fallback: /*#__PURE__*/ _jsx(LoadingSpinner, {}),\n children: Component\n });\n};\nexport function useClientRoutes(options) {\n const { routes } = options;\n const [localeRoutes, ...otherRoutes] = routes;\n const location = useLocation();\n const [ssrEntry] = useState(()=>location.pathname);\n const isEmbedded = useSelector((state)=>state.config.isEmbedded);\n return useMemo(()=>{\n const children = localeRoutes.children.map((route)=>{\n var _matchingPath_pattern;\n var _route_path;\n const path = `/:locale/${(_route_path = route.path) !== null && _route_path !== void 0 ? _route_path : ''}`;\n const matchingPath = matchPath(path, ssrEntry);\n const shouldWrapWithSuspense = isEmbedded || !(route.index || (matchingPath === null || matchingPath === void 0 ? void 0 : (_matchingPath_pattern = matchingPath.pattern) === null || _matchingPath_pattern === void 0 ? void 0 : _matchingPath_pattern.path) === path);\n return _object_spread_props(_object_spread({}, route), {\n element: shouldWrapWithSuspense ? withSuspense(route.element) : route.element\n });\n });\n return [\n _object_spread_props(_object_spread({}, localeRoutes), {\n children\n }),\n ...otherRoutes\n ];\n }, [\n ssrEntry,\n routes,\n isEmbedded\n ]);\n}\n","import { routes } from '@shared/routerHistory';\nimport { Constants } from '@shared/utils/constants';\nimport { appDetailsEnsureAsyncData, checkoutEnsureAsyncData, dynamicCampaignEnsureAsyncData, serivceDetailsEnsureAsyncData } from './ensureAsyncData';\nexport const PATHS_TO_VIEW_MAP = {\n [Constants.home]: {\n view: routes.home.name\n },\n marketplace: {\n view: routes.marketplace.name\n },\n [Constants.appsGallery]: {\n view: routes.marketplace.name\n },\n [Constants.cloudsIndustryGallery]: {\n view: routes.marketplaceCloudsIndustry.name\n },\n 'product/:productId/:entityId': {\n view: routes.appDetails.name,\n ensureAsyncDataSSR: appDetailsEnsureAsyncData\n },\n 'marketplace/checkout/:entityId': {\n view: routes.checkout.name,\n ensureAsyncDataSSR: checkoutEnsureAsyncData\n },\n 'marketplace/order-confirmation': {\n view: routes.orderConfirmation.name\n },\n partners: {\n view: routes.partners.name\n },\n [Constants.csGallery]: {\n view: routes.marketplaceServices.name\n },\n [`${Constants.csGallery}/:entityId`]: {\n view: routes.serviceDetail.name,\n ensureAsyncDataSSR: serivceDetailsEnsureAsyncData\n },\n [`${Constants.partnersAppSource}/*`]: {\n view: routes.marketplacePartners.name\n },\n [`${Constants.partnersAppSource}/:entityId/:tab`]: {\n view: routes.marketplacePartnerDetail.name\n },\n [`${Constants.partnersAppSource}/:entityId/:tab/contact`]: {\n view: routes.marketplacePartnerDetailContact.name\n },\n [`${Constants.partnersAppSource}/suggestion`]: {\n view: routes.marketplacePartnerSuggestion.name\n },\n 'marketplace/consultingservices/:entityId': {\n view: routes.serviceDetail.name\n },\n 'campaigns/:publisher/:id': {\n view: routes.campaigns.name,\n ensureAsyncDataSSR: dynamicCampaignEnsureAsyncData\n },\n 'user/my-favourites': {\n view: routes.userFavouriteDetail.name\n },\n 'user/private-offers': {\n view: routes.privateOffers.name\n },\n ':privateOffer/product/:productId/:entityId': {\n view: routes.privateOfferDetails.name,\n ensureAsyncDataSSR: appDetailsEnsureAsyncData\n },\n sitemap: {\n view: routes.sitemap.name\n },\n redirect: {\n view: routes.redirect.name\n }\n};\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport { logger } from '@src/logger';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { getWindow } from '@shared/services/window';\nimport { Constants } from './constants';\nimport { stringifyError } from './errorUtils';\nexport function getSignUpHost(modalType) {\n if (modalType === Constants.SignInType.SignInWith_MSA || modalType === Constants.SignInType.SwitchTo_MSA) {\n return 'https://signup.live.com/signup?wa=wsignin1.0&rpsnv=13&rver=6.7.6643.0&wp=MBI_SSL';\n }\n return 'https://signup.microsoft.com/signUp?sku=appsource';\n}\nexport function getSignInHeader(context) {\n return context.loc('SI_SignInAppSource');\n}\nexport function getTitle(context) {\n return context.loc('SI_WorkAccount');\n}\nexport function getRedirectString(modalType) {\n if (modalType === Constants.SignInType.SignInWith_MSA || modalType === Constants.SignInType.SwitchTo_MSA) {\n return '&wreply=';\n }\n return '&ru=';\n}\nexport function handleSignUp() {\n return _handleSignUp.apply(this, arguments);\n}\nfunction _handleSignUp() {\n _handleSignUp = _async_to_generator(function*() {\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.Signup,\n details: JSON.stringify({\n message: 'Clicked on sign-up. Navigating to office portal'\n })\n };\n SpzaInstrumentService.getProvider().probe('logAndFlushTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n try {\n const redirectUrl = `https://signup.microsoft.com/signUp?sku=appsource&ru=${encodeURIComponent(getWindow().location.href)}&pi=1`;\n getWindow().location.href = redirectUrl;\n } catch (err) {\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Login,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: stringifyError(err)\n };\n SpzaInstrumentService.getProvider().probe(Constants.Telemetry.ProbeName.LogInfo, payload);\n logger.error(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n }\n });\n return _handleSignUp.apply(this, arguments);\n}\n","/* eslint-disable react/forbid-dom-props */ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from '@shared/components/spzaComponent';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { removeURLParameter, isEmailValid } from '@shared/utils/appUtils';\nimport { urlReplace, routes } from '@shared/routerHistory';\nimport { stringifyError } from '@shared/utils/errorUtils';\nimport { getWindow } from '@shared/services/window';\nimport * as signInUtils from '@shared/utils/signin';\nimport { useTelemetry } from '@shared/hooks/useTelemetry';\nimport { logger } from '@src/logger';\nimport { Constants } from '@shared/utils/constants';\nimport { loginRedirectUser } from '@shared/msal/loginRedirect';\n// eslint-disable-next-line react-hooks/rules-of-hooks\nconst [{ pageAction }] = useTelemetry();\nexport class SignInModal extends SpzaComponent {\n componentDidMount() {\n const modalType = Constants.SignInType[this.props.signInModalType];\n const details = {\n signInModal: modalType,\n ctaType: Constants.CTAType[this.props.ctaType],\n message: `Opened sign in modal ${modalType}`\n };\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Open,\n actionModifier: Constants.Telemetry.ActionModifier.LoginModal,\n details: JSON.stringify(details)\n };\n this.instrument.probe('logAndFlushTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n pageAction(null, {\n content: {\n contentType: Constants.JsllSaas.SignInModalShow\n }\n });\n }\n validateEmail(inputEmail) {\n if (isEmailValid(inputEmail)) {\n this.setState({\n inputEmail,\n validEmail: true\n });\n } else {\n this.setState({\n inputEmail,\n validEmail: false\n });\n }\n }\n getRedirectUrl(id) {\n let redirectUrl = encodeURIComponent(getWindow().location.href);\n if (this.props.redirect === 'app') {\n if (!this.props.ctaType) {\n throw new Error('CTA Type is required');\n }\n const entityId = id || this.props.entityId;\n if (entityId) {\n redirectUrl = encodeURIComponent(getWindow().location.href + this.getQueryParam(Constants.QueryStrings.modalAppId) + entityId + this.getQueryParam(Constants.QueryStrings.signInModalType, true) + this.props.signInModalType + this.getQueryParam(Constants.QueryStrings.ctaType, true) + this.props.ctaType);\n }\n }\n if (this.props.redirect === 'service') {\n if (!this.props.ctaType) {\n throw new Error('CTA Type is required');\n }\n const entityId = id || this.props.entityId;\n if (entityId) {\n redirectUrl = encodeURIComponent(getWindow().location.href + this.getQueryParam(Constants.QueryStrings.modalServiceId) + entityId + this.getQueryParam(Constants.QueryStrings.signInModalType, true) + this.props.signInModalType + this.getQueryParam(Constants.QueryStrings.ctaType, true) + this.props.ctaType);\n }\n }\n if (this.props.redirect === Constants.SignInRedirect.Review) {\n const entityId = this.props.entityId;\n if (entityId) {\n redirectUrl = encodeURIComponent(getWindow().location.href + this.getQueryParam(Constants.QueryStrings.modalRatingId) + entityId + this.getQueryParam(Constants.QueryStrings.signInModalType, true) + this.props.signInModalType);\n }\n }\n if (this.props.redirect === Constants.SignInRedirect.Checkout) {\n const entityId = this.props.entityId;\n if (entityId) {\n // redirect to checkout page\n // if there are any query params, keep those as well\n redirectUrl = encodeURIComponent(getWindow().location.origin + this.context.buildHref(routes.checkout, {\n entityId\n }, {}, true));\n }\n }\n if (this.props.redirect === 'reportAbuse') {\n const entityId = id || this.props.entityId;\n const reviewAppId = this.props.reviewAppId;\n if (entityId) {\n redirectUrl = encodeURIComponent(getWindow().location.href + this.getQueryParam(Constants.QueryStrings.modalReviewId) + entityId + this.getQueryParam(Constants.QueryStrings.modalReviewAppId, true) + reviewAppId + this.getQueryParam(Constants.QueryStrings.modalReviewTitle, true) + this.props.reviewTitle + this.getQueryParam(Constants.QueryStrings.signInModalType, true) + this.props.signInModalType);\n }\n }\n return redirectUrl;\n }\n getQueryParam(param, isMultiParam = false) {\n const queryParam = getWindow().location.href.indexOf('?') > -1 || isMultiParam ? '&' + param + '=' : '?' + param + '=';\n // If we do a sign-up before the sign-in, we will have modalAppId in the queryParams.\n // We need to get rid of it before signing in since there will be duplicate params.\n if (getWindow().location.href.indexOf(param) > -1) {\n const pageURL = removeURLParameter(getWindow().location.href, param);\n urlReplace(pageURL);\n }\n return queryParam;\n }\n // Sign up flow also uses SignIn URL as redirect (with absolute path) so that when user lands back on SPZA\n // (s)he gets redirected for sign-in flow and gets signed in\n getSignInRedirectUrl() {\n var _this = this;\n return _async_to_generator(function*() {\n try {\n return _this.getRedirectUrl();\n } catch (err) {\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Login,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: stringifyError(err)\n };\n SpzaInstrumentService.getProvider().probe(Constants.Telemetry.ProbeName.LogInfo, payload);\n logger.error(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n }\n })();\n }\n getSignUpUrl(email) {\n var _this = this;\n return _async_to_generator(function*() {\n const signInRedirectUrl = yield _this.getSignInRedirectUrl();\n return `${_this.signUp}${signInUtils.getRedirectString(_this.props.signInModalType)}${encodeURIComponent(signInRedirectUrl)}&pi=1&email=${email}`;\n })();\n }\n signInUser() {\n var _this = this;\n return _async_to_generator(function*() {\n // Set the flushLog to true since we are navigating away from the SPZA website\n // and we need to flush all the logs present in the telemetry buffer\n const { signInModalType, ctaType } = _this.props;\n const { inputEmail } = _this.state;\n const details = {\n signInModal: Constants.SignInType[`${signInModalType}`],\n ctaType: Constants.CTAType[`${ctaType}`],\n message: 'Clicked on signIn. Hand-off to AAD for authentication'\n };\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.LoginModal,\n details: JSON.stringify(details)\n };\n _this.instrument.probe('logAndFlushTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n const pageAfterRedirect = decodeURIComponent(_this.getRedirectUrl());\n loginRedirectUser({\n to: pageAfterRedirect,\n email: inputEmail\n });\n })();\n }\n onChange(event) {\n if (event.target.value && event.target.value.length > 0) {\n this.isEmailEmpty = false;\n } else {\n this.isEmailEmpty = true;\n }\n this.validateEmail(event.target.value);\n }\n onKeyDown(event) {\n // When user presses enter key, we should sign-in\n if (event.keyCode === Constants.SystemKey.Enter) {\n this.signInUser();\n }\n }\n handleSignIn() {\n this.signInUser();\n }\n handleSignUp() {\n var _this = this;\n return _async_to_generator(function*() {\n // Set the flushLog to true since we are navigating away from the SPZA website\n // and we need to flush all the logs present in the telemetry buffer\n const details = {\n signInModal: Constants.SignInType[_this.props.signInModalType],\n ctaType: Constants.CTAType[_this.props.ctaType],\n message: 'Clicked on sign-up. Navigating to office portal'\n };\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.Signup,\n details: JSON.stringify(details)\n };\n _this.instrument.probe('logAndFlushTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n // Send the sign-in based URL so that when user lands back on SPZA post Sign-up we get him/her signed in as well.\n const { inputEmail } = _this.state;\n const signUpUrl = yield _this.getSignUpUrl(inputEmail);\n const form = document.createElement('form');\n form.setAttribute('method', 'post');\n form.setAttribute('action', signUpUrl);\n const emailField = document.createElement('input');\n emailField.setAttribute('type', 'hidden');\n emailField.setAttribute('name', 'StepsData.Email');\n emailField.setAttribute('value', inputEmail);\n form.appendChild(emailField);\n document.body.appendChild(form);\n form.submit();\n })();\n }\n // TODO : Remove this once Office onboarding is done\n renderOldSignInModal() {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"prompContainer\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"toolBar\",\n children: /*#__PURE__*/ _jsx(\"button\", {\n id: \"cancelButton\",\n \"aria-label\": \"close\",\n className: \"cancel\",\n onClick: this.props.dismissModal,\n children: /*#__PURE__*/ _jsx(\"span\", {\n className: \"c-glyph\"\n })\n })\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"signInModal\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"contentHeader\",\n children: signInUtils.getSignInHeader(this.context)\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"formCell signInFormCell\",\n children: [\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"cellHeader\",\n children: [\n signInUtils.getTitle(this.context),\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"required\"\n })\n ]\n }),\n /*#__PURE__*/ _jsx(\"input\", {\n className: \"c-text-field f-flex signInInput\",\n onChange: this.onChange.bind(this),\n onKeyDown: this.onKeyDown.bind(this),\n autoFocus: true,\n type: \"text\",\n placeholder: \"someone@example.com\",\n name: \"default\"\n })\n ]\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"signInButton\",\n children: /*#__PURE__*/ _jsx(\"button\", {\n name: \"button\",\n className: \"c-button requestButton\",\n type: \"submit\",\n disabled: this.isEmailEmpty,\n \"data-bi-id\": Constants.JsllCTAId.SignIn,\n \"data-bi-area\": \"SignIn Dialog\",\n onClick: this.handleSignIn.bind(this),\n children: this.context.loc('SI_SignIn')\n })\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"signupFooter\",\n children: [\n this.context.loc('SI_For'),\n /*#__PURE__*/ _jsx(\"button\", {\n \"data-bi-id\": Constants.JsllCTAId.SignUp,\n \"data-bi-area\": \"SignIn Dialog\",\n onClick: ()=>{\n this.handleSignUp();\n },\n children: this.context.loc('SI_Signup')\n })\n ]\n })\n ]\n })\n ]\n });\n }\n renderTheCancelButton() {\n const { disableDismissModal } = this.props;\n return !disableDismissModal && /*#__PURE__*/ _jsx(\"div\", {\n className: \"toolBar\",\n children: /*#__PURE__*/ _jsx(\"button\", {\n \"data-bi-id\": \"cancelButton\",\n \"aria-label\": \"close\",\n className: \"cancel\",\n \"data-bi-name\": Constants.JsllSaas.SignIn,\n onClick: this.props.dismissModal,\n children: /*#__PURE__*/ _jsx(\"span\", {\n className: \"c-glyph\"\n })\n })\n });\n }\n renderSignInContent(title, subTitle, disclaimer, accountType) {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"prompContainer newSignInModal\",\n \"aria-label\": title,\n children: [\n this.renderTheCancelButton(),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"signInModal\",\n children: [\n /*#__PURE__*/ _jsx(\"h1\", {\n className: \"title\",\n children: title\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"subTitle\",\n children: subTitle\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"disclaimer\",\n children: [\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"c-glyph\"\n }),\n disclaimer\n ]\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"formCell signInFormCell\",\n children: [\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"cellHeader\",\n children: [\n accountType,\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"required\"\n })\n ]\n }),\n /*#__PURE__*/ _jsx(\"input\", {\n className: \"c-text-field f-flex signInInput\",\n onChange: this.onChange.bind(this),\n onKeyDown: this.onKeyDown.bind(this),\n autoFocus: true,\n type: \"text\",\n placeholder: \"someone@example.com\",\n \"aria-label\": \"sign in modal is now open. Use your work or school account\",\n name: \"Use your work or school account\"\n })\n ]\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"signInButton\",\n children: /*#__PURE__*/ _jsx(\"button\", {\n name: \"button\",\n className: \"c-button requestButton\",\n \"data-bi-id\": Constants.JsllCTAId.SignIn,\n \"data-bi-name\": Constants.JsllSaas.SignIn,\n type: \"submit\",\n disabled: this.isEmailEmpty,\n onClick: this.handleSignIn.bind(this),\n children: this.context.loc('SI_SignIn')\n })\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"signupFooter\",\n children: [\n this.context.loc('SI_For'),\n /*#__PURE__*/ _jsx(\"button\", {\n onClick: ()=>{\n this.handleSignUp();\n },\n children: this.context.loc('SignInModal_SignUp')\n })\n ]\n })\n ]\n })\n ]\n });\n }\n renderDualPurposeLoginModal() {\n return this.renderSignInContent(this.context.loc('SignInModal_Title1'), this.context.loc('SignInModal_SubTitle1'), this.context.loc('SignInModal_Disclaimer1'), this.context.loc('SignInModal_AccountType1'));\n }\n renderWorkOnlyModal() {\n if (this.props.entityType && this.props.entityType === Constants.EntityType.Service) {\n return this.renderSignInContent(this.context.loc('SignInModal_Title1'), this.context.loc('SignInModal_SubTitle1'), this.context.locParams('SignInModal_ServiceDisclaimer2', [\n this.props.serviceName\n ]), this.context.loc('SignInModal_AccountType2'));\n } else {\n return this.renderSignInContent(this.context.loc('SignInModal_Title1'), this.context.loc('SignInModal_SubTitle1'), this.context.locParams('SignInModal_Disclaimer2', [\n this.props.appName\n ]), this.context.loc('SignInModal_AccountType2'));\n }\n }\n renderSwitchAccountModal() {\n return this.renderSignInContent(this.context.loc('SignInModal_Title2'), this.context.locParams('SignInModal_SubTitle2', [\n this.props.appName\n ]), this.context.locParams('SignInModal_Disclaimer3', [\n this.props.email\n ]), this.context.loc('SignInModal_AccountType2'));\n }\n renderMSAOnlySignInModal() {\n return this.renderSignInContent(this.context.loc('SignInModal_Title1'), this.context.loc('SignInModal_SubTitle1'), this.context.locParams('SignInModal_AppRequiresMSADisclaimer', [\n this.props.appName\n ]), this.context.loc('SignInModal_PersonalAccount'));\n }\n renderSwitchToMSAModal() {\n return this.renderSignInContent(this.context.loc('SignInModal_SwitchToPersonalAccount'), this.context.locParams('SignInModal_AppRequiresMSADisclaimer', [\n this.props.appName\n ]), this.context.locParams('SignInModal_GenericAutoLogout', [\n this.props.email\n ]), this.context.loc('SignInModal_PersonalAccount'));\n }\n renderModalContent(modalType) {\n let modalContent = null;\n switch(modalType){\n // This case is added to handle legacy sign-in modal\n case Constants.SignInType.OldSignInModal:\n modalContent = this.renderOldSignInModal();\n break;\n // The new dual purpose login modal\n case Constants.SignInType.SignInWith_MSA_AAD:\n modalContent = this.renderDualPurposeLoginModal();\n break;\n // Work only login modal\n case Constants.SignInType.SignInWith_AAD:\n modalContent = this.renderWorkOnlyModal();\n break;\n // Sign-in modal for MSA only\n case Constants.SignInType.SignInWith_MSA:\n modalContent = this.renderMSAOnlySignInModal();\n break;\n // Sign-in modal to switch from MSA to AAD\n case Constants.SignInType.SwitchTo_AAD:\n modalContent = this.renderSwitchAccountModal();\n break;\n case Constants.SignInType.SwitchTo_MSA:\n modalContent = this.renderSwitchToMSAModal();\n break;\n default:\n modalContent = this.renderOldSignInModal();\n }\n return modalContent;\n }\n renderImpl() {\n let ariaLabel = 'sign in is now open, ';\n if (this.props.signInModalType === Constants.SignInType.SignInWith_MSA_AAD || this.props.signInModalType === Constants.SignInType.SignInWith_AAD) {\n ariaLabel += this.context.loc('SignInModal_Title1');\n } else if (this.props.signInModalType === Constants.SignInType.SwitchTo_AAD) {\n ariaLabel += this.context.loc('SignInModal_Title2');\n } else {\n ariaLabel += this.context.loc('SI_SignInAppSource');\n }\n return /*#__PURE__*/ _jsx(\"div\", {\n role: \"dialog\",\n \"aria-label\": ariaLabel,\n className: \"signInModalClass\",\n children: this.renderModalContent(this.props.signInModalType)\n });\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"context\", void 0), _define_property(this, \"signUp\", void 0), _define_property(this, \"instrument\", void 0), _define_property(this, \"isEmailEmpty\", true);\n this.instrument = SpzaInstrumentService.getProvider();\n this.state = {\n inputEmail: '',\n validEmail: false\n };\n this.signUp = signInUtils.getSignUpHost(this.props.signInModalType);\n if (process.env.SIGNUP_ORIGIN) {\n this.signUp += '&origin=' + process.env.SIGNUP_ORIGIN;\n }\n }\n}\nSignInModal.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n renderErrorModal: PropTypes.func,\n buildHref: PropTypes.func\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { Carousel } from 'react-responsive-carousel';\nimport SpzaComponent from './../spzaComponent';\nimport { MediaType } from '../../Models';\nimport { convertTimeToSeconds } from '../../utils/appUtils';\nlet url = require('url');\nvar VideoSupplier = /*#__PURE__*/ function(VideoSupplier) {\n VideoSupplier[\"YouTube\"] = \"YouTube\";\n VideoSupplier[\"Vimeo\"] = \"Vimeo\";\n return VideoSupplier;\n}(VideoSupplier || {});\nclass MediaModal extends SpzaComponent {\n getQueryString(query, exclude) {\n let result = '';\n const keys = query ? Object.keys(query) : [];\n const keysLength = keys.length;\n for(let i = 0; i < keysLength; i++){\n if (exclude && exclude.indexOf(keys[i]) < 0) {\n if (keys[i] && keys[i].toLowerCase() === 't') {\n // When using youtube embed, the parameter \"t\" should be replaced with \"start\", and the value should be\n // numeric only (according to youtube api - https://developers.google.com/youtube/player_parameters)\n const startTimeInSeconds = isNaN(query[keys[i]]) ? convertTimeToSeconds(query[keys[i]]).toString() : query[keys[i]];\n result += '&' + 'start' + '=' + startTimeInSeconds;\n } else {\n result += '&' + keys[i] + '=' + query[keys[i]];\n }\n }\n }\n return result;\n }\n parseUrl(videoUrl) {\n let parsedUrl = url.parse(videoUrl, true);\n let hostName = '';\n let pathName = '';\n if (parsedUrl) {\n hostName = parsedUrl.hostname ? parsedUrl.hostname.toLowerCase() : hostName;\n // If the pathname doesn't start with \"/\", add \"/\" since in IE the pathname doesn't start with \"/\" which breaks the video url generating logic.\n pathName = (parsedUrl.pathname && parsedUrl.pathname.length > 0 && parsedUrl.pathname[0] !== '/' ? '/' : '') + parsedUrl.pathname;\n }\n return {\n hostname: hostName,\n pathname: pathName,\n query: parsedUrl ? parsedUrl.query : ''\n };\n }\n generateYouTubeVideoSource(parsedUrl, videoUrl) {\n const youtubeConfigs = this.videoSuppliers[\"YouTube\"];\n let sourceUrl = '';\n if ((parsedUrl.hostname === 'www.youtube.com' || parsedUrl.hostname === 'youtube.com') && parsedUrl.query !== null && parsedUrl.query.v) {\n sourceUrl = `${youtubeConfigs.host}${parsedUrl.query.v}?${this.getQueryString(parsedUrl.query, [\n 'v'\n ])}`;\n } else if (parsedUrl.hostname === 'youtu.be') {\n let pathValues = parsedUrl.pathname.split('/');\n if (pathValues.length > 1) {\n sourceUrl = `${youtubeConfigs.host}${pathValues[1]}?${this.getQueryString(parsedUrl.query)}`;\n }\n } else if ((parsedUrl.hostname === 'www.youtube.com' || parsedUrl.hostname === 'youtube.com') && parsedUrl.pathname.indexOf('embed') >= 0) {\n sourceUrl = videoUrl;\n if (sourceUrl.indexOf('?') < 0) {\n sourceUrl = sourceUrl + '?';\n }\n }\n return `${sourceUrl}&${youtubeConfigs.query}`;\n }\n generateVimeoVideoSource(parsedUrl, videoUrl) {\n const vimeoConfigs = this.videoSuppliers[\"Vimeo\"];\n const vimeoParsingRegex = /vimeo\\.com\\/(video\\/)?(external\\/)?(\\d+)/;\n const matches = videoUrl.match(vimeoParsingRegex);\n const vimeoId = matches && matches.length && matches[matches.length - 1] || 'vimeoId';\n return `${vimeoConfigs.host}${vimeoId}?${this.getQueryString(parsedUrl.query)}&${vimeoConfigs.query}`;\n }\n parseVideo(item) {\n const parsedUrl = this.parseUrl(item.link);\n let supplier;\n let sourceUrl = '';\n if (parsedUrl.hostname.indexOf('youtube') >= 0 || parsedUrl.hostname.indexOf('youtu.be') >= 0) {\n supplier = \"YouTube\";\n sourceUrl = this.generateYouTubeVideoSource(parsedUrl, item.link);\n } else if (parsedUrl.hostname.indexOf('vimeo') >= 0) {\n supplier = \"Vimeo\";\n sourceUrl = this.generateVimeoVideoSource(parsedUrl, item.link);\n }\n if (parsedUrl.hostname === 'aka.ms') {\n sourceUrl = item.link;\n }\n return {\n sourceUrl,\n supplier\n };\n }\n pauseVideoRefs() {\n if (this.videosRefs && this.videosRefs.length) {\n for (const videoRef of this.videosRefs){\n if (videoRef.supplier && this.videoSuppliers[videoRef.supplier] && this.videoSuppliers[videoRef.supplier].pauseCommand && videoRef.element && videoRef.element.contentWindow && videoRef.element.contentWindow.postMessage) {\n videoRef.element.contentWindow.postMessage(JSON.stringify(this.videoSuppliers[videoRef.supplier].pauseCommand), '*');\n }\n }\n }\n }\n renderImpl() {\n this.videosRefs = [];\n return /*#__PURE__*/ _jsx(\"div\", {\n role: \"dialog\",\n \"aria-label\": \"media modal is now open\",\n className: \"mediaModal\",\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: \"dialogContent\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"toolBar\",\n children: /*#__PURE__*/ _jsx(\"button\", {\n className: \"cancel\",\n \"aria-label\": \"close\",\n onClick: this.props.dismissModal,\n \"data-bi-id\": \"cancelButton\",\n \"data-bi-name\": this.props.payload.media && this.props.payload.media[this.props.payload.defaultIndex || 0] && this.props.payload.media[this.props.payload.defaultIndex || 0].type,\n autoFocus: true,\n children: /*#__PURE__*/ _jsx(\"span\", {\n className: \"c-glyph\"\n })\n })\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"mediaContainer\",\n children: /*#__PURE__*/ _jsx(Carousel, {\n showThumbs: false,\n autoPlay: false,\n showStatus: false,\n useKeyboardArrows: true,\n infiniteLoop: false,\n selectedItem: this.props.payload.defaultIndex || 0,\n onChange: ()=>this.pauseVideoRefs(),\n children: this.props.payload.media.map((item)=>{\n if (item.type === MediaType.Image) {\n return /*#__PURE__*/ _jsx(\"img\", {\n src: item.link\n });\n } else if (item.type === MediaType.Video) {\n const parsedVideo = this.parseVideo(item);\n return /*#__PURE__*/ _jsx(\"iframe\", {\n ref: (element)=>this.videosRefs.push({\n element,\n supplier: parsedVideo.supplier\n }),\n className: \"embedded-video\",\n title: item.name || 'Video',\n width: \"100%\",\n height: \"100%\",\n src: parsedVideo.sourceUrl,\n frameBorder: 0\n });\n } else {\n return /*#__PURE__*/ _jsx(_Fragment, {});\n }\n })\n })\n })\n ]\n })\n });\n }\n constructor(...args){\n super(...args), _define_property(this, \"videoSuppliers\", {\n [\"YouTube\"]: {\n host: 'https://www.youtube.com/embed/',\n query: 'showinfo=0&rel=0&modestbranding=1&cc_load_policy=1&enablejsapi=1',\n pauseCommand: {\n event: 'command',\n func: 'pauseVideo'\n }\n },\n [\"Vimeo\"]: {\n host: 'https://player.vimeo.com/video/',\n query: 'api=1',\n pauseCommand: {\n method: 'pause',\n value: 'true'\n }\n }\n }), _define_property(this, \"videosRefs\", []);\n }\n}\nexport { MediaModal as default };\nMediaModal.contextTypes = {\n loc: PropTypes.func,\n renderErrorModal: PropTypes.func\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from './../spzaComponent';\nimport { MediaType } from '../../Models';\nimport { convertTimeToSeconds, focusElement } from '../../utils/appUtils';\nimport { Constants } from '../../utils/constants';\nlet classNames = require('classnames-minimal');\nlet url = require('url');\nclass VideoModal extends SpzaComponent {\n componentDidMount() {\n // move focus to the cancel button\n // sets the document.activeElement to be the button\n focusElement(Constants.SearchBy.Id, this.initialFocusElementId);\n }\n getQueryString(query, exclude) {\n let result = '';\n const keys = query ? Object.keys(query) : [];\n const keysLength = keys.length;\n for(let i = 0; i < keysLength; i++){\n if (exclude && exclude.indexOf(keys[i]) < 0) {\n if (keys[i] && keys[i].toLowerCase() === 't') {\n // When using youtube embed, the parameter \"t\" should be replaced with \"start\", and the value should be\n // numeric only (according to youtube api - https://developers.google.com/youtube/player_parameters)\n const startTimeInSeconds = isNaN(query[keys[i]]) ? convertTimeToSeconds(query[keys[i]]).toString() : query[keys[i]];\n result += '&' + 'start' + '=' + startTimeInSeconds;\n } else {\n result += '&' + keys[i] + '=' + query[keys[i]];\n }\n }\n }\n return result;\n }\n parseUrl(videoUrl) {\n let parsedUrl = url.parse(videoUrl, true);\n let hostName = '';\n let pathName = '';\n if (parsedUrl) {\n hostName = parsedUrl.hostname ? parsedUrl.hostname.toLowerCase() : hostName;\n // If the pathname doesn't start with \"/\", add \"/\" since in IE the pathname doesn't start with \"/\" which breaks the video url generating logic.\n pathName = (parsedUrl.pathname && parsedUrl.pathname.length > 0 && parsedUrl.pathname[0] !== '/' ? '/' : '') + parsedUrl.pathname;\n }\n return {\n hostname: hostName,\n pathname: pathName,\n query: parsedUrl ? parsedUrl.query : ''\n };\n }\n generateVideoSource() {\n let videoUrl = this.props.video.videoLink;\n let parsedUrl = this.parseUrl(videoUrl);\n let sourceUrl = '';\n if (parsedUrl.hostname.indexOf('youtube') >= 0 || parsedUrl.hostname.indexOf('youtu.be') >= 0) {\n if ((parsedUrl.hostname === 'www.youtube.com' || parsedUrl.hostname === 'youtube.com') && parsedUrl.query !== null && parsedUrl.query.v) {\n sourceUrl = this.youtubeEmbedTemplate + parsedUrl.query.v + '?' + this.getQueryString(parsedUrl.query, [\n 'v'\n ]);\n } else if (parsedUrl.hostname === 'youtu.be') {\n let pathValues = parsedUrl.pathname.split('/');\n if (pathValues.length > 1) {\n sourceUrl = this.youtubeEmbedTemplate + pathValues[1] + '?' + this.getQueryString(parsedUrl.query);\n }\n } else if ((parsedUrl.hostname === 'www.youtube.com' || parsedUrl.hostname === 'youtube.com') && parsedUrl.pathname.indexOf('embed') >= 0) {\n sourceUrl = videoUrl;\n if (sourceUrl.indexOf('?') < 0) {\n sourceUrl = sourceUrl + '?';\n }\n }\n // regardless, add the modesty params\n sourceUrl = sourceUrl + '&autoplay=1&showinfo=0&rel=0&modestbranding=1&cc_load_policy=1';\n } else if (parsedUrl.hostname.indexOf('vimeo') >= 0) {\n // we are doing a naive parse here\n const vimeoParsingRegex = /vimeo\\.com\\/(video\\/)?(external\\/)?(\\d+)/;\n const matches = videoUrl.match(vimeoParsingRegex);\n const vimeoId = matches && matches.length && matches[matches.length - 1] || 'vimeoId';\n sourceUrl = this.vimeoEmbedTemplate + vimeoId + '?' + this.getQueryString(parsedUrl.query) + '&autoplay=1';\n }\n // our redirect\n if (parsedUrl.hostname === 'aka.ms') {\n sourceUrl = videoUrl;\n }\n return sourceUrl;\n }\n renderImpl() {\n let sourceUrl = this.generateVideoSource();\n const videoDialogClasses = classNames({\n spza_videoClass: true,\n videoDisplay: sourceUrl !== ''\n });\n return /*#__PURE__*/ _jsx(\"div\", {\n role: \"dialog\",\n \"aria-label\": \"video is now open\",\n className: videoDialogClasses,\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: \"dialogContent\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"toolBar\",\n children: /*#__PURE__*/ _jsx(\"button\", {\n className: \"cancel\",\n \"aria-label\": \"close\",\n onClick: this.props.dismissModal,\n \"data-bi-id\": \"cancelButton\",\n \"data-bi-name\": MediaType.Video,\n autoFocus: true,\n children: /*#__PURE__*/ _jsx(\"span\", {\n className: \"c-glyph\"\n })\n })\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"videoContainer\",\n children: sourceUrl !== '' ? /*#__PURE__*/ _jsx(\"iframe\", {\n title: this.props.video.videoName ? this.props.video.videoName : 'Video',\n width: \"100%\",\n height: \"100%\",\n src: sourceUrl,\n frameBorder: 0\n }) : /*#__PURE__*/ _jsx(\"img\", {\n src: this.props.video.thumbnailURL\n })\n })\n ]\n })\n });\n }\n constructor(...args){\n super(...args), _define_property(this, \"youtubeEmbedTemplate\", 'https://www.youtube.com/embed/'), _define_property(this, \"vimeoEmbedTemplate\", 'https://player.vimeo.com/video/'), _define_property(this, \"initialFocusElementId\", 'cancelButton');\n }\n}\nexport { VideoModal as default };\nVideoModal.contextTypes = {\n loc: PropTypes.func,\n renderErrorModal: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from './../spzaComponent';\nclass DriveModal extends SpzaComponent {\n renderImpl() {\n let sourceUrl = this.props.drive.urlLink;\n return /*#__PURE__*/ _jsx(\"div\", {\n role: \"dialog\",\n \"aria-label\": \"test drive is now open\",\n className: \"driveModalClass\",\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: \"dialogContent\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"toolBar\",\n children: /*#__PURE__*/ _jsx(\"button\", {\n id: \"cancelButton\",\n \"aria-label\": \"close\",\n className: \"cancel\",\n onClick: this.props.dismissModal,\n children: /*#__PURE__*/ _jsx(\"span\", {\n className: \"c-glyph\"\n })\n })\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"driveContainer\",\n children: /*#__PURE__*/ _jsx(\"iframe\", {\n frameBorder: \"0\",\n width: \"1200\",\n height: \"675\",\n src: sourceUrl\n })\n })\n ]\n })\n });\n }\n}\nexport { DriveModal as default };\nDriveModal.contextTypes = {\n loc: PropTypes.func,\n renderErrorModal: PropTypes.func\n};\n","import { getFormattedString } from './appUtils';\nimport { loadPartnerManifest } from './partnerManifestLoader';\nconst config = loadPartnerManifest();\nexport function getPowerBIEmbedReportURL(groupId, reportId) {\n let handOffUrl = config.fieldHub.embedEndpoint;\n let urlArgs = [\n reportId,\n groupId\n ];\n return getFormattedString(handOffUrl, urlArgs);\n}\nexport function getPowerBIEmbedParams(reportName) {\n let defaultFieldObj = config.fieldHub.queryParams['Default'];\n let fieldObj = reportName && typeof reportName === 'string' ? config.fieldHub.queryParams[reportName] : defaultFieldObj;\n let result = {\n groupId: config.fieldHub.groupId,\n reportId: config.fieldHub.reportId,\n sectionId: defaultFieldObj.sectionId,\n datasetId: config.fieldHub.datasetId\n };\n if (fieldObj && fieldObj.sectionId) {\n result.sectionId = fieldObj.sectionId;\n }\n return result;\n}\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from './../spzaComponent';\nimport { getPowerBIEmbedParams, getPowerBIEmbedReportURL } from '../../utils/fieldHubUtils';\nexport class FieldHubModal extends SpzaComponent {\n componentDidMount() {\n const reportData = getPowerBIEmbedParams(this.props.iframeProps.reportName);\n const groupId = reportData.groupId;\n const reportId = reportData.reportId;\n const embedUrl = getPowerBIEmbedReportURL(groupId, reportId);\n // Refresh the access token if it has expired or about to expire\n this.props.getReportEmbedToken(reportData).then((token)=>{\n if (token) {\n const sectionId = reportData.sectionId;\n let config = {\n type: 'report',\n accessToken: token,\n embedUrl: embedUrl,\n id: reportId,\n settings: {\n filterPaneEnabled: false\n },\n pageName: sectionId\n };\n let reportContainer = document.getElementById('reportContainer');\n if (reportContainer && window && window['powerbi']) {\n window['powerbi'].embed(reportContainer, config);\n }\n }\n });\n }\n renderImpl() {\n return /*#__PURE__*/ _jsx(\"div\", {\n role: \"dialog\",\n \"aria-label\": \"field hub is now open\",\n className: \"fieldHubModalClass\",\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: \"dialogContent\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"toolBar\",\n children: /*#__PURE__*/ _jsx(\"button\", {\n id: \"cancelButton\",\n \"aria-label\": \"close\",\n className: \"cancel\",\n onClick: this.props.dismissModal,\n children: /*#__PURE__*/ _jsx(\"span\", {\n className: \"c-glyph\"\n })\n })\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"iframeContainer\",\n id: \"reportContainer\"\n })\n ]\n })\n });\n }\n}\nFieldHubModal.contextTypes = {\n loc: PropTypes.func,\n renderErrorModal: PropTypes.func\n};\n","import * as React from 'react';\nimport { FieldHubModal as FieldHubModalComponent } from '../../components/modals/fieldHubModal';\nimport { getReportEmbedToken } from '../../actions/thunkActions';\nlet { connect } = require('react-redux');\nexport const mapStateToProps = (state, ownProps)=>{\n return ownProps;\n};\nexport const mapDispatchToProps = (dispatch, ownProps)=>{\n return {\n getReportEmbedToken: (reportData)=>dispatch(getReportEmbedToken(reportData))\n };\n};\nexport const FieldHubModal = connect(mapStateToProps, mapDispatchToProps)(FieldHubModalComponent);\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from './../spzaComponent';\nimport { logClientError } from '../../utils/appUtils';\nexport class ErrorModal extends SpzaComponent {\n renderFailImpl(err) {\n // We don't want error modal while trying to render error modal since it goes into a loop.\n // So, we are seperately handling the error case.\n logClientError(err, 'client side error: [From errorModal] ');\n return null;\n }\n // Error modal is rendered from the main client hookup\n // It may not have context hence the localization is handled here via localizedStrings props\n translate(key, fallback) {\n let context = this.context;\n if (context && context.loc) {\n return context.loc(key, fallback);\n } else if (this.props.localizedStrings) {\n let translated = this.props.localizedStrings[key];\n translated = translated ? translated : fallback ? fallback : key;\n return translated;\n }\n }\n renderImpl() {\n return /*#__PURE__*/ _jsx(\"div\", {\n role: \"dialog\",\n \"aria-label\": \"error is now open. something went wrong\",\n className: \"errorModalClass\",\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: \"prompContainer\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"toolBar\",\n children: /*#__PURE__*/ _jsx(\"button\", {\n id: \"cancelButton\",\n \"aria-label\": \"close\",\n className: \"cancel\",\n onClick: this.props.dismissModal,\n children: /*#__PURE__*/ _jsx(\"span\", {\n className: \"c-glyph\"\n })\n })\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"errorModal\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"contentHeader\",\n children: this.props.isEmbed ? this.translate('ERROR_Title_Embed', 'Sorry, an error occurred.') : this.translate('ERROR_Title', 'Something went wrong')\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"errorContent\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"errorMessage\",\n children: this.props.isEmbed ? this.translate('ERROR_Subtitle_Embed', 'Please try again.') : this.translate('ERROR_Subtitle', 'Go to the homepage to try that again.')\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"dismissErrorButton\",\n children: /*#__PURE__*/ _jsx(\"button\", {\n name: \"button\",\n className: \"c-button\",\n type: \"submit\",\n onClick: this.props.dismissModal,\n children: this.props.isEmbed ? this.translate('Dialog_Close', 'Close') : this.translate('ERROR_Link', 'Home')\n })\n })\n ]\n })\n ]\n })\n ]\n })\n });\n }\n constructor(props, context){\n super(props, context);\n }\n}\nErrorModal.contextTypes = {\n loc: PropTypes.func\n};\n","import * as React from 'react';\nlet { connect } = require('react-redux');\nimport { ErrorModal as ErrorModalComponent } from './../../components/modals/errorModal';\nexport const mapStateToProps = (state, ownProps)=>{\n return {\n localizedStrings: state.config.locStrings\n };\n};\nconst ErrorModal = connect(mapStateToProps)(ErrorModalComponent);\nexport default ErrorModal;\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport SpzaComponent from './../spzaComponent';\nimport Animation from '../animation';\nclass AnimationModal extends SpzaComponent {\n renderImpl() {\n return /*#__PURE__*/ _jsx(\"div\", {\n role: \"dialog\",\n \"aria-label\": \"animation is now open and playing\",\n className: \"animationModalClass\",\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: \"animationCanvas\",\n children: /*#__PURE__*/ _jsx(Animation, {\n isCircular: true\n })\n })\n });\n }\n}\nexport { AnimationModal as default };\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from './../spzaComponent';\nimport { Constants } from '../../utils/constants';\nclass DisclaimerModal extends SpzaComponent {\n renderImpl() {\n return /*#__PURE__*/ _jsx(\"div\", {\n role: \"dialog\",\n \"aria-label\": \"disclaimer is now open\",\n className: \"disclaimerModalClass\",\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: \"prompContainer\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"title\",\n children: this.props.payload.title\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"description\",\n children: this.props.payload.description\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"footer\",\n children: /*#__PURE__*/ _jsx(\"button\", {\n name: \"button\",\n className: \"c-button requestButton\",\n type: \"submit\",\n \"data-bi-id\": Constants.JsllCTAId.Continue,\n \"data-bi-area\": \"Disclaimer Dialog\",\n onClick: this.props.dismissModal,\n children: this.context.loc('Dialog_Continue')\n })\n })\n ]\n })\n });\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"context\", void 0);\n }\n}\nexport { DisclaimerModal as default };\nDisclaimerModal.contextTypes = {\n loc: PropTypes.func,\n renderErrorModal: PropTypes.func\n};\n","/* eslint-disable react/forbid-dom-props */ function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from './../spzaComponent';\nimport { NpsModule } from './../../utils/npsUtils';\nimport { Constants } from './../../utils/constants';\nimport { SpzaInstrumentService } from '../../services/telemetry/spza/spzaInstrument';\nimport { getWindow } from '../../services/window';\nimport { isEmailValid } from './../../utils/appUtils';\nimport { storeFeedback } from '@shared/services/feedback';\nimport { logger } from '@src/logger';\nimport classNames from 'classnames';\nclass NpsModal extends SpzaComponent {\n editDescription(e) {\n this.description = e.target ? e.target.value : '';\n this.setState({\n description: this.description,\n privacy: this.state.privacy,\n validEmailUI: this.state.validEmailUI,\n emailAddress: this.state.emailAddress\n });\n }\n handleRatingChange(ratingNumber) {\n this.setState({\n rating: ratingNumber,\n description: this.description,\n privacy: this.state.privacy,\n validEmailUI: this.state.validEmailUI,\n emailAddress: this.state.emailAddress\n });\n }\n decline() {\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.NPS,\n actionModifier: Constants.Telemetry.ActionModifier.Declined,\n details: ''\n };\n this.instrument.probe('logAndFlushTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n NpsModule.Declined();\n this.props.dismissModal();\n }\n handleSubmit() {\n if (!this.state.rating || this.state.privacy && !this.state.validEmailUI) {\n return this.decline();\n }\n const npsResult = {\n rating: this.state.rating,\n description: this.state.description,\n email: this.state.privacy ? this.state.emailAddress : ''\n };\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.NPS,\n actionModifier: Constants.Telemetry.ActionModifier.Info,\n details: JSON.stringify(npsResult),\n isFeedback: true\n };\n this.instrument.probe('logAndFlushTelemetryInfo', payload);\n storeFeedback({\n action: Constants.Telemetry.Action.NPS,\n actionModifier: Constants.Telemetry.ActionModifier.Info,\n details: JSON.stringify(npsResult)\n });\n NpsModule.Submitted();\n this.props.dismissModal();\n }\n onChangePrivacy() {\n this.setState({\n privacy: !this.state.privacy,\n validEmailUI: this.state.validEmailUI,\n emailAddress: this.state.emailAddress\n });\n }\n editEmail(e) {\n this.setState({\n privacy: this.state.privacy,\n validEmailUI: this.state.validEmailUI,\n emailAddress: e.target ? e.target.value : ''\n });\n if (this.state.privacy) {\n if (isEmailValid(this.state.emailAddress)) {\n this.setState({\n privacy: this.state.privacy,\n validEmailUI: true,\n emailAddress: e.target ? e.target.value : ''\n });\n } else {\n this.setState({\n privacy: this.state.privacy,\n validEmailUI: false,\n emailAddress: e.target ? e.target.value : ''\n });\n }\n }\n }\n handleNumberBtnKeyPress(evt, value) {\n evt = evt || window.event;\n // only the enter key can toggle the user profile button to show/hide dropdown menu\n if (evt.charCode === Constants.SystemKey.Enter) {\n this.handleRatingChange(value, evt);\n }\n evt.preventDefault();\n }\n ratingPane(self) {\n const paneContent = [];\n const arr = [\n '0',\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10'\n ];\n // eslint-disable-next-line array-callback-return\n arr.map((value)=>{\n const classes = classNames({\n ratingSelected: self.state.rating === value,\n ratingBlock: true,\n ratingTen: value === '10'\n });\n if (value === '0') {\n paneContent.push(/*#__PURE__*/ _jsx(\"li\", {\n className: classes,\n value: value.toString(),\n tabIndex: 0,\n onClick: ()=>this.handleRatingChange.bind(this)(value),\n onKeyPress: (event)=>{\n this.handleNumberBtnKeyPress(event, value);\n },\n children: /*#__PURE__*/ _jsx(\"a\", {\n className: \"ratingNumber\",\n children: value\n })\n }));\n } else {\n paneContent.push(/*#__PURE__*/ _jsx(\"li\", {\n className: classes,\n value: value.toString(),\n tabIndex: 0,\n onClick: ()=>this.handleRatingChange.bind(this)(value),\n onKeyPress: (event)=>{\n this.handleNumberBtnKeyPress(event, value);\n },\n children: /*#__PURE__*/ _jsx(\"a\", {\n className: \"ratingNumber\",\n children: value\n })\n }));\n }\n });\n return paneContent;\n }\n renderImpl() {\n const emailInputClasses = classNames({\n 'c-text-field': true,\n npsEmailInput: true,\n invalidEmailInput: this.state.privacy && !this.state.validEmailUI\n });\n return /*#__PURE__*/ _jsx(\"div\", {\n role: \"dialog\",\n \"aria-label\": \"nps is now open, tell us what you think\",\n className: \"npsModalClass\",\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: \"prompContainer\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"toolBar\",\n children: /*#__PURE__*/ _jsx(\"button\", {\n id: \"cancelButton\",\n \"aria-label\": \"close\",\n className: \"cancel\",\n onClick: this.decline.bind(this),\n children: /*#__PURE__*/ _jsx(\"span\", {\n className: \"c-glyph\"\n })\n })\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"npsModal\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"contentHeader\",\n children: this.context.loc('Feedback_Header')\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"rateHeader\",\n children: this.context.loc('NPS_RatingQuestion')\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"rateSlider\",\n children: [\n /*#__PURE__*/ _jsx(\"ul\", {\n className: \"ratingControl\",\n children: this.ratingPane(this)\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"ratingLabel\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"ratingLeftLabel\",\n children: this.context.loc('NPS_NotLikely', 'Not at all likely')\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"ratingRightLabel\",\n children: this.context.loc('NPS_Likely', 'Very likely')\n })\n ]\n })\n ]\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"rateReasonInput\",\n children: /*#__PURE__*/ _jsx(\"textarea\", {\n id: \"subscription\",\n className: \"c-text-field f-flex npsTextArea\",\n onChange: this.editDescription.bind(this),\n value: this.description,\n autoFocus: true,\n placeholder: `${this.context.loc('NPS_RatingReasonQuestion', 'Tell us more about your experience')}.\\n${this.context.loc('Specific_app_feedback')}`,\n name: \"default\"\n })\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"c-checkbox npsPrivacy\",\n children: /*#__PURE__*/ _jsxs(\"label\", {\n className: \"c-label privacyHeader\",\n children: [\n /*#__PURE__*/ _jsx(\"input\", {\n \"aria-label\": \"Control label (unselected)\",\n type: \"checkbox\",\n id: \"checkboxId1\",\n name: \"checkboxId1\",\n value: \"value1\",\n \"aria-checked\": \"false\",\n checked: this.state.privacy,\n onChange: this.onChangePrivacy.bind(this)\n }),\n /*#__PURE__*/ _jsxs(\"span\", {\n \"aria-hidden\": \"true\",\n children: [\n this.context.loc('Feedback_privacy_content'),\n /*#__PURE__*/ _jsx(\"a\", {\n target: \"_blank\",\n href: \"https://aka.ms/AppSourcePrivacyStatement\",\n rel: \"noreferrer\",\n className: \"c-hyperlink\",\n children: this.context.loc('Feedback_privacy')\n })\n ]\n })\n ]\n })\n }),\n /*#__PURE__*/ _jsx(\"input\", {\n className: emailInputClasses,\n type: \"text\",\n onChange: this.editEmail.bind(this),\n value: this.state.emailAddress,\n placeholder: this.props.emailAddress === 'no user' ? 'email address' : '',\n name: \"default\",\n disabled: !this.state.privacy\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"npsButton\",\n children: [\n !this.state.privacy || this.state.privacy && this.state.validEmailUI ? null : /*#__PURE__*/ _jsx(\"span\", {\n className: \"invalidEmailText\",\n children: this.context.loc('Feedback_invalidEmail')\n }),\n /*#__PURE__*/ _jsx(\"button\", {\n id: \"submit\",\n name: \"button\",\n disabled: this.state.privacy && !this.state.validEmailUI || this.state.rating === null,\n className: \"c-button submitButton\",\n type: \"submit\",\n onClick: this.handleSubmit.bind(this),\n children: this.context.loc('NPS_SubmitButton', 'Submit')\n })\n ]\n })\n ]\n })\n ]\n })\n });\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"context\", void 0), _define_property(this, \"description\", void 0), _define_property(this, \"instrument\", void 0);\n this.instrument = SpzaInstrumentService.getProvider();\n // if this poped-up, the timer is automatically delay a short\n // interval (two-hours).\n NpsModule.SetShortInterval();\n NpsModule.ResetNPSCount();\n this.description = '';\n this.state = {\n rating: null,\n description: '',\n privacy: false,\n validEmailUI: true,\n emailAddress: this.props.emailAddress !== 'no user' ? this.props.emailAddress : ''\n };\n }\n}\nexport { NpsModal as default };\nNpsModal.contextTypes = {\n loc: PropTypes.func,\n renderErrorModal: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { Text } from '@fluentui/react';\nimport instructionsImg1 from '@shared/images/power-bi-instructions-1.png';\nimport instructionsImg2 from '@shared/images/power-bi-instructions-2.png';\nimport instructionsImg3 from '@shared/images/power-bi-instructions-3.png';\nimport instructionsImg4 from '@shared/images/power-bi-instructions-4.png';\nconst InstructionsModalStep = ({ step, text, imageSrc })=>{\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"instructionsStep\",\n children: [\n /*#__PURE__*/ _jsx(\"img\", {\n className: \"instructionsImg\",\n src: imageSrc\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"instructionsStepText\",\n children: [\n /*#__PURE__*/ _jsxs(Text, {\n className: \"instructionsNumber\",\n children: [\n step,\n \". \"\n ]\n }),\n text\n ]\n })\n ]\n });\n};\nexport const InstructionsModalBody = ({ context })=>{\n const stepsMap = {\n stepOne: {\n text: /*#__PURE__*/ _jsx(Text, {\n children: context.loc('PowerBIVisual_Instructions_1')\n }, \"stepOne\"),\n image: instructionsImg1\n },\n stepTwo: {\n text: /*#__PURE__*/ _jsx(Text, {\n children: context.loc('PowerBIVisual_Instructions_2')\n }, \"stepTwo\"),\n image: instructionsImg2\n },\n stepThree: {\n text: /*#__PURE__*/ _jsx(\"span\", {\n dangerouslySetInnerHTML: {\n __html: context.locParams('PowerBIVisual_Instructions_3', [\n `<span class='instructionsOpen'>${context.loc('PowerBIVisual_Instructions_Open')}</span>`\n ])\n }\n }, \"stepThree\"),\n image: instructionsImg3\n },\n stepFour: {\n text: /*#__PURE__*/ _jsx(Text, {\n children: context.loc('PowerBIVisual_Instructions_4')\n }, \"stepFour\"),\n image: instructionsImg4\n }\n };\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"instructionsStepsContainer\",\n children: Object.keys(stepsMap).map((key, step)=>/*#__PURE__*/ _jsx(InstructionsModalStep, {\n step: step + 1,\n text: stepsMap[key].text,\n imageSrc: stepsMap[key].image\n }, key))\n });\n};\n","/* eslint-disable react/forbid-dom-props */ import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { Checkbox, IconButton, Modal, PrimaryButton, Text } from '@fluentui/react';\nimport { useBoolean } from '@fluentui/react-hooks';\nimport { InstructionsModalBody } from './instructionsModalBody';\nimport { Constants } from '@shared/utils/constants';\nimport { saveLocalStorageItem } from '@shared/utils/browserStorageUtils';\nimport { getNpsModule } from '@appsource/utils/nps';\nconst cancelIcon = {\n iconName: 'Cancel'\n};\nexport const InstructionsModal = ({ context, isFromDownload, dismissModal })=>{\n const [isModalOpen, { setFalse: hideModal }] = useBoolean(true);\n const [isChecked, setIsChecked] = React.useState(false);\n const closeModal = ()=>{\n var _getNpsModule;\n if (isFromDownload && isChecked) {\n saveLocalStorageItem(Constants.LocalStorage.dontShowInstructions, true);\n }\n hideModal();\n dismissModal();\n (_getNpsModule = getNpsModule()) === null || _getNpsModule === void 0 ? void 0 : _getNpsModule.ctaClicked();\n };\n return /*#__PURE__*/ _jsx(Modal, {\n containerClassName: \"instructionsModalContainer\",\n isOpen: isModalOpen,\n onDismiss: closeModal,\n children: /*#__PURE__*/ _jsxs(\"div\", {\n role: \"dialog\",\n \"aria-label\": \"instructionsModal\",\n className: \"instructionsModalClass\",\n children: [\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"toolBar\",\n children: [\n /*#__PURE__*/ _jsx(Text, {\n className: \"instructionsHeader\",\n children: context.loc('PowerBIVisual_Instructions_Header')\n }),\n /*#__PURE__*/ _jsx(IconButton, {\n \"aria-label\": \"close\",\n className: \"cancel\",\n iconProps: cancelIcon,\n onClick: closeModal\n })\n ]\n }),\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"instructionsText\",\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML: {\n __html: context.locParams('PowerBIVisual_Instructions_Intro', [\n `<a class='c-hyperlink' rel='noreferrer' target='_blank' href=${Constants.PowerBIVisualInstructionsUrl}>${context.loc('PowerBIVisual_Instructions')}</a>`\n ])\n }\n }),\n /*#__PURE__*/ _jsx(InstructionsModalBody, {\n context: context\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"instructionsFooter\",\n children: [\n isFromDownload && /*#__PURE__*/ _jsx(Checkbox, {\n className: \"instructionsCheckbox\",\n label: context.loc('Dialog_Dont_Show_Again'),\n checked: isChecked,\n onChange: ()=>setIsChecked(!isChecked)\n }),\n /*#__PURE__*/ _jsx(PrimaryButton, {\n name: \"button\",\n type: \"submit\",\n onClick: closeModal,\n children: context.loc('Dialog_Close')\n })\n ]\n })\n ]\n })\n });\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { Dialog, DialogFooter, PrimaryButton } from '@fluentui/react';\nconst dialogContentStyles = {\n subText: {\n whiteSpace: 'pre-line'\n }\n};\nconst dialogContentProps = (context)=>{\n return {\n title: context.loc('PowerBIVisual_DownloadSampleModal_Header'),\n subText: [\n context.loc('PowerBIVisual_DownloadSampleModal_Body_1'),\n context.loc('PowerBIVisual_DownloadSampleModal_Body_2')\n ].join('\\n'),\n showCloseButton: true,\n styles: dialogContentStyles\n };\n};\nexport const DownloadSampleModal = ({ context, dismissModal })=>{\n return /*#__PURE__*/ _jsx(Dialog, {\n hidden: false,\n dialogContentProps: dialogContentProps(context),\n onDismiss: dismissModal,\n maxWidth: 560,\n children: /*#__PURE__*/ _jsx(DialogFooter, {\n children: /*#__PURE__*/ _jsx(PrimaryButton, {\n text: context.loc('Common_Ok'),\n name: \"button\",\n type: \"submit\",\n onClick: dismissModal\n })\n })\n });\n};\n","import { createStore, applyMiddleware } from 'redux';\nimport { composeWithDevTools } from 'redux-devtools-extension/developmentOnly';\nexport function buildStore({ combinedReducers, initialState, middleware = [] }) {\n return createStore(combinedReducers, initialState, composeWithDevTools({})(applyMiddleware(...middleware)));\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { isType, SearchboxInputChangedAction, LiveSearchboxFilterAction, SearchSortingOptionChangedAction, FilteredSearchResultsReceivedAction, PartnerSearchResultsReceivedAction, ShowingResultsForReceviedAction, SearchSuggestionsRequestId } from '@shared/actions/actions';\nimport { initialSearchState, copyState } from '@src/State';\nexport default function searchReducer(state = initialSearchState, action) {\n const newState = copyState(state);\n if (isType(action, SearchboxInputChangedAction)) {\n // search box is being searched\n newState.searchText = action.payload.searchString;\n // leave the search results be, since they will be updated when new search results come in\n // however, when the dropdown is emptied out, clear the results.\n if (newState.searchText.length === 0) {\n newState.appSearchResults = [];\n newState.servicesSearchResults = [];\n newState.ecaSearchResults = [];\n }\n // make sure we only react to the latest request\n newState.searchIdCurrentlyOngoing = state.searchIdCurrentlyOngoing + 1;\n } else if (isType(action, LiveSearchboxFilterAction)) {\n newState.searchText = action.payload.searchText;\n } else if (isType(action, FilteredSearchResultsReceivedAction)) {\n if (newState.searchIdCurrentlyOngoing !== action.payload.searchid) {\n return state;\n } else {\n const { appSearchResults, servicesSearchResults, cloudsIndustrySearchResults, appsCount, servicesCount, cloudsIndustryCount, requestId } = action.payload;\n return _object_spread_props(_object_spread({}, newState), {\n filteredAppSearchResults: appSearchResults,\n filteredServicesSearchResults: servicesSearchResults,\n filteredCloudsIndustrySearchResults: cloudsIndustrySearchResults,\n appsCount,\n servicesCount,\n cloudsIndustryCount,\n requestId\n });\n }\n } else if (isType(action, PartnerSearchResultsReceivedAction)) {\n newState.partnerSearchResults = action.payload.partnerSearchResults;\n } else if (isType(action, ShowingResultsForReceviedAction)) {\n const { previousSearchText = '', showingResultsFor = '' } = action.payload;\n return _object_spread_props(_object_spread({}, newState), {\n showingResultsFor,\n previousSearchText,\n searchText: previousSearchText\n });\n } else if (isType(action, SearchSortingOptionChangedAction)) {\n newState.searchSortingOption = action.payload.searchSortingOption;\n } else if (isType(action, SearchSuggestionsRequestId)) {\n newState.suggestionsRequestId = action.payload.suggestionsRequestId;\n } else {\n return state;\n }\n return newState;\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nimport { isType, ModalAction, VideoModalAction, RatingAction, DriveModalAction, IFieldHubModalAction, IDisclaimerModalAction, MediaModalAction, InstructionsModalAction, EntityReviewCommentModalAction, EntityReviewMarkAsHelpfulModalAction } from './../actions/actions';\nimport { initialModalState, copyState } from './../../State';\nimport { Constants } from '../utils/constants';\nexport default function modalReducer(state = initialModalState, action) {\n const newState = copyState(state);\n if (isType(action, ModalAction)) {\n newState.showModal = action.payload.showModal;\n newState.entityId = action.payload.entityId ? action.payload.entityId : '';\n newState.modalId = action.payload.modalId ? action.payload.modalId : Constants.ModalType.NoModalShow;\n newState.options = action.payload.options;\n newState.entityType = action.payload.entityType;\n newState.onModalDismiss = action.payload.onModalDismiss;\n newState.disableDismissModal = action.payload.disableDismissModal;\n newState.isOpenedFromPDP = action.payload.isOpenedFromPDP;\n newState.payload = null;\n } else if (isType(action, VideoModalAction)) {\n newState.showModal = action.payload.showModal;\n newState.modalId = Constants.ModalType.Video;\n const videoPayload = {\n videoLink: action.payload.videoUrl,\n thumbnailURL: action.payload.videoThumbnail,\n videoName: action.payload.videoName\n };\n newState.payload = videoPayload;\n } else if (isType(action, MediaModalAction)) {\n newState.showModal = action.payload.showModal;\n newState.modalId = Constants.ModalType.MediaModal;\n newState.payload = action.payload.payload;\n } else if (isType(action, DriveModalAction)) {\n newState.showModal = action.payload.showModal;\n newState.modalId = Constants.ModalType.Drive;\n const drivePayload = {\n urlLink: action.payload.driveUrl\n };\n newState.payload = drivePayload;\n } else if (isType(action, IFieldHubModalAction)) {\n newState.showModal = action.payload.showModal;\n newState.modalId = Constants.ModalType.Iframe;\n const iframePayload = {\n reportName: action.payload.reportName\n };\n newState.payload = iframePayload;\n } else if (isType(action, IDisclaimerModalAction)) {\n newState.showModal = action.payload.showModal;\n newState.modalId = Constants.ModalType.Disclaimer;\n const payload = {\n title: action.payload.title,\n description: action.payload.description\n };\n newState.payload = payload;\n } else if (isType(action, RatingAction)) {\n newState.showModal = action.payload.showModal;\n newState.modalId = Constants.ModalType.Rating;\n const reviewPayload = {\n showModal: true,\n app: action.payload.app,\n accessKey: action.payload.accessKey,\n ctaType: action.payload.ctaType,\n callback: action.payload.callback\n };\n newState.payload = reviewPayload;\n } else if (isType(action, EntityReviewCommentModalAction)) {\n newState.showModal = action.payload.showModal;\n newState.modalId = Constants.ModalType.ReviewComment;\n newState.payload = _object_spread({}, action.payload);\n } else if (isType(action, EntityReviewMarkAsHelpfulModalAction)) {\n newState.showModal = action.payload.showModal;\n newState.modalId = Constants.ModalType.ReviewMarkAsHelpful;\n newState.payload = _object_spread({}, action.payload);\n } else if (isType(action, InstructionsModalAction)) {\n newState.modalId = Constants.ModalType.Instructions;\n newState.showModal = action.payload.showModal;\n const instructionsPayload = {\n isFromDownload: action.payload.isFromDownload\n };\n newState.payload = instructionsPayload;\n } else {\n return state;\n }\n return newState;\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { updateMatchFunctions } from 'utils/filterHelpers';\nimport { getEntityRegistration } from 'utils/entityRegistration';\nimport { DataMap } from '@shared/utils/dataMapping';\nimport { isType, EntityDataReceivedAction, CuratedDataReceivedAction, SearchDataReceivedAction, EntityDetailsReceivedAction, RehydrateClientStateAction, SearchQueryChangedAction, DataMapReceivedAction, SuggestedChangeAction, LoadFavouriteDataStateAction, RelatedAppsItemsReceivedAction, RelatedAppsItemsLoadingAction, SetEntityIdLoadingAction, SetEntityIdFailedAction, GetAppReviewsAction, EntityFullDataReceivedAction } from '@shared/actions/actions';\nimport { TileDataReceivedAction, TileDataLoadingAction } from '@shared/actions/tileDataActions';\nimport { initialEntityDataState, copyState, deepCopyDataMap } from '@src/State';\nimport { Constants } from '@shared/utils/constants';\nimport { PricingStates } from '@shared/Models';\nimport { generateHashMap } from '@shared/utils/hashMapUtils';\nimport { performFilter } from '@shared/utils/filterModule';\nimport { AzureEnvironmentSettings } from '@shared/AzureEnvironmentSettings';\nfunction preserveData(oldEntity, newEntity) {\n if (!oldEntity || !newEntity) {\n return;\n }\n function preserveDataHelper(data) {\n if (oldEntity[`${data}`] || Object.prototype.hasOwnProperty.call(oldEntity, data) && !newEntity[`${data}`]) {\n newEntity[`${data}`] = oldEntity[`${data}`];\n }\n }\n // preserve all the data that was already present\n // that way, we do not get flicker when loading data\n const dataList = Object.keys(oldEntity);\n dataList.forEach((data)=>{\n preserveDataHelper(data);\n });\n}\nexport function buildFullSearchData(ids, sourceData, hashMap, identifier) {\n const tempArray = [];\n if (ids.length > 0) {\n // we care about showing the top 5 percent, which means that we will take the first result (highest score) and\n // ignore everyone that is lower that 5% of that\n const cutoff = ids[0]['@search.score'] * 0.05;\n ids.forEach(function(id) {\n if (id['@search.score'] > cutoff) {\n const index = hashMap[id[`${identifier}`].toString().toLowerCase()];\n // make sure we actually understand the app\n if (index >= 0) {\n tempArray.push(sourceData[`${index}`]);\n }\n }\n });\n }\n return tempArray;\n}\nfunction isServiceDataState(state) {\n return state.selectedCountry;\n}\nfunction isSelectedCountryValidDataMap(dataMap, selectedCountry) {\n var _dataMap_serviceGlobalFilter1_country, _dataMap_serviceGlobalFilter1;\n // If countries not defined in data map yet, assume it is valid country selection.\n if (!(dataMap === null || dataMap === void 0 ? void 0 : (_dataMap_serviceGlobalFilter1 = dataMap.serviceGlobalFilter1) === null || _dataMap_serviceGlobalFilter1 === void 0 ? void 0 : (_dataMap_serviceGlobalFilter1_country = _dataMap_serviceGlobalFilter1.country) === null || _dataMap_serviceGlobalFilter1_country === void 0 ? void 0 : _dataMap_serviceGlobalFilter1_country.subCategoryDataMapping) || Object.keys(dataMap.serviceGlobalFilter1.country.subCategoryDataMapping).length === 0) {\n return true;\n }\n // Make sure country in data map.\n const countries = dataMap.serviceGlobalFilter1.country.subCategoryDataMapping;\n return Object.keys(countries).some((countryKey)=>countries[`${countryKey}`].BackendKey === selectedCountry);\n}\nexport function commonEntityDataReducer(entityType, state = initialEntityDataState, action) {\n if (action.payload && action.payload.entityType && action.payload.entityType !== entityType) {\n return state;\n }\n let newState = copyState(state);\n if (isType(action, EntityDataReceivedAction)) {\n // we have received filter data from the backend\n if (!state.dataLoaded[action.payload.userSegment]) {\n updateMatchFunctions(DataMap);\n newState.dataList = action.payload.dataList;\n newState.count = action.payload.count;\n const dataMap = deepCopyDataMap(state.dataMap);\n const results = performFilter(null, action.payload.urlQuery, [], dataMap, false, false);\n newState.activeFilters = results.activeFilters;\n newState.dataMap = dataMap;\n if (state.dataList && state.dataList.length > 0) {\n state.dataList.forEach((entity)=>{\n const index = newState.idMap[entity.entityId];\n if (index >= 0) {\n // preserve already fetched data that are not part of the tile data\n // i.e. detail information and pricing\n preserveData(entity, newState.dataList[`${index}`]);\n }\n });\n }\n newState.idMap = generateHashMap(newState.dataList, [\n 'entityId'\n ]);\n newState.dataLoaded = copyState(state.dataLoaded);\n newState.dataLoaded[action.payload.userSegment] = true;\n }\n } else if (isType(action, RehydrateClientStateAction)) {\n updateMatchFunctions(DataMap);\n const dataMap = deepCopyDataMap(state.dataMap);\n updateMatchFunctions(dataMap);\n newState.dataMap = dataMap;\n newState.idMap = generateHashMap(state.dataList, [\n 'entityId'\n ]);\n } else if (isType(action, LoadFavouriteDataStateAction)) {\n let favouriteItems;\n if (entityType === Constants.EntityType.Service) {\n favouriteItems = action.payload.userFavouriteState.services;\n } else if (entityType === Constants.EntityType.App) {\n favouriteItems = action.payload.userFavouriteState.apps;\n }\n if (favouriteItems) {\n const items = favouriteItems.map((favouriteItem)=>favouriteItem.item).filter((item)=>!!item && !!item.entityId && !(item.entityId.toLowerCase() in newState.idMap));\n newState.dataList = [\n ...newState.dataList,\n ...items\n ];\n newState.idMap = generateHashMap(newState.dataList, [\n 'entityId'\n ]);\n }\n } else if (isType(action, SuggestedChangeAction)) {\n const entityId = action.payload.item.entityId && action.payload.item.entityId.toString().toLowerCase();\n const appIndex = state.idMap[`${entityId}`];\n if (!(appIndex >= 0)) {\n newState.dataList = [\n ...newState.dataList,\n action.payload.item\n ];\n newState.idMap = generateHashMap(newState.dataList, [\n 'entityId'\n ]);\n }\n } else if (isType(action, DataMapReceivedAction)) {\n const dataMap = deepCopyDataMap(action.payload.dataMap);\n updateMatchFunctions(dataMap);\n newState.dataMap = dataMap;\n newState.dataMapLoaded = true;\n } else if (isType(action, TileDataLoadingAction)) {\n const dataMap = deepCopyDataMap(state.dataMap);\n const results = performFilter(null, action.payload.urlQuery, [], dataMap, false, false);\n newState.dataMap = dataMap;\n newState.activeFilters = results.activeFilters;\n } else if (isType(action, TileDataReceivedAction)) {\n if (state.dataList) {\n newState = _object_spread({}, newState, action.payload.entityData);\n newState.tileDataRequestId = action.payload.requestId;\n let currentEntityDetail = null;\n // If there is only one item in appData, it means the app detail is loaded at server side.\n // So when appData is loaded with this lazy loaded tile data, we need to make sure the original appData item\n // with detail data is still preserved.\n if (state.dataList.length === 1) {\n currentEntityDetail = state.dataList[0];\n }\n for(let i = 0, len = newState.dataList.length; i < len; i++){\n var _state_dataMap;\n const entityId = newState.dataList[`${i}`] && newState.dataList[`${i}`].entityId && newState.dataList[`${i}`].entityId.toLowerCase();\n if (currentEntityDetail && newState.dataList[`${i}`] && newState.dataList[`${i}`].entityId === currentEntityDetail.entityId) {\n newState.dataList[`${i}`] = currentEntityDetail;\n }\n // preserve already fetched data that are not part of the tile data\n // i.e. detail information and pricing\n const indexInOldState = (_state_dataMap = state.dataMap) === null || _state_dataMap === void 0 ? void 0 : _state_dataMap[`${entityId}`];\n // this is not a guaranteed 1to1 list\n // => so make sure that we have the new app in the old list\n if (indexInOldState >= 0) {\n preserveData(state.dataList[`${indexInOldState}`], newState.dataList[`${i}`]);\n }\n }\n // Services can have completely diff filters than apps hence\n // update the map again based on the services data list to dynamically light up services filters\n if (action.payload.entityType === Constants.EntityType.Service) {\n updateMatchFunctions(DataMap);\n }\n const dataMap = deepCopyDataMap(state.dataMap);\n const results = performFilter(null, action.payload.urlQuery, [], dataMap, false, false);\n newState.activeFilters = results.activeFilters;\n newState.dataMap = dataMap;\n newState.idMap = generateHashMap(newState.dataList, [\n 'entityId'\n ]);\n if (action.payload.entityType === Constants.EntityType.App) {\n newState.pricingPayload = state.pricingPayload;\n }\n if (isServiceDataState(state) && isServiceDataState(newState)) {\n if (isSelectedCountryValidDataMap(newState.dataMap, state.selectedCountry)) {\n newState.selectedCountry = state.selectedCountry;\n } else {\n newState.selectedCountry = AzureEnvironmentSettings.defaultCountryCode.toUpperCase();\n }\n newState.selectedRegion = state.selectedRegion;\n }\n }\n } else if (isType(action, SetEntityIdLoadingAction)) {\n newState.entityIdLoading = action.payload.entityId;\n } else if (isType(action, SetEntityIdFailedAction)) {\n newState.entityIdFailed = action.payload.entityId;\n } else if (isType(action, RelatedAppsItemsLoadingAction)) {\n newState.relatedAppsItems = {\n entityId: action.payload.entityId,\n items: {\n saasLinkingItems: [],\n suggestedItems: [],\n linkedAddIns: []\n }\n };\n } else if (isType(action, RelatedAppsItemsReceivedAction)) {\n newState.relatedAppsItems = {\n entityId: action.payload.entityId,\n items: action.payload.relatedAppsItems\n };\n } else if (isType(action, GetAppReviewsAction)) {\n const { markedAsHelpful: prevMarkAsHelpful } = newState.appReviewsData;\n newState.appReviewsData = _object_spread_props(_object_spread({}, newState.appReviewsData), {\n entityId: action.payload.entityId,\n reviews: action.payload.reviews,\n isPurchased: action.payload.isPurchased,\n userReview: action.payload.userReview,\n markedAsHelpful: _object_spread({}, prevMarkAsHelpful)\n });\n } else if (isType(action, EntityDetailsReceivedAction)) {\n let index = -1;\n // valid error situation: we got back no appdetails\n if (action.payload.entityDetails) {\n index = state.idMap[action.payload.entityDetails.entityId.toString().toLowerCase()];\n const startingPrice = action.payload.entityDetails.startingPrice;\n if (startingPrice) {\n if (!startingPrice.pricingData) {\n startingPrice.pricingData = PricingStates.NoPricingData;\n }\n } else {\n action.payload.entityDetails.startingPrice = {\n pricingData: PricingStates.Loading\n };\n }\n }\n if (index >= 0) {\n let newData = null;\n // we will now deal with app detail information not loading\n if (action.payload.entityDetails === null) {\n // todo: Object.assign({}, state.appData[`${index}`]); cannot work or we need to polyfill it\n newData = JSON.parse(JSON.stringify(state.dataList[`${index}`]));\n newData.detailLoadFailed = true;\n } else {\n // find the app to replace\n newData = action.payload.entityDetails;\n // Here we need to preserve the starting price and pricing information since we may get app data again from raw data cache which doesn't contain price data.\n // If we don't reserve starting price and pricing information retreived earlier at client side, the they will be lost in the new data.\n preserveData(state.dataList[`${index}`], newData);\n if (newData.startingPrice && newData.startingPrice.pricingBitmask) {\n // make sure we create/append the global filters bitmask to the app data\n Object.keys(newData.startingPrice.pricingBitmask).forEach((key)=>{\n // if the bitmask has not been created yet\n // let's create it and set it to 0\n if (!newData[`${key}`]) {\n newData[`${key}`] = 0;\n }\n newData[`${key}`] |= newData.startingPrice.pricingBitmask[`${key}`];\n });\n }\n }\n const newDataList = state.dataList.slice(0, index).concat(newData).concat(state.dataList.slice(index + 1));\n newState.dataList = newDataList;\n } else {\n var _action_payload_entityDetails_detailInformation, _action_payload_entityDetails;\n // This will be called only once when there is no appdata in the server cache.\n // This called when app details page is the landing page and it is the first page to be rendered by the server.\n // If we open home page before the app details page is opened, then the appdata is populated into the cache.\n newState.dataList = [\n ...newState.dataList,\n action.payload.entityDetails\n ];\n newState.idMap = generateHashMap(newState.dataList, [\n 'entityId'\n ]);\n if (Object.prototype.hasOwnProperty.call(newState, 'selectedCountry') && ((_action_payload_entityDetails = action.payload.entityDetails) === null || _action_payload_entityDetails === void 0 ? void 0 : (_action_payload_entityDetails_detailInformation = _action_payload_entityDetails.detailInformation) === null || _action_payload_entityDetails_detailInformation === void 0 ? void 0 : _action_payload_entityDetails_detailInformation.countryRegion)) {\n newState.selectedCountry = action.payload.entityDetails.detailInformation.countryRegion;\n }\n }\n } else if (isType(action, CuratedDataReceivedAction)) {\n // we have received curated data from the backend\n if (!state.curatedDataLoaded[action.payload.userSegment]) {\n newState.curatedData = action.payload.curatedData;\n const newCuratedDataLoadedState = copyState(state.curatedDataLoaded);\n newCuratedDataLoadedState[action.payload.userSegment] = true;\n newState.curatedDataLoaded = newCuratedDataLoadedState;\n }\n } else if (isType(action, EntityFullDataReceivedAction)) {\n let index = -1;\n if (action.payload.entityDetails) {\n index = state.idMap[action.payload.entityDetails.entityId.toString().toLowerCase()];\n }\n if (index >= 0) {\n const newData = action.payload.entityDetails;\n const newDataList = [\n ...state.dataList\n ];\n newDataList.splice(index, 1, newData);\n newState.dataList = newDataList;\n } else {\n newState.dataList = [\n ...newState.dataList,\n action.payload.entityDetails\n ];\n newState.idMap = generateHashMap(newState.dataList, [\n 'entityId'\n ]);\n }\n } else if (isType(action, SearchQueryChangedAction)) {\n newState.subsetSearchQuery = action.payload.performedQuery;\n } else if (isType(action, SearchDataReceivedAction)) {\n newState.subsetData = [];\n newState.subsetSearchQuery = action.payload.performedQuery;\n const dataList = action.payload.entityIdData;\n if (dataList.length <= 0 || !state.dataLoaded) {\n return newState;\n }\n newState.subsetData = buildFullSearchData(dataList, state.dataList, state.idMap, getEntityRegistration(entityType).identifier);\n } else {\n return state;\n }\n return newState;\n}\n","import { Constants } from '../../shared/utils/constants';\nimport { DataMap } from '../../shared/utils/dataMapping';\nconst findItem = (arr, callback)=>{\n for (const item of arr){\n if (callback(item)) {\n return item;\n }\n }\n return null;\n};\n// TODO: follow up with Jamie Warner's team to figure out how they can add this to their list\nconst appIdsToIgnore = [\n '89230731-57f8-48c1-9f19-4307de3b7dbd',\n 'dc0bfbad-9508-40b3-bff7-fd86639bea78',\n 'b019fa14-15cf-4baf-bc0f-0b4b07b2a2dc',\n '09ea17d2-a321-4021-94b9-bb8949fd19b7',\n '0d2d1835-934a-486d-b712-b898e02a4353',\n '4f1864d0-5c45-49e9-a721-8bf017e6d905',\n 'e334cc9e-62f7-41b0-8e7f-6e1306541c8e',\n '835677b9-83ed-493f-ae58-da107b750344'\n];\nconst parsePBIApp = (app, index)=>{\n let iconURL = app.iconUrl;\n let largeIcon = app.iconUrl;\n // One of the items in the 'images' array has key 'main' -- this is the large icon\n if (app.images) {\n let mainIndex = -1;\n for(let i = 0, len = app.images.length; i < len; i++){\n const img = app.images[`${i}`];\n if (img.key === 'main') {\n largeIcon = img.url;\n mainIndex = i;\n } else {\n img.ImageName = img.key;\n img.ImageUri = img.url;\n delete img.key;\n delete img.url;\n }\n }\n if (mainIndex !== -1) {\n app.images.splice(mainIndex, 1);\n }\n }\n if (!iconURL || iconURL.charAt(iconURL.length - 1) === '/') {\n iconURL = '/images/defaultIcon.png';\n }\n if (!largeIcon) {\n largeIcon = '/images/defaultIcon.png';\n }\n // More PBI fields: emailAddress, description, images, learnMoreUrl,\n // publishTime, version\n let details = null;\n if (app.additionalMetadata) {\n try {\n details = JSON.parse(app.additionalMetadata);\n if (details) {\n const industryNumbers = [];\n for (const industry of details.industries){\n for(const industryMap in DataMap.industries){\n if (DataMap.industries[`${industryMap}`].Title === industry) {\n industryNumbers.push(DataMap.industries[`${industryMap}`].FilterID);\n break;\n }\n }\n }\n if (industryNumbers.length > 0) {\n details.industries = industryNumbers;\n }\n // convert the collateralDocuments format =(\n if (details.collateralDocuments) {\n for(let i = 0, len = details.collateralDocuments.length; i < len; i++){\n const doc = details.collateralDocuments[`${i}`];\n doc.DocumentName = doc.documentName;\n doc.DocumentUri = doc.documentUrl;\n delete doc.documentName;\n delete doc.documentUrl;\n }\n }\n }\n } catch (e) {\n details = null;\n }\n }\n const detailInformation = {\n // if there is no short description -- use the description field only for shortDescription\n // this is to prevent a duplicated despcription from showing on the detail page\n Description: app.shortDescription ? app.description : null,\n LargeIconUri: largeIcon,\n Subcategories: [],\n Keywords: details && details.keyWords ? details.keyWords : [],\n HelpLink: app.learnMoreUrl,\n SupportLink: null,\n Images: app.images,\n DemoVideos: [],\n CollateralDocuments: details && details.collateralDocuments ? details.collateralDocuments : null,\n AdditionalPurchasesRequired: false,\n Countries: [],\n LanguagesSupported: [],\n AppVersion: app.version,\n PrivacyPolicyUrl: details && details.privacyPolicyUrl ? details.privacyPolicyUrl : null,\n PlatformVersion: null,\n ReleaseDate: details && details.releaseDate ? details.releaseDate : app.publishTime\n };\n let friendlyURL = null;\n if (app.url) {\n const nameStart = app.url.lastIndexOf('/') + 1;\n if (nameStart <= app.url.length) {\n friendlyURL = app.url.substr(nameStart).toLowerCase();\n }\n }\n const productMask = {\n [DataMap.products.PowerBI.FilterGroup]: DataMap.products.PowerBI.FilterID\n };\n const appDataItem = {\n index,\n entityId: app.applicationId,\n title: app.applicationName,\n publisher: app.publishedBy,\n shortDescription: app.shortDescription ? app.shortDescription : app.description,\n builtFor: 'Power BI',\n iconURL,\n actionString: Constants.ActionStrings.Get,\n ctaTypes: [\n Constants.CTAType.Get\n ],\n primaryProduct: productMask,\n products: productMask,\n industries: details && details.industries ? details.industries : 0,\n categories: details && details.categories ? details.categories : 0,\n handoffURL: app.url,\n privateApp: app.category === 'private',\n ranking: app.ranking,\n friendlyURL,\n licenseTermsUrl: details && details.licenseTermsUrl ? details.licenseTermsUrl : '',\n detailInformation,\n filtermatch: true,\n detailLoadFailed: false\n };\n return appDataItem;\n};\nexport const parsePBIApps = (appData)=>{\n const appList = [];\n for(let i = 0; i < appData.length; i++){\n const match = findItem(appIdsToIgnore, (appid)=>{\n return appid === appData[`${i}`].applicationId;\n });\n if (match) {\n continue;\n }\n // only get org apps\n const pbiCategory = appData[`${i}`].PBIContentProviderCategory;\n if (pbiCategory !== 1 && pbiCategory !== 3) {\n appList.push(parsePBIApp(appData[`${i}`], i));\n }\n }\n return appList;\n};\n","import { Constants } from '../../shared/utils/constants';\nimport { DataMap } from '../../shared/utils/dataMapping';\nimport { getProductByUrlKey } from '@shared/utils/appUtils';\nconst convertPartnerDocument = (d)=>({\n DocumentName: d.documentName,\n DocumentUri: d.documentUri\n });\nconst convertPartnerImage = (i)=>({\n ImageName: i.imageName,\n ImageUri: i.imageUri\n });\nconst convertPartnerVideo = (v)=>({\n ThumbnailURL: v.thumbnailUrl,\n VideoLink: v.videoLink,\n VideoName: v.videoName\n });\nfunction attemptMap(a, f) {\n if (a) {\n return a.map(f);\n } else {\n return [];\n }\n}\nexport const parsePartnerApp = (app, product)=>{\n let detailInformation = null;\n if (app.details) {\n const d = app.details;\n detailInformation = {\n AdditionalPurchasesRequired: d.additionalPurchasesRequired,\n AppVersion: d.appVersion,\n CollateralDocuments: attemptMap(d.collateralDocuments, convertPartnerDocument),\n Countries: d.countries,\n DemoVideos: attemptMap(d.demoVideos, convertPartnerVideo),\n Description: d.description,\n HelpLink: d.helpLink,\n Images: attemptMap(d.images, convertPartnerImage),\n Keywords: d.keywords,\n LanguagesSupported: d.languagesSupported,\n LargeIconUri: d.largeIconUri,\n PlatformVersion: d.platformVersion,\n PrivacyPolicyUrl: d.privacyPolicyUrl,\n ReleaseDate: d.releaseDate,\n Subcategories: d.subCategories,\n SupportLink: d.supportLink\n };\n }\n let builtFor = '';\n let productMask;\n const productInfo = getProductByUrlKey({\n urlKey: product\n });\n if (productInfo === null || productInfo === void 0 ? void 0 : productInfo.UrlKey) {\n builtFor = productInfo.LongTitle;\n productMask = {\n [productInfo.FilterGroup]: productInfo.FilterID\n };\n }\n const appDataItem = {\n entityId: app.applicationId,\n title: app.title,\n publisher: app.publisher,\n shortDescription: app.shortDescription,\n builtFor,\n iconURL: app.smallIconUri,\n iconBackgroundColor: app.iconBackgroundColor,\n actionString: Constants.ActionStrings.Get,\n ctaTypes: [\n Constants.CTAType.Get\n ],\n primaryProduct: productMask,\n privateApp: app.privateApp,\n products: app.products ? app.products : productMask,\n industries: app.industries ? app.industries : 0,\n categories: app.categories ? app.categories : 0,\n handoffURL: app.handOffURL,\n leadgenEnabled: app.enableLeadSharing,\n licenseTermsUrl: app.licenseTermsUrl,\n detailInformation,\n filtermatch: true,\n detailLoadFailed: false\n };\n return appDataItem;\n};\nexport const parsePartnerApps = (appData, embedHost)=>{\n let product = embedHost;\n if (embedHost === DataMap.products.Dynamics365.UrlKey) {\n product = DataMap.products.PowerApps.UrlKey;\n }\n const appList = appData.map((a)=>parsePartnerApp(a, product));\n // TODO: sort?\n // PowerBI Apps are wanting to be sorted alphabetically\n /* appList = appList.sort((a: IAppDataItem, b: IAppDataItem) => {\n let aTitle = a.title.toLowerCase();\n let bTitle = b.title.toLowerCase();\n return aTitle > bTitle ? 1 : ( aTitle < bTitle ? -1 : 0 );\n }); */ return appList;\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _object_without_properties(source, excluded) {\n if (source == null) return {};\n var target = _object_without_properties_loose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for(i = 0; i < sourceSymbolKeys.length; i++){\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\nfunction _object_without_properties_loose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for(i = 0; i < sourceKeys.length; i++){\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nfunction _to_primitive(input, hint) {\n if (_type_of(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_type_of(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nfunction _to_property_key(arg) {\n var key = _to_primitive(arg, \"string\");\n return _type_of(key) === \"symbol\" ? key : String(key);\n}\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nimport { isType, PartnerAppDataReceivedAction, PowerBIDataReceivedAction, AppsPricingDataReceivedAction, AppDetailPricingReceivedAction, RelatedAppsItemsPricingDataReceivedAction, AppPricingDataReceivedAction, EntityReviewCommentsReceivedAction, EntityReviewCommentsCleanupAction, EntityReviewCommentDeleteResult, EntityReviewCommentUpdateResult, EntityReviewCommentsLoadingAction, EntityReviewCommentsInitializeStateAction, EntityReviewCommentsUpdateTotalCommentCountAction, EntityReviewCommentCreateResult, EntityReviewCommentsUnloadPagesAction, EntityMarkedAsHelpfulReviewUpdateListAction, EntityLinkedInProductGroupUpdateAction, EntityReviewSetIsHelpfulAction, EntityReviewSetMarkAsHelpfulCount, EntityReviewSetIsHelpfulLoadingAction, SetRecommenededSizes, LoadingRecommenededSizes, EntityUserCommentedReviewIdsUpdateListAction, RecommendedWhatsNewAppsReceivedAction, RecommendedTrendingAppsReceivedAction, RecommendedAppsItemsPricingDataReceivedAction, RecommendedMicrosoft365WhatsNewAppsReceivedAction, RecommendedMicrosoft365TrendingAppsReceivedAction } from '@shared/actions/actions';\nimport { commonEntityDataReducer } from './commonEntityDataReducer';\nimport { initialAppDataState, copyState, deepCopyDataMap } from './../../State';\nimport { Constants } from './../utils/constants';\nimport { loadAppPricing } from './../utils/pricing';\nimport { parsePBIApps } from '../../embed/reducers/pbiAppDataReducer';\nimport { parsePartnerApps } from '../../embed/reducers/partnerAppDataReducer';\nimport { SpzaInstrumentService } from '../services/telemetry/spza/spzaInstrument';\nimport { generateHashMap } from '../utils/hashMapUtils';\nimport { updateMatchFunctions } from 'utils/filterHelpers';\nimport { getFuturePricesInformation } from '@shared/utils/futurePricesUtils';\nimport { appendReviewCommentsToState, calculateTotalReviewCommentsPagesCount, combineDeletedComments, createInitialReviewCommentsState } from '@shared/utils/reviewsUtils';\nimport { take, pick, values, map, differenceBy } from 'lodash-es';\nimport { logger } from '@src/logger';\nimport { getProductByUrlKey } from '@shared/utils/appUtils';\nexport default function appDataReducer(state = initialAppDataState, action) {\n const newState = copyState(state);\n const newCommonState = commonEntityDataReducer(Constants.EntityType.App, state, action);\n if (isType(action, AppPricingDataReceivedAction)) {\n var _action_payload_pricingPayload, _action_payload;\n if (!((_action_payload = action.payload) === null || _action_payload === void 0 ? void 0 : (_action_payload_pricingPayload = _action_payload.pricingPayload) === null || _action_payload_pricingPayload === void 0 ? void 0 : _action_payload_pricingPayload.pricingData)) {\n return state;\n }\n newState.dataList = newState.dataList.map((app)=>{\n var _app_entityId, _action_payload_entityId;\n if (((_app_entityId = app.entityId) === null || _app_entityId === void 0 ? void 0 : _app_entityId.toLowerCase()) === ((_action_payload_entityId = action.payload.entityId) === null || _action_payload_entityId === void 0 ? void 0 : _action_payload_entityId.toLowerCase())) {\n return loadAppPricing(app, action.payload.pricingPayload.pricingData);\n }\n return app;\n });\n } else if (isType(action, RelatedAppsItemsPricingDataReceivedAction)) {\n if (!action.payload.pricingData || Object.keys(action.payload.pricingData).length === 0) {\n return state;\n }\n if (state.relatedAppsItems && state.relatedAppsItems.items) {\n let updatedLinkedAddIns = null;\n let updatedSaasLinkingItems = null;\n let updatedSuggestedItems = null;\n let updatedDataList = null;\n if (state.relatedAppsItems.items.saasLinkingItems) {\n updatedSaasLinkingItems = map(state.relatedAppsItems.items.saasLinkingItems, (app)=>loadAppPricing(app, action.payload.pricingData));\n }\n if (state.relatedAppsItems.items.suggestedItems) {\n updatedSuggestedItems = map(state.relatedAppsItems.items.suggestedItems, (app)=>loadAppPricing(app, action.payload.pricingData));\n }\n if (state.relatedAppsItems.items.linkedAddIns) {\n updatedLinkedAddIns = map(state.relatedAppsItems.items.linkedAddIns, (app)=>loadAppPricing(app, action.payload.pricingData));\n updatedDataList = [\n ...state.dataList,\n ...differenceBy(state.relatedAppsItems.items.linkedAddIns, state.dataList, 'entityId')\n ];\n }\n return _object_spread_props(_object_spread({}, state), {\n relatedAppsItems: _object_spread_props(_object_spread({}, state.relatedAppsItems), {\n items: {\n linkedAddIns: updatedLinkedAddIns !== null && updatedLinkedAddIns !== void 0 ? updatedLinkedAddIns : state.relatedAppsItems.items.linkedAddIns,\n suggestedItems: updatedSuggestedItems !== null && updatedSuggestedItems !== void 0 ? updatedSuggestedItems : state.relatedAppsItems.items.suggestedItems,\n saasLinkingItems: updatedSaasLinkingItems !== null && updatedSaasLinkingItems !== void 0 ? updatedSaasLinkingItems : state.relatedAppsItems.items.saasLinkingItems\n }\n }),\n dataList: updatedDataList !== null && updatedDataList !== void 0 ? updatedDataList : state.dataList\n });\n }\n } else if (isType(action, RecommendedWhatsNewAppsReceivedAction)) {\n newState.recommendedApps.whatsNewApps = action.payload;\n } else if (isType(action, RecommendedTrendingAppsReceivedAction)) {\n newState.recommendedApps.trendingApps = action.payload;\n } else if (isType(action, RecommendedMicrosoft365WhatsNewAppsReceivedAction)) {\n newState.recommendedApps.microsoft365WhatsNewApps = action.payload;\n } else if (isType(action, RecommendedMicrosoft365TrendingAppsReceivedAction)) {\n newState.recommendedApps.microsoft365TrendingApps = action.payload;\n } else if (isType(action, AppsPricingDataReceivedAction)) {\n const { payload } = action;\n const { pricingData = {} } = payload;\n newState.dataList = state.dataList.map((app)=>loadAppPricing(app, pricingData));\n const dataMap = deepCopyDataMap(state.dataMap);\n updateMatchFunctions(dataMap);\n newState.dataMap = dataMap;\n newState.pricingPayload = payload;\n } else if (isType(action, RecommendedAppsItemsPricingDataReceivedAction)) {\n const { payload } = action;\n const { pricingData = {} } = payload;\n newState.recommendedApps.whatsNewApps = state.recommendedApps.whatsNewApps.map((app)=>loadAppPricing(app, pricingData));\n newState.recommendedApps.trendingApps = state.recommendedApps.trendingApps.map((app)=>loadAppPricing(app, pricingData));\n newState.recommendedApps.microsoft365WhatsNewApps = state.recommendedApps.microsoft365WhatsNewApps.map((app)=>loadAppPricing(app, pricingData));\n newState.recommendedApps.microsoft365TrendingApps = state.recommendedApps.microsoft365TrendingApps.map((app)=>loadAppPricing(app, pricingData));\n newState.pricingPayload = payload;\n } else if (isType(action, PowerBIDataReceivedAction)) {\n if (action.payload.appData) {\n newState.dataList = newState.dataList.concat(parsePBIApps(action.payload.appData));\n newState.idMap = generateHashMap(newState.dataList, [\n 'entityId',\n 'friendlyURL'\n ]);\n newState.partnerAppDataLoaded = true;\n // This event is used to indicate that the Power BI data is fetched and parsing is done.\n const payload = {\n page: 'In App Gallery(PowerBI)',\n action: Constants.Telemetry.Action.PageLoad,\n actionModifier: Constants.Telemetry.ActionModifier.Info,\n details: '[End] PowerBI data parsing done'\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n page: payload.page\n });\n }\n } else if (isType(action, PartnerAppDataReceivedAction)) {\n var _getProductByUrlKey;\n if (action.payload.appData) {\n const appData = parsePartnerApps(action.payload.appData, action.payload.embedHost);\n newState.dataList = state.dataList.concat(appData).sort((a, b)=>{\n const aTitle = a.title.toLowerCase();\n const bTitle = b.title.toLowerCase();\n return aTitle > bTitle ? 1 : aTitle < bTitle ? -1 : 0;\n });\n newState.partnerAppDataLoaded = true;\n newState.idMap = generateHashMap(newState.dataList, [\n 'entityId'\n ]);\n } else {\n newState.partnerAppDataLoaded = true;\n newState.partnerAppDataLoadedError = true;\n }\n // This event is used to indicate that the Power BI data is fetched and parsing is done.\n const payload = {\n page: 'In App Gallery(' + ((_getProductByUrlKey = getProductByUrlKey({\n urlKey: action.payload.embedHost\n })) === null || _getProductByUrlKey === void 0 ? void 0 : _getProductByUrlKey.UrlKey) + ')',\n action: Constants.Telemetry.Action.PageLoad,\n actionModifier: Constants.Telemetry.ActionModifier.Info,\n details: '[End] Partner App data parsing done'\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n page: payload.page\n });\n } else if (isType(action, AppDetailPricingReceivedAction)) {\n if (action.payload.pricing) {\n const index = state.idMap[action.payload.entityId.toString().toLowerCase()];\n if (index !== -1) {\n newState.dataList = newState.dataList.slice();\n const currentData = newState.dataList[`${index}`];\n const { futurePrices, pricing } = action.payload;\n newState.dataList[`${index}`] = _object_spread_props(_object_spread({}, currentData), {\n pricingInformation: action.payload.pricing,\n futurePricesInformation: getFuturePricesInformation(futurePrices, pricing)\n });\n }\n }\n } else if (isType(action, EntityReviewCommentsReceivedAction)) {\n const { appReviewsData } = newState;\n // Merge data with the previous comment data for the review id\n const { [action.payload.reviewId]: prevReviewCommentsState } = appReviewsData.reviewComments;\n const newReviewCommentsState = _object_spread({}, appendReviewCommentsToState(prevReviewCommentsState, action.payload.comments));\n appReviewsData.reviewComments = _object_spread_props(_object_spread({}, appReviewsData.reviewComments), {\n // Convert the new comment list to normalized data\n [action.payload.reviewId]: _object_spread_props(_object_spread({}, newReviewCommentsState), {\n // Remove newly added comments if they were now loaded into the main list\n newlyAddedComments: newReviewCommentsState.newlyAddedComments.filter((c)=>!newReviewCommentsState.commentsById[c.id]),\n currentLoadedPage: action.payload.pageNumber\n })\n });\n } else if (isType(action, EntityReviewCommentsCleanupAction)) {\n if (newState.appReviewsData.reviewComments && newState.appReviewsData.reviewComments[action.payload.reviewId]) {\n // Clean the comments of the given review from the state\n const _newState_appReviewsData_reviewComments = newState.appReviewsData.reviewComments, _action_payload_reviewId = action.payload.reviewId, { [_action_payload_reviewId]: removedCommentData } = _newState_appReviewsData_reviewComments, newReviewCommentsState = _object_without_properties(_newState_appReviewsData_reviewComments, [\n _action_payload_reviewId\n ].map(_to_property_key));\n newState.appReviewsData.reviewComments = newReviewCommentsState;\n }\n } else if (isType(action, EntityReviewCommentUpdateResult) || isType(action, EntityReviewCommentDeleteResult)) {\n const { payload } = action;\n const { reviewId, isNewlyAddedComment, actionResult } = payload;\n const { [reviewId]: prevReviewCommentsState } = newState.appReviewsData.reviewComments;\n const newReviewCommentsState = _object_spread({}, prevReviewCommentsState);\n if (isNewlyAddedComment) {\n const updatedComment = actionResult.reviewComment;\n newReviewCommentsState.newlyAddedComments = newReviewCommentsState.newlyAddedComments.map((c)=>c.id === updatedComment.id ? updatedComment : c);\n } else {\n // Upon deletion or update of a comment, update it in the state immediately with the returned comment representation\n const commentId = actionResult.reviewComment.id;\n newReviewCommentsState.commentsById = _object_spread_props(_object_spread({}, newReviewCommentsState.commentsById), {\n [commentId]: actionResult.reviewComment\n });\n newReviewCommentsState.reducedCommentIds = combineDeletedComments(newReviewCommentsState);\n }\n // When deleting comments, reduce the comments counter\n if (isType(action, EntityReviewCommentDeleteResult)) {\n const reviewIdx = newState.appReviewsData.reviews.findIndex((r)=>r.id === action.payload.reviewId);\n if (reviewIdx > -1) {\n newState.appReviewsData.reviews[`${reviewIdx}`].comments_count -= 1;\n }\n }\n newState.appReviewsData.reviewComments = _object_spread_props(_object_spread({}, newState.appReviewsData.reviewComments), {\n [reviewId]: newReviewCommentsState\n });\n } else if (isType(action, EntityReviewCommentsLoadingAction)) {\n // Update the loading state for a given review's comments list (ex. when initially expanding the comments section for a review)\n const { [action.payload.reviewId]: prevReviewCommentsState } = newState.appReviewsData.reviewComments;\n // Update the review comments state with the change\n newState.appReviewsData.reviewComments = _object_spread_props(_object_spread({}, newState.appReviewsData.reviewComments), {\n [action.payload.reviewId]: _object_spread_props(_object_spread({}, prevReviewCommentsState), {\n isLoading: action.payload.isLoading\n })\n });\n } else if (isType(action, EntityReviewCommentsUnloadPagesAction)) {\n // Update the current page for a given review's comments list\n const { [action.payload.reviewId]: prevReviewCommentsState } = newState.appReviewsData.reviewComments;\n const { commentIds: prevCommentIds, commentsById: prevCommentsById } = prevReviewCommentsState;\n newState.appReviewsData.reviewComments = _object_spread_props(_object_spread({}, newState.appReviewsData.reviewComments), {\n [action.payload.reviewId]: appendReviewCommentsToState(// Erase loaded data from the comments state\n _object_spread_props(_object_spread({}, prevReviewCommentsState), {\n reducedCommentIds: [],\n commentsById: {},\n commentIds: [],\n currentLoadedPage: 1\n }), // Collect the comments from the first page and add them to the state\n values(pick(prevCommentsById, take(prevCommentIds, Constants.Reviews.CommentsPerPage))))\n });\n } else if (isType(action, EntityReviewCommentsUpdateTotalCommentCountAction)) {\n const { reviewId, totalComments } = action.payload;\n // Update the loading state for a given review's comments list (ex. when initially expanding the comments section for a review)\n const { [reviewId]: reviewCommentsState = createInitialReviewCommentsState() } = newState.appReviewsData.reviewComments;\n // Update the review comments state with the change\n newState.appReviewsData.reviewComments = _object_spread_props(_object_spread({}, newState.appReviewsData.reviewComments), {\n [reviewId]: _object_spread_props(_object_spread({}, reviewCommentsState), {\n totalComments,\n totalPages: calculateTotalReviewCommentsPagesCount(totalComments)\n })\n });\n } else if (isType(action, EntityReviewCommentsInitializeStateAction)) {\n const { [action.payload.reviewId]: newReviewCommentsState = createInitialReviewCommentsState() } = newState.appReviewsData.reviewComments || {};\n newState.appReviewsData.reviewComments = _object_spread_props(_object_spread({}, newState.appReviewsData.reviewComments), {\n [action.payload.reviewId]: _object_spread_props(_object_spread({}, newReviewCommentsState), {\n totalComments: action.payload.totalComments\n })\n });\n } else if (isType(action, EntityReviewCommentCreateResult)) {\n if (!action.payload.actionResult.error) {\n const { [action.payload.reviewId]: prevReviewCommentsState } = newState.appReviewsData.reviewComments;\n let newReviewCommentsState;\n if (action.payload.isNewlyAddedComment) {\n // Add the comment to the newly added comments list\n newReviewCommentsState = _object_spread_props(_object_spread({}, prevReviewCommentsState), {\n newlyAddedComments: [\n ...prevReviewCommentsState.newlyAddedComments,\n action.payload.actionResult.reviewComment\n ]\n });\n } else {\n // Add the comment to the main list\n newReviewCommentsState = _object_spread({}, appendReviewCommentsToState(prevReviewCommentsState, [\n action.payload.actionResult.reviewComment\n ]));\n }\n // Inject the new comments state and append the total comments count\n newState.appReviewsData.reviewComments = _object_spread_props(_object_spread({}, newState.appReviewsData.reviewComments), {\n [action.payload.reviewId]: _object_spread_props(_object_spread({}, newReviewCommentsState), {\n totalComments: prevReviewCommentsState.totalComments + 1\n })\n });\n const reviewIdx = newState.appReviewsData.reviews.findIndex((r)=>r.id === action.payload.reviewId);\n if (reviewIdx > -1) {\n newState.appReviewsData.reviews[`${reviewIdx}`].comments_count += 1;\n }\n }\n } else if (isType(action, EntityMarkedAsHelpfulReviewUpdateListAction)) {\n const { reviewIds } = action.payload;\n newState.appReviewsData.markedAsHelpful.userReviewIdsMarkedAsHelpful = reviewIds;\n } else if (isType(action, EntityLinkedInProductGroupUpdateAction)) {\n const { linkedInProductGroup } = action.payload;\n newState.linkedInProductGroup = linkedInProductGroup;\n } else if (isType(action, EntityReviewSetIsHelpfulAction)) {\n const { reviewId, isHelpful } = action.payload;\n const { markedAsHelpful } = newState.appReviewsData;\n const { userReviewIdsMarkedAsHelpful: prevReviewIds } = markedAsHelpful;\n if (isHelpful) {\n markedAsHelpful.userReviewIdsMarkedAsHelpful = [\n ...prevReviewIds,\n reviewId\n ];\n } else {\n markedAsHelpful.userReviewIdsMarkedAsHelpful = prevReviewIds.filter((r)=>r !== reviewId);\n }\n } else if (isType(action, EntityReviewSetIsHelpfulLoadingAction)) {\n const { isLoading, reviewId } = action.payload;\n const { markedAsHelpful: prevMarkedAsHelpfulState } = newState.appReviewsData;\n const { userReviewIdsLoading: prevLoadingIds } = prevMarkedAsHelpfulState;\n if (isLoading) {\n prevMarkedAsHelpfulState.userReviewIdsLoading = _object_spread_props(_object_spread({}, prevLoadingIds), {\n [reviewId]: true\n });\n } else {\n const _prevMarkedAsHelpfulState_userReviewIdsLoading = prevMarkedAsHelpfulState.userReviewIdsLoading, { [reviewId]: removedListing } = _prevMarkedAsHelpfulState_userReviewIdsLoading, newUserReviewIdsLoading = _object_without_properties(_prevMarkedAsHelpfulState_userReviewIdsLoading, [\n reviewId\n ].map(_to_property_key));\n prevMarkedAsHelpfulState.userReviewIdsLoading = newUserReviewIdsLoading;\n }\n } else if (isType(action, EntityReviewSetMarkAsHelpfulCount)) {\n const { reviewId, count } = action.payload;\n const { reviews } = newState.appReviewsData;\n const reviewIdx = reviews.findIndex((r)=>r.id === reviewId);\n if (reviewIdx > -1) {\n reviews[`${reviewIdx}`].mark_as_helpful_count = count;\n }\n } else if (isType(action, LoadingRecommenededSizes)) {\n const { entityId, planId } = action.payload;\n newState.recommendedSizesState = {\n entityId,\n planId,\n loading: true,\n recommendedSizes: []\n };\n } else if (isType(action, SetRecommenededSizes)) {\n const { entityId, planId, recommendedSizes } = action.payload;\n newState.recommendedSizesState = {\n entityId,\n planId,\n loading: false,\n recommendedSizes\n };\n } else if (isType(action, EntityUserCommentedReviewIdsUpdateListAction)) {\n const { commentReviewIds } = action.payload;\n newState.appReviewsData.userCommentedReviewIds = commentReviewIds;\n } else {\n return newCommonState;\n }\n return newState;\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { isType, UserSignInAction, UserLoginDetailsAction, EmbedUserSignInAction, UserReviewUpdateAction, UserSegmentInitializeAction, UserSignOutAction, UserFieldHubTypeAction, UserProfileAction, UpdateUserProfileLicenseAction, UpdateUserProfileAction, ClearUserPropertiesAction, UserOrdersAction, SetUserOrdersLoadingAction, UserPrivateOffersAction, SetUserPrivateOffersLoadingAction, UserTenantsDetailsAction, UserTenantsDetailsLoadingAction, SetAccessTokenAction, UserProfileLoadingAction, UpdateUserRoleDefinitions, AddSubscriptionsInTenant, UserSignInFetchStatusAction, UserSignInStatusDataAction, UserSignInStatusAction, UserAccesstokensAction, SetAccountAction, SetAccountIsLoadingAction, SetIsMaccTenantAction } from './../actions/actions';\nimport { initialUserDataState, copyState } from './../../State';\nimport { Constants } from '../utils/constants';\nimport { pick } from 'lodash-es';\nexport default function userDataReducer(state = initialUserDataState, action) {\n const newState = copyState(state);\n newState.profile = copyState(state.profile);\n if (isType(action, UserSignInAction) || isType(action, EmbedUserSignInAction)) {\n newState.id = action.payload.id || '';\n newState.group = action.payload.group;\n newState.email = action.payload.email || '';\n newState.signedIn = action.payload.signedIn;\n newState.idToken = action.payload.idToken || '';\n newState.firstName = action.payload.firstName;\n newState.lastName = action.payload.lastName;\n newState.displayName = action.payload.displayName;\n newState.oid = action.payload.oid;\n newState.tid = action.payload.tid;\n newState.alternateEmail = action.payload.alternateEmail;\n newState.isMSAUser = action.payload.isMSAUser;\n newState.userSegment = action.payload.userSegment;\n newState.fieldHubUserType = action.payload.fieldHubUserType;\n newState.graphApi = action.payload.graphApi;\n if (!newState.displayName) {\n newState.displayName = (newState.firstName + ' ' + newState.lastName).trim();\n newState.email = newState.email.substr(newState.email.indexOf('#') + 1);\n }\n // Embedded scenario does not send access token in the required format. So we call a different action\n // so that it is formatted the right way.\n if (isType(action, EmbedUserSignInAction)) {\n newState.accessToken = {\n spza: action.payload.accessToken\n };\n }\n if (isType(action, UserSignInAction)) {\n newState.accessToken = action.payload.accessToken;\n }\n } else if (isType(action, UserSignInStatusAction)) {\n return _object_spread({}, state, pick(action.payload, [\n 'signedIn',\n 'refreshToken',\n 'homeAccountId'\n ]));\n } else if (isType(action, UserSignInStatusDataAction)) {\n return _object_spread({}, state, pick(action.payload, [\n 'signedIn',\n 'refreshToken',\n 'homeAccountId'\n ]));\n } else if (isType(action, UserSignInFetchStatusAction)) {\n return _object_spread({}, state, pick(action.payload, [\n 'loading'\n ]));\n } else if (isType(action, UserAccesstokensAction)) {\n return _object_spread_props(_object_spread({}, state), {\n accessToken: action.payload\n });\n } else if (isType(action, UserLoginDetailsAction)) {\n return _object_spread({}, state, action.payload);\n } else if (isType(action, UpdateUserRoleDefinitions)) {\n newState.roleDefinitions = action.payload;\n } else if (isType(action, UserReviewUpdateAction)) {\n newState.hasReview = action.payload;\n } else if (isType(action, SetAccessTokenAction)) {\n newState.accessToken = action.payload;\n } else if (isType(action, AddSubscriptionsInTenant)) {\n newState.tenantsDetails.details.azureSubscriptions = action.payload;\n } else if (isType(action, UserSegmentInitializeAction)) {\n newState.userSegment = action.payload.userSegment;\n } else if (isType(action, UserSignOutAction)) {\n newState.id = '';\n newState.group = [\n ''\n ];\n newState.email = '';\n newState.signedIn = false;\n newState.idToken = '';\n newState.refreshToken = '';\n newState.firstName = '';\n newState.lastName = '';\n newState.displayName = '';\n newState.oid = '';\n newState.tid = '';\n newState.alternateEmail = '';\n newState.isMSAUser = false;\n newState.fieldHubUserType = Constants.FieldHubUserType.None;\n newState.phone = '';\n newState.company = '';\n newState.country = '';\n newState.profile.firstName = '';\n newState.profile.lastName = '';\n newState.profile.updateRequired = true;\n newState.profile.isLatestProfile = false;\n newState.profile.phone = '';\n newState.profile.email = '';\n newState.profile.title = '';\n newState.profile.company = '';\n newState.profile.country = '';\n newState.profile.uiRole = null;\n newState.profile.managedLicenses = [];\n if (!newState.displayName) {\n newState.displayName = newState.firstName + ' ' + newState.lastName;\n newState.email = newState.email.substr(newState.email.indexOf('#') + 1);\n }\n } else if (isType(action, UserFieldHubTypeAction)) {\n newState.fieldHubUserType = action.payload;\n } else if (isType(action, UserProfileLoadingAction)) {\n newState.isLoadingUserProfile = action.payload.isLoading;\n } else if (isType(action, UserProfileAction)) {\n newState.isLoadingUserProfile = false;\n newState.profile.firstName = action.payload.firstName;\n newState.profile.lastName = action.payload.lastName;\n newState.profile.updateRequired = action.payload.updateRequired === true;\n newState.profile.isLatestProfile = true;\n newState.profile.phone = action.payload.phone;\n newState.profile.email = action.payload.email;\n newState.profile.title = action.payload.title;\n newState.profile.company = action.payload.company;\n newState.profile.country = action.payload.country;\n newState.profile.uiRole = action.payload.uiRole;\n newState.profile.managedLicenses = action.payload.managedLicenses;\n if (action.payload.licenses && action.payload.licenses.length > 0) {\n newState.profile.licenses = [];\n for(let i = 0; i < action.payload.licenses.length; i++){\n newState.profile.licenses.push(action.payload.licenses[`${i}`]);\n }\n }\n } else if (isType(action, UserTenantsDetailsAction)) {\n newState.tenantsDetails.details = _object_spread({}, action.payload);\n } else if (isType(action, UserTenantsDetailsLoadingAction)) {\n newState.tenantsDetails.status = action.payload;\n } else if (isType(action, UpdateUserProfileAction)) {\n newState.profile.firstName = action.payload.firstName;\n newState.profile.lastName = action.payload.lastName;\n newState.profile.updateRequired = false;\n newState.profile.isLatestProfile = true;\n newState.profile.phone = action.payload.phone;\n newState.profile.title = action.payload.title;\n newState.profile.company = action.payload.company;\n newState.profile.country = action.payload.country;\n newState.profile.email = action.payload.email;\n newState.profile.uiRole = action.payload.uiRole;\n newState.profile.managedLicenses = action.payload.managedLicenses;\n // todo: post me update with license info (both of them)\n } else if (isType(action, UpdateUserProfileLicenseAction)) {\n if (action.payload.license) {\n if (newState.profile.licenses.length === Constants.dynamicsLicense.currentD365LicenseNumber) {\n if (action.payload.licenseType === Constants.Dynamics365LicenseType.dynamics365License) {\n newState.profile.licenses[Constants.Dynamics365LicenseIndex.dynamics365LicenseIndex].isDisputed = action.payload.license.isDisputed;\n }\n if (action.payload.licenseType === Constants.Dynamics365LicenseType.dynamics365forBusinessLicense) {\n newState.profile.licenses[Constants.Dynamics365LicenseIndex.dynamics365ForBusinessLicenseIndex].isDisputed = action.payload.license.isDisputed;\n }\n }\n }\n } else if (isType(action, ClearUserPropertiesAction)) {\n newState.phone = '';\n } else if (isType(action, UserOrdersAction)) {\n newState.purchases.hasPurchases = action.payload;\n } else if (isType(action, SetUserOrdersLoadingAction)) {\n newState.purchases.loading = action.payload;\n } else if (isType(action, UserPrivateOffersAction)) {\n const offers = action.payload.apps || [];\n newState.privateOffers.dataList = offers;\n } else if (isType(action, SetUserPrivateOffersLoadingAction)) {\n newState.privateOffers.loading = action.payload;\n } else if (isType(action, SetAccountAction)) {\n newState.accounts = action.payload;\n } else if (isType(action, SetAccountIsLoadingAction)) {\n newState.accounts.isLoading = action.payload.isLoading;\n } else if (isType(action, SetIsMaccTenantAction)) {\n newState.isMaccTenant = action.payload.isMacc;\n } else {\n return state;\n }\n return newState;\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { isType } from '@shared/actions/actions';\nimport { initialCheckoutState, copyState } from '@src/State';\nimport { SetItemInCartAction, UpdateCustomerAction, SetActiveCustomerAction, SetPublisherTokenResponse, ClearCheckoutState, SetCustomersAction, ErrorAction, ClearErrorAction, SetActiveStep, SetReceiptAction, SetBillingAddressAction, SetBillingTerm, SetRecurringBilling, SetSeatNumber, SetProduct, SetTermId, FetchingProductAction, SetCheckoutSource, SetCheckoutId } from '@shared/actions/checkoutActions';\nconst newCartActions = [\n SetItemInCartAction,\n SetBillingTerm,\n SetRecurringBilling,\n SetSeatNumber,\n SetTermId\n];\nexport default function checkoutReducer(state = initialCheckoutState, action) {\n const newState = copyState(state);\n if (isType(action, SetItemInCartAction)) {\n // currently we only allow 1 item in cart, so override the existing item\n newState.items = newState.items.slice();\n if (newState.items.length > 0) {\n newState.items.splice(0, 1, action.payload);\n } else {\n newState.items.splice(0, 0, action.payload);\n }\n } else if (isType(action, SetCheckoutSource)) {\n return _object_spread_props(_object_spread({}, newState), {\n source: action.payload.source\n });\n } else if (isType(action, SetProduct)) {\n const indexToUpdate = newState.items.findIndex((cartItem)=>cartItem.entityId === action.payload.id);\n if (indexToUpdate >= 0) {\n newState.items[`${indexToUpdate}`].product = action.payload.product;\n }\n newState.productFetched = true;\n } else if (isType(action, FetchingProductAction)) {\n newState.productFetched = false;\n } else if (isType(action, SetBillingTerm)) {\n const indexToUpdate = newState.items.findIndex((cartItem)=>cartItem.id === action.payload.id);\n if (indexToUpdate >= 0) {\n newState.items = state.items.map((item)=>_object_spread_props(_object_spread({}, item), {\n termDuration: action.payload.termDuration\n }));\n }\n } else if (isType(action, SetTermId)) {\n const indexToUpdate = newState.items.findIndex((cartItem)=>cartItem.id === action.payload.id);\n if (indexToUpdate >= 0) {\n newState.items = state.items.map((item)=>_object_spread_props(_object_spread({}, item), {\n termId: action.payload.termId\n }));\n }\n } else if (isType(action, SetSeatNumber)) {\n const indexToUpdate = newState.items.findIndex((cartItem)=>cartItem.id === action.payload.id);\n if (indexToUpdate >= 0) {\n newState.items[`${indexToUpdate}`].quantity = action.payload.numSeats;\n newState.items[`${indexToUpdate}`].quantityString = action.payload.numSeats.toString();\n }\n } else if (isType(action, SetRecurringBilling)) {\n const indexToUpdate = newState.items.findIndex((cartItem)=>cartItem.id === action.payload.id);\n if (indexToUpdate >= 0) {\n newState.items[`${indexToUpdate}`].recurringBilling = action.payload.recurringBilling;\n }\n } else if (isType(action, UpdateCustomerAction)) {\n newState.activeCustomer = _object_spread_props(_object_spread({}, newState.activeCustomer), {\n address: action.payload\n });\n } else if (isType(action, SetActiveStep)) {\n newState.currentStep = action.payload;\n } else if (isType(action, SetCustomersAction)) {\n newState.customers = action.payload;\n } else if (isType(action, SetActiveCustomerAction)) {\n // Implies customer identity has been changed to another customer identity\n newState.activeCustomer = action.payload;\n } else if (isType(action, SetPublisherTokenResponse)) {\n newState.publisherToken = action.payload;\n } else if (isType(action, ClearCheckoutState)) {\n // clear everything except the activeCustomer and selectedPi information\n newState.items = [];\n newState.retryAfter = null;\n newState.publisherToken = null;\n } else if (isType(action, SetReceiptAction)) {\n newState.receipt = action.payload;\n } else if (isType(action, SetBillingAddressAction)) {\n newState.billingAddress = action.payload;\n } else if (isType(action, SetCheckoutId)) {\n newState.checkoutId = action.payload.checkoutId;\n } else if (isType(action, ClearErrorAction)) {\n newState.error = false;\n } else if (isType(action, ErrorAction)) {\n newState.error = true;\n }\n // Upon incrementing purchaseAttempt, a new cart will generate and checkout will reload\n if (newCartActions.some((newCartAction)=>isType(action, newCartAction))) {\n newState.purchaseAttempt++;\n }\n return newState;\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nimport { isType } from '../actions/actions';\nimport { initialPartnersState } from '../../State';\nimport { SetContactDetailsAction, SetFilterLocationAction } from '../actions/partnersActions';\nexport default function partnersReducer(state = initialPartnersState, action) {\n if (isType(action, SetFilterLocationAction)) {\n const newState = _object_spread({}, state);\n newState.filterLocation = action.payload;\n return newState;\n } else if (isType(action, SetContactDetailsAction)) {\n const newState = _object_spread({}, state);\n newState.contactDetails = action.payload;\n return newState;\n }\n return state;\n}\n","import { copyState, initialServiceDataState } from '@src/State';\nimport { Constants } from '@shared/utils/constants';\nimport { CountriesDataReceivedAction, isType, RecommendedTrendingServiceReceivedAction, RecommendedWhatsNewServiceReceivedAction, SetEntityDataRegionFiltersAction } from '@shared/actions/actions';\nimport { commonEntityDataReducer } from '@shared/reducers/commonEntityDataReducer';\nimport { AzureEnvironmentSettings } from '@shared/AzureEnvironmentSettings';\nfunction isSelectedCountryValid(countriesList, selectedCountry) {\n // If countries list not defined yet, this is valid country selection.\n // We will change the selected country to the default one if we get list with out it.\n if (!countriesList || Object.keys(countriesList).length === 0 || !selectedCountry) {\n return true;\n }\n return selectedCountry in countriesList;\n}\nexport default function serviceDataReducer(state = initialServiceDataState, action) {\n const newState = copyState(state);\n if (isType(action, CountriesDataReceivedAction)) {\n newState.countriesList = action.payload.countries;\n if (!isSelectedCountryValid(action.payload.countries, state.selectedCountry)) {\n newState.selectedCountry = AzureEnvironmentSettings.defaultCountryCode.toUpperCase();\n }\n } else if (isType(action, SetEntityDataRegionFiltersAction)) {\n if (state.selectedCountry !== action.payload.countryCode || state.selectedRegion !== action.payload.regionCode) {\n if (isSelectedCountryValid(state.countriesList, action.payload.countryCode)) {\n newState.selectedCountry = action.payload.countryCode;\n }\n newState.selectedRegion = action.payload.regionCode;\n }\n } else if (isType(action, RecommendedWhatsNewServiceReceivedAction)) {\n newState.recommendedServices.whatsNewService = action.payload;\n } else if (isType(action, RecommendedTrendingServiceReceivedAction)) {\n newState.recommendedServices.trendingService = action.payload;\n } else {\n return commonEntityDataReducer(Constants.EntityType.Service, state, action);\n }\n return newState;\n}\n","/* istanbul ignore file */ import { combineReducers } from 'redux';\nimport searchReducer from '@shared/reducers/searchReducer';\nimport modalReducer from '@shared/reducers/modalReducer';\nimport appDataReducer from '@shared/reducers/appDataReducer';\nimport userDataReducer from '@shared/reducers/userDataReducer';\nimport configReducer from '@shared/reducers/configReducer';\nimport dynamicCampaignReducer from '@shared/reducers/dynamicCampaignReducer';\nimport userFavouriteReducer from '@shared/reducers/userFavouriteReducer';\nimport checkoutReducer from '@shared/reducers/checkoutReducer';\nimport partnersReducer from '@shared/reducers/partnersReducer';\nimport cloudsIndustryDataReducer from '@shared/reducers/cloudsIndustryDataReducer';\nimport serviceDataReducer from '@shared/reducers/serviceDataReducer';\n// ordering matters here, we first update the filters and then the app data\nexport default combineReducers({\n search: searchReducer,\n modal: modalReducer,\n apps: appDataReducer,\n cloudsIndustry: cloudsIndustryDataReducer,\n users: userDataReducer,\n config: configReducer,\n dynamicCampaign: dynamicCampaignReducer,\n userFavourite: userFavouriteReducer,\n checkout: checkoutReducer,\n partners: partnersReducer,\n services: serviceDataReducer\n});\n","import { updateMatchFunctions } from '@shared/utils/filterHelpers';\nimport { Constants } from '@shared/utils/constants';\nimport { loadAppPricing } from '@shared/utils/pricing';\nimport { AppsPricingDataReceivedAction, isType } from '@shared/actions/actions';\nimport { copyState, deepCopyDataMap, initialCloudsIndustryDataState } from './../../State';\nimport { commonEntityDataReducer } from './commonEntityDataReducer';\nexport default function cloudsIndustryDataReducer(state = initialCloudsIndustryDataState, action) {\n const newState = copyState(state);\n if (isType(action, AppsPricingDataReceivedAction)) {\n const { payload } = action;\n const { pricingData = {} } = payload;\n newState.dataList = state.dataList.map((app)=>loadAppPricing(app, pricingData));\n const dataMap = deepCopyDataMap(state.dataMap);\n updateMatchFunctions(dataMap);\n newState.dataMap = dataMap;\n newState.pricingPayload = payload;\n } else {\n return commonEntityDataReducer(Constants.EntityType.CloudsIndustry, state, action);\n }\n return newState;\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nimport { isType, NationalCloudSettingAction, EmbeddedAppSettingAction, EmbeddedHostAction, LocStringsReceivedAction, ChangeLocaleLanguage, FlightCodesReceivedAction, CorrelationIdReceivedAction, BreadcrumbAction, TelemetryLoggedAction, SetCurrentViewAction, SetLandingViewAction, UpdateCurrentGalleryViewIsCuratedAction, AppPricingDataRequestedAction, AppsPricingDataReceivedAction, FeatureFlagsReceivedAction, BillingRegionReadFromCookieAction, ABTestingEnableAction, GlobalSettingsReceivedAction, IsMobileReceivedAction, CheckoutConfigAction, IsManageModalOpenAction, SetWCPConsentAction, SetIsConsentRequired, SetInitLoadingAction, EnableNewNpsAction, SetIsNpsLogicVerifiedAction, ToggleShowContextPanel, RequestIdReceivedAction, SetIsDisabledBilling, SetStorefrontNameAction, I18nextReceivedAction, SetInitializedPCAInstanceAction, IncludeTestProductsReceivedAction, IsConverged } from '@shared/actions/actions';\nimport { SetQueryAction, SetRequestFilteredEntityTypeAction, SetRequestFilteredLoadedAction, SetRequestFilteredLoadingAction, SetRequestFilteredQueryAction, SetResponseFilteredQueryAction } from './../actions/queryActions';\nimport { pick } from 'lodash-es';\nimport { initialConfigState, copyState } from './../../State';\nexport default function configReducer(state = initialConfigState, action) {\n const newState = copyState(state);\n if (isType(action, NationalCloudSettingAction)) {\n newState.nationalCloud = action.payload.nationalCloud;\n } else if (isType(action, EmbeddedAppSettingAction)) {\n newState.isEmbedded = action.payload.isEmbedded;\n } else if (isType(action, SetInitLoadingAction)) {\n newState.initLoading = action.payload.initLoading;\n } else if (isType(action, LocStringsReceivedAction)) {\n newState.locStrings = action.payload.localizedstrings;\n newState.locale = action.payload.locale;\n } else if (isType(action, I18nextReceivedAction)) {\n newState.i18nInstance = action.payload.i18nInstance;\n } else if (isType(action, EmbeddedHostAction)) {\n newState.embedHost = action.payload.embedHost;\n } else if (isType(action, FlightCodesReceivedAction)) {\n newState.flightCodes = action.payload.flightCodes;\n } else if (isType(action, IncludeTestProductsReceivedAction)) {\n newState.includeTestProducts = action.payload.includeTestProducts;\n } else if (isType(action, IsConverged)) {\n newState.isConverged = action.payload.isConverged;\n } else if (isType(action, CorrelationIdReceivedAction)) {\n newState.correlationId = action.payload.correlationId;\n } else if (isType(action, RequestIdReceivedAction)) {\n newState.requestId = action.payload.requestId;\n } else if (isType(action, BreadcrumbAction)) {\n newState.breadcrumbUrl = action.payload.breadcrumbUrl;\n } else if (isType(action, TelemetryLoggedAction)) {\n newState.appViewTelemetryLoggedCount = state.appViewTelemetryLoggedCount + 1;\n } else if (isType(action, SetCurrentViewAction)) {\n // currentView is one of routes property `name` in routerHistory.tsx\n newState.currentView = action.payload.currentView;\n } else if (isType(action, SetLandingViewAction)) {\n // landingView is one of routes property `name` in routerHistory.tsx\n newState.landingView = action.payload.landingView;\n } else if (isType(action, UpdateCurrentGalleryViewIsCuratedAction)) {\n // determine whether current render gallery view is curated\n newState.currentGalleryViewIsCurated = action.payload.isCuratedGalleryView;\n } else if (isType(action, AppPricingDataRequestedAction)) {\n newState.pricingDataLoaded = false;\n } else if (isType(action, AppsPricingDataReceivedAction)) {\n newState.billingCountryCode = action.payload.countryCode;\n newState.pricingDataLoaded = true;\n } else if (isType(action, FeatureFlagsReceivedAction)) {\n const keys = Object.keys(action.payload);\n const keysLength = keys.length;\n for(let i = 0; i < keysLength; i++){\n newState.featureFlags[keys[`${i}`]] = action.payload[keys[`${i}`]];\n }\n } else if (isType(action, SetQueryAction)) {\n newState.query = action.payload.query;\n } else if (isType(action, SetRequestFilteredLoadingAction)) {\n newState.requestFilteredLoading = true;\n } else if (isType(action, SetRequestFilteredLoadedAction)) {\n newState.requestFilteredLoading = false;\n } else if (isType(action, SetRequestFilteredQueryAction)) {\n newState.requestFilteredQuery = action.payload.requestFilteredQuery;\n } else if (isType(action, SetRequestFilteredEntityTypeAction)) {\n newState.requestFilteredEntityType = action.payload.requestFilteredEntityType;\n } else if (isType(action, SetResponseFilteredQueryAction)) {\n newState.responseFilteredQuery = action.payload.responseFilteredQuery;\n } else if (isType(action, BillingRegionReadFromCookieAction)) {\n newState.billingCountryCode = action.payload.billingRegion;\n } else if (isType(action, ABTestingEnableAction)) {\n newState.experiment.abTestingVersion_AMP = action.payload.abTestingVersion_AMP;\n newState.experiment.abTestingVersion_newFilterAMP = action.payload.abTestingVersion_newFilterAMP;\n } else if (isType(action, GlobalSettingsReceivedAction)) {\n Object.assign(newState, _object_spread({}, pick(action.payload.globalSettings, [\n 'marketplaceApiHost',\n 'saasRPHost',\n 'marketplaceLeadsHost',\n 'marketplaceLeadsAudienceId',\n 'armApiHost',\n 'MPRPHost',\n 'partnersIframeUrl',\n 'partnersIframeUrlTest',\n 'telemetryInstrumentationKey',\n 'loggingInstrumentationKey',\n 'partnersApiHost',\n 'appVersion',\n 'region',\n 'requestId',\n 'correlationId',\n 'reviewsAPI',\n 'linkedinAPI',\n 'linkedinAPIVersion',\n 'communityAPI',\n 'communityAPIVersion',\n 'siteEnvironment',\n 'aadApplicationId',\n 'aadLoginUrl',\n 'commerceApiHost',\n 'oneCatalogApiHost',\n 'telemetryEndpoint',\n 'msClarityId',\n 'searchApiEndpoint',\n 'expHeaderDisabled',\n 'enableOneTaxonomy',\n 'jarvisCM',\n 'mprpAadApplicationId',\n 'pifdEndpoint',\n 'commerceApi',\n 'graphApi',\n 'agreementAppId',\n 'isConverged'\n ])));\n } else if (isType(action, IsMobileReceivedAction)) {\n newState.isMobile = action.payload.isMobile;\n } else if (isType(action, CheckoutConfigAction)) {\n newState.pidlEnv = action.payload.checkoutSettings.pidlEnv;\n } else if (isType(action, IsManageModalOpenAction)) {\n newState.cookiesConsent.isManageModalOpen = action.payload;\n } else if (isType(action, SetWCPConsentAction)) {\n newState.cookiesConsent.WCPConsent = action.payload;\n } else if (isType(action, SetIsConsentRequired)) {\n newState.cookiesConsent.isConsentRequired = action.payload;\n } else if (isType(action, EnableNewNpsAction)) {\n newState.newNpsEnabled = action.payload.enable;\n } else if (isType(action, SetInitializedPCAInstanceAction)) {\n newState.pcaInstanceInitialized = action.payload.initialized;\n } else if (isType(action, SetIsNpsLogicVerifiedAction)) {\n newState.npsLogicVerified = action.payload.verified;\n } else if (isType(action, ToggleShowContextPanel)) {\n newState.showContextPanel = !state.showContextPanel;\n } else if (isType(action, ChangeLocaleLanguage)) {\n newState.locale = action.payload.locale;\n } else if (isType(action, SetIsDisabledBilling)) {\n newState.isDisabledBilling = action.payload;\n } else if (isType(action, SetStorefrontNameAction)) {\n newState.storefrontName = action.payload;\n } else {\n return state;\n }\n return newState;\n}\n","import { isType, DynamicCampaignReceivedAction } from './../actions/actions';\nimport { initialDynamicCampaignState, copyState } from './../../State';\nexport default function campaignReducer(state = initialDynamicCampaignState, action) {\n let newState = copyState(state);\n if (isType(action, DynamicCampaignReceivedAction)) {\n newState = action.payload.campaignInfo;\n } else {\n return state;\n }\n return newState;\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { isType } from './../actions/actions';\nimport { ReceiveUserFavouriteDataAction, UpdateUserFavouriteFetchDataStatusAction, UpsertUserFavouriteItemAction, DeleteUserFavouriteItemAction, FavouriteAppsPricingDataReceivedAction } from './../actions/userFavouriteActions';\nimport { initialUserFavouriteState, copyState } from '@src/State';\nimport { isApplication, isConsultingService, getFavouriteEntityState, upsertsUserFavouriteEntityState, deleteUserFavouriteEntityState } from './../utils/userFavouriteUtils';\nimport { Constants } from './../utils/constants';\nimport { loadAppPricing } from './../utils/pricing';\nexport default function userFavouriteReducer(state = initialUserFavouriteState, action) {\n const newState = copyState(state);\n if (isType(action, ReceiveUserFavouriteDataAction)) {\n const payload = action.payload;\n const userFavourites = payload.userFavorites || [];\n userFavourites.forEach((userFavourite)=>{\n if (isApplication(userFavourite.applicationType)) {\n newState.apps = getFavouriteEntityState(userFavourite.favorites, userFavourite.applicationType);\n } else if (isConsultingService(userFavourite.applicationType)) {\n newState.services = getFavouriteEntityState(userFavourite.favorites, userFavourite.applicationType);\n }\n });\n } else if (isType(action, UpdateUserFavouriteFetchDataStatusAction)) {\n const payload = action.payload;\n if (newState.fetchDataStatus === payload.fetchDataStatus) {\n return state;\n }\n newState.fetchDataStatus = payload.fetchDataStatus;\n } else if (isType(action, UpsertUserFavouriteItemAction)) {\n if (newState.fetchDataStatus === Constants.UserFavourite.FetchDataStatus.Valid) {\n const payload = action.payload;\n if (isApplication(payload.applicationType)) {\n upsertsUserFavouriteEntityState(newState.apps, payload);\n } else if (isConsultingService(payload.applicationType)) {\n upsertsUserFavouriteEntityState(newState.services, payload);\n }\n }\n } else if (isType(action, DeleteUserFavouriteItemAction)) {\n if (newState.fetchDataStatus === Constants.UserFavourite.FetchDataStatus.Valid) {\n const payload = action.payload;\n if (isApplication(payload.applicationType)) {\n deleteUserFavouriteEntityState(newState.apps, payload);\n } else if (isConsultingService(payload.applicationType)) {\n deleteUserFavouriteEntityState(newState.services, payload);\n }\n }\n } else if (isType(action, FavouriteAppsPricingDataReceivedAction)) {\n if (!state.apps || !action.payload.pricingData || Object.keys(action.payload.pricingData).length === 0) {\n return state;\n }\n newState.apps = state.apps.map((favouriteApp)=>{\n const app = favouriteApp.item;\n const item = loadAppPricing(app, action.payload.pricingData);\n return _object_spread_props(_object_spread({}, favouriteApp), {\n item\n });\n });\n } else {\n return state;\n }\n return newState;\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { buildStore } from '@shared/store/createStore';\nimport ErrorModal from '../containers/modals/errorModal';\nimport { render } from 'react-dom';\nimport { getWindow } from '../services/window';\nimport combineReducers from '../reducers/reducers';\nimport { isEmbedded } from '../utils/appUtils';\nimport thunk from 'redux-thunk';\nimport { Provider } from 'react-redux';\nimport classNames from 'classnames';\nexport function renderErrorModal(store, isEmbed = false) {\n if (!store) {\n const initialState = window.__INITIAL_STATE__;\n store = buildStore({\n combinedReducers: combineReducers,\n initialState,\n middleware: [\n thunk\n ]\n });\n isEmbed = initialState.config.isEmbedded;\n }\n const modalBackgroundClasses = classNames({\n spza_presentation: true,\n spza_background_1: true,\n spza_background_2: false\n });\n const modalClasses = classNames({\n spza_dialog: true,\n spza_dialog_design2: false\n });\n let dismissModal = null;\n if (!isEmbed) {\n dismissModal = ()=>{\n const href = getWindow().location.origin + '/home';\n getWindow().location.assign(href);\n };\n } else {\n dismissModal = ()=>{\n getWindow().parent.postMessage({\n msgType: 'closeSaasMarketplace'\n }, '*');\n };\n }\n render(/*#__PURE__*/ _jsx(Provider, {\n store: store,\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: classNames({\n spza_root: !isEmbedded(),\n spza_root_embedded: isEmbedded()\n }),\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: modalClasses,\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: modalBackgroundClasses,\n children: /*#__PURE__*/ _jsx(ErrorModal, {\n dismissModal: dismissModal\n })\n })\n })\n })\n }), document.getElementById('react-view'));\n}\n","import * as httpProtocol from '@shared/services/http/httpProtocol';\nimport { createPowerBIDataReceivedAction, createPartnerAppDataReceivedAction } from '@shared/actions/actions';\nimport { logPageLoadFinished } from '../embedMessaging';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { Constants } from '@shared/utils/constants';\nimport { DataMap } from '@shared/utils/dataMapping';\nimport { logger } from '@src/logger';\nimport { getProductByUrlKey } from '@shared/utils/appUtils';\nconst PUBLISH_RETRY_COUNT = 2;\nexport function finishProcessingAppData(dispatch, embedHost, apps) {\n var _getProductByUrlKey;\n const payload = {\n page: `In App Gallery(${(_getProductByUrlKey = getProductByUrlKey({\n urlKey: embedHost\n })) === null || _getProductByUrlKey === void 0 ? void 0 : _getProductByUrlKey.UrlKey})`,\n action: Constants.Telemetry.Action.NetworkCall,\n actionModifier: Constants.Telemetry.ActionModifier.End,\n details: '[End] Partner App data is received. Data dispatched for parsing'\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, payload);\n dispatch(createPartnerAppDataReceivedAction({\n appData: apps,\n embedHost\n }));\n logPageLoadFinished(embedHost);\n return apps;\n}\nexport function fetchEmbedAppData(embedHost, hostData) {\n return function(dispatch) {\n const getAppsEndpoint = hostData.getAppsEndpoint;\n if (!getAppsEndpoint) {\n throw new Error('No getAppsEndpoint specified');\n }\n const options = {\n authenticationType: httpProtocol.AuthenticationTypes.Unauthenticated,\n parseResult: true,\n retry: PUBLISH_RETRY_COUNT\n };\n return new Promise((resolve, reject)=>{\n httpProtocol.get(getAppsEndpoint, options).setAuthHeader(hostData.accessToken).setHeader('Accept', 'application/json').setHeader('Context', JSON.stringify(hostData.context)).request().then((result)=>{\n const appData = finishProcessingAppData(dispatch, embedHost, result.applications);\n resolve(appData);\n }, (error)=>{\n reject(error);\n });\n });\n };\n}\n// TODO: Add error handling for PowerBI failure\nexport function fetchPowerBIData(hostData) {\n return function(dispatch, getState) {\n const state = getState();\n // TODO: this should probably be api.powerbi.com for the default\n let pbiApi = 'https://api.powerbi.com/v1.0/spza/applications';\n if (hostData.backendUrlOverride && hostData.backendUrlOverride.length > 1) {\n pbiApi = hostData.backendUrlOverride + '/v1.0/spza/applications';\n }\n const options = {\n authenticationType: httpProtocol.AuthenticationTypes.Unauthenticated,\n parseResult: true,\n allowOrigin: true,\n retry: PUBLISH_RETRY_COUNT\n };\n return new Promise((resolve, reject)=>{\n httpProtocol.get(pbiApi, options).setAuthHeader(hostData.accessToken).setHeader('Accept', 'application/json').setHeader('ActivityId', state.config.correlationId).setHeader('X-PowerBI-User-GroupId', hostData.context.groupId).request().then((appData)=>{\n // This event is used to indicate that the Power BI data is fetched. Parsing and rendering starts after this step\n const payload = {\n page: 'In App Gallery(PowerBI)',\n action: Constants.Telemetry.Action.NetworkCall,\n actionModifier: Constants.Telemetry.ActionModifier.End,\n details: '[End] PowerBI data is received. Data dispatched for parsing'\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n page: payload.page\n });\n dispatch(createPowerBIDataReceivedAction({\n appData: appData.applications\n }));\n logPageLoadFinished(DataMap.products.PowerBI.UrlKey);\n resolve(appData);\n }, (error)=>{\n reject(error);\n });\n });\n };\n}\n","/* eslint-disable @typescript-eslint/no-use-before-define */ import { DataMap } from '@shared/utils/dataMapping';\nimport { getWindow } from '@shared/services/window';\nimport { UserSegment } from '@shared/Models';\nimport { Constants } from '@shared/utils/constants';\nimport { createEmbedUserSignInAction } from '@shared/actions/actions';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { getEmbedHostName, getTelemetryResponseUrl, getHandoffUrlForProduct, checkOriginSource, getPaymentRedirectUrl, postMessageToHost, getProductByUrlKey } from '@shared/utils/appUtils';\nimport { HttpModule } from '@shared/services/http/httpProtocol';\nimport { renderErrorModal } from '@shared/utils/errorHandlerUtil';\nimport { getPrimaryProductUrl } from '@shared/utils/datamappingHelpers';\nimport { logger } from '@src/logger';\nimport * as embedHostUtils from './embedHostUtils';\nimport { constants } from './constants';\nimport { fetchPowerBIData, fetchEmbedAppData, finishProcessingAppData } from './actions/embedThunks';\nlet appDataRequestStart = 0;\n// DO NOT EVER CHANGE THE MAPPING FOR dynamics-365-business-central THIS WILL BREAK EMBED CTA\nconst legacyProductsMap = {\n 'dynamics-365-for-finance-and-operations-enterprise-edition': 'dynamics-365-for-operations',\n 'dynamics-365-for-sales-enterprise-edition': 'dynamics-365-for-sales',\n 'dynamics-365-for-finance-and-operations-business-edition': 'dynamics-365-for-financials',\n 'dynamics-365-for-customer-services-enterprise-edition': 'dynamics-365-for-customer-services',\n 'dynamics-365-for-field-services-enterprise-edition': 'dynamics-365-for-field-services',\n 'dynamics-365-for-project-service-automation-enterprise-edition': 'dynamics-365-for-project-service-automation',\n 'dynamics-365-business-central': 'dynamics-365-for-financials'\n};\nexport function postEmbedCTAMessage(app) {\n const data = {\n applicationId: app.entityId\n };\n postMessageToHost({\n msgType: constants.actionTypes.ctaClicked,\n data\n });\n}\nexport function postEmbedAcquisitionMessage(app, ctaClicked, embedHost = '') {\n const productTitle = getPrimaryProductUrl(app.primaryProduct);\n // eslint-disable-next-line no-prototype-builtins\n const productName = legacyProductsMap.hasOwnProperty(productTitle) ? legacyProductsMap[`${productTitle}`] : productTitle;\n const data = {\n applicationId: app.entityId,\n category: app.privateApp ? 'private' : 'public',\n redirectUrl: app.handoffURL || getHandoffUrlForProduct(productTitle, app.entityId, false, app.products, app.locale, ctaClicked),\n product: productName,\n responseUrl: getTelemetryResponseUrl(app.entityId)\n };\n if (embedHost === DataMap.products.AdminPortal.UrlKey && ctaClicked === Constants.CTAType.Purchase) {\n data.paymentRedirectUrl = getPaymentRedirectUrl(app.entityId, Constants.M365Admin);\n }\n postMessageToHost({\n msgType: constants.actionTypes.acquireApp,\n data\n });\n}\nexport function convertBitmaskValueToRawData(result, dataMapping) {\n const data = [];\n if (result) {\n const keys = Object.keys(dataMapping);\n for(let i = 0; i < keys.length; i++){\n const value = dataMapping[keys[`${i}`]];\n if (result & value) {\n data.push(keys[`${i}`]);\n }\n }\n }\n return data;\n}\nexport function logInitListenerFinished(embedHost) {\n const payload = {\n page: 'In App Gallery',\n action: Constants.Telemetry.Action.EmbedMessageListener,\n actionModifier: Constants.Telemetry.ActionModifier.End,\n details: `embedHost: ${getEmbedHostName(embedHost)}`\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n page: payload.page\n });\n postMessageToHost({\n msgType: constants.actionTypes.initListenerFinished\n });\n}\nexport function logPageLoadFinished(embedHost) {\n const timeAtTelemetryMethodCall = new Date().getTime();\n // This event is used to indicate that the In App gallery apps rendering is finished.\n const payload = {\n page: 'In App Gallery',\n action: Constants.Telemetry.Action.PageLoad,\n actionModifier: Constants.Telemetry.ActionModifier.End,\n details: 'In App Gallery tiles rendering finished'\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n page: payload.page\n });\n const currentWindow = getWindow();\n if (currentWindow && currentWindow.performance && embedHostUtils.hasDynamicData(embedHost)) {\n const timing = currentWindow.performance.timing;\n // Telemetry for Network Latency\n const networkLatency = timing.responseEnd - timing.fetchStart;\n const currentTime = new Date().getTime();\n // The time taken for page load once the page is received from the server\n // we may find timing.loadEventEnd as 0 if called before load event fires.\n // If so, use current time as approximation till we fix it properly\n const loadEventEnd = timing.loadEventEnd !== 0 ? timing.loadEventEnd : currentTime;\n // The time taken for page load once the page is received from the server\n const pageLoadTime = loadEventEnd - timing.responseEnd;\n // The whole process of navigation and page load\n const navigationToPageLoad = currentTime - timing.navigationStart;\n const dataLatency = currentTime - appDataRequestStart;\n // the data we are getting here is valuable, but seems very browser specific (some browsers do not properly support)\n // so introducing a new number here that will always be consistent:\n const timePassedSinceNavigationStart = timeAtTelemetryMethodCall - timing.navigationStart;\n const perfTimings = {\n networkLatency,\n pageLoadTime,\n navigationToPageLoad,\n timePassedSinceNavigationStart,\n allTimings: timing,\n isEmbedded: true,\n embedHost: getEmbedHostName(embedHost),\n isAuthenticated: false,\n dataLatency\n };\n const perfPayload = {\n eventName: Constants.Telemetry.Action.PerfEvents,\n data: JSON.stringify(perfTimings),\n flushLog: true\n };\n SpzaInstrumentService.getProvider().probe('logOneTimeInfo', perfPayload);\n logger.info(perfPayload.data, {\n action: perfPayload.eventName,\n actionModifier: Constants.Telemetry.ActionModifier.Info,\n page: ''\n });\n }\n postMessageToHost({\n msgType: constants.actionTypes.finishedLoadingContentProviderList\n });\n}\nexport function initializeListener(dispatch, embedHost) {\n const currWindow = getWindow();\n if (currWindow.parent !== currWindow) {\n currWindow.addEventListener('message', (e)=>{\n receiveMessage(e, dispatch, embedHost);\n });\n }\n logInitListenerFinished(embedHost);\n if (!embedHostUtils.hasDynamicData(embedHost)) {\n // If it is not dynamic data on embed host, we are done\n // with fetching the app data.\n appDataRequestStart = new Date().getTime();\n logPageLoadFinished(embedHost);\n }\n}\n// handle message from parent window\nexport function receiveMessage(event = {}, dispatch, embedHost) {\n const { origin, data = {} } = event;\n const { hostData, msgType } = data;\n const validOrigin = checkOriginSource(origin);\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.EmbedMessaging,\n actionModifier: Constants.Telemetry.ActionModifier.ReceiveMessage,\n details: JSON.stringify({\n origin,\n validOrigin,\n msgType\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n if (!validOrigin) {\n return;\n }\n if (hostData) {\n hostData.userSegment = UserSegment.unauthenticated;\n const { error, hostCorrelationId, accessToken, privateApps, getAppsEndpoint, firstName, lastName, workEmail, backendUrlOverride } = hostData;\n switch(msgType){\n case Constants.embedMessage.loadMarketplaceV2:\n if (error) {\n handleError(true, hostCorrelationId, error);\n } else if (!accessToken) {\n handleError(true, hostCorrelationId, 'No access token');\n } else if (!hostCorrelationId) {\n handleError(true, '', 'No host correlation ID');\n } else {\n if (embedHostUtils.hasPrivateApps(embedHost) && !privateApps) {\n var _getProductByUrlKey;\n handleError(false, hostCorrelationId, 'privateApps is required but is null. EmbedHost: ' + ((_getProductByUrlKey = getProductByUrlKey({\n urlKey: embedHost\n })) === null || _getProductByUrlKey === void 0 ? void 0 : _getProductByUrlKey.UrlKey));\n }\n finishProcessingAppData(dispatch, embedHost, privateApps);\n dispatch(createEmbedUserSignInAction(hostData));\n HttpModule.updateAccessToken(hostData);\n }\n break;\n case Constants.embedMessage.loadMarketplace:\n // PowerBI won't log page load finished until after it fetches and parses\n // the app list from the PowerBI backend\n if (getAppsEndpoint) {\n var _getProductByUrlKey1, _getProductByUrlKey2;\n // This event is used to indicate that the additional data is about to be fetched.\n appDataRequestStart = new Date().getTime();\n const detailsObject = {\n message: '[Start] Partner App data request start (' + ((_getProductByUrlKey1 = getProductByUrlKey({\n urlKey: embedHost\n })) === null || _getProductByUrlKey1 === void 0 ? void 0 : _getProductByUrlKey1.UrlKey) + ')',\n endPoint: getAppsEndpoint,\n receivedFirstNameFromEmbedHost: !!firstName,\n receivedLastNameFromEmbedHost: !!lastName,\n receivedWorkEmailFromEmbedHost: !!workEmail,\n receivedAccessTokenFromEmbedHost: !!accessToken\n };\n const payload = {\n page: 'In App Gallery(' + ((_getProductByUrlKey2 = getProductByUrlKey({\n urlKey: embedHost\n })) === null || _getProductByUrlKey2 === void 0 ? void 0 : _getProductByUrlKey2.UrlKey) + ')',\n action: Constants.Telemetry.Action.NetworkCall,\n actionModifier: Constants.Telemetry.ActionModifier.Start,\n details: JSON.stringify(detailsObject)\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n page: payload.page\n });\n dispatch(fetchEmbedAppData(embedHost, hostData));\n } else if (backendUrlOverride) {\n // This event is used to indicate that the Power BI data is about to be fetched.\n appDataRequestStart = new Date().getTime();\n const detailsObject = {\n message: '[Start] Power BI Request Start. loadMarketplace message Received from Power BI',\n endPoint: backendUrlOverride,\n receivedFirstNameFromEmbedHost: !!firstName,\n receivedLastNameFromEmbedHost: !!lastName,\n receivedWorkEmailFromEmbedHost: !!workEmail,\n receivedAccessTokenFromEmbedHost: !!accessToken\n };\n const payload = {\n page: 'In App Gallery(PowerBI)',\n action: Constants.Telemetry.Action.NetworkCall,\n actionModifier: Constants.Telemetry.ActionModifier.Start,\n details: JSON.stringify(detailsObject)\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n page: payload.page\n });\n dispatch(fetchPowerBIData(hostData));\n }\n hostData.email = workEmail;\n dispatch(createEmbedUserSignInAction(hostData));\n HttpModule.updateAccessToken(hostData);\n break;\n default:\n // eslint-disable-next-line no-useless-return\n return;\n }\n }\n}\nfunction handleError(showErrorModal, hostCorrelationId, error) {\n renderErrorModal(null);\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.MyOrgApps,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: JSON.stringify({\n hostCorrelationId,\n error\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.error(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from '@shared/components/spzaComponent';\nimport { isValidInput, serializeUserProfileEmbedInfo, readUserProfileEmbedCookie } from '@shared/utils/appUtils';\nimport { getCookieItem, saveCookieItem } from '@shared/utils/browserStorageUtils';\nimport { Constants, allBillingCountries } from '@shared/utils/constants';\nimport Animation from '@shared/components/animation';\nimport { getWindow } from '@shared/services/window';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { logger } from '@src/logger';\nimport { Text, Stack, mergeStyleSets, TextField, Dropdown, Link } from '@fluentui/react';\nexport class UserProfileModalData {\n updateUserProfile(user, isEmbedHost, licenseType) {\n this.licenseType = licenseType;\n if (isEmbedHost && (user === null || user === void 0 ? void 0 : user.firstName) === '' && (user === null || user === void 0 ? void 0 : user.lastName) === '' && (user === null || user === void 0 ? void 0 : user.email) === '' && (user === null || user === void 0 ? void 0 : user.isLatestProfile) === false) {\n this.user = _object_spread_props(_object_spread({}, user), {\n phone: '',\n company: '',\n country: '',\n title: '',\n accepted: true\n });\n const userProfileInCookie = getCookieItem(Constants.userProfileEmbedCookieName, false);\n if (userProfileInCookie) {\n readUserProfileEmbedCookie(userProfileInCookie, this.user);\n } else {\n this.firstTimeEmbed = true;\n }\n } else {\n this.user = _object_spread_props(_object_spread({}, user), {\n accepted: true,\n licenses: this.setLicensesToLocalUserProfile(user.licenses)\n });\n }\n }\n setLicensesToLocalUserProfile(newLicenses) {\n if (this.licenseType !== Constants.Dynamics365LicenseType.noLicense && (newLicenses === null || newLicenses === void 0 ? void 0 : newLicenses.length) === Constants.dynamicsLicense.currentD365LicenseNumber) {\n const localLicenses = [];\n for(let i = 0; i < newLicenses.length; i++){\n const licenseInState = newLicenses[`${i}`];\n const licenseNewObj = {\n type: licenseInState.type,\n hasLicense: licenseInState.hasLicense,\n isDisputed: licenseInState.isDisputed\n };\n localLicenses.push(licenseNewObj);\n }\n return localLicenses;\n }\n return [];\n }\n isDirty(originalUser) {\n for(const i in this.user){\n if (i !== 'accepted' && i !== 'licenses') {\n if (originalUser[`${i}`] !== this.user[`${i}`]) {\n return true;\n }\n }\n }\n return false;\n }\n licenseChange(newCurrentLicense, isEmbeddedHost) {\n if (isEmbeddedHost) {\n return false;\n }\n if (newCurrentLicense && this.licenseType === Constants.Dynamics365LicenseType.dynamics365License && this.user.licenses[Constants.Dynamics365LicenseIndex.dynamics365LicenseIndex].isDisputed !== newCurrentLicense.isDisputed) {\n return true;\n }\n if (newCurrentLicense && this.licenseType === Constants.Dynamics365LicenseType.dynamics365forBusinessLicense && this.user.licenses[Constants.Dynamics365LicenseIndex.dynamics365ForBusinessLicenseIndex].isDisputed !== newCurrentLicense.isDisputed) {\n return true;\n }\n return false;\n }\n constructor(user, isEmbedHost, licenseType){\n _define_property(this, \"user\", void 0);\n _define_property(this, \"firstTimeEmbed\", void 0);\n _define_property(this, \"licenseType\", void 0);\n this.updateUserProfile(user, isEmbedHost, licenseType);\n }\n}\nconst userProfileModalClassNames = mergeStyleSets({\n editButton: {\n paddingLeft: 3\n },\n boldText: {\n fontWeight: 600\n },\n doubleCellContainer: {\n [`@media (max-width: 425px)`]: {\n flexWrap: 'wrap'\n }\n },\n secondCell: {\n [`@media (min-width: 425px)`]: {\n marginLeft: 12\n },\n [`@media (max-width: 425px)`]: {\n marginTop: 15\n }\n }\n});\nconst userProfileFieldsContainer = {\n childrenGap: 8\n};\nconst expandedUserProfileTokens = {\n childrenGap: 21\n};\nconst dropDownStyles = {\n callout: {\n maxHeight: 300,\n display: 'flex',\n flexDirection: 'column'\n }\n};\nexport class UserProfileModal extends SpzaComponent {\n shouldProfileBeRendered() {\n const { renderProfile } = this.props;\n return renderProfile;\n }\n UNSAFE_componentWillMount() {\n const { profileCompleted, userLeadgenProfile, isEmbedded, licenseType } = this.props;\n if (!this.shouldProfileBeRendered()) {\n profileCompleted(true);\n } else {\n this.localUserInfo.updateUserProfile(userLeadgenProfile, isEmbedded, licenseType);\n this.checkMandatoryFields();\n }\n }\n onChange(id, value) {\n const { accountInfoUpdate } = this.props;\n this.localUserInfo.user[`${id}`] = value;\n accountInfoUpdate(id, value);\n this.checkMandatoryFields();\n }\n checkMandatoryFields() {\n const { profileCompleted } = this.props;\n profileCompleted(this.mandatoryFieldsDidUpdate());\n }\n mandatoryFieldsDidUpdate() {\n // TODO: Add validation for international phone numbers +52 353 333 7777\n // TODO: Validate phone number with code number.\n const { firstName, lastName, country } = this.localUserInfo.user;\n if (isValidInput(firstName) && isValidInput(lastName) && country && allBillingCountries.some((c)=>c.countryCode === this.localUserInfo.user.country)) {\n return true;\n }\n return false;\n }\n onClickEditButton(eventKeyCode) {\n const { shouldHideAccountInfo } = this.props;\n if (!eventKeyCode || eventKeyCode === Constants.SystemKey.Space || eventKeyCode === Constants.SystemKey.Enter) {\n this.setState((prevState)=>({\n showProfile: true,\n userProfileUpdated: prevState.userProfileUpdated\n }));\n shouldHideAccountInfo();\n }\n }\n renderCompactedUserProfile() {\n return /*#__PURE__*/ _jsx(Stack, {\n horizontal: true,\n children: /*#__PURE__*/ _jsx(Link, {\n className: userProfileModalClassNames.editButton,\n tabIndex: 0,\n role: \"button\",\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onClick: (_)=>this.onClickEditButton(),\n onKeyDown: (event)=>this.onClickEditButton(event.keyCode),\n underline: true,\n children: this.context.loc('UserProfileCompacted_EditButton', 'Edit your details')\n })\n });\n }\n UNSAFE_componentWillReceiveProps(nextProps) {\n const { userLeadgenProfile: currentUserLeadgenProfile, isEmbedded, licenseType, userSubmittedForm: currenttUserSubmittedForm, updateUserProfile, callBackHandler } = this.props;\n const { userLeadgenProfile: nextUserLeadgenProfile, userSubmittedForm: nextUserSubmittedForm, currentLicense } = nextProps;\n if (!this.areEqual(currentUserLeadgenProfile, nextUserLeadgenProfile)) {\n this.localUserInfo.updateUserProfile(nextUserLeadgenProfile, isEmbedded, licenseType);\n }\n if (licenseType && licenseType !== Constants.Dynamics365LicenseType.noLicense && !this.licenseInfoEqual(this.localUserInfo.user.licenses, nextUserLeadgenProfile.licenses)) {\n this.localUserInfo.setLicensesToLocalUserProfile(nextUserLeadgenProfile.licenses);\n }\n if (nextUserSubmittedForm && nextUserSubmittedForm !== currenttUserSubmittedForm) {\n if (this.localUserInfo.isDirty(nextUserLeadgenProfile) || this.localUserInfo.licenseChange(currentLicense, isEmbedded) || nextUserLeadgenProfile.updateRequired) {\n if (!isEmbedded && licenseType && licenseType !== Constants.Dynamics365LicenseType.noLicense && this.localUserInfo.user.licenses && this.localUserInfo.user.licenses.length === Constants.dynamicsLicense.currentD365LicenseNumber) {\n this.localUserInfo.user.licenses[licenseType - 1].isDisputed = currentLicense.isDisputed;\n }\n updateUserProfile(this.localUserInfo.user).then(()=>{\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.Info,\n details: 'User Updated profile, Will run acquisition.'\n };\n this.instrument.probe('logAndFlushTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n if (isEmbedded) {\n saveCookieItem(Constants.userProfileEmbedCookieName, serializeUserProfileEmbedInfo(this.localUserInfo.user));\n }\n callBackHandler();\n });\n } else {\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.Info,\n details: 'User did not updated profile, Will run acquisition.'\n };\n this.instrument.probe('logAndFlushTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n callBackHandler();\n }\n }\n }\n shouldComponentUpdate(nextProps, nextState) {\n const { compactUserProfile: currentCompactUserProfile, userLeadgenProfile: currentUserLeadgenProfile } = this.props;\n const { showProfile: currentShowProfile } = this.state;\n const { showProfile: nextShowProfile } = nextState;\n const { compactUserProfile: nextCompactUserProfile, userLeadgenProfile: nextUserLeadgenProfile } = nextProps;\n return currentShowProfile !== nextShowProfile || currentCompactUserProfile !== nextCompactUserProfile || !this.areEqual(nextUserLeadgenProfile, currentUserLeadgenProfile);\n }\n getDefaultCountry(defaultCountry) {\n const country = this.countryList.find((c)=>c.key === defaultCountry.toUpperCase());\n return country || {\n key: '',\n text: ''\n };\n }\n getCountries() {\n return allBillingCountries.map((c)=>({\n key: c.countryCode,\n text: c.name\n }));\n }\n dropDownCountry(defaultValue) {\n const id = Constants.Country;\n const selectedCountry = defaultValue ? this.getDefaultCountry(defaultValue) : {\n key: '',\n text: ''\n };\n const { key: selectedCountryKey } = selectedCountry;\n return /*#__PURE__*/ _jsx(Stack, {\n children: /*#__PURE__*/ _jsx(Dropdown, {\n options: this.countryList,\n label: this.context.loc('RT_Country', 'Country / region'),\n defaultSelectedKey: selectedCountryKey,\n onChange: (_, option)=>{\n this.onChange(id, option.key.toString());\n },\n placeholder: this.context.loc('Leads_Modal_Country_Placeholder', 'Select country'),\n styles: dropDownStyles,\n disabled: !!selectedCountryKey,\n required: !selectedCountryKey\n })\n });\n }\n inputCell(field, className) {\n const { id, title, placeholder, defaultValue, isRequired } = field;\n return /*#__PURE__*/ _jsx(Stack.Item, {\n grow: true,\n children: /*#__PURE__*/ _jsx(TextField, {\n label: title,\n required: isRequired,\n onChange: (_, value)=>this.onChange(id, value),\n defaultValue: defaultValue || '',\n \"aria-required\": isRequired,\n ariaLabel: title,\n placeholder: placeholder,\n className: className\n }, id + defaultValue)\n });\n }\n doubleInputCells(isRequired, firstCell, secondCell, title) {\n const { id: firstCellId, defaultValue: firstCellDefaultValue, title: firstCellTitle, placeholder: firstCellPlaceholder } = firstCell;\n const { id: secondCellId, defaultValue: secondCellDefaultValue, title: secondCellTitle, placeholder: secondCellPlaceholder } = secondCell;\n return /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n className: userProfileModalClassNames.doubleCellContainer,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n grow: true,\n children: /*#__PURE__*/ _jsx(TextField, {\n required: isRequired,\n label: title,\n onChange: (_, value)=>this.onChange(firstCellId, value),\n defaultValue: firstCellDefaultValue || '',\n ariaLabel: firstCellTitle,\n \"aria-required\": isRequired,\n placeholder: firstCellPlaceholder\n }, firstCellId + firstCellDefaultValue)\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n grow: true,\n align: \"end\",\n children: /*#__PURE__*/ _jsx(TextField, {\n onChange: (_, value)=>this.onChange(secondCellId, value),\n defaultValue: secondCellDefaultValue || '',\n ariaLabel: secondCellTitle,\n \"aria-required\": isRequired,\n placeholder: secondCellPlaceholder,\n className: userProfileModalClassNames.secondCell\n }, secondCellId + secondCellDefaultValue)\n })\n ]\n });\n }\n renderExpandedHeader() {\n const { shouldRenderHeader, isContactForm, getExpandHeaderText } = this.props;\n const text = shouldRenderHeader && isContactForm ? this.context.loc('CTA_UserProfile_Title', 'To continue, we need some basic profile information. We’ve pulled your Microsoft Account data to help you get started.') : '';\n return /*#__PURE__*/ _jsx(Text, {\n variant: \"medium\",\n children: getExpandHeaderText || text\n });\n }\n renderExpandedUserProfile() {\n const { isEmbedded, userLeadgenProfile } = this.props;\n const firstName = {\n id: 'firstName',\n defaultValue: isEmbedded && !this.localUserInfo.user.firstName ? userLeadgenProfile.firstName : this.localUserInfo.user.firstName,\n title: this.context.loc('RT_FirstName', 'First name'),\n placeholder: this.context.loc('RT_FirstName', 'First name')\n };\n const lastName = {\n id: 'lastName',\n defaultValue: isEmbedded && !this.localUserInfo.user.lastName ? userLeadgenProfile.lastName : this.localUserInfo.user.lastName,\n title: this.context.loc('RT_LastName', 'Last name'),\n placeholder: this.context.loc('RT_LastName', 'Last name')\n };\n const title = {\n id: 'title',\n defaultValue: isEmbedded && !this.localUserInfo.user.title ? userLeadgenProfile.title : this.localUserInfo.user.title,\n title: this.context.loc('RT_Title', 'Job title'),\n placeholder: this.context.loc('Leads_Modal_Title_Placeholder', 'Enter your job title')\n };\n const company = {\n id: 'company',\n defaultValue: isEmbedded && !this.localUserInfo.user.company ? userLeadgenProfile.company : this.localUserInfo.user.company,\n title: this.context.loc('RT_Company', 'Company'),\n placeholder: this.context.loc('Leads_Modal_Company_Placeholder', 'Enter your company name')\n };\n const phone = {\n id: 'phone',\n defaultValue: isEmbedded && !this.localUserInfo.user.phone ? userLeadgenProfile.phone : this.localUserInfo.user.phone,\n title: this.context.loc('RT_Phone', 'Phone number'),\n placeholder: this.context.loc('Leads_Modal_Phone_Number_Placeholder', 'Write your phone number')\n };\n return /*#__PURE__*/ _jsxs(Stack, {\n tokens: expandedUserProfileTokens,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: this.renderExpandedHeader()\n }),\n /*#__PURE__*/ _jsxs(Stack, {\n tokens: userProfileFieldsContainer,\n children: [\n this.doubleInputCells(true, firstName, lastName, this.context.loc('RT_Name', 'Name')),\n /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n className: userProfileModalClassNames.doubleCellContainer,\n children: [\n this.inputCell(title),\n this.inputCell(company, userProfileModalClassNames.secondCell)\n ]\n }),\n this.dropDownCountry(isEmbedded && !this.localUserInfo.user.country ? userLeadgenProfile.country : this.localUserInfo.user.country),\n this.inputCell(phone)\n ]\n })\n ]\n });\n }\n renderAnimation() {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"leadGen\",\n children: [\n ' ',\n /*#__PURE__*/ _jsx(Animation, {}),\n ' '\n ]\n });\n }\n componentDidMount() {\n const { getUserProfile } = this.props;\n if (this.shouldGetUserProfile()) {\n getUserProfile();\n } else {\n this.checkMandatoryFields();\n }\n }\n shouldGetUserProfile() {\n const { userLeadgenProfile, isEmbedded } = this.props;\n return !userLeadgenProfile.isLatestProfile && this.shouldProfileBeRendered() && !isEmbedded;\n }\n shouldRenderExpandedProfile() {\n // if update required or one of the user props are not filled out.\n const { showProfile } = this.state;\n return showProfile || !this.mandatoryFieldsDidUpdate() || this.updateRequiredFromAPI();\n }\n updateRequiredFromAPI() {\n const { userLeadgenProfile } = this.props;\n return userLeadgenProfile.updateRequired === true;\n }\n renderImpl() {\n const { compactUserProfile } = this.props;\n if (compactUserProfile) {\n return this.renderCompactedUserProfile();\n } else if (!this.shouldProfileBeRendered()) {\n return null;\n } else if (this.shouldGetUserProfile()) {\n return this.renderAnimation();\n } else if (this.shouldRenderExpandedProfile()) {\n return this.renderExpandedUserProfile();\n } else {\n return this.renderCompactedUserProfile();\n }\n }\n componentDidUpdate(prevProps) {\n const { userLeadgenProfile: currentUserLeadgenProfile } = this.props;\n const { userLeadgenProfile: prevUserLeadgenProfile } = prevProps;\n if (!this.areEqual(prevUserLeadgenProfile, currentUserLeadgenProfile)) {\n this.checkMandatoryFields();\n }\n }\n areEqual(profile, newProfile) {\n return profile.isLatestProfile === newProfile.isLatestProfile && profile.updateRequired === newProfile.updateRequired && profile.firstName === newProfile.firstName && profile.lastName === newProfile.lastName && profile.company === newProfile.company && profile.country === newProfile.country && profile.phone === newProfile.phone && profile.title === newProfile.title && profile.email === newProfile.email;\n }\n licenseInfoEqual(license, newLicense) {\n if (!newLicense || !license) {\n return false;\n }\n if (license.length !== newLicense.length) {\n return false;\n }\n for(let i = 0; i < license.length; i++){\n if (license[`${i}`].isDisputed !== newLicense[`${i}`].isDisputed) {\n return false;\n }\n }\n return true;\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"context\", void 0), _define_property(this, \"instrument\", void 0), _define_property(this, \"countryList\", this.getCountries()), _define_property(this, \"localUserInfo\", new UserProfileModalData(this.props.userLeadgenProfile, this.props.isEmbedded, this.props.licenseType));\n this.instrument = SpzaInstrumentService.getProvider();\n this.state = {\n showProfile: !!this.localUserInfo.firstTimeEmbed || !props.compactUserProfile,\n userProfileUpdated: false\n };\n this.onChange = this.onChange.bind(this);\n }\n}\nUserProfileModal.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n renderErrorModal: PropTypes.func\n};\n","import React from 'react';\nimport { UserProfileModal as UserProfileModalComponent } from '@appsource/components/modals/userProfileModal';\nimport { getUserProfile, updateUserProfile } from '@shared/actions/thunkActions';\nimport { connect } from 'react-redux';\nconst mapStateToProps = (state)=>{\n if (state.config.featureFlags.ProfileExp === 'true') {\n return {\n renderProfile: true,\n userLeadgenProfile: state.users.profile\n };\n }\n return {\n userLeadgenProfile: state.users.profile\n };\n};\nconst mapDispatchToProps = (dispatch)=>{\n return {\n getUserProfile: ()=>dispatch(getUserProfile()),\n updateUserProfile: (profile)=>dispatch(updateUserProfile(profile))\n };\n};\nexport const UserProfileModal = connect(mapStateToProps, mapDispatchToProps)(UserProfileModalComponent);\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { IconButton, Stack, Text, Modal, ScreenWidthMinXLarge, ScreenWidthMinLarge, mergeStyleSets, PrimaryButton } from '@fluentui/react';\nimport { NeutralColors } from '@fluentui/theme';\nimport consentSuccessModalIcon from '@shared/images/consentSuccessModalIcon.png';\nimport { Constants } from '@shared/utils/constants';\nimport { getNpsModule } from '@appsource/utils/nps';\nconst successConsentModalClassNames = mergeStyleSets({\n description: {\n display: 'flex',\n textAlign: 'center',\n flexDirection: 'column'\n },\n centeredText: {\n textAlign: 'center'\n },\n imgSize: {\n width: 100,\n height: 100\n }\n});\nconst iconButtonStyles = {\n root: {\n color: NeutralColors.gray160\n }\n};\nconst modalStyles = {\n main: {\n [`@media (min-width: ${ScreenWidthMinXLarge}px)`]: {\n width: '28%'\n },\n [`@media (min-width: ${ScreenWidthMinLarge}px) and (max-width: ${ScreenWidthMinXLarge}px)`]: {\n width: '50%'\n },\n [`@media (max-width: ${ScreenWidthMinLarge}px)`]: {\n width: '80%'\n },\n display: 'flex',\n maxWidth: 560\n },\n scrollableContent: {\n padding: '16px 27px 24px 24px',\n [`@media (max-width: ${ScreenWidthMinLarge}px)`]: {\n padding: '16px 20px 24px 20px'\n }\n }\n};\nconst cancelIcon = {\n iconName: 'Cancel'\n};\nconst titleAndContentTokens = {\n childrenGap: 60\n};\nconst descriptionAndIconTokens = {\n childrenGap: 20\n};\nconst descriptionTokens = {\n maxWidth: 280\n};\nconst contentAndBottomTokens = {\n childrenGap: 66\n};\nexport const SuccessConsentModal = ({ publisher, dismissModal, shouldSkipModal }, context)=>{\n return /*#__PURE__*/ _jsx(Modal, {\n isOpen: !shouldSkipModal,\n onDismiss: dismissModal,\n styles: modalStyles,\n children: /*#__PURE__*/ _jsxs(Stack, {\n tokens: titleAndContentTokens,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n grow: true,\n className: successConsentModalClassNames.centeredText,\n children: /*#__PURE__*/ _jsx(Text, {\n variant: \"xLarge\",\n children: context.loc('Consent_Modal_Success_Title', 'Thanks for getting in touch!')\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(IconButton, {\n styles: iconButtonStyles,\n iconProps: cancelIcon,\n ariaLabel: \"close\",\n onClick: dismissModal\n })\n })\n ]\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsxs(Stack, {\n tokens: contentAndBottomTokens,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsxs(Stack, {\n horizontalAlign: \"center\",\n tokens: descriptionAndIconTokens,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(\"img\", {\n src: consentSuccessModalIcon,\n alt: context.loc('Success_Consent_Modal_Icon_Name'),\n className: successConsentModalClassNames.imgSize\n })\n }),\n /*#__PURE__*/ _jsxs(Stack.Item, {\n tokens: descriptionTokens,\n className: successConsentModalClassNames.description,\n children: [\n /*#__PURE__*/ _jsxs(Text, {\n variant: \"large\",\n children: [\n context.loc('Success_Consent_Modal_Someone_From', `Someone from`),\n \" \",\n /*#__PURE__*/ _jsx(Text, {\n variant: \"large\",\n className: \"ms-fontWeight-bold\",\n children: publisher\n })\n ]\n }),\n /*#__PURE__*/ _jsx(Text, {\n variant: \"large\",\n className: \"ms-fontWeight-semibold\",\n children: context.loc('Success_Consent_Modal_Will_Contact_You', 'will contact you soon.')\n })\n ]\n })\n ]\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n align: \"end\",\n children: /*#__PURE__*/ _jsx(PrimaryButton, {\n text: context.loc('Dialog_Close'),\n onClick: ()=>{\n var _getNpsModule;\n dismissModal();\n (_getNpsModule = getNpsModule()) === null || _getNpsModule === void 0 ? void 0 : _getNpsModule.ctaClicked();\n },\n \"data-bi-id\": Constants.JsllCTAId.Close,\n \"data-bi-area\": \"Consent Dialog\"\n })\n })\n ]\n })\n })\n ]\n })\n });\n};\nSuccessConsentModal.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Modal, Stack, Text, IconButton, ScreenWidthMinXLarge, ScreenWidthMinLarge, Icon, mergeStyleSets, PrimaryButton } from '@fluentui/react';\nimport { NeutralColors, SharedColors } from '@fluentui/theme';\nconst titleAndContentTokens = {\n childrenGap: 20\n};\nconst contentAndBottomTokens = {\n childrenGap: 24\n};\nconst cancelIcon = {\n iconName: 'Cancel'\n};\nconst iconButtonStyles = {\n root: {\n color: NeutralColors.gray160\n }\n};\nconst infoIconStyles = {\n root: {\n fontSize: 16,\n marginRight: 8,\n color: SharedColors.red20\n }\n};\nconst failureConsentModalClassNames = mergeStyleSets({\n description: {\n color: NeutralColors.gray130\n }\n});\nconst modalStyles = {\n main: {\n [`@media (min-width: ${ScreenWidthMinXLarge}px)`]: {\n width: '30%'\n },\n [`@media (min-width: ${ScreenWidthMinLarge}px) and (max-width: ${ScreenWidthMinXLarge}px)`]: {\n width: '50%'\n },\n [`@media (max-width: ${ScreenWidthMinLarge}px)`]: {\n width: '80%'\n },\n display: 'flex'\n },\n scrollableContent: {\n padding: '16px 27px 24px 24px',\n [`@media (max-width: ${ScreenWidthMinLarge}px)`]: {\n padding: '16px 20px 24px 20px'\n }\n }\n};\nexport const FailureConsentModal = ({ dismissModal, shouldSkipModal, showContactMeError }, context)=>{\n return /*#__PURE__*/ _jsx(Modal, {\n isOpen: !shouldSkipModal,\n onDismiss: dismissModal,\n styles: modalStyles,\n children: /*#__PURE__*/ _jsxs(Stack, {\n tokens: titleAndContentTokens,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n grow: true,\n children: /*#__PURE__*/ _jsx(Text, {\n variant: \"xLarge\",\n children: context.loc('Failure_Consent_Modal_Title', \"Couldn't send contact request\")\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(IconButton, {\n styles: iconButtonStyles,\n iconProps: cancelIcon,\n ariaLabel: context.loc('Dialog_Close'),\n onClick: dismissModal\n })\n })\n ]\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsxs(Stack, {\n tokens: contentAndBottomTokens,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(Icon, {\n iconName: \"Info\",\n styles: infoIconStyles\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(Text, {\n variant: \"medium\",\n className: failureConsentModalClassNames.description,\n children: showContactMeError ? context.loc('ContactMeError_Description_Text', 'There was a problem sending your request. Please try again later.') : context.loc('Failure_Consent_Modal_Description', 'There was a problem sending the contact request. Check your network connection and try again.')\n })\n })\n ]\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n align: \"end\",\n children: /*#__PURE__*/ _jsx(PrimaryButton, {\n text: context.loc('Dialog_Close'),\n ariaLabel: context.loc('Dialog_Close'),\n onClick: dismissModal\n })\n })\n ]\n })\n })\n ]\n })\n });\n};\nFailureConsentModal.contextTypes = {\n loc: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { Stack, Text, IconButton, Modal, ScreenWidthMinXLarge, ScreenWidthMinLarge } from '@fluentui/react';\nimport PropTypes from 'prop-types';\nimport { NeutralColors } from '@fluentui/theme';\nimport { useSelector } from 'react-redux';\nconst modalContentItemsTokens = {\n childrenGap: 20\n};\nconst cancelIcon = {\n iconName: 'Cancel'\n};\nconst iconButtonStyles = {\n root: {\n color: NeutralColors.gray160\n }\n};\nconst modalStyles = {\n main: {\n [`@media (min-width: ${ScreenWidthMinXLarge}px)`]: {\n width: '35%'\n },\n [`@media (min-width: ${ScreenWidthMinLarge}px) and (max-width: ${ScreenWidthMinXLarge}px)`]: {\n width: '60%'\n },\n [`@media (max-width: ${ScreenWidthMinLarge}px)`]: {\n width: '90%'\n },\n display: 'flex'\n },\n scrollableContent: {\n padding: '16px 27px 24px 24px',\n [`@media (max-width: ${ScreenWidthMinLarge}px)`]: {\n padding: '16px 20px 24px 20px'\n }\n }\n};\nexport const ConsentModalContent = ({ showAnimation, handoffTitle, isTransactApp, isContactForm, publisher, shouldSkipModal, dismissModal, children }, context)=>{\n const isEmbedded = useSelector((state)=>state.config.isEmbedded);\n const withAnimationHeaderText = isContactForm ? context.locParams('TRY_ContactMe', [\n publisher || 'the publisher'\n ], `Sending your request to ${[\n publisher || 'the publisher'\n ]}`) : context.locParams('TRY_Redirect', [\n handoffTitle || 'Azure Portal'\n ], `Taking you to ${[\n handoffTitle || 'Azure Portal'\n ]} to complete this process`);\n const headerText = isEmbedded && !isContactForm ? context.loc('Confirm_to_continue_Modal_Title', 'Confirm to continue') : !isTransactApp && !isContactForm ? context.loc('Confirm_Details_Modal_Title', 'Confirm your details to continue') : isContactForm ? context.locParams('Contact_Me_Modal_Title', [\n publisher\n ], `Ask someone from ${publisher} to contact you`) : null;\n return /*#__PURE__*/ _jsx(Modal, {\n isOpen: !shouldSkipModal,\n onDismiss: dismissModal,\n styles: modalStyles,\n children: /*#__PURE__*/ _jsxs(Stack, {\n tokens: modalContentItemsTokens,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n grow: true,\n children: showAnimation ? /*#__PURE__*/ _jsx(Text, {\n variant: \"xLarge\",\n children: withAnimationHeaderText\n }) : /*#__PURE__*/ _jsx(Text, {\n variant: \"xLarge\",\n children: headerText\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(IconButton, {\n styles: iconButtonStyles,\n iconProps: cancelIcon,\n ariaLabel: context.loc('Dialog_Close', 'Close'),\n onClick: dismissModal\n })\n })\n ]\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: children\n })\n ]\n })\n });\n};\nConsentModalContent.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n renderErrorModal: PropTypes.func,\n buildHref: PropTypes.func\n};\n","const URL_PATTERN = /((http|ftp|https):\\/\\/)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/i;\nexport const containsURLOrEmail = (input)=>{\n if (input && input.trim().length > 0) {\n return URL_PATTERN.test(input.trim());\n }\n return false;\n};\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React from 'react';\nimport * as PropTypes from 'prop-types';\nimport Animation from '@shared/components/animation';\nimport SpzaComponent from '@shared/components/spzaComponent';\nimport { dynamicsLicenseTypeForEmbed, setInitialLocalLicenseStore, setInitialLicenseDisplayText, isTransactApp, getTrailIdAndData, dynamicsLicenseType, readUserProfileEmbedCookie, getAppTelemetryDetailContentText, getServiceTelemetryDetailContentText, shouldDownloadPowerBIVisual, getActionStringForCTAType, isPowerBIVisualsApp, processHandoffURLAndTitle, isOpenInNewWindowButton, openInNewWindow, getProductByUrlKey, generateGuid } from '@shared/utils/appUtils';\nimport { Constants, OfferType } from '@shared/utils/constants';\nimport { getLocalStorageItem, getCookieItem } from '@shared/utils/browserStorageUtils';\nimport { postEmbedAcquisitionMessage } from '@embed/embedMessaging';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { NpsModule } from '@shared/utils/npsUtils';\nimport { UserProfileModal } from '@appsource/containers/modals/userProfileModal';\nimport { isLeadgenEnabled, isETERunning } from '@shared/utils/modals';\nimport { urlPush, routes } from '@shared/routerHistory';\nimport { getNpsModule } from '@appsource/utils/nps';\nimport { logger } from '@src/logger';\nimport { Stack, Text, mergeStyleSets, PrimaryButton, Icon, ScreenWidthMinXLarge, ScreenWidthMinLarge, TextField } from '@fluentui/react';\nimport { NeutralColors, CommunicationColors } from '@fluentui/theme';\nimport { TelemetryImage } from '@shared/components/telemetryImage';\nimport classNames from 'classnames';\nimport { SuccessConsentModal } from '@appsource/components/modals/successConsentModal';\nimport { FailureConsentModal } from '@appsource/components/modals/failureConsentModal';\nimport { SafeHtmlWrapper } from '@shared/components/safeHtmlWrapper';\nimport { ConsentModalContent } from './consentModalContent';\nimport { getTooltipSilentLogIn } from '@shared/utils/silentLogInUtils';\nimport { useTelemetry } from '@shared/hooks/useTelemetry';\nimport { containsURLOrEmail } from '@shared/utils/InputValidationUtils';\nimport { openInNewWindowButtonStyles } from '@shared/components/contentStyles';\nimport { hidePowerBiVisualPricing } from '@shared/utils/pricing';\nimport { stringifyError } from '@shared/utils/errorUtils';\n// eslint-disable-next-line react-hooks/rules-of-hooks\nconst [{ pageAction }] = useTelemetry();\nconst modalStyles = {\n main: {\n [`@media (min-width: ${ScreenWidthMinXLarge}px)`]: {\n width: '35%'\n },\n [`@media (min-width: ${ScreenWidthMinLarge}px) and (max-width: ${ScreenWidthMinXLarge}px)`]: {\n width: '60%'\n },\n [`@media (max-width: ${ScreenWidthMinLarge}px)`]: {\n width: '90%'\n },\n display: 'flex'\n },\n scrollableContent: {\n padding: '16px 27px 24px 24px',\n [`@media (max-width: ${ScreenWidthMinLarge}px)`]: {\n padding: '16px 20px 24px 20px'\n }\n }\n};\nconst infoIconStyles = {\n root: {\n fontSize: 16,\n marginRight: 8\n }\n};\nconst consentModalClassNames = mergeStyleSets({\n appImg: {\n width: 44,\n height: 44,\n padding: 4,\n border: `1px solid ${NeutralColors.gray20}`\n },\n appImgContainer: {\n marginRight: 8,\n width: 44,\n height: 44\n },\n boldText: {\n fontWeight: 600\n },\n desclaimerContainer: {\n backgroundColor: NeutralColors.gray20,\n marginBottom: 20,\n marginTop: 12,\n '& a:link': {\n color: CommunicationColors.primary,\n textDecoration: 'underline'\n },\n '& a:visited': {\n color: CommunicationColors.primary\n },\n '& a:hover': {\n color: CommunicationColors.shade20\n },\n '& a:active': {\n color: CommunicationColors.shade30\n }\n },\n userProfileContainer: {\n marginBottom: 8\n },\n notes: {\n marginBottom: 8\n },\n animationImg: {\n display: 'flex',\n justifyContent: 'center'\n }\n});\nconst loginUserInfoTokens = {\n padding: '20px 0px 4px'\n};\nconst desclaimerTokens = {\n padding: 8\n};\nconst animationStackTokens = {\n childrenGap: 25\n};\n/** These offer types should not trigger sending leads */ const offerTypesWithoutLeads = [\n Constants.PowerBI.visuals\n];\nexport class ConsentModal extends SpzaComponent {\n isMandatoryFieldsFilled({ firstName, lastName, email, country }) {\n return !!(firstName && lastName && email && country);\n }\n telemetry(action, actionModifier, details) {\n const { trailId } = this.state;\n const { location } = this.props;\n const payload = {\n page: location === null || location === void 0 ? void 0 : location.pathname,\n action,\n actionModifier,\n details: JSON.stringify(_object_spread({\n trailId\n }, details))\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n page: payload.page\n });\n }\n logConsentDialogEvents(action, actionModifier, details = this.getTelemetryDetailsContent()) {\n const { appInfo, serviceInfo, location } = this.props;\n const entityInfo = appInfo || serviceInfo;\n const payload = {\n page: location === null || location === void 0 ? void 0 : location.pathname,\n action,\n actionModifier,\n appName: entityInfo && entityInfo.entityId,\n details\n };\n this.instrument.probe('logAndFlushTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n appName: payload.appName\n });\n }\n setAccountInfo(consentProps) {\n const { userProfile, isEmbedded, appInfo } = consentProps;\n this.licenseType = isEmbedded ? dynamicsLicenseTypeForEmbed(appInfo.products) : appInfo ? dynamicsLicenseType(userProfile, appInfo.products) : -1;\n this.setState({\n accountInfo: {\n firstName: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.firstName) ? userProfile.firstName : '',\n lastName: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.lastName) ? userProfile.lastName : '',\n email: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.email) ? userProfile.email : '',\n title: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.title) ? userProfile.title : '',\n company: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.company) ? userProfile.company : '',\n country: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.country) ? userProfile.country : '',\n phone: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.phone) ? userProfile.phone : ''\n },\n localLicenseStore: (this.licenseType === Constants.Dynamics365LicenseType.dynamics365License || this.licenseType === Constants.Dynamics365LicenseType.dynamics365forBusinessLicense) && !isEmbedded ? setInitialLocalLicenseStore(userProfile.licenses, this.licenseType) : null,\n licenseDisplayText: (this.licenseType === Constants.Dynamics365LicenseType.dynamics365License || this.licenseType === Constants.Dynamics365LicenseType.dynamics365forBusinessLicense) && !isEmbedded ? setInitialLicenseDisplayText(userProfile.licenses, this.licenseType) : ''\n });\n }\n isCTAShouldSkipModal() {\n const { ctaType, isEmbedded, modal } = this.props;\n const isOpenedFromPDP = modal === null || modal === void 0 ? void 0 : modal.isOpenedFromPDP;\n const shouldCTATypeBeSkip = [\n Constants.CTAType.Get,\n Constants.CTAType.Try\n ].includes(ctaType);\n return isOpenedFromPDP && !isEmbedded && shouldCTATypeBeSkip;\n }\n /** Determines whether should skip the consent modal */ shouldSkipModal(userProfile) {\n const { isContactForm, isEmbedded, appInfo } = this.props;\n if (isContactForm) {\n return false;\n }\n if (isEmbedded && isPowerBIVisualsApp(appInfo)) {\n return true;\n }\n return this.isCTAShouldSkipModal() && this.isMandatoryFieldsFilled(userProfile);\n }\n componentDidMount() {\n const { isTransactApp, appInfo, fetchAppDetails, userProfile, userInfo, isContactForm, dismissModal, isEmbedded } = this.props;\n this.handoffTitle = appInfo && appInfo.builtFor;\n this.setState({\n isEmbeddedApp: isEmbedded && !isContactForm\n });\n if (this.shouldSkipModal(userProfile)) {\n this.logConsentDialogEvents(Constants.Telemetry.ActionModifier.ConsentModal, Constants.Telemetry.Action.Skip, JSON.stringify({\n AutomaticallyAccepted: true\n }));\n this.setState({\n shouldSkipModal: true\n });\n // Embed doesn't dismiss the modal when skipping it, so dismiss manually\n if (!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.signedIn) && isEmbedded) {\n dismissModal();\n }\n this.handleContinue(userProfile);\n } else if (this.isCTAShouldSkipModal() && !this.isMandatoryFieldsFilled(userProfile) && !(userInfo === null || userInfo === void 0 ? void 0 : userInfo.loading)) {\n this.logConsentDialogEvents(Constants.Telemetry.ActionModifier.ConsentModal, Constants.Telemetry.Action.Open, JSON.stringify({\n AutomaticallyAccepted: false\n }));\n } else {\n this.logConsentDialogEvents(Constants.Telemetry.ActionModifier.ConsentModal, Constants.Telemetry.Action.Open);\n }\n if (isTransactApp) {\n this.handleTransactCheckout(this.props);\n }\n // For the privacy policy URL to show up, we need the app details.\n if (appInfo && appInfo.detailInformation == null) {\n fetchAppDetails(appInfo);\n } else if (appInfo) {\n this.setState({\n appPrivacyPolicyUrl: appInfo.detailInformation.PrivacyPolicyUrl\n });\n }\n if (userInfo.loading && !isContactForm && this.isCTAShouldSkipModal()) {\n this.setState({\n showAnimation: true\n });\n }\n }\n UNSAFE_componentWillReceiveProps(nextProps) {\n const { userProfile: currentUserProfile, appInfo: currentAppInfo, isLoadingUserProfile: currentIsLoadingUserProfile } = this.props;\n const { userProfile: nextUserProfile, appInfo: nextAppInfo, userInfo: nextUserInfo, isLoadingUserProfile: nextIsLoadingUserProfile, isContactForm: nextIsContactForm, serviceInfo: nextServiceInfo } = nextProps;\n if (nextProps.isTransactApp) {\n this.handleTransactCheckout(nextProps);\n }\n if (nextAppInfo && currentAppInfo && nextAppInfo.detailInformation && currentAppInfo.detailInformation !== nextAppInfo.detailInformation) {\n this.setState({\n appPrivacyPolicyUrl: nextAppInfo.detailInformation.PrivacyPolicyUrl\n });\n }\n if (nextUserProfile.firstName !== '' && currentUserProfile.firstName === '' || nextUserProfile.lastName !== '' && currentUserProfile.lastName === '' || nextUserProfile.company !== '' && currentUserProfile.company === '' || nextUserProfile.country !== '' && currentUserProfile.country === '' || nextUserProfile.email !== '' && currentUserProfile.email === '' || nextUserProfile.phone !== '' && currentUserProfile.phone === '' || nextUserProfile.title !== '' && currentUserProfile.title === '') {\n this.setAccountInfo(nextProps);\n }\n if (!nextUserInfo.loading) {\n if (this.shouldSkipModal(nextUserProfile) && !this.shouldSkipModal(currentUserProfile)) {\n this.logConsentDialogEvents(Constants.Telemetry.ActionModifier.ConsentModal, Constants.Telemetry.Action.Skip, JSON.stringify({\n AutomaticallyAccepted: true\n }));\n this.setState({\n shouldSkipModal: true\n });\n this.handleContinue(nextUserProfile);\n } else if (this.isCTAShouldSkipModal() && !this.isMandatoryFieldsFilled(nextUserProfile)) {\n this.logConsentDialogEvents(Constants.Telemetry.ActionModifier.ConsentModal, Constants.Telemetry.Action.Open, JSON.stringify({\n AutomaticallyAccepted: false\n }));\n }\n }\n if (!nextIsLoadingUserProfile && currentIsLoadingUserProfile !== nextIsLoadingUserProfile) {\n this.userProfilePostLoadingActions(nextUserProfile, nextIsContactForm, nextServiceInfo);\n }\n }\n userProfilePostLoadingActions(userProfile, isContactForm, serviceInfo) {\n this.setState({\n forceUserProfileCompacted: !isContactForm && !serviceInfo && this.isMandatoryFieldsFilled(userProfile)\n });\n if (!this.isCTAShouldSkipModal()) {\n this.setState({\n showAnimation: false\n });\n }\n }\n handleTransactCheckout(props) {\n const { userInfo, modal, dismissModal, appInfo: { entityId } = {} } = props;\n this.logConsentDialogEvents(Constants.Telemetry.Action.Open, Constants.Telemetry.ActionModifier.HandleTransactCheckout, JSON.stringify({\n tenantType: userInfo.tenantType\n }));\n if (userInfo && userInfo.signedIn && !userInfo.isMSAUser && userInfo.tenantType !== Constants.TenantType.Msa) {\n var _modal_options;\n this.logConsentDialogEvents(Constants.Telemetry.Action.Redirecting, Constants.Telemetry.ActionModifier.HandleTransactCheckout, 'Redirecting to checkout page');\n urlPush(this.context.buildHref(routes.checkout, {\n entityId\n }, {\n [Constants.Checkout.DefaultPlanIdQueryParam]: modal === null || modal === void 0 ? void 0 : (_modal_options = modal.options) === null || _modal_options === void 0 ? void 0 : _modal_options.planId\n }, true, false, true));\n dismissModal();\n } else {\n this.logConsentDialogEvents(Constants.Telemetry.Action.Error, Constants.Telemetry.ActionModifier.HandleTransactCheckout, JSON.stringify({\n tenantType: userInfo.tenantType,\n isMSAUser: userInfo.isMSAUser,\n isSignedIn: userInfo.signedIn\n }));\n this.setState({\n showUserSignInError: true\n });\n }\n }\n updateUserLicenseInState() {\n const { updateLicense } = this.props;\n const { localLicenseStore } = this.state;\n updateLicense(this.licenseType, localLicenseStore);\n }\n shouldProcessLead() {\n var _getProductByUrlKey;\n const { isEmbedded, embedHost } = this.props;\n const productShouldntGenerateLead = offerTypesWithoutLeads.includes((_getProductByUrlKey = getProductByUrlKey({\n urlKey: embedHost\n })) === null || _getProductByUrlKey === void 0 ? void 0 : _getProductByUrlKey.UrlKey);\n if (isEmbedded && productShouldntGenerateLead) {\n return false;\n }\n return true;\n }\n shouldProcessLeadInfo() {\n const { appInfo, serviceInfo, flightCodes, embedHost, userInfo, isEmbedded } = this.props;\n const isService = !!serviceInfo;\n const uniqueProductId = isService ? serviceInfo.entityId : appInfo === null || appInfo === void 0 ? void 0 : appInfo.entityId;\n if (!(userInfo === null || userInfo === void 0 ? void 0 : userInfo.signedIn)) {\n this.telemetry(Constants.Telemetry.Action.ProcessLeadInfo, Constants.Telemetry.ActionModifier.Skip, {\n reason: Constants.Telemetry.LeadsDropReason.UserNotSignedIn,\n uniqueProductId,\n isEmbedded,\n embedHost\n });\n return false;\n }\n if (flightCodes) {\n this.telemetry(Constants.Telemetry.Action.ProcessLeadInfo, Constants.Telemetry.ActionModifier.Skip, {\n reason: Constants.Telemetry.LeadsDropReason.PreviewOffer,\n uniqueProductId,\n isEmbedded,\n embedHost\n });\n return false;\n }\n if (!isService) {\n if (!appInfo || appInfo.privateApp === true) {\n this.telemetry(Constants.Telemetry.Action.ProcessLeadInfo, Constants.Telemetry.ActionModifier.Skip, {\n reason: Constants.Telemetry.LeadsDropReason.AppNotAvailableOrPrivate,\n uniqueProductId,\n isEmbedded,\n embedHost\n });\n return false;\n }\n }\n if (!this.shouldProcessLead()) {\n this.telemetry(Constants.Telemetry.Action.ProcessLeadInfo, Constants.Telemetry.ActionModifier.Skip, {\n reason: Constants.Telemetry.LeadsDropReason.EmbedWithoutLead,\n uniqueProductId,\n isEmbedded,\n embedHost\n });\n return false;\n }\n return true;\n }\n processLeadInfo() {\n var _this = this;\n return _async_to_generator(function*() {\n const { ctaType, appInfo, sendLeadInfo, isContactForm, serviceInfo, isEmbedded, embedHost } = _this.props;\n const { notes } = _this.state;\n const isService = !!serviceInfo;\n const item = isService ? serviceInfo : appInfo;\n try {\n _this.telemetry(Constants.Telemetry.Action.ProcessLeadInfo, Constants.Telemetry.ActionModifier.Start, {\n data: `Processing the lead. isService is ${isService}.`,\n uniqueProductId: item.entityId,\n isEmbedded,\n embedHost\n });\n if (_this.shouldProcessLeadInfo()) {\n yield sendLeadInfo({\n item,\n ctaType,\n notes\n });\n _this.telemetry(Constants.Telemetry.Action.ProcessLeadInfo, Constants.Telemetry.ActionModifier.End, {\n uniqueProductId: item.entityId,\n isEmbedded,\n embedHost\n });\n }\n } catch (error) {\n const shouldStopFlow = isContactForm || isService;\n _this.telemetry(Constants.Telemetry.Action.ProcessLeadInfo, Constants.Telemetry.ActionModifier.Error, {\n error,\n shouldStopFlow,\n uniqueProductId: item.entityId,\n isEmbedded,\n embedHost\n });\n if (shouldStopFlow) {\n throw error;\n }\n }\n })();\n }\n handleContinueHelper(showAnimation = true, shouldGenerateLead = true) {\n const { getUserAuthStatus, serviceInfo, isContactForm, ctaType, isEmbedded, appInfo, openDriveModal, embedHost, dismissModal, signOutUser, featureFlags, billingCountryCode } = this.props;\n const { isEmbeddedApp } = this.state;\n if (this.licenseType && this.licenseType !== -1) {\n this.updateUserLicenseInState();\n }\n var _this = this;\n getUserAuthStatus().then(/*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(result) {\n if (isEmbeddedApp || result.status !== Constants.SigninStatus.ExpiredTokenInvalidCookie) {\n try {\n _this.setState({\n showAnimation: true\n });\n const { url, handoffTitle } = processHandoffURLAndTitle(appInfo);\n const isOpenInNewWindow = (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.openInNewWindowButton) && isOpenInNewWindowButton({\n isEmbedded,\n ctaType,\n appData: appInfo,\n billingRegion: billingCountryCode,\n url\n });\n const actions = [\n _this.processLeadInfo()\n ];\n yield Promise.all(actions);\n _this.setState({\n showAnimation: false\n });\n if (serviceInfo || isContactForm) {\n _this.setState({\n showSuccessDialog: true\n });\n }\n if (!shouldGenerateLead) {\n _this.logConsentDialogEvents(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.CTAInfo, 'User choose not to generate lead');\n }\n if (isEmbedded && !isContactForm) {\n // TODO : Publish lead in embed experience using the host data\n // We need to fetch lastName, firstName and email. If firstName/lastName are null, use FNU/LNU\n postEmbedAcquisitionMessage(appInfo, ctaType, embedHost);\n setTimeout(()=>{\n dismissModal();\n }, 1000);\n return;\n }\n if (!isContactForm && !serviceInfo) {\n var _getNpsModule;\n if (shouldDownloadPowerBIVisual(appInfo, isEmbedded)) {\n _this.handlePowerBIVisualDownload();\n return;\n }\n if (handoffTitle) {\n _this.handoffTitle = handoffTitle;\n }\n _this.logOutgoingHandoffRedirect(url);\n if (!url) {\n dismissModal();\n return;\n }\n NpsModule.IncreaseAppAcquisition();\n (_getNpsModule = getNpsModule()) === null || _getNpsModule === void 0 ? void 0 : _getNpsModule.ctaClicked(false);\n if (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.openInNewWindowButton) {\n if (showAnimation) {\n _this.setState({\n showAnimation: true,\n handoffUrl: url\n });\n dismissModal();\n }\n openInNewWindow(url);\n } else {\n if (showAnimation) {\n _this.setState({\n showAnimation: true,\n handoffUrl: url\n });\n setTimeout(function() {\n window.open(url, '_self');\n }, 2500);\n } else {\n window.open(url, '_self');\n }\n }\n }\n } catch (error) {\n const errorString = stringifyError(error);\n const actionModifier = isContactForm ? Constants.Telemetry.ActionModifier.SubmitLeadGen : Constants.Telemetry.ActionModifier.ConsentModal;\n const action = errorString === Constants.Telemetry.Action.RefreshToken ? Constants.Telemetry.Action.RefreshToken : Constants.Telemetry.Action.Error;\n _this.logConsentDialogEvents(action, actionModifier, errorString);\n if (errorString === Constants.Telemetry.Action.RefreshToken) {\n signOutUser();\n }\n if (isContactForm || serviceInfo) {\n _this.setState({\n showContactMeError: true,\n showAnimation: false\n });\n } else {\n _this.setState({\n showAnimation: false\n });\n }\n }\n }\n });\n return function(result) {\n return _ref.apply(this, arguments);\n };\n }());\n }\n hideAccountInfoUI() {\n const { forceUserProfileCompacted } = this.state;\n if (forceUserProfileCompacted) {\n this.setState({\n forceUserProfileCompacted: false\n });\n }\n this.setState({\n showAccountInfo: true\n });\n }\n onUpdateAccountInfo(key, value) {\n this.setState({\n accountInfo: this.updateAccountInfo(key, value)\n });\n }\n updateAccountInfo(key, value) {\n const { accountInfo } = this.state;\n const newAccountInfo = {\n firstName: accountInfo.firstName,\n lastName: accountInfo.lastName,\n email: accountInfo.email,\n title: accountInfo.title,\n company: accountInfo.company,\n country: accountInfo.country,\n phone: accountInfo.phone\n };\n newAccountInfo[`${key}`] = value;\n return newAccountInfo;\n }\n handlePowerBIVisualDownload() {\n const { appInfo, location, openInstructionsModal, dismissModal } = this.props;\n if (appInfo === null || appInfo === void 0 ? void 0 : appInfo.downloadLink) {\n const payload = {\n page: location.pathname,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.DownloadPBIVisual,\n appName: appInfo.entityId\n };\n this.instrument.probe(Constants.Telemetry.ProbeName.LogInfo, payload);\n logger.info('', {\n action: payload.action,\n actionModifier: payload.actionModifier,\n appName: payload.appName\n });\n window.location.href = appInfo.downloadLink;\n if (!getLocalStorageItem(Constants.LocalStorage.dontShowInstructions)) {\n openInstructionsModal();\n } else {\n dismissModal();\n }\n }\n }\n handleContinue(userProfile, showAnimation = true, shouldGenerateLead = true) {\n const { isEmbeddedApp } = this.state;\n const { query, updatePurchaseStatus, isContactForm, appInfo, serviceInfo } = this.props;\n const { entityId } = appInfo || serviceInfo;\n const shouldGenerateLeadGen = shouldGenerateLead && !isETERunning(query);\n getTrailIdAndData(true, 'consent form - continue btn');\n if (!isEmbeddedApp && !this.shouldSkipModal(userProfile)) {\n const actionModifier = isContactForm ? Constants.Telemetry.ActionModifier.SubmitLeadGen : Constants.Telemetry.ActionModifier.ConsentModal;\n this.logConsentDialogEvents(Constants.Telemetry.Action.Click, actionModifier);\n this.logConsentTelemetry({\n contentId: Constants.JsllCTAId.Continue,\n areaName: Constants.Telemetry.AreaName.ConsentModal,\n entityId\n });\n this.setState({\n formSubmitted: true\n });\n } else {\n this.logConsentTelemetry({\n contentId: Constants.Telemetry.ContentType.SkipConsentModal,\n areaName: Constants.Telemetry.AreaName.ConsentModal,\n entityId\n });\n this.handleContinueHelper(showAnimation, shouldGenerateLeadGen);\n }\n updatePurchaseStatus();\n }\n logConsentTelemetry({ contentId, areaName, entityId }) {\n pageAction(null, {\n content: {\n contentId,\n areaName,\n contentName: entityId\n }\n });\n }\n getTelemetryDetailsContent() {\n const { trailId } = this.state;\n const { appInfo, serviceInfo, isContactForm, isNationalCloud, ctaType, currentView } = this.props;\n const { shouldSkipModal } = this.state;\n const entityInfo = appInfo || serviceInfo;\n const hasCheckbox = !isContactForm;\n const hasUserProfile = !shouldSkipModal || !!serviceInfo;\n // application\n if (appInfo) {\n return getAppTelemetryDetailContentText({\n appInfo: entityInfo,\n isNationalCloud,\n ctaTypes: [\n ctaType\n ],\n consentDialogHasUserProfile: hasUserProfile,\n consentDialogHasCheckbox: hasCheckbox,\n currentView,\n trailId\n });\n }\n // consulting services\n return getServiceTelemetryDetailContentText({\n serviceInfo: entityInfo,\n isNationalCloud,\n ctaTypes: [\n ctaType\n ],\n consentDialogHasUserProfile: hasUserProfile,\n consentDialogHasCheckbox: hasCheckbox,\n currentView,\n trailId\n });\n }\n profileCompleted(profileFilledOut) {\n const { isProfileCompleted } = this.state;\n if (isProfileCompleted !== profileFilledOut) {\n this.setState({\n isProfileCompleted: profileFilledOut\n });\n }\n }\n disableSubmitButton() {\n const { showUserSignInError, shouldSkipModal, isProfileCompleted, isNotesInvalid } = this.state;\n const { isContactForm } = this.props;\n if (showUserSignInError) {\n return false;\n }\n if (!shouldSkipModal) {\n return !isProfileCompleted || isContactForm && isNotesInvalid;\n }\n return isLeadgenEnabled();\n }\n getTermsLink() {\n const { appInfo } = this.props;\n const terms = {};\n if (appInfo === null || appInfo === void 0 ? void 0 : appInfo.UsesEnterpriseContract) {\n terms.link = Constants.enterpriseContractLink;\n terms.locKey = 'ECA_Link';\n return terms;\n }\n terms.link = appInfo.licenseTermsUrl;\n terms.locKey = 'TRY_Terms2';\n return terms;\n }\n renderConsentDisclaimer() {\n const { ctaType, isContactForm, appInfo } = this.props;\n const terms = appInfo && this.getTermsLink();\n const { appPrivacyPolicyUrl } = this.state;\n return /*#__PURE__*/ _jsx(\"div\", {\n children: /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n tokens: desclaimerTokens,\n className: consentModalClassNames.desclaimerContainer,\n children: [\n /*#__PURE__*/ _jsx(Icon, {\n iconName: \"info\",\n styles: infoIconStyles\n }),\n isContactForm ? /*#__PURE__*/ _jsx(SafeHtmlWrapper, {\n html: this.context.locParams('Contact_Me_Consent_Disclaimer', [\n `<a href='${Constants.MicrosoftTermsURL}' rel='noreferrer' target='_blank'>${this.context.loc('RT_Terms', 'terms')}</a>`\n ])\n }) : appInfo ? /*#__PURE__*/ _jsx(SafeHtmlWrapper, {\n html: this.context.locParams('App_Consent_Disclaimer', [\n `<b>${this.context.loc(getActionStringForCTAType(ctaType))}</b>`,\n `<a href='${terms.link}' rel='noreferrer' target='_blank'>${this.context.loc('Provider_Terms', 'terms of use')}</a>`,\n `<a href='${appPrivacyPolicyUrl}' rel='noreferrer' target='_blank'>${this.context.loc('TRY_PrivacyPolicy', 'privacy policy')}</a>`,\n `<a href='${Constants.MicrosoftTermsURL}' rel='noreferrer' target='_blank'>${this.context.loc('TRY_Terms', 'terms')}</a>`,\n `<a href='${Constants.MicrosoftPrivacyStatementURL}' rel='noreferrer' target='_blank'>${this.context.loc('TRY_Privacy', 'privacy')}</a>`\n ])\n }) : /*#__PURE__*/ _jsx(SafeHtmlWrapper, {\n html: this.context.locParams('CS_Consent_Disclaimer', [\n `<a href='${Constants.MicrosoftTermsURL}' rel='noreferrer' target='_blank'>${this.context.loc('TRY_Terms', 'terms')}</a>`,\n `<a href='${Constants.MicrosoftPrivacyStatementURL}' rel='noreferrer' target='_blank'>${this.context.loc('TRY_Privacy', 'privacy')}</a>`\n ])\n })\n ]\n })\n });\n }\n renderConsentBottomBar() {\n const { appInfo, isContactForm, isEmbedded, billingCountryCode, ctaType, serviceInfo, dismissModal, userProfile, isLoadingUserProfile } = this.props;\n const { showUserSignInError, isEmbeddedApp } = this.state;\n let ctaButton;\n const isCTADisabled = !isEmbeddedApp && (this.disableSubmitButton() || isLoadingUserProfile);\n if (isContactForm || !!serviceInfo) {\n ctaButton = /*#__PURE__*/ _jsx(PrimaryButton, {\n name: \"button\",\n text: this.context.loc('CTA_ContactMe', 'Contact me'),\n type: \"submit\",\n \"data-bi-id\": Constants.JsllCTAId.Continue,\n \"data-bi-name\": appInfo === null || appInfo === void 0 ? void 0 : appInfo.entityId,\n \"data-bi-type\": (appInfo === null || appInfo === void 0 ? void 0 : appInfo.offerType) === OfferType.SaaSApp ? isTransactApp({\n isEmbedded,\n ctaTypes: appInfo.ctaTypes,\n appData: appInfo,\n billingRegion: billingCountryCode\n }) ? Constants.JsllSaas.SaasTransactable : Constants.JsllSaas.SaasNonTransactable : '',\n \"data-bi-area\": \"Consent Dialog\",\n onClick: ()=>this.handleContinue(userProfile),\n disabled: isCTADisabled\n });\n } else {\n var _this_props_featureFlags;\n const { url } = processHandoffURLAndTitle(appInfo);\n const isOpenInNewWindow = ((_this_props_featureFlags = this.props.featureFlags) === null || _this_props_featureFlags === void 0 ? void 0 : _this_props_featureFlags.openInNewWindowButton) && isOpenInNewWindowButton({\n isEmbedded,\n ctaType,\n appData: appInfo,\n billingRegion: billingCountryCode,\n url\n });\n const isPBIVisualPriceHidden = hidePowerBiVisualPricing({\n app: appInfo,\n isEmbedded\n });\n ctaButton = /*#__PURE__*/ _jsx(PrimaryButton, {\n className: classNames({\n [openInNewWindowButtonStyles.openInNewWindowButton]: isOpenInNewWindow\n }),\n text: isPBIVisualPriceHidden && ctaType === Constants.CTAType.Install ? this.context.loc('CTA_Install_free', 'Install free') : this.context.loc(getActionStringForCTAType(ctaType)),\n name: \"button\",\n type: \"submit\",\n \"data-bi-id\": Constants.JsllCTAId.Continue,\n \"data-bi-name\": appInfo === null || appInfo === void 0 ? void 0 : appInfo.entityId,\n \"data-bi-type\": (appInfo === null || appInfo === void 0 ? void 0 : appInfo.offerType) === OfferType.SaaSApp ? isTransactApp({\n isEmbedded,\n ctaTypes: appInfo.ctaTypes,\n appData: appInfo,\n billingRegion: billingCountryCode\n }) ? Constants.JsllSaas.SaasTransactable : Constants.JsllSaas.SaasNonTransactable : '',\n \"data-bi-area\": \"Consent Dialog\",\n onClick: ()=>showUserSignInError ? dismissModal() : this.handleContinue(userProfile),\n disabled: isCTADisabled,\n iconProps: isOpenInNewWindow ? {\n iconName: 'OpenInNewWindow'\n } : {}\n });\n }\n return /*#__PURE__*/ _jsx(Stack.Item, {\n align: \"end\",\n children: getTooltipSilentLogIn(ctaButton, isLoadingUserProfile)\n });\n }\n renderUserProfileModal() {\n const { isEmbedded, isContactForm } = this.props;\n const { formSubmitted, localLicenseStore, forceUserProfileCompacted, shouldSkipModal } = this.state;\n return !shouldSkipModal && /*#__PURE__*/ _jsx(Stack, {\n className: consentModalClassNames.userProfileContainer,\n children: /*#__PURE__*/ _jsx(UserProfileModal, {\n isEmbedded: isEmbedded,\n userSubmittedForm: formSubmitted,\n profileCompleted: this.profileCompleted.bind(this),\n callBackHandler: this.handleContinueHelper.bind(this),\n shouldHideAccountInfo: this.hideAccountInfoUI.bind(this),\n licenseType: this.licenseType,\n currentLicense: localLicenseStore,\n compactUserProfile: forceUserProfileCompacted,\n accountInfoUpdate: this.onUpdateAccountInfo.bind(this),\n shouldRenderHeader: true,\n isContactForm: isContactForm\n })\n });\n }\n renderNotes() {\n const { notes, isNotesInvalid } = this.state;\n const { isContactForm } = this.props;\n return isContactForm && /*#__PURE__*/ _jsx(TextField, {\n className: consentModalClassNames.notes,\n multiline: true,\n rows: 4,\n maxLength: 1500,\n deferredValidationTime: 2000,\n errorMessage: isNotesInvalid ? this.context.loc('ConsentModal_Notes_ContainEmailOrUrlErrorMsg', \"This field can't contain URLs or email addresses.\") : '',\n label: this.context.loc('ConsentModal_Notes_Label', 'Describe your use case'),\n placeholder: this.context.loc('ConsentModal_Notes_Placeholder', 'Tell us about your team’s business needs.\\nFor example, are you working on a current project? What is your time frame?'),\n value: notes,\n onChange: this.onNotesChange\n });\n }\n renderLoginInfo() {\n const { userInfo } = this.props;\n const { displayName, email } = userInfo;\n return (userInfo === null || userInfo === void 0 ? void 0 : userInfo.signedIn) && /*#__PURE__*/ _jsx(Stack, {\n tokens: loginUserInfoTokens,\n children: /*#__PURE__*/ _jsxs(Text, {\n variant: \"medium\",\n children: [\n this.context.loc('Leads_Logged_User_Info', \"You're signed in as\"),\n ' ',\n /*#__PURE__*/ _jsxs(Text, {\n variant: \"medium\",\n className: consentModalClassNames.boldText,\n children: [\n displayName,\n \" (\",\n email,\n \").\"\n ]\n })\n ]\n })\n });\n }\n renderConsentElement() {\n const { appInfo, serviceInfo } = this.props;\n const { isEmbeddedApp } = this.state;\n const iconSrc = appInfo ? appInfo.iconURL : serviceInfo.extraData.smallIconUri;\n const title = appInfo ? appInfo.title : serviceInfo.title;\n const publisher = appInfo ? appInfo.publisher : serviceInfo.publisher;\n return /*#__PURE__*/ _jsxs(Stack, {\n children: [\n /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n align: \"center\",\n children: /*#__PURE__*/ _jsx(TelemetryImage, {\n imgClassName: consentModalClassNames.appImg,\n className: classNames(consentModalClassNames.appImgContainer, {\n 'ms-depth-8': true\n }),\n src: iconSrc,\n \"aria-label\": this.context.loc('Telemetry_Image_Aria_Label', 'Application Icon'),\n alt: title\n })\n }),\n /*#__PURE__*/ _jsxs(Stack, {\n children: [\n /*#__PURE__*/ _jsx(Text, {\n variant: \"mediumPlus\",\n className: consentModalClassNames.boldText,\n children: title\n }),\n /*#__PURE__*/ _jsx(Text, {\n variant: \"medium\",\n children: this.context.locParams('Tile_By', [\n publisher\n ])\n })\n ]\n })\n ]\n }),\n !isEmbeddedApp && /*#__PURE__*/ _jsxs(_Fragment, {\n children: [\n this.renderLoginInfo(),\n this.renderUserProfileModal(),\n this.renderNotes()\n ]\n }),\n this.renderConsentDisclaimer(),\n this.renderConsentBottomBar()\n ]\n });\n }\n switchToleadGen() {\n this.setState({\n showAnimation: false\n });\n return this.renderConsentElement();\n }\n renderImpl() {\n const { dismissModal, isTransactApp, isContactForm, appInfo, serviceInfo } = this.props;\n const { shouldSkipModal, showSuccessDialog, showUserSignInError, showAnimation, showContactMeError } = this.state;\n const publisher = appInfo ? appInfo.publisher : serviceInfo.publisher;\n if (shouldSkipModal && this.isCTAShouldSkipModal()) {\n this.setState({\n shouldSkipModal: false\n });\n }\n return showSuccessDialog && (isContactForm || serviceInfo) ? /*#__PURE__*/ _jsx(SuccessConsentModal, {\n dismissModal: dismissModal,\n publisher: publisher,\n shouldSkipModal: shouldSkipModal\n }) : (showUserSignInError || showContactMeError) && (isContactForm || serviceInfo) ? /*#__PURE__*/ _jsx(FailureConsentModal, {\n dismissModal: dismissModal,\n shouldSkipModal: shouldSkipModal,\n showContactMeError: showContactMeError\n }) : /*#__PURE__*/ _jsx(ConsentModalContent, {\n showAnimation: showAnimation,\n handoffTitle: this.handoffTitle,\n isTransactApp: isTransactApp,\n isContactForm: isContactForm || !!serviceInfo,\n shouldSkipModal: shouldSkipModal,\n publisher: appInfo ? appInfo.publisher : serviceInfo.publisher,\n dismissModal: dismissModal,\n children: this.renderPromptContent()\n });\n }\n renderPromptContent() {\n const { showAnimation } = this.state;\n const { appInfo, serviceInfo } = this.props;\n if (showAnimation) {\n return this.renderAnimation();\n }\n if (appInfo || serviceInfo) {\n return this.renderApp();\n }\n }\n renderAnimation() {\n const { appInfo, serviceInfo } = this.props;\n const iconSrc = appInfo ? appInfo.iconURL : serviceInfo.extraData.smallIconUri;\n const title = appInfo ? appInfo.title : serviceInfo.title;\n const { animationImg, appImg, appImgContainer } = consentModalClassNames;\n return /*#__PURE__*/ _jsxs(Stack, {\n tokens: animationStackTokens,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(Animation, {})\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n className: animationImg,\n children: /*#__PURE__*/ _jsx(TelemetryImage, {\n imgClassName: appImg,\n className: classNames(appImgContainer, {\n 'ms-depth-8': true\n }),\n src: iconSrc,\n \"aria-label\": this.context.loc('Telemetry_Image_Aria_Label', 'Application Icon'),\n alt: title\n })\n })\n ]\n });\n }\n renderApp() {\n const { isTransactApp, userInfo } = this.props;\n const leadGen = isTransactApp && (userInfo.isMSAUser || userInfo.tenantType && userInfo.tenantType !== Constants.TenantType.Managed);\n return leadGen ? this.switchToleadGen() : this.renderConsentElement();\n }\n constructor(props){\n super(props), _define_property(this, \"context\", void 0), _define_property(this, \"handoffTitle\", ''), _define_property(this, \"instrument\", void 0), _define_property(this, \"licenseType\", -1), _define_property(this, \"logOutgoingHandoffRedirect\", (url)=>{\n const { appInfo, serviceInfo, location } = this.props;\n const entityInfo = appInfo || serviceInfo;\n const payload = {\n page: location.pathname,\n action: Constants.Telemetry.Action.Redirecting,\n actionModifier: Constants.Telemetry.ActionModifier.OfficeOffersPurchase,\n appName: entityInfo && entityInfo.entityId,\n details: url\n };\n this.instrument.probe('logAndFlushTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n appName: payload.appName\n });\n }), _define_property(this, \"onNotesChange\", (event, newValue)=>{\n this.setState({\n notes: newValue,\n isNotesInvalid: containsURLOrEmail(newValue)\n });\n });\n this.instrument = SpzaInstrumentService.getProvider();\n const { userProfile, isContactForm, serviceInfo, isEmbedded, appInfo } = this.props;\n // 1 is D365 license, 2 is D365 for financial license, -1 is don't display account info\n this.licenseType = isEmbedded ? dynamicsLicenseTypeForEmbed(appInfo.products) : appInfo ? dynamicsLicenseType(userProfile, appInfo.products) : -1;\n this.state = {\n isProfileCompleted: false,\n showAnimation: false,\n showUserSignInError: false,\n showContactMeError: false,\n // To get the privacy URL for an app, we need to fetch the App Details. This is lazy loaded.\n // Hence it is in the state.\n appPrivacyPolicyUrl: '',\n showSuccessDialog: false,\n formSubmitted: false,\n showAccountInfo: false,\n forceUserProfileCompacted: !isContactForm && !serviceInfo && this.isMandatoryFieldsFilled(userProfile),\n accountInfo: {\n firstName: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.firstName) ? userProfile.firstName : '',\n lastName: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.lastName) ? userProfile.lastName : '',\n email: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.email) ? userProfile.email : '',\n title: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.title) ? userProfile.title : '',\n company: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.company) ? userProfile.company : '',\n country: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.country) ? userProfile.country : '',\n phone: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.phone) ? userProfile.phone : ''\n },\n notes: '',\n isNotesInvalid: false,\n localLicenseStore: (this.licenseType === Constants.Dynamics365LicenseType.dynamics365License || this.licenseType === Constants.Dynamics365LicenseType.dynamics365forBusinessLicense) && !isEmbedded ? setInitialLocalLicenseStore(userProfile.licenses, this.licenseType) : null,\n licenseDisplayText: (this.licenseType === Constants.Dynamics365LicenseType.dynamics365License || this.licenseType === Constants.Dynamics365LicenseType.dynamics365forBusinessLicense) && !isEmbedded ? setInitialLicenseDisplayText(userProfile.licenses, this.licenseType) : '',\n shouldSkipModal: this.shouldSkipModal(userProfile),\n trailId: generateGuid()\n };\n const { accountInfo } = this.state;\n if (isEmbedded && accountInfo.firstName === '' && accountInfo.lastName === '' && accountInfo.email === '' && accountInfo.phone === '') {\n const userProfileInCookie = getCookieItem(Constants.userProfileEmbedCookieName, false);\n if (userProfileInCookie) {\n const userInfoInCache = {\n firstName: '',\n lastName: '',\n phone: '',\n company: '',\n country: '',\n email: '',\n title: '',\n accepted: true,\n managedLicenses: []\n };\n readUserProfileEmbedCookie(userProfileInCookie, userInfoInCache);\n const accountInfoFromCache = {\n firstName: userInfoInCache.firstName ? userInfoInCache.firstName : '',\n lastName: userInfoInCache.lastName ? userInfoInCache.lastName : '',\n email: userInfoInCache.email ? userInfoInCache.email : '',\n title: userInfoInCache.title ? userInfoInCache.title : '',\n company: userInfoInCache.company ? userInfoInCache.company : '',\n country: userInfoInCache.country ? userInfoInCache.country : '',\n phone: userInfoInCache.phone ? userInfoInCache.phone : ''\n };\n this.state = {\n accountInfo: accountInfoFromCache\n };\n }\n }\n }\n}\nConsentModal.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n renderErrorModal: PropTypes.func,\n buildHref: PropTypes.func\n};\n","import * as React from 'react';\nimport { ConsentModal as ConsentModalComponent } from '@appsource/components/modals/consentModal';\nimport { createInstructionsModalAction, createDriveModalAction, createUserSignOutAction, createUpdateUserProfileLicenseAction } from '@shared/actions/actions';\nimport { getAppDetail, getUserAuthStatus, updatePurchaseStatus, sendLeadInfo } from '@shared/actions/thunkActions';\nimport { getTelemetryDetailContentCurrentView } from '@shared/utils/appUtils';\nimport { connect } from 'react-redux';\nimport { withRouter } from '@shared/routerHistory';\nexport const mapStateToProps = (state, ownProps)=>{\n return {\n userInfo: state.users,\n userProfile: state.users.profile,\n isNationalCloud: state.config.nationalCloud,\n billingCountryCode: state.config.billingCountryCode,\n flightCodes: state.config.flightCodes,\n featureFlags: state.config.featureFlags,\n query: ownProps === null || ownProps === void 0 ? void 0 : ownProps.query,\n embedHost: state.config.embedHost,\n currentView: getTelemetryDetailContentCurrentView(state.config.currentView, state.config.currentGalleryViewIsCurated),\n modal: state.modal,\n isLoadingUserProfile: state.users.isLoadingUserProfile\n };\n};\nexport const mapDispatchToProps = (dispatch)=>{\n return {\n updatePurchaseStatus: ()=>dispatch(updatePurchaseStatus()),\n openInstructionsModal: ()=>dispatch(createInstructionsModalAction({\n showModal: true,\n isFromDownload: true\n })),\n openDriveModal: (driveUrl)=>dispatch(createDriveModalAction({\n showModal: true,\n driveUrl\n })),\n fetchAppDetails: (targetApp)=>dispatch(getAppDetail(targetApp.entityId, false)),\n sendLeadInfo: ({ item, ctaType, notes, planId })=>dispatch(sendLeadInfo({\n item,\n ctaType,\n notes,\n planId\n })),\n getUserAuthStatus: ()=>dispatch(getUserAuthStatus()),\n signOutUser: ()=>dispatch(createUserSignOutAction(null)),\n updateLicense: (licenseType, license)=>dispatch(createUpdateUserProfileLicenseAction({\n licenseType,\n license\n }))\n };\n};\nexport const ConsentModal = withRouter(connect(mapStateToProps, mapDispatchToProps)(ConsentModalComponent));\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { Dialog, DialogFooter, PrimaryButton, TextField, DefaultButton, Stack, RatingSize, Rating, Checkbox, Link, Text } from '@fluentui/react';\nimport { Constants } from '@shared/utils/constants';\nimport { getReviewModalDialogProps } from '@shared/utils/reviewsUtils';\nimport greyExclamationMark from '@shared/images/greyExclamationMark.svg';\nexport const renderOfferInfoSection = (appIcon, appTitle, appPublisher)=>{\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"ReviewActionModalAppDetails\",\n children: [\n /*#__PURE__*/ _jsx(\"img\", {\n className: \"ReviewActionModalAppIcon\",\n src: appIcon,\n alt: `${appTitle} icon`\n }),\n /*#__PURE__*/ _jsxs(Stack, {\n className: \"ReviewActionModalAppNameAndPublisher\",\n children: [\n /*#__PURE__*/ _jsx(Text, {\n className: \"ReviewActionModalAppName\",\n children: appTitle\n }),\n /*#__PURE__*/ _jsx(Text, {\n className: \"ReviewActionModalAppPublisher\",\n children: appPublisher\n })\n ]\n })\n ]\n });\n};\nexport const renderRatingSection = (context, IsvReplyExists, curRating, handleRatingChange)=>{\n return /*#__PURE__*/ _jsxs(Stack, {\n className: \"ReviewActionModalRating\",\n children: [\n /*#__PURE__*/ _jsxs(Text, {\n className: \"ReviewActionModalRatingTitle\",\n children: [\n context.loc('ReviewActionModal_RatingSectionTitle', 'Rating'),\n ' ',\n /*#__PURE__*/ _jsx(Text, {\n className: \"ReviewActionModalMandatoryFieldSign\",\n children: \"*\"\n })\n ]\n }),\n /*#__PURE__*/ _jsx(Rating, {\n allowZeroStars: true,\n disabled: IsvReplyExists,\n max: 5,\n size: RatingSize.Large,\n rating: curRating,\n ariaLabel: context.loc('ReviewActionModal_RatingAriaLabel', 'Rating'),\n ariaLabelFormat: context.loc('ReviewActionModal_RatingAriaLabelFormat', `{0} of {1} stars`),\n getAriaLabel: (rating, max)=>context.loc('ReviewActionModal_RatingAriaLabelReadOnly', `Rating value is ${rating} of ${max}`),\n onChange: (event, rating)=>handleRatingChange(rating)\n })\n ]\n });\n};\nexport const renderLinksSection = (context)=>{\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"ReviewActionModalLinks\",\n children: [\n /*#__PURE__*/ _jsx(Link, {\n target: \"_blank\",\n href: Constants.MicrosoftTermsURL,\n children: context.loc('ReviewActionModal_Terms', 'Terms')\n }),\n /*#__PURE__*/ _jsx(Text, {\n className: \"LinksSeperator\",\n children: \" | \"\n }),\n /*#__PURE__*/ _jsx(Link, {\n target: \"_blank\",\n href: Constants.MicrosoftPrivacyStatementURL,\n children: context.loc('ReviewActionModal_PrivacyStatement', 'Privacy statement')\n })\n ]\n });\n};\nexport const renderWriteDialogButtonsSection = (context, curRating, handleSubmitReview, closeModal)=>{\n return /*#__PURE__*/ _jsxs(DialogFooter, {\n children: [\n /*#__PURE__*/ _jsx(PrimaryButton, {\n onClick: ()=>handleSubmitReview(),\n disabled: !(!!curRating || curRating === 0),\n text: context.loc('ReviewActionModal_Submit', 'Submit')\n }),\n /*#__PURE__*/ _jsx(DefaultButton, {\n onClick: ()=>closeModal(),\n text: context.loc('Cancel', 'Cancel')\n })\n ]\n });\n};\nexport const renderEditDialogButtonsSection = (context, IsvReplyExists, handleDeleteReview, handleSubmitReview, closeModal)=>{\n return /*#__PURE__*/ _jsxs(DialogFooter, {\n children: [\n /*#__PURE__*/ _jsx(PrimaryButton, {\n onClick: ()=>handleDeleteReview(),\n text: context.loc('Rating_DeleteButton', 'Delete')\n }),\n /*#__PURE__*/ _jsx(PrimaryButton, {\n onClick: ()=>handleSubmitReview(),\n disabled: IsvReplyExists,\n text: context.loc('Rating_UpdateButton', 'Update')\n }),\n /*#__PURE__*/ _jsx(DefaultButton, {\n onClick: ()=>closeModal(),\n text: context.loc('Cancel', 'Cancel')\n })\n ]\n });\n};\nexport const ReviewActionModal = ({ context, title, appTitle, appPublisher, userEmail, userDisplayName, appIcon, curRating, curReviewTitle, curReviewContent, isAnonymous, userReview, closeModal, handleRatingChange, handleReviewTitleChange, handleReviewContentChange, handleSendEmailCheckbox, handleDisplayUserNameCheckbox, handleSubmitReview, handleDeleteReview })=>{\n const dialogProps = getReviewModalDialogProps(title);\n const isEditMode = !!userReview;\n const IsvReplyExists = isEditMode && !!userReview.isv_reply;\n return /*#__PURE__*/ _jsx(Dialog, {\n hidden: false,\n onDismiss: ()=>closeModal(),\n dialogContentProps: dialogProps.dialogContentProps,\n maxWidth: dialogProps.maxWidth,\n modalProps: dialogProps.modalProps,\n children: /*#__PURE__*/ _jsxs(Stack, {\n tokens: {\n childrenGap: 12\n },\n styles: {\n root: {\n width: 500\n }\n },\n children: [\n renderOfferInfoSection(appIcon, appTitle, appPublisher),\n IsvReplyExists && /*#__PURE__*/ _jsxs(\"div\", {\n className: \"ReviewActionModalEditComment\",\n children: [\n /*#__PURE__*/ _jsx(\"img\", {\n className: \"ReviewActionModalEditCommentImg\",\n src: greyExclamationMark\n }),\n /*#__PURE__*/ _jsx(Text, {\n className: \"ReviewActionModalEditCommentText\",\n children: context.loc('ReviewActionModal_EditingNotAllowedIsvReply', 'Editing this comment is disabled because it has already\\nreceived a response. You can still delete it.')\n })\n ]\n }),\n renderRatingSection(context, IsvReplyExists, curRating, handleRatingChange),\n /*#__PURE__*/ _jsx(TextField, {\n label: context.loc('ReviewActionModal_ReviewTitle', 'Review title'),\n placeholder: context.loc('ReviewActionModal_ReviewTitle', 'Review title'),\n value: curReviewTitle,\n disabled: IsvReplyExists,\n inputClassName: \"reviewActionModalTitleTextField\",\n onChange: (event, newValue)=>handleReviewTitleChange(newValue)\n }),\n /*#__PURE__*/ _jsx(TextField, {\n label: context.loc('ReviewActionModal_ReviewDescription', 'Review description'),\n multiline: true,\n rows: 3,\n placeholder: context.loc('ReviewActionModal_ReviewDescriptionPlaceholder', 'Write your review'),\n value: curReviewContent,\n disabled: IsvReplyExists,\n onChange: (event, newValue)=>handleReviewContentChange(newValue)\n }),\n /*#__PURE__*/ _jsx(Checkbox, {\n label: context.locParams('ReviewActionModal_EmailCheckboxText', [\n appPublisher,\n userEmail\n ], `I agree to have ${appPublisher} email me at ${userEmail} about my feedback.`),\n disabled: IsvReplyExists,\n onChange: ()=>handleSendEmailCheckbox()\n }),\n /*#__PURE__*/ _jsx(Checkbox, {\n label: context.locParams('ReviewActionModal_DisplayNameCheckboxText', [\n userDisplayName\n ], `Post my review publicly as ${userDisplayName} (if this is unchecked, the review will be posted as 'Anonymous')`),\n checked: !isAnonymous,\n defaultChecked: true,\n disabled: IsvReplyExists,\n onChange: ()=>handleDisplayUserNameCheckbox()\n }),\n renderLinksSection(context),\n isEditMode ? renderEditDialogButtonsSection(context, IsvReplyExists, handleDeleteReview, handleSubmitReview, closeModal) : renderWriteDialogButtonsSection(context, curRating, handleSubmitReview, closeModal)\n ]\n })\n });\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { Dialog, DialogFooter, PrimaryButton, Link, Text } from '@fluentui/react';\nimport { getReviewModalDialogProps } from '@shared/utils/reviewsUtils';\nimport { Constants } from '@shared/utils/constants';\nexport const SubmitReviewResponseModal = ({ context, title, content, dialogIcon, shouldRenderLink, closeModal })=>{\n const dialogProps = getReviewModalDialogProps(title);\n return /*#__PURE__*/ _jsxs(Dialog, {\n hidden: false,\n onDismiss: ()=>closeModal(),\n dialogContentProps: dialogProps.dialogContentProps,\n maxWidth: dialogProps.maxWidth,\n modalProps: dialogProps.modalProps,\n children: [\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"ResponeDialogContent\",\n children: [\n /*#__PURE__*/ _jsx(\"img\", {\n className: \"ResponeDialogImg\",\n src: dialogIcon\n }),\n /*#__PURE__*/ _jsxs(Text, {\n className: \"ResponeDialogText\",\n children: [\n content,\n ' ',\n shouldRenderLink && /*#__PURE__*/ _jsx(Link, {\n className: \"ResponeDialogLink\",\n target: \"_blank\",\n href: Constants.MicrosoftRatingReviewPolicy,\n children: context.loc('SubmitReviewResponseModal_Policy', 'View review policies')\n })\n ]\n })\n ]\n }),\n /*#__PURE__*/ _jsx(DialogFooter, {\n children: /*#__PURE__*/ _jsx(PrimaryButton, {\n onClick: ()=>closeModal(),\n text: context.loc('Rating_SuccessButton', 'Done')\n })\n })\n ]\n });\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { DefaultButton, Dialog, DialogFooter, PrimaryButton, Spinner, SpinnerSize, Text } from '@fluentui/react';\nimport * as PropTypes from 'prop-types';\nimport { Constants } from '@shared/utils/constants';\nimport SpzaComponent from '../spzaComponent';\nimport { SpzaInstrumentService } from '../../services/telemetry/spza/spzaInstrument';\nimport { getWindow } from '@shared/services/window';\nimport { ReviewActionModal } from './reviewActionModal';\nimport successGreenV from '@shared/images/successGreenV.svg';\nimport redExclamationMark from '@shared/images/redExclamationMark.svg';\nimport { SubmitReviewResponseModal } from './submitReviewResponseModal';\nimport { getReviewModalDialogProps } from '@shared/utils/reviewsUtils';\nimport { logger } from '@src/logger';\nexport class RatingModal extends SpzaComponent {\n initMode() {\n var _this_props_payload_app_detailInformation;\n if (this.props.payload.accessKey) {\n this.auth = Constants.Headers.AccessKey;\n this.accessKey = this.props.payload.accessKey;\n } else {\n if (this.props.userInfo.signedIn) {\n this.auth = Constants.Headers.Authorization;\n this.accessKey = this.props.userInfo.accessToken.spza;\n } else {\n this.closeModal();\n }\n }\n if ((_this_props_payload_app_detailInformation = this.props.payload.app.detailInformation) === null || _this_props_payload_app_detailInformation === void 0 ? void 0 : _this_props_payload_app_detailInformation.LargeIconUri) {\n this.iconURL = this.props.payload.app.detailInformation.LargeIconUri;\n } else {\n this.iconURL = this.props.payload.app.iconURL;\n }\n }\n componentDidMount() {\n const reviewsData = this.props.reviewsData;\n const userReview = reviewsData.userReview;\n if (userReview) {\n var _userReview_customer_info;\n var _userReview_customer_info_is_anonymous;\n this.setState({\n showMode: Constants.RatingShowMode.EditReview,\n rating: userReview.rating,\n title: userReview.title || '',\n description: userReview.content || '',\n submitted: userReview.updated_at,\n isEdit: true,\n consent: false,\n showAnonymous: (_userReview_customer_info_is_anonymous = (_userReview_customer_info = userReview.customer_info) === null || _userReview_customer_info === void 0 ? void 0 : _userReview_customer_info.is_anonymous) !== null && _userReview_customer_info_is_anonymous !== void 0 ? _userReview_customer_info_is_anonymous : false\n });\n } else {\n this.setState({\n showMode: Constants.RatingShowMode.WriteNewReview,\n isEdit: false\n });\n }\n }\n getReviewFormData() {\n const { userReview } = this.props.reviewsData;\n return {\n offerId: this.props.payload.app.entityId,\n rating: this.state.rating,\n title: this.state.title,\n content: this.state.description,\n sendEmailConsent: this.state.consent,\n isAnonymous: this.state.showAnonymous,\n reviewId: userReview === null || userReview === void 0 ? void 0 : userReview.id\n };\n }\n handleSubmit() {\n this.setState({\n showMode: Constants.RatingShowMode.Loading\n });\n const reviewData = this.getReviewFormData();\n const { isEdit } = this.state;\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.RRSubmit,\n appName: this.props.payload.app.entityId,\n details: `${isEdit ? `A review of the app ${this.props.payload.app.entityId} was updated` : `A new review was inserted to the app ${this.props.payload.app.entityId}`}`\n };\n this.instrument.probe('logAndFlushTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n appName: payload.appName\n });\n const submitOperation$ = isEdit ? this.props.updateReview(reviewData) : this.props.submitReview(reviewData);\n submitOperation$.then(()=>{\n this.setState({\n showMode: Constants.RatingShowMode.Success\n });\n if (this.auth === Constants.Headers.Authorization) {\n this.props.setUserReviewStatus(true);\n }\n this.props.payload.callback('success');\n }).catch((err)=>{\n this.handleError(err);\n });\n }\n handleDelete() {\n this.setState({\n showMode: Constants.RatingShowMode.Loading\n });\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.RRDelete,\n appName: this.props.payload.app.entityId\n };\n this.instrument.probe('logAndFlushTelemetryInfo', payload);\n logger.info('', {\n action: payload.action,\n actionModifier: payload.actionModifier,\n appName: payload.appName\n });\n this.props.deleteReview(this.getReviewFormData()).then(()=>{\n this.setState({\n showMode: Constants.RatingShowMode.DeleteSuccess\n });\n this.props.payload.callback('success');\n }).catch((err)=>{\n this.handleError(err);\n });\n }\n handleError(err) {\n var _err_response, _err_response1, _err_response_statusCode, _err_response2, _err_response3;\n if (((_err_response = err.response) === null || _err_response === void 0 ? void 0 : _err_response.statusCode) === 400 && ((_err_response1 = err.response) === null || _err_response1 === void 0 ? void 0 : _err_response1.text) === Constants.ReviewsEnrichApiResponse.ContentViolation) {\n this.setState({\n showMode: Constants.RatingShowMode.ContentViolation\n });\n } else {\n this.setState({\n showMode: Constants.RatingShowMode.Error\n });\n }\n const errorStatusCode = (_err_response2 = err.response) === null || _err_response2 === void 0 ? void 0 : (_err_response_statusCode = _err_response2.statusCode) === null || _err_response_statusCode === void 0 ? void 0 : _err_response_statusCode.toString();\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.RRSubmit,\n details: `RatingModal got an error from the server. status code: ${errorStatusCode}, message: ${(_err_response3 = err.response) === null || _err_response3 === void 0 ? void 0 : _err_response3.text}.`\n };\n this.instrument.probe('logAndFlushTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n }\n closeModal() {\n this.props.dismissModal();\n }\n handleRatingChange(ratingNumber) {\n this.setState({\n rating: ratingNumber\n });\n }\n onChangeReviewTitle(titleText) {\n this.setState({\n title: titleText\n });\n }\n onChangeReviewContent(contentText) {\n this.setState({\n description: contentText\n });\n }\n setEnsureDeleteShowMode() {\n this.setState({\n showMode: Constants.RatingShowMode.EnsureDelete\n });\n }\n onChangeConsent() {\n this.setState({\n consent: !this.state.consent\n });\n }\n onChangeDisplayName() {\n this.setState({\n showAnonymous: !this.state.showAnonymous\n });\n }\n renderImpl() {\n if (this.state.showMode === Constants.RatingShowMode.Error) {\n return /*#__PURE__*/ _jsx(SubmitReviewResponseModal, {\n context: this.context,\n title: this.context.loc('ReviewActionModal_ErrorDialogTitle', \"Your review wasn't published\"),\n content: this.context.loc('ReviewActionModal_ErrorDialogText', 'There was a problem publishing the review because of technical issue.\\nTry posting your review again.'),\n dialogIcon: redExclamationMark,\n shouldRenderLink: false,\n closeModal: this.closeModal.bind(this)\n });\n }\n if (this.state.showMode === Constants.RatingShowMode.ContentViolation) {\n return /*#__PURE__*/ _jsx(SubmitReviewResponseModal, {\n context: this.context,\n title: this.context.loc('ReviewActionModal_ErrorContentViolationDialogTitle', \"Your review couldn't be published\"),\n content: this.context.loc('ReviewActionModal_ErrorContentViolationDialogText', \"We couldn't publish your review because we detected some offensive content\\nwhich violates Microsoft terms.\"),\n dialogIcon: redExclamationMark,\n shouldRenderLink: true,\n closeModal: this.closeModal.bind(this)\n });\n }\n if (this.state.showMode === Constants.RatingShowMode.Success) {\n return /*#__PURE__*/ _jsx(SubmitReviewResponseModal, {\n context: this.context,\n title: this.context.loc('ReviewActionModal_SuccessDialogTitle', 'Thanks for your review'),\n content: this.context.loc('ReviewActionModal_SuccessDialogText', 'Thanks for taking the time to give your feedback.\\nYour rating will be added to the average app rating shortly.'),\n dialogIcon: successGreenV,\n shouldRenderLink: false,\n closeModal: this.closeModal.bind(this)\n });\n }\n if (this.state.showMode === Constants.RatingShowMode.DeleteSuccess) {\n return /*#__PURE__*/ _jsx(SubmitReviewResponseModal, {\n context: this.context,\n title: this.context.loc('ReviewActionModal_DeleteSuccessDialogTitle', 'Your review has been deleted'),\n content: this.context.loc('ReviewActionModal_DeleteSuccessDialogText', 'We removed your review from the feed.'),\n dialogIcon: successGreenV,\n shouldRenderLink: false,\n closeModal: this.closeModal.bind(this)\n });\n }\n if (this.state.showMode === Constants.RatingShowMode.WriteNewReview) {\n return /*#__PURE__*/ _jsx(ReviewActionModal, {\n context: this.context,\n title: this.context.loc('ReviewActionModal_WriteBoxTitle', 'Review this app'),\n appTitle: this.props.payload.app.title,\n appPublisher: this.props.payload.app.publisher,\n userEmail: this.props.userInfo.email,\n userDisplayName: this.props.userInfo.displayName,\n appIcon: this.iconURL,\n curRating: this.state.rating,\n curReviewTitle: this.state.title,\n curReviewContent: this.state.description,\n isAnonymous: this.state.showAnonymous,\n userReview: this.props.reviewsData.userReview,\n closeModal: this.closeModal.bind(this),\n handleRatingChange: this.handleRatingChange.bind(this),\n handleReviewTitleChange: this.onChangeReviewTitle.bind(this),\n handleReviewContentChange: this.onChangeReviewContent.bind(this),\n handleSendEmailCheckbox: this.onChangeConsent.bind(this),\n handleDisplayUserNameCheckbox: this.onChangeDisplayName.bind(this),\n handleSubmitReview: this.handleSubmit.bind(this),\n handleDeleteReview: this.setEnsureDeleteShowMode.bind(this)\n });\n }\n if (this.state.showMode === Constants.RatingShowMode.EditReview) {\n return /*#__PURE__*/ _jsx(ReviewActionModal, {\n context: this.context,\n title: this.context.loc('ReviewActionModal_EditBoxTitle', 'Edit your review'),\n appTitle: this.props.payload.app.title,\n appPublisher: this.props.payload.app.publisher,\n userEmail: this.props.userInfo.email,\n userDisplayName: this.props.userInfo.displayName,\n appIcon: this.iconURL,\n curRating: this.state.rating,\n curReviewTitle: this.state.title,\n curReviewContent: this.state.description,\n isAnonymous: this.state.showAnonymous,\n userReview: this.props.reviewsData.userReview,\n closeModal: this.closeModal.bind(this),\n handleRatingChange: this.handleRatingChange.bind(this),\n handleReviewTitleChange: this.onChangeReviewTitle.bind(this),\n handleReviewContentChange: this.onChangeReviewContent.bind(this),\n handleSendEmailCheckbox: this.onChangeConsent.bind(this),\n handleDisplayUserNameCheckbox: this.onChangeDisplayName.bind(this),\n handleSubmitReview: this.handleSubmit.bind(this),\n handleDeleteReview: this.setEnsureDeleteShowMode.bind(this)\n });\n }\n if (this.state.showMode === Constants.RatingShowMode.EnsureDelete) {\n const dialogProps = getReviewModalDialogProps(this.context.loc('ReviewActionModal_EnsureDeleteTitle', 'Delete your review?'));\n dialogProps.modalProps.styles.main.minHeight = 150;\n return /*#__PURE__*/ _jsxs(Dialog, {\n hidden: false,\n onDismiss: ()=>this.closeModal(),\n dialogContentProps: dialogProps.dialogContentProps,\n maxWidth: dialogProps.maxWidth,\n modalProps: dialogProps.modalProps,\n children: [\n /*#__PURE__*/ _jsx(Text, {\n className: \"ResponeDialogContent\",\n children: this.context.loc('ReviewActionModal_EnsureDeleteDialogText', \"It won't appear in the reviews feed and won't be available any longer.\")\n }),\n /*#__PURE__*/ _jsxs(DialogFooter, {\n children: [\n /*#__PURE__*/ _jsx(PrimaryButton, {\n onClick: ()=>this.handleDelete(),\n text: this.context.loc('Rating_DeleteButton', 'Delete')\n }),\n /*#__PURE__*/ _jsx(DefaultButton, {\n onClick: ()=>this.closeModal(),\n text: this.context.loc('Cancel', 'Cancel')\n })\n ]\n })\n ]\n });\n }\n return /*#__PURE__*/ _jsx(Spinner, {\n className: \"ratingModalLoading\",\n size: SpinnerSize.large,\n label: this.context.loc('AppDetail_LoadingText', 'Loading...'),\n ariaLive: \"assertive\"\n });\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"context\", void 0), _define_property(this, \"auth\", void 0), _define_property(this, \"iconURL\", void 0), _define_property(this, \"accessKey\", void 0), _define_property(this, \"instrument\", SpzaInstrumentService.getProvider());\n this.context = context;\n this.initMode();\n this.state = {\n showMode: Constants.RatingShowMode.Loading,\n rating: null,\n description: '',\n isEdit: false,\n title: '',\n submitted: '',\n consent: false,\n showAnonymous: false\n };\n }\n}\nRatingModal.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\n","import { connect } from 'react-redux';\nimport { RatingModal as RatingModalComponent } from '@shared/components/modals/ratingModal';\nimport { submitReview, updateReview, deleteReview } from '@shared/actions/thunkActions';\nexport const mapStateToProps = (state)=>{\n return {\n userInfo: state.users,\n reviewsData: state.apps.appReviewsData\n };\n};\nexport const mapDispatchToProps = (dispatch)=>{\n return {\n submitReview: (reviewFormData)=>dispatch(submitReview(reviewFormData)),\n deleteReview: (reviewFormData)=>dispatch(deleteReview(reviewFormData)),\n updateReview: (reviewFormData)=>dispatch(updateReview(reviewFormData))\n };\n};\nexport const RatingModal = connect(mapStateToProps, mapDispatchToProps)(RatingModalComponent);\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from './../spzaComponent';\nimport { CommunityItemType } from '@shared/Models';\nimport { Constants } from '../../utils/constants';\nimport { RichTextDropDown } from '../richTextDropDown';\nimport { SpzaInstrumentService } from '../../services/telemetry/spza/spzaInstrument';\nimport { getWindow } from '../../services/window';\nimport { isEmailValid, focusElement } from '../../utils/appUtils';\nimport classNames from 'classnames';\nimport { logger } from '@src/logger';\nimport checkLarge from '@shared/images/checkLarge.png';\nclass ReportAbuseModal extends SpzaComponent {\n componentDidMount() {\n focusElement(Constants.SearchBy.Id, Constants.ReportAbuseDialog.dropdownHTMLIdName);\n }\n getDropDownOptions() {\n if (this.textDropDownItems) {\n return this.textDropDownItems;\n }\n this.textDropDownItems = Constants.Avert.ReportAbuseCategories.map((abuseCategory)=>{\n return {\n text: this.context.loc(abuseCategory.locKey),\n value: abuseCategory.dropDownValue\n };\n });\n return this.textDropDownItems;\n }\n onCommentsChange(event) {\n const comment = event.target.value;\n this.setState((prevState)=>{\n return {\n category: prevState.category,\n additionalComments: comment,\n successMode: prevState.successMode,\n reviewContent: prevState.reviewContent,\n email: prevState.email,\n validEmail: prevState.validEmail\n };\n });\n }\n onEmailChange(event) {\n const email = event.target.value;\n this.setState({\n email: email\n });\n if (!email || isEmailValid(this.state.email)) {\n this.setState({\n validEmail: true\n });\n } else {\n this.setState({\n validEmail: false\n });\n }\n }\n setSuccessState() {\n this.setState((prevState)=>{\n return {\n category: prevState.category,\n additionalComments: prevState.additionalComments,\n reviewContent: prevState.reviewContent,\n successMode: true,\n email: prevState.email,\n validEmail: prevState.validEmail\n };\n });\n }\n getReportCategory(selectedValue) {\n const abuseCategory = Constants.Avert.ReportAbuseCategories.filter((category)=>{\n return category.dropDownValue === selectedValue;\n });\n return abuseCategory && abuseCategory[0] ? abuseCategory[0].avertIdentifier : Constants.Avert.ReportAbuseCategories[0].avertIdentifier;\n }\n handleSubmit() {\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.ReportModal,\n appName: this.props.appId,\n details: JSON.stringify({\n category: this.state.category.value,\n comments: this.state.additionalComments,\n reviewId: this.props.reviewId,\n reviewSource: this.props.reviewSource,\n reviewContent: this.state.reviewContent,\n email: this.state.email\n })\n };\n this.instrument.probe('logAndFlushTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n appName: payload.appName\n });\n const { storefrontName, appId, reviewId } = this.props;\n const postItemReport = {\n category: this.getReportCategory(this.state.category.value),\n source: storefrontName,\n offerId: appId,\n itemId: reviewId,\n comments: this.state.additionalComments,\n itemType: CommunityItemType.Review\n };\n this.props.reportReview(postItemReport);\n this.setSuccessState();\n }\n setFocusInsideDialog(e) {\n if (e.shiftKey && e.keyCode === Constants.SystemKey.Tab) {\n const submitButton = document.getElementById('reportAbuseModalSubmitButton');\n window.setTimeout(function() {\n submitButton.focus();\n }, 0);\n }\n }\n getCancelButton() {\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"toolBar\",\n children: /*#__PURE__*/ _jsx(\"button\", {\n // eslint-disable-next-line react/forbid-dom-props\n id: \"cancelButton\",\n \"aria-label\": \"close\",\n className: \"cancel\",\n onClick: this.props.dismissModal.bind(this),\n onKeyDown: (event)=>{\n this.setFocusInsideDialog(event);\n },\n children: /*#__PURE__*/ _jsx(\"span\", {\n className: \"c-glyph\"\n })\n })\n });\n }\n getRatingCategoryDropDown() {\n return /*#__PURE__*/ _jsx(RichTextDropDown, {\n className: \"categoryDropDown\",\n id: Constants.ReportAbuseDialog.dropdownHTMLIdName,\n options: this.getDropDownOptions(),\n value: this.state.category,\n dropdownLabel: this.context.loc('ReportModal_Category_Label'),\n onChangeHandle: (option)=>this.setState((prevState)=>{\n return {\n category: option,\n additionalComments: prevState.additionalComments,\n reviewContent: prevState.reviewContent,\n successMode: prevState.successMode,\n email: prevState.email,\n validEmail: prevState.validEmail\n };\n })\n });\n }\n getReviewTitle() {\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"reviewTitleSection\",\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: \"itemLabel\",\n children: this.context.loc('ReportModal_ReviewTitle_Label') + ': ' + this.props.reviewTitle\n })\n });\n }\n renderImpl() {\n if (this.state.successMode) {\n return /*#__PURE__*/ _jsxs(\"div\", {\n role: \"dialog\",\n \"aria-label\": \"rating and review dialog is now open\",\n className: \"reportAbuseModalClass\",\n children: [\n this.getCancelButton(),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"successDialog\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"successHeader\",\n children: this.context.loc('ReportModal_Success_Done_Text')\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"successCheck\",\n children: /*#__PURE__*/ _jsx(\"img\", {\n src: checkLarge\n })\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"successFooter\",\n children: /*#__PURE__*/ _jsx(\"button\", {\n name: \"button\",\n className: \"c-button requestButton\",\n type: \"submit\",\n \"data-bi-id\": Constants.JsllCTAId.Done,\n \"data-bi-area\": \"Report Abuse Dialog\",\n onClick: this.props.dismissModal.bind(this),\n children: this.context.loc('ReportModal_Success_Done_Label')\n })\n })\n ]\n })\n ]\n });\n }\n const reportModalClassName = classNames({\n reportAbuseModalClass: true,\n invalidReviewMode: this.state.category.value === Constants.Avert.ReportAbuseCategories[3].dropDownValue,\n invalidEmailText: this.state.category.value === Constants.Avert.ReportAbuseCategories[3].dropDownValue && !this.state.validEmail\n });\n return /*#__PURE__*/ _jsxs(\"div\", {\n role: \"dialog\",\n \"aria-label\": \"report abuse modal is now open\",\n className: reportModalClassName,\n children: [\n this.getCancelButton(),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"title\",\n children: this.context.loc('ReportModal_Title_Text')\n }),\n this.getReviewTitle(),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"categorySection\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: \"itemLabel\",\n children: this.context.loc('ReportModal_Category_Label')\n })\n }),\n this.getRatingCategoryDropDown()\n ]\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"commentsSection\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"itemLabel\",\n children: this.context.loc('ReportModal_AdditionalComments_Label')\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"c-textarea\",\n children: /*#__PURE__*/ _jsx(\"textarea\", {\n // eslint-disable-next-line react/forbid-dom-props\n id: \"additionalComments\",\n \"aria-label\": this.context.loc('ReportModal_AdditionalComments_Label'),\n className: \"f-no-resize\",\n rows: 3,\n maxLength: 400,\n onChange: this.onCommentsChange.bind(this),\n role: \"textbox\"\n })\n })\n ]\n }),\n this.state.category.value === Constants.Avert.ReportAbuseCategories[3].dropDownValue ? /*#__PURE__*/ _jsxs(\"div\", {\n className: \"emailSection\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"itemLabel\",\n children: this.context.loc('ReportModal_Email_Label')\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"emailInputContainer\",\n children: /*#__PURE__*/ _jsx(\"input\", {\n // eslint-disable-next-line react/forbid-dom-props\n id: \"emailSection\",\n \"aria-label\": this.context.loc('ReportModal_Email_Label'),\n className: this.state.validEmail ? '' : 'invalidEmailAddress',\n onChange: this.onEmailChange.bind(this)\n })\n }),\n this.state.validEmail ? null : /*#__PURE__*/ _jsx(\"span\", {\n className: \"invalidEmailText\",\n children: this.context.loc('Feedback_invalidEmail')\n })\n ]\n }) : null,\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"submitSection\",\n children: /*#__PURE__*/ _jsx(\"button\", {\n name: \"submitButton\",\n // eslint-disable-next-line react/forbid-dom-props\n id: \"reportAbuseModalSubmitButton\",\n className: \"c-button\",\n disabled: this.state.category.value === Constants.Avert.ReportAbuseCategories[3].dropDownValue && !this.state.additionalComments || this.state.category.value === Constants.Avert.ReportAbuseCategories[3].dropDownValue && !this.state.validEmail,\n role: \"button\",\n type: \"submit\",\n \"aria-label\": this.context.loc('NPS_SubmitButton'),\n onClick: ()=>this.handleSubmit(),\n children: this.context.loc('ReportModal_SubmitButton_Label')\n })\n })\n ]\n });\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"context\", void 0), _define_property(this, \"textDropDownItems\", void 0), _define_property(this, \"instrument\", void 0);\n this.context = context;\n this.instrument = SpzaInstrumentService.getProvider();\n this.state = {\n category: this.getDropDownOptions()[0],\n successMode: false,\n reviewContent: '',\n additionalComments: '',\n validEmail: true,\n email: ''\n };\n }\n}\nexport { ReportAbuseModal as default };\nReportAbuseModal.contextTypes = {\n loc: PropTypes.func\n};\n","import * as React from 'react';\nimport ReportAbuseModalComp from '../../components/modals/reportAbuseModal';\nimport { connect } from 'react-redux';\nimport { reportItem } from '@shared/actions/thunkActions';\nexport const mapStateToProps = (state, ownProps)=>{\n const { appId, reviewId, reviewTitle, reviewSource, dismissModal } = ownProps;\n return {\n appId,\n reviewId,\n reviewTitle,\n reviewSource,\n dismissModal,\n storefrontName: state.config.storefrontName\n };\n};\nexport const mapDispatchToProps = (dispatch)=>{\n return {\n reportReview: (report)=>dispatch(reportItem(report))\n };\n};\nexport const ReportAbuseModal = connect(mapStateToProps, mapDispatchToProps)(ReportAbuseModalComp);\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { useState, useEffect } from 'react';\nimport { DefaultButton, Dialog, DialogFooter, Icon, Link, mergeStyleSets, PrimaryButton, Spinner, SpinnerSize, Stack, Text } from '@fluentui/react';\nimport * as PropTypes from 'prop-types';\nimport { Constants } from '@shared/utils/constants';\nimport { getReviewCommentsModalDialogProps, launchTelemetry } from '@shared/utils/reviewsUtils';\nimport { logger } from '@src/logger';\nimport { SharedColors } from '@fluentui/theme';\nconst ReviewCommentModalStyles = mergeStyleSets({\n infoIcon: {\n color: SharedColors.red20,\n fontSize: '16px'\n },\n loader: {\n position: 'fixed',\n left: '50%',\n top: '50%',\n transform: 'translate(-50%, -50%)',\n zIndex: 2200\n }\n});\nexport function ReviewCommentModal({ payload, onDeleteComment, onEditComment, dismissModal }, context) {\n const { modalMode: initialModalMode } = payload;\n const [modalMode, setModalMode] = useState(initialModalMode);\n useEffect(()=>{\n // Update the current modal mode state if the prop value changes\n setModalMode(initialModalMode);\n }, [\n initialModalMode\n ]);\n const dismissModalWithTelemetry = ()=>{\n launchTelemetry(Constants.Telemetry.Action.Close, Constants.Telemetry.ActionModifier.ReviewItemCommentDialog, {\n payload: payload.actionPayload\n });\n logger.info(JSON.stringify({\n payload: payload.actionPayload\n }), {\n action: Constants.Telemetry.Action.Close,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemCommentDialog\n });\n dismissModal();\n };\n const onInnerDialogDelete = /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*() {\n try {\n launchTelemetry(Constants.Telemetry.Action.Submitting, Constants.Telemetry.ActionModifier.ReviewItemCommentDialogDelete, {\n payload: payload.actionPayload,\n commentId: payload.actionPayload.commentId,\n appId: payload.actionPayload.offerId,\n reviewId: payload.actionPayload.reviewId\n });\n logger.info(JSON.stringify({\n payload: payload.actionPayload,\n commentId: payload.actionPayload.commentId,\n appId: payload.actionPayload.offerId,\n reviewId: payload.actionPayload.reviewId\n }), {\n action: Constants.Telemetry.Action.Submitting,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemCommentDialogDelete\n });\n setModalMode(Constants.Reviews.ReviewCommentModalMode.Loading);\n const { offerId, reviewId, commentId, isNewlyAddedComment } = payload.actionPayload;\n yield onDeleteComment({\n offerId,\n reviewId,\n commentId,\n isNewlyAddedComment\n });\n dismissModalWithTelemetry();\n launchTelemetry(Constants.Telemetry.Action.Submitted, Constants.Telemetry.ActionModifier.ReviewItemCommentDialogDelete, {\n payload: payload.actionPayload,\n commentId: payload.actionPayload.commentId,\n appId: payload.actionPayload.offerId,\n reviewId: payload.actionPayload.reviewId\n });\n logger.info(JSON.stringify({\n payload: payload.actionPayload,\n commentId: payload.actionPayload.commentId,\n appId: payload.actionPayload.offerId,\n reviewId: payload.actionPayload.reviewId\n }), {\n action: Constants.Telemetry.Action.Submitted,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemCommentDialogDelete\n });\n } catch (e) {\n var _payload_actionPayload, _payload_actionPayload1, _payload_actionPayload2, _payload_actionPayload3, _payload_actionPayload4, _payload_actionPayload5;\n setModalMode(Constants.Reviews.ReviewCommentModalMode.DeleteError);\n launchTelemetry(Constants.Telemetry.Action.SubmitError, Constants.Telemetry.ActionModifier.ReviewItemCommentDialogDelete, {\n payload: payload.actionPayload,\n commentId: (_payload_actionPayload = payload.actionPayload) === null || _payload_actionPayload === void 0 ? void 0 : _payload_actionPayload.commentId,\n appId: (_payload_actionPayload1 = payload.actionPayload) === null || _payload_actionPayload1 === void 0 ? void 0 : _payload_actionPayload1.offerId,\n reviewId: (_payload_actionPayload2 = payload.actionPayload) === null || _payload_actionPayload2 === void 0 ? void 0 : _payload_actionPayload2.reviewId,\n error: `Failed deleting a review comment from the review comment modal, error: ${e}`\n });\n logger.error(JSON.stringify({\n payload: payload.actionPayload,\n commentId: (_payload_actionPayload3 = payload.actionPayload) === null || _payload_actionPayload3 === void 0 ? void 0 : _payload_actionPayload3.commentId,\n appId: (_payload_actionPayload4 = payload.actionPayload) === null || _payload_actionPayload4 === void 0 ? void 0 : _payload_actionPayload4.offerId,\n reviewId: (_payload_actionPayload5 = payload.actionPayload) === null || _payload_actionPayload5 === void 0 ? void 0 : _payload_actionPayload5.reviewId,\n error: `Failed deleting a review comment from the review comment modal, error: ${e}`\n }), {\n action: Constants.Telemetry.Action.SubmitError,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemCommentDialogDelete\n });\n }\n });\n return function onInnerDialogDelete() {\n return _ref.apply(this, arguments);\n };\n }();\n const onInnerDialogUpdate = /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*() {\n try {\n launchTelemetry(Constants.Telemetry.Action.Submitting, Constants.Telemetry.ActionModifier.ReviewItemCommentDialogUpdate, {\n payload: payload.actionPayload,\n commentId: payload.actionPayload.commentId,\n appId: payload.actionPayload.offerId,\n reviewId: payload.actionPayload.reviewId\n });\n logger.info(JSON.stringify({\n payload: payload.actionPayload,\n commentId: payload.actionPayload.commentId,\n appId: payload.actionPayload.offerId,\n reviewId: payload.actionPayload.reviewId\n }), {\n action: Constants.Telemetry.Action.Submitting,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemCommentDialogUpdate\n });\n setModalMode(Constants.Reviews.ReviewCommentModalMode.Loading);\n const { offerId, reviewId, commentId, commentContent, isNewlyAddedComment } = payload.actionPayload;\n yield onEditComment({\n offerId,\n reviewId,\n commentId,\n commentContent,\n isNewlyAddedComment\n });\n dismissModalWithTelemetry();\n launchTelemetry(Constants.Telemetry.Action.Submitted, Constants.Telemetry.ActionModifier.ReviewItemCommentDialogUpdate, {\n payload: payload.actionPayload,\n commentId: payload.actionPayload.commentId,\n appId: payload.actionPayload.offerId,\n reviewId: payload.actionPayload.reviewId\n });\n logger.info(JSON.stringify({\n payload: payload.actionPayload,\n commentId: payload.actionPayload.commentId,\n appId: payload.actionPayload.offerId,\n reviewId: payload.actionPayload.reviewId\n }), {\n action: Constants.Telemetry.Action.Submitted,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemCommentDialogUpdate\n });\n } catch (e) {\n var _payload_actionPayload, _payload_actionPayload1, _payload_actionPayload2, _payload_actionPayload3, _payload_actionPayload4, _payload_actionPayload5;\n setModalMode(Constants.Reviews.ReviewCommentModalMode.UpdateError);\n launchTelemetry(Constants.Telemetry.Action.SubmitError, Constants.Telemetry.ActionModifier.ReviewItemCommentDialogUpdate, {\n payload: payload.actionPayload,\n commentId: (_payload_actionPayload = payload.actionPayload) === null || _payload_actionPayload === void 0 ? void 0 : _payload_actionPayload.commentId,\n appId: (_payload_actionPayload1 = payload.actionPayload) === null || _payload_actionPayload1 === void 0 ? void 0 : _payload_actionPayload1.offerId,\n reviewId: (_payload_actionPayload2 = payload.actionPayload) === null || _payload_actionPayload2 === void 0 ? void 0 : _payload_actionPayload2.reviewId,\n error: `Failed updating a review comment from the review comment modal, error: ${e}`\n });\n logger.error(JSON.stringify({\n payload: payload.actionPayload,\n commentId: (_payload_actionPayload3 = payload.actionPayload) === null || _payload_actionPayload3 === void 0 ? void 0 : _payload_actionPayload3.commentId,\n appId: (_payload_actionPayload4 = payload.actionPayload) === null || _payload_actionPayload4 === void 0 ? void 0 : _payload_actionPayload4.offerId,\n reviewId: (_payload_actionPayload5 = payload.actionPayload) === null || _payload_actionPayload5 === void 0 ? void 0 : _payload_actionPayload5.reviewId,\n error: `Failed updating a review comment from the review comment modal, error: ${e}`\n }), {\n action: Constants.Telemetry.Action.SubmitError,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemCommentDialogUpdate\n });\n }\n });\n return function onInnerDialogUpdate() {\n return _ref.apply(this, arguments);\n };\n }();\n const innerDialogProps = {\n onDelete: onInnerDialogDelete,\n onUpdate: onInnerDialogUpdate,\n dismissModal: dismissModalWithTelemetry,\n context,\n payload\n };\n switch(modalMode){\n case Constants.Reviews.ReviewCommentModalMode.ConfirmUpdate:\n return /*#__PURE__*/ _jsx(ReviewCommentModalConfirmUpdateDialog, _object_spread({}, innerDialogProps));\n case Constants.Reviews.ReviewCommentModalMode.ConfirmDelete:\n return /*#__PURE__*/ _jsx(ReviewCommentModalConfirmDeleteDialog, _object_spread({}, innerDialogProps));\n case Constants.Reviews.ReviewCommentModalMode.UpdateError:\n return /*#__PURE__*/ _jsx(ReviewCommentModalUpdateErrorDialog, _object_spread({}, innerDialogProps));\n case Constants.Reviews.ReviewCommentModalMode.DeleteError:\n return /*#__PURE__*/ _jsx(ReviewCommentModalDeleteErrorDialog, _object_spread({}, innerDialogProps));\n case Constants.Reviews.ReviewCommentModalMode.ContentViolation:\n return /*#__PURE__*/ _jsx(ReviewCommentModalContentViolationDialog, _object_spread({}, innerDialogProps));\n case Constants.Reviews.ReviewCommentModalMode.CreateError:\n return /*#__PURE__*/ _jsx(ReviewCommentModalCreateErrorDialog, _object_spread({}, innerDialogProps));\n default:\n return /*#__PURE__*/ _jsx(Spinner, {\n className: ReviewCommentModalStyles.loader,\n size: SpinnerSize.large,\n label: context.loc('AppDetail_LoadingText', 'Loading...'),\n ariaLive: \"assertive\"\n });\n }\n}\nReviewCommentModal.contextTypes = {\n loc: PropTypes.func\n};\nexport function ReviewCommentModalConfirmUpdateDialog({ context, onUpdate, dismissModal, payload }) {\n const { modalProps, dialogContentProps, maxWidth } = getReviewCommentsModalDialogProps(context.loc('ReviewCommentActionModal_ConfirmUpdate_Title', 'Update your comment?'));\n return /*#__PURE__*/ _jsxs(Dialog, {\n hidden: !payload.showModal,\n onDismiss: dismissModal,\n dialogContentProps: dialogContentProps,\n modalProps: modalProps,\n maxWidth: maxWidth,\n children: [\n /*#__PURE__*/ _jsx(Text, {\n children: context.loc('ReviewCommentActionModal_ConfirmUpdate_Description', 'Your comment will be updated.')\n }),\n /*#__PURE__*/ _jsxs(DialogFooter, {\n children: [\n /*#__PURE__*/ _jsx(PrimaryButton, {\n onClick: onUpdate,\n text: context.loc('ReviewCommentActionModal_ConfirmUpdate_Submit_Button_Label', 'Update')\n }),\n /*#__PURE__*/ _jsx(DefaultButton, {\n onClick: dismissModal,\n text: context.loc('ReviewCommentActionModal_ConfirmUpdate_Cancel_Button_Label', 'Discard')\n })\n ]\n })\n ]\n });\n}\nexport function ReviewCommentModalConfirmDeleteDialog({ context, onDelete, dismissModal, payload }) {\n const { modalProps, dialogContentProps, maxWidth } = getReviewCommentsModalDialogProps(context.loc('ReviewCommentActionModal_ConfirmDelete_Title', 'Delete your comment?'));\n return /*#__PURE__*/ _jsxs(Dialog, {\n hidden: !payload.showModal,\n onDismiss: dismissModal,\n dialogContentProps: dialogContentProps,\n modalProps: modalProps,\n maxWidth: maxWidth,\n children: [\n /*#__PURE__*/ _jsx(Stack, {\n horizontal: true,\n tokens: {\n childrenGap: 10\n },\n verticalAlign: \"center\",\n children: /*#__PURE__*/ _jsx(Text, {\n children: context.loc('ReviewCommentActionModal_ConfirmDelete_Description', \"It won't appear in the reviews feed and won’t be available any longer.\")\n })\n }),\n /*#__PURE__*/ _jsxs(DialogFooter, {\n children: [\n /*#__PURE__*/ _jsx(PrimaryButton, {\n onClick: onDelete,\n text: context.loc('ReviewCommentActionModal_ConfirmDelete_Submit_Button_Label', 'Delete')\n }),\n /*#__PURE__*/ _jsx(DefaultButton, {\n onClick: dismissModal,\n text: context.loc('ReviewCommentActionModal_ConfirmDelete_Cancel_Button_Label', 'Cancel')\n })\n ]\n })\n ]\n });\n}\nexport function ReviewCommentModalUpdateErrorDialog({ context, dismissModal, payload }) {\n const { modalProps, dialogContentProps, maxWidth } = getReviewCommentsModalDialogProps(context.loc('ReviewCommentActionModal_UpdateError_Title', \"Couldn't update your comment\"));\n return /*#__PURE__*/ _jsxs(Dialog, {\n hidden: !payload.showModal,\n onDismiss: dismissModal,\n dialogContentProps: dialogContentProps,\n modalProps: modalProps,\n maxWidth: maxWidth,\n children: [\n /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n tokens: {\n childrenGap: 10\n },\n children: [\n /*#__PURE__*/ _jsx(Icon, {\n iconName: \"info\",\n className: ReviewCommentModalStyles.infoIcon\n }),\n /*#__PURE__*/ _jsx(Text, {\n children: context.loc('ReviewCommentActionModal_UpdateError_Description', 'There was a problem updating your comment. Please try again.')\n })\n ]\n }),\n /*#__PURE__*/ _jsx(DialogFooter, {\n children: /*#__PURE__*/ _jsx(PrimaryButton, {\n onClick: dismissModal,\n text: context.loc('ReviewCommentActionModal_UpdateError_Cancel_Button_Label', 'Close')\n })\n })\n ]\n });\n}\nexport function ReviewCommentModalDeleteErrorDialog({ context, dismissModal, payload }) {\n const { modalProps, dialogContentProps, maxWidth } = getReviewCommentsModalDialogProps(context.loc('ReviewCommentActionModal_DeleteError_Title', \"Couldn't delete your comment\"));\n return /*#__PURE__*/ _jsxs(Dialog, {\n hidden: !payload.showModal,\n onDismiss: dismissModal,\n dialogContentProps: dialogContentProps,\n modalProps: modalProps,\n maxWidth: maxWidth,\n children: [\n /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n tokens: {\n childrenGap: 10\n },\n children: [\n /*#__PURE__*/ _jsx(Icon, {\n iconName: \"info\",\n className: ReviewCommentModalStyles.infoIcon\n }),\n /*#__PURE__*/ _jsx(Text, {\n children: context.loc('ReviewCommentActionModal_DeleteError_Description', 'There was a problem deleting your comment. Please try again.')\n })\n ]\n }),\n /*#__PURE__*/ _jsx(DialogFooter, {\n children: /*#__PURE__*/ _jsx(PrimaryButton, {\n onClick: dismissModal,\n text: context.loc('ReviewCommentActionModal_DeleteError_Cancel_Button_Label', 'Close')\n })\n })\n ]\n });\n}\nexport function ReviewCommentModalContentViolationDialog({ context, dismissModal, payload }) {\n const { modalProps, dialogContentProps, maxWidth } = getReviewCommentsModalDialogProps(context.loc('ReviewCommentActionModal_ContentViolation_Title', \"Your comment wasn't published\"));\n return /*#__PURE__*/ _jsxs(Dialog, {\n hidden: !payload.showModal,\n onDismiss: dismissModal,\n dialogContentProps: dialogContentProps,\n modalProps: modalProps,\n maxWidth: maxWidth,\n children: [\n /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n tokens: {\n childrenGap: 10\n },\n children: [\n /*#__PURE__*/ _jsx(Icon, {\n iconName: \"info\",\n className: ReviewCommentModalStyles.infoIcon\n }),\n /*#__PURE__*/ _jsxs(Text, {\n children: [\n context.loc('ReviewCommentActionModal_ContentViolation_Description', \"We couldn't publish your comment because we detected some offensive content which violates Microsoft terms.\"),\n ' ',\n /*#__PURE__*/ _jsx(Link, {\n target: \"_blank\",\n href: Constants.MicrosoftRatingReviewPolicy,\n children: context.loc('ReviewCommentActionModal_ContentViolation_Policy_Link_Label', 'View Microsoft AppSource review policies')\n })\n ]\n })\n ]\n }),\n /*#__PURE__*/ _jsx(DialogFooter, {\n children: /*#__PURE__*/ _jsx(PrimaryButton, {\n onClick: dismissModal,\n text: context.loc('ReviewCommentActionModal_ContentViolation_Cancel_Button_Label', 'Close')\n })\n })\n ]\n });\n}\nexport function ReviewCommentModalCreateErrorDialog({ context, dismissModal, payload }) {\n const { modalProps, dialogContentProps, maxWidth } = getReviewCommentsModalDialogProps(context.loc('ReviewCommentActionModal_CreateError_Title', \"Couldn't publish your comment\"));\n return /*#__PURE__*/ _jsxs(Dialog, {\n hidden: !payload.showModal,\n onDismiss: dismissModal,\n dialogContentProps: dialogContentProps,\n modalProps: modalProps,\n maxWidth: maxWidth,\n children: [\n /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n tokens: {\n childrenGap: 10\n },\n children: [\n /*#__PURE__*/ _jsx(Icon, {\n iconName: \"info\",\n className: ReviewCommentModalStyles.infoIcon\n }),\n /*#__PURE__*/ _jsx(Text, {\n children: context.loc('ReviewCommentActionModal_CreateError_Description', 'There was a problem publishing your comment. Please try again.')\n })\n ]\n }),\n /*#__PURE__*/ _jsx(DialogFooter, {\n children: /*#__PURE__*/ _jsx(PrimaryButton, {\n onClick: dismissModal,\n text: context.loc('ReviewCommentActionModal_CreateError_Cancel_Button_Label', 'Close')\n })\n })\n ]\n });\n}\n","import * as React from 'react';\nimport { ReviewCommentModal as ReviewCommentModalComponent } from '@shared/components/modals/reviewCommentModal';\nimport { deleteReviewComment, updateReviewComment } from '@shared/actions/thunkActions';\nconst { connect } = require('react-redux');\nexport const mapStateToProps = (state, ownProps)=>{\n return {\n userInfo: state.users,\n onDeleteComment: ownProps.onDeleteComment,\n onEditComment: ownProps.onEditComment,\n dismissModal: ownProps.dismissModal,\n payload: ownProps.payload\n };\n};\nexport const mapDispatchToProps = (dispatch, ownProps)=>{\n return {\n onDeleteComment: ({ offerId, reviewId, commentId, isNewlyAddedComment })=>dispatch(deleteReviewComment({\n offerId,\n reviewId,\n commentId,\n isNewlyAddedComment\n })),\n onEditComment: ({ offerId, reviewId, commentId, commentContent, isNewlyAddedComment })=>dispatch(updateReviewComment({\n offerId,\n reviewId,\n commentId,\n commentContent,\n isNewlyAddedComment\n })),\n userInfo: ownProps.userInfo,\n payload: ownProps.payload,\n dismissModal: ownProps.dismissModal\n };\n};\nexport const ReviewCommentModal = connect(mapStateToProps, mapDispatchToProps)(ReviewCommentModalComponent);\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { Dialog, DialogFooter, Icon, mergeStyleSets, PrimaryButton, Stack, Text } from '@fluentui/react';\nimport { getReviewCommentsModalDialogProps } from '@shared/utils/reviewsUtils';\nimport { SharedColors } from '@fluentui/theme';\nconst ReviewMarkAsHelpfulModalStyles = mergeStyleSets({\n infoIcon: {\n color: SharedColors.red20,\n fontSize: '16px'\n },\n loader: {\n position: 'fixed',\n left: '50%',\n top: '50%',\n transform: 'translate(-50%, -50%)',\n zIndex: 2200\n }\n});\nexport function ReviewMarkAsHelpfulModalErrorDialog({ context, dismissModal, payload }) {\n const { modalProps, dialogContentProps, maxWidth } = getReviewCommentsModalDialogProps(context.loc('ReviewMarkAsHelpfulModal_UpdateError_Title', 'Something went wrong'));\n return /*#__PURE__*/ _jsxs(Dialog, {\n hidden: !payload.showModal,\n onDismiss: dismissModal,\n dialogContentProps: dialogContentProps,\n modalProps: modalProps,\n maxWidth: maxWidth,\n children: [\n /*#__PURE__*/ _jsxs(Stack, {\n role: \"dialog\",\n horizontal: true,\n tokens: {\n childrenGap: 10\n },\n children: [\n /*#__PURE__*/ _jsx(Icon, {\n iconName: \"info\",\n className: ReviewMarkAsHelpfulModalStyles.infoIcon\n }),\n /*#__PURE__*/ _jsx(Text, {\n children: context.loc('ReviewMarkAsHelpfulModal_UpdateError_Description', 'There was a problem marking the review as helpful. Please try again.')\n })\n ]\n }),\n /*#__PURE__*/ _jsx(DialogFooter, {\n children: /*#__PURE__*/ _jsx(PrimaryButton, {\n onClick: dismissModal,\n text: context.loc('ReviewMarkAsHelpfulModal_UpdateError_Close_Button_Label', 'Close')\n })\n })\n ]\n });\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { Constants } from '@shared/utils/constants';\nimport { launchTelemetry } from '@shared/utils/reviewsUtils';\nimport { logger } from '@src/logger';\nimport { ReviewMarkAsHelpfulModalErrorDialog } from './reviewMarkAsHelpfulModalErrorDialog';\nexport function ReviewMarkAsHelpfulModal({ payload, dismissModal }, context) {\n const dismissModalWithTelemetry = ()=>{\n launchTelemetry(Constants.Telemetry.Action.Close, Constants.Telemetry.ActionModifier.ReviewItemMarkAsHelpfulDialog, {\n payload\n });\n logger.info(JSON.stringify({\n payload\n }), {\n action: Constants.Telemetry.Action.Close,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemMarkAsHelpfulDialog\n });\n dismissModal();\n };\n const innerDialogProps = {\n dismissModal: dismissModalWithTelemetry,\n context,\n payload\n };\n return /*#__PURE__*/ _jsx(ReviewMarkAsHelpfulModalErrorDialog, _object_spread({}, innerDialogProps));\n}\nReviewMarkAsHelpfulModal.contextTypes = {\n loc: PropTypes.func\n};\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport * as PropTypes from 'prop-types';\nimport { getId } from '@fluentui/utilities';\nimport { SignInModal } from '@shared/components/modals/signInModal';\nimport MediaModal from './mediaModal';\nimport VideoModal from './videoModal';\nimport DriveModal from './driveModal';\nimport { FieldHubModal } from '@shared/containers/modals/fieldHubModal';\nimport ErrorModal from '@shared/containers/modals/errorModal';\nimport AnimationModal from './animationModal';\nimport DisclaimerModal from './disclaimerModal';\nimport NpsModal from './npsModal';\nimport { InstructionsModal } from './instructionsModal';\nimport { DownloadSampleModal } from './downloadSampleModal';\nimport SpzaComponent from './../spzaComponent';\nimport { Constants } from '@shared/utils/constants';\nimport { urlReplace, routes, appendQueryParams } from '@shared/routerHistory';\nimport { getWindow } from '@shared/services/window';\nimport { removeURLParameter } from '@shared/utils/appUtils';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { NpsModule } from '@shared/utils/npsUtils';\nimport { handleConsentModalCall } from '@shared/handlers/consentModalHandler';\nimport { handleRatingModal } from 'handlers/ratingModalHandler';\nimport { handleReportAbuseModalCall } from '@shared/handlers/reportAbuseModalHandler';\nimport { stringifyError } from '@shared/utils/errorUtils';\nimport { FocusTrapZone } from '@fluentui/react';\nimport { ReviewCommentModal } from '@shared/containers/modals/reviewCommentModal';\nimport { logger } from '@src/logger';\nimport { ReviewMarkAsHelpfulModal } from '@shared/components/modals/reviewMarkAsHelpfulModal';\nimport classNames from 'classnames';\nexport class Modal extends SpzaComponent {\n componentDidMount() {\n this.attachElementToDOM();\n const perfPayload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.PageLoad,\n actionModifier: Constants.Telemetry.ActionModifier.End,\n details: JSON.stringify({\n ModalId: this.props.modalId\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', perfPayload);\n logger.info(perfPayload.details, {\n action: perfPayload.action,\n actionModifier: perfPayload.actionModifier\n });\n getWindow().addEventListener('keydown', this.handleKeyPress.bind(this), false);\n NpsModule.BlockShowingNPS();\n }\n handleKeyPress(e) {\n const { disableDismissModal } = this.props;\n if (e.code === 'Escape' && !disableDismissModal) {\n this.dismissModal();\n }\n }\n componentWillUnmount() {\n const currWindow = getWindow();\n currWindow.removeEventListener('keydown', this.handleKeyPress.bind(this), false);\n // During CTA experience, when the user gets back from the Sign-in/Sign-up page to the modal,\n // there will be a query parameter(modalAppId) added in the end.\n // So, when the modal is dismissed, we need to get rid of this parameter\n if (currWindow.location.href.indexOf('modalAppId') > -1) {\n const pageURL = removeURLParameter(currWindow.location.href, 'modalAppId');\n urlReplace(pageURL);\n }\n NpsModule.AllowShowingNPS();\n if (this.trigger) {\n this.trigger.focus();\n }\n this.removeElementFromDOM();\n }\n dismissModal() {\n const { disableDismissModal } = this.props;\n if (disableDismissModal) {\n return;\n }\n if (this.props.modalId === Constants.ModalType.Error) {\n if (!this.props.isEmbedded) {\n this.props.dismissModalWithRedirect(this.context.buildHref(routes.home, null, {\n category: null,\n industry: null,\n product: null,\n search: null\n }));\n } else {\n let href = this.context.buildHref(routes.marketplace, null, {\n category: null,\n industry: null,\n product: null,\n showPrivateApps: false,\n search: null,\n page: null\n });\n // For the embedded app we need to convert the relative path to an absolute path by adding '/embed'\n href = '/embed' + appendQueryParams(href, {\n embedHost: this.props.embedHost\n });\n this.props.dismissModalWithRedirect(href);\n }\n } else {\n this.props.dismissModal();\n }\n if (this.props.onModalDismiss) {\n this.props.onModalDismiss();\n }\n }\n renderImpl() {\n const { disableDismissModal } = this.props;\n let modalContent = null;\n let dismissModal = this.dismissModal.bind(this);\n let modalBackgroundClasses = classNames({\n spza_presentation: true,\n spza_background_1: true,\n spza_background_2: false\n });\n let modalClasses = classNames({\n spza_dialog: true,\n spza_dialog_design2: false\n });\n let appData = null;\n let service = null;\n switch(this.props.modalId){\n case Constants.ModalType.SignIn:\n modalContent = /*#__PURE__*/ _jsx(SignInModal, {\n dismissModal: dismissModal,\n altAuth: this.props.featureFlags.AltAuth,\n signInModalType: Constants.SignInType.SignInWith_MSA_AAD,\n disableDismissModal: disableDismissModal\n });\n break;\n case Constants.ModalType.CTA:\n if (this.props.entityType === Constants.EntityType.App) {\n try {\n appData = [\n ...this.props.allApps,\n ...this.props.allCloudsIndustry\n ].find((x)=>x.entityId === this.props.entityId);\n // check the public offers first and then the private\n if (!appData) {\n appData = this.props.allPrivateOffers.find((app)=>app.entityId === this.props.entityId);\n if (!appData) {\n var _this_props_allFavouriteApps_find;\n appData = (_this_props_allFavouriteApps_find = this.props.allFavouriteApps.find((app)=>app.item.entityId === this.props.entityId)) === null || _this_props_allFavouriteApps_find === void 0 ? void 0 : _this_props_allFavouriteApps_find.item;\n }\n if (appData) {\n this.props.updateAppEntity(appData);\n }\n }\n if (!appData) {\n this.getAppDetails();\n }\n } catch (error) {\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.PageLoad,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: `Case Constants.ModalType.CTA - this.props.allApps= ${JSON.stringify(this.props.allApps)}, error msg= ${stringifyError(error)}`\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.error(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n throw error;\n }\n } else if (this.props.entityType === Constants.EntityType.Service) {\n service = [\n ...this.props.allServices,\n ...this.props.allCloudsIndustry\n ].filter((x)=>{\n return x && x.entityId === this.props.entityId;\n })[0];\n }\n if ((appData === null || appData === void 0 ? void 0 : appData.CertificationState) === Constants.CertificationType.MicrosoftCertified) {\n const payloadInfo = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.Info,\n details: JSON.stringify({\n contentName: 'M365 Certified'\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payloadInfo);\n logger.info(payloadInfo.details, {\n action: payloadInfo.action,\n actionModifier: payloadInfo.actionModifier\n });\n }\n modalContent = handleConsentModalCall(this.props, appData, dismissModal, service);\n break;\n case Constants.ModalType.Video:\n modalContent = /*#__PURE__*/ _jsx(VideoModal, {\n video: this.props.payload,\n dismissModal: dismissModal\n });\n break;\n case Constants.ModalType.MediaModal:\n modalContent = /*#__PURE__*/ _jsx(MediaModal, {\n payload: this.props.payload,\n dismissModal: dismissModal\n });\n break;\n case Constants.ModalType.Drive:\n modalContent = /*#__PURE__*/ _jsx(DriveModal, {\n drive: this.props.payload,\n dismissModal: dismissModal\n });\n break;\n case Constants.ModalType.Iframe:\n modalBackgroundClasses = classNames({\n spza_presentation: true,\n spza_background_1: false,\n spza_background_2: true\n });\n modalContent = /*#__PURE__*/ _jsx(FieldHubModal, {\n iframeProps: this.props.payload,\n dismissModal: dismissModal\n });\n dismissModal = null;\n break;\n case Constants.ModalType.Error:\n modalContent = /*#__PURE__*/ _jsx(ErrorModal, {\n dismissModal: dismissModal\n });\n break;\n case Constants.ModalType.Disclaimer:\n modalBackgroundClasses = classNames({\n spza_presentation: true,\n spza_background_1: false,\n spza_background_2: true\n });\n modalClasses = classNames({\n spza_dialog: true,\n spza_dialog_design2: true\n });\n modalContent = /*#__PURE__*/ _jsx(DisclaimerModal, {\n payload: this.props.payload,\n dismissModal: dismissModal\n });\n dismissModal = null;\n break;\n case Constants.ModalType.NPS:\n modalContent = /*#__PURE__*/ _jsx(NpsModal, {\n dismissModal: dismissModal,\n emailAddress: this.props.userInfo.signedIn ? this.props.userInfo.email : 'no user'\n });\n dismissModal = null;\n break;\n case Constants.ModalType.Rating:\n try {\n appData = this.props.allApps.filter((x)=>{\n return x.entityId.toLowerCase() === this.props.payload.app.entityId.toLowerCase();\n })[0];\n } catch (error) {\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.PageLoad,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: `Case Constants.ModalType.Rating - this.props.allApps= ${JSON.stringify(this.props.allApps)}, error msg= ${stringifyError(error)}`\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.error(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n throw error;\n }\n modalContent = handleRatingModal(this.props, appData, dismissModal, service);\n dismissModal = null;\n break;\n case Constants.ModalType.ReviewComment:\n modalContent = /*#__PURE__*/ _jsx(ReviewCommentModal, {\n payload: this.props.payload,\n dismissModal: dismissModal\n });\n dismissModal = null;\n break;\n case Constants.ModalType.ReviewMarkAsHelpful:\n modalContent = /*#__PURE__*/ _jsx(ReviewMarkAsHelpfulModal, {\n payload: this.props.payload,\n dismissModal: dismissModal\n });\n dismissModal = null;\n break;\n case Constants.ModalType.Animation:\n modalContent = /*#__PURE__*/ _jsx(AnimationModal, {});\n break;\n case Constants.ModalType.ReportAbuse:\n var _this_props_options, _this_props_options1, _this_props_options2, _this_props_options3;\n modalContent = handleReportAbuseModalCall((_this_props_options = this.props.options) === null || _this_props_options === void 0 ? void 0 : _this_props_options.appId, (_this_props_options1 = this.props.options) === null || _this_props_options1 === void 0 ? void 0 : _this_props_options1.reviewId, (_this_props_options2 = this.props.options) === null || _this_props_options2 === void 0 ? void 0 : _this_props_options2.reviewTitle, this.props.userInfo, (_this_props_options3 = this.props.options) === null || _this_props_options3 === void 0 ? void 0 : _this_props_options3.reviewSource, dismissModal);\n break;\n case Constants.ModalType.Instructions:\n modalContent = /*#__PURE__*/ _jsx(InstructionsModal, {\n context: this.context,\n isFromDownload: this.props.payload.isFromDownload,\n dismissModal: dismissModal\n });\n break;\n case Constants.ModalType.DownloadSample:\n modalContent = /*#__PURE__*/ _jsx(DownloadSampleModal, {\n context: this.context,\n dismissModal: dismissModal\n });\n break;\n default:\n break;\n }\n return /*#__PURE__*/ ReactDOM.createPortal(/*#__PURE__*/ _jsx(FocusTrapZone, {\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: modalClasses,\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: modalBackgroundClasses,\n onClick: dismissModal\n }),\n modalContent\n ]\n })\n }), this.domTreeElement);\n }\n constructor(props, context){\n var _this;\n super(props, context), _this = this, _define_property(this, \"context\", void 0), _define_property(this, \"trigger\", null), _define_property(this, \"domTreeElement\", void 0), _define_property(this, \"attachElementToDOM\", ()=>document.body.appendChild(this.domTreeElement)), _define_property(this, \"removeElementFromDOM\", ()=>document.body.removeChild(this.domTreeElement)), _define_property(this, \"getAppDetails\", /*#__PURE__*/ _async_to_generator(function*() {\n const { entityId, fetchAppDetails } = _this.props;\n fetchAppDetails(entityId);\n }));\n this.domTreeElement = document.createElement('div');\n this.domTreeElement.setAttribute('id', getId('modal'));\n this.trigger = document.activeElement;\n }\n}\nModal.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n buildHref: PropTypes.func,\n renderErrorModal: PropTypes.func\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { ReportAbuseModal } from '../containers/modals/reportAbuseModal';\nimport { Constants } from '../../shared/utils/constants';\nimport { SignInModal } from '../../shared/components/modals/signInModal';\nexport function handleReportAbuseModalCall(appId, reviewId, reviewTitle, userInfo, reviewSource, dismissModal) {\n if (!userInfo.signedIn) {\n return /*#__PURE__*/ _jsx(SignInModal, {\n redirect: \"reportAbuse\",\n entityId: reviewId,\n reviewAppId: appId,\n reviewTitle: reviewTitle,\n dismissModal: dismissModal,\n signInModalType: Constants.SignInType.SignInWith_MSA_AAD\n });\n } else {\n return /*#__PURE__*/ _jsx(ReportAbuseModal, {\n appId: appId,\n reviewId: reviewId,\n reviewTitle: reviewTitle,\n reviewSource: reviewSource,\n dismissModal: dismissModal\n });\n }\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { ConsentModal } from '@appsource/containers/modals/consentModal';\nimport { Constants } from '@shared/utils/constants';\nimport { SignInModal } from '@shared/components/modals/signInModal';\nimport { getSignInModalType, isTransactApp, isPrivateOffer, isPowerBIVisuals } from '@shared/utils/appUtils';\nimport { isAppContactForm } from '@shared/utils/modals';\nimport AnimationModal from '@shared/components/modals/animationModal';\nimport { getPrimaryProductUrl } from '@shared/utils/datamappingHelpers';\nexport function handleConsentModalCall(props, appData, dismissModal, service) {\n let modalContent = null;\n const { options, isEmbedded, billingCountryCode, userInfo, entityId, query } = props;\n const ctaType = parseInt(options.ctaType, 10);\n const isTransactable = isTransactApp({\n isEmbedded,\n ctaTypes: [\n ctaType\n ],\n appData,\n billingRegion: billingCountryCode\n }) || isPrivateOffer(appData === null || appData === void 0 ? void 0 : appData.appType) && !isPowerBIVisuals(getPrimaryProductUrl(appData.primaryProduct));\n const signinType = getSignInModalType(appData && appData.primaryProduct, appData && appData.products, userInfo, ctaType, !!service, isTransactable);\n const { signedIn, loading } = props.userInfo;\n const shouldShowAnimationModal = !!(!signedIn && loading);\n const shouldShowSignInModal = signinType !== Constants.SignInType.Authorized && !props.isEmbedded;\n const signinRedirect = !!service && !appData ? 'service' : 'app';\n const entityType = !!service && !appData ? Constants.EntityType.Service : Constants.EntityType.App;\n if (shouldShowAnimationModal) {\n modalContent = /*#__PURE__*/ _jsx(AnimationModal, {});\n }\n if (shouldShowSignInModal && !shouldShowAnimationModal) {\n const appTitle = appData && appData.title ? appData.title : '';\n const userEmail = userInfo && userInfo.email ? userInfo.email : '';\n const serviceTitle = service && service.title ? service.title : '';\n modalContent = /*#__PURE__*/ _jsx(SignInModal, {\n redirect: signinRedirect,\n entityId: entityId,\n dismissModal: dismissModal,\n signInModalType: signinType,\n appName: appTitle,\n email: userEmail,\n entityType: entityType,\n serviceName: serviceTitle,\n ctaType: ctaType\n });\n } else if (appData || service) {\n modalContent = /*#__PURE__*/ _jsx(ConsentModal, {\n appInfo: appData,\n isEmbedded: isEmbedded,\n isContactForm: isAppContactForm(appData, ctaType),\n dismissModal: dismissModal,\n ctaType: ctaType,\n serviceInfo: service,\n query: query,\n isTransactApp: isTransactable\n });\n }\n return modalContent;\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { Constants } from '@shared/utils/constants';\nimport { SignInModal } from '@shared/components/modals/signInModal';\nimport { getSignInModalType, getCTATypeForActionString } from '@shared/utils/appUtils';\nimport { RatingModal } from '@shared/containers/modals/ratingModal';\nexport function handleRatingModal(props, appData, dismissModal, service) {\n let modalContent = null;\n const ctaType = getCTATypeForActionString(props.payload.ctaType);\n const signinType = getSignInModalType(appData && appData.primaryProduct, appData && appData.products, props.userInfo, ctaType, !!service);\n const shouldShowSignInModal = signinType !== Constants.SignInType.Authorized && !props.isEmbedded;\n const signinRedirect = 'review';\n const entityType = !!service && !appData ? Constants.EntityType.Service : Constants.EntityType.App;\n if (shouldShowSignInModal) {\n const appTitle = appData && appData.title ? appData.title : '';\n const userEmail = props.userInfo && props.userInfo.email ? props.userInfo.email : '';\n modalContent = /*#__PURE__*/ _jsx(SignInModal, {\n redirect: signinRedirect,\n entityId: appData.entityId,\n dismissModal: dismissModal,\n signInModalType: signinType,\n appName: appTitle,\n email: userEmail,\n entityType: entityType,\n ctaType: ctaType,\n reviewAppId: appData.entityId\n });\n } else {\n const payload = props.payload;\n modalContent = /*#__PURE__*/ _jsx(RatingModal, {\n payload: payload,\n dismissModal: dismissModal,\n setUserReviewStatus: props.setUserReviewStatus\n });\n }\n return modalContent;\n}\n","import * as React from 'react';\nimport { createEntityFullDataReceivedAction, createModalAction, createUserReviewUpdatedAction } from '../../actions/actions';\nimport { Modal as ModalComponent } from './../../components/modals/modal';\nimport { getWindow } from '../../services/window';\nimport { isOnMicrosoftEmail } from '../../utils/appUtils';\nimport { SpzaInstrumentService } from '../../services/telemetry/spza/spzaInstrument';\nimport { Constants } from './../../utils/constants';\nimport { getCookieItem } from './../../utils/browserStorageUtils';\nimport { logger } from '@src/logger';\nimport { connect } from 'react-redux';\nimport { getAppDetail } from '@shared/actions/thunkActions';\nexport const mapStateToProps = (state, ownProps)=>{\n var _state_users_privateOffers;\n const userInfo = state.users;\n if (state.config.isEmbedded) {\n const cookie = getCookieItem('appsourcelead');\n let isAlternateEmailFromCookie = false;\n if (cookie && cookie.alternateEmail && cookie.email) {\n const userEmail = userInfo && userInfo.email ? userInfo.email.toLowerCase() : ' ';\n // If userInfo already has alternateEmail (from graph call on server), do NOT overwrite it here\n // also ensure that cookie's email is matching useremail to avoid scenario where user signs in into other sites that updated the cookie to some MSA\n if (!userInfo.alternateEmail && userEmail === cookie.email.toLowerCase()) {\n userInfo.alternateEmail = cookie.alternateEmail;\n isAlternateEmailFromCookie = true;\n }\n }\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.PageLoad,\n actionModifier: Constants.Telemetry.ActionModifier.CookieData,\n details: JSON.stringify({\n alternateEmailExists: !!(cookie && cookie.alternateEmail),\n emailHasOnMicrosoft: userInfo && userInfo.email ? isOnMicrosoftEmail(userInfo.email) : false,\n alternateEmailFromCookie: isAlternateEmailFromCookie\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n }\n const recommendedServices = state.services.recommendedServices;\n return {\n entityId: state.modal.entityId,\n modalId: state.modal.modalId,\n onModalDismiss: state.modal.onModalDismiss,\n disableDismissModal: state.modal.disableDismissModal,\n userInfo,\n isSignedIn: state.users.signedIn,\n allApps: state.apps.dataList,\n allCloudsIndustry: state.cloudsIndustry.dataList,\n allServices: state.services.dataList.concat(recommendedServices.whatsNewService).concat(recommendedServices.trendingService),\n allPrivateOffers: ((_state_users_privateOffers = state.users.privateOffers) === null || _state_users_privateOffers === void 0 ? void 0 : _state_users_privateOffers.dataList) || [],\n allFavouriteApps: state.userFavourite.apps,\n isEmbedded: state.config.isEmbedded,\n featureFlags: state.config.featureFlags,\n entityType: state.modal.entityType,\n payload: state.modal.payload,\n embedHost: state.config.embedHost,\n options: state.modal.options,\n query: ownProps && ownProps.query,\n billingCountryCode: state.config.billingCountryCode\n };\n};\nexport const mapDispatchToProps = (dispatch)=>{\n return {\n fetchAppDetails: (entityId)=>dispatch(getAppDetail(entityId, false)),\n updateAppEntity: (entityDetails)=>dispatch(createEntityFullDataReceivedAction({\n entityType: Constants.EntityType.App,\n entityDetails\n })),\n dismissModal: ()=>{\n return dispatch(createModalAction({\n showModal: false\n }));\n },\n setUserReviewStatus: (hasReview)=>{\n return dispatch(createUserReviewUpdatedAction(hasReview));\n },\n dismissModalWithRedirect: (href)=>{\n getWindow().location.assign(href);\n }\n };\n};\nconst Modal = connect(mapStateToProps, mapDispatchToProps)(ModalComponent);\nexport default Modal;\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from '@shared/components/spzaComponent';\nimport { attachClickHandlerToElement } from '@shared/utils/appUtils';\nimport { Constants } from '@shared/utils/constants';\nimport { getWindow } from 'services/window';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { logger } from '@src/logger';\nexport class Footer extends SpzaComponent {\n componentDidMount() {\n const { toggleContextPanel } = this.props;\n const handleShowContextPanel = ()=>{\n return (event)=>{\n const payload = {\n page: this.props.location.pathname,\n action: Constants.Telemetry.Action.Country,\n actionModifier: Constants.Telemetry.ActionModifier.FooterLocale\n };\n this.instrument.probe(Constants.Telemetry.ProbeName.LogInfo, payload);\n logger.info(payload.details, {\n page: payload.page,\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n toggleContextPanel();\n event.preventDefault();\n };\n };\n // locale picker\n attachClickHandlerToElement('locale-picker-link', handleShowContextPanel());\n this.manageCookiesBtn();\n }\n componentDidUpdate() {\n this.manageCookiesBtn();\n }\n // manage Cookies button in Appsource footer.\n manageCookiesBtn() {\n const hiddenClass = 'x-hidden';\n if (document && document.getElementById(Constants.Cookies.WCPManageCookieBtnId) && document.getElementById(Constants.Cookies.WCPManageCookieBtnId).className.indexOf(hiddenClass) >= 0 && this.props.isManageCookieBtnRequired) {\n const manageCookieOnClick = ()=>{\n const telemetryData = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.ConsentBanner,\n actionModifier: Constants.Telemetry.ActionModifier.Info,\n details: 'manage button clicked'\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', telemetryData);\n logger.info(telemetryData.details, {\n action: telemetryData.action,\n actionModifier: telemetryData.actionModifier\n });\n this.props.openCookieManagementModal();\n };\n document.getElementById(Constants.Cookies.WCPManageCookieBtnId).classList.remove(hiddenClass);\n attachClickHandlerToElement(Constants.Cookies.WCPManageCookieBtnId, manageCookieOnClick);\n }\n }\n renderImpl() {\n return null;\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"context\", void 0), _define_property(this, \"instrument\", void 0);\n this.instrument = SpzaInstrumentService.getProvider();\n }\n}\nFooter.contextTypes = {\n buildHref: PropTypes.func,\n renderErrorModal: PropTypes.func\n};\n","import { Footer as FooterComponent } from '../components/footer';\nimport { createIsManageModalOpenAction, createToggleShowContextPanel } from '@shared/actions/actions';\nimport { withRouter } from '@shared/routerHistory';\nimport { connect } from 'react-redux';\nconst mapStateToProps = (state)=>{\n return {\n isManageCookieBtnRequired: state.config.cookiesConsent.isConsentRequired\n };\n};\nconst mapDispatchToProps = (dispatch)=>{\n return {\n openCookieManagementModal: ()=>dispatch(createIsManageModalOpenAction(true)),\n toggleContextPanel: ()=>dispatch(createToggleShowContextPanel())\n };\n};\nexport const Footer = withRouter(connect(mapStateToProps, mapDispatchToProps)(FooterComponent));\n","import { Constants } from './constants';\nimport { addAttributes, getElement } from './appUtils';\nimport { getTrimmedWords } from './stringUtils';\n/**\n * This function is to change azure header navigation bar to be static instead of sticky at the top\n */ export function forceAzureHeaderNavStatic() {\n // tag name of dom element to append new classname to\n const htmlTagName = 'html';\n // new classname\n const azureHeaderStaticClassValue = 'azure-header-static';\n // get dom element of tag name\n const htmlTagDomElement = getElement(Constants.SearchBy.Tag, htmlTagName);\n if (htmlTagDomElement) {\n // get classname value of html tag element\n const htmlTagClassValue = htmlTagDomElement.className || '';\n const htmlTagClassValueList = getTrimmedWords(htmlTagClassValue, ' ');\n // check if html tag element already has azure-header-static\n if (htmlTagClassValueList.indexOf(azureHeaderStaticClassValue) >= 0) {\n return;\n }\n // append new classname to existing attribute classname value if exist\n addAttributes(Constants.SearchBy.Tag, htmlTagName, [\n {\n key: Constants.HTMLAttribute.className,\n value: htmlTagClassValueList.concat(azureHeaderStaticClassValue).join(' ')\n }\n ]);\n }\n}\n/**\n * Fix for clicking elsewhere, azure header navigation bar dropdown should be closed\n *\n * NOTE: since azure header team refuses to fix this bug, adding a workaround for now\n */ export function closeAzureHeaderNavDropdown() {\n // query selector of active azure header navigation bar dropdown button\n const azureHeaderNavDropdownQuerySelector = '.azure-header li.active button';\n // get active azure header navigation bar dropdown button\n const azureHeaderNavDropdownDOMElement = getElement(Constants.SearchBy.QuerySelector, azureHeaderNavDropdownQuerySelector);\n // click it again to close\n if (azureHeaderNavDropdownDOMElement) {\n azureHeaderNavDropdownDOMElement.click();\n }\n}\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { Dialog, DialogType, DialogFooter, PrimaryButton, DefaultButton } from '@fluentui/react';\nimport { NeutralColors } from '@fluentui/theme';\nconst dialogStyles = {\n root: {\n position: 'relative',\n height: 'auto'\n },\n main: {\n position: 'fixed',\n zIndex: 999,\n right: 10,\n bottom: 20\n }\n};\nconst dialogContentStyles = {\n header: {\n color: NeutralColors.gray160\n },\n subText: {\n color: NeutralColors.gray130\n }\n};\nconst dialogContentProps = (context)=>{\n return {\n type: DialogType.close,\n title: context.loc('Nps_PreviewModal_Title', 'Can we ask a quick question?'),\n closeButtonAriaLabel: context.loc('Nps_PreviewModal_CloseButton_AriaLabel', 'Close'),\n subText: context.loc('Nps_PreviewModal_SubHeader_Text', 'We’re always looking for ways to improve AppSource. Can you tell us about your experience?'),\n styles: dialogContentStyles\n };\n};\nconst modalMinWidth = '536px';\nconst modalProps = {\n isModeless: true\n};\nexport const NpsPreviewModal = ({ hidden, onDismiss, onSubmit, context })=>{\n return /*#__PURE__*/ _jsx(Dialog, {\n hidden: hidden,\n dialogContentProps: dialogContentProps(context),\n minWidth: modalMinWidth,\n modalProps: modalProps,\n styles: dialogStyles,\n onDismiss: onDismiss,\n children: /*#__PURE__*/ _jsxs(DialogFooter, {\n children: [\n /*#__PURE__*/ _jsx(PrimaryButton, {\n text: context.loc('Nps_PreviewModal_SubmitButton_Text', 'Share feedback'),\n onClick: onSubmit\n }),\n /*#__PURE__*/ _jsx(DefaultButton, {\n text: context.loc('Nps_PreviewModal_DismissButton_Text', 'Maybe later'),\n onClick: onDismiss\n })\n ]\n })\n });\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { mergeStyleSets, Text } from '@fluentui/react';\nimport { SubmittedModal } from '@shared/components/modals/submittedModal';\nimport { NeutralColors, SharedColors } from '@fluentui/theme';\nimport { ExternalLink } from '@shared/components/externalLink';\nconst externalUrl = (correlationId)=>`https://aka.ms/appsource/comscore?correlationID=${correlationId}`;\nconst subTextStyles = {\n root: {\n color: NeutralColors.gray130,\n lineHeight: 20\n }\n};\nconst classNames = mergeStyleSets({\n externalLink: [\n {\n display: 'inline-block',\n color: `${SharedColors.cyanBlue10} !important`\n }\n ]\n});\nexport const NpsSubmittedModal = ({ hidden, onDismiss, correlationId, context })=>{\n return /*#__PURE__*/ _jsxs(SubmittedModal, {\n hidden: hidden,\n onDismiss: onDismiss,\n title: context.loc('Nps_SubmittedModal_Title', 'Feedback received'),\n context: context,\n children: [\n /*#__PURE__*/ _jsx(Text, {\n block: true,\n styles: subTextStyles,\n children: context.loc('Nps_SubmittedModal_Summary_Text', 'Thanks for taking the time to share your thoughts!')\n }),\n /*#__PURE__*/ _jsx(Text, {\n styles: subTextStyles,\n children: `${context.loc('Nps_SubmittedModal_Link_Invitation_Text', 'If you’d like to help us even more')}, `\n }),\n /*#__PURE__*/ _jsx(ExternalLink, {\n className: classNames.externalLink,\n accessibilityEnabled: true,\n href: externalUrl(correlationId),\n target: \"_blank\",\n rel: \"noreferrer\",\n onClickHandle: onDismiss,\n children: context.loc('Nps_SubmittedModal_External_Link_Text', 'take our online survey')\n }),\n /*#__PURE__*/ _jsx(Text, {\n styles: subTextStyles,\n children: \".\"\n })\n ]\n });\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { useState } from 'react';\nimport { Dialog, DialogType, DialogFooter, PrimaryButton, Stack, Text, FontIcon, DefaultButton, ButtonType, TextField, Checkbox, mergeStyleSets } from '@fluentui/react';\nimport { NeutralColors, SharedColors } from '@fluentui/theme';\nimport { useBoolean } from '@fluentui/react-hooks';\nimport { ExternalLink } from '@shared/components/externalLink';\nimport { ratingValues } from '@shared/Models';\nimport { useTelemetry } from '@shared/hooks/useTelemetry';\nimport { Constants } from '@shared/utils/constants';\nconst termsUrl = 'https://azure.microsoft.com/support/legal/marketplace-terms';\nconst privacyUrl = 'https://privacy.microsoft.com/en-us/privacystatement';\nconst modalMinWidth = '560px';\nconst modalProps = {\n isDarkOverlay: false,\n isBlocking: true\n};\nconst stackTokens = {\n childrenGap: 16\n};\nconst classNames = mergeStyleSets({\n externalLink: [\n {\n display: 'inline-block',\n color: `${SharedColors.cyanBlue10} !important`\n }\n ],\n defaultText: [\n {\n color: NeutralColors.gray130\n }\n ],\n divider: [\n {\n fontSize: 16,\n color: NeutralColors.gray160,\n lineHeight: 20\n }\n ]\n});\nconst dialogContentStyles = {\n header: {\n color: NeutralColors.gray160\n },\n subText: {\n color: NeutralColors.gray160,\n fontWeight: 600\n }\n};\nconst dialogTextFieldStyles = {\n fieldGroup: {\n height: 96\n }\n};\nconst buttonStyles = {\n root: {\n width: 40,\n height: 48,\n minWidth: 0,\n border: '1px solid #E1E3E5'\n },\n rootChecked: {\n color: NeutralColors.white,\n backgroundColor: SharedColors.cyanBlue10\n },\n rootCheckedHovered: {\n color: NeutralColors.white,\n backgroundColor: SharedColors.cyanBlue10\n }\n};\nconst dialogContentProps = (context)=>{\n return {\n type: DialogType.close,\n title: context.loc('Nps_SurveyModal_Title', 'We’d love your feedback'),\n subText: context.loc('Nps_SurveyModal_SubHeader_Text', 'How likely are you to recommend AppSource to a friend or colleague?'),\n closeButtonAriaLabel: context.loc('Nps_SurveyModal_CloseButton_AriaText', 'Close'),\n styles: dialogContentStyles\n };\n};\nconst checkboxLabelDefaultText = (email)=>`It’s OK to contact me at ${email} about my feedback`;\nconst additionalInfoDefaultText = 'For specific concerns or issues regarding the use of an application, please contact the publisher via the support link on the application product page.';\nconst NpsTermsAndPrivacy = ({ context })=>{\n return /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n children: [\n /*#__PURE__*/ _jsx(ExternalLink, {\n className: classNames.externalLink,\n accessibilityEnabled: true,\n href: termsUrl,\n target: \"_blank\",\n rel: \"noreferrer\",\n children: context.loc('Nps_SurveyModal_Terms_Link_Text', 'Terms')\n }),\n /*#__PURE__*/ _jsx(FontIcon, {\n iconName: \"Separator\",\n className: classNames.divider\n }),\n /*#__PURE__*/ _jsx(ExternalLink, {\n className: classNames.externalLink,\n accessibilityEnabled: true,\n href: privacyUrl,\n target: \"_blank\",\n rel: \"noreferrer\",\n children: context.loc('Nps_SurveyModal_PrivacyStatement_Link_Text', 'Privacy statement')\n })\n ]\n });\n};\nconst NpsDescription = ({ value, onChange, context })=>{\n return /*#__PURE__*/ _jsx(TextField, {\n label: context.loc('Nps_SurveyModal_Description_Label_Text', 'What can we do to improve your experience?'),\n multiline: true,\n resizable: false,\n placeholder: context.loc('Nps_SurveyModal_Description_Placeholder_Text', 'Tell us what you think of AppSource.'),\n value: value,\n onChange: (_, newValue)=>onChange(newValue || ''),\n styles: dialogTextFieldStyles\n });\n};\nconst NpsRatings = ({ selectedRating, onChange, context })=>{\n return /*#__PURE__*/ _jsxs(Stack, {\n tokens: {\n childrenGap: 8\n },\n children: [\n /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n horizontalAlign: \"space-between\",\n children: [\n /*#__PURE__*/ _jsx(Text, {\n variant: \"smallPlus\",\n className: classNames.defaultText,\n children: context.loc('Nps_SurveyModal_Ratings_Unsatisfied_Text', 'Not at all likely')\n }),\n /*#__PURE__*/ _jsx(Text, {\n variant: \"smallPlus\",\n className: classNames.defaultText,\n children: context.loc('Nps_SurveyModal_Ratings_Satisfied_Text', 'Extremely likely')\n })\n ]\n }),\n /*#__PURE__*/ _jsx(Stack, {\n horizontal: true,\n tokens: {\n childrenGap: 8\n },\n children: ratingValues.map((ratingValue)=>/*#__PURE__*/ _jsx(DefaultButton, {\n toggle: true,\n buttonType: selectedRating === ratingValue ? ButtonType.primary : ButtonType.default,\n checked: selectedRating === ratingValue,\n styles: buttonStyles,\n text: `${ratingValue}`,\n onClick: ()=>onChange(ratingValue)\n }, ratingValue))\n })\n ]\n });\n};\nexport const NpsSurveyModal = ({ hidden, onDismiss, onSubmit, context, email = '' })=>{\n const [contactCheckboxChecked, { toggle: toggleContactCheckbox }] = useBoolean(false);\n const [selectedRating, setSelectedRating] = useState(null);\n const [description, setDescription] = useState('');\n const [{ pageAction }] = useTelemetry();\n const handleSubmit = ()=>{\n onSubmit({\n description,\n email: contactCheckboxChecked && email ? email : '',\n rating: selectedRating\n });\n pageAction(null, {\n behavior: 142,\n actionType: 'CL',\n contentTags: {\n id: Constants.Telemetry.Id.Nps,\n name: Constants.Telemetry.FeedbackName.Nps,\n fbnm: Constants.Telemetry.FeedbackName.Nps,\n vtbm: description,\n rate: `${selectedRating}`,\n sat: '0-10'\n }\n });\n };\n return /*#__PURE__*/ _jsxs(Dialog, {\n hidden: hidden,\n dialogContentProps: dialogContentProps(context),\n minWidth: modalMinWidth,\n modalProps: modalProps,\n onDismiss: onDismiss,\n children: [\n /*#__PURE__*/ _jsxs(Stack, {\n tokens: stackTokens,\n children: [\n /*#__PURE__*/ _jsx(NpsRatings, {\n selectedRating: selectedRating,\n onChange: setSelectedRating,\n context: context\n }),\n /*#__PURE__*/ _jsx(NpsDescription, {\n value: description,\n onChange: setDescription,\n context: context\n }),\n /*#__PURE__*/ _jsx(Text, {\n children: context.loc('Nps_SurveyModal_AdditionalInfo_Text', additionalInfoDefaultText)\n }),\n email && /*#__PURE__*/ _jsx(Checkbox, {\n label: context.locParams('Nps_SurveyModal_CheckboxLabel_Text', [\n email\n ], checkboxLabelDefaultText(email)),\n checked: contactCheckboxChecked,\n onChange: toggleContactCheckbox\n }),\n /*#__PURE__*/ _jsx(NpsTermsAndPrivacy, {\n context: context\n })\n ]\n }),\n /*#__PURE__*/ _jsx(DialogFooter, {\n children: /*#__PURE__*/ _jsx(PrimaryButton, {\n text: context.loc('Nps_SurveyModal_SubmitButton_Text', 'Submit'),\n onClick: handleSubmit,\n disabled: selectedRating === null\n })\n })\n ]\n });\n};\n","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { useBoolean } from '@fluentui/react-hooks';\nimport { NpsPreviewModal, NpsSubmittedModal, NpsSurveyModal } from '@appsource/components/modals';\nexport const NpsModal = ({ email, showPreviewModal, onDismissPreview, onDismissSurvey, onSubmitted, correlationId, context })=>{\n const [hidePreviewDialog, { toggle: toggleHidePreviewDialog }] = useBoolean(!showPreviewModal);\n const [hideSurveyDialog, { toggle: toggleHideSurveyDialog }] = useBoolean(showPreviewModal);\n const [hideSubmittedDialog, { toggle: toggleHideSubmittedDialog }] = useBoolean(true);\n const handleDismissPreview = ()=>{\n toggleHidePreviewDialog();\n onDismissPreview();\n };\n const handleSubmitPreview = ()=>{\n toggleHidePreviewDialog();\n toggleHideSurveyDialog();\n };\n const handleDismissSurvey = ()=>{\n toggleHideSurveyDialog();\n onDismissSurvey();\n };\n const handleSubmitSurvey = (answer)=>{\n toggleHideSurveyDialog();\n onSubmitted(answer);\n toggleHideSubmittedDialog();\n };\n return /*#__PURE__*/ _jsxs(_Fragment, {\n children: [\n /*#__PURE__*/ _jsx(NpsPreviewModal, {\n hidden: hidePreviewDialog,\n onDismiss: handleDismissPreview,\n onSubmit: handleSubmitPreview,\n context: context\n }),\n /*#__PURE__*/ _jsx(NpsSurveyModal, {\n hidden: hideSurveyDialog,\n email: email,\n onDismiss: handleDismissSurvey,\n onSubmit: handleSubmitSurvey,\n context: context\n }),\n /*#__PURE__*/ _jsx(NpsSubmittedModal, {\n hidden: hideSubmittedDialog,\n onDismiss: toggleHideSubmittedDialog,\n context: context,\n correlationId: correlationId\n })\n ]\n });\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React, { useEffect, useRef } from 'react';\nimport { NpsModal } from '@appsource/components/modals';\nimport { getNpsModule } from '@appsource/utils/nps';\nimport { getWindow } from '@shared/services/window';\nimport { Constants } from '@shared/utils/constants';\nimport { useSpzaInstrumentService } from '@shared/hooks';\nimport { storeFeedback } from '@shared/services/feedback';\nimport { logger } from '@src/logger';\nexport const Nps = ({ email, correlationId, context })=>{\n const [instrument] = useSpzaInstrumentService();\n const showPreviewModalRef = useRef(false);\n useEffect(()=>{\n var _getNpsModule;\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.NPS,\n actionModifier: Constants.Telemetry.ActionModifier.NpsPresented,\n details: JSON.stringify(_object_spread_props(_object_spread({}, ((_getNpsModule = getNpsModule()) === null || _getNpsModule === void 0 ? void 0 : _getNpsModule.metadata) || {}), {\n previewModal: showPreviewModalRef.current\n }))\n };\n instrument.probe('logAndFlushTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n }, [\n instrument\n ]);\n const handleSubmit = (answer)=>{\n var _getNpsModule;\n (_getNpsModule = getNpsModule()) === null || _getNpsModule === void 0 ? void 0 : _getNpsModule.npsSubmitted();\n const userTelemetryPayload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.NPS,\n actionModifier: Constants.Telemetry.ActionModifier.NpsSurveySubmitted,\n details: JSON.stringify({\n previewModal: showPreviewModalRef.current\n })\n };\n const userFeedbackPayload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.NPS,\n actionModifier: Constants.Telemetry.ActionModifier.Info,\n details: JSON.stringify(_object_spread_props(_object_spread({}, answer), {\n rating: `${answer.rating}`,\n previewModal: showPreviewModalRef.current\n })),\n isFeedback: true\n };\n instrument.probe('logAndFlushTelemetryInfo', userTelemetryPayload);\n instrument.probe('logAndFlushTelemetryInfo', userFeedbackPayload);\n logger.info(userTelemetryPayload.details, {\n action: userTelemetryPayload.action,\n actionModifier: userTelemetryPayload.actionModifier\n });\n storeFeedback({\n action: userFeedbackPayload.action,\n actionModifier: userFeedbackPayload.actionModifier,\n details: userFeedbackPayload.details\n });\n };\n const handleDismissPreview = ()=>{\n var _getNpsModule;\n (_getNpsModule = getNpsModule()) === null || _getNpsModule === void 0 ? void 0 : _getNpsModule.npsDismissed();\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.NPS,\n actionModifier: Constants.Telemetry.ActionModifier.NpsPreviewDismissed,\n details: ''\n };\n instrument.probe('logAndFlushTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n };\n const handleDismissSurvey = ()=>{\n var _getNpsModule;\n (_getNpsModule = getNpsModule()) === null || _getNpsModule === void 0 ? void 0 : _getNpsModule.npsDismissed();\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.NPS,\n actionModifier: Constants.Telemetry.ActionModifier.NpsSurveyDismissed,\n details: ''\n };\n instrument.probe('logAndFlushTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n };\n return /*#__PURE__*/ _jsx(NpsModal, {\n email: email,\n showPreviewModal: showPreviewModalRef.current,\n onDismissPreview: handleDismissPreview,\n onDismissSurvey: handleDismissSurvey,\n onSubmitted: handleSubmit,\n correlationId: correlationId,\n context: context\n });\n};\n","// eslint-disable-next-line spaced-comment\n///<reference types=\"@wcp/wcp-consent\" />\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React, { useEffect, useState } from 'react';\nimport { Constants } from '@shared/utils/constants';\nimport { getWindow, getDocument } from '@shared/services/window';\nimport { stringifyError } from '@shared/utils/errorUtils';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { logger } from '@src/logger';\nimport { MsClarity, MsClarityEnabledEnvironments } from '@shared/components/msClarity';\nimport { COMSCORE_URL } from '@appsource/utils/comscore';\nimport * as appConfig from '@shared/services/init/appConfig';\nconst shouldTrack = (consent)=>{\n return consent.Required && consent.Analytics || !consent.Required;\n};\nlet siteConsent = null;\nconst CookieBannerComponent = ()=>/*#__PURE__*/ _jsx(\"div\", {\n id: Constants.Cookies.WCPBannerName,\n className: Constants.Cookies.WCPBannerName\n });\n// wrapper to WCP\nexport const CookieBanner = ({ resetCookieManagementModal, locale, updateSiteConsent, updateIsConsentRequired, isManagementModalOpen, siteEnvironment })=>{\n const [allowTracking, setAllowTracking] = useState(false);\n const [isComScorePresent, setIsComScorePresent] = useState(false);\n const isMsClarityEnabled = MsClarityEnabledEnvironments.some((environment)=>siteEnvironment === environment);\n const handleNewConsent = (newConsent)=>{\n const telemetryData = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.ConsentBanner,\n actionModifier: Constants.Telemetry.ActionModifier.HandleNewConsent,\n details: 'onConsentChanged: ' + JSON.stringify(newConsent)\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', telemetryData);\n logger.info(telemetryData.details, {\n action: telemetryData.action,\n actionModifier: telemetryData.actionModifier\n });\n setAllowTracking(shouldTrack(newConsent));\n };\n const manageCookies = ()=>{\n if (siteConsent) {\n siteConsent.manageConsent();\n resetCookieManagementModal();\n }\n };\n const getConsent = ()=>{\n var _getWindow_WcpConsent, _getWindow;\n (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow_WcpConsent = _getWindow.WcpConsent) === null || _getWindow_WcpConsent === void 0 ? void 0 : _getWindow_WcpConsent.init(locale, Constants.Cookies.WCPBannerName, (err, _siteConsent)=>{\n const telemetryData = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.ConsentBanner,\n actionModifier: Constants.Telemetry.ActionModifier.GetConsent,\n details: 'initConsentBanner: start'\n };\n if (err) {\n telemetryData.actionModifier = Constants.Telemetry.ActionModifier.Error;\n telemetryData.details = 'initConsentBanner Error: ' + stringifyError(err);\n } else {\n siteConsent = _siteConsent;\n const wcpConsent = _siteConsent.getConsent();\n appConfig.set('siteConsent', wcpConsent);\n updateSiteConsent(wcpConsent);\n updateIsConsentRequired(_siteConsent.isConsentRequired);\n telemetryData.details = 'initConsentBanner: ' + JSON.stringify(_siteConsent.getConsent());\n setAllowTracking(shouldTrack(siteConsent.getConsent()));\n if (!getDocument().getElementById(Constants.Cookies.WCPManageCookieBtnId) && _siteConsent.isConsentRequired) {\n telemetryData.actionModifier = Constants.Telemetry.ActionModifier.Error;\n telemetryData.details = 'error - no manage btn for local: ' + locale;\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', telemetryData);\n logger.error(telemetryData.details, {\n action: telemetryData.action,\n actionModifier: telemetryData.actionModifier\n });\n }\n }\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', telemetryData);\n logger.info(telemetryData.details, {\n action: telemetryData.action,\n actionModifier: telemetryData.actionModifier\n });\n }, (newConsent)=>{\n updateSiteConsent(newConsent);\n appConfig.set('siteConsent', newConsent);\n handleNewConsent(newConsent);\n });\n };\n const wcpConsentCallBack = ()=>{\n var _getWindow;\n logger.info(`wcpConsentCallBack: get WcpConsent :${!!((_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : _getWindow.WcpConsent)}`, {\n action: Constants.Telemetry.Action.ConsentBanner,\n actionModifier: Constants.Telemetry.ActionModifier.WcpConsentCallBack\n });\n getConsent();\n };\n const wcpConsentListener = ()=>{\n var _getWindow;\n ((_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : _getWindow.WcpConsent) ? getConsent() : getWindow().addEventListener(Constants.Cookies.WCPEventName, wcpConsentCallBack);\n return ()=>{\n try {\n getWindow().removeEventListener(Constants.Cookies.WCPEventName, wcpConsentCallBack);\n logger.info('removeEventListener', {\n action: Constants.Telemetry.Action.ConsentBanner,\n actionModifier: Constants.Telemetry.ActionModifier.RemoveEventListener\n });\n } catch (error) {\n logger.error(`Error removing event listener: ${error}`, {\n action: Constants.Telemetry.Action.ConsentBanner,\n actionModifier: Constants.Telemetry.ActionModifier.Error\n });\n }\n };\n };\n const loadComScoreScript = ()=>{\n setIsComScorePresent(true);\n const scriptElement = getDocument().createElement('script');\n scriptElement.src = COMSCORE_URL;\n scriptElement.async = false;\n document.body.appendChild(scriptElement);\n };\n useEffect(()=>{\n if (isManagementModalOpen) {\n manageCookies();\n }\n }, [\n isManagementModalOpen\n ]);\n useEffect(()=>{\n wcpConsentListener();\n }, []);\n useEffect(()=>{\n if (allowTracking && !isComScorePresent) {\n loadComScoreScript();\n }\n }, [\n allowTracking\n ]);\n return /*#__PURE__*/ _jsxs(_Fragment, {\n children: [\n isMsClarityEnabled && /*#__PURE__*/ _jsx(MsClarity, {\n allowTracking: allowTracking\n }),\n /*#__PURE__*/ _jsx(CookieBannerComponent, {})\n ]\n });\n};\n","import { connect } from 'react-redux';\nimport { CookieBanner as CookieBannerComponent } from '@shared/components/cookieBanner';\nimport { createIsManageModalOpenAction, createSetWCPConsentAction, createSetIsConsentRequiredAction } from '@shared/actions/actions';\nimport { Constants } from '@shared/utils/constants';\nconst mapStateToProps = (state)=>{\n const { config: { locale = Constants.Cookies.WCPDefaultLocale, cookiesConsent, siteEnvironment } } = state;\n return {\n locale,\n isManagementModalOpen: cookiesConsent.isManageModalOpen,\n siteEnvironment\n };\n};\nconst mapDispatchToProps = (dispatch)=>{\n return {\n resetCookieManagementModal: ()=>dispatch(createIsManageModalOpenAction(false)),\n updateSiteConsent: (consent)=>dispatch(createSetWCPConsentAction(consent)),\n updateIsConsentRequired: (consent)=>dispatch(createSetIsConsentRequiredAction(consent))\n };\n};\nexport const CookieBanner = connect(mapStateToProps, mapDispatchToProps)(CookieBannerComponent);\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport SpzaComponent from './spzaComponent';\nimport Animation from './animation';\nclass Loader extends SpzaComponent {\n renderImpl() {\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"animation\",\n children: /*#__PURE__*/ _jsx(Animation, {\n isCircular: true\n })\n });\n }\n}\nexport { Loader as default };\n","import { Constants } from '@shared/utils/constants';\nimport { UserSegment } from '@shared/Models';\nimport { jwtDecode } from 'jwt-decode';\nimport { isEmpty, startCase } from 'lodash-es';\nimport { getAppConfig } from '@shared/services/init/appConfig';\nimport { logger } from '@src/logger';\nimport { stringifyError } from '@shared/utils/errorUtils';\nexport const EMPTY_ACCESS_TOKEN = {\n arm: '',\n graph: '',\n spza: '',\n pifd: '',\n commerce: '',\n jarvis: '',\n marketplaceLeads: ''\n};\nexport const isMSAUser = ({ claims })=>{\n return !isEmpty(claims) && !Object.keys(claims).includes('oid');\n};\nexport const getUserSegment = ({ claims })=>{\n if (!claims || isEmpty(claims)) {\n return UserSegment.unauthenticated;\n }\n return isMSAUser({\n claims\n }) ? UserSegment.consumer : UserSegment.business;\n};\nexport const createGuestUser = ()=>{\n return {\n id: '',\n group: [\n 'guest'\n ],\n signedIn: false,\n tid: '',\n accessToken: EMPTY_ACCESS_TOKEN,\n oid: '',\n displayName: 'guest',\n givenName: '',\n puid: '',\n lastName: '',\n uniqueName: '',\n firstName: '',\n familyName: '',\n email: 'guest@',\n alternateEmail: '',\n isMSAUser: false,\n userSegment: UserSegment.unauthenticated,\n fieldHubUserType: Constants.FieldHubUserType.None,\n homeAccountId: null\n };\n};\nexport const createAuthenticatedUser = ({ accessTokens, account, ssoStartTime })=>{\n try {\n var _name_split, _name_split1, _name_split2, _name_split3, _name_split4;\n const { username, homeAccountId } = account;\n const { puid, tid, name, preferred_username: preferredUsername, oid } = account.idTokenClaims;\n const { spza } = accessTokens;\n if (!spza) throw new Error('Spza token is missing');\n const userClaims = jwtDecode(spza);\n const { given_name: givenName, family_name: familyName } = userClaims;\n var _ref, _ref1, _ref2, _ref3, _ref4;\n const user = {\n id: puid,\n group: [\n 'aad'\n ],\n signedIn: true,\n tid,\n displayName: startCase(name !== null && name !== void 0 ? name : username.split('@')[0]),\n givenName: startCase((_ref = givenName !== null && givenName !== void 0 ? givenName : name === null || name === void 0 ? void 0 : (_name_split = name.split(' ')) === null || _name_split === void 0 ? void 0 : _name_split[0]) !== null && _ref !== void 0 ? _ref : username.split('@')[0]),\n firstName: startCase((_ref1 = givenName !== null && givenName !== void 0 ? givenName : name === null || name === void 0 ? void 0 : (_name_split1 = name.split(' ')) === null || _name_split1 === void 0 ? void 0 : _name_split1[0]) !== null && _ref1 !== void 0 ? _ref1 : username.split('@')[0]),\n familyName: startCase((_ref2 = familyName !== null && familyName !== void 0 ? familyName : name === null || name === void 0 ? void 0 : (_name_split2 = name.split(' ')) === null || _name_split2 === void 0 ? void 0 : _name_split2[1]) !== null && _ref2 !== void 0 ? _ref2 : username.split('@')[0]),\n lastName: startCase((_ref3 = familyName !== null && familyName !== void 0 ? familyName : name === null || name === void 0 ? void 0 : (_name_split3 = name.split(' ')) === null || _name_split3 === void 0 ? void 0 : _name_split3[1]) !== null && _ref3 !== void 0 ? _ref3 : username.split('@')[0]),\n uniqueName: startCase((_ref4 = familyName !== null && familyName !== void 0 ? familyName : name === null || name === void 0 ? void 0 : (_name_split4 = name.split(' ')) === null || _name_split4 === void 0 ? void 0 : _name_split4[1]) !== null && _ref4 !== void 0 ? _ref4 : username.split('@')[0]),\n puid: puid,\n email: preferredUsername,\n oid,\n alternateEmail: preferredUsername,\n isMSAUser: isMSAUser({\n claims: userClaims\n }),\n userSegment: getUserSegment({\n claims: userClaims\n }),\n fieldHubUserType: Constants.FieldHubUserType.None,\n homeAccountId,\n accessToken: accessTokens,\n graphApi: getAppConfig('graphApi'),\n refreshToken: ''\n };\n logger.info(JSON.stringify({\n isMSAUser: user.isMSAUser,\n UserSegment: user.userSegment,\n durationInMS: ssoStartTime ? Date.now() - ssoStartTime : null\n }), {\n action: Constants.Telemetry.Action.Login,\n actionModifier: Constants.Telemetry.ActionModifier.CreateAuthenticatedUserSuccess\n });\n return user;\n } catch (error) {\n logger.error(stringifyError(error), {\n action: Constants.Telemetry.Action.Login,\n actionModifier: Constants.Telemetry.ActionModifier.CreateAuthenticatedUserFailure,\n error\n });\n return createGuestUser();\n }\n};\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport { jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React, { useEffect, useRef, useState } from 'react';\nimport { useDispatch } from 'react-redux';\nimport { InteractionRequiredAuthError, InteractionStatus, InteractionType } from '@azure/msal-browser';\nimport { useMsal, useMsalAuthentication } from '@azure/msal-react';\nimport { logger } from '@src/logger';\nimport { updateUser } from '@shared/actions/thunkActions';\nimport { createAuthenticatedUser, createGuestUser } from '@shared/msal/user';\nimport { Constants } from '@shared/utils/constants';\nimport { getExtraScopesToConsent } from '@shared/msal/scopes';\nimport { fetchAccessTokens } from '@shared/msal/tokens';\nimport { stringifyError } from '@shared/utils/errorUtils';\nimport { getSilentRedirectUri } from '@shared/msal/config';\nimport { getLocalStorageItem, saveLocalStorageItem } from '@shared/utils/browserStorageUtils';\nconst SilentClientLogin = ()=>{\n const dispatch = useDispatch();\n const [hasActiveUser, setHasActiveUser] = useState(false);\n const ssoStartTime = useRef(null);\n const { error, result } = useMsalAuthentication(InteractionType.Silent, {\n redirectUri: getSilentRedirectUri(),\n extraScopesToConsent: getExtraScopesToConsent(),\n loginHint: getLocalStorageItem(Constants.LocalStorage.LoginHint)\n });\n const { accounts, instance, inProgress } = useMsal();\n const activeAccount = accounts === null || accounts === void 0 ? void 0 : accounts[0];\n useEffect(()=>{\n const setActiveUser = /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*() {\n instance.setActiveAccount(activeAccount);\n saveLocalStorageItem(Constants.LocalStorage.LoginHint, activeAccount.idTokenClaims.login_hint);\n const accessTokens = yield fetchAccessTokens({\n resources: [\n 'spza',\n 'arm',\n 'graph',\n 'commerce',\n 'jarvis',\n 'marketplaceLeads',\n 'pifd',\n 'agreement'\n ]\n });\n const user = createAuthenticatedUser({\n accessTokens,\n account: activeAccount,\n ssoStartTime: ssoStartTime.current\n });\n dispatch(updateUser({\n userDetails: user\n }));\n });\n return function setActiveUser() {\n return _ref.apply(this, arguments);\n };\n }();\n if (activeAccount && !hasActiveUser && inProgress === InteractionStatus.None) {\n setHasActiveUser(true);\n setActiveUser();\n }\n }, [\n activeAccount,\n hasActiveUser,\n inProgress,\n dispatch,\n instance\n ]);\n useEffect(()=>{\n if (error) {\n dispatch(updateUser({\n userDetails: createGuestUser()\n }));\n const stringifiedError = stringifyError(error);\n if (error instanceof InteractionRequiredAuthError) {\n logger.warning(stringifiedError, {\n action: Constants.Telemetry.Action.Login,\n actionModifier: Constants.Telemetry.ActionModifier.SSO_LOGIN_ERROR\n });\n } else {\n logger.error(stringifiedError, {\n action: Constants.Telemetry.Action.Login,\n actionModifier: Constants.Telemetry.ActionModifier.SSO_LOGIN_ERROR,\n error\n });\n }\n }\n }, [\n error\n ]);\n useEffect(()=>{\n if (result) {\n logger.info(JSON.stringify({\n fromCache: result.fromCache\n }), {\n action: Constants.Telemetry.Action.Login,\n actionModifier: Constants.Telemetry.ActionModifier.SSO_LOGIN_SUCCEEDED\n });\n }\n }, [\n result\n ]);\n useEffect(()=>{\n ssoStartTime.current = Date.now();\n logger.info('', {\n action: Constants.Telemetry.Action.Login,\n actionModifier: Constants.Telemetry.ActionModifier.Start\n });\n }, []);\n return /*#__PURE__*/ _jsx(_Fragment, {});\n};\nexport default SilentClientLogin;\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { Outlet } from 'react-router';\nimport classNames from 'classnames';\nimport { Stack } from '@fluentui/react';\nimport SpzaComponent from '@shared/components/spzaComponent';\nimport Modal from '@shared/containers/modals/modal';\nimport { isJsonString, logTenantInfo, getSpzaUserIdAndNewUserModifier, isEmbedded as serverIsEmbedded, getTrailIdAndData, getHostType, getAppTelemetryDetailContentText } from '@shared/utils/appUtils';\nimport { handleCTACallback } from '@shared/handlers/appViewHandler';\nimport { Footer } from '@shared/containers/footer';\nimport { removeUserUniqueQueryParams } from '@shared/routerHistory';\nimport { initializeNpsModule } from '@appsource/utils/nps';\nimport { closeAzureHeaderNavDropdown, forceAzureHeaderNavStatic } from '@shared/utils/appViewUtils';\nimport { Nps } from '@appsource/components/nps';\nimport { logger } from '@src/logger';\nimport { getWindow } from '@shared/services/window';\nimport { Constants } from '@shared/utils/constants';\nimport { shouldShowCookieBanner } from '@shared/utils/cookieBannerUtils';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { SharedInstrumentService } from '@shared/services/telemetry/shared/sharedInstrument';\nimport { NpsModule } from '@shared/utils/npsUtils';\nimport { CookieBanner } from '@shared/containers/cookieBanner';\nimport { handleSignUp } from '@shared/utils/signin';\nimport Loader from './loader';\nimport { stringifyError } from '@shared/utils/errorUtils';\nimport SilentClientLogin from './SilentClientLogin';\nimport { MsalProvider } from '@azure/msal-react';\nimport AuthClient from '@shared/msal/client';\nimport { logoutUser } from '@shared/msal/logout';\nconst RemoteHeader = /*#__PURE__*/ React.lazy(()=>import('./FederatedModules/RemoteHeader'));\nconst EmbedHeader = /*#__PURE__*/ React.lazy(()=>import('@embed/containers/header').then(({ default: EmbedHeader })=>({\n default: /*#__PURE__*/ React.memo(({ props })=>/*#__PURE__*/ _jsx(EmbedHeader, _object_spread({}, props)))\n })));\nexport class AppView extends SpzaComponent {\n performSearchIfNeeded(props) {\n // The embedded app doesn't use Azure search, just live filtering\n // But, for embedded OCP we are using the Azure search\n if (props.isEmbedded) {\n return;\n }\n // you might wonder why we are executing the search here, instead of on the server or in the\n // search component. This is because we also want to make sure we execute the search if someone\n // uses the back button, which does not result in the search component searching, nor in the\n // server to be hit for a new request.\n // this route can work with the following params:\n // 1. filtering\n // 2. search\n // in the case of filtering: the filtering pane takes care of everything\n // in the case of searching: we should make sure that the right data is fetched\n // we need to perform the search if:\n // 1. we have a search query in the params\n // 2. that search query is different from the search query used to build the subset data with\n const urlQuery = props.locationQuery;\n const search = urlQuery === null || urlQuery === void 0 ? void 0 : urlQuery.search;\n const subscetQueryParamChanged = search !== props.performedSubsetQueryString;\n const sortingQueryParam = urlQuery && urlQuery[Constants.FilterQuery.sortBy] ? urlQuery[Constants.FilterQuery.sortBy] : Constants.SearchSortingOption.BestMatch;\n if (search) {\n const sortingQueryParamChanged = sortingQueryParam !== props.searchSortingOption;\n let shouldPerformSearchAll = false;\n shouldPerformSearchAll = search.length >= 2 && (subscetQueryParamChanged || sortingQueryParamChanged);\n if (sortingQueryParamChanged) {\n props.searchSortingOptionChanged(sortingQueryParam);\n }\n if (shouldPerformSearchAll) {\n // we are rendering this page while we do not have the correct subset of data\n props.performSearchAll(search, sortingQueryParam);\n }\n } else if (props.performedSubsetQueryString && props.performedSubsetQueryString !== '') {\n props.clearSearch();\n }\n }\n errorHandling(error) {\n try {\n // The error object here vs the one that is used in the main client hook up are different adding this logging\n // to see what are the diff types of error we are showing to later decide on when not to show the error modal for errors not raised by our components\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.ErrorModal,\n actionModifier: Constants.Telemetry.ActionModifier.Info,\n appName: 'N.A',\n details: error ? stringifyError(error) : 'Error object null'\n };\n this.instrument.probe('logAndFlushTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n appName: payload.appName\n });\n // TODO : Remove this hack after the Power BI null images issue is sorted out\n let showError = true;\n if (error.target[`${'nodeName'}`] && error.srcElement[`${'nodeName'}`] && (error.target[`${'nodeName'}`].toString() === 'image' || error.srcElement[`${'nodeName'}`].toString() === 'image' || error.target[`${'nodeName'}`].toString() === 'IMG' || error.srcElement[`${'nodeName'}`].toString() === 'IMG')) {\n showError = false;\n }\n // We dont wanna show errors for an empty or isTrusted error object as the site is still expected to be functional\n if (error && Object.getOwnPropertyNames(error).length === 0 || error && error.isTrusted && error.isTrusted === true) {\n showError = false;\n }\n if (showError) {\n this.props.showErrorModal();\n }\n } catch (err) {\n console.log('something went wrong while showing error modal' + err);\n }\n }\n // We need to remove all the event listeners once the component is unmounted.\n componentWillUnmount() {\n window.onbeforeunload = null;\n window.onpopstate = null;\n // getWindow().removeEventListener('error', this.errorHandling.bind(this), false);\n }\n // We have 3 steps in the auto sign-in behavior.\n // Step 1: Make a call to the AAD and get the user info into the sub iframe.\n // Step 2: Make a post message from the sub iframe to the parent appsource site with the user info.[This receiveMessage api will be called when we receive the message]\n // Step 3 : Using this user data, we make a auto signin action which will update the State using userDataReducer\n receiveMessage(event) {\n var _event_;\n // We should listen only to the messages from the iframes with the same origin.\n if (!event || !event[`${'data'}`] || !event[`${'origin'}`] || !window.location.hostname || ((_event_ = event[`${'origin'}`]) === null || _event_ === void 0 ? void 0 : _event_.indexOf(window.location.hostname)) === -1) {\n return;\n }\n const data = event[`${'data'}`]; // Extract the payload data from the event\n const payload = data ? isJsonString(data) : '';\n // If the user is already signed-in, we should not trigger the sign in action\n // Also check for the null values in the mandatory fields.\n if (payload && payload[`${'msgType'}`] === 'authIframe' && payload[`${'signedIn'}`] && payload[`${'group'}`] && payload[`${'accessToken'}`] && payload[`${'refreshToken'}`] && payload[`${'firstName'}`] && payload[`${'lastName'}`] && payload[`${'email'}`]) {\n const userStore = this.props.userInfo;\n SpzaInstrumentService.registerTenantInfo(userStore.oid, userStore.tid);\n const userIdInfo = getSpzaUserIdAndNewUserModifier();\n SpzaInstrumentService.registerSpzaId(userIdInfo.spzaUserId);\n const userTrailIdInfo = getTrailIdAndData();\n SpzaInstrumentService.registerTrailId(userTrailIdInfo.trailId);\n SpzaInstrumentService.registerHostType(getHostType(this.props.isEmbedded));\n logTenantInfo(this.props.userInfo, true, userIdInfo.spzaUserId);\n }\n }\n onWindowBeforeUnload() {\n // attach to the onbeforeunload window event\n if (!window.onbeforeunload) {\n window.onbeforeunload = function() {\n // flush the buffer if we have anything in it\n SpzaInstrumentService.getProvider().probe('flushTelemetryInfo');\n SharedInstrumentService.getProvider().probe('flushTelemetryInfo');\n // save session end time for NPS\n NpsModule.SaveSessionEndTime();\n };\n }\n }\n onBrowserBackButton() {\n if (!window.onpopstate) {\n window.onpopstate = function() {\n const payload = {\n page: window.location.href,\n action: Constants.Telemetry.Action.PageLoad,\n actionModifier: Constants.Telemetry.ActionModifier.StartBack\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info('', {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n };\n }\n }\n attachEventListener() {\n // Auto-SignIn listener : Parent window is listening for the post message from the child iframe.\n if (window.addEventListener) {\n window.addEventListener('message', this.receiveMessage.bind(this), false);\n } else {\n window.attachEvent('onmessage', this.receiveMessage.bind(this)); // Added this for old versions of IE\n }\n }\n getParameter(params, parameterName) {\n if (params[`${parameterName}`]) {\n if (typeof params[`${parameterName}`] === 'string') {\n return params[`${parameterName}`];\n }\n return params[`${parameterName}`][0];\n }\n return undefined;\n }\n handleCookieBanner() {\n // We should not show the cookie banner for Embed experience since the parent site handles the cookie banner experience.\n // we should not show the banner for OCP as well as that is part of the appsource domain\n if (!this.props.isEmbedded) {\n this.showCookieBanner = shouldShowCookieBanner();\n }\n }\n componentDidMount() {\n this.setState({\n isMounted: true\n });\n // onerror event handler is added in the mainClientHookup. Client error logs are rendered from there. We use this event listener for just showing the error dialog.\n // getWindow().addEventListener('error', this.errorHandling.bind(this), true);\n this.performSearchIfNeeded(this.props);\n // UHF fixups\n // NOTE: these need to be orchestrated with UHF changes in compass that I've made\n // Skip UHF fixups for the embedded app\n if (this.props.isEmbedded) {\n this.attachEventListener();\n return;\n }\n // attach to window onbeforeunload\n this.onWindowBeforeUnload();\n // attach to browser back button\n this.onBrowserBackButton();\n // Check for the cookie banner flag and set the CSS for the cookie banner.\n this.handleCookieBanner();\n if (!this.props.enableNewNps) {\n NpsModule.Initialize(this.props.showNPSModal);\n } else {\n initializeNpsModule(()=>this.props.setIsNpsLogicVerified(true));\n }\n const params = this.props.locationQuery;\n // This is added here for the sign-in/sign-up redirect scenarios which are triggered by CTA.\n // Once we get redirected to SPZA after signing in, we need to show the CTA modal dialog.\n if (params && params.modalAppId !== undefined) {\n // Added this as a fallback case when there will be duplicate modalAppIds in the queryParams\n // in case of uauth scenario the query params comes as an array after the round trip.\n if (typeof params.modalAppId === 'string' || params.modalAppId && params.modalAppId.length > 0) {\n this.props.showCTAModal({\n entityId: this.getParameter(params, 'modalAppId'),\n entityType: Constants.EntityType.App,\n ctaType: this.getParameter(params, 'ctaType')\n });\n }\n }\n if (params && params.modalServiceId !== undefined) {\n // Added this as a fallback case when there will be duplicate modalAppIds in the queryParams\n // in case of uauth scenario the query params comes as an array after the round trip.\n if (typeof params.modalServiceId === 'string' || params.modalServiceId && params.modalServiceId.length > 0) {\n this.props.showCTAModal({\n entityId: this.getParameter(params, 'modalServiceId'),\n entityType: Constants.EntityType.Service,\n ctaType: this.getParameter(params, 'ctaType')\n });\n }\n }\n if (params && params.modalPartnerId !== undefined) {\n const modalPartnerId = this.getParameter(params, 'modalPartnerId');\n if (params.entityId !== undefined && params.productId !== undefined) {\n const crossListingAppcontext = {\n entityId: this.getParameter(params, 'entityId'),\n primaryProduct: this.getParameter(params, 'productId')\n };\n this.props.showContactModal(modalPartnerId, crossListingAppcontext);\n } else {\n this.props.showContactModal(modalPartnerId);\n }\n }\n if (params && params.modalReviewId) {\n // Added this as a fallback case when there will be duplicate modalReviewIds in the queryParams\n // in case of uauth scenario the query params comes as an array after the round trip.\n if (typeof params.modalReviewId === 'string' || params.modalReviewId && params.modalReviewId.length > 0) {\n this.props.showReportAbuseModal(this.getParameter(params, 'modalReviewAppId'), this.getParameter(params, 'modalReviewId'), this.getParameter(params, 'modalReviewTitle'), this.getParameter(params, 'modalReviewSource'));\n }\n }\n if (params && params.modalRatingId) {\n if (typeof params.modalRatingId === 'string' || params.modalRatingId && params.modalRatingId.length > 0) {\n const appId = this.getParameter(params, 'modalRatingId');\n const appData = this.props.allApps.filter((x)=>{\n return x.entityId === appId;\n })[0];\n if (appData) {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n this.props.showRaingsModal(appData, null, appData.actionString, ()=>{});\n }\n }\n }\n forceAzureHeaderNavStatic();\n removeUserUniqueQueryParams();\n }\n // For every page navigation, we need to check for the cookie change.\n componentDidUpdate(prevProps) {\n // first we save the current query parameters.\n if (JSON.stringify(this.props.locationQuery) !== JSON.stringify(prevProps.locationQuery)) {\n this.props.updateQuery(this.props.locationQuery);\n }\n this.performSearchIfNeeded(this.props);\n const { userInfo } = this.props;\n this.handleCookieBanner();\n forceAzureHeaderNavStatic();\n if (userInfo === null || userInfo === void 0 ? void 0 : userInfo.signedIn) {\n const { oid, tid } = userInfo;\n SpzaInstrumentService.registerTenantInfo(oid, tid);\n // Consider querying TAS once (also save state )\n }\n }\n getChildContext() {\n return {\n loc: (textid, fallback)=>{\n let translated = this.props.localizedStrings[`${textid}`];\n // todo: remove these underscores for production\n translated = translated || fallback || textid;\n return translated;\n },\n locParams: (textid, params, fallback)=>{\n let translated = this.props.localizedStrings[`${textid}`];\n for(let i = 0; i < params.length; i++){\n // eslint-disable-next-line security/detect-non-literal-regexp\n const regEx = new RegExp('\\\\{' + i + '\\\\}', 'gm');\n translated = translated || fallback || textid;\n let currentParam = params[`${i}`];\n if (currentParam && currentParam.length > 0 && currentParam[0] === '$') {\n currentParam = '$' + currentParam;\n }\n translated = translated.replace(regEx, currentParam);\n }\n return translated;\n },\n locDateString: (date, options)=>{\n return date ? new Date(date).toLocaleDateString(this.props.locale, options) : null;\n },\n buildHref: this.props.buildHref,\n ctaCallback: ({ entity, entityType, ctaType, skuId, actionModifier, hasLicense, planId, isOpenedFromPDP, ribbonKey })=>{\n const { currentView, uiRole, nationalCloud, tileDataRequestId: requestId, isEmbedded } = this.props;\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier,\n appName: entity.entityId,\n details: getAppTelemetryDetailContentText({\n appInfo: entity,\n isNationalCloud: !!nationalCloud,\n isEmbedded,\n ctaTypes: [\n ctaType\n ],\n currentView,\n tileDataRequestId: requestId,\n uiRole,\n hasLicense,\n planId,\n ribbonKey\n })\n };\n if (entity.linkedAddIns && entity.linkedAddIns.length > 0) {\n const payloadDetails = JSON.parse(payload.details);\n payloadDetails.isSaaSBundle = true;\n payload.details = JSON.stringify(payloadDetails);\n }\n this.instrument.probe('logAndFlushTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n appName: payload.appName\n });\n // getUserAuthStatus will validate if the user has the right refreh token/cookie combo and if not\n // will enfore a sign in.\n if (this.props.getUserAuthStatus) {\n handleCTACallback({\n props: this.props,\n entity,\n entityType,\n ctaType,\n skuId,\n planId,\n isOpenedFromPDP,\n ribbonKey\n });\n }\n },\n openTileCallback: (detailUrl)=>{\n this.props.openTile(detailUrl);\n },\n renderErrorModal: ()=>{\n this.props.showErrorModal();\n },\n reportAbuseCallback: (appId, reviewId, reviewTitle, reviewSource)=>{\n // getUserAuthStatus will validate if the user has the right refreh token/cookie combo and if not\n // will enfore a sign in.\n if (this.props.getUserAuthStatus) {\n return this.props.getUserAuthStatus().then(()=>{\n return this.props.showReportAbuseModal(appId, reviewId, reviewTitle, reviewSource);\n });\n }\n },\n getAppHeaderHeight: ()=>{\n var _this_headerRef_current, _this_headerRef;\n return (_this_headerRef = this.headerRef) === null || _this_headerRef === void 0 ? void 0 : (_this_headerRef_current = _this_headerRef.current) === null || _this_headerRef_current === void 0 ? void 0 : _this_headerRef_current.clientHeight;\n }\n };\n }\n renderFailImpl() {\n // rendering is never allowed to throw an exception\n return this.props.showModal ? /*#__PURE__*/ _jsx(Modal, {}) : null;\n }\n onClickAppViewHandle() {\n closeAzureHeaderNavDropdown();\n }\n renderImpl() {\n const { isEmbedded, enableNewNps, npsLogicVerified, isMobile, userInfo, correlationId, favoritesCount, openSignInModal, isInErrorDialog, initLoading, regionDisabled, onMarketChange, onLocaleChange, showModal, locationQuery, regionCode, locale, pcaInstanceInitialized, isConverged } = this.props;\n const isUserSignedIn = userInfo ? userInfo.signedIn : false;\n const renderNewNps = enableNewNps && isUserSignedIn && npsLogicVerified && !isMobile;\n const { signedIn, loading } = userInfo;\n NpsModule.ResetNPSIdle();\n if (isInErrorDialog) {\n // some component failed rendering, so we can't trust to render components again\n return /*#__PURE__*/ _jsx(Modal, {});\n } else if (isEmbedded && initLoading) {\n return /*#__PURE__*/ _jsx(Loader, {});\n } else {\n const params = locationQuery || null;\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: classNames({\n spza_root: !serverIsEmbedded(),\n spza_rootEmbedded: serverIsEmbedded()\n }),\n onClick: ()=>this.onClickAppViewHandle(),\n children: [\n this.state.isMounted && pcaInstanceInitialized && /*#__PURE__*/ _jsx(MsalProvider, {\n instance: AuthClient.getInstance(),\n children: /*#__PURE__*/ _jsx(SilentClientLogin, {})\n }),\n isEmbedded ? /*#__PURE__*/ _jsx(EmbedHeader, {\n props: {\n locale,\n query: params\n }\n }) : /*#__PURE__*/ _jsxs(Stack, {\n styles: {\n root: {\n position: 'sticky',\n top: 0,\n zIndex: 5\n }\n },\n children: [\n /*#__PURE__*/ _jsx(CookieBanner, {}),\n /*#__PURE__*/ _jsx(RemoteHeader, {\n userProps: {\n signedIn,\n loading,\n favoritesCount,\n openSignInModal,\n onSignUp: handleSignUp,\n onLogout: this.logout\n },\n market: {\n code: regionCode,\n disabled: regionDisabled\n },\n locale: locale,\n onMarketChange: onMarketChange,\n onLocaleChange: onLocaleChange,\n isConverged: isConverged\n })\n ]\n }),\n /*#__PURE__*/ _jsx(Outlet, {}),\n showModal ? /*#__PURE__*/ _jsx(Modal, {\n query: params\n }) : null,\n renderNewNps && /*#__PURE__*/ _jsx(Nps, {\n email: userInfo.email,\n correlationId: correlationId,\n context: this.getChildContext()\n }),\n /*#__PURE__*/ _jsx(Footer, {\n locale: locale\n })\n ]\n });\n }\n }\n constructor(props){\n super(props), _define_property(this, \"showCookieBanner\", false), _define_property(this, \"instrument\", void 0), _define_property(this, \"headerRef\", null), _define_property(this, \"logout\", ()=>{\n return logoutUser();\n });\n this.instrument = SpzaInstrumentService.getProvider();\n // retrieve the query parameters from URI.\n props.updateQuery(props.locationQuery);\n this.headerRef = /*#__PURE__*/ React.createRef();\n this.state = {\n isMounted: false\n };\n }\n}\nAppView.childContextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n locDateString: PropTypes.func,\n locale: PropTypes.string,\n buildHref: PropTypes.func,\n ctaCallback: PropTypes.func,\n contactCallback: PropTypes.func,\n openTileCallback: PropTypes.func,\n renderErrorModal: PropTypes.func,\n reportAbuseCallback: PropTypes.func,\n getAppHeaderHeight: PropTypes.func\n};\n","/* tslint:disable: quotemark max-line-length */ /**\n * check whether page should render cookie banner (top)\n *\n * @returns true if any of following apllies:\n * 1) user has not agreed to privacy consent\n * 2) agreed privacy consent has expired\n */ export function shouldShowCookieBanner() {\n return false;\n}\n// Hack for the missing Region codes.\n// Once we get the translations for these regions, we can remove this hack.\nfunction handleMissingLocales(locale) {\n let newLocaleCode = '';\n let lowerCaseLocale = locale ? locale.toLowerCase() : 'en';\n // the special cases:\n if (lowerCaseLocale === 'sr-cyrl' || lowerCaseLocale === 'sr-latn') {\n newLocaleCode = 'sr';\n } else if (lowerCaseLocale === 'sl-si') {\n newLocaleCode = 'sl';\n } else if (lowerCaseLocale === 'ca-es' || lowerCaseLocale === 'eu-es' || lowerCaseLocale === 'gl-es') {\n newLocaleCode = 'es';\n } else {\n // default case\n newLocaleCode = lowerCaseLocale;\n }\n return newLocaleCode;\n}\n// To Investigate: Why is this hard coded?\n// List of consent messages in differnt locales\nexport const ConsentMessage = [\n {\n Market: 'en',\n Message: 'This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use.',\n MoreInfo: 'Learn more',\n MoreInfoAriaLabel: 'Learn more about Microsoft’s Cookie Policy',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'ar',\n Message: 'يستخدم هذا الموقع ملÙات تعري٠الارتباط للتØليلات، والمØتوى المخصص والإعلانات. ومن خلال متابعة استعراض هذا الموقع، Ùأنت تواÙÙ‚ على ذلك الاستخدام.',\n MoreInfo: 'معرÙØ© المزيد',\n MoreInfoAriaLabel: 'معرÙØ© المزيد Øول سياسة ملÙات تعري٠ارتباط Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'ar-SA',\n Message: 'يستخدم هذا الموقع ملÙات تعري٠الارتباط للتØليلات، والمØتوى المخصص والإعلانات. ومن خلال متابعة استعراض هذا الموقع، Ùأنت تواÙÙ‚ على ذلك الاستخدام.',\n MoreInfo: 'معرÙØ© المزيد',\n MoreInfoAriaLabel: 'معرÙØ© المزيد Øول سياسة ملÙات تعري٠ارتباط Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'bg',\n Message: 'Този Ñайт използва биÑквитки за аналитични цели, перÑонализирано Ñъдържание и реклами. Ðко продължите да го разглеждате, вие Ñе ÑъглаÑÑвате Ñ Ð¸Ð·Ð¿Ð¾Ð»Ð·Ð²Ð°Ð½ÐµÑ‚Ð¾ на биÑквитки.',\n MoreInfo: 'Ðаучете повече',\n MoreInfoAriaLabel: 'Ðаучете повече за политиката за биÑквитките на Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'bg-BG',\n Message: 'Този Ñайт използва биÑквитки за аналитични цели, перÑонализирано Ñъдържание и реклами. Ðко продължите да го разглеждате, вие Ñе ÑъглаÑÑвате Ñ Ð¸Ð·Ð¿Ð¾Ð»Ð·Ð²Ð°Ð½ÐµÑ‚Ð¾ на биÑквитки.',\n MoreInfo: 'Ðаучете повече',\n MoreInfoAriaLabel: 'Ðаучете повече за политиката за биÑквитките на Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'bs',\n Message: 'Ova stranica koristi kolaÄiće za analizu, personalizovane sadržaje i reklame. Pretraživanjem ove stranice, prihvatate ovu upotrebu.',\n MoreInfo: 'Saznajte viÅ¡e',\n MoreInfoAriaLabel: 'Saznajte viÅ¡e o Microsoftovim pravilima o kolaÄićima',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'bs-BA',\n Message: 'Ova stranica koristi kolaÄiće za analizu, personalizovane sadržaje i reklame. Pretraživanjem ove stranice, prihvatate ovu upotrebu.',\n MoreInfo: 'Saznajte viÅ¡e',\n MoreInfoAriaLabel: 'Saznajte viÅ¡e o Microsoftovim pravilima o kolaÄićima',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'cs',\n Message: 'Tento web využÃvá soubory cookie pro analýzu, pÅ™izpůsobený obsah a reklamy. PokraÄovánÃm na tento web souhlasÃte s jejich použÃvánÃm.',\n MoreInfo: 'DalÅ¡Ã informace',\n MoreInfoAriaLabel: 'DalÅ¡Ã informace o zásadách Microsoftu pro soubory cookie',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'cs-CZ',\n Message: 'Tento web využÃvá soubory cookie pro analýzu, pÅ™izpůsobený obsah a reklamy. PokraÄovánÃm na tento web souhlasÃte s jejich použÃvánÃm.',\n MoreInfo: 'DalÅ¡Ã informace',\n MoreInfoAriaLabel: 'DalÅ¡Ã informace o zásadách Microsoftu pro soubory cookie',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'da',\n Message: 'Dette websted bruger cookies til analyse, personligt tilpasset indhold og annoncer. Hvis du fortsætter med at bruge dette websted, accepterer du denne brug.',\n MoreInfo: 'Lær mere',\n MoreInfoAriaLabel: 'Lær mere om Microsofts cookiepolitik',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'da-DK',\n Message: 'Dette websted bruger cookies til analyse, personligt tilpasset indhold og annoncer. Hvis du fortsætter med at bruge dette websted, accepterer du denne brug.',\n MoreInfo: 'Lær mere',\n MoreInfoAriaLabel: 'Lær mere om Microsofts cookiepolitik',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'de',\n Message: 'Diese Website verwendet Cookies für Analysen, personalisierte Inhalte und interessenbezogene Anzeigen. Indem Sie diese Website weiter nutzen, erklären Sie sich mit dieser Verwendung einverstanden.',\n MoreInfo: 'Weitere Informationen',\n MoreInfoAriaLabel: 'Weitere Informationen über die Microsoft Cookie-Richtlinie',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'de-DE',\n Message: 'Diese Website verwendet Cookies für Analysen, personalisierte Inhalte und interessenbezogene Anzeigen. Indem Sie diese Website weiter nutzen, erklären Sie sich mit dieser Verwendung einverstanden.',\n MoreInfo: 'Weitere Informationen',\n MoreInfoAriaLabel: 'Weitere Informationen über die Microsoft Cookie-Richtlinie',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'el',\n Message: 'Αυτή η τοποθεσία χÏησιμοποιεί cookies για την ανάλυση πληÏοφοÏιών, εξατομικευμÎνο πεÏιεχόμενο και διαφημίσεις. Συνεχίζοντας την πεÏιήγηση σε αυτήν την τοποθεσία, αποδÎχεστε αυτήν τη χÏήση.',\n MoreInfo: 'Μάθετε πεÏισσότεÏα',\n MoreInfoAriaLabel: 'Μάθετε πεÏισσότεÏα σχετικά με την πολιτική της Microsoft για τα cookies',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'el-GR',\n Message: 'Αυτή η τοποθεσία χÏησιμοποιεί cookies για την ανάλυση πληÏοφοÏιών, εξατομικευμÎνο πεÏιεχόμενο και διαφημίσεις. Συνεχίζοντας την πεÏιήγηση σε αυτήν την τοποθεσία, αποδÎχεστε αυτήν τη χÏήση.',\n MoreInfo: 'Μάθετε πεÏισσότεÏα',\n MoreInfoAriaLabel: 'Μάθετε πεÏισσότεÏα σχετικά με την πολιτική της Microsoft για τα cookies',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'en-GB',\n Message: 'This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use.',\n MoreInfo: 'Learn more',\n MoreInfoAriaLabel: 'Learn more about Microsoft’s Cookie Policy',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'es',\n Message: 'Este sitio utiliza cookies para análisis y para mostrar contenido y anuncios personalizados. Al continuar navegando por este sitio, aceptas este uso.',\n MoreInfo: 'Más información',\n MoreInfoAriaLabel: 'Más información sobre la polÃtica de cookies de Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'es-ES',\n Message: 'Este sitio utiliza cookies para análisis y para mostrar contenido y anuncios personalizados. Al continuar navegando por este sitio, aceptas este uso.',\n MoreInfo: 'Más información',\n MoreInfoAriaLabel: 'Más información sobre la polÃtica de cookies de Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'es-MX',\n Message: 'Este sitio utiliza cookies para análisis, contenido personalizado y anuncios. Al continuar explorando este sitio, acepta este uso.',\n MoreInfo: 'Obtener más información',\n MoreInfoAriaLabel: 'Obtener más información sobre la polÃtica de cookies de Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'et',\n Message: 'See sait kasutab küpsiseid analüüsiks, isikupärastatud sisuks ja reklaamiks. Nõustute selle kasutamisega, kui jätkate saidi vaatamist.',\n MoreInfo: 'Lisateave',\n MoreInfoAriaLabel: 'Lisateave Microsofti küpsistepoliitika kohta',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'et-EE',\n Message: 'See sait kasutab küpsiseid analüüsiks, isikupärastatud sisuks ja reklaamiks. Nõustute selle kasutamisega, kui jätkate saidi vaatamist.',\n MoreInfo: 'Lisateave',\n MoreInfoAriaLabel: 'Lisateave Microsofti küpsistepoliitika kohta',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'fi',\n Message: 'Tämä sivusto käyttää evästeitä analytiikkaan sekä mukautetun sisällön ja mainosten näyttämiseen. Jatkamalla sivuston käyttöä hyväksyt tällaisen käytön.',\n MoreInfo: 'Lisätietoja',\n MoreInfoAriaLabel: 'Lisätietoja Microsoftin evästekäytännöstä',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'fi-FI',\n Message: 'Tämä sivusto käyttää evästeitä analytiikkaan sekä mukautetun sisällön ja mainosten näyttämiseen. Jatkamalla sivuston käyttöä hyväksyt tällaisen käytön.',\n MoreInfo: 'Lisätietoja',\n MoreInfoAriaLabel: 'Lisätietoja Microsoftin evästekäytännöstä',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'fr-CA',\n Message: 'Ce site utilise des témoins pour les analyses, le contenu personnalisé et les publicités. En continuant à naviguer sur ce site, vous acceptez cette utilisation.',\n MoreInfo: 'Détails',\n MoreInfoAriaLabel: 'En savoir plus sur la politique en matière de témoins de Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'fr',\n Message: \"Ce site utilise des cookies pour l'analyse, ainsi pour que les contenus et les publicités personnalisés. En continuant à naviguer sur ce site, vous acceptez cette utilisation.\",\n MoreInfo: 'En savoir plus',\n MoreInfoAriaLabel: 'En savoir plus sur la politique relative aux cookies de Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'fr-FR',\n Message: \"Ce site utilise des cookies pour l'analyse, ainsi pour que les contenus et les publicités personnalisés. En continuant à naviguer sur ce site, vous acceptez cette utilisation.\",\n MoreInfo: 'En savoir plus',\n MoreInfoAriaLabel: 'En savoir plus sur la politique relative aux cookies de Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'he',\n Message: '×תר ×–×” משתמש בקובצי Cookie לצורך × ×™×ª×•×—, תוכן מות×× ×ישית ומודעות. על ידי המשך הגלישה ב×תר ×תה ×ž×¡×›×™× ×œ×©×™×ž×•×© ×–×”.',\n MoreInfo: 'מידע × ×•×¡×£',\n MoreInfoAriaLabel: 'למד עוד על ×”×ž×“×™× ×™×•×ª של Microsoft ×‘× ×•×©× ×§×•×‘×¦×™ Cookie',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'he-IL',\n Message: '×תר ×–×” משתמש בקובצי Cookie לצורך × ×™×ª×•×—, תוכן מות×× ×ישית ומודעות. על ידי המשך הגלישה ב×תר ×תה ×ž×¡×›×™× ×œ×©×™×ž×•×© ×–×”.',\n MoreInfo: 'מידע × ×•×¡×£',\n MoreInfoAriaLabel: 'למד עוד על ×”×ž×“×™× ×™×•×ª של Microsoft ×‘× ×•×©× ×§×•×‘×¦×™ Cookie',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'hi',\n Message: 'यह साइट विशà¥à¤²à¥‡à¤·à¤£, वैयकà¥à¤¤à¤¿à¤•à¥ƒà¤¤ सामगà¥à¤°à¥€ और विजà¥à¤žà¤¾à¤ªà¤¨à¥‹à¤‚ के लिठकà¥à¤•à¥€à¤œà¤¼ का उपयोग करती है. इस साइट को बà¥à¤°à¤¾à¤‰à¤œà¤¼ करना जारी रखकर आप इस उपयोग पर अपनी सहमति जताते हैं.',\n MoreInfo: 'अधिक जानें',\n MoreInfoAriaLabel: 'Microsoft की कà¥à¤•à¥€ नीति के बारे में अधिक जानें',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'hi-IN',\n Message: 'यह साइट विशà¥à¤²à¥‡à¤·à¤£, वैयकà¥à¤¤à¤¿à¤•à¥ƒà¤¤ सामगà¥à¤°à¥€ और विजà¥à¤žà¤¾à¤ªà¤¨à¥‹à¤‚ के लिठकà¥à¤•à¥€à¤œà¤¼ का उपयोग करती है. इस साइट को बà¥à¤°à¤¾à¤‰à¤œà¤¼ करना जारी रखकर आप इस उपयोग पर अपनी सहमति जताते हैं.',\n MoreInfo: 'अधिक जानें',\n MoreInfoAriaLabel: 'Microsoft की कà¥à¤•à¥€ नीति के बारे में अधिक जानें',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'hr',\n Message: 'Ovo web-mjesto koristi kolaÄiće za analizu, prilagoÄ‘eni sadržaj i reklame. Pretraživanjem ovog web-mjesta pristajete na ovu uporabu.',\n MoreInfo: 'Saznajte viÅ¡e',\n MoreInfoAriaLabel: 'Saznajte viÅ¡e o Pravilima uporabe kolaÄića Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'hr-HR',\n Message: 'Ovo web-mjesto koristi kolaÄiće za analizu, prilagoÄ‘eni sadržaj i reklame. Pretraživanjem ovog web-mjesta pristajete na ovu uporabu.',\n MoreInfo: 'Saznajte viÅ¡e',\n MoreInfoAriaLabel: 'Saznajte viÅ¡e o Pravilima uporabe kolaÄića Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'hu',\n Message: 'Ez a weboldal cookie-kat használ az elemzésekhez, valamint a testreszabott tartalmak és hirdetések megjelenÃtéséhez. Az oldal használatának folytatásával elfogadja ezek alkalmazását.',\n MoreInfo: 'További információ',\n MoreInfoAriaLabel: 'További információk a Microsoft cookie-kra vonatkozó irányelvérÅ‘l',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'hu-HU',\n Message: 'Ez a weboldal cookie-kat használ az elemzésekhez, valamint a testreszabott tartalmak és hirdetések megjelenÃtéséhez. Az oldal használatának folytatásával elfogadja ezek alkalmazását.',\n MoreInfo: 'További információ',\n MoreInfoAriaLabel: 'További információk a Microsoft cookie-kra vonatkozó irányelvérÅ‘l',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'id',\n Message: 'Situs ini menggunakan cookie untuk analisis, konten dan iklan yang disesuaikan. Dengan terus menelusuri situs ini, Anda menyetujui penggunaannya.',\n MoreInfo: 'Pelajari selengkapnya',\n MoreInfoAriaLabel: 'Pelajari lebih lanjut tentang kebijakan Cookie Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'id-ID',\n Message: 'Situs ini menggunakan cookie untuk analisis, konten dan iklan yang disesuaikan. Dengan terus menelusuri situs ini, Anda menyetujui penggunaannya.',\n MoreInfo: 'Pelajari selengkapnya',\n MoreInfoAriaLabel: 'Pelajari lebih lanjut tentang kebijakan Cookie Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'it',\n Message: 'Questo sito utilizza cookie per analitica, contenuti personalizzati e pubblicità . Continuando a navigare questo sito, accetti tale utilizzo.',\n MoreInfo: 'Scopri di più',\n MoreInfoAriaLabel: 'Ulteriori informazioni sulla politica dei cookie di Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'it-IT',\n Message: 'Questo sito utilizza cookie per analitica, contenuti personalizzati e pubblicità . Continuando a navigare questo sito, accetti tale utilizzo.',\n MoreInfo: 'Scopri di più',\n MoreInfoAriaLabel: 'Ulteriori informazioni sulla politica dei cookie di Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'ja',\n Message: 'ã“ã®ã‚µã‚¤ãƒˆã§ã¯ã€åˆ†æžã€ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•ã‚ŒãŸã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã€ãŠã‚ˆã³åºƒå‘Šã« Cookie を使用ã—ã¾ã™ã€‚ã“ã®ã‚µã‚¤ãƒˆã‚’引ã続ã閲覧ã™ã‚‹ã¨ã€Cookie ã®ä½¿ç”¨ã«åŒæ„ã™ã‚‹ã‚‚ã®ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚',\n MoreInfo: 'è©³ç´°æƒ…å ±',\n MoreInfoAriaLabel: 'Microsoft ã® Cookie ãƒãƒªã‚·ãƒ¼ã«é–¢ã™ã‚‹è©³ç´°ã«ã¤ã„ã¦',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'ja-JP',\n Message: 'ã“ã®ã‚µã‚¤ãƒˆã§ã¯ã€åˆ†æžã€ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºã•ã‚ŒãŸã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã€ãŠã‚ˆã³åºƒå‘Šã« Cookie を使用ã—ã¾ã™ã€‚ã“ã®ã‚µã‚¤ãƒˆã‚’引ã続ã閲覧ã™ã‚‹ã¨ã€Cookie ã®ä½¿ç”¨ã«åŒæ„ã™ã‚‹ã‚‚ã®ã¨è¦‹ãªã•ã‚Œã¾ã™ã€‚',\n MoreInfo: 'è©³ç´°æƒ…å ±',\n MoreInfoAriaLabel: 'Microsoft ã® Cookie ãƒãƒªã‚·ãƒ¼ã«é–¢ã™ã‚‹è©³ç´°ã«ã¤ã„ã¦',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'kk',\n Message: 'Бұл Ñайт талдау, жекелендірілген мазмұн және жарнама үшін куки файлдарын пайдаланады. Бұл Ñайтты шолуды жалғаÑтыру арқылы оны пайдалануға келіÑеÑіз.',\n MoreInfo: 'ҚоÑымша ақпарат',\n MoreInfoAriaLabel: 'Microsoft корпорациÑÑының куки файлдарына қатыÑÑ‚Ñ‹ ÑаÑÑаты туралы қоÑымша ақпарат',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'kk-KZ',\n Message: 'Бұл Ñайт талдау, жекелендірілген мазмұн және жарнама үшін куки файлдарын пайдаланады. Бұл Ñайтты шолуды жалғаÑтыру арқылы оны пайдалануға келіÑеÑіз.',\n MoreInfo: 'ҚоÑымша ақпарат',\n MoreInfoAriaLabel: 'Microsoft корпорациÑÑының куки файлдарына қатыÑÑ‚Ñ‹ ÑаÑÑаты туралы қоÑымша ақпарат',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'ko',\n Message: 'ì´ ì‚¬ì´íŠ¸ì—서는 분ì„, ê°œì¸ ì„¤ì • 콘í…ì¸ ë° ê´‘ê³ ë¥¼ 위해 ì¿ í‚¤ê°€ 사용ë©ë‹ˆë‹¤. ì´ ì‚¬ì´íŠ¸ íƒìƒ‰ì„ 계ì†í•˜ë©´ ì´ëŸ¬í•œ ì‚¬ìš©ì— ë™ì˜í•˜ê²Œ ë©ë‹ˆë‹¤.',\n MoreInfo: 'ìžì„¸ížˆ 보기',\n MoreInfoAriaLabel: 'Microsoft ì¿ í‚¤ ì •ì±…ì— ëŒ€í•´ ìžì„¸ížˆ 보기',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'ko-KR',\n Message: 'ì´ ì‚¬ì´íŠ¸ì—서는 분ì„, ê°œì¸ ì„¤ì • 콘í…ì¸ ë° ê´‘ê³ ë¥¼ 위해 ì¿ í‚¤ê°€ 사용ë©ë‹ˆë‹¤. ì´ ì‚¬ì´íŠ¸ íƒìƒ‰ì„ 계ì†í•˜ë©´ ì´ëŸ¬í•œ ì‚¬ìš©ì— ë™ì˜í•˜ê²Œ ë©ë‹ˆë‹¤.',\n MoreInfo: 'ìžì„¸ížˆ 보기',\n MoreInfoAriaLabel: 'Microsoft ì¿ í‚¤ ì •ì±…ì— ëŒ€í•´ ìžì„¸ížˆ 보기',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'lt',\n Message: 'Å i svetainÄ— naudoja slapukus analizei, suasmenintam turiniui ir skelbimams. Toliau narÅ¡ydami Å¡ioje svetainÄ—je, jÅ«s sutinkate su Å¡iuo naudojimu.',\n MoreInfo: 'Sužinoti daugiau',\n MoreInfoAriaLabel: 'Sužinoti daugiau apie „Microsoft“ slapukų politikÄ…',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'lt-lT',\n Message: 'Å i svetainÄ— naudoja slapukus analizei, suasmenintam turiniui ir skelbimams. Toliau narÅ¡ydami Å¡ioje svetainÄ—je, jÅ«s sutinkate su Å¡iuo naudojimu.',\n MoreInfo: 'Sužinoti daugiau',\n MoreInfoAriaLabel: 'Sužinoti daugiau apie „Microsoft“ slapukų politikÄ…',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'lv',\n Message: 'Å Ä« vietne izmanto sÄ«kfailus, lai veiktu analÄ«zi un rÄdÄ«tu personalizÄ“tu saturu un reklÄmas. Turpinot Å¡Ä«s vietnes pÄrlÅ«koÅ¡anu, jÅ«s piekrÄ«tat Å¡Ädai izmantoÅ¡anai.',\n MoreInfo: 'UzzinÄt vairÄk',\n MoreInfoAriaLabel: 'Uzziniet vairÄk par Microsoft sÄ«kfailu politiku',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'lv-LV',\n Message: 'Å Ä« vietne izmanto sÄ«kfailus, lai veiktu analÄ«zi un rÄdÄ«tu personalizÄ“tu saturu un reklÄmas. Turpinot Å¡Ä«s vietnes pÄrlÅ«koÅ¡anu, jÅ«s piekrÄ«tat Å¡Ädai izmantoÅ¡anai.',\n MoreInfo: 'UzzinÄt vairÄk',\n MoreInfoAriaLabel: 'Uzziniet vairÄk par Microsoft sÄ«kfailu politiku',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'ms',\n Message: 'Laman ini menggunakan kuki untuk analitis, kandungan yang diperibadikan dan iklan. Dengan terus melayari laman ini, anda bersetuju terhadap penggunaan ini.',\n MoreInfo: 'Ketahui lebih lanjut',\n MoreInfoAriaLabel: 'Ketahui lebih lanjut tentang Dasar Kuki Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'ms-MY',\n Message: 'Laman ini menggunakan kuki untuk analitis, kandungan yang diperibadikan dan iklan. Dengan terus melayari laman ini, anda bersetuju terhadap penggunaan ini.',\n MoreInfo: 'Ketahui lebih lanjut',\n MoreInfoAriaLabel: 'Ketahui lebih lanjut tentang Dasar Kuki Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'nb',\n Message: 'Dette nettstedet bruker informasjonskapsler for analyser, tilpasset innhold og annonser. Ved Ã¥ fortsette Ã¥ bruke nettstedet godtar du Ã¥ dette.',\n MoreInfo: 'Lær mer',\n MoreInfoAriaLabel: 'Lær mer om Microsofts policy for informasjonskapsler',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'nb-NO',\n Message: 'Dette nettstedet bruker informasjonskapsler for analyser, tilpasset innhold og annonser. Ved Ã¥ fortsette Ã¥ bruke nettstedet godtar du Ã¥ dette.',\n MoreInfo: 'Lær mer',\n MoreInfoAriaLabel: 'Lær mer om Microsofts policy for informasjonskapsler',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'nl',\n Message: 'Deze site maakt gebruik van cookies om analyses te kunnen uitvoeren en persoonlijke inhoud en reclame te kunnen weergeven. Door verder te bladeren op deze site, gaat u akkoord met dit gebruik.',\n MoreInfo: 'Meer informatie',\n MoreInfoAriaLabel: 'Meer informatie over het cookiebeleid van Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'nl-NL',\n Message: 'Deze site maakt gebruik van cookies om analyses te kunnen uitvoeren en persoonlijke inhoud en reclame te kunnen weergeven. Door verder te bladeren op deze site, gaat u akkoord met dit gebruik.',\n MoreInfo: 'Meer informatie',\n MoreInfoAriaLabel: 'Meer informatie over het cookiebeleid van Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'pl',\n Message: 'W celu gromadzenia danych analitycznych oraz wyÅ›wietlania reklam i zawartoÅ›ci dostosowanych do preferencji użytkownika w tej witrynie używane sÄ… pliki cookie. KontynuujÄ…c jej przeglÄ…danie, zgadzasz siÄ™ na to użycie.',\n MoreInfo: 'Dowiedz siÄ™ wiÄ™cej',\n MoreInfoAriaLabel: 'Dowiedz siÄ™ wiÄ™cej o zasadach firmy Microsoft dotyczÄ…cych plików cookie',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'pl-PL',\n Message: 'W celu gromadzenia danych analitycznych oraz wyÅ›wietlania reklam i zawartoÅ›ci dostosowanych do preferencji użytkownika w tej witrynie używane sÄ… pliki cookie. KontynuujÄ…c jej przeglÄ…danie, zgadzasz siÄ™ na to użycie.',\n MoreInfo: 'Dowiedz siÄ™ wiÄ™cej',\n MoreInfoAriaLabel: 'Dowiedz siÄ™ wiÄ™cej o zasadach firmy Microsoft dotyczÄ…cych plików cookie',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'pt-BR',\n Message: 'Este site utiliza cookies para análise, conteúdo personalizado e anúncios. Continuando a navegar neste site, você concorda com esse uso.',\n MoreInfo: 'Saiba mais',\n MoreInfoAriaLabel: 'Saiba mais sobre a PolÃtica de Cookies da Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'pt',\n Message: 'Este site utiliza cookies para análise de dados, conteúdo personalizado e anúncios. Ao continuar a navegar neste site, concorda com a sua utilização.',\n MoreInfo: 'Mais informações',\n MoreInfoAriaLabel: 'Saiba mais sobre a PolÃtica de Cookies da Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'pt-PT',\n Message: 'Este site utiliza cookies para análise de dados, conteúdo personalizado e anúncios. Ao continuar a navegar neste site, concorda com a sua utilização.',\n MoreInfo: 'Mais informações',\n MoreInfoAriaLabel: 'Saiba mais sobre a PolÃtica de Cookies da Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'ro',\n Message: 'Acest site foloseÈ™te module cookie pentru analiză, conÈ›inut personalizat È™i reclame. Dacă răsfoiÈ›i în continuare acest site, sunteÈ›i de acord cu această utilizare.',\n MoreInfo: 'AflaÈ›i mai multe',\n MoreInfoAriaLabel: 'AflaÈ›i mai multe despre Politica Microsoft referitoare la modulele cookie',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'ro-RO',\n Message: 'Acest site foloseÈ™te module cookie pentru analiză, conÈ›inut personalizat È™i reclame. Dacă răsfoiÈ›i în continuare acest site, sunteÈ›i de acord cu această utilizare.',\n MoreInfo: 'AflaÈ›i mai multe',\n MoreInfoAriaLabel: 'AflaÈ›i mai multe despre Politica Microsoft referitoare la modulele cookie',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'ru',\n Message: 'Ðтот Ñайт иÑпользует файлы cookie Ð´Ð»Ñ Ð°Ð½Ð°Ð»Ð¸Ñ‚Ð¸ÐºÐ¸, перÑонализированного контента и рекламы. ÐŸÑ€Ð¾Ð´Ð¾Ð»Ð¶Ð°Ñ Ð¿Ñ€Ð¾Ñмотр Ñтого Ñайта, вы ÑоглашаетеÑÑŒ Ñ Ñтими уÑловиÑми иÑпользованиÑ.',\n MoreInfo: 'Узнайте больше',\n MoreInfoAriaLabel: 'Узнайте больше о политике Microsoft в отношении файлов cookie',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'ru-RU',\n Message: 'Ðтот Ñайт иÑпользует файлы cookie Ð´Ð»Ñ Ð°Ð½Ð°Ð»Ð¸Ñ‚Ð¸ÐºÐ¸, перÑонализированного контента и рекламы. ÐŸÑ€Ð¾Ð´Ð¾Ð»Ð¶Ð°Ñ Ð¿Ñ€Ð¾Ñмотр Ñтого Ñайта, вы ÑоглашаетеÑÑŒ Ñ Ñтими уÑловиÑми иÑпользованиÑ.',\n MoreInfo: 'Узнайте больше',\n MoreInfoAriaLabel: 'Узнайте больше о политике Microsoft в отношении файлов cookie',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'sk',\n Message: 'Táto stránka použÃva súbory cookie kvôli analýze, prispôsobeniu obsahu a reklamám. PokraÄovanÃm v prehliadanà tejto stránky súhlasÃte s týmto použitÃm.',\n MoreInfo: 'ÄŽalÅ¡ie informácie',\n MoreInfoAriaLabel: 'ÄŽalÅ¡ie informácie o zásadách použÃvania súborov cookie spoloÄnosti Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'sk-SK',\n Message: 'Táto stránka použÃva súbory cookie kvôli analýze, prispôsobeniu obsahu a reklamám. PokraÄovanÃm v prehliadanà tejto stránky súhlasÃte s týmto použitÃm.',\n MoreInfo: 'ÄŽalÅ¡ie informácie',\n MoreInfoAriaLabel: 'ÄŽalÅ¡ie informácie o zásadách použÃvania súborov cookie spoloÄnosti Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'sl',\n Message: 'To mesto uporablja piÅ¡kotke za analitiko, vsebino po meri in oglase. ÄŒe nadaljujete z brskanjem po tem mestu, sprejemate ta naÄin uporabe.',\n MoreInfo: 'VeÄ o tem',\n MoreInfoAriaLabel: 'VeÄ o Microsoftovem pravilniku o piÅ¡kotkih',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'sl-SL',\n Message: 'To mesto uporablja piÅ¡kotke za analitiko, vsebino po meri in oglase. ÄŒe nadaljujete z brskanjem po tem mestu, sprejemate ta naÄin uporabe.',\n MoreInfo: 'VeÄ o tem',\n MoreInfoAriaLabel: 'VeÄ o Microsoftovem pravilniku o piÅ¡kotkih',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'sr',\n Message: 'Ova lokacija koristi kolaÄiće za analitiku, personalizovani sadržaj i oglase. Daljim pregledanjem ove lokacije pristajete na ovo korišćenje.',\n MoreInfo: 'Saznajte viÅ¡e',\n MoreInfoAriaLabel: 'Saznajte viÅ¡e o politici kolaÄića kompanije Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'sr-LATN-RS',\n Message: 'Ova lokacija koristi kolaÄiće za analitiku, personalizovani sadržaj i oglase. Daljim pregledanjem ove lokacije pristajete na ovo korišćenje.',\n MoreInfo: 'Saznajte viÅ¡e',\n MoreInfoAriaLabel: 'Saznajte viÅ¡e o politici kolaÄića kompanije Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'sv',\n Message: 'Denna webbplats använder cookies för statistik, anpassat innehÃ¥ll och annonser. Genom att fortsätta navigera pÃ¥ webbplatsen godkänner du denna användning.',\n MoreInfo: 'Läs mer',\n MoreInfoAriaLabel: 'Läs mer om Microsofts policy för cookies',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'sv-SE',\n Message: 'Denna webbplats använder cookies för statistik, anpassat innehÃ¥ll och annonser. Genom att fortsätta navigera pÃ¥ webbplatsen godkänner du denna användning.',\n MoreInfo: 'Läs mer',\n MoreInfoAriaLabel: 'Läs mer om Microsofts policy för cookies',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'th',\n Message: 'ไซต์นี้ใช้คุà¸à¸à¸µà¹‰à¹€à¸žà¸·à¹ˆà¸à¸à¸²à¸£à¸§à¸´à¹€à¸„ราะห์ เนื้à¸à¸«à¸²à¸—ี่ปรับตามบุคคลà¹à¸¥à¸°à¹‚ฆษณา เมื่à¸à¹€à¸£à¸µà¸¢à¸à¸”ูข้à¸à¸¡à¸¹à¸¥à¹ƒà¸™à¹„ซต์นี้ต่à¸à¹„ป จะถืà¸à¸§à¹ˆà¸²à¸„ุณตà¸à¸¥à¸‡à¸¢à¸à¸¡à¸£à¸±à¸šà¸à¸²à¸£à¹ƒà¸Šà¹‰à¸”ังà¸à¸¥à¹ˆà¸²à¸§',\n MoreInfo: 'เรียนรู้เพิ่มเติม',\n MoreInfoAriaLabel: 'เรียนรู้เพิ่มเติมเà¸à¸µà¹ˆà¸¢à¸§à¸à¸±à¸šà¸™à¹‚ยบายคุà¸à¸à¸µà¹‰à¸‚à¸à¸‡ Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'th-TH',\n Message: 'ไซต์นี้ใช้คุà¸à¸à¸µà¹‰à¹€à¸žà¸·à¹ˆà¸à¸à¸²à¸£à¸§à¸´à¹€à¸„ราะห์ เนื้à¸à¸«à¸²à¸—ี่ปรับตามบุคคลà¹à¸¥à¸°à¹‚ฆษณา เมื่à¸à¹€à¸£à¸µà¸¢à¸à¸”ูข้à¸à¸¡à¸¹à¸¥à¹ƒà¸™à¹„ซต์นี้ต่à¸à¹„ป จะถืà¸à¸§à¹ˆà¸²à¸„ุณตà¸à¸¥à¸‡à¸¢à¸à¸¡à¸£à¸±à¸šà¸à¸²à¸£à¹ƒà¸Šà¹‰à¸”ังà¸à¸¥à¹ˆà¸²à¸§',\n MoreInfo: 'เรียนรู้เพิ่มเติม',\n MoreInfoAriaLabel: 'เรียนรู้เพิ่มเติมเà¸à¸µà¹ˆà¸¢à¸§à¸à¸±à¸šà¸™à¹‚ยบายคุà¸à¸à¸µà¹‰à¸‚à¸à¸‡ Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'tr',\n Message: 'Bu site çözümleme, kiÅŸiselleÅŸtirilmiÅŸ içerik ve reklamlar için tanımlama bilgileri kullanmaktadır. Bu sitede gezinmeye devam ederek bu kullanımı kabul etmiÅŸ olursunuz.',\n MoreInfo: 'Daha fazla bilgi',\n MoreInfoAriaLabel: \"Microsoft'un Tanımlama Bilgileri Ä°lkesi hakkında daha fazla bilgi edinin\",\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'tr-TR',\n Message: 'Bu site çözümleme, kiÅŸiselleÅŸtirilmiÅŸ içerik ve reklamlar için tanımlama bilgileri kullanmaktadır. Bu sitede gezinmeye devam ederek bu kullanımı kabul etmiÅŸ olursunuz.',\n MoreInfo: 'Daha fazla bilgi',\n MoreInfoAriaLabel: \"Microsoft'un Tanımlama Bilgileri Ä°lkesi hakkında daha fazla bilgi edinin\",\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'uk',\n Message: 'Ðа цьому Ñайті викориÑтовуютьÑÑ Ñ„Ð°Ð¹Ð»Ð¸ cookie Ð´Ð»Ñ Ð°Ð½Ð°Ð»Ñ–Ð·Ñƒ, перÑоналізації вміÑту й оголошень. Продовжуючи переглÑд Ñайту, ви погоджуєтьÑÑ Ð· цим.',\n MoreInfo: 'Докладніше',\n MoreInfoAriaLabel: 'Докладніше про Політику Microsoft щодо файлів cookie',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'uk-UA',\n Message: 'Ðа цьому Ñайті викориÑтовуютьÑÑ Ñ„Ð°Ð¹Ð»Ð¸ cookie Ð´Ð»Ñ Ð°Ð½Ð°Ð»Ñ–Ð·Ñƒ, перÑоналізації вміÑту й оголошень. Продовжуючи переглÑд Ñайту, ви погоджуєтьÑÑ Ð· цим.',\n MoreInfo: 'Докладніше',\n MoreInfoAriaLabel: 'Докладніше про Політику Microsoft щодо файлів cookie',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'vi',\n Message: 'Trang nà y sá» dụng cookie để phục vụ mục Ä‘Ãch phân tÃch, ná»™i dung cá nhân hóa và quảng cáo. Tiếp tục duyệt xem trang nà y có nghÄ©a là bạn đồng ý vá»›i việc sá» dụng nà y.',\n MoreInfo: 'Tìm hiểu thêm',\n MoreInfoAriaLabel: 'Tìm hiểu thêm vá» ChÃnh sách Cookie của Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'vi-VN',\n Message: 'Trang nà y sá» dụng cookie để phục vụ mục Ä‘Ãch phân tÃch, ná»™i dung cá nhân hóa và quảng cáo. Tiếp tục duyệt xem trang nà y có nghÄ©a là bạn đồng ý vá»›i việc sá» dụng nà y.',\n MoreInfo: 'Tìm hiểu thêm',\n MoreInfoAriaLabel: 'Tìm hiểu thêm vá» ChÃnh sách Cookie của Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'zh',\n Message: 'æ¤ç«™ç‚¹ä½¿ç”¨ Cookie 进行分æžã€æ˜¾ç¤ºä¸ªæ€§åŒ–内容和广告。继ç»æµè§ˆæ¤ç«™ç‚¹ï¼Œå³è¡¨ç¤ºæ‚¨åŒæ„使用。',\n MoreInfo: '了解详情',\n MoreInfoAriaLabel: '了解有关 Microsoft Cookie 政ç–的详情',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'zh-CN',\n Message: 'æ¤ç«™ç‚¹ä½¿ç”¨ Cookie 进行分æžã€æ˜¾ç¤ºä¸ªæ€§åŒ–内容和广告。继ç»æµè§ˆæ¤ç«™ç‚¹ï¼Œå³è¡¨ç¤ºæ‚¨åŒæ„使用。',\n MoreInfo: '了解详情',\n MoreInfoAriaLabel: '了解有关 Microsoft Cookie 政ç–的详情',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'zh-HK',\n Message: 'æ¤ç¶²ç«™æœƒä½¿ç”¨ Cookie 進行分æžï¼Œä¸¦ç‚ºæ‚¨æ供個人化內容與廣告。如繼續ç€è¦½æ¤ç¶²ç«™ï¼Œå³è¡¨ç¤ºæ‚¨åŒæ„上述用途。',\n MoreInfo: '深入çžè§£',\n MoreInfoAriaLabel: '深入çžè§£ Microsoft Cookie 政ç–',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'zh-TW',\n Message: '本網站為了分æžã€å€‹äººåŒ–內容和廣告目的而使用 Cookie。繼續ç€è¦½æœ¬ç¶²ç«™ï¼Œè¡¨ç¤ºæ‚¨åŒæ„這個用途。',\n MoreInfo: '了解詳情',\n MoreInfoAriaLabel: '深入了解 Microsoft çš„ Cookie 政ç–',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'mt-MT',\n Message: 'Dan is-sit juża cookies għal analytics, kontenut personalizzat u reklami. Billi tkompli tfittex dan is-sit, taÄ‹Ä‹etta dan l-użu.',\n MoreInfo: 'Itagħllem iżjed',\n MoreInfoAriaLabel: \"Tgħallem aktar dwar il-Politika Cookie ta 'Microsoft\",\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n },\n {\n Market: 'is-IS',\n Message: 'Þessi sÃða notar fótspor fyrir greiningu, sérsniðið efni og auglýsingar. Með þvà að halda áfram að skoða þetta vefsvæði samþykkir þú þessa notkun.',\n MoreInfo: 'Læra meira',\n MoreInfoAriaLabel: 'Frekari upplýsingar um Cookie Policy Microsoft',\n MoreInfoUrl: 'https://go.microsoft.com/fwlink/?linkid=845480'\n }\n];\n","export function handleCTACallback({ props, entity, entityType, ctaType, skuId, planId, isOpenedFromPDP, ribbonKey }) {\n // getUserAuthStatus will set the state based on the users sign in state, then let the cta show up based on the state.\n props.getUserAuthStatus().then(()=>{\n props.showCTAModal({\n entityId: entity.entityId,\n entityType,\n ctaType,\n skuId,\n planId,\n isOpenedFromPDP,\n ribbonKey\n });\n });\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nimport { urlPush, buildHref, withRouter } from '@shared/routerHistory';\nimport { changeBillingRegion, getUserAuthStatus, performSearchAll } from '@shared/actions/thunkActions';\nimport { createSearchboxInputChangedAction, createSearchDataReceivedAction, createModalAction, createVideoModalAction, createAppViewTelemetryLoggedAction, createRatingAction, createSearchSortingOptionChangedAction, createBreadcrumbAction, createSetIsNpsLogicVerifiedAction, createChangeLocaleLanguage } from '@shared/actions/actions';\nimport { AppView as AppViewComponent } from '@shared/components/appView';\nimport { Constants } from '@shared/utils/constants';\nimport { queryChanged } from '@shared/actions/queryThunkActions';\nimport { getAllEntityTypes, getEntityRegistrationByView } from '@shared/utils/entityRegistration';\nimport { getTelemetryDetailContentCurrentView } from '@shared/utils/appUtils';\nimport { connect } from 'react-redux';\nimport { saveCookieItem } from '@shared/utils/browserStorageUtils';\nimport { getUserFavouriteViewEntityList } from '@shared/utils/userFavouriteUtils';\nexport const mapStateToProps = (state, ownProps)=>{\n const userFavorites = state.userFavourite;\n const viewApps = getUserFavouriteViewEntityList(userFavorites.apps);\n const viewServices = getUserFavouriteViewEntityList(userFavorites.services);\n return {\n isConverged: state.config.isConverged,\n initLoading: state.config.initLoading,\n searchSortingOption: state.search && state.search.searchSortingOption,\n performedSubsetQueryString: state.apps && state.apps.subsetSearchQuery,\n localizedStrings: state.config.locStrings,\n locale: state.config.locale,\n isEmbedded: state.config.isEmbedded,\n storefrontName: state.config.storefrontName,\n refreshToken: state.users.refreshToken,\n homeAccountId: state.users.homeAccountId,\n embedHost: state.config.embedHost,\n enableNewNps: state.config.newNpsEnabled,\n npsLogicVerified: state.config.npsLogicVerified,\n correlationId: state.config.correlationId,\n // eslint-disable-next-line @typescript-eslint/ban-types\n buildHref: function(route, routeParams, newQuery, keepAllParams, oldParams, keepCampaignParams) {\n return buildHref(route, ownProps.params, routeParams, oldParams || ownProps.location.query, newQuery, keepAllParams, state.config.locale, keepCampaignParams);\n },\n locationQuery: _object_spread({}, ownProps.location.query || {}, ownProps.params || {}),\n entityId: state.modal.entityId,\n showModal: state.modal.showModal,\n userInfo: state.users,\n isInErrorDialog: state.modal.modalId === Constants.ModalType.Error,\n telemetryLoggedCount: state.config.appViewTelemetryLoggedCount,\n nationalCloud: state.config.nationalCloud,\n entityType: getEntityRegistrationByView(state.config.currentView),\n isMobile: state.config.isMobile,\n currentView: getTelemetryDetailContentCurrentView(state.config.currentView, state.config.currentGalleryViewIsCurated),\n allApps: state.apps ? state.apps.dataList : null,\n tileDataRequestId: state.apps ? state.apps.tileDataRequestId : '',\n uiRole: state.users.profile && state.users.profile.uiRole,\n regionCode: state.config.billingCountryCode,\n regionDisabled: state.config.isDisabledBilling,\n favoritesCount: viewApps.length + viewServices.length,\n pcaInstanceInitialized: state.config.pcaInstanceInitialized\n };\n};\nconst mapDispatchToProps = (dispatch)=>{\n return {\n searchSortingOptionChanged: (searchSortingOption)=>dispatch(createSearchSortingOptionChangedAction({\n searchSortingOption\n })),\n changeSearchText: (searchvalue)=>dispatch(createSearchboxInputChangedAction({\n searchString: searchvalue\n })),\n updateQuery: (query)=>dispatch(queryChanged(query)),\n performSearchAll: (searchvalue, searchSortingOption)=>dispatch(performSearchAll(searchvalue, searchSortingOption)),\n clearSearch: ()=>{\n getAllEntityTypes().forEach((entityType)=>{\n dispatch(createSearchDataReceivedAction({\n entityType,\n entityIdData: [],\n performedQuery: ''\n }));\n });\n },\n showCTAModal: ({ entityId, entityType, ctaType, skuId, planId, isOpenedFromPDP, ribbonKey })=>{\n dispatch(createModalAction({\n showModal: true,\n modalId: Constants.ModalType.CTA,\n entityId,\n options: {\n ctaType,\n skuId,\n planId,\n ribbonKey\n },\n entityType,\n isOpenedFromPDP\n }));\n },\n showHowItWorksModal: ()=>{\n dispatch(createVideoModalAction({\n showModal: true,\n videoThumbnail: null,\n videoUrl: 'https://aka.ms/spzavideo',\n videoName: 'How It Works'\n }));\n },\n showErrorModal: ()=>{\n dispatch(createModalAction({\n showModal: true,\n modalId: Constants.ModalType.Error\n }));\n },\n showNPSModal: ()=>{\n dispatch(createModalAction({\n showModal: true,\n modalId: Constants.ModalType.NPS\n }));\n },\n showAnimationModal: ()=>{\n dispatch(createModalAction({\n showModal: true,\n modalId: Constants.ModalType.Animation\n }));\n },\n showRaingsModal: (app, accessKey, ctaType, callback)=>{\n dispatch(createRatingAction({\n showModal: true,\n app,\n accessKey,\n ctaType,\n callback\n }));\n },\n showReportAbuseModal: (appId, reviewId, reviewTitle, reviewSource)=>{\n dispatch(createModalAction({\n showModal: true,\n modalId: Constants.ModalType.ReportAbuse,\n options: {\n appId,\n reviewId,\n reviewTitle,\n reviewSource\n }\n }));\n },\n updateTelemetryLoggedCount: ()=>dispatch(createAppViewTelemetryLoggedAction(null)),\n openTile: (detailUrl)=>{\n const breadcrumbUrl = '';\n dispatch(createBreadcrumbAction({\n breadcrumbUrl\n }));\n urlPush(detailUrl, true);\n },\n getUserAuthStatus: ()=>{\n return dispatch(getUserAuthStatus());\n },\n setIsNpsLogicVerified: (verified)=>dispatch(createSetIsNpsLogicVerifiedAction({\n verified\n })),\n openSignInModal: ()=>{\n return dispatch(createModalAction({\n showModal: true,\n modalId: Constants.ModalType.SignIn\n }));\n },\n onMarketChange: (countryCode)=>{\n saveCookieItem(Constants.Cookies.billingRegionCookie, countryCode);\n return dispatch(changeBillingRegion({\n countryCode\n }));\n },\n onLocaleChange: (locale)=>{\n saveCookieItem(Constants.Cookies.LocaleCookie, locale);\n const pathSegments = window.location.pathname.split('/');\n pathSegments[1] = locale;\n const url = `${pathSegments.join('/')}${window.location.search}`;\n window.location.href = url;\n return dispatch(createChangeLocaleLanguage({\n locale\n }));\n },\n dispatch\n };\n};\nconst AppView = withRouter(connect(mapStateToProps, mapDispatchToProps)(AppViewComponent));\nexport default AppView;\n","import { createSetQueryAction } from './queryActions';\nimport { loadTileData } from './tileDataThunkActions';\nexport function queryChanged(query) {\n return function(dispatch, getState) {\n return Promise.resolve().then(()=>{\n dispatch(createSetQueryAction({\n query\n }));\n return dispatch(loadTileData());\n }).catch((err)=>Promise.reject(err));\n };\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React, { useCallback, useMemo } from 'react';\nimport { useLocation, useNavigate, useRoutes } from 'react-router-dom';\nimport { useDispatch } from 'react-redux';\nimport { Constants } from '@shared/utils/constants';\nimport { createSetCurrentViewAction } from '@shared/actions/actions';\nimport { loadTileData } from '@shared/actions/tileDataThunkActions';\nimport { useLocationChange } from '@shared/hooks/useLocationChange';\nimport { useClientRoutes } from '@shared/hooks/useClientRoutes';\nimport { PATHS_TO_VIEW_MAP } from './pathsViewMap';\nimport AppView from '@shared/containers/AppView';\nconst Home = /*#__PURE__*/ React.lazy(()=>import('@shared/containers/home'));\nconst GalleryPage = /*#__PURE__*/ React.lazy(()=>import('@shared/containers/galleryPage'));\nconst AppDetails = /*#__PURE__*/ React.lazy(()=>import('./containers/appDetails'));\nconst ServiceDetails = /*#__PURE__*/ React.lazy(()=>import('./containers/serviceDetails'));\nconst AuthRedirect = /*#__PURE__*/ React.lazy(()=>import('@shared/components/AuthRedirect'));\nconst Checkout = /*#__PURE__*/ React.lazy(()=>import('./containers/LegacyCheckoutHydration'));\nconst SitemapContainer = /*#__PURE__*/ React.lazy(()=>import('./containers/sitemap'));\nconst PartnerContainer = /*#__PURE__*/ React.lazy(()=>import('@shared/containers/partners'));\nconst PartnersHostContainer = /*#__PURE__*/ React.lazy(()=>import('@shared/containers/partnersHost'));\nconst MyReviews = /*#__PURE__*/ React.lazy(()=>import('@shared/containers/myReview'));\nconst DynamicCampaign = /*#__PURE__*/ React.lazy(()=>import('@shared/containers/dynamicCampaign'));\nconst UserFavouriteDetail = /*#__PURE__*/ React.lazy(()=>import('@shared/containers/userFavouriteDetail'));\nconst UserPrivateOffersGallery = /*#__PURE__*/ React.lazy(()=>import('@shared/containers/userPrivateOffersGallery'));\n/**\n * Where actual routes should be declared, because the object is also used in the SSR to identify matched routes\n */ export const getRoutes = ()=>[\n {\n path: ':locale',\n element: /*#__PURE__*/ _jsx(AppView, {}),\n children: [\n {\n index: true,\n element: /*#__PURE__*/ _jsx(Home, {})\n },\n {\n path: Constants.home,\n element: /*#__PURE__*/ _jsx(Home, {})\n },\n {\n path: 'marketplace',\n element: /*#__PURE__*/ _jsx(GalleryPage, {})\n },\n {\n path: Constants.appsGallery,\n element: /*#__PURE__*/ _jsx(GalleryPage, {})\n },\n {\n path: Constants.cloudsIndustryGallery,\n element: /*#__PURE__*/ _jsx(GalleryPage, {})\n },\n {\n path: 'product/:productId/:entityId',\n element: /*#__PURE__*/ _jsx(AppDetails, {})\n },\n {\n path: 'marketplace/checkout/:entityId',\n element: /*#__PURE__*/ _jsx(Checkout, {})\n },\n {\n path: 'partners',\n element: /*#__PURE__*/ _jsx(PartnerContainer, {})\n },\n {\n path: 'user/my-reviews',\n element: /*#__PURE__*/ _jsx(MyReviews, {})\n },\n {\n path: Constants.csGallery,\n element: /*#__PURE__*/ _jsx(GalleryPage, {})\n },\n {\n path: `${Constants.csGallery}/:entityId`,\n element: /*#__PURE__*/ _jsx(ServiceDetails, {})\n },\n {\n path: `${Constants.partnersAppSource}/*`,\n element: /*#__PURE__*/ _jsx(PartnersHostContainer, {})\n },\n {\n path: `marketplace/consultingservices/:entityId`,\n element: /*#__PURE__*/ _jsx(ServiceDetails, {})\n },\n {\n path: `campaigns/:publisher/:id`,\n element: /*#__PURE__*/ _jsx(DynamicCampaign, {})\n },\n {\n path: `user/my-favourites`,\n element: /*#__PURE__*/ _jsx(UserFavouriteDetail, {})\n },\n {\n path: `user/private-offers`,\n element: /*#__PURE__*/ _jsx(UserPrivateOffersGallery, {})\n },\n {\n path: ':privateOffer/product/:productId/:entityId',\n element: /*#__PURE__*/ _jsx(AppDetails, {})\n },\n {\n path: 'sitemap',\n element: /*#__PURE__*/ _jsx(SitemapContainer, {})\n }\n ]\n },\n {\n path: 'redirect',\n element: /*#__PURE__*/ _jsx(AuthRedirect, {})\n }\n ];\nexport const getView = (routeMatch)=>routeMatch.route.index ? PATHS_TO_VIEW_MAP.home : PATHS_TO_VIEW_MAP[routeMatch.route.path];\nconst Router = ()=>{\n const location = useLocation();\n const navigate = useNavigate();\n const dispatch = useDispatch();\n const setCurrentView = useCallback(/*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(view, featureFlag = '') {\n if (!view) {\n return;\n }\n const query = new URLSearchParams(location.search);\n if (featureFlag && query.get(featureFlag) === 'true') {\n // the route is under a feature flag but the query param didn't have the feature flag set\n // treat is as a route never existed\n navigate('/404');\n }\n dispatch(createSetCurrentViewAction({\n currentView: view\n }));\n // @ts-expect-error known dispatch type error\n dispatch(loadTileData());\n });\n return function(view) {\n return _ref.apply(this, arguments);\n };\n }(), [\n dispatch,\n location,\n navigate\n ]);\n const clientRoutes = useMemo(()=>getRoutes(), []);\n const routes = useClientRoutes({\n routes: clientRoutes\n });\n useLocationChange({\n setCurrentView,\n map: PATHS_TO_VIEW_MAP,\n routes\n });\n return useRoutes(routes);\n};\nexport default Router;\n","/* istanbul ignore file */ import { useCallback, useEffect } from 'react';\nimport { matchRoutes, useLocation } from 'react-router';\nimport { useHydration } from './useHydration';\nimport { useDispatch, useSelector } from 'react-redux';\nimport { createSetInitLoadingAction } from 'actions/actions';\nexport function useLocationChange(options) {\n const isHydrated = useHydration();\n const location = useLocation();\n const isEmbedded = useSelector((state)=>state.config.isEmbedded);\n const dispatch = useDispatch();\n const { setCurrentView, map, routes } = options;\n const handleLocationChange = useCallback(()=>{\n var _matches__route, _matches_;\n const matches = matchRoutes(routes, location.pathname);\n const matchedView = map[(_matches_ = matches[matches.length - 1]) === null || _matches_ === void 0 ? void 0 : (_matches__route = _matches_.route) === null || _matches__route === void 0 ? void 0 : _matches__route.path];\n setCurrentView(matchedView === null || matchedView === void 0 ? void 0 : matchedView.view);\n }, [\n setCurrentView,\n location,\n map,\n routes\n ]);\n useEffect(()=>{\n if (!isHydrated) {\n return;\n }\n if (isEmbedded) {\n // Embedded starts in a loading state, therefore client side hydration expects the same state to be met.\n // Loading is disabled once client has been hydrated.\n dispatch(createSetInitLoadingAction({\n initLoading: false\n }));\n }\n handleLocationChange();\n }, [\n location,\n handleLocationChange,\n isHydrated,\n isEmbedded,\n dispatch\n ]);\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { getWindow } from '@shared/services/window';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { Constants } from '@shared/utils/constants';\nimport { stringifyError } from '@shared/utils/errorUtils';\nimport { telemetryPageLoadTime } from '@shared/utils/pltUtils';\nimport { ensureClientLoggerInitialization, logger } from '@src/logger';\nimport { getNetworkStats } from '@shared/utils/appUtils';\nimport { initializeListener } from '@embed/embedMessaging';\nimport { initBusinessTelemetryClient } from '@shared/hooks/useTelemetry';\nexport class RootHandler extends React.Component {\n componentDidMount() {\n const { store, landingView, isEmbedded } = this.props;\n telemetryPageLoadTime({\n landingView,\n isEmbedded\n });\n ensureClientLoggerInitialization(store);\n initBusinessTelemetryClient();\n if (isEmbedded) {\n // This will register a listener for the javascript 'message' event that\n // the host window uses to communicate with the iframe\n initializeListener(store.dispatch, store.getState().config.embedHost);\n }\n }\n componentDidCatch(error, errorInfo) {\n this.telemetry(Constants.Telemetry.Action.RootHandler, Constants.Telemetry.ActionModifier.Error, {\n errorInfo: stringifyError(errorInfo),\n error: stringifyError(error)\n });\n }\n static getDerivedStateFromError(error) {\n // The error is logged here for dev mode (with babel) to catch the hydration mismatch stack trace\n console.error('React Error', error);\n }\n telemetry(action, actionModifier, details) {\n const { isEmbedded = false, landingView } = this.props;\n const connection = getNetworkStats();\n const userAgent = navigator.userAgent;\n const payload = {\n page: getWindow().location.href,\n action,\n actionModifier,\n details: JSON.stringify(_object_spread_props(_object_spread({}, details), {\n landingView,\n isEmbedded,\n connection,\n userAgent\n }))\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n }\n flushTelemetry() {\n SpzaInstrumentService.getProvider().probe('flushTelemetryInfo');\n }\n render() {\n return /*#__PURE__*/ _jsx(_Fragment, {\n children: this.props.children\n });\n }\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport SpzaComponent from './spzaComponent';\nimport { getWindow, getDocument } from '@shared/services/window';\nimport { logTelemetry } from '../utils/telemetryUtils';\nimport { Constants } from '../utils/constants';\nimport { logger } from '@src/logger';\nimport { withHydration } from 'hooks/useHydration';\nclass ScrollToTopButton extends SpzaComponent {\n componentDidMount() {\n if (__CLIENT__ && this.childElement) {\n getDocument().body.appendChild(this.childElement);\n getWindow().addEventListener('scroll', this.handleScroll.bind(this));\n }\n }\n componentWillUnmount() {\n if (__CLIENT__ && this.childElement) {\n getWindow().removeEventListener('scroll', this.handleScroll.bind(this));\n getDocument().body.removeChild(this.childElement);\n }\n }\n get offsetY() {\n return this.props.offsetYToAppear ? this.props.offsetYToAppear : ScrollToTopButton.defaultOffsetY;\n }\n handleScroll() {\n const curWindow = getWindow();\n const yOffsetToAppear = this.offsetY;\n this.setState({\n isShowButton: curWindow && curWindow.pageYOffset > yOffsetToAppear\n });\n }\n goToThePageTop() {\n const curWindow = getWindow();\n if (curWindow) {\n curWindow.scrollTo(0, 0);\n logTelemetry(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.ScrollToTopButton, 'Go back to the top of the page using the scroll to top button');\n logger.info('Go back to the top of the page using the scroll to top button', {\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.ScrollToTopButton\n });\n }\n }\n renderButton() {\n return this.state.isShowButton && /*#__PURE__*/ _jsx(\"button\", {\n className: \"appSourceScrollToTop\",\n onClick: ()=>this.goToThePageTop(),\n \"aria-label\": \"Scroll to top\"\n });\n }\n renderImpl() {\n if (!this.props.isHydrated) {\n return null;\n }\n return /*#__PURE__*/ ReactDOM.createPortal(this.renderButton(), this.childElement);\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"context\", void 0), _define_property(this, \"childElement\", void 0);\n this.state = {\n isShowButton: false\n };\n if (__CLIENT__) {\n var _getDocument;\n this.childElement = (_getDocument = getDocument()) === null || _getDocument === void 0 ? void 0 : _getDocument.createElement('div');\n }\n }\n}\n_define_property(ScrollToTopButton, \"defaultOffsetY\", 90);\nexport default withHydration(ScrollToTopButton);\n","import { jwtDecode } from 'jwt-decode';\nfunction isTokenExpiring(token, minTimeToExpirationSec) {\n try {\n const decodedToken = token ? jwtDecode(token) : null;\n if (decodedToken) {\n const currentTimeSec = Math.round(Date.now() / 1000);\n const timeToExpirationSec = currentTimeSec - decodedToken.exp;\n return timeToExpirationSec < minTimeToExpirationSec;\n }\n } catch (err) {\n return false;\n }\n return false;\n}\nexport function shouldRefreshAccessToken(accessToken, minTimeToExpirationSec) {\n return isTokenExpiring(accessToken.spza, minTimeToExpirationSec) || isTokenExpiring(accessToken.graph, minTimeToExpirationSec) || isTokenExpiring(accessToken.arm, minTimeToExpirationSec) || isTokenExpiring(accessToken.pifd, minTimeToExpirationSec) || isTokenExpiring(accessToken.jarvis, minTimeToExpirationSec) || isTokenExpiring(accessToken.commerce, minTimeToExpirationSec) || isTokenExpiring(accessToken.marketplaceLeads, minTimeToExpirationSec);\n}\n","import { LocalizationSettings } from './constants';\nexport const allLocales = [\n 'fr-dz',\n 'es-ar',\n 'en-au',\n 'nl-be',\n 'fr-be',\n 'es-bo',\n 'bs-ba',\n 'pt-br',\n 'en-ca',\n 'fr-ca',\n 'cs-cz',\n 'es-cl',\n 'es-co',\n 'es-cr',\n 'sr-latn-me',\n 'en-cy',\n 'da-dk',\n 'de-de',\n 'es-ec',\n 'et-ee',\n 'en-eg',\n 'es-sv',\n 'es-es',\n 'fr-fr',\n 'es-gt',\n 'en-ae',\n 'es-hn',\n 'en-hk',\n 'hr-hr',\n 'en-in',\n 'id-id',\n 'en-ie',\n 'is-is',\n 'en-il',\n 'it-it',\n 'en-jo',\n 'lv-lv',\n 'en-lb',\n 'lt-lt',\n 'de-lu',\n 'fr-lu',\n 'hu-hu',\n 'en-my',\n 'en-mt',\n 'es-mx',\n 'fr-ma',\n 'nl-nl',\n 'en-nz',\n 'es-ni',\n 'en-ng',\n 'nb-no',\n 'de-at',\n 'en-pk',\n 'es-pa',\n 'es-py',\n 'es-pe',\n 'en-ph',\n 'pl-pl',\n 'pt-pt',\n 'es-pr',\n 'es-do',\n 'ro-md',\n 'ro-ro',\n 'en-sa',\n 'de-ch',\n 'en-sg',\n 'sl-si',\n 'sk-sk',\n 'en-za',\n 'sr-latn-rs',\n 'en-lk',\n 'fr-ch',\n 'fi-fi',\n 'sv-se',\n 'fr-tn',\n 'tr-tr',\n 'en-gb',\n 'en-us',\n 'es-uy',\n 'es-ve',\n 'vi-vn',\n 'el-gr',\n 'ru-by',\n 'bg-bg',\n 'ru-kz',\n 'ru-ru',\n 'uk-ua',\n 'he-il',\n 'ar-iq',\n 'ar-sa',\n 'ar-ly',\n 'ar-eg',\n 'ar-ae',\n 'th-th',\n 'ko-kr',\n 'zh-cn',\n 'zh-tw',\n 'ja-jp',\n 'zh-hk'\n];\nexport const i18nLocales = [\n 'en-US',\n 'ar-SA',\n 'bg-BG',\n 'ca-ES',\n 'cs-CZ',\n 'da-DK',\n 'de-DE',\n 'el-GR',\n 'es-ES',\n 'et-EE',\n 'eu-ES',\n 'fi-FI',\n 'fr-FR',\n 'gl-ES',\n 'he-IL',\n 'hi-IN',\n 'hr-HR',\n 'hu-HU',\n 'id-ID',\n 'it-IT',\n 'ja-JP',\n 'kk-KZ',\n 'ko-KR',\n 'lt-LT',\n 'lv-LV',\n 'ms-MY',\n 'nb-NO',\n 'nl-NL',\n 'pl-PL',\n 'pt-BR',\n 'pt-PT',\n 'ro-RO',\n 'ru-RU',\n 'sk-SK',\n 'sl-SI',\n 'sr-Cyrl-RS',\n 'sr-Latn-RS',\n 'sv-SE',\n 'th-TH',\n 'tr-TR',\n 'uk-UA',\n 'vi-VN',\n 'zh-CN',\n 'zh-TW'\n];\nexport const languageToRegion = {\n ar: 'sa',\n bg: 'bg',\n cs: 'cz',\n da: 'dk',\n de: 'de',\n el: 'gr',\n en: 'us',\n es: 'es',\n et: 'ee',\n fi: 'fi',\n fr: 'fr',\n he: 'il',\n hr: 'hr',\n hu: 'hu',\n id: 'id',\n it: 'it',\n ja: 'jp',\n ko: 'kr',\n lt: 'lt',\n lv: 'lv',\n no: 'no',\n nl: 'nl',\n pl: 'pl',\n pt: 'br',\n ro: 'ro',\n ru: 'ru',\n sk: 'sk',\n sl: 'si',\n sv: 'se',\n th: 'th',\n tr: 'tr',\n uk: 'ua',\n vi: 'vn',\n zh: 'cn',\n ca: 'es',\n eu: 'es',\n gl: 'es',\n kk: 'kz',\n ms: 'my',\n hi: 'in',\n 'sr-cyrl': 'rs',\n 'sr-latn': 'rs'\n};\nexport const i18nLocalesLowerCase = i18nLocales.map((locale)=>locale.toLowerCase());\nexport const scriptLangauges = [\n 'sr-cyrl',\n 'sr-latn'\n];\nexport const languagesOnlyLocales = [\n 'zh-hant',\n 'zh-hans'\n];\nexport function GetLanguageCode(locale) {\n // languageCode must only be defined if locale was valid and we could extract the right value\n let languageCode = '';\n const lowerCaseLocale = locale.toLowerCase();\n // the special cases:\n // todo: norwegian is not mapped\n if (lowerCaseLocale === 'zh-cn' || lowerCaseLocale === 'zh-hans') {\n languageCode = 'zh-Hans';\n } else if (lowerCaseLocale === 'zh-tw' || lowerCaseLocale === 'zh-hk' || lowerCaseLocale === 'zh-hant') {\n languageCode = 'zh-Hant';\n } else if (lowerCaseLocale === 'sr-cyrl') {\n languageCode = 'sr-Cyrl';\n } else if (lowerCaseLocale === 'sr-latn') {\n languageCode = 'sr-Latn';\n } else if (lowerCaseLocale === 'pt-pt') {\n languageCode = 'pt-PT';\n } else if (lowerCaseLocale === 'nb-no') {\n languageCode = 'no'; // todo: Joey to make sure this is correct mapping\n } else if (lowerCaseLocale.lastIndexOf('-') > 0) {\n languageCode = lowerCaseLocale.substring(0, lowerCaseLocale.lastIndexOf('-'));\n } else {\n // Assume that the input is the languageCode.\n // If it is not valid, it should be filtered out by the caller as appropriate.\n languageCode = lowerCaseLocale;\n }\n // GetLanguageCode will be used both by the static list of locales. And, on each request.\n return languageCode;\n}\nexport function extractLanguageFromLocale(locale = '') {\n const loweredLocale = locale.toLowerCase();\n if (scriptLangauges.includes(loweredLocale)) {\n return loweredLocale;\n }\n const splitedLocale = loweredLocale.split('-');\n if (splitedLocale.length === 1) {\n return loweredLocale;\n }\n const languages = splitedLocale.slice(0, splitedLocale.length - 1);\n return languages.join('-');\n}\nexport function extractRegionFromLocale(locale = '') {\n const splitedLocale = locale.split('-');\n if (splitedLocale.length === 1) {\n return '';\n }\n return splitedLocale[splitedLocale.length - 1];\n}\nexport function getSupportedI18nLocale(locale) {\n if (i18nLocalesLowerCase.includes(locale)) {\n return locale;\n }\n const language = extractLanguageFromLocale(locale);\n const region = languageToRegion[`${language}`];\n if (region) {\n return `${language}-${region}`;\n }\n return LocalizationSettings.defaultLng;\n}\nfunction formatLanguageCode(language) {\n return language.split('-').map((lang, index)=>{\n if (index === 0) {\n return lang.toLowerCase();\n }\n return lang.charAt(0).toUpperCase() + lang.slice(1).toLowerCase();\n }).join('-');\n}\nexport function getI18NLocale(requestLocale = '') {\n const loweredLocale = requestLocale.toLowerCase();\n if (languagesOnlyLocales.includes(loweredLocale)) {\n return formatLanguageCode(loweredLocale);\n }\n const locale = getSupportedI18nLocale(loweredLocale);\n const langauge = formatLanguageCode(extractLanguageFromLocale(locale));\n const region = extractRegionFromLocale(locale).toUpperCase();\n return [\n langauge,\n region\n ].join('-');\n}\n","import { Environment } from '@shared/utils/constants';\nexport const isNonProd = (env)=>{\n return env === Environment.Development;\n};\nexport const DEBUG_STATE = isNonProd(process.env.APP_ENV);\n","import { use } from 'i18next';\nimport { initReactI18next } from 'react-i18next';\nimport { getWindow } from '@fluentui/react';\nimport { i18nLocales } from '@shared/utils/locales';\nimport { LocalizationSettings, ResourcesFiles } from '@shared/utils/constants';\nimport { DEBUG_STATE } from '@shared/utils/debug';\nconst i18nInit = ()=>{\n var _getWindow;\n const i18nInstanceFromServer = (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : _getWindow.__INITIAL_STATE__.config.i18nInstance;\n const { language, store } = i18nInstanceFromServer;\n return use(initReactI18next).init({\n debug: DEBUG_STATE,\n fallbackLng: LocalizationSettings.defaultLng,\n lng: language,\n supportedLngs: i18nLocales,\n ns: [\n LocalizationSettings.defaultNS,\n ResourcesFiles.header,\n ResourcesFiles.search,\n ResourcesFiles.home,\n ResourcesFiles.taxonomy\n ],\n defaultNS: LocalizationSettings.defaultNS,\n interpolation: {\n escapeValue: false\n },\n load: 'currentOnly',\n resources: store.data\n });\n};\nexport default i18nInit;\n","import { windowOnErrorHandler } from '@shared/utils/appUtils';\nimport { renderErrorModal } from '@shared/utils/errorHandlerUtil';\nimport { handleInterruptedHydration } from './recoverableHydrationError';\nexport const onError = (window, store)=>{\n const eventListener = (msg, file, line, col, error)=>{\n if (handleInterruptedHydration(msg)) {\n return;\n }\n windowOnErrorHandler({\n msg,\n file,\n line,\n col,\n error\n });\n if ((file === null || file === void 0 ? void 0 : file.indexOf(window.location.origin)) > -1) {\n renderErrorModal(store);\n }\n };\n window.onerror = eventListener;\n};\n","/* istanbul ignore file */ import { getAwaMetaTags } from '@shared/utils/seoUtils';\nexport const appendHeaderTags = (state)=>{\n const awaMetaTags = getAwaMetaTags(state);\n awaMetaTags.forEach((awaMetaTag)=>{\n if (awaMetaTag) {\n document.head.appendChild(awaMetaTag);\n }\n });\n};\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React, { startTransition } from 'react';\nimport { hydrateRoot } from 'react-dom/client';\nimport { unstable_HistoryRouter as HistoryRouter } from 'react-router-dom';\nimport { getWindow } from '@shared/services/window';\nimport { initRouterHistory, appHistory } from '@shared/routerHistory';\nimport { handleRecoverableHydrationError } from '@shared/handlers/recoverableHydrationError';\nimport { setHydrationStart, setScriptStart } from '@shared/utils/pltUtils';\nimport { getRoutes } from './Router';\nimport App, { initApp } from '@appsource/App';\nimport '@appsource/styles/styles-LTR.scss';\nlet didInitRouter = false;\nsetScriptStart();\nfunction hydrateAppSource() {\n return _hydrateAppSource.apply(this, arguments);\n}\nfunction _hydrateAppSource() {\n _hydrateAppSource = _async_to_generator(function*() {\n var _getWindow_disablePriorityWorkaround, _getWindow;\n (_getWindow_disablePriorityWorkaround = (_getWindow = getWindow()).disablePriorityWorkaround) === null || _getWindow_disablePriorityWorkaround === void 0 ? void 0 : _getWindow_disablePriorityWorkaround.call(_getWindow);\n if (!didInitRouter) {\n initRouterHistory({\n appRoutes: getRoutes()\n });\n didInitRouter = true;\n }\n const store = initApp();\n const { siteEnvironment } = store.getState().config;\n const root = document.getElementById('react-view');\n setHydrationStart();\n startTransition(()=>{\n hydrateRoot(root, /*#__PURE__*/ _jsx(HistoryRouter, {\n history: appHistory,\n children: /*#__PURE__*/ _jsx(App, {\n store: store\n })\n }), {\n onRecoverableError: (error)=>handleRecoverableHydrationError(error, siteEnvironment)\n });\n });\n });\n return _hydrateAppSource.apply(this, arguments);\n}\nwindow.HYDRATE = hydrateAppSource;\nif (window.LOADED) {\n hydrateAppSource();\n}\n","import { getWindow } from '@shared/services/window';\nimport * as appConfig from './appConfig';\nimport { getXMSClientName } from '../../utils/appUtils';\nimport { ApiVersion, marketplaceApiVersion } from '@shared/specifics';\nexport function initBrowserConfig(appName, store, embedded = false) {\n var _getWindow;\n if (!store) {\n throw Error('store object is NOT found. Is program running under browser?');\n }\n const hostname = (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : _getWindow.location.origin;\n const state = store.getState();\n appConfig.init({\n runtimeEnvironment: 'browser',\n embedded,\n appName,\n graphApi: state.users.graphApi,\n correlationId: state.config.correlationId,\n hostname,\n config: state.config,\n basePath: `${hostname}/${state.config.locale}`,\n apiVersion: ApiVersion,\n store,\n marketplaceApiVersion,\n marketplaceApiHost: state.config.marketplaceApiHost,\n saasRPHost: state.config.saasRPHost,\n marketplaceLeadsHost: state.config.marketplaceLeadsHost,\n marketplaceLeadsAudienceId: state.config.marketplaceLeadsAudienceId,\n MPRPHost: state.config.MPRPHost,\n armApiHost: state.config.armApiHost,\n pidlEnv: state.config.pidlEnv,\n partnersIframeUrl: state.config.partnersIframeUrl,\n partnersApiHost: state.config.partnersApiHost,\n XMSClientName: getXMSClientName(appName),\n oneCatalogApiHost: state.config.oneCatalogApiHost,\n expHeaderDisabled: state.config.expHeaderDisabled,\n enableOneTaxonomy: state.config.enableOneTaxonomy,\n siteConsent: state.config.cookiesConsent.WCPConsent,\n agreementAppId: state.config.agreementAppId,\n isConverged: state.config.isConverged\n });\n}\n","import { getWindow } from '@shared/services/window';\nexport const COMSCORE_URL = 'https://www.microsoft.com/library/svy/app/broker.js';\nexport const getComscorePresentedTime = ()=>{\n try {\n var _getWindow_COMSCORE_SiteRecruit_Utils_UserPersistence, _getWindow_COMSCORE_SiteRecruit_Utils, _getWindow_COMSCORE_SiteRecruit, _getWindow_COMSCORE, _getWindow;\n const comscoreCookie = JSON.parse((_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow_COMSCORE = _getWindow.COMSCORE) === null || _getWindow_COMSCORE === void 0 ? void 0 : (_getWindow_COMSCORE_SiteRecruit = _getWindow_COMSCORE.SiteRecruit) === null || _getWindow_COMSCORE_SiteRecruit === void 0 ? void 0 : (_getWindow_COMSCORE_SiteRecruit_Utils = _getWindow_COMSCORE_SiteRecruit.Utils) === null || _getWindow_COMSCORE_SiteRecruit_Utils === void 0 ? void 0 : (_getWindow_COMSCORE_SiteRecruit_Utils_UserPersistence = _getWindow_COMSCORE_SiteRecruit_Utils.UserPersistence) === null || _getWindow_COMSCORE_SiteRecruit_Utils_UserPersistence === void 0 ? void 0 : _getWindow_COMSCORE_SiteRecruit_Utils_UserPersistence.getCookieValue('msresearch'));\n const userId = comscoreCookie === null || comscoreCookie === void 0 ? void 0 : comscoreCookie.userid;\n const lastPresentedTimeInMs = parseInt(userId === null || userId === void 0 ? void 0 : userId.substring(0, 13));\n return lastPresentedTimeInMs > 0 ? new Date(lastPresentedTimeInMs) : null;\n } catch (error) {\n return null;\n }\n};\n","import { DataMap } from '@shared/utils/dataMapping';\nexport function getGalleryPageTitle() {\n return 'servicesGallery_pageTitle';\n}\nexport function getDetailsPageTitle() {\n return 'detail_pageTitle';\n}\nexport function getFilterItemRoute({ filterItem, filterValue, filterTileType }) {\n const filter = DataMap[`${filterItem}`][`${filterValue}`];\n const routeArgs = null;\n const params = {\n industry: null,\n category: null,\n product: null,\n search: null,\n serviceType: null\n };\n params[`${filterTileType}`] = filter.UrlKey;\n return {\n routeArgs,\n params\n };\n}\nexport function isFilterItemMatch({ service, filterItem, filterValue }) {\n return service[`${filterItem}`] & DataMap[`${filterItem}`][`${filterValue}`].FilterID;\n}\n","import { getLocalStorageItem, saveLocalStorageItem } from '@shared/utils/browserStorageUtils';\nconst smileFrownSubmittedTimeKey = 'lastFeedbackTime';\nexport const storeFeedbackSubmittedTime = ()=>{\n saveLocalStorageItem(smileFrownSubmittedTimeKey, JSON.stringify(new Date()));\n};\nexport const getFeedbackSubmittedTime = ()=>{\n try {\n const lastSubmittedTime = JSON.parse(getLocalStorageItem(smileFrownSubmittedTimeKey));\n return Date.parse(lastSubmittedTime) ? new Date(lastSubmittedTime) : null;\n } catch (error) {\n return null;\n }\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { matchPath } from 'react-router-dom';\nimport { getLocalStorageItem, saveLocalStorageItem } from '@shared/utils/browserStorageUtils';\nimport { getFeedbackSubmittedTime, getComscorePresentedTime } from '@appsource/utils';\nimport { getWindow } from '@shared/services/window';\nimport { routes } from '@shared/routerHistory';\nconst npsMaxDeclinedDays = 14;\nconst npsMaxDeclinedDaysInMs = npsMaxDeclinedDays * 1000 * 3600 * 24;\nconst npsMaxSubmittedDays = 90;\nconst npsMaxSubmittedDaysInMs = npsMaxSubmittedDays * 1000 * 3600 * 24;\nconst feedbackMaxSubmittedDays = 14;\nconst feedbackSubmittedDaysInMs = feedbackMaxSubmittedDays * 1000 * 3600 * 24;\nconst comscoreMaxSubmittedDays = 14;\nconst comscoreMaxSubmittedDaysInMs = comscoreMaxSubmittedDays * 1000 * 3600 * 24;\nconst npsLocalStorageKey = 'nps';\nlet npsModule = null;\nexport const getNpsModule = ()=>{\n return npsModule;\n};\nconst getEmptyNpsPersistentMetadata = ()=>{\n return {\n lastSubmittedTime: null,\n lastDismissedTime: null,\n lastCtaTime: null\n };\n};\nconst getEmptyNpsMetadata = ()=>{\n return _object_spread_props(_object_spread({}, getEmptyNpsPersistentMetadata()), {\n pdpViewsCount: 0,\n searchActionsCount: 0,\n filterActionsCount: 0,\n galleryChangesCount: 0,\n categoryChangesCount: 0,\n paginationActionsCount: 0,\n seeAllActionsCount: 0\n });\n};\nconst getNpsFromLocalStorage = ()=>{\n const npsMetadataTimesString = getLocalStorageItem(npsLocalStorageKey);\n try {\n const npsMetadata = JSON.parse(npsMetadataTimesString);\n return {\n lastSubmittedTime: Date.parse(npsMetadata === null || npsMetadata === void 0 ? void 0 : npsMetadata.lastSubmittedTime) ? new Date(npsMetadata.lastSubmittedTime) : null,\n lastDismissedTime: Date.parse(npsMetadata === null || npsMetadata === void 0 ? void 0 : npsMetadata.lastDismissedTime) ? new Date(npsMetadata.lastDismissedTime) : null,\n lastCtaTime: Date.parse(npsMetadata === null || npsMetadata === void 0 ? void 0 : npsMetadata.lastCtaTime) ? new Date(npsMetadata.lastCtaTime) : null\n };\n } catch (err) {\n return getEmptyNpsPersistentMetadata();\n }\n};\nconst comscoreAlreadySubmitted = ()=>{\n var _lastPresentedTime_getTime;\n const lastPresentedTime = getComscorePresentedTime();\n if (!lastPresentedTime || !((_lastPresentedTime_getTime = lastPresentedTime.getTime) === null || _lastPresentedTime_getTime === void 0 ? void 0 : _lastPresentedTime_getTime.call(lastPresentedTime))) return false;\n return Date.now() - lastPresentedTime.getTime() < comscoreMaxSubmittedDaysInMs;\n};\nconst feedbackAlreadySubmitted = ()=>{\n var _lastSubmittedTime_getTime;\n const lastSubmittedTime = getFeedbackSubmittedTime();\n if (!lastSubmittedTime || !((_lastSubmittedTime_getTime = lastSubmittedTime.getTime) === null || _lastSubmittedTime_getTime === void 0 ? void 0 : _lastSubmittedTime_getTime.call(lastSubmittedTime))) return false;\n return Date.now() - lastSubmittedTime.getTime() < feedbackSubmittedDaysInMs;\n};\nconst otherFeedbacksAlreadySubmitted = ()=>{\n return feedbackAlreadySubmitted() || comscoreAlreadySubmitted();\n};\nconst storeNpsModule = ()=>{\n if (npsModule) {\n const { lastCtaTime, lastDismissedTime, lastSubmittedTime } = npsModule.metadata;\n const objectToStore = {\n lastCtaTime,\n lastDismissedTime,\n lastSubmittedTime\n };\n saveLocalStorageItem(npsLocalStorageKey, JSON.stringify(objectToStore));\n }\n};\nconst homePageMatch = ()=>{\n const currentPathname = getWindow().location.pathname.toLowerCase();\n return !!matchPath(`/:locale${routes.home.getPath()}`, currentPathname) || !!matchPath('/:locale', currentPathname);\n};\nclass Nps {\n get metadata() {\n return this.npsMetadata;\n }\n hasDeclinedBefore() {\n var _lastDismissedTime_getTime;\n const lastDismissedTime = this.npsMetadata.lastDismissedTime;\n if (!lastDismissedTime || !((_lastDismissedTime_getTime = lastDismissedTime.getTime) === null || _lastDismissedTime_getTime === void 0 ? void 0 : _lastDismissedTime_getTime.call(lastDismissedTime))) return false;\n return Date.now() - lastDismissedTime.getTime() < npsMaxDeclinedDaysInMs;\n }\n hasSubmittedBefore() {\n var _lastSubmittedTime_getTime;\n const lastSubmittedTime = this.npsMetadata.lastSubmittedTime;\n if (!lastSubmittedTime || !((_lastSubmittedTime_getTime = lastSubmittedTime.getTime) === null || _lastSubmittedTime_getTime === void 0 ? void 0 : _lastSubmittedTime_getTime.call(lastSubmittedTime))) return false;\n return Date.now() - lastSubmittedTime.getTime() < npsMaxSubmittedDaysInMs;\n }\n hasCtaBefore() {\n var _lastCtaTime_getTime;\n const lastCtaTime = this.npsMetadata.lastCtaTime;\n if (!lastCtaTime || !((_lastCtaTime_getTime = lastCtaTime.getTime) === null || _lastCtaTime_getTime === void 0 ? void 0 : _lastCtaTime_getTime.call(lastCtaTime))) return false;\n return lastCtaTime.getTime() < Date.now();\n }\n calculateTotalActions() {\n const metadata = this.npsMetadata;\n return metadata.categoryChangesCount + metadata.pdpViewsCount + metadata.filterActionsCount + metadata.searchActionsCount + metadata.seeAllActionsCount + metadata.galleryChangesCount + metadata.paginationActionsCount;\n }\n checkForCompliance() {\n if (this.hasDeclinedBefore() || this.hasSubmittedBefore() || this.checkForOtherFeedbacks()) return;\n const totalActionsCount = this.calculateTotalActions();\n if (this.hasCtaBefore() && totalActionsCount >= 2 || totalActionsCount >= 10) {\n var _this_onVerified, _this;\n (_this_onVerified = (_this = this).onVerified) === null || _this_onVerified === void 0 ? void 0 : _this_onVerified.call(_this, this.npsMetadata);\n }\n }\n ctaClicked(trigger = true) {\n if (!homePageMatch()) {\n if (!(this.hasDeclinedBefore() || this.hasSubmittedBefore() || this.checkForOtherFeedbacks())) {\n this.npsMetadata.lastCtaTime = new Date();\n if (trigger) {\n var _this_onVerified, _this;\n (_this_onVerified = (_this = this).onVerified) === null || _this_onVerified === void 0 ? void 0 : _this_onVerified.call(_this, this.npsMetadata);\n }\n }\n this.npsMetadata.lastCtaTime = new Date();\n storeNpsModule();\n }\n }\n npsSubmitted() {\n this.npsMetadata.lastSubmittedTime = new Date();\n storeNpsModule();\n }\n npsDismissed() {\n this.npsUpdateLastDismissTime();\n }\n npsUpdateLastDismissTime() {\n this.npsMetadata.lastDismissedTime = new Date();\n storeNpsModule();\n }\n increaseActionsCounter(event) {\n if (!homePageMatch()) {\n this.npsMetadata[`${event}`] += 1;\n this.checkForCompliance();\n }\n }\n // eslint-disable-next-line no-useless-constructor\n constructor(npsMetadata, checkForOtherFeedbacks, onVerified){\n _define_property(this, \"npsMetadata\", void 0);\n _define_property(this, \"checkForOtherFeedbacks\", void 0);\n _define_property(this, \"onVerified\", void 0);\n this.npsMetadata = npsMetadata;\n this.checkForOtherFeedbacks = checkForOtherFeedbacks;\n this.onVerified = onVerified;\n }\n}\nexport const initializeNpsModule = (onVerify)=>{\n const npsPersistentMetadata = getNpsFromLocalStorage();\n const npsMetadata = _object_spread({}, getEmptyNpsMetadata(), npsPersistentMetadata);\n npsModule = new Nps(npsMetadata, otherFeedbacksAlreadySubmitted, onVerify);\n};\n","/*\n These constants are used only in the embedded client. They correspond to\n the values that are used in our host/client messaging contracts\n*/ (function(constants) {\n constants.initSaasMarketplaceEventName = 'initSaasMarketplace';\n constants.acquireAppEventName = 'acquireSaasApp';\n (function(actionTypes) {\n actionTypes.ctaClicked = 'ctaClicked';\n actionTypes.initListenerFinished = 'initListenerFinished';\n actionTypes.acquireApp = 'acquireApp';\n actionTypes.externalRedirect = 'externalRedirect';\n actionTypes.updateUrl = 'updateUrl';\n actionTypes.closeSaasMarketplace = 'closeSaasMarketplace';\n actionTypes.finishedLoadingContentProviderList = 'contentProvidersLoaded';\n })(constants.actionTypes || (constants.actionTypes = {}));\n})(constants || (constants = {}));\nexport var constants;\n","/* istanbul ignore file */ import { DataMap } from '@shared/utils/dataMapping';\nimport { Constants } from '@shared/utils/constants';\nimport { getProductByUrlKey } from '@shared/utils/appUtils';\nconst adminPortal = DataMap.products.AdminPortal;\nconst powerBIHost = DataMap.products.PowerBI;\nconst powerBIVisualsHost = DataMap.products.PowerBICustomVisual;\nconst dynamics365financials = DataMap.products.Dynamics365forBusinessCentral;\nconst dynamics365 = DataMap.products.Dynamics365;\nconst dynamicsCRMLegacy = DataMap.products.Dynamics365forSales;\nconst fullScreenMode = 'fullScreenMode';\nexport function shouldShowCloseButton(embedHost) {\n return embedHost !== dynamics365financials.UrlKey;\n}\nexport function shouldHideFilterPane(embedHost) {\n return embedHost === powerBIHost.UrlKey || embedHost === dynamics365financials.UrlKey;\n}\nexport function shouldHideIndustriesAndProducts(embedHost) {\n return embedHost !== dynamics365.UrlKey && embedHost !== adminPortal.UrlKey;\n}\nexport function shouldFlatProducts(embedHost) {\n return embedHost === adminPortal.UrlKey;\n}\nexport function hasDynamicData(embedHost) {\n return embedHost === powerBIHost.UrlKey;\n}\nexport function hasPrivateApps(embedHost) {\n return embedHost === powerBIHost.UrlKey || embedHost === dynamics365.UrlKey;\n}\nexport function shouldShowCuratedData(embedHost) {\n return embedHost === dynamics365.UrlKey || embedHost === adminPortal.UrlKey;\n}\nexport function shouldShowPowerAppsNoContent(embedHost) {\n return embedHost === powerBIHost.UrlKey || embedHost === dynamics365.UrlKey;\n}\nexport function shouldShowLegacyStyle(embedHost) {\n return embedHost === dynamics365financials.UrlKey || embedHost === dynamicsCRMLegacy.UrlKey;\n}\nexport function shouldShowVideos(embedHost) {\n return embedHost !== powerBIVisualsHost.UrlKey;\n}\nexport function getPowerAppsTitle() {\n return DataMap.products.PowerApps.Title;\n}\nexport function isFullScreenMode(query) {\n const isFullScreen = query[`${fullScreenMode}`];\n return isFullScreen === 'true';\n}\nexport function shouldShowFilter(embedHost, product) {\n if (embedHost === adminPortal.UrlKey) {\n if (product.FilterID === DataMap.products.OneNote.FilterID && product.FilterGroup === DataMap.products.OneNote.FilterGroup || product.FilterID === DataMap.products.Project.FilterID && product.FilterGroup === DataMap.products.Project.FilterGroup) {\n return false;\n }\n }\n return true;\n}\nexport function isEmbed(embedHost) {\n return embedHost === adminPortal.UrlKey;\n}\nexport function isAppSource(embedHost) {\n return embedHost === null || embedHost === undefined;\n}\nexport function getEmbedHost(queryParams) {\n const embedHost = decodeURIComponent(queryParams.embedHost);\n const productQuery = decodeURIComponent(queryParams.product);\n if (getProductByUrlKey({\n urlKey: embedHost\n })) {\n return embedHost;\n }\n if (getProductByUrlKey({\n urlKey: productQuery\n })) {\n return productQuery;\n }\n return Constants.dynamics365.salesED;\n}\nfunction filterPowerBICuratedData(curatedData) {\n const filteredCuratedData = {\n [Constants.Curated.everything]: (curatedData[Constants.Curated.powerPlatform] || []).filter((currentCuratedData)=>currentCuratedData.titleId === Constants.Curated.powerBi)\n };\n return filteredCuratedData;\n}\nfunction filterAdminPortalCuratedData(curatedData) {\n return {\n [Constants.Curated.everything]: curatedData[Constants.Curated.office365]\n };\n}\nfunction filterDynamicsCuratedData(curatedData) {\n const validKeys = [\n DataMap.products.Dynamics365,\n DataMap.products.Dynamics365forFinancials,\n DataMap.products.Dynamics365forSales,\n DataMap.products.Dynamics365CustomerInsights,\n DataMap.products.Dynamics365forBusinessCentral,\n DataMap.products.Dynamics365forCustomerServices,\n DataMap.products.Dynamics365forSales,\n DataMap.products.Dynamics365forProjectServicesAutomation\n ].filter((dataValues)=>!!(dataValues === null || dataValues === void 0 ? void 0 : dataValues.BackendKey)).map((dataValues)=>dataValues.BackendKey.toLowerCase());\n const filteredCuratedData = {\n [Constants.Curated.everything]: (curatedData[Constants.Curated.dynamics365] || []).filter((currentCuratedData)=>currentCuratedData.titleId && validKeys.indexOf(currentCuratedData.titleId.toLowerCase()) > -1)\n };\n const salesED = DataMap.products.Dynamics365forSales.BackendKey;\n if (salesED && curatedData[`${salesED}`]) {\n filteredCuratedData[`${salesED}`] = curatedData[`${salesED}`];\n }\n return filteredCuratedData;\n}\nexport function filterEmbedCuratedData(embedHost, curatedData) {\n if (embedHost === Constants.dynamics365.dynamics365) {\n return filterDynamicsCuratedData(curatedData);\n } else if (embedHost === Constants.adminPortal) {\n return filterAdminPortalCuratedData(curatedData);\n } else if (embedHost === Constants.PowerBI.powerBi) {\n return filterPowerBICuratedData(curatedData);\n }\n return {};\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { ServerCollection } from '@server/serverLogger';\nexport class Logger {\n info(message, { action, actionModifier, appName, page, collection } = {}) {\n if (__CLIENT__) this.clientLogger.info({\n details: message,\n actionModifier,\n action,\n appName,\n page\n });\n if (__SERVER__) this.serverLogger.info(message, {\n collection: collection || ServerCollection.ServerLogs,\n operation: action,\n operationModifier: actionModifier,\n page\n });\n }\n warning(message, { action, actionModifier, appName, page, collection } = {}) {\n if (__CLIENT__) this.clientLogger.warning({\n details: message,\n actionModifier,\n action,\n appName,\n page\n });\n if (__SERVER__) this.serverLogger.warning(message, {\n collection: collection || ServerCollection.ServerLogs,\n operation: action,\n operationModifier: actionModifier,\n page\n });\n }\n debug(message, { action, actionModifier, appName, page, collection } = {}) {\n if (__CLIENT__) this.clientLogger.debug({\n details: message,\n actionModifier,\n action,\n appName,\n page\n });\n if (__SERVER__) this.serverLogger.debug(message, {\n collection: collection || ServerCollection.ServerLogs,\n operation: action,\n operationModifier: actionModifier,\n page\n });\n }\n error(message, { action, actionModifier, appName, error, page, collection } = {}) {\n if (__CLIENT__) this.clientLogger.error({\n details: message,\n actionModifier,\n action,\n appName,\n error,\n page\n });\n if (__SERVER__) this.serverLogger.error(message, {\n collection: collection || ServerCollection.ServerLogs,\n operation: action,\n operationModifier: actionModifier,\n page,\n error\n });\n }\n flush() {\n if (__CLIENT__) this.clientLogger.flush();\n }\n // eslint-disable-next-line no-useless-constructor\n constructor(clientLogger, serverLogger){\n _define_property(this, \"clientLogger\", void 0);\n _define_property(this, \"serverLogger\", void 0);\n this.clientLogger = clientLogger;\n this.serverLogger = serverLogger;\n }\n}\n","import { ApplicationInsights } from '@microsoft/1ds-analytics-web-js';\nimport { ClientLoggerTelemetry, clientLoggerConfig, SystemLoggerTelemetry } from '@shared/logger';\nimport { ServerLogger, winstonLogger } from '@server/serverLogger';\nimport { Logger } from './logger';\nconst clientLogger = new ClientLoggerTelemetry();\nconst serverLogger = new ServerLogger();\nexport const logger = new Logger(clientLogger, serverLogger);\nexport const systemLogger = new SystemLoggerTelemetry();\nexport const ensureClientLoggerInitialization = (store)=>{\n if (!logger.clientLogger.logger) {\n const _1dsLogger = new ApplicationInsights();\n _1dsLogger.initialize(clientLoggerConfig(), []);\n logger.clientLogger.initialize(_1dsLogger, store);\n systemLogger.initialize(_1dsLogger, store);\n }\n};\nexport const initServerLogger = ()=>{\n if (!logger.serverLogger.logger) {\n const _winstonLogger = winstonLogger();\n logger.serverLogger.init(_winstonLogger);\n }\n};\n","/* eslint-disable @typescript-eslint/ban-types */ /* eslint-disable @typescript-eslint/no-namespace */ /* eslint-disable @typescript-eslint/prefer-namespace-keyword */ /* eslint-disable @typescript-eslint/no-use-before-define */ /* eslint-disable @typescript-eslint/no-var-requires */ /* eslint-disable security/detect-non-literal-fs-filename */ /* eslint-disable node/no-deprecated-api */ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _object_without_properties(source, excluded) {\n if (source == null) return {};\n var target = _object_without_properties_loose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for(i = 0; i < sourceSymbolKeys.length; i++){\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\nfunction _object_without_properties_loose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for(i = 0; i < sourceKeys.length; i++){\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nimport agentParser from 'ua-parser-js';\nimport paths from '@webpackConfig/paths';\nimport { Constants } from '@shared/utils/constants';\nimport { generateGuid } from '@shared/utils/appUtils';\nimport { getAppConfig } from '@shared/services/init/appConfig';\nimport { stringifyError } from '@shared/utils/errorUtils';\nimport { getStringQueryParam, scrubAcquisitionPayload } from '@server/Utils';\nimport { scrubHeaders } from '@shared/utils/httpClientUtil';\nimport stackTrace from 'stack-trace';\nimport { v4 as uuid } from 'uuid';\nimport { logger } from '@src/logger';\nconst fs = require('fs');\nconst sha256 = require('crypto-js/sha256');\nconst serverInstanceCorrelationId = process.env.serverInstanceCorrelationId || Constants.ReservedCorrelationIds.EmptyId;\nconst MethodTableMap = new Map([\n [\n 'Debug',\n 'Logs'\n ],\n [\n 'Error',\n 'Logs'\n ],\n [\n 'LogHttpInboundRequestStart',\n 'IncomingRequests'\n ],\n [\n 'LogHttpInboundRequestEndWithSuccess',\n 'IncomingRequests'\n ],\n [\n 'LogHttpInboundRequestEndWithClientFailure',\n 'IncomingRequests'\n ],\n [\n 'LogHttpInboundRequestEndWithServerFailure',\n 'IncomingRequests'\n ],\n [\n 'LogHttpOutboundRequestStart',\n 'OutgoingRequests'\n ],\n [\n 'LogHttpOutboundRequestEndWithSuccess',\n 'OutgoingRequests'\n ],\n [\n 'LogHttpOutboundRequestEndWithClientFailure',\n 'OutgoingRequests'\n ],\n [\n 'LogHttpOutboundRequestEndWithServerFailure',\n 'OutgoingRequests'\n ],\n [\n 'LogAcquisitionInfo',\n 'AcquisitionInfo'\n ],\n [\n 'LogDbResourceOverUsage',\n 'DbResourceOverUsage'\n ],\n [\n 'LogUserFeedback',\n 'UserFeedback'\n ],\n [\n 'LogUserTelemetry',\n 'UserTelemetry'\n ]\n]);\nconst RequestsLogMethodToTaskName = {\n LogHttpInboundRequestStart: 'HttpInboundRequest',\n LogHttpInboundRequestEndWithSuccess: 'HttpInboundRequestEndWithSuccess',\n LogHttpInboundRequestEndWithClientFailure: 'HttpInboundRequestEndWithClientFailure',\n LogHttpInboundRequestEndWithServerFailure: 'HttpInboundRequestEndWithServerFailure',\n LogHttpOutboundRequestStart: 'HttpOutboundRequest',\n LogHttpOutboundRequestEndWithSuccess: 'HttpOutboundRequestEndWithSuccess',\n LogHttpOutboundRequestEndWithServerFailure: 'HttpOutboundRequestEndWithServerFailure',\n LogHttpOutboundRequestEndWithClientFailure: 'HttpOutboundRequestEndWithClientFailure'\n};\n(function(Logger) {\n function getCLRMethod(methodName) {\n return (args)=>{\n const { message = '' } = args, payload = _object_without_properties(args, [\n \"message\"\n ]);\n const collection = MethodTableMap.get(methodName);\n if (methodName === 'Error') {\n logger.serverLogger.error(message, _object_spread({\n collection,\n taskName: 'Error'\n }, payload));\n return;\n }\n // Deprecated\n if (collection === 'AcquisitionInfo' || collection === 'DbResourceOverUsage') {\n return;\n }\n if (collection === 'IncomingRequests' || collection === 'OutgoingRequests') {\n payload.taskName = RequestsLogMethodToTaskName[methodName];\n }\n if (methodName === 'Debug') {\n payload.taskName = 'Debug';\n }\n logger.serverLogger.info(message, _object_spread({\n collection\n }, payload));\n };\n }\n const LoggerDll = paths.dllLoggerPath;\n Logger.clrDebug = getCLRMethod('Debug');\n Logger.clrError = getCLRMethod('Error');\n Logger.clrLogUserTelemetry = getCLRMethod('LogUserTelemetry');\n const clrLogHttpInboundRequestStart = getCLRMethod('LogHttpInboundRequestStart');\n const clrLogHttpInboundRequestEndWithSuccess = getCLRMethod('LogHttpInboundRequestEndWithSuccess');\n const clrLogHttpInboundRequestEndWithClientFailure = getCLRMethod('LogHttpInboundRequestEndWithClientFailure');\n const clrLogHttpInboundRequestEndWithServerFailure = getCLRMethod('LogHttpInboundRequestEndWithServerFailure');\n const clrLogHttpOutboundRequestStart = getCLRMethod('LogHttpOutboundRequestStart');\n const clrLogHttpOutboundRequestEndWithSuccess = getCLRMethod('LogHttpOutboundRequestEndWithSuccess');\n const clrLogHttpOutboundRequestEndWithServerFailure = getCLRMethod('LogHttpOutboundRequestEndWithServerFailure');\n const clrLogHttpOutboundRequestEndWithClientFailure = getCLRMethod('LogHttpOutboundRequestEndWithClientFailure');\n const clrLogAcquisitionInfo = getCLRMethod('LogAcquisitionInfo');\n const clrLogDbResourceOverUsage = getCLRMethod('LogDbResourceOverUsage');\n const clrLogUserFeedback = getCLRMethod('LogUserFeedback');\n let logStreamData = null;\n let correlationIdToWatch = '';\n function startWatchingLog(correlationId) {\n correlationIdToWatch = correlationId;\n logStreamData = [];\n setTimeout(()=>{\n stopWatchingLog(correlationId);\n }, 60000); // Stop watching logs in 1 minute automatically in case we fail to stop watching log for any reasons.\n }\n // Call this function to start watch the log for the **session** based on the given correlation ID.\n // We use this function to immediately get the server side logs in the console for debugging purpose.\n Logger.startWatchingLog = startWatchingLog;\n function stopWatchingLog(correlationId) {\n if (correlationId === correlationIdToWatch) {\n correlationIdToWatch = '';\n logStreamData = null;\n }\n }\n Logger.stopWatchingLog = stopWatchingLog;\n function getLogStream() {\n return logStreamData;\n }\n Logger.getLogStream = getLogStream;\n function isWatchingLog(correlationId) {\n return correlationIdToWatch === correlationId;\n }\n Logger.isWatchingLog = isWatchingLog;\n function isLoggingEnabled(callbackFunction) {\n return fs.exists(LoggerDll, callbackFunction);\n }\n Logger.isLoggingEnabled = isLoggingEnabled;\n function writeToLogStream(correlationId, operation, message) {\n if (correlationId && logStreamData && correlationId === correlationIdToWatch) {\n const now = new Date();\n const utc = new Date(now.getTime() + now.getTimezoneOffset() * 60000); // Gets the UTC time.\n logStreamData.push({\n timeStamp: utc.toISOString(),\n operation: operation,\n message: message\n });\n }\n }\n // To be used by Node server side code Debug events\n function Debug(operationName, message, exception, additionalData) {\n // A JSON object in the exception causes edge to crash with stack overflow hence the check.\n let exceptionString = '';\n if (exception) {\n // Stringify also handles non JSON object such as raw strings, int, bools etc..\n exceptionString = JSON.stringify(exception);\n }\n const debugMessage = {\n requestId: additionalData && additionalData.requestId ? additionalData.requestId : uuid(),\n correlationId: additionalData && additionalData.correlationId ? additionalData.correlationId : serverInstanceCorrelationId,\n operationName: operationName.toString() || '',\n message: message.toString() || '',\n exception: exceptionString\n };\n Logger.clrDebug(debugMessage);\n }\n // Overload to debug without request and correlationId for server debugging\n function Information(operationName, message, exception, additionalData) {\n // A JSON object in the exception causes edge to crash with stack overflow hence the check.\n let exceptionString = '';\n if (exception) {\n // Stringify handles non JSON object such as raw strings, int, bools etc..\n exceptionString = JSON.stringify(exception);\n }\n let requestId = uuid();\n let correlationId = serverInstanceCorrelationId;\n if (additionalData) {\n if (additionalData.requestId) {\n requestId = additionalData.requestId;\n }\n if (additionalData.correlationId) {\n correlationId = additionalData.correlationId;\n }\n }\n const debugMessage = {\n requestId: requestId,\n correlationId: correlationId,\n operationName: operationName.toString() || '',\n message: message.toString() || '',\n exception: exceptionString\n };\n Logger.clrDebug(debugMessage);\n }\n function Exception(operationName, message, exception, otherInfo) {\n let requestId = uuid();\n let correlationId = serverInstanceCorrelationId;\n if (otherInfo) {\n requestId = otherInfo.requestId ? otherInfo.requestId : requestId;\n correlationId = otherInfo.correlationId ? otherInfo.correlationId : correlationId;\n if (otherInfo.request) {\n requestId = otherInfo.request.headers[Constants.Headers.RequestId] || requestId;\n correlationId = otherInfo.request.headers[Constants.Headers.CorrelationId] || correlationId;\n }\n }\n // A JSON object in the exception causes edge to crash with stack overflow hence the check.\n let exceptionString = '';\n if (exception) {\n // Stringify handles non JSON object such as raw strings, int, bools etc..\n exceptionString = JSON.stringify(exception, Object.getOwnPropertyNames(exception));\n }\n const errorMessage = {\n requestId: requestId,\n correlationId: correlationId,\n operationName: operationName.toString() || '',\n message: message.toString() || '',\n exception: exceptionString\n };\n Logger.clrError(errorMessage);\n }\n // To be used for Exception logging\n Logger.Exception = Exception;\n function LogFeedback(requestId, correlationId, event) {\n return _LogFeedback.apply(this, arguments);\n }\n function _LogFeedback() {\n _LogFeedback = _async_to_generator(function*(requestId, correlationId, event) {\n const message = {\n requestId: requestId || uuid(),\n correlationId: correlationId || serverInstanceCorrelationId,\n page: event.page ? event.page.toString() : '',\n clientTimestamp: event.clientTimestamp ? event.clientTimestamp.toString() : '',\n action: event.action ? event.action.toString() : '',\n actionModifier: event.actionModifier ? event.actionModifier.toString() : '',\n details: event.details ? typeof event.details === 'string' ? event.details.toString() : JSON.stringify(event.details) : '',\n hostType: event.hostType ? event.hostType.toString() : '',\n oid: event.oid ? event.oid.toString() : '',\n tid: event.tid ? event.tid.toString() : '',\n spzaId: event.spzaId ? event.spzaId.toString() : ''\n };\n const detailsAsJson = event.details ? typeof event.details === 'string' ? JSON.parse(event.details.toString()) : event.details : null;\n if (detailsAsJson) {\n message.details = detailsAsJson;\n sendFeedback(message);\n } else {\n sendFeedback(message);\n }\n });\n return _LogFeedback.apply(this, arguments);\n }\n Logger.LogFeedback = LogFeedback;\n function sendFeedback(message) {\n clrLogUserFeedback(message, function(error) {\n if (error) {\n Logger.Exception('LogFeedback', error, '');\n }\n });\n }\n function LogTelemetryEvent(requestId, correlationId, event) {\n // For all the error events we want to add a hash based on the error stack/message for making the kusto queries easier.\n if (event.actionModifier && event.actionModifier === Constants.Telemetry.ActionModifier.Error) {\n if (event.details) {\n event.details = JSON.stringify(getErrorDetailsWithHash(event.details));\n }\n }\n if (event.isFeedback) {\n LogFeedback(requestId, correlationId, event);\n } else {\n const message = {\n requestId: requestId || uuid(),\n correlationId: correlationId || serverInstanceCorrelationId,\n page: event.page ? event.page.toString() : '',\n clientTimestamp: event.clientTimestamp ? event.clientTimestamp.toString() : '',\n action: event.action ? event.action.toString() : '',\n actionModifier: event.actionModifier ? event.actionModifier.toString() : '',\n details: event.details ? typeof event.details === 'string' ? event.details.toString() : JSON.stringify(event.details) : '',\n appName: event.appName ? event.appName.toString() : '',\n product: event.product ? event.product.toString() : '',\n featureFlag: event.featureFlag ? event.featureFlag.toString() : '',\n hostType: event.hostType ? event.hostType.toString() : '',\n oid: event.oid ? 'true' : '',\n tid: event.tid ? event.tid.toString() : '',\n spzaId: event.spzaId ? event.spzaId.toString() : '',\n mshash: event.mshash ? event.mshash.toString() : ''\n };\n Logger.clrLogUserTelemetry(message, function(error) {\n if (error) {\n Logger.Exception('LogTelemetry', error, '');\n }\n });\n }\n }\n // To be used by Browser via API route to log telemetry events\n Logger.LogTelemetryEvent = LogTelemetryEvent;\n function LogHttpInboundRequestStart(httpRequestContext) {\n clrLogHttpInboundRequestStart(httpRequestContext, function(error) {\n if (error) {\n Logger.Exception(httpRequestContext.operation, error, '', {\n requestId: httpRequestContext.requestId,\n correlationId: httpRequestContext.correlationId\n });\n }\n });\n }\n // To be used by Node server side API to log incoming requests start\n Logger.LogHttpInboundRequestStart = LogHttpInboundRequestStart;\n function LogHttpInboundRequestEndWithSuccess(httpRequest) {\n clrLogHttpInboundRequestEndWithSuccess(httpRequest, function(error) {\n if (error) {\n Logger.Exception('LogHttpInboundRequestSuccess', error, '', {\n requestId: httpRequest.httpRequestContext.requestId,\n correlationId: httpRequest.httpRequestContext.correlationId\n });\n }\n });\n }\n // To be used by Node server side API to log incoming requests end with success\n Logger.LogHttpInboundRequestEndWithSuccess = LogHttpInboundRequestEndWithSuccess;\n function LogHttpInboundRequestEndWithClientFailure(httpRequest) {\n clrLogHttpInboundRequestEndWithClientFailure(httpRequest, function(error) {\n if (error) {\n Logger.Exception('LogHttpInboundRequestEndWithClientFailure', error, '', {\n requestId: httpRequest.httpRequestContext.requestId,\n correlationId: httpRequest.httpRequestContext.correlationId\n });\n }\n });\n }\n // To be used by Node server side API to log incoming requests end with client failure (4xx)\n Logger.LogHttpInboundRequestEndWithClientFailure = LogHttpInboundRequestEndWithClientFailure;\n function LogHttpInboundRequestEndWithServerFailure(httpRequest) {\n clrLogHttpInboundRequestEndWithServerFailure(httpRequest, function(error) {\n if (error) {\n Logger.Exception('LogHttpInboundRequestEndWithServerFailure', error, '', {\n requestId: httpRequest.httpRequestContext.requestId,\n correlationId: httpRequest.httpRequestContext.correlationId\n });\n }\n });\n }\n // To be used by Node server side API to log incoming requests end with client failure (5xx)\n Logger.LogHttpInboundRequestEndWithServerFailure = LogHttpInboundRequestEndWithServerFailure;\n function LogHttpOutboundRequestStart(httpRequestContext) {\n const clonedRequest = cloneRequest({\n httpRequestContext\n });\n clrLogHttpOutboundRequestStart(clonedRequest, function(error) {\n if (error) {\n Logger.Exception(httpRequestContext.operation, error, '', {\n requestId: httpRequestContext.requestId,\n correlationid: httpRequestContext.correlationId\n });\n }\n });\n }\n // To be used by Node server side API to log outgoing requests start\n Logger.LogHttpOutboundRequestStart = LogHttpOutboundRequestStart;\n function cloneRequest({ httpRequestContext: { requestId, correlationId, headers, operation, httpMethod, hostName, targetUri, apiVersion } }) {\n let parsedHeaders = headers || {};\n let i = 0;\n // in cases where the headers were stringified more than once\n while(typeof parsedHeaders === 'string' && i < 3){\n try {\n parsedHeaders = JSON.parse(parsedHeaders);\n } catch (error) {\n Logger.logDebugMessage(requestId, correlationId, 'cloneRequest', stringifyError(error));\n break;\n }\n // using i for sanity purposes.\n i += 1;\n }\n parsedHeaders = typeof parsedHeaders === 'string' ? {} : parsedHeaders;\n const clonedRequest = {\n requestId,\n correlationId,\n operation,\n httpMethod,\n hostName,\n targetUri,\n userAgent: parsedHeaders[Constants.Headers.XMSUserAgent] || '',\n clientIpAddress: '',\n apiVersion: apiVersion || '',\n contentLength: parsedHeaders['Content-Length'] || 0,\n headers: JSON.stringify(scrubHeaders(parsedHeaders))\n };\n return clonedRequest;\n }\n function LogHttpOutboundRequestEndWithSuccess(httpRequest) {\n const requestId = httpRequest.httpRequestContext.requestId;\n const correlationId = httpRequest.httpRequestContext.correlationId;\n clrLogHttpOutboundRequestEndWithSuccess(httpRequest, function(error) {\n if (error) {\n try {\n const striginfyRequest = JSON.stringify(httpRequest);\n Logger.Exception('LogHttpOutboundRequestEndWithSuccess', `error: ${error}. httpRequest: ${striginfyRequest}`, '', {\n requestId,\n correlationId\n });\n } catch (stringifyError) {\n Logger.Exception('LogHttpOutboundRequestEndWithSuccess', `error: ${error}. stringifyError: ${stringifyError}`, '', {\n requestId,\n correlationId\n });\n }\n }\n });\n }\n // To be used by Node server side API to log outgoing requests end with success\n Logger.LogHttpOutboundRequestEndWithSuccess = LogHttpOutboundRequestEndWithSuccess;\n function LogHttpOutboundRequestEndWithServerFailure(httpRequest) {\n clrLogHttpOutboundRequestEndWithServerFailure(httpRequest, function(error) {\n if (error) {\n Logger.Exception('LogHttpOutboundRequestEndWithServerFailure', error, '', {\n requestId: httpRequest.httpRequestContext.requestId,\n correlationId: httpRequest.httpRequestContext.correlationId\n });\n }\n });\n }\n // To be used by Node server side API to log outgoing requests end with client failure (4xx)\n Logger.LogHttpOutboundRequestEndWithServerFailure = LogHttpOutboundRequestEndWithServerFailure;\n function LogHttpOutboundRequestEndWithClientFailure(httpRequest) {\n clrLogHttpOutboundRequestEndWithClientFailure(httpRequest, function(error) {\n if (error) {\n Logger.Exception('LogHttpOutboundRequestEndWithClientFailure', error, '', {\n requestId: httpRequest.httpRequestContext.requestId,\n correlationId: httpRequest.httpRequestContext.correlationId\n });\n }\n });\n }\n // To be used by Node server side API to log outgoing requests end with server failure (5xx)\n Logger.LogHttpOutboundRequestEndWithClientFailure = LogHttpOutboundRequestEndWithClientFailure;\n function LogInboundRequestStart(request) {\n let requestId = uuid();\n let correlationId = serverInstanceCorrelationId;\n // request can be null for direct server calls, thus the empty guids\n if (request) {\n // default to empty guids for missing headers\n requestId = request.headers[Constants.Headers.RequestId] || requestId;\n correlationId = request.headers[Constants.Headers.CorrelationId] || getStringQueryParam(request, Constants.QueryStrings.CorrelationId) || correlationId;\n }\n try {\n const requestContext = {\n requestId: requestId,\n correlationId: correlationId,\n operation: request.url,\n httpMethod: request.method,\n hostName: request.hostname,\n targetUri: request.hostname + request.originalUrl,\n userAgent: request.headers[Constants.Headers.XMSUserAgent] || '',\n clientIpAddress: '',\n apiVersion: getStringQueryParam(request, 'version') || '',\n contentLength: request.headers['Content-Length'] || 0,\n headers: JSON.stringify(scrubHeaders(request.headers))\n };\n LogHttpInboundRequestStart(requestContext);\n } catch (exception) {\n Logger.Exception('LogHelper.LogInboundRequestStart', 'ExceptionLoggingRequest', exception);\n }\n }\n // Helper method to log all Inbound request starts\n Logger.LogInboundRequestStart = LogInboundRequestStart;\n function LogInboundRequestEnd(request, duration, httpStatus, errorMessage) {\n let requestId = uuid();\n let correlationId = serverInstanceCorrelationId;\n if (request) {\n requestId = request.headers[Constants.Headers.RequestId] || requestId;\n correlationId = request.headers[Constants.Headers.CorrelationId] || getStringQueryParam(request, Constants.QueryStrings.CorrelationId) || correlationId;\n }\n if (errorMessage) {\n // Stringify handles non JSON object such as raw strings, int, bools etc..\n errorMessage = JSON.stringify(errorMessage);\n }\n try {\n const requestContext = {\n requestId: requestId,\n correlationId: correlationId,\n operation: request.url,\n httpMethod: request.method,\n hostName: request.hostname,\n targetUri: request.hostname + request.url,\n userAgent: request.headers[Constants.Headers.XMSUserAgent] || '',\n clientIpAddress: '',\n apiVersion: getStringQueryParam(request, 'version') || '',\n contentLength: request.headers['Content-Length'] || 0,\n headers: JSON.stringify(scrubHeaders(request.headers))\n };\n const httpRequest = {\n httpRequestContext: requestContext,\n durationInMilliseconds: duration,\n httpStatusCode: httpStatus,\n errorMessage: errorMessage\n };\n if (httpStatus > 199 && httpStatus < 300) {\n LogHttpInboundRequestEndWithSuccess(httpRequest);\n } else if (httpStatus > 399 && httpStatus < 500) {\n LogHttpInboundRequestEndWithClientFailure(httpRequest);\n } else if (httpStatus > 499) {\n LogHttpInboundRequestEndWithServerFailure(httpRequest);\n }\n } catch (exception) {\n Logger.Exception('LogHelper.LogRequestEnd', 'ExceptionLoggingRequestEnd', exception);\n }\n }\n // Helper method to log all request end\n Logger.LogInboundRequestEnd = LogInboundRequestEnd;\n function LogOutboundRequestEnd(request, duration, httpStatus, errorMessage) {\n if (errorMessage) {\n // Stringify handles non JSON object such as raw strings, int, bools etc..\n errorMessage = JSON.stringify(errorMessage);\n }\n try {\n const clonedRequest = cloneRequest({\n httpRequestContext: request\n });\n const httpRequest = {\n httpRequestContext: clonedRequest,\n durationInMilliseconds: duration,\n httpStatusCode: httpStatus,\n errorMessage: errorMessage\n };\n if (httpStatus > 199 && httpStatus < 300) {\n LogHttpOutboundRequestEndWithSuccess(httpRequest);\n } else if (httpStatus > 399 && httpStatus < 500) {\n LogHttpOutboundRequestEndWithClientFailure(httpRequest);\n } else if (httpStatus > 499) {\n LogHttpOutboundRequestEndWithServerFailure(httpRequest);\n }\n } catch (exception) {\n Logger.Exception('LogHelper.LogOutboundRequestEnd', 'ExceptionLoggingRequestEnd', exception);\n }\n }\n // Helper for logging outbound request end, since we create the request context we dont need to extract it from the express request\n Logger.LogOutboundRequestEnd = LogOutboundRequestEnd;\n function LogDbResourceOverUsage(requestId, correlationId, requestCharge, latency, query) {\n try {\n const message = {\n requestId: requestId,\n correlationId: correlationId,\n requestCharge: requestCharge ? requestCharge.toString() : '-1',\n latency: latency ? latency.toString() : '-1',\n query: query\n };\n clrLogDbResourceOverUsage(message, function(error) {\n if (error) {\n Logger.Exception('LogHelper.LogDbResourceOverUsage', 'LogDbResourceOverUsage', error);\n }\n });\n } catch (exception) {\n Logger.Exception('LoggerService.LogDbResourceOverUsage', 'Error logging db resource over usage', exception, {\n requestId: requestId,\n correlationId: correlationId\n });\n }\n }\n Logger.LogDbResourceOverUsage = LogDbResourceOverUsage;\n function LogAcquisitionInfo(requestId, correlationId, info, token) {\n try {\n info.userInfo.firstName = info.userInfo.firstName ? info.userInfo.firstName : token ? token.given_name : '';\n info.userInfo.lastName = info.userInfo.lastName ? info.userInfo.lastName : token ? token.family_name : '';\n info.userInfo.email = info.userInfo.email ? info.userInfo.email : token ? token.upn : '';\n info.userInfo.oid = info.userInfo.oid ? info.userInfo.oid : token ? token.oid : '';\n info.userInfo.tid = info.userInfo.tid ? info.userInfo.tid : token ? token.tid : '';\n Logger.LogAcquisitionInfoPayload(requestId, correlationId, info);\n } catch (exception) {\n Logger.Exception('Logger.LogAcquisitionInfo', 'Error logging acquisition info', exception, {\n requestId: requestId,\n correlationId: correlationId\n });\n }\n }\n // To be used by Browser via API route to log app acquisition info\n Logger.LogAcquisitionInfo = LogAcquisitionInfo;\n function LogAcquisitionInfoPayload(requestId, correlationId, info) {\n const message = {\n requestId: requestId,\n correlationId: correlationId,\n acquisitionInfoPayload: JSON.stringify(scrubAcquisitionPayload(info))\n };\n clrLogAcquisitionInfo(message, function(error) {\n if (error) {\n Logger.Exception('Logger.LogAcquisitionInfo', 'LogAcquisitionInfo', error);\n }\n });\n }\n // Separated these methods to call this one from tests to validate the arguments sent to this.\n Logger.LogAcquisitionInfoPayload = LogAcquisitionInfoPayload;\n function LogTelemetryEvents(requestId, correlationId, telemetrybatch, req) {\n try {\n var _telemetrybatch_TelemetryEvents;\n for(let i = 0; i < ((_telemetrybatch_TelemetryEvents = telemetrybatch.TelemetryEvents) === null || _telemetrybatch_TelemetryEvents === void 0 ? void 0 : _telemetrybatch_TelemetryEvents.length); i++){\n const telemetry = telemetrybatch.TelemetryEvents[`${i}`];\n try {\n Logger.LogTelemetryEvent(requestId, correlationId, telemetryHelper(telemetry, req));\n } catch (exception) {\n Logger.Exception('LoggerService.LogTelemetryEvents', 'Error logging telemetry row. Original telemtry row: ' + JSON.stringify(telemetry), exception, {\n requestId,\n correlationId\n });\n }\n }\n } catch (exception) {\n Logger.Exception('LoggerService.LogTelemetryEvents', 'Error logging telemetry batch. Original telemtry batch: ' + JSON.stringify(telemetrybatch), exception, {\n requestId,\n correlationId\n });\n }\n }\n Logger.LogTelemetryEvents = LogTelemetryEvents;\n function ClientLogOutRequests(requestId, correlationId, telemetrybatch, request) {\n const userAgent = request.headers && (request.headers[Constants.Headers.XMSUserAgent] || request.headers[Constants.Headers.UserAgent]);\n const clientIp = request.headers && request.headers[Constants.Headers.XForwardedFor] || request.connection && request.connection.remoteAddress;\n try {\n var _telemetrybatch_TelemetryEvents;\n for(let i = 0; i < ((_telemetrybatch_TelemetryEvents = telemetrybatch.TelemetryEvents) === null || _telemetrybatch_TelemetryEvents === void 0 ? void 0 : _telemetrybatch_TelemetryEvents.length); i++){\n const telemetry = telemetrybatch.TelemetryEvents[`${i}`];\n try {\n logOutRequest(telemetry, userAgent, clientIp);\n } catch (exception) {\n Logger.Exception('LoggerService.ClientLogOutRequests', 'Error logging telemetry row. Original telemtry row: ' + JSON.stringify(telemetry), exception, {\n requestId,\n correlationId\n });\n }\n }\n } catch (exception) {\n Logger.Exception('LoggerService.ClientLogOutRequests', 'Error logging telemetry batch. Original telemtry batch: ' + JSON.stringify(telemetrybatch), exception, {\n requestId,\n correlationId\n });\n }\n }\n // Used for client\n Logger.ClientLogOutRequests = ClientLogOutRequests;\n function ServerLogOutRequest(telemetry) {\n const userAgent = getAppConfig('httpUserAgent');\n const clientIp = getAppConfig('serverIp');\n try {\n logOutRequest(telemetry, userAgent, clientIp);\n } catch (exception) {\n Logger.Exception('LoggerService.ServerLogOutRequest', 'Error logging telemetry row. Original telemtry row: ' + JSON.stringify(telemetry), exception);\n }\n }\n // Used for server\n Logger.ServerLogOutRequest = ServerLogOutRequest;\n function logServerTelemetryEvent(payload, correlationId, requestId) {\n const event = {\n page: payload.page ? payload.page : '',\n action: payload.action ? payload.action : '',\n actionModifier: payload.actionModifier ? payload.actionModifier : '',\n clientTimestamp: new Date().toISOString(),\n details: payload.details ? payload.details : '',\n isFeedback: payload.isFeedback\n };\n const outEvents = {\n TelemetryEvents: [\n event\n ]\n };\n requestId = requestId || generateGuid();\n LogTelemetryEvents(requestId, correlationId, outEvents);\n }\n Logger.logServerTelemetryEvent = logServerTelemetryEvent;\n function errorToConsole(message) {\n if (process.env.siteEnvironment !== 'prod') {\n console.error(message);\n }\n }\n function logDebugMessage(requestId, correlationId, operation, message) {\n Debug(operation, message, '', {\n requestId: requestId,\n correlationId: correlationId\n });\n writeToLogStream(correlationId, operation, message);\n }\n Logger.logDebugMessage = logDebugMessage;\n function logErrorMessage(requestId, correlationId, operation, message) {\n Exception(operation, message, '', {\n requestId: requestId,\n correlationId: correlationId\n });\n }\n Logger.logErrorMessage = logErrorMessage;\n function logInfoMessage(operation, message, exception, additionalData) {\n Information(operation, message, exception, additionalData);\n writeToLogStream(additionalData ? additionalData.correlationId : serverInstanceCorrelationId, operation, message);\n }\n Logger.logInfoMessage = logInfoMessage;\n function logError(operation, message, err, additionalData, correlationId) {\n const trace = stackTrace.parse(err);\n Logger.Exception(operation, message + ':' + stringifyError(err), trace, additionalData);\n const payload = {\n page: 'Error Page (Server)',\n action: 'Page Load',\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: '[Error Trace] ' + stringifyError(err) + ' Stack: ' + JSON.stringify(trace)\n };\n correlationId = correlationId || (additionalData && additionalData.correlationId ? additionalData.correlationId : serverInstanceCorrelationId);\n const requestId = additionalData && additionalData.requestId;\n logServerTelemetryEvent(payload, correlationId, requestId);\n writeToLogStream(correlationId, operation, message);\n }\n Logger.logError = logError;\n // Creates a hash based on the error stack or on the error message and returns the JSON with the hash\n function getErrorDetailsWithHash(errorMessage) {\n const stringErrorMessage = typeof errorMessage === 'string' ? errorMessage : stringifyError(errorMessage);\n const errorStack = stringErrorMessage.split('Stack:');\n const hash = errorStack.length > 0 ? sha256(errorStack[1]) : sha256(errorMessage);\n const errorDetails = {\n message: stringErrorMessage,\n errorHash: hash.toString()\n };\n return errorDetails;\n }\n const parseEventDetails = (event)=>{\n try {\n return JSON.parse(event.details);\n } catch (e) {\n return {\n details: event.details\n }; // incase the details is not a valid JSON\n }\n };\n function telemetryHelper(event, req) {\n if (event.action === Constants.Telemetry.Action.UserSettings) {\n const clientIP = req.headers[Constants.Headers.XForwardedFor] || req.connection.remoteAddress;\n const userAgent = req.headers[Constants.Headers.XMSUserAgent] || req.headers[Constants.Headers.UserAgent];\n const parsedUserAgent = userAgent && agentParser(userAgent);\n event.details = JSON.stringify(_object_spread(_object_spread_props(_object_spread({}, parseEventDetails(event), parsedUserAgent), {\n clientIP\n }), scrubHeaders(req.headers)));\n }\n return event;\n }\n function logOutRequest(telemetry, userAgent, clientIp) {\n if (telemetry.taskName === Constants.Telemetry.OutRequest.Start) {\n Logger.LogHttpOutboundRequestStart(outRequestStartsTelemetryHelper(telemetry, userAgent, clientIp));\n } else {\n const telemetryEvent = outRequestEndsTelemetryHelper(telemetry, userAgent, clientIp);\n if (telemetry.taskName === Constants.Telemetry.OutRequest.EndWithSuccess) {\n Logger.LogHttpOutboundRequestEndWithSuccess(telemetryEvent);\n } else if (telemetry.taskName === Constants.Telemetry.OutRequest.EndWithClientError) {\n Logger.LogHttpOutboundRequestEndWithClientFailure(telemetryEvent);\n } else if (telemetry.taskName === Constants.Telemetry.OutRequest.EndWithServerError) {\n Logger.LogHttpOutboundRequestEndWithServerFailure(telemetryEvent);\n }\n }\n }\n function outRequestTelemetryHelper(event, userAgent, clientIpAddress) {\n const requestContext = {\n requestId: event.requestId,\n correlationId: event.correlationId,\n operation: event.operation,\n httpMethod: event.httpMethod,\n hostName: event.hostName,\n targetUri: event.targetUri,\n userAgent,\n clientIpAddress,\n apiVersion: '',\n contentLength: 0,\n headers: ''\n };\n return requestContext;\n }\n function outRequestStartsTelemetryHelper(event, userAgent, clientIpAddress) {\n const httpRequestContext = outRequestTelemetryHelper(event, userAgent, clientIpAddress);\n httpRequestContext.headers = event.requestHeaders;\n return httpRequestContext;\n }\n function outRequestEndsTelemetryHelper(event, userAgent, clientIpAddress) {\n const httpRequestContext = outRequestTelemetryHelper(event, userAgent, clientIpAddress);\n httpRequestContext.contentLength = event.contentLength;\n httpRequestContext.headers = event.responseHeaders;\n const request = {\n httpRequestContext,\n errorMessage: event.errorMessage,\n durationInMilliseconds: event.durationInMilliseconds,\n httpStatusCode: event.httpStatusCode\n };\n return request;\n }\n Logger.LogHttpOutboundRequestEnds = {\n [Constants.Telemetry.OutRequest.EndWithSuccess]: Logger.LogHttpOutboundRequestEndWithSuccess,\n [Constants.Telemetry.OutRequest.EndWithClientError]: Logger.LogHttpOutboundRequestEndWithClientFailure,\n [Constants.Telemetry.OutRequest.EndWithServerError]: Logger.LogHttpOutboundRequestEndWithServerFailure\n };\n})(Logger || (Logger = {}));\nexport var Logger;\n","import * as path from 'path';\nimport * as fs from 'fs';\nconst isIIS = process.env.isIIS === 'true';\nconst appDirectory = !isIIS ? process.cwd() : fs.realpathSync('../../');\nconst resolveApp = (relativePath)=>path.resolve(appDirectory, relativePath);\nconst clientDirectory = 'client';\nconst serverDirectory = 'server';\nconst clientBuild = resolveApp(`build/${clientDirectory}`);\nconst serverBuild = resolveApp(`build/${serverDirectory}`);\nconst os = process.env.DOCKER ? 'linux' : '';\nconst publicStoragePath = ({ hash = __COMMIT_HASH__, name })=>[\n 'staticstorage',\n os,\n hash,\n name\n ].filter(Boolean).join('/');\nconst paths = {\n appHtml: resolveApp('config/webpack.config.ts/template.html'),\n clientDirectory,\n clientBuild,\n serverBuild,\n dotenv: resolveApp('.env'),\n src: resolveApp('src'),\n srcSSRApp: resolveApp('src/server/utils/ssr/components/App.ssr.tsx'),\n srcAppsourceClient: resolveApp('src/appsource/mainClientHookupWrapper.tsx'),\n srcAppsourceServer: resolveApp('src/server/appsource/server.ts'),\n srcAppsourceRoot: resolveApp('src/appsource'),\n srcEmbedHostEntry: resolveApp('src/server/embedHost/mainClientHookup.tsx'),\n srcEmbedEntry: resolveApp('src/embed/mainClientHookupWrapper.tsx'),\n srcServerRoot: resolveApp('src/server/'),\n srcShared: resolveApp('src/shared'),\n types: resolveApp('node_modules/@types'),\n locales: resolveApp('src/loc'),\n buildLocales: resolveApp(`${serverBuild}/locales`),\n localizationFiles: resolveApp('src/localization/translations'),\n publicStoragePath,\n dllLoggerPath: resolveApp(`${serverBuild}/Microsoft.SaaSMarketPlace.Common.dll`),\n embedHostServer: resolveApp(`${serverBuild}/embedHost/index.html`),\n clientManifestFile: ({ name })=>resolveApp(`${clientBuild}/${publicStoragePath({\n name\n })}/manifest.json`),\n clientStatsFile: ({ name })=>resolveApp(`${clientBuild}/${publicStoragePath({\n name\n })}/stats.json`),\n serverManifestFile: ()=>resolveApp(`${serverBuild}/manifest.json`),\n externalArtifacts: resolveApp('external_artifacts'),\n serverDotenvFiles: resolveApp(`${serverBuild}/config`),\n serverDotenvBundleFiles: ()=>path.resolve(path.join(__dirname, '..', 'config'))\n};\nexport default paths;\n","let apiVersions = [\n '2016-12-07',\n '2017-01-24',\n // this is the version for marketplace API\n '2017-04-15',\n '2017-04-19',\n '2017-04-24',\n // catrp api version\n '2018-08-01-beta',\n // multi geo services\n '2020-09-22'\n];\nexport let errorMessages = {\n invalidApiVersion: 'Invalid value for query string \\'api-version\\'. Allowed values are ' + JSON.stringify(apiVersions),\n missingApiVersion: 'Query string \\'api-version\\' is missing. Allowed values are ' + JSON.stringify(apiVersions),\n multipleValuesForQueryParam: ' query string does not support multiple values. Please provide a single value'\n};\nexport let minVersionForOData = process.env.minVersionForOData || '2016-12-07';\nexport function isValidAPIVersion(apiVersion) {\n return apiVersions.indexOf(apiVersion) !== -1;\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { Constants } from '@shared/utils/constants';\nimport { ODataQuery, RequestQuery } from '@server/api/RequestQuery';\nimport { Logger } from '@server/LogHelper';\nimport { isValidAPIVersion, errorMessages } from '@server/api/ApiVersion';\nimport { updateServerError } from '@server/apiUtils/ODataError';\nimport { getMaskedIpFromRawIpAddress } from '@shared/utils/locationUtils';\nimport { storeAcquisitionInfo } from '@server/services';\nimport { logger } from '@src/logger';\nimport * as jwt from 'jsonwebtoken';\nimport crypto from 'crypto';\nimport deepCopy from 'deepcopy';\nconst emptyId = '00000000-0000-0000-0000-000000000000';\nexport function generateUid(len) {\n return crypto.randomBytes(Math.ceil(len * 3 / 4)).toString('base64').slice(0, len);\n}\nexport class RequestHeaders {\n constructor(requestId, correlationId, authorization){\n _define_property(this, \"requestId\", void 0);\n _define_property(this, \"correlationId\", void 0);\n _define_property(this, \"authorization\", void 0);\n this.requestId = requestId;\n this.correlationId = correlationId;\n this.authorization = authorization;\n }\n}\nexport class RequestCookies {\n constructor(appSourceCookie, appSourceLeadCookie){\n _define_property(this, \"appSourceCookie\", void 0);\n _define_property(this, \"appSourceLeadCookie\", void 0);\n this.appSourceCookie = appSourceCookie;\n this.appSourceLeadCookie = appSourceLeadCookie;\n }\n}\nexport function extractRequestCookies(req) {\n let appSourceCookie = null;\n let appSourceLeadCookie = null;\n if (req && req.cookies) {\n appSourceCookie = req.cookies[Constants.Cookies.AppSourceCookie] || null;\n appSourceLeadCookie = req.cookies[Constants.Cookies.AppSourceLeadCookie] || null;\n }\n return new RequestCookies(appSourceCookie, appSourceLeadCookie);\n}\n// Recommended to use this method to get the requestId and correlationId as a single typed object from a request object\nexport function extractRequestHeaders(req) {\n let requestId = Constants.ReservedCorrelationIds.EmptyId;\n let correlationId = Constants.ReservedCorrelationIds.EmptyId;\n let authorization = null;\n if (req) {\n requestId = req.headers[Constants.Headers.RequestId] || Constants.ReservedCorrelationIds.EmptyId;\n correlationId = req.headers[Constants.Headers.CorrelationId] || Constants.ReservedCorrelationIds.EmptyId;\n authorization = req.headers[Constants.Headers.Authorization] || null;\n }\n return new RequestHeaders(requestId, correlationId, authorization);\n}\n// Helper method to create an Outgoing Request\nexport function createOutgoingHttpContext(incomingRequest, operation, httpMethod, hostname, targetUri, apiVersion, contentLength, headers) {\n let requestId = emptyId;\n let correlationId = emptyId;\n if (incomingRequest) {\n if (incomingRequest.headers) {\n requestId = incomingRequest.headers[Constants.Headers.RequestId] || emptyId;\n correlationId = incomingRequest.headers[Constants.Headers.CorrelationId] || emptyId;\n }\n }\n const requestContext = {\n requestId,\n correlationId,\n operation: operation || '',\n httpMethod: httpMethod || '',\n hostName: hostname || '',\n targetUri: targetUri || '',\n userAgent: '',\n clientIpAddress: '',\n apiVersion: apiVersion || '',\n contentLength: contentLength || 0,\n headers: JSON.stringify(headers) || ''\n };\n return requestContext;\n}\n/**\n * get masked ip address from http request forwared address\n *\n * supports ipv6 and ipv6\n *\n * NOTE: this function doesn't invalidate ipaddresses, whose any of segment values exceeds its maximum\n *\n * @param request http request\n *\n * @return\n * undefined, if valid ipv6 or valid ipv4 cannot be found, or\n * a string with last segment of ip adress masked with 'xxx'\n */ export function getMaskedIP(request) {\n var _request_headers, _request_connection;\n const rawIpAddress = ((_request_headers = request.headers) === null || _request_headers === void 0 ? void 0 : _request_headers[Constants.Headers.XForwardedFor]) || ((_request_connection = request.connection) === null || _request_connection === void 0 ? void 0 : _request_connection.remoteAddress);\n return getMaskedIpFromRawIpAddress(rawIpAddress);\n}\nexport function getStringQueryParam(req, queryParamKey) {\n if (!req || !req.query || !req.query[`${queryParamKey}`]) {\n // Handle it as a 400 in the future\n return null;\n }\n let queryParamValue = req.query[`${queryParamKey}`];\n if (Array.isArray(queryParamValue)) {\n if (queryParamValue.length === 0) {\n return null;\n }\n // When we receive retries from the front end view API's we currently receive duplicate\n // query string parameters and we reject the request. We are temporarily allowing the\n // multiple query string parameters to be used with the first value to be used. This will\n // be removed once the front end retry logic no longer sends multiple query string parameters\n // on retries.\n queryParamValue = queryParamValue[0];\n // TODO: Re-enable this and remove the line above once the retry logic sends single query string parameters.\n // If multiple values are provided for the same query param, throw Error\n // throw Error(queryParamKey + errorMessages.multipleValuesForQueryParam);\n }\n try {\n return decodeURIComponent(queryParamValue);\n } catch (e) {\n const { requestId, correlationId } = extractRequestHeaders(req);\n Logger.logDebugMessage(requestId, correlationId, 'getStringQueryParam', `URI malformed ${queryParamValue}`);\n logger.debug(`URI malformed ${queryParamValue}`, {\n action: 'getStringQueryParam'\n });\n return null;\n }\n}\nexport function throwIfQueryParamPresent(req, queryParamKey) {\n const value = getStringQueryParam(req, queryParamKey);\n if (value) {\n throw Error(queryParamKey + ' is not supported');\n }\n}\nexport function getRequestContext(req) {\n let requestId = Constants.ReservedCorrelationIds.EmptyId;\n let correlationId = Constants.ReservedCorrelationIds.EmptyId;\n let apiVersion = Constants.appsourceApiVersion;\n let requestUrl = '';\n let headers = [];\n let cookies = {};\n let remoteIpAddress = null;\n if (req) {\n requestId = req.headers[Constants.Headers.RequestId] || Constants.ReservedCorrelationIds.EmptyId;\n correlationId = req.headers[Constants.Headers.CorrelationId] || Constants.ReservedCorrelationIds.EmptyId;\n apiVersion = getStringQueryParam(req, 'api-version') || getStringQueryParam(req, 'version');\n requestUrl = req.url || '';\n headers = req.headers;\n cookies = extractRequestCookies(req);\n remoteIpAddress = getMaskedIP(req);\n if (remoteIpAddress === Constants.TypeOf.undefinedName) {\n remoteIpAddress = null;\n }\n }\n const requestContext = {\n correlationId,\n requestId,\n operation: requestUrl,\n apiVersion,\n continuation: null,\n headers,\n cookies,\n remoteIpAddress\n };\n return requestContext;\n}\nexport function rotateArray(array, numElements) {\n while(numElements-- > 0){\n const tmp = array.shift();\n array.push(tmp);\n }\n return array;\n}\nexport function logDebug(requestContext, message) {\n Logger.logDebugMessage(requestContext.requestId, requestContext.correlationId, requestContext.operation, message);\n}\nfunction checkAndLogDuplicateQueryStringParameters(req, requestContext) {\n if (!req || !req.query) {\n return;\n }\n const keys = Object.keys(req.query);\n for(let i = 0; i < keys.length; i++){\n if (Array.isArray(req.query[keys[`${i}`]])) {\n logDebug(requestContext, 'Duplicate query string parameters found:' + req.originalUrl);\n break;\n }\n }\n}\n// TODO: Move this method and getRequestContext methods out of Utils.tsx\n// to remove the cyclic dependency on Utils.tsx from these classes\nexport function getRequestQuery(req) {\n const query = new RequestQuery();\n const requestHeaders = extractRequestHeaders(req);\n const requestContext = getRequestContext(req);\n checkAndLogDuplicateQueryStringParameters(req, requestContext);\n query.requestContext = requestContext;\n query.apiVersion = getStringQueryParam(req, 'api-version');\n query.flightCode = getStringQueryParam(req, 'flightCodes');\n query.billingRegion = getStringQueryParam(req, 'billingregion');\n query.appId = getStringQueryParam(req, 'appId');\n query.planId = getStringQueryParam(req, 'planId');\n query.partnerId = getStringQueryParam(req, 'partnerId');\n query.id = getStringQueryParam(req, 'id');\n query.userSegment = getStringQueryParam(req, 'usersegment');\n query.headers = requestHeaders;\n query.odataQuery = ODataQuery.createODataQuery(req);\n query.cookies = extractRequestCookies(req);\n query.publisherid = getStringQueryParam(req, 'publisherid');\n query.requestContext.continuation = query.odataQuery.$skiptoken;\n query.country = getStringQueryParam(req, 'country');\n if (!query.apiVersion) {\n throw Error(errorMessages.missingApiVersion);\n } else if (!isValidAPIVersion(query.apiVersion)) {\n throw Error(errorMessages.invalidApiVersion);\n }\n return query;\n}\nexport function logError(requestContext, message, error) {\n Logger.logError(requestContext.operation, message, error, {\n requestId: requestContext.requestId,\n correlationId: requestContext.correlationId\n });\n}\nexport function logAcquisitionInfo(requestContext, body) {\n const decodedAuthToken = jwt.decode(this.authToken);\n Logger.LogAcquisitionInfo(requestContext.requestId, requestContext.correlationId, body, decodedAuthToken);\n storeAcquisitionInfo({\n payload: body\n }, this.authToken);\n}\n/**\n * Helper function for logging the outbound request end.\n *\n * @param {models.IHttpRequestContext} request : The HttpRequestContext.\n * @param {number} duration : The duration of the request.\n * @param {number} httpStatus : The Http Status response code.\n * @param {string} errorMessage : The error message if available.\n */ export function logOutboundRequestEnd(request, duration, httpStatus, errorMessage) {\n Logger.LogOutboundRequestEnd(request, duration, httpStatus, errorMessage);\n}\nexport function IsAppAndPartnerDataMerged() {\n const settingValue = process.env.mergeDataCollections || 'false';\n return settingValue === 'true';\n}\nexport function isGuid(guid) {\n const pattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\n return pattern.test(guid);\n}\nexport function isServerId(serverId) {\n const serverPattern = /^[0-9]{8}-[0-9]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9]{12}$/i;\n return serverPattern.test(serverId);\n}\nexport function checkReqHeaders(req) {\n // cacheStatus is called from antares we dont have an option to add these headers\n if (req && req.headers && req.baseUrl !== '/view/cacheStatus') {\n const requestId = req.headers[Constants.Headers.RequestId];\n const correlationId = req.headers[Constants.Headers.CorrelationId];\n if (!requestId || !correlationId) {\n return 'No requestId or correlationId found in the header of the request';\n }\n if (!isGuid(requestId)) {\n return 'Invalid requestId format in the header of the request';\n }\n if (!isGuid(correlationId) && !isServerId(correlationId)) {\n return 'Invalid correlationId format in header';\n }\n }\n return '';\n}\nexport function clone(obj) {\n if (!obj) {\n return obj;\n }\n return JSON.parse(JSON.stringify(obj));\n}\nfunction scrubPiiField(piiField = '') {\n return (piiField === null || piiField === void 0 ? void 0 : piiField.length) ? `length: ${piiField.length}` : piiField;\n}\nfunction scrubPii(user) {\n Constants.PIIFields.forEach((piiField)=>{\n user[`${piiField}`] = scrubPiiField(user[`${piiField}`]);\n });\n}\nexport function scrubAcquisitionPayload(payload) {\n try {\n var _payloadCopy_notes_length, _payloadCopy_notes;\n const payloadCopy = deepCopy(payload);\n if (payloadCopy.userInfo) {\n scrubPii(payloadCopy.userInfo);\n }\n payloadCopy.notes = (_payloadCopy_notes = payloadCopy.notes) === null || _payloadCopy_notes === void 0 ? void 0 : (_payloadCopy_notes_length = _payloadCopy_notes.length) === null || _payloadCopy_notes_length === void 0 ? void 0 : _payloadCopy_notes_length.toString();\n return payloadCopy;\n } catch (error) {\n logger.error(`Failed to scrubAcquisitionPayload with error ${error.error.message}`);\n return {};\n }\n}\nexport function scrubUserProfile(user) {\n try {\n const userCopy = deepCopy(user);\n scrubPii(userCopy);\n return userCopy;\n } catch (error) {\n logger.error(`Failed to scrubUserProfile with error ${error.error.message}`);\n return {};\n }\n}\nexport function removeDuplicateQueryParams(queryParams) {\n let urlQueryParams = queryParams;\n if (queryParams.indexOf('?') > -1) {\n const splitValues = queryParams.split('?');\n urlQueryParams = splitValues && splitValues.length > 1 ? splitValues[1] : urlQueryParams;\n }\n if (!urlQueryParams || urlQueryParams === '' || queryParams.indexOf('=') === -1) {\n return '';\n }\n const obj = JSON.parse('{\"' + urlQueryParams.replace(/&/g, '\",\"').replace(/=/g, '\":\"') + '\"}');\n return `?${new URLSearchParams(obj).toString()}`;\n}\n// Logs the payload provided as Json into debug table\nexport function logPayload(requestId, correlationId, payload, operationName) {\n try {\n Logger.logDebugMessage(requestId, correlationId, operationName, JSON.stringify(scrubAcquisitionPayload(payload)));\n logger.debug(JSON.stringify(scrubAcquisitionPayload(payload)), {\n action: operationName\n });\n } catch (e) {\n const error = updateServerError(e);\n Logger.logErrorMessage(requestId, correlationId, operationName, 'Failed to log payload with error ' + error.error.message);\n logger.error(`Failed to log payload with error ${error.error.message}`, {\n action: operationName,\n error: e\n });\n }\n} // List of all the crawlers which we need to exclude from the user traffic\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction _object_without_properties(source, excluded) {\n if (source == null) return {};\n var target = _object_without_properties_loose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for(i = 0; i < sourceSymbolKeys.length; i++){\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\nfunction _object_without_properties_loose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for(i = 0; i < sourceKeys.length; i++){\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nimport { stringifyError } from '@shared/utils/errorUtils';\nexport var ServerCollection = /*#__PURE__*/ function(ServerCollection) {\n ServerCollection[\"ServerLogs\"] = \"Logs\";\n ServerCollection[\"IncomingRequests\"] = \"IncomingRequests\";\n ServerCollection[\"ServerOutgoingRequests\"] = \"OutgoingRequests\";\n ServerCollection[\"DBResourceOverUsage\"] = \"DBResourceOverUsage\";\n ServerCollection[\"UserTelemetry\"] = \"UserTelemetry\";\n ServerCollection[\"UserFeedback\"] = \"UserFeedback\";\n return ServerCollection;\n}({});\nexport class ServerLogger {\n get logger() {\n return this._logger;\n }\n init(winstonLogger) {\n this._logger = winstonLogger;\n }\n debug(message, _param) {\n var { operation = '', operationModifier = '', page = '', collection = \"Logs\" } = _param, loggerMetadata = _object_without_properties(_param, [\n \"operation\",\n \"operationModifier\",\n \"page\",\n \"collection\"\n ]);\n const { correlationId, requestId } = this.context;\n if (this._logger) {\n this._logger.debug(message, _object_spread({\n correlationId,\n requestId,\n operation,\n operationModifier,\n page,\n collection\n }, loggerMetadata));\n }\n }\n info(message, _param) {\n var { operation = '', operationModifier = '', page = '', collection = \"Logs\" } = _param, loggerMetadata = _object_without_properties(_param, [\n \"operation\",\n \"operationModifier\",\n \"page\",\n \"collection\"\n ]);\n const { correlationId, requestId } = this.context;\n if (this._logger) {\n this._logger.info(message, _object_spread({\n correlationId,\n requestId,\n operation,\n operationModifier,\n page,\n collection\n }, loggerMetadata));\n }\n }\n warning(message, _param) {\n var { operation = '', operationModifier = '', page = '', collection = \"Logs\" } = _param, loggerMetadata = _object_without_properties(_param, [\n \"operation\",\n \"operationModifier\",\n \"page\",\n \"collection\"\n ]);\n const { correlationId, requestId } = this.context;\n if (this._logger) {\n this._logger.warn(message, _object_spread({\n correlationId,\n requestId,\n operation,\n operationModifier,\n page,\n collection\n }, loggerMetadata));\n }\n }\n error(message, _param) {\n var { operation = '', operationModifier = '', page = '', collection = \"Logs\", error } = _param, loggerMetadata = _object_without_properties(_param, [\n \"operation\",\n \"operationModifier\",\n \"page\",\n \"collection\",\n \"error\"\n ]);\n const { correlationId, requestId } = this.context;\n // The payload of the error might be changed!\n if (this._logger) {\n this._logger.error(message, _object_spread({\n correlationId,\n requestId,\n operation,\n operationModifier,\n page,\n collection,\n error: stringifyError(error || '')\n }, loggerMetadata));\n }\n }\n constructor(){\n _define_property(this, \"_logger\", void 0);\n _define_property(this, \"context\", void 0);\n this.context = {\n correlationId: '',\n requestId: ''\n };\n }\n}\n","export var AzureEnvironment = /*#__PURE__*/ function(AzureEnvironment) {\n AzureEnvironment[AzureEnvironment[\"Public\"] = 0] = \"Public\";\n AzureEnvironment[AzureEnvironment[\"FairFax\"] = 1] = \"FairFax\";\n AzureEnvironment[AzureEnvironment[\"Mooncake\"] = 2] = \"Mooncake\";\n AzureEnvironment[AzureEnvironment[\"BlackForest\"] = 3] = \"BlackForest\";\n return AzureEnvironment;\n}({});\nconst settings = {};\nsettings[0] = {\n environment: 0,\n defaultCountryCode: 'us',\n defaultLocale: 'en-us',\n allowMSA: true\n};\nsettings[2] = {\n environment: 2,\n defaultCountryCode: 'cn',\n defaultLocale: 'zh-cn',\n allowMSA: false\n};\n// Settings for the Azure environment\nexport const AzureEnvironmentSettings = settings[0];\n","/* eslint-disable camelcase */ export var PartnerSearchResultType = /*#__PURE__*/ function(PartnerSearchResultType) {\n PartnerSearchResultType[PartnerSearchResultType[\"Industry\"] = 0] = \"Industry\";\n PartnerSearchResultType[PartnerSearchResultType[\"Product\"] = 1] = \"Product\";\n PartnerSearchResultType[PartnerSearchResultType[\"Service\"] = 2] = \"Service\";\n PartnerSearchResultType[PartnerSearchResultType[\"Category\"] = 3] = \"Category\";\n PartnerSearchResultType[PartnerSearchResultType[\"AdvSpec\"] = 4] = \"AdvSpec\";\n PartnerSearchResultType[PartnerSearchResultType[\"Partner\"] = 5] = \"Partner\";\n PartnerSearchResultType[PartnerSearchResultType[\"FreeText\"] = 6] = \"FreeText\";\n return PartnerSearchResultType;\n}({});\nexport const LinkedAddInsTypes = {\n outlook: true,\n onenote: true,\n officemetaos: true,\n teams: true,\n word: true,\n excel: true,\n sharepoint: true,\n viva: true,\n powerpoint: true,\n project: true\n};\nexport var AppTag = /*#__PURE__*/ function(AppTag) {\n AppTag[AppTag[\"Other\"] = 0] = \"Other\";\n AppTag[AppTag[\"OfficeAward\"] = 1] = \"OfficeAward\";\n AppTag[AppTag[\"New\"] = 2] = \"New\";\n AppTag[AppTag[\"Trending\"] = 3] = \"Trending\";\n AppTag[AppTag[\"PowerBICertified\"] = 4] = \"PowerBICertified\";\n AppTag[AppTag[\"AzureExpertsMSP\"] = 5] = \"AzureExpertsMSP\";\n return AppTag;\n}({});\nexport var MediaType = /*#__PURE__*/ function(MediaType) {\n MediaType[\"Image\"] = \"Image\";\n MediaType[\"Video\"] = \"Video\";\n return MediaType;\n}({});\nexport var CustomerType = /*#__PURE__*/ function(CustomerType) {\n CustomerType[\"Organization\"] = \"Organization\";\n CustomerType[\"Individual\"] = \"Individual\";\n return CustomerType;\n}({});\n// Test Drive status\nexport var SolutionInstanceStatus = /*#__PURE__*/ function(SolutionInstanceStatus) {\n SolutionInstanceStatus[\"Provisioning\"] = \"Provisioning\";\n SolutionInstanceStatus[\"Ready\"] = \"Ready\";\n SolutionInstanceStatus[\"Deprovisioned\"] = \"Deprovisioned\";\n SolutionInstanceStatus[\"Expired\"] = \"Expired\";\n SolutionInstanceStatus[\"Error\"] = \"Error\";\n SolutionInstanceStatus[\"Unavailable\"] = \"Unavailable\";\n return SolutionInstanceStatus;\n}({});\nexport var PricingStates = /*#__PURE__*/ function(PricingStates) {\n PricingStates[PricingStates[\"Loading\"] = 1] = \"Loading\";\n PricingStates[PricingStates[\"BYOL\"] = 2] = \"BYOL\";\n PricingStates[PricingStates[\"AlwaysAvailable\"] = 3] = \"AlwaysAvailable\";\n PricingStates[PricingStates[\"NotAvailableInThisRegion\"] = 4] = \"NotAvailableInThisRegion\";\n PricingStates[PricingStates[\"NoPricingData\"] = 5] = \"NoPricingData\";\n PricingStates[PricingStates[\"FreeApp\"] = 6] = \"FreeApp\";\n PricingStates[PricingStates[\"AdditionalPurchasesRequired\"] = 7] = \"AdditionalPurchasesRequired\";\n PricingStates[PricingStates[\"SolutionTemplate\"] = 8] = \"SolutionTemplate\";\n // NOTE: where is the following used?? Can it be removed?\n PricingStates[PricingStates[\"WebApp\"] = 9] = \"WebApp\";\n PricingStates[PricingStates[\"PriceVaries\"] = 10] = \"PriceVaries\";\n PricingStates[PricingStates[\"StartFromFree\"] = 11] = \"StartFromFree\";\n PricingStates[PricingStates[\"LearnMore\"] = 12] = \"LearnMore\";\n return PricingStates;\n}({});\nexport var UserSegment = /*#__PURE__*/ function(UserSegment) {\n UserSegment[UserSegment[\"unauthenticated\"] = 0] = \"unauthenticated\";\n UserSegment[UserSegment[\"business\"] = 1] = \"business\";\n UserSegment[UserSegment[\"consumer\"] = 2] = \"consumer\";\n UserSegment[UserSegment[\"edu\"] = 3] = \"edu\";\n UserSegment[UserSegment[\"tenantadmin\"] = 4] = \"tenantadmin\";\n return UserSegment;\n}({});\nexport var CommunityItemType = /*#__PURE__*/ function(CommunityItemType) {\n CommunityItemType[\"Review\"] = \"Review\";\n return CommunityItemType;\n}({});\nexport var CheckoutSource = /*#__PURE__*/ function(CheckoutSource) {\n CheckoutSource[\"PdpTable\"] = \"PDP Table\";\n CheckoutSource[\"PdpTop\"] = \"PDP Top\";\n CheckoutSource[\"Tile\"] = \"Tile\";\n CheckoutSource[\"Deeplink\"] = \"Deeplink\";\n return CheckoutSource;\n}({});\nexport var PricingOfferType = /*#__PURE__*/ function(PricingOfferType) {\n PricingOfferType[\"AppService\"] = \"AppService\";\n PricingOfferType[\"VirtualMachine\"] = \"VirtualMachine\";\n return PricingOfferType;\n}({});\nexport var CatalogOfferType = /*#__PURE__*/ function(CatalogOfferType) {\n CatalogOfferType[\"None\"] = \"None\";\n CatalogOfferType[\"VirtualMachine\"] = \"VirtualMachine\";\n CatalogOfferType[\"AzureApplication\"] = \"AzureApplication\";\n CatalogOfferType[\"Container\"] = \"Container\";\n CatalogOfferType[\"SaaS\"] = \"SaaS\";\n CatalogOfferType[\"ManagedServices\"] = \"ManagedServices\";\n CatalogOfferType[\"DynamicsOps\"] = \"DynamicsOps\";\n CatalogOfferType[\"DynamicsCE\"] = \"DynamicsCE\";\n CatalogOfferType[\"DynamicsBC\"] = \"DynamicsBC\";\n CatalogOfferType[\"PowerBI\"] = \"PowerBI\";\n CatalogOfferType[\"ConsultingServices\"] = \"ConsultingServices\";\n CatalogOfferType[\"PowerBIVisuals\"] = \"PowerBIVisuals\";\n CatalogOfferType[\"Office365\"] = \"Office365\";\n CatalogOfferType[\"AADApps\"] = \"AADApps\";\n return CatalogOfferType;\n}({});\nexport var CatalogApplicableProducts = /*#__PURE__*/ function(CatalogApplicableProducts) {\n CatalogApplicableProducts[\"Sales\"] = \"Sales\";\n CatalogApplicableProducts[\"FieldService\"] = \"Field Service\";\n CatalogApplicableProducts[\"ProjectServiceAutomation\"] = \"Project Service Automation\";\n CatalogApplicableProducts[\"CustomerService\"] = \"Customer Service\";\n CatalogApplicableProducts[\"CustomerVoice\"] = \"Customer Voice\";\n CatalogApplicableProducts[\"Marketing\"] = \"Marketing\";\n CatalogApplicableProducts[\"MixedReality\"] = \"Mixed Reality\";\n CatalogApplicableProducts[\"Power_Apps\"] = \"Power Apps\";\n CatalogApplicableProducts[\"PowerApps\"] = \"PowerApps\";\n CatalogApplicableProducts[\"PowerAutomate\"] = \"Power Automate\";\n CatalogApplicableProducts[\"PowerVirtualAgents\"] = \"Power Virtual Agents\";\n CatalogApplicableProducts[\"PowerPages\"] = \"Power Pages\";\n CatalogApplicableProducts[\"ProjectOperations\"] = \"Project Operations\";\n CatalogApplicableProducts[\"ProjectServices\"] = \"Project Services\";\n CatalogApplicableProducts[\"Commerce\"] = \"Commerce\";\n CatalogApplicableProducts[\"Finance\"] = \"Finance\";\n CatalogApplicableProducts[\"HumanResources\"] = \"Human Resources\";\n CatalogApplicableProducts[\"SupplyChainManagement\"] = \"Supply Chain Management\";\n CatalogApplicableProducts[\"BusinessCentral\"] = \"Business Central\";\n return CatalogApplicableProducts;\n}({});\nexport var CatalogAppFreeType = /*#__PURE__*/ function(CatalogAppFreeType) {\n CatalogAppFreeType[\"AppFree\"] = \"AppFree\";\n CatalogAppFreeType[\"AppFreeTrial\"] = \"AppFreeTrial\";\n CatalogAppFreeType[\"ExternalPurchase\"] = \"ExternalPurchase\";\n return CatalogAppFreeType;\n}({});\nexport var CatalogM365CertificationType = /*#__PURE__*/ function(CatalogM365CertificationType) {\n CatalogM365CertificationType[CatalogM365CertificationType[\"Undefined\"] = 0] = \"Undefined\";\n CatalogM365CertificationType[CatalogM365CertificationType[\"None\"] = 1] = \"None\";\n CatalogM365CertificationType[CatalogM365CertificationType[\"SelfAttested\"] = 2] = \"SelfAttested\";\n CatalogM365CertificationType[CatalogM365CertificationType[\"MicrosoftCertified\"] = 3] = \"MicrosoftCertified\";\n return CatalogM365CertificationType;\n}({});\nexport var CatalogPricingTypes = /*#__PURE__*/ function(CatalogPricingTypes) {\n CatalogPricingTypes[\"Payg\"] = \"Payg\";\n CatalogPricingTypes[\"Free\"] = \"Free\";\n CatalogPricingTypes[\"FreeTrial\"] = \"FreeTrial\";\n CatalogPricingTypes[\"Byol\"] = \"Byol\";\n return CatalogPricingTypes;\n}({});\nexport var OrchestrationType = /*#__PURE__*/ function(OrchestrationType) {\n OrchestrationType[\"PowerBi\"] = \"PowerBi\";\n OrchestrationType[\"LabManager\"] = \"LabManager\";\n OrchestrationType[\"LogicApp\"] = \"LogicApp\";\n return OrchestrationType;\n}({});\nexport var PricingAudience = /*#__PURE__*/ function(PricingAudience) {\n PricingAudience[\"DirectCommercial\"] = \"DirectCommercial\";\n PricingAudience[\"PartnerCommercial\"] = \"PartnerCommercial\";\n return PricingAudience;\n}({});\nexport var IAvailabilityActions = /*#__PURE__*/ function(IAvailabilityActions) {\n IAvailabilityActions[\"Browse\"] = \"Browse\";\n IAvailabilityActions[\"Curate\"] = \"Curate\";\n IAvailabilityActions[\"Consume\"] = \"Consume\";\n IAvailabilityActions[\"Details\"] = \"Details\";\n IAvailabilityActions[\"Purchase\"] = \"Purchase\";\n IAvailabilityActions[\"Renew\"] = \"Renew\";\n return IAvailabilityActions;\n}({});\nexport var TermsStrings = /*#__PURE__*/ function(TermsStrings) {\n TermsStrings[\"Term30DString\"] = \"P30D\";\n TermsStrings[\"Term90DString\"] = \"P90D\";\n TermsStrings[\"Term1HString\"] = \"P1H\";\n TermsStrings[\"Term1MString\"] = \"P1M\";\n TermsStrings[\"Term3MString\"] = \"P3M\";\n TermsStrings[\"Term1YString\"] = \"P1Y\";\n TermsStrings[\"Term2YString\"] = \"P2Y\";\n TermsStrings[\"Term3YString\"] = \"P3Y\";\n TermsStrings[\"HourString\"] = \"HR\";\n TermsStrings[\"MonthString\"] = \"Month\";\n TermsStrings[\"YearString\"] = \"Year\";\n TermsStrings[\"FreeTrial\"] = \"FreeTrial\";\n TermsStrings[\"OneTime\"] = \"OneTime\";\n return TermsStrings;\n}({});\nexport var Badges = /*#__PURE__*/ function(Badges) {\n Badges[\"MAICPPCertifiedSolution\"] = \"MAICPPCertifiedSolution\";\n Badges[\"CopilotExtension\"] = \"CopilotExtension\";\n return Badges;\n}({});\nexport var OdataRawObjectAppType = /*#__PURE__*/ function(OdataRawObjectAppType) {\n OdataRawObjectAppType[OdataRawObjectAppType[\"public\"] = 0] = \"public\";\n OdataRawObjectAppType[OdataRawObjectAppType[\"private\"] = 1] = \"private\";\n return OdataRawObjectAppType;\n}({});\nexport var PlansEntityOS = /*#__PURE__*/ function(PlansEntityOS) {\n PlansEntityOS[\"windows\"] = \"windows\";\n PlansEntityOS[\"linux\"] = \"linux\";\n return PlansEntityOS;\n}({});\nexport var DakotaOfferType = /*#__PURE__*/ function(DakotaOfferType) {\n DakotaOfferType[\"AzureApplication\"] = \"AzureApplication\";\n DakotaOfferType[\"Container\"] = \"Container\";\n DakotaOfferType[\"ContainerApp\"] = \"ContainerApp\";\n DakotaOfferType[\"DevService\"] = \"DevService\";\n DakotaOfferType[\"IoTEdgeModule\"] = \"IoTEdgeModule\";\n DakotaOfferType[\"ManagedApp\"] = \"ManagedApp\";\n DakotaOfferType[\"ManagedServices\"] = \"ManagedServices\";\n DakotaOfferType[\"SaaSApp\"] = \"SaaSApp\";\n DakotaOfferType[\"SolutionTemplate\"] = \"SolutionTemplate\";\n DakotaOfferType[\"VirtualMachine\"] = \"VirtualMachine\";\n DakotaOfferType[\"PowerBI\"] = \"PowerBI\";\n DakotaOfferType[\"PowerBIVisuals\"] = \"PowerBIVisuals\";\n DakotaOfferType[\"DynamicsCE\"] = \"DynamicsCE\";\n DakotaOfferType[\"None\"] = \"None\";\n DakotaOfferType[\"DynamicsOps\"] = \"DynamicsOps\";\n DakotaOfferType[\"DynamicsBC\"] = \"DynamicsBC\";\n DakotaOfferType[\"ConsultingServices\"] = \"ConsultingServices\";\n DakotaOfferType[\"Office365\"] = \"Office365\";\n DakotaOfferType[\"AAD\"] = \"AAD\";\n return DakotaOfferType;\n}({});\nexport var ISearchFilterCategory = /*#__PURE__*/ function(ISearchFilterCategory) {\n ISearchFilterCategory[\"Products\"] = \"Products\";\n return ISearchFilterCategory;\n}({});\nexport const ratingValues = [\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6,\n 7,\n 8,\n 9,\n 10\n];\n","/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-empty-interface */ export function actionCreator(type) {\n return (payload)=>({\n type,\n payload\n });\n}\nexport function isType(action, type) {\n return action.type === type;\n}\nexport const RehydrateClientStateAction = 'RehydrateClientStateAction';\nexport const createRehydrateClientStateAction = actionCreator(RehydrateClientStateAction);\nexport const SearchboxInputChangedAction = 'SearchboxInputChangedAction';\nexport const createSearchboxInputChangedAction = actionCreator(SearchboxInputChangedAction);\nexport const SuggestedChangeAction = 'SuggestedChangeAction';\nexport const createSuggestedChangeAction = actionCreator(SuggestedChangeAction);\nexport const SearchSortingOptionChangedAction = 'SearchSortingOptionChangedAction';\nexport const createSearchSortingOptionChangedAction = actionCreator(SearchSortingOptionChangedAction);\nexport const LiveSearchboxFilterAction = 'BasicSearchboxChangedAction';\nexport const createLiveSearchboxFilterAction = actionCreator(LiveSearchboxFilterAction);\nexport const ModalAction = 'ModalAction';\nexport const createModalAction = actionCreator(ModalAction);\nexport const VideoModalAction = 'VideoModalAction';\nexport const createVideoModalAction = actionCreator(VideoModalAction);\nexport const MediaModalAction = 'MediaModalAction';\nexport const createMediaModalAction = actionCreator(MediaModalAction);\nexport const DriveModalAction = 'DriveModalAction';\nexport const createDriveModalAction = actionCreator(DriveModalAction);\nexport const IFieldHubModalAction = 'IFieldHubModalAction';\nexport const createIFieldHubModalAction = actionCreator(IFieldHubModalAction);\nexport const IDisclaimerModalAction = 'IDisclaimerModalAction';\nexport const createIDisclaimerModalAction = actionCreator(IDisclaimerModalAction);\nexport const InstructionsModalAction = 'InstructionsModalAction';\nexport const createInstructionsModalAction = actionCreator(InstructionsModalAction);\nexport const RatingAction = 'RatingAction';\nexport const createRatingAction = actionCreator(RatingAction);\nexport const BreadcrumbAction = 'BreadcrumbAction';\nexport const createBreadcrumbAction = actionCreator(BreadcrumbAction);\nexport const SetCurrentViewAction = 'SetCurrentView';\nexport const createSetCurrentViewAction = actionCreator(SetCurrentViewAction);\n// determine current rendered gallery page is curated view or filtered view\n// it should be undefined when currentView is not a gallery page\nexport const UpdateCurrentGalleryViewIsCuratedAction = 'UpdateCurrentGalleryViewIsCuratedAction';\nexport const createUpdateCurrentGalleryViewIsCurated = actionCreator(UpdateCurrentGalleryViewIsCuratedAction);\nexport const SetLandingViewAction = 'SetLandingView';\nexport const createSetLandingViewAction = actionCreator(SetLandingViewAction);\nexport const EnableNewNpsAction = 'EnableNewNps';\nexport const createEnableNewNpsAction = actionCreator(EnableNewNpsAction);\nexport const SetInitializedPCAInstanceAction = 'SetInitializedPCA';\nexport const createSetInitializedPCAInstanceAction = actionCreator(SetInitializedPCAInstanceAction);\nexport const SetIsNpsLogicVerifiedAction = 'SetIsNpsLogicVerified';\nexport const createSetIsNpsLogicVerifiedAction = actionCreator(SetIsNpsLogicVerifiedAction);\nexport const ShowingResultsForReceviedAction = 'ShowingResultsForReceviedAction';\nexport const createShowingResultsForReceivedAction = actionCreator(ShowingResultsForReceviedAction);\nexport const FilteredSearchResultsReceivedAction = 'FilteredSearchResultsReceivedAction';\nexport const createFilteredSearchResultsReceivedAction = actionCreator(FilteredSearchResultsReceivedAction);\nexport const PartnerSearchResultsReceivedAction = 'PartnerSearchResultsReceivedAction';\nexport const createPartnerSearchResultsReceivedAction = actionCreator(PartnerSearchResultsReceivedAction);\nexport const EntityDataReceivedAction = 'EntityDataReceivedAction';\nexport const createEntityDataReceivedAction = actionCreator(EntityDataReceivedAction);\nexport const UserProfileLoadingAction = 'UserProfileLoadingAction';\nexport const createUserProfileLoadingAction = actionCreator(UserProfileLoadingAction);\nexport const UserProfileAction = 'UserProfileAction';\nexport const createUserProfileAction = actionCreator(UserProfileAction);\nexport const UserTenantsDetailsAction = 'UserTenantsDetailsAction';\nexport const createUserTenantsDetailsAction = actionCreator(UserTenantsDetailsAction);\nexport const UserTenantsDetailsLoadingAction = 'UserTenantsDetailsLoadingAction';\nexport const createUserTenantsDetailsLoadingAction = actionCreator(UserTenantsDetailsLoadingAction);\nexport const UpdateUserProfileAction = 'UpdateUserProfileAction';\nexport const createUpdateUserProfileAction = actionCreator(UpdateUserProfileAction);\nexport const SetAccountAction = 'SetAccountAction';\nexport const createSetAccountAction = actionCreator(SetAccountAction);\nexport const SetAccountIsLoadingAction = 'SetAccountIsLoadingAction';\nexport const createSetAccountIsLoadingAction = actionCreator(SetAccountIsLoadingAction);\nexport const SetIsMaccTenantAction = 'SetIsMaccTenantAction';\nexport const createSetIsMaccTenantAction = actionCreator(SetIsMaccTenantAction);\nexport const UpdateUserProfileLicenseAction = 'UpdateUserProfileLicenseAction';\nexport const createUpdateUserProfileLicenseAction = actionCreator(UpdateUserProfileLicenseAction);\n/** Updates IUserDataState only clears the phone number to string empty */ export const ClearUserPropertiesAction = 'ClearUserPropertiesAction';\nexport const createClearUserPropertiesAction = actionCreator(ClearUserPropertiesAction);\n// Actions for SI Partners - End\nexport const PowerBIDataReceivedAction = 'PowerBIDataReceivedAction';\nexport const createPowerBIDataReceivedAction = actionCreator(PowerBIDataReceivedAction);\nexport const PartnerAppDataReceivedAction = 'PartnerAppDataReceivedAction';\nexport const createPartnerAppDataReceivedAction = actionCreator(PartnerAppDataReceivedAction);\nexport const SetEntityIdLoadingAction = 'SetEntityIdLoadingAction';\nexport const createSetEntityIdLoadingAction = actionCreator(SetEntityIdLoadingAction);\nexport const SetEntityIdFailedAction = 'SetEntityIdFailedAction';\nexport const createSetEntityIdFailedAction = actionCreator(SetEntityIdFailedAction);\nexport const EntityDetailsReceivedAction = 'EntityDetailsReceivedAction';\nexport const createEntityDetailsReceivedAction = actionCreator(EntityDetailsReceivedAction);\nexport const EntityFullDataReceivedAction = 'EntityFullDataReceivedAction';\nexport const createEntityFullDataReceivedAction = actionCreator(EntityFullDataReceivedAction);\nexport const EntityReviewCommentsReceivedAction = 'EntityReviewCommentsReceivedAction';\nexport const createEntityReviewCommentsReceivedAction = actionCreator(EntityReviewCommentsReceivedAction);\nexport const EntityReviewCommentsLoadingAction = 'EntityReviewCommentsLoadingAction';\nexport const createEntityReviewCommentsLoadingAction = actionCreator(EntityReviewCommentsLoadingAction);\nexport const EntityReviewCommentsCleanupAction = 'EntityReviewCommentsCleanupAction';\nexport const createEntityReviewCommentsCleanupAction = actionCreator(EntityReviewCommentsCleanupAction);\nexport const EntityReviewCommentCreateResult = 'EntityReviewCommentCreateResult';\nexport const createEntityReviewCommentCreateResult = actionCreator(EntityReviewCommentCreateResult);\nexport const EntityReviewCommentDeleteResult = 'EntityReviewCommentDeleteResult';\nexport const createEntityReviewCommentDeleteResult = actionCreator(EntityReviewCommentDeleteResult);\nexport const EntityReviewCommentUpdateResult = 'EntityReviewCommentUpdateResult';\nexport const createEntityReviewCommentUpdateResult = actionCreator(EntityReviewCommentUpdateResult);\nexport const EntityReviewCommentModalAction = 'EntityReviewCommentModalAction';\nexport const createEntityReviewCommentModalAction = actionCreator(EntityReviewCommentModalAction);\nexport const EntityReviewCommentsUpdateTotalCommentCountAction = 'EntityReviewCommentsUpdateTotalCommentCountAction';\nexport const createEntityReviewCommentsUpdateTotalCommentCountAction = actionCreator(EntityReviewCommentsUpdateTotalCommentCountAction);\nexport const EntityReviewCommentsUnloadPagesAction = 'EntityReviewCommentsUnloadPagesAction';\nexport const createEntityReviewCommentsUnloadPagesAction = actionCreator(EntityReviewCommentsUnloadPagesAction);\nexport const EntityReviewCommentsInitializeStateAction = 'EntityReviewCommentsInitializeStateAction';\nexport const createEntityReviewCommentsInitializeStateAction = actionCreator(EntityReviewCommentsInitializeStateAction);\nexport const EntityMarkedAsHelpfulReviewUpdateListAction = 'EntityMarkedAsHelpfulReviewUpdateListAction';\nexport const createEntityMarkedAsHelpfulReviewUpdateListAction = actionCreator(EntityMarkedAsHelpfulReviewUpdateListAction);\nexport const EntityUserCommentedReviewIdsUpdateListAction = 'EntityUserCommentedReviewIdsUpdateListAction';\nexport const createEntityUserCommentedReviewIdsUpdateListAction = actionCreator(EntityUserCommentedReviewIdsUpdateListAction);\nexport const EntityLinkedInProductGroupUpdateAction = 'EntityLinkedInProductGroupUpdateAction';\nexport const createEntityLinkedInProductGroupUpdateAction = actionCreator(EntityLinkedInProductGroupUpdateAction);\nexport const EntityReviewSetIsHelpfulLoadingAction = 'EntityReviewSetIsHelpfulLoadingAction';\nexport const createEntityReviewSetIsHelpfulLoadingAction = actionCreator(EntityReviewSetIsHelpfulLoadingAction);\nexport const EntityReviewSetIsHelpfulAction = 'EntityReviewSetIsHelpfulAction';\nexport const createEntityReviewSetIsHelpfulAction = actionCreator(EntityReviewSetIsHelpfulAction);\nexport const EntityReviewMarkAsHelpfulModalAction = 'EntityReviewMarkAsHelpfulModalAction';\nexport const createEntityReviewMarkAsHelpfulModalAction = actionCreator(EntityReviewMarkAsHelpfulModalAction);\nexport const EntityReviewSetMarkAsHelpfulCount = 'EntityReviewSetMarkAsHelpfulCount';\nexport const createEntityReviewSetMarkAsHelpfulCount = actionCreator(EntityReviewSetMarkAsHelpfulCount);\nexport const RelatedAppsItemsLoadingAction = 'RelatedAppsItemsLoadingAction';\nexport const createRelatedAppsItemsLoadingAction = actionCreator(RelatedAppsItemsLoadingAction);\nexport const GetAppReviewsAction = 'GetAppReviewsAction';\nexport const createGetAppReviewsAction = actionCreator(GetAppReviewsAction);\nexport const SetStorefrontNameAction = 'SetStorefrontNameAction';\nexport const createSetStorefrontNameAction = actionCreator(SetStorefrontNameAction);\nexport const RelatedAppsItemsReceivedAction = 'RelatedAppsItemsReceivedAction';\nexport const createRelatedAppsItemsReceivedAction = actionCreator(RelatedAppsItemsReceivedAction);\nexport const RelatedAppsItemsPricingDataReceivedAction = 'RelatedAppsItemsPricingDataReceivedAction';\nexport const createRelatedAppsItemsPricingDataReceivedAction = actionCreator(RelatedAppsItemsPricingDataReceivedAction);\nexport const RecommendedAppsItemsPricingDataReceivedAction = 'RecommendedAppsItemsPricingDataReceivedAction';\nexport const createRecommendedAppsItemsPricingDataReceivedAction = actionCreator(RecommendedAppsItemsPricingDataReceivedAction);\nexport const RecommendedWhatsNewAppsReceivedAction = 'RecommendedWhatsNewAppsReceivedAction';\nexport const createRecommendedWhatsNewAppsReceivedAction = actionCreator(RecommendedWhatsNewAppsReceivedAction);\nexport const RecommendedTrendingAppsReceivedAction = 'RecommendedTrendingAppsReceivedAction';\nexport const createRecommendedTrendingAppsReceivedAction = actionCreator(RecommendedTrendingAppsReceivedAction);\nexport const RecommendedWhatsNewServiceReceivedAction = 'RecommendedWhatsNewServiceReceivedAction';\nexport const createRecommendedWhatsNewServiceReceivedAction = actionCreator(RecommendedWhatsNewServiceReceivedAction);\nexport const RecommendedTrendingServiceReceivedAction = 'RecommendedTrendingServiceReceivedAction';\nexport const createRecommendedTrendingServiceReceivedAction = actionCreator(RecommendedTrendingServiceReceivedAction);\nexport const RecommendedMicrosoft365WhatsNewAppsReceivedAction = 'RecommendedMicrosoft365WhatsNewAppsReceivedAction';\nexport const createRecommendedMicrosoft365WhatsNewAppsReceivedAction = actionCreator(RecommendedMicrosoft365WhatsNewAppsReceivedAction);\nexport const RecommendedMicrosoft365TrendingAppsReceivedAction = 'RecommendedMicrosoft365TrendingAppsReceivedAction';\nexport const createRecommendedMicrosoft365TrendingAppsReceivedAction = actionCreator(RecommendedMicrosoft365TrendingAppsReceivedAction);\nexport const BillingRegionReadFromCookieAction = 'BillingRegionReadFromCookieAction';\nexport const createBillingRegionReadFromCookieAction = actionCreator(BillingRegionReadFromCookieAction);\nexport const AppDetailPricingReceivedAction = 'AppDetailPricingReceivedAction';\nexport const createAppDetailPricingReceivedAction = actionCreator(AppDetailPricingReceivedAction);\nexport const SearchQueryChangedAction = 'SearchQueryChangedAction';\nexport const createSearchQueryChangedAction = actionCreator(SearchQueryChangedAction);\nexport const SearchDataReceivedAction = 'SearchDataReceivedAction';\nexport const createSearchDataReceivedAction = actionCreator(SearchDataReceivedAction);\nexport const SearchSuggestionsRequestId = 'SearchSuggestionsRequestId';\nexport const setSuggestionsRequestId = actionCreator(SearchSuggestionsRequestId);\nexport const CuratedDataReceivedAction = 'CuratedDataReceivedAction';\nexport const createCuratedDataReceivedAction = actionCreator(CuratedDataReceivedAction);\nexport const DataMapReceivedAction = 'DataMapReceivedAction';\nexport const createDataMapReceivedAction = actionCreator(DataMapReceivedAction);\nexport const UserSignInAction = 'UserSignInAction';\nexport const createUserSignInAction = actionCreator(UserSignInAction);\nexport const UserSignInStatusAction = 'UserSignInStatusAction';\nexport const UserSignInFetchStatusAction = 'UserSignInFetchStatusAction';\nexport const UserSignInStatusDataAction = 'UserSignInStatusDataAction';\nexport const UserAccesstokensAction = 'UserAccesstokensAction';\nexport const UserLoginDetailsAction = 'UserLoginDetailsAction';\nexport const createUserSignInStatusAction = actionCreator(UserSignInStatusAction);\nexport const createUserSignInStatusDataAction = actionCreator(UserSignInStatusDataAction);\nexport const createUserSignInFetchStatusAction = actionCreator(UserSignInFetchStatusAction);\nexport const createUserAccesstokensAction = actionCreator(UserAccesstokensAction);\nexport const createUserLoginDetailsAction = actionCreator(UserLoginDetailsAction);\nexport const ABTestingEnableAction = 'ABTestingEnableAction';\nexport const createABTestingAction = actionCreator(ABTestingEnableAction);\nexport const EmbedUserSignInAction = 'EmbedUserSignInAction';\nexport const createEmbedUserSignInAction = actionCreator(EmbedUserSignInAction);\nexport const NpsAction = 'NpsAction';\nexport const createNpsAction = actionCreator(NpsAction);\nexport const UserReviewUpdateAction = 'UserReviewUpdateAction';\nexport const createUserReviewUpdatedAction = actionCreator(UserReviewUpdateAction);\nexport const EmbeddedAppSettingAction = 'EmbeddedAppSettingAction';\nexport const createEmbeddedAppSettingAction = actionCreator(EmbeddedAppSettingAction);\nexport const SetInitLoadingAction = 'SetInitLoadingAction';\nexport const createSetInitLoadingAction = actionCreator(SetInitLoadingAction);\nexport const NationalCloudSettingAction = 'NationalCloudSettingAction';\nexport const createNationalCloudSettingAction = actionCreator(NationalCloudSettingAction);\nexport const EmbeddedHostAction = 'EmbeddedHostAction';\nexport const createEmbeddedHostAction = actionCreator(EmbeddedHostAction);\nexport const LocStringsReceivedAction = 'LocStringsReceivedAction';\nexport const createLocStringsReceivedAction = actionCreator(LocStringsReceivedAction);\nexport const I18nextReceivedAction = 'I18nextReceivedAction';\nexport const createI18nextReceivedAction = actionCreator(I18nextReceivedAction);\nexport const FlightCodesReceivedAction = 'FlightCodesReceivedAction';\nexport const createFlightCodesReceivedAction = actionCreator(FlightCodesReceivedAction);\nexport const IncludeTestProductsReceivedAction = 'IncludeTestProductsReceivedAction';\nexport const createIncludeTestProductsReceivedAction = actionCreator(IncludeTestProductsReceivedAction);\nexport const IsConverged = 'IsConverged';\nexport const createIsConverged = actionCreator(IsConverged);\nexport const CorrelationIdReceivedAction = 'CorrelationIdReceivedAction';\nexport const createCorrelationIdAction = actionCreator(CorrelationIdReceivedAction);\nexport const RequestIdReceivedAction = 'RequestIdReceivedAction';\nexport const createRequestIdAction = actionCreator(RequestIdReceivedAction);\nexport const TelemetryLoggedAction = 'TelemetryLoggedAction';\nexport const createAppViewTelemetryLoggedAction = actionCreator(TelemetryLoggedAction);\nexport const AppsPricingDataReceivedAction = 'AppsPricingAction';\nexport const createAppsPricingDataReceivedAction = actionCreator(AppsPricingDataReceivedAction);\nexport const AppPricingDataReceivedAction = 'AppPricingAction';\nexport const createAppPricingDataReceivedAction = actionCreator(AppPricingDataReceivedAction);\nexport const AppPricingDataRequestedAction = 'AppPricingRequestedAction';\nexport const createAppPricingDataRequestedAction = actionCreator(AppPricingDataRequestedAction);\nexport const FeatureFlagsReceivedAction = 'FeatureFlagsReceivedAction';\nexport const createFeatureFlagsReceivedAction = actionCreator(FeatureFlagsReceivedAction);\nexport const AddSubscriptionsInTenant = 'AddSubscriptionsInTenant';\nexport const createAddSubscriptionsInTenant = actionCreator(AddSubscriptionsInTenant);\nexport const UpdateUserRoleDefinitions = 'UpdateUserRoleDefinitions';\nexport const createUpdateUserRoleDefinitions = actionCreator(UpdateUserRoleDefinitions);\nexport const UserSegmentInitializeAction = 'UserSegmentInitializeAction';\nexport const createUserSegmentInitializeAction = actionCreator(UserSegmentInitializeAction);\nexport const UserSignOutAction = 'UserSignOutAction';\nexport const createUserSignOutAction = actionCreator(UserSignOutAction);\nexport const UserFieldHubTypeAction = 'UserFieldHubTypeAction';\nexport const createUserFieldHubTypeAction = actionCreator(UserFieldHubTypeAction);\nexport const CountriesDataReceivedAction = 'CountriesDataReceivedAction';\nexport const createServicesCountriesDataReceivedAction = actionCreator(CountriesDataReceivedAction);\nexport const SetEntityDataRegionFiltersAction = 'SetEntityDataRegionFiltersAction';\nexport const createSetEntityDataRegionFiltersAction = actionCreator(SetEntityDataRegionFiltersAction);\nexport const GlobalSettingsReceivedAction = 'GlobalSettingsReceivedAction';\nexport const createGlobalSettingsReceivedAction = actionCreator(GlobalSettingsReceivedAction);\nexport const IsMobileReceivedAction = 'IsMobileReceivedAction';\nexport const createIsMobileReceivedAction = actionCreator(IsMobileReceivedAction);\nexport const DynamicCampaignReceivedAction = 'CampaignReceivedAction';\nexport const createDynamicCampaignReceivedAction = actionCreator(DynamicCampaignReceivedAction);\nexport const CheckoutConfigAction = 'CheckoutConfigAction';\nexport const createCheckoutConfigAction = actionCreator(CheckoutConfigAction);\nexport const SetTenantTypeAction = 'SetTenantTypeAction';\nexport const createSetTenantTypeAction = actionCreator(SetTenantTypeAction);\nexport const UserOrdersAction = 'UserOrdersAction';\nexport const createUserOrdersAction = actionCreator(UserOrdersAction);\nexport const SetUserOrdersLoadingAction = 'SetUserOrdersLoadingAction';\nexport const createSetUserOrdersLoadingAction = actionCreator(SetUserOrdersLoadingAction);\nexport const IsManageModalOpenAction = 'IsManageModalOpenAction';\nexport const createIsManageModalOpenAction = actionCreator(IsManageModalOpenAction);\nexport const SetWCPConsentAction = 'SetWCPConsentAction';\nexport const createSetWCPConsentAction = actionCreator(SetWCPConsentAction);\nexport const SetIsConsentRequired = 'SetIsConsentRequired';\nexport const createSetIsConsentRequiredAction = actionCreator(SetIsConsentRequired);\nexport const LoadFavouriteDataStateAction = 'LoadFavouriteDataStateAction';\nexport const createLoadFavouriteDataStateAction = actionCreator(LoadFavouriteDataStateAction);\nexport const UserPrivateOffersAction = 'UserPrivateOffersAction';\nexport const createUserPrivateOffersAction = actionCreator(UserPrivateOffersAction);\nexport const ToggleShowContextPanel = 'ToggleShowContextPanel';\nexport const createToggleShowContextPanel = actionCreator(ToggleShowContextPanel);\nexport const SetUserPrivateOffersLoadingAction = 'SetPrivateOffersLoadingAction';\nexport const createSetUserPrivateOffersLoadingAction = actionCreator(SetUserPrivateOffersLoadingAction);\nexport const SetAccessTokenAction = 'SetAccessTokenAction';\nexport const createSetAccessTokenAction = actionCreator(SetAccessTokenAction);\nexport const ChangeLocaleLanguage = 'ChangeLocaleLanguage';\nexport const createChangeLocaleLanguage = actionCreator(ChangeLocaleLanguage);\nexport const SetIsDisabledBilling = 'createIsDisabledBilling';\nexport const createSetIsDisabledBilling = actionCreator(SetIsDisabledBilling);\nexport const LoadingRecommenededSizes = 'LoadingRecommenededSizes';\nexport const createLoadingRecommenededSizes = actionCreator(LoadingRecommenededSizes);\nexport const SetRecommenededSizes = 'SetRecommenededSizes';\nexport const createSetRecommenededSizes = actionCreator(SetRecommenededSizes);\n","import { actionCreator } from './../actions/actions';\n// todo: type the any payloads\nexport const SetReceiptAction = 'SetReceiptAction';\nexport const createSetReceiptAction = actionCreator(SetReceiptAction);\nexport const SetBillingAddressAction = 'SetBillingAddressAction';\nexport const createSetBillingAddressAction = actionCreator(SetBillingAddressAction);\nexport const SetCheckoutId = 'SetCheckoutId';\nexport const createSetCheckoutId = actionCreator(SetCheckoutId);\nexport const SetActiveStep = 'SetActiveStep';\nexport const createSetActiveStep = actionCreator(SetActiveStep);\nexport const SetProduct = 'setProduct';\nexport const createProduct = actionCreator(SetProduct);\nexport const SetBillingTerm = 'SetBillingTerm';\nexport const createSetBillingTerm = actionCreator(SetBillingTerm);\nexport const SetTermId = 'SetTermId';\nexport const createSetTermId = actionCreator(SetTermId);\nexport const SetSeatNumber = 'SetSeatNumber';\nexport const createSetSeatNumber = actionCreator(SetSeatNumber);\nexport const SetRecurringBilling = 'SetRecurringBilling';\nexport const createSetRecurringBilling = actionCreator(SetRecurringBilling);\nexport const SetItemInCartAction = 'SetItemInCartAction';\nexport const createSetItemInCartAction = actionCreator(SetItemInCartAction);\nexport const SetCheckoutSource = 'SetCheckoutSource';\nexport const createSetCheckoutSource = actionCreator(SetCheckoutSource);\nexport const UpdateCustomerAction = 'UpdateCustomerAction';\nexport const createUpdateCustomerAction = actionCreator(UpdateCustomerAction);\nexport const SetCustomersAction = 'SetCustomersAction';\nexport const createSetCustomersAction = actionCreator(SetCustomersAction);\nexport const SetActiveCustomerAction = 'SetActiveCustomerAction';\nexport const createSetActiveCustomerAction = actionCreator(SetActiveCustomerAction);\nexport const SetPublisherTokenResponse = 'SetPublisherTokenResponse';\nexport const createSetPublisherTokenResponse = actionCreator(SetPublisherTokenResponse);\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport const ClearCheckoutState = 'ClearCheckoutState';\nexport const createClearCheckoutState = actionCreator(ClearCheckoutState);\nexport const ClearErrorAction = 'ClearErrorAction';\nexport const createClearErrorAction = actionCreator(ClearErrorAction);\nexport const ErrorAction = 'ErrorAction';\nexport const createErrorAction = actionCreator(ErrorAction);\nexport const FetchingProductAction = 'FetchingProductAction';\nexport const createFetchingProductAction = actionCreator(FetchingProductAction);\n","import { actionCreator } from './../actions/actions';\nexport const SetFilterLocationAction = 'SetFilterLocationAction';\nexport const createSetFilterLocationAction = actionCreator(SetFilterLocationAction);\nexport const SetContactDetailsAction = 'SetContactDetailsAction';\nexport const createSetContactDetailsAction = actionCreator(SetContactDetailsAction);\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport { createSetUserPrivateOffersLoadingAction, createUserPrivateOffersAction } from './actions';\nimport * as armRestClient from '@shared/services/http/armRestClient';\nimport { Constants } from '../utils/constants';\nimport { stringifyError } from '@shared/utils/errorUtils';\nimport { telemtry } from './thunkActions';\nexport function ensurePrivateOffer(id, billingRegion, getState) {\n return _ensurePrivateOffer.apply(this, arguments);\n}\nfunction _ensurePrivateOffer() {\n _ensurePrivateOffer = _async_to_generator(function*(id, billingRegion, getState) {\n const { isMSAUser, privateOffers } = getState().users;\n if (isMSAUser) {\n return null;\n }\n const offer = privateOffers.dataList.find(({ entityId })=>entityId === id);\n telemtry(Constants.Telemetry.Action.GetPrivateOffer, 'checking for spesific private offer', {\n id\n });\n if ((offer === null || offer === void 0 ? void 0 : offer.pricingInformation.billingRegion) === billingRegion) {\n return offer;\n } else {\n return armRestClient.getUserPrivateApp(id, billingRegion);\n }\n });\n return _ensurePrivateOffer.apply(this, arguments);\n}\nexport function getUserPrivateOffers() {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const { config: { isEmbedded, billingCountryCode: billingRegion }, users: { isMSAUser, signedIn, tid } } = getState();\n if (!signedIn || isEmbedded || isMSAUser) {\n dispatch(createSetUserPrivateOffersLoadingAction(false));\n return null;\n }\n const action = Constants.Telemetry.Action.GetPrivateOffers;\n const start = Date.now();\n telemtry(action, Constants.Telemetry.ActionModifier.Start, {\n tid,\n billingRegion\n });\n try {\n dispatch(createSetUserPrivateOffersLoadingAction(true));\n const privateOffersResponse = yield armRestClient.getUserPrivateApps(billingRegion);\n dispatch(createUserPrivateOffersAction({\n apps: privateOffersResponse,\n billingRegion\n }));\n dispatch(createSetUserPrivateOffersLoadingAction(false));\n telemtry(action, Constants.Telemetry.ActionModifier.End, {\n tid,\n duration: Date.now() - start\n });\n return null;\n } catch (error) {\n dispatch(createSetUserPrivateOffersLoadingAction(false));\n telemtry(action, Constants.Telemetry.ActionModifier.Error, {\n tid,\n duration: Date.now() - start,\n error: stringifyError(error)\n });\n return null;\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\n","export var BillingAccountType = /*#__PURE__*/ function(BillingAccountType) {\n BillingAccountType[\"Enterprise\"] = \"Enterprise\";\n BillingAccountType[\"Individual\"] = \"Individual\";\n BillingAccountType[\"Partner\"] = \"Partner\";\n return BillingAccountType;\n}({});\nexport var BillingAgreementType = /*#__PURE__*/ function(BillingAgreementType) {\n BillingAgreementType[\"MicrosoftCustomerAgreement\"] = \"MicrosoftCustomerAgreement\";\n BillingAgreementType[\"EnterpriseAgreement\"] = \"EnterpriseAgreement\";\n BillingAgreementType[\"MicrosoftOnlineServicesProgram\"] = \"MicrosoftOnlineServicesProgram\";\n BillingAgreementType[\"MicrosoftPartnerAgreement\"] = \"MicrosoftPartnerAgreement\";\n return BillingAgreementType;\n}({});\nexport var EnrollmentChannelType = /*#__PURE__*/ function(EnrollmentChannelType) {\n EnrollmentChannelType[\"EaDirect\"] = \"EaDirect\";\n EnrollmentChannelType[\"EaIndirect\"] = \"EaIndirect\";\n return EnrollmentChannelType;\n}({});\n","import { Constants } from '@shared/utils/constants';\nimport { DataMap } from '@shared/utils/dataMapping';\nimport deepCopy from 'deepcopy';\nimport { logger } from '@src/logger';\nimport sha256 from 'crypto-js/sha256';\nconst getLeadSourceAndSubSource = (isEmbedded, embedHost)=>{\n let leadSource = Constants.LeadSource.SPZA;\n let leadSubSource;\n if (isEmbedded) {\n if (embedHost === DataMap.products.Dynamics365forSales.UrlKey) {\n leadSource = Constants.LeadSource.D365Sales;\n } else if (embedHost === DataMap.products.Dynamics365forBusinessCentral.UrlKey) {\n leadSource = Constants.LeadSource.D365BusinessCentral;\n } else if (embedHost === DataMap.products.AdminPortal.UrlKey) {\n leadSource = Constants.LeadSource.Office;\n leadSubSource = Constants.LeadSubSource.Admin;\n } else if (embedHost === DataMap.products.PowerBI.UrlKey) {\n leadSource = Constants.LeadSource.PowerBI;\n }\n }\n return {\n leadSource,\n leadSubSource\n };\n};\nexport function createLeadPayload({ entityId, privateApp, ctaType, actionCode, campaigns, customerInfo, notes, uniquePlanId, isEmbedded, embedHost }) {\n const { leadSource, leadSubSource } = getLeadSourceAndSubSource(isEmbedded, embedHost);\n const leadPayload = {\n uniqueProductId: entityId !== null && entityId !== void 0 ? entityId : '',\n uniquePlanId,\n callToAction: ctaType ? Constants.ActionStrings[Constants.CTAType[`${ctaType}`]] : undefined,\n actionCode: actionCode !== null && actionCode !== void 0 ? actionCode : undefined,\n category: privateApp ? Constants.LeadCategory.Private : Constants.LeadCategory.Public,\n notes,\n customerInfo,\n leadSource,\n leadSubSource\n };\n if (campaigns) {\n leadPayload.campaigns = campaigns;\n }\n return leadPayload;\n}\nfunction generateHashCode(input) {\n if (!input) {\n return input;\n }\n const hashBytes = sha256(input).toString().toUpperCase();\n const hashCode = hashBytes.replace('-', '');\n return hashCode.substring(0, 8);\n}\nfunction scrubPiiField(piiField = '') {\n return (piiField === null || piiField === void 0 ? void 0 : piiField.length) ? `length: ${piiField.length}, Hash: ${generateHashCode(piiField)}` : piiField;\n}\nfunction scrubPii(user) {\n Constants.PIIFields.forEach((piiField)=>{\n if (user[`${piiField}`]) {\n user[`${piiField}`] = scrubPiiField(user[`${piiField}`]);\n }\n });\n}\nexport function scrubLeadPayload(payload) {\n try {\n const payloadCopy = deepCopy(payload);\n if (payloadCopy.customerInfo) {\n scrubPii(payloadCopy.customerInfo);\n }\n payloadCopy.notes = scrubPiiField(payloadCopy.notes);\n return payloadCopy;\n } catch (error) {\n logger.error(`Failed to scrubLeadPayload with error ${error.error.message}`);\n return {};\n }\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport * as httpProtocol from '@shared/services/http/httpProtocol';\nimport { Constants } from '@shared/utils/constants';\nimport { getAppConfig } from '@shared/services/init/appConfig';\nimport { logError } from '@shared/utils/httpClientUtil';\nimport { marketplaceLeadsApiVersion } from '@shared/specifics';\nconst marketplaceLeadsTimeoutInMs = 30000;\nexport function sendLead(payload, options) {\n return _sendLead.apply(this, arguments);\n}\nfunction _sendLead() {\n _sendLead = _async_to_generator(function*(payload, options) {\n try {\n const { requestId } = options || {};\n const endpoint = `${getAppConfig('marketplaceLeadsHost')}/api/leads`;\n const httpOptions = {\n requireCorrelationId: true,\n stringifyPostData: false,\n allowOrigin: true,\n authenticationType: httpProtocol.AuthenticationTypes.MarketplaceLeads,\n setBearerHeader: true,\n contentType: 'application/json',\n requestId,\n timeout: marketplaceLeadsTimeoutInMs\n };\n const post = httpProtocol.post(endpoint, httpOptions);\n return post.addQueryEntry(Constants.QueryStrings.apiVersion, marketplaceLeadsApiVersion).setData(payload).request();\n } catch (error) {\n logError('sendLead', error);\n throw error;\n }\n });\n return _sendLead.apply(this, arguments);\n}\n","import * as httpProtocol from './httpProtocol';\nimport { logError } from '@shared/utils/httpClientUtil';\nimport { getAppConfig } from '@shared/services/init/appConfig';\nimport { Constants } from '@shared/utils/constants';\nconst option = {\n requireCorrelationId: true,\n stringifyPostData: false,\n authenticationType: httpProtocol.AuthenticationTypes.Spza\n};\nexport function post(authMethod, authKey, review) {\n const endpoint = '/api/userreview';\n if (authMethod === 'accessKey') {\n option.authenticationType = httpProtocol.AuthenticationTypes.Unauthenticated;\n } else {\n option.authenticationType = httpProtocol.AuthenticationTypes.Spza;\n }\n const post = httpProtocol.post(endpoint, option);\n if (option.authenticationType === httpProtocol.AuthenticationTypes.Unauthenticated) {\n post.setHeader(authMethod, authKey);\n }\n return post.setData(review).request().catch((error)=>{\n logError('reviewRestClient.post', error);\n return Promise.reject(error);\n });\n}\nexport function get(authMethod, authKey, appId) {\n if (!appId || appId === '*') {\n appId = '';\n }\n const endpoint = '/api/userreview/' + appId;\n if (authMethod === 'accessKey') {\n option.authenticationType = httpProtocol.AuthenticationTypes.Unauthenticated;\n } else {\n option.authenticationType = httpProtocol.AuthenticationTypes.Spza;\n }\n const get = httpProtocol.get(endpoint, option);\n if (option.authenticationType === httpProtocol.AuthenticationTypes.Unauthenticated) {\n get.setHeader(authMethod, authKey);\n }\n return get.request().catch((error)=>{\n logError('reviewRestClient.get', error);\n return Promise.reject(error);\n });\n}\nexport function del(authMethod, authKey, appId, review) {\n const endpoint = '/api/userreview/' + appId;\n if (!appId) {\n logError('reviewRestClient.del', 'missing appId');\n return null;\n }\n if (authMethod === 'accessKey') {\n option.authenticationType = httpProtocol.AuthenticationTypes.Unauthenticated;\n } else {\n option.authenticationType = httpProtocol.AuthenticationTypes.Spza;\n }\n const del = httpProtocol.del(endpoint, option);\n del.option.parseResult = false;\n if (option.authenticationType === httpProtocol.AuthenticationTypes.Unauthenticated) {\n del.setHeader(authMethod, authKey);\n }\n return del.setData(review).request().catch((error)=>{\n logError('reviewRestClient.del', error);\n return Promise.reject(error);\n });\n}\nexport function getPurchaseStatus(appId) {\n if (!appId) {\n return Promise.reject(new Error('AppId is required. Operation: reviewRestClient.getPurchaseStatus'));\n }\n const endpoint = '/view/app/' + appId + '/purchase';\n option.authenticationType = httpProtocol.AuthenticationTypes.Spza;\n const get = httpProtocol.get(endpoint, option);\n get.addQueryEntry(Constants.QueryStrings.ApplicationId, appId);\n return get.addQueryEntry(Constants.QueryStrings.version, getAppConfig(Constants.apiVersion)).request().catch((error)=>{\n logError('reviewRestClient.getPurchaseStatus', error);\n return Promise.resolve(false);\n });\n}\n","import * as httpProtocol from './httpProtocol';\nimport { logError } from '../../utils/httpClientUtil';\nimport { getAppConfig } from '../../services/init/appConfig';\nconst option = {\n requireCorrelationId: true,\n stringifyPostData: false,\n parseResult: false,\n authenticationType: httpProtocol.AuthenticationTypes.Graph\n};\nexport function generateReportEmbedToken(reportData) {\n const endpoint = '/view/generateReportEmbedToken';\n const post = httpProtocol.post(endpoint, option);\n const body = {\n groupId: reportData.groupId,\n reportId: reportData.reportId,\n datasetId: reportData.datasetId\n };\n return post.addQueryEntry('version', getAppConfig('apiVersion')).setData(body).request().catch((error)=>{\n logError('generateReportEmbedToken', error);\n return Promise.resolve(null);\n });\n}\n","import * as httpProtocol from './httpProtocol';\nimport { logError } from '../../utils/httpClientUtil';\nimport { getAppConfig } from '../../services/init/appConfig';\nconst option = {\n requireCorrelationId: true,\n stringifyPostData: false,\n authenticationType: httpProtocol.AuthenticationTypes.Unauthenticated,\n contentType: 'text/html'\n};\nexport function getDynamicCampaign(request) {\n const campaignId = request.params.id;\n const publisher = request.params.publisher;\n const isPreview = request.query.preview === 'true';\n const endpoint = `/view/campaigns/${publisher}/${campaignId}`;\n const get = httpProtocol.get(endpoint, option);\n if (isPreview) get.addQueryEntry('preview', request.query.preview);\n return get.addQueryEntry('version', getAppConfig('apiVersion')).request().catch((error)=>{\n logError('getDynamicCampaign', error);\n return Promise.reject(error);\n });\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport * as httpProtocol from './httpProtocol';\nimport { logError } from '@shared/utils/httpClientUtil';\nimport { getAppConfig } from '@shared/services/init/appConfig';\nconst option = {\n requireCorrelationId: true,\n authenticationType: httpProtocol.AuthenticationTypes.Spza,\n retry: 3\n};\n/**\n * Returns customer object with address and other customer information.\n *\n * @export\n * @returns {Promise<ICustomer[]>}\n */ export function getCustomers() {\n return _getCustomers.apply(this, arguments);\n}\nfunction _getCustomers() {\n _getCustomers = _async_to_generator(function*() {\n const endpoint = '/view/customers';\n return httpProtocol.get(endpoint, option).request().catch((error)=>{\n logError('purchaseRestClient.getCustomersMPAPI', error);\n return Promise.reject(error);\n });\n });\n return _getCustomers.apply(this, arguments);\n}\n/**\n * Creates a new object with the data that's passed in.\n *\n * @export\n * @param {ICustomer} customerRequest\n * @returns\n */ export function createCustomer(customer) {\n const endpoint = '/view/customer';\n const post = httpProtocol.post(endpoint, option);\n return post.setData(customer).request().catch((error)=>{\n logError('purchaseRestClient.createCustomer', error);\n return Promise.reject(error);\n });\n}\n/**\n * Updates the customer address with the data that's passed in.\n *\n * @export\n * @param {ICustomer} customerRequest\n * @returns\n */ export function updateCustomer(address) {\n const endpoint = '/view/address';\n const post = httpProtocol.post(endpoint, option);\n return post.addQueryEntry('version', getAppConfig('apiVersion')).setData(address).request().catch((error)=>{\n logError('purchaseRestClient.updateCustomer', error);\n return Promise.reject(error);\n });\n}\n/**\n * Gets publisher offer details for the subscription\n *\n * @export\n * @param {subscriptionId} request\n * @returns\n */ export function getPublisherOfferInfo(subscriptionId) {\n const endpoint = '/view/publisherOfferInfo';\n const post = httpProtocol.post(endpoint, option);\n return post.addQueryEntry('version', getAppConfig('apiVersion')).setData({\n subscriptionId: subscriptionId\n }).request().catch((error)=>{\n logError('purchaseRestClient.publisherOfferInfo', error);\n return Promise.reject(error);\n });\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport { AuthenticationTypes } from '@shared/services/http/httpProtocol';\nimport { Constants } from '@shared/utils/constants';\nimport { logger } from '@src/logger';\nimport { logError } from '@shared/utils/httpClientUtil';\nimport * as httpProtocol from './httpProtocol';\nconst commerceHttpOptions = {\n requireCorrelationId: true,\n stringifyPostData: false,\n allowOrigin: true,\n authenticationType: AuthenticationTypes.CommerceApi,\n setBearerHeader: true,\n returnRawResponse: true\n};\n/**\n * PreWarm an account\n * @param Object containing named parameters for the call\n * @returns Promise with the response, containing a list of comments for the given review\n */ export function preWarmAccount(_) {\n return _preWarmAccount.apply(this, arguments);\n}\nfunction _preWarmAccount() {\n _preWarmAccount = _async_to_generator(function*({ addTestHeader, commerceApiHost }) {\n try {\n const endpoint = `${commerceApiHost}/v1/my-org/purchaseService.PreloadData`;\n const post = httpProtocol.post(endpoint, commerceHttpOptions);\n const headers = addTestHeader ? {\n 'x-ms-test': 'test'\n } : {};\n post.addHeader(headers);\n return yield post.request();\n } catch (error) {\n logError('preWarmingCommerceAPIAJAX', error);\n logger.error('preWarmingCommerceAPIAJAX', {\n action: Constants.Telemetry.Action.PreWarmAJAX,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n error\n });\n return Promise.resolve(error);\n }\n });\n return _preWarmAccount.apply(this, arguments);\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport { Constants } from '@shared/utils/constants';\nimport { get, post, patch, del, AuthenticationTypes } from '@shared/services/http/httpProtocol';\nimport { mapEnrichReviewCommentToIAppReviewComment } from '@shared/utils/reviewsUtils';\nconst commonHttpOptions = {\n requireCorrelationId: true,\n stringifyPostData: false,\n authenticationType: AuthenticationTypes.Spza,\n setBearerHeader: true\n};\nexport const ReviewCommentsQueryStrings = {\n OfferId: 'offerId',\n ApiVersion: 'api-version',\n PageNumber: 'PageNum',\n PageSize: 'PageSize',\n Sorting: 'Sorting'\n};\n/**\n * Creates a review comment\n * @param Object containing named parameters for the call\n * @returns Promise with the response, both for success and failure. in case of success, will contain the created comment\n */ export function createReviewComment(_) {\n return _createReviewComment.apply(this, arguments);\n}\nfunction _createReviewComment() {\n _createReviewComment = _async_to_generator(function*({ commentContent, offerId, reviewId, reviewsAPI, reviewsAPIVersion, source }) {\n try {\n const reviewComment = yield post(`${reviewsAPI}/${reviewId}/comments/`, commonHttpOptions).addQueryEntry(ReviewCommentsQueryStrings.ApiVersion, reviewsAPIVersion).addQueryEntry(ReviewCommentsQueryStrings.OfferId, offerId).setData({\n content: commentContent.trim(),\n source\n }).request();\n return {\n reviewComment: mapEnrichReviewCommentToIAppReviewComment(reviewComment)\n };\n } catch (error) {\n var _error_response;\n return {\n error: ((_error_response = error.response) === null || _error_response === void 0 ? void 0 : _error_response.text) || error\n };\n }\n });\n return _createReviewComment.apply(this, arguments);\n}\n/**\n * Get a review's comment list\n * @param Object containing named parameters for the call\n * @returns Promise with the response, containing a list of comments for the given review\n */ export function getAppReviewComments(_) {\n return _getAppReviewComments.apply(this, arguments);\n}\nfunction _getAppReviewComments() {\n _getAppReviewComments = _async_to_generator(function*({ offerId, reviewId, page, itemsPerPage = Constants.Reviews.CommentsPerPage, reviewsAPI, reviewsAPIVersion }) {\n try {\n const { comments, pagination_info: paginationInfo, total_comments: totalComments } = yield get(`${reviewsAPI}/${reviewId}/comments/`, commonHttpOptions).addQueryEntry(ReviewCommentsQueryStrings.ApiVersion, reviewsAPIVersion).addQueryEntry(ReviewCommentsQueryStrings.OfferId, offerId).addQueryEntry(ReviewCommentsQueryStrings.PageNumber, page.toString()).addQueryEntry(ReviewCommentsQueryStrings.PageSize, itemsPerPage.toString()).addQueryEntry(ReviewCommentsQueryStrings.Sorting, 'asc').request();\n return {\n comments: comments.map((c)=>mapEnrichReviewCommentToIAppReviewComment(c)),\n paginationInfo: {\n pageNumber: paginationInfo.page_number,\n pageSize: paginationInfo.page_size\n },\n totalComments\n };\n } catch (error) {\n return {\n error,\n comments: [],\n totalComments: 0,\n paginationInfo: {\n pageNumber: 0,\n pageSize: 0\n }\n };\n }\n });\n return _getAppReviewComments.apply(this, arguments);\n}\n/**\n * Updates a review comment's content\n * @param Object containing named parameters for the call\n * @returns Promise with the response, both for success and failure. in case of success, will contain the modified comment\n */ export function updateReviewComment(_) {\n return _updateReviewComment.apply(this, arguments);\n}\nfunction _updateReviewComment() {\n _updateReviewComment = _async_to_generator(function*({ commentId, commentContent, offerId, reviewId, reviewsAPI, reviewsAPIVersion }) {\n try {\n const reviewComment = yield patch(`${reviewsAPI}/${reviewId}/comments/${commentId}`, commonHttpOptions).addQueryEntry(ReviewCommentsQueryStrings.ApiVersion, reviewsAPIVersion).addQueryEntry(ReviewCommentsQueryStrings.OfferId, offerId).setData({\n content: commentContent.trim()\n }).request();\n return {\n reviewComment: mapEnrichReviewCommentToIAppReviewComment(reviewComment)\n };\n } catch (error) {\n return {\n error\n };\n }\n });\n return _updateReviewComment.apply(this, arguments);\n}\n/**\n * Deletes a review comment (this is a soft deletion, meaning that the comment will still be in the database and will show in the list as deleted)\n * @param Object containing named parameters for the call\n * @returns Promise with the response, both for success and failure. in case of success, will contain the comment after the deletion\n */ export function deleteReviewComment(_) {\n return _deleteReviewComment.apply(this, arguments);\n}\nfunction _deleteReviewComment() {\n _deleteReviewComment = _async_to_generator(function*({ commentId, offerId, reviewId, reviewsAPI, reviewsAPIVersion }) {\n try {\n const reviewComment = yield del(`${reviewsAPI}/${reviewId}/comments/${commentId}`, commonHttpOptions).addQueryEntry(ReviewCommentsQueryStrings.ApiVersion, reviewsAPIVersion).addQueryEntry(ReviewCommentsQueryStrings.OfferId, offerId).request();\n return {\n reviewComment: mapEnrichReviewCommentToIAppReviewComment(reviewComment)\n };\n } catch (error) {\n return {\n error\n };\n }\n });\n return _deleteReviewComment.apply(this, arguments);\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport { get, post, AuthenticationTypes } from '@shared/services/http/httpProtocol';\nconst commonHttpOptions = {\n requireCorrelationId: true,\n stringifyPostData: false,\n authenticationType: AuthenticationTypes.Spza,\n setBearerHeader: true\n};\nexport const ReviewCommentsQueryStrings = {\n OfferId: 'offerId',\n ApiVersion: 'api-version'\n};\n/**\n * Toggles marked as helpful for a given review\n * @param Object containing named parameters for the call\n * @returns Promise with the response, both for success and failure\n */ export function setReviewMarkedAsHelpful(_) {\n return _setReviewMarkedAsHelpful.apply(this, arguments);\n}\nfunction _setReviewMarkedAsHelpful() {\n _setReviewMarkedAsHelpful = _async_to_generator(function*({ offerId, reviewId, reviewsAPI, reviewsAPIVersion, isHelpful, source }) {\n try {\n const result = yield post(`${reviewsAPI}/${reviewId}/helpful`, commonHttpOptions).addQueryEntry(ReviewCommentsQueryStrings.ApiVersion, reviewsAPIVersion).addQueryEntry(ReviewCommentsQueryStrings.OfferId, offerId).setData({\n is_helpful: isHelpful,\n source\n }).request();\n return {\n result\n };\n } catch (error) {\n var _error_response;\n return {\n error: ((_error_response = error.response) === null || _error_response === void 0 ? void 0 : _error_response.text) || error\n };\n }\n });\n return _setReviewMarkedAsHelpful.apply(this, arguments);\n}\n/**\n * Get a list of review ids which the current user marked as helpful for a given offer\n * @param Object containing named parameters for the call\n * @returns Promise with the response, containing a list of comments for the given review\n */ export function getUserReviewsMarkedAsHelpful(_) {\n return _getUserReviewsMarkedAsHelpful.apply(this, arguments);\n}\nfunction _getUserReviewsMarkedAsHelpful() {\n _getUserReviewsMarkedAsHelpful = _async_to_generator(function*({ offerId, reviewsAPI, reviewsAPIVersion }) {\n try {\n const reviewIds = yield get(`${reviewsAPI}/helpful`, commonHttpOptions).addQueryEntry(ReviewCommentsQueryStrings.ApiVersion, reviewsAPIVersion).addQueryEntry(ReviewCommentsQueryStrings.OfferId, offerId).request();\n return {\n reviewIds\n };\n } catch (error) {\n return {\n error,\n reviewIds: []\n };\n }\n });\n return _getUserReviewsMarkedAsHelpful.apply(this, arguments);\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport { Constants } from '@shared/utils/constants';\nimport { get, AuthenticationTypes } from '@shared/services/http/httpProtocol';\nconst commonHttpOptions = {\n requireCorrelationId: true,\n stringifyPostData: false,\n authenticationType: AuthenticationTypes.Spza,\n setBearerHeader: true,\n timeout: 120000\n};\nexport const ReviewsQueryStrings = {\n OfferId: 'offer_id',\n ApiVersion: 'api-version',\n Source: 'source',\n UserId: 'user_id',\n From: 'from'\n};\nexport function getReviewsByOfferId({ offerId, reviewsAPI, reviewsAPIVersion, correlationId, requestId, userId }) {\n const req = get(`${reviewsAPI}`, commonHttpOptions);\n if (userId) {\n req.addQueryEntry(ReviewsQueryStrings.UserId, userId);\n }\n return req.addQueryEntry(ReviewsQueryStrings.ApiVersion, reviewsAPIVersion).addQueryEntry(ReviewsQueryStrings.OfferId, offerId).setHeader(Constants.Headers.RequestId, requestId).setHeader(Constants.Headers.CorrelationId, correlationId).request();\n}\nexport function getUserReviewByOfferId({ token, offerId, source, correlationId, requestId, reviewsAPI, reviewsAPIVersion }) {\n const req = get(`${reviewsAPI}/private/user`, commonHttpOptions);\n req.setQuery({\n source\n });\n return req.addQueryEntry(ReviewsQueryStrings.ApiVersion, reviewsAPIVersion).addQueryEntry(ReviewsQueryStrings.OfferId, offerId).setHeader(Constants.Headers.RequestId, requestId).setHeader(Constants.Headers.CorrelationId, correlationId).setAuthHeader(token).request();\n}\nexport function getReviewsMetadata(_) {\n return _getReviewsMetadata.apply(this, arguments);\n}\nfunction _getReviewsMetadata() {\n _getReviewsMetadata = _async_to_generator(function*({ reviewsAPI, reviewsAPIVersion, legacyId }) {\n return yield get(`${reviewsAPI}/private/metadata`, commonHttpOptions).addQueryEntry(ReviewsQueryStrings.ApiVersion, reviewsAPIVersion).addQueryEntry(ReviewsQueryStrings.OfferId, legacyId).request();\n });\n return _getReviewsMetadata.apply(this, arguments);\n}\n/**\n * @deprecated - This API is deprecated and should not be used, this is currently in use in order to retain legacy behaviour.\n */ export function getAllReviewsByTimestamp(_) {\n return _getAllReviewsByTimestamp.apply(this, arguments);\n}\nfunction _getAllReviewsByTimestamp() {\n _getAllReviewsByTimestamp = _async_to_generator(function*({ reviewsAPI, reviewsAPIVersion, timestamp, correlationId, requestId, source }) {\n return get(`${reviewsAPI}/deprecated`, commonHttpOptions).setQuery({\n source\n }).setHeader(Constants.Headers.RequestId, requestId).setHeader(Constants.Headers.CorrelationId, correlationId).addQueryEntry(ReviewsQueryStrings.ApiVersion, reviewsAPIVersion).addQueryEntry(ReviewsQueryStrings.From, new Date(timestamp * 1000).toJSON()).request();\n });\n return _getAllReviewsByTimestamp.apply(this, arguments);\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport { get, AuthenticationTypes } from '@shared/services/http/httpProtocol';\nconst commonHttpOptions = {\n requireCorrelationId: true,\n stringifyPostData: false,\n authenticationType: AuthenticationTypes.Spza,\n setBearerHeader: true\n};\nexport const LinkedInQueryStrings = {\n LegacyOfferId: 'offer_id',\n ApiVersion: 'api-version'\n};\n/**\n * Get Linkedin product group information.\n * @param legacyOfferId legacy offer identifier.\n * @param linkedInAPI Linkedin API route.\n * @param legacyOfferId Linkedin API version.\n * @returns Promise with the response, containing Linkedin product group information or null if information doesn't exist.\n */ export function getLinkedInProductgroupInfo(_) {\n return _getLinkedInProductgroupInfo.apply(this, arguments);\n}\nfunction _getLinkedInProductgroupInfo() {\n _getLinkedInProductgroupInfo = _async_to_generator(function*({ legacyOfferId, linkedinAPI, linkedinAPIVersion }) {\n const linkedInProductGroup = yield get(`${linkedinAPI}/product_groups`, commonHttpOptions).addQueryEntry(LinkedInQueryStrings.ApiVersion, linkedinAPIVersion).addQueryEntry(LinkedInQueryStrings.LegacyOfferId, legacyOfferId).request();\n return {\n linkedInProductGroup\n };\n });\n return _getLinkedInProductgroupInfo.apply(this, arguments);\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport { post, AuthenticationTypes } from '@shared/services/http/httpProtocol';\nconst commonHttpOptions = {\n requireCorrelationId: true,\n stringifyPostData: false,\n authenticationType: AuthenticationTypes.Spza,\n setBearerHeader: true\n};\nexport const ReportReviewQueryStrings = {\n ApiVersion: 'api-version'\n};\nexport function createReportReview(_) {\n return _createReportReview.apply(this, arguments);\n}\nfunction _createReportReview() {\n _createReportReview = _async_to_generator(function*({ itemReport, communityAPI, communityAPIVersion }) {\n try {\n yield post(`${communityAPI}/report`, commonHttpOptions).addQueryEntry(ReportReviewQueryStrings.ApiVersion, communityAPIVersion).setData(itemReport).request();\n return true;\n } catch (error) {\n return false;\n }\n });\n return _createReportReview.apply(this, arguments);\n}\n","import * as httpProtocol from './httpProtocol';\nimport { getAppConfig } from '@shared/services/init/appConfig';\nimport { logError } from '@shared/utils/httpClientUtil';\nimport { Constants } from '@shared/utils/constants';\nconst option = {\n clientType: 'webBrowser',\n requireCorrelationId: true,\n stringifyPostData: false,\n allowOrigin: true,\n authenticationType: httpProtocol.AuthenticationTypes.Graph,\n contentType: 'image/jpeg',\n responseType: 'blob',\n returnRawResponse: true\n};\n/**\n * Checks if user is billing admin or global admin\n * Returns an array of RoleDefinitions user is a member of\n */ export function checkAdminMemberShips() {\n const membershipOptions = {\n clientType: 'webBrowser',\n requireCorrelationId: true,\n stringifyPostData: true,\n allowOrigin: true,\n authenticationType: httpProtocol.AuthenticationTypes.Graph,\n contentType: 'application/json',\n returnRawResponse: false\n };\n const endpoint = getAppConfig('graphApi') + `/v1.0/me/checkMemberObjects`;\n const body = {\n ids: Constants.RoleDefinitions.rolesToCheck\n };\n const post = httpProtocol.post(endpoint, membershipOptions);\n return post.setData(JSON.stringify(body)).request().then((result)=>result.value).catch((error)=>{\n logError('graphRestClient.get', error);\n return [];\n });\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport { get, AuthenticationTypes } from '@shared/services/http/httpProtocol';\nimport { logError } from '@shared/utils/httpClientUtil';\nconst commonHttpOptions = {\n requireCorrelationId: true,\n stringifyPostData: false,\n authenticationType: AuthenticationTypes.Unauthenticated,\n setBearerHeader: false\n};\nexport const AppReviewsQueryStrings = {\n OfferId: 'offer_Id',\n ApiVersion: 'api-version',\n Source: 'source',\n FilterEmptyTitles: 'filter_empty_titles'\n};\n/*\n * Gets reviews for a given offer Id\n * @param Object containing named parameters for the call\n * @returns Promise with the response, containing the reviews for the offer\n */ export function getAppReviews(_) {\n return _getAppReviews.apply(this, arguments);\n}\nfunction _getAppReviews() {\n _getAppReviews = _async_to_generator(function*({ entityId, reviewsAPI, reviewsAPIVersion }) {\n try {\n if (!entityId) {\n logError('reviewAppReviewsRestClient.getAppReviews - AppId is empty');\n return Promise.reject(new Error('AppId is required'));\n }\n return yield get(`${reviewsAPI}`, commonHttpOptions).addQueryEntry(AppReviewsQueryStrings.ApiVersion, reviewsAPIVersion).addQueryEntry(AppReviewsQueryStrings.OfferId, entityId).addQueryEntry(AppReviewsQueryStrings.FilterEmptyTitles, 'true').request();\n } catch (error) {\n logError('reviewAppReviewsRestClient.getAppReviews', error);\n return Promise.reject(error);\n }\n });\n return _getAppReviews.apply(this, arguments);\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport * as httpProtocol from '@shared/services/http/httpProtocol';\nimport { logError } from '@shared/utils/httpClientUtil';\nconst commonHttpOptions = {\n requireCorrelationId: true,\n stringifyPostData: false,\n authenticationType: httpProtocol.AuthenticationTypes.Spza,\n setBearerHeader: true\n};\nexport const UserReviewQueryStrings = {\n OfferId: 'offer_id',\n ApiVersion: 'api-version',\n Source: 'source',\n ReviewId: 'review_id'\n};\nexport function get(_) {\n return _get.apply(this, arguments);\n}\nfunction _get() {\n _get = _async_to_generator(function*({ offerId, reviewsAPI, reviewsAPIVersion, source }) {\n try {\n return yield httpProtocol.get(`${reviewsAPI}/private/user`, commonHttpOptions).addQueryEntry(UserReviewQueryStrings.OfferId, offerId).addQueryEntry(UserReviewQueryStrings.Source, source).addQueryEntry(UserReviewQueryStrings.ApiVersion, reviewsAPIVersion).request();\n } catch (e) {\n logError('userReviewRestClient.getUserReview', e);\n throw e;\n }\n });\n return _get.apply(this, arguments);\n}\nexport function submit({ reviewsAPI, reviewsAPIVersion, content, isAnonymous, rating, reviewId, sendEmailConsent, title, source, offerId }) {\n try {\n return httpProtocol.post(`${reviewsAPI}/private`, commonHttpOptions).addQueryEntry(UserReviewQueryStrings.ApiVersion, reviewsAPIVersion).setData({\n content: content,\n is_anonymous: isAnonymous,\n rating,\n id: reviewId,\n title,\n send_email_consent: sendEmailConsent,\n source,\n offer_id: offerId,\n offer_type: 'Application'\n }).request();\n } catch (e) {\n logError('userReviewRestClient.updateReview', e);\n throw e;\n }\n}\nexport function update(_) {\n return _update.apply(this, arguments);\n}\nfunction _update() {\n _update = _async_to_generator(function*({ reviewsAPI, reviewsAPIVersion, content, isAnonymous, rating, reviewId, sendEmailConsent, title }) {\n try {\n return yield httpProtocol.patch(`${reviewsAPI}/private/update`, commonHttpOptions).addQueryEntry(UserReviewQueryStrings.ApiVersion, reviewsAPIVersion).setData({\n content: content,\n is_anonymous: isAnonymous,\n rating,\n id: reviewId,\n title,\n send_email_consent: sendEmailConsent\n }).request();\n } catch (e) {\n logError('userReviewRestClient.updateReview', e);\n throw e;\n }\n });\n return _update.apply(this, arguments);\n}\nexport function remove(_) {\n return _remove.apply(this, arguments);\n}\nfunction _remove() {\n _remove = _async_to_generator(function*({ reviewsAPI, reviewsAPIVersion, reviewId }) {\n try {\n return yield httpProtocol.del(`${reviewsAPI}/private/delete_my_review`, commonHttpOptions).addQueryEntry(UserReviewQueryStrings.ApiVersion, reviewsAPIVersion).addQueryEntry(UserReviewQueryStrings.ReviewId, reviewId).request();\n } catch (e) {\n logError('userReviewRestClient.updateReview', e);\n throw e;\n }\n });\n return _remove.apply(this, arguments);\n}\n","import * as httpProtocol from './httpProtocol';\nimport { logError } from '../../utils/httpClientUtil';\nimport { getAppConfig } from '../../services/init/appConfig';\nconst option = {\n requireCorrelationId: true,\n stringifyPostData: false,\n authenticationType: httpProtocol.AuthenticationTypes.Spza\n};\nexport function getUserAuthStatus() {\n const isEmbed = getAppConfig('embedded');\n if (!isEmbed) {\n const endpoint = '/view/signinStatus';\n const get = httpProtocol.get(endpoint, option);\n return get.addQueryEntry('version', getAppConfig('apiVersion')).request().then((result)=>{\n return result;\n }).catch((error)=>{\n logError('getSigninStatus', error);\n return Promise.resolve(null);\n });\n }\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { PricingAudience, IAvailabilityActions } from '@shared/Models';\nimport { getTermPriorityForSorting } from '@shared/utils/pricing';\nexport class Product {\n populateTermsByPlanIdMap() {\n // Populates terms by planId\n this.plans.forEach((plan)=>{\n const tempPlanTerms = [];\n this.termsByPlanId[`${plan.planId}`] = [];\n /** Meters are unused yet, but is preparation for the future when AppSource would contain apps with custom meters */ this.metersByPlanId[`${plan.planId}`] = [];\n plan.availabilities.forEach((a)=>{\n tempPlanTerms.push(...a.terms);\n /** Meters are unused yet, but is preparation for the future when AppSource would contain apps with custom meters */ this.metersByPlanId[`${plan.planId}`].push(a.meter);\n });\n const unsortedTerms = tempPlanTerms.reduce((accumulatedArray, curr)=>{\n // in Professional Service offer type the renewTermUnit can be null\n if (this.isProfessionalService && !curr.renewTermId) {\n curr.renewTermId = curr.termId;\n }\n // Iterate over all non-free trial terms (termId===renewTermId)\n if (curr.renewTermId === curr.termId) {\n let freeTrialTermId = '';\n let freeTrialTermUnit;\n // Find relevant free trial term for specific termId\n const freeTrialTerm = tempPlanTerms.find((term)=>term.renewTermId === curr.termId && term.renewTermId !== term.termId);\n // Populate free trial info for term\n if (freeTrialTerm) {\n freeTrialTermId = freeTrialTerm.termId;\n freeTrialTermUnit = freeTrialTerm.termUnits;\n }\n // Only added if non-free trial. Meaning we have a merged term with both freeTrial termId as well as non-free trial termId\n accumulatedArray.push(_object_spread_props(_object_spread({}, curr), {\n freeTrialTermId,\n freeTrialTermUnit\n }));\n }\n return accumulatedArray;\n }, []);\n this.termsByPlanId[`${plan.planId}`] = this.sortTermPrices(unsortedTerms);\n });\n }\n /** Extract all unique terms durations of product. Relies on renewTermId rather than termId */ populateUniqueTermsPerPlan() {\n this.plans.forEach((plan)=>{\n const uniqueTerms = [];\n const termsOfAllAvailabilitiesByPlan = plan.availabilities.map((avail)=>avail.terms);\n termsOfAllAvailabilitiesByPlan.forEach((terms)=>{\n terms.forEach((term)=>{\n // in Professional Service offer type the renewTermUnit can be null\n if (this.isProfessionalService && !term.renewTermUnits) {\n term.renewTermUnits = term.termUnits;\n }\n if (!uniqueTerms.includes(term.renewTermUnits)) {\n uniqueTerms.push(term.renewTermUnits);\n }\n });\n });\n this.TermsPerPlanMapping[plan.planId] = uniqueTerms;\n });\n }\n constructor({ legacyId, bigId, plans, offerType }){\n /** List of term duration */ _define_property(this, \"TermsPerPlanMapping\", {});\n /** Equivalent to entityId <PublisherId.OfferId> */ _define_property(this, \"legacyId\", void 0);\n _define_property(this, \"bigId\", void 0);\n _define_property(this, \"plans\", void 0);\n _define_property(this, \"isProfessionalService\", void 0);\n _define_property(this, \"offerType\", void 0);\n _define_property(this, \"termsByPlanId\", {});\n /** This is unused yet, but is preparation for the future when AppSource would contain apps with custom meters */ _define_property(this, \"metersByPlanId\", {});\n /**\n * Extract a specific availability from the plan's availabilities\n * The termId depends on the plan, and availability properties: termUnits (P1Y, month, ...), free trial and billing plan;\n */ _define_property(this, \"getPlanAvailabilityByTermId\", (planId, termId)=>{\n // Get the selected plan\n const plan = this.plans.find((plan)=>plan.planId === planId);\n // AppsSource only has direct commercial customers (no CSP or special type pricingAudience).\n // There should *always* be availabilities at this point since we filter by billing region prior to fetching the item\n const directAvailabilities = (plan.availabilities || []).filter((availability)=>availability.pricingAudience === PricingAudience.DirectCommercial && availability.actions.includes(IAvailabilityActions.Browse));\n // Filter by term, there could be multiple billingPlans with the same duration (termUnits) so this could still be an array\n return directAvailabilities.find((availability)=>availability.terms.some((term)=>term.termId === termId)) || {};\n });\n /** Extract default availability by planId */ _define_property(this, \"getFirstTermFromPlan\", (planId)=>{\n var _this_termsByPlanId_;\n return (_this_termsByPlanId_ = this.termsByPlanId[`${planId}`]) === null || _this_termsByPlanId_ === void 0 ? void 0 : _this_termsByPlanId_[0];\n });\n /** Returns the distinct of possible term durations by planId */ _define_property(this, \"getTermDurationsByPlanId\", (planId)=>{\n return this.TermsPerPlanMapping[`${planId}`];\n });\n /** Helper method to get selected plan by planId rather than access plans array by index */ _define_property(this, \"getPlanByPlanId\", (targetPlanId)=>{\n const plan = this.plans.find((plan)=>plan.planId === targetPlanId);\n return plan;\n });\n /** Used to get terms entity by termId. TermId should be the renew termId */ _define_property(this, \"getFirstTermByPlanId\", (planId)=>{\n var _this_termsByPlanId_;\n return (_this_termsByPlanId_ = this.termsByPlanId[`${planId}`]) === null || _this_termsByPlanId_ === void 0 ? void 0 : _this_termsByPlanId_[0];\n });\n /** Used to get terms entity by termId. TermId should be the renew termId */ _define_property(this, \"getTermByTermId\", ({ planId, termId })=>{\n return this.termsByPlanId[`${planId}`].find((term)=>{\n // Compare the given termId with either the free trial termId or non free trial termId\n const foundTerm = termId === term.termId || termId === term.freeTrialTermId;\n return foundTerm;\n });\n });\n /** Returns a new array of ascending sorted term prices. First by billing term and if the billing terms are equal then by the billing period frequency */ _define_property(this, \"sortTermPrices\", (termPrices)=>{\n if (!(termPrices === null || termPrices === void 0 ? void 0 : termPrices.length)) {\n return [];\n }\n // Cloning before calling \".sort\" is a must because \".sort\" sorts the array in-place.\n return [\n ...termPrices\n ].sort((a, b)=>{\n if (a.renewTermUnits === b.renewTermUnits) {\n var _a_billingPlan, _b_billingPlan;\n return getTermPriorityForSorting((_a_billingPlan = a.billingPlan) === null || _a_billingPlan === void 0 ? void 0 : _a_billingPlan.billingPeriod) - getTermPriorityForSorting((_b_billingPlan = b.billingPlan) === null || _b_billingPlan === void 0 ? void 0 : _b_billingPlan.billingPeriod);\n }\n return getTermPriorityForSorting(a.renewTermUnits) - getTermPriorityForSorting(b.renewTermUnits);\n });\n });\n _define_property(this, \"getTermByPlanAndBillingTermDuration\", ({ planId, billingTermDuration })=>{\n var _this_termsByPlanId__filter;\n return (_this_termsByPlanId__filter = this.termsByPlanId[`${planId}`].filter((term)=>term.renewTermUnits === billingTermDuration)) === null || _this_termsByPlanId__filter === void 0 ? void 0 : _this_termsByPlanId__filter[0];\n });\n this.legacyId = legacyId;\n this.bigId = bigId;\n this.plans = plans;\n this.offerType = offerType;\n this.isProfessionalService = plans.some(({ isHiddenPrivateOffer })=>isHiddenPrivateOffer);\n this.populateTermsByPlanIdMap();\n this.populateUniqueTermsPerPlan();\n }\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { StatusCodes } from 'http-status-codes';\nimport { createEntityDataReceivedAction, createSearchboxInputChangedAction, createEntityDetailsReceivedAction, createAppsPricingDataReceivedAction, createAppPricingDataRequestedAction, createAppDetailPricingReceivedAction, createBillingRegionReadFromCookieAction, createUserSignOutAction, createUserProfileAction, createUserSignInFetchStatusAction, createUpdateUserProfileAction, createClearUserPropertiesAction, createDynamicCampaignReceivedAction, createSetTenantTypeAction, createServicesCountriesDataReceivedAction, createDataMapReceivedAction, createFilteredSearchResultsReceivedAction, createRelatedAppsItemsReceivedAction, createRelatedAppsItemsLoadingAction, createRelatedAppsItemsPricingDataReceivedAction, createSetEntityIdLoadingAction, createSetEntityIdFailedAction, createGetAppReviewsAction, createUserTenantsDetailsAction, createEntityFullDataReceivedAction, createUserTenantsDetailsLoadingAction, createUserProfileLoadingAction, createPartnerSearchResultsReceivedAction, createAppPricingDataReceivedAction, createEntityReviewCommentsReceivedAction, createEntityReviewCommentsCleanupAction, createEntityReviewCommentCreateResult, createEntityReviewCommentDeleteResult, createEntityReviewCommentUpdateResult, createEntityReviewCommentModalAction, createUserLoginDetailsAction, createEntityReviewCommentsLoadingAction, createEntityReviewCommentsInitializeStateAction, createEntityReviewCommentsUpdateTotalCommentCountAction, createEntityMarkedAsHelpfulReviewUpdateListAction, createEntityLinkedInProductGroupUpdateAction, createEntityReviewMarkAsHelpfulModalAction, createEntityReviewSetIsHelpfulAction, createEntityReviewSetMarkAsHelpfulCount, createEntityReviewSetIsHelpfulLoadingAction, createSetStorefrontNameAction, createLoadingRecommenededSizes, createSetRecommenededSizes, createEntityUserCommentedReviewIdsUpdateListAction, createRecommendedWhatsNewAppsReceivedAction, createRecommendedTrendingAppsReceivedAction, createShowingResultsForReceivedAction, createRecommendedAppsItemsPricingDataReceivedAction, createRecommendedWhatsNewServiceReceivedAction, createRecommendedTrendingServiceReceivedAction, createRecommendedMicrosoft365WhatsNewAppsReceivedAction, createRecommendedMicrosoft365TrendingAppsReceivedAction, createUpdateUserRoleDefinitions, createSetAccountIsLoadingAction, createSetAccountAction } from '@shared/actions/actions';\nimport { createUpdateCustomerAction, createSetActiveCustomerAction, createSetPublisherTokenResponse, createSetCustomersAction, createErrorAction, createClearErrorAction, createProduct, createFetchingProductAction } from '@shared/actions/checkoutActions';\nimport { isOnMicrosoftEmail, shouldEnsureAppDetails, shouldEnsureAppRelatedApps, shouldEnsureAppPricings, shouldEnsureServiceDetails, shouldEnsureServiceRelatedApps, shouldEnsureAppReviews, getTileDataQueryParams, getActiveFeaturedFlags, parseCatalogRecommendedSizes, getProductByUrlKey, generateGuid } from '@shared/utils/appUtils';\nimport { createLeadPayload, scrubLeadPayload } from '@shared/utils/leadsUtils';\nimport { dispatchSearchQueryChangedAction, takeTopResults } from '@shared/utils/thunkActionUtils';\nimport * as suggestionsRestClient from '@shared/services/http/suggestionsRestClient';\nimport * as catalogApiRestClient from '@shared/services/http/catalogApiRestClient';\nimport * as armRestClient from '@shared/services/http/armRestClient';\nimport * as entityRestClient from '@shared/services/http/entityRestClient';\nimport * as leadgenRestClient from '@shared/services/http/leadgenRestClient';\nimport * as reviewRestClient from '@shared/services/http/reviewRestClient';\nimport * as fieldHubRestClient from '@shared/services/http/fieldHubRestClient';\nimport * as userRestClient from '@shared/services/http/userRestClient';\nimport * as dynamicCampaignRestClient from '@shared/services/http/dynamicCampaignRestClient';\nimport * as purchaseRestClient from '@shared/services/http/purchaseRestClient';\nimport * as commerceApiRestClient from '@shared/services/http/commerceApiRestClient';\nimport * as appReviewCommentsRestClient from '@shared/services/http/reviewCommentsRestClient';\nimport * as appReviewMarkAsHelpfulRestClient from '@shared/services/http/reviewMarkAsHelpfulRestClient';\nimport * as reviewsCatalogRestClient from '@shared/services/http/reviewsCatalogRestClient';\nimport * as linkedInRestClient from '@shared/services/http/linkedInRestClient';\nimport * as graphRestClient from '@shared/services/http/graphRestClient';\nimport * as reportReviewRestClient from '@shared/services/http/reportReviewRestClient';\nimport * as reviewAppReviewsRestClient from '@shared/services/http/reviewAppReviewsRestClient';\nimport * as userReviewRestClient from '@shared/services/http/userReviewRestClient';\n// Constant API version that maps to the app schema,\n// inflight browser never calls the API directly hence this is the only place the version lives\nimport { getCookieItem, saveCookieItem } from '@shared/utils/browserStorageUtils';\nimport { Constants } from '@shared/utils/constants';\nimport { getWindow } from '@shared/services/window';\nimport { UserSegment, CustomerType } from '@shared/Models';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { SharedInstrumentService } from '@shared/services/telemetry/shared/sharedInstrument';\nimport { AzureEnvironmentSettings } from '@shared/AzureEnvironmentSettings';\nimport * as authRestClient from '@shared/services/http/authRestClient';\nimport { shouldRefreshToken, logError } from '@shared/utils/httpClientUtil';\nimport { previousPage, routes } from '@shared/routerHistory';\nimport { getCampaignsForAcquisitionFromUrl } from '@shared/utils/routeUtils';\nimport { getSearchQuery, removeDuplicateAddIns } from '@shared/utils/search';\nimport { stringifyError } from '@shared/utils/errorUtils';\nimport { extractCountryCodeFromQueryParam } from '@shared/utils/consultingServicesUtils';\nimport { createFavouriteAppsPricingDataReceivedAction } from './userFavouriteActions';\nimport { ensurePrivateOffer } from './privateOffersThunkActions';\nimport { Product } from 'services/product/product';\nimport { logger } from '@src/logger';\nimport { launchTelemetry as launchReviewsTelemetry } from '@shared/utils/reviewsUtils';\nimport { request } from '@shared/utils/requestUtils';\nimport { HttpModule } from '@shared/services/http/httpProtocol';\nimport { fetchUserFavourites } from './userFavouriteThunkActions';\nimport { BillingAccountType, BillingAgreementType } from '@src/interfaces/IBilling';\nlet tilesViewService;\nlet servicesViewService;\nlet recommendationsViewService;\nlet cloudsIndustryViewService;\nlet detailsViewService;\nlet servicesDetailsViewService;\nlet pricingViewService;\nif (__SERVER__) {\n tilesViewService = require('@src/server/viewAPIServices/tilesViewService');\n servicesViewService = require('@src/server/viewAPIServices/servicesViewService');\n recommendationsViewService = require('@src/server/viewAPIServices/recommendationsViewService');\n cloudsIndustryViewService = require('@src/server/viewAPIServices/cloudsIndustryViewService');\n detailsViewService = require('@src/server/viewAPIServices/detailsViewService');\n servicesDetailsViewService = require('@src/server/viewAPIServices/servicesDetailsViewService');\n pricingViewService = require('@src/server/viewAPIServices/pricingViewService');\n}\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function telemtry(action, actionModifier, details) {\n const payload = {\n page: getWindow() && getWindow().location && getWindow().location.href,\n action,\n actionModifier,\n details: JSON.stringify(details)\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n}\nfunction mockRequest({ state, query = {}, request: req = {} }) {\n return request({\n correlationId: state.config.correlationId,\n requestId: state.config.requestId,\n context: _object_spread({}, req.context),\n query: _object_spread_props(_object_spread({}, query), {\n [Constants.QueryStrings.flightCodes]: state.config.flightCodes,\n [Constants.QueryStrings.isConverged]: state.config.isConverged ? 'true' : 'false'\n })\n });\n}\nexport function ensureAppsDataMap() {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n var _getProductByUrlKey;\n if (getState().apps.dataMapLoaded) {\n return Promise.resolve();\n }\n const embedHost = (_getProductByUrlKey = getProductByUrlKey({\n urlKey: getState().config.embedHost\n })) === null || _getProductByUrlKey === void 0 ? void 0 : _getProductByUrlKey.UrlKey;\n let dataMap$;\n if (__CLIENT__) {\n dataMap$ = entityRestClient.getAppsDataMap({\n embedHost\n });\n } else {\n dataMap$ = tilesViewService.getAppsDataMap({\n request: mockRequest({\n state: getState()\n }),\n embedHost\n });\n }\n const dataMap = yield dataMap$;\n dispatch(createDataMapReceivedAction({\n entityType: Constants.EntityType.App,\n dataMap\n }));\n return dataMap;\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function ensureCloudsIndustryDataMap() {\n return function(dispatch, getState) {\n if (getState().cloudsIndustry.dataMapLoaded) {\n return Promise.resolve();\n }\n let dataMap$;\n if (__CLIENT__) {\n dataMap$ = entityRestClient.getCloudsIndustryDataMap();\n } else {\n dataMap$ = cloudsIndustryViewService.getCloudsIndustryDataMap({\n request: mockRequest({\n state: getState()\n })\n });\n }\n return dataMap$.then((dataMap)=>{\n dispatch(createDataMapReceivedAction({\n entityType: Constants.EntityType.CloudsIndustry,\n dataMap\n }));\n return dataMap;\n });\n };\n}\nexport function ensureServicesDataMap() {\n return function(dispatch, getState) {\n if (getState().services.dataMapLoaded) {\n return Promise.resolve();\n }\n let dataMap$;\n if (__CLIENT__) {\n dataMap$ = entityRestClient.getServicesDataMap();\n } else {\n dataMap$ = servicesViewService.getServicesDataMap({\n request: mockRequest({\n state: getState()\n })\n });\n }\n return dataMap$.then((dataMap)=>{\n dispatch(createDataMapReceivedAction({\n entityType: Constants.EntityType.Service,\n dataMap\n }));\n return dataMap;\n });\n };\n}\nexport function ensureServiceData({ request }) {\n return function(dispatch, getState) {\n const state = getState();\n const { search: { previousSearchText }, config: { includeTestProducts, isConverged } } = state;\n const options = {\n includeTestProducts,\n isConverged\n };\n const requestId = request.headers[Constants.Headers.RequestId] || '';\n const userSegment = Constants.ServicesUserSegment;\n if (state.services.dataLoaded[`${userSegment}`]) {\n return Promise.resolve();\n }\n const urlQuery = _object_spread({}, getTileDataQueryParams(state.config.query), getActiveFeaturedFlags(state.config.featureFlags));\n let getFilteredServices$;\n if (__CLIENT__) {\n getFilteredServices$ = entityRestClient.getFilteredServices({\n urlQuery,\n requestId,\n options\n });\n } else {\n getFilteredServices$ = servicesViewService.getFilteredServices({\n request: mockRequest({\n state: getState(),\n query: urlQuery,\n request\n }),\n options\n });\n }\n return getFilteredServices$.then((result)=>{\n const { items, count, showingResultsFor = '' } = result;\n dispatch(createEntityDataReceivedAction({\n entityType: Constants.EntityType.Service,\n dataList: items,\n isEmbedded: state.config.isEmbedded,\n userSegment: Constants.ServicesUserSegment,\n count,\n urlQuery\n }));\n // This is to ensure we don't accidently reset the showing results for due to the 3 searches we're doing: Apps, Consulting Services, Industry Clouds\n if (urlQuery.search !== previousSearchText && showingResultsFor.length > 0) {\n dispatch(createShowingResultsForReceivedAction({\n showingResultsFor,\n previousSearchText: urlQuery.search\n }));\n }\n return result;\n });\n };\n}\nexport function ensureServiceCountries() {\n return function(dispatch, getState) {\n let countryDate = Promise.resolve();\n if (!Object.keys(getState().services.countriesList).length && getState().config.isAppSource) {\n countryDate = new Promise((resolve, reject)=>{\n servicesViewService.getAllServicesCountries({\n request: mockRequest({\n state: getState()\n })\n }).then((countries)=>{\n dispatch(createServicesCountriesDataReceivedAction({\n countries\n }));\n resolve();\n }).catch((error)=>{\n reject(error);\n });\n });\n }\n return countryDate;\n };\n}\nexport function getUserAuthStatus() {\n return function(dispatch, getState) {\n return new Promise((resolve, reject)=>{\n const state = getState();\n if (state.config.embedHost) {\n return resolve(Constants.SigninStatus.ValidationSkipped);\n }\n if (state.users.accessToken && !shouldRefreshToken(state.users.accessToken.spza)) {\n // The token is still valid and not nearing expiry dont make a server call, let the flow continue.\n resolve(Constants.SigninStatus.ValidTokenUnknownCookie);\n } else {\n authRestClient.getUserAuthStatus().then((result)=>{\n // the token has expired and cookie is guest sign the user out from state\n if (result.status === Constants.SigninStatus.ExpiredTokenInvalidCookie) {\n dispatch(createUserSignOutAction(null));\n }\n resolve(result);\n }).catch((error)=>{\n reject(error);\n });\n }\n });\n };\n}\nexport function getAppReviews(entityId) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const { config: { reviewsAPI, reviewsAPIVersion, storefrontName: source }, users: { signedIn } } = getState();\n const reviews$ = reviewAppReviewsRestClient.getAppReviews({\n entityId,\n reviewsAPI,\n reviewsAPIVersion\n });\n const isPurchased$ = signedIn && reviewRestClient.getPurchaseStatus(entityId);\n const userReview$ = signedIn && userReviewRestClient.get({\n offerId: entityId,\n reviewsAPI,\n reviewsAPIVersion,\n source\n }) || Promise.resolve([]);\n const [reviews, isPurchased, [userReview]] = yield Promise.all([\n reviews$,\n isPurchased$,\n userReview$\n ]);\n return dispatch(createGetAppReviewsAction({\n entityId,\n reviews,\n isPurchased,\n userReview\n }));\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function ensureAppReviewsData(entityId, forceUpdate = false) {\n return function(dispatch, getState) {\n if (!entityId) {\n return Promise.resolve(false);\n }\n const start = Date.now();\n if (shouldEnsureAppReviews(entityId, getState()) || forceUpdate) {\n return Promise.resolve(dispatch(getAppReviews(entityId))).catch((error)=>{\n const payload = {\n page: getWindow() && getWindow().location.href,\n action: Constants.Telemetry.Action.EnsureAppReviewsData,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: JSON.stringify({\n duration: Date.now() - start,\n error: stringifyError(error)\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.error(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n return false;\n });\n }\n return Promise.resolve(true);\n };\n}\nexport function ensureAppData({ billingRegion, request }) {\n return function(dispatch, getState) {\n var _getProductByUrlKey;\n const state = getState();\n const { search: { previousSearchText } } = state;\n const requestId = request.headers[Constants.Headers.RequestId] || '';\n const userSegment = UserSegment[UserSegment.unauthenticated];\n if (state.apps.dataLoaded[`${userSegment}`]) {\n return Promise.resolve();\n }\n const { flightCodes, includeTestProducts, isConverged } = state.config;\n const options = {\n includeTestProducts,\n isConverged\n };\n const urlQuery = _object_spread({}, getTileDataQueryParams(state.config.query), getActiveFeaturedFlags(state.config.featureFlags));\n const embedHost = (_getProductByUrlKey = getProductByUrlKey({\n urlKey: state.config.embedHost\n })) === null || _getProductByUrlKey === void 0 ? void 0 : _getProductByUrlKey.UrlKey;\n let getFilteredApps$;\n if (__CLIENT__) {\n getFilteredApps$ = entityRestClient.getFilteredApps({\n billingRegion,\n flightCodes,\n embedHost,\n urlQuery,\n requestId,\n options\n });\n } else {\n getFilteredApps$ = tilesViewService.getFilteredApps({\n request: mockRequest({\n state: getState(),\n query: urlQuery,\n request\n }),\n billingRegion,\n flightCodes,\n embedHost,\n options\n });\n }\n return getFilteredApps$.then((result)=>{\n const { items, count, showingResultsFor = '' } = result;\n dispatch(createEntityDataReceivedAction({\n entityType: Constants.EntityType.App,\n dataList: items,\n isEmbedded: state.config.isEmbedded,\n userSegment,\n count,\n urlQuery\n }));\n // This is to ensure we don't accidently reset the showing results for due to the 3 searches we're doing: Apps, Consulting Services, Industry Clouds\n if (urlQuery.search !== previousSearchText && showingResultsFor.length > 0) {\n dispatch(createShowingResultsForReceivedAction({\n showingResultsFor,\n previousSearchText: urlQuery.search\n }));\n }\n return result;\n });\n };\n}\nexport function ensureWhatsNewAppsRecommendationsData() {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const action = Constants.Telemetry.Action.GetAppRecommendedItems;\n const start = Date.now();\n telemtry(action, Constants.Telemetry.ActionModifier.Start, {});\n try {\n const recommendedItems = (yield recommendationsViewService.getWhatsNewRecommendedApps({\n request: mockRequest({\n state: getState()\n })\n })) || [];\n telemtry(action, Constants.Telemetry.ActionModifier.End, {\n duration: Date.now() - start,\n recommendedWhatsNewApps: recommendedItems === null || recommendedItems === void 0 ? void 0 : recommendedItems.map((item)=>item.entityId)\n });\n dispatch(createRecommendedWhatsNewAppsReceivedAction(recommendedItems));\n return recommendedItems;\n } catch (error) {\n telemtry(action, Constants.Telemetry.ActionModifier.Error, {\n duration: Date.now() - start,\n error: stringifyError(error)\n });\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function ensureTrendingAppsRecommendationsData() {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const action = Constants.Telemetry.Action.GetAppRecommendedItems;\n const start = Date.now();\n telemtry(action, Constants.Telemetry.ActionModifier.Start, {});\n try {\n const recommendedItems = (yield recommendationsViewService.getTrendingRecommendedApps({\n request: mockRequest({\n state: getState()\n })\n })) || [];\n telemtry(action, Constants.Telemetry.ActionModifier.End, {\n duration: Date.now() - start,\n RecommendedTrendingApps: recommendedItems === null || recommendedItems === void 0 ? void 0 : recommendedItems.map((item)=>item.entityId)\n });\n dispatch(createRecommendedTrendingAppsReceivedAction(recommendedItems));\n return recommendedItems;\n } catch (error) {\n telemtry(action, Constants.Telemetry.ActionModifier.Error, {\n duration: Date.now() - start,\n error: stringifyError(error)\n });\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function ensureWhatsNewServiceRecommendationsData() {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const action = Constants.Telemetry.Action.GetServiceRecommendedItems;\n const start = Date.now();\n telemtry(action, Constants.Telemetry.ActionModifier.Start, {});\n try {\n const request = mockRequest({\n state: getState()\n });\n const recommendedItems = (yield recommendationsViewService.getWhatsNewRecommendedService({\n request,\n country: request.query[Constants.QueryStrings.country],\n region: request.query[Constants.QueryStrings.region]\n })) || [];\n telemtry(action, Constants.Telemetry.ActionModifier.End, {\n duration: Date.now() - start,\n recommendedWhatsNewService: recommendedItems === null || recommendedItems === void 0 ? void 0 : recommendedItems.map((item)=>item.entityId)\n });\n dispatch(createRecommendedWhatsNewServiceReceivedAction(recommendedItems));\n return recommendedItems;\n } catch (error) {\n telemtry(action, Constants.Telemetry.ActionModifier.Error, {\n duration: Date.now() - start,\n error: stringifyError(error)\n });\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function ensureTrendingServiceRecommendationsData() {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const action = Constants.Telemetry.Action.GetServiceRecommendedItems;\n const start = Date.now();\n telemtry(action, Constants.Telemetry.ActionModifier.Start, {});\n try {\n const request = mockRequest({\n state: getState()\n });\n const recommendedItems = (yield recommendationsViewService.getTrendingRecommendedService({\n request,\n country: request.query[Constants.QueryStrings.country],\n region: request.query[Constants.QueryStrings.region]\n })) || [];\n telemtry(action, Constants.Telemetry.ActionModifier.End, {\n duration: Date.now() - start,\n RecommendedTrendingService: recommendedItems === null || recommendedItems === void 0 ? void 0 : recommendedItems.map((item)=>item.entityId)\n });\n dispatch(createRecommendedTrendingServiceReceivedAction(recommendedItems));\n return recommendedItems;\n } catch (error) {\n telemtry(action, Constants.Telemetry.ActionModifier.Error, {\n duration: Date.now() - start,\n error: stringifyError(error)\n });\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function ensureMicrosoft365WhatsNewAppsRecommendationsData() {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const action = Constants.Telemetry.Action.GetAppRecommendedItems;\n const start = Date.now();\n telemtry(action, Constants.Telemetry.ActionModifier.Start, {});\n try {\n const recommendedItems = (yield recommendationsViewService.getMicrosoft365WhatsNewRecommendedApps({\n request: mockRequest({\n state: getState()\n })\n })) || [];\n telemtry(action, Constants.Telemetry.ActionModifier.End, {\n duration: Date.now() - start,\n recommendedMicrosoft365WhatsNewApps: recommendedItems === null || recommendedItems === void 0 ? void 0 : recommendedItems.map((item)=>item.entityId)\n });\n dispatch(createRecommendedMicrosoft365WhatsNewAppsReceivedAction(recommendedItems));\n return recommendedItems;\n } catch (error) {\n telemtry(action, Constants.Telemetry.ActionModifier.Error, {\n duration: Date.now() - start,\n error: stringifyError(error)\n });\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function ensureMicrosoft365TrendingAppsRecommendationsData() {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const action = Constants.Telemetry.Action.GetAppRecommendedItems;\n const start = Date.now();\n telemtry(action, Constants.Telemetry.ActionModifier.Start, {});\n try {\n const recommendedItems = (yield recommendationsViewService.getMicrosoft365TrendingRecommendedApps({\n request: mockRequest({\n state: getState()\n })\n })) || [];\n telemtry(action, Constants.Telemetry.ActionModifier.End, {\n duration: Date.now() - start,\n RecommendedTrendingApps: recommendedItems === null || recommendedItems === void 0 ? void 0 : recommendedItems.map((item)=>item.entityId)\n });\n dispatch(createRecommendedMicrosoft365TrendingAppsReceivedAction(recommendedItems));\n return recommendedItems;\n } catch (error) {\n telemtry(action, Constants.Telemetry.ActionModifier.Error, {\n duration: Date.now() - start,\n error: stringifyError(error)\n });\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nfunction ensureRecommendationsData(dispatch) {\n return [\n dispatch(ensureWhatsNewAppsRecommendationsData()),\n dispatch(ensureTrendingAppsRecommendationsData()),\n dispatch(ensureWhatsNewServiceRecommendationsData()),\n dispatch(ensureTrendingServiceRecommendationsData()),\n dispatch(ensureMicrosoft365WhatsNewAppsRecommendationsData()),\n dispatch(ensureMicrosoft365TrendingAppsRecommendationsData())\n ];\n}\nexport function ensureCloudsIndustryData({ request }) {\n return function(dispatch, getState) {\n const state = getState();\n const { search: { previousSearchText } } = state;\n const requestId = request.headers[Constants.Headers.RequestId] || '';\n const userSegment = UserSegment[UserSegment.unauthenticated];\n if (state.apps.dataLoaded[`${userSegment}`]) {\n return Promise.resolve();\n }\n const urlQuery = _object_spread_props(_object_spread({}, getTileDataQueryParams(state.config.query), getActiveFeaturedFlags(state.config.featureFlags)), {\n [Constants.QueryStrings.UseSecondarySearch]: state.config.featureFlags.UseSecondarySearch\n });\n let getFilteredCloudsIndustry$;\n if (__CLIENT__) {\n getFilteredCloudsIndustry$ = entityRestClient.getFilteredCloudsIndustry({\n urlQuery,\n requestId\n });\n } else {\n getFilteredCloudsIndustry$ = cloudsIndustryViewService.getFilteredCloudsIndustry({\n request: mockRequest({\n state: getState(),\n query: urlQuery,\n request\n })\n });\n }\n return getFilteredCloudsIndustry$.then((result)=>{\n const { items, count, showingResultsFor = '' } = result;\n dispatch(createEntityDataReceivedAction({\n entityType: Constants.EntityType.CloudsIndustry,\n dataList: items,\n isEmbedded: false,\n userSegment,\n count,\n urlQuery\n }));\n // This is to ensure we don't accidently reset the showing results for due to the 3 searches we're doing: Apps, Consulting Services, Industry Clouds\n if (urlQuery.search !== previousSearchText && showingResultsFor.length > 0) {\n dispatch(createShowingResultsForReceivedAction({\n showingResultsFor,\n previousSearchText: urlQuery.search\n }));\n }\n return result;\n });\n };\n}\nexport function fetchStateCacheData({ billingRegion, request }) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const dataMaps = [\n dispatch(ensureAppsDataMap()),\n dispatch(ensureServicesDataMap())\n ];\n if (getState().config.isAppSource && !getState().config.isEmbedded) {\n dataMaps.push(dispatch(ensureCloudsIndustryDataMap()));\n }\n yield Promise.all(dataMaps);\n const offers = [\n dispatch(ensureAppData({\n billingRegion,\n request\n }))\n ];\n if (!getState().config.isEmbedded) {\n offers.push(dispatch(ensureServiceData({\n request\n })));\n if (getState().config.isAppSource) {\n offers.push(dispatch(ensureCloudsIndustryData({\n request\n })));\n }\n }\n yield Promise.all(offers);\n yield Promise.all(ensureRecommendationsData(dispatch));\n if (!getState().config.isEmbedded) {\n yield dispatch(ensureServiceCountries());\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nfunction logSearchTelemetry(actionModifier, detailsObject) {\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Search,\n actionModifier,\n details: JSON.stringify(detailsObject)\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n}\nconst logSearchApiSuggestions = ({ details })=>{\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.NewSearchApi,\n actionModifier: Constants.Telemetry.ActionModifier.SearchApiSuggestions,\n details\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n};\nconst logSearchApiSuggestionsError = ({ details })=>{\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.NewSearchApi,\n actionModifier: Constants.Telemetry.ActionModifier.SearchApiSuggestionsError,\n details\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.error(details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n};\nexport const extractSuggestionsResults = ({ suggestions = {\n totalCount: 0,\n value: []\n} })=>{\n let wordSearches;\n let entityIds;\n suggestions.value.forEach((suggestion)=>{\n if (suggestion.suggestionType === Constants.Search.SuggestionTypes.Entity) {\n entityIds = [\n ...entityIds,\n suggestion.id\n ];\n }\n if (suggestion.suggestionType === Constants.Search.SuggestionTypes.WordSearch) {\n wordSearches = [\n ...wordSearches,\n suggestion.displayText\n ];\n }\n });\n return {\n wordSearches,\n entityIds\n };\n};\nexport function callSearchApiSuggestionsAction({ language, searchText, requestId }) {\n return function(dispatch, getState) {\n const { config: { searchApiEndpoint, storefrontName, siteEnvironment } } = getState();\n const appName = `${storefrontName}-${siteEnvironment}`;\n suggestionsRestClient.callSearchApiSuggestions({\n searchText,\n language,\n endpoint: searchApiEndpoint,\n requestId,\n appName\n }).then((suggestions)=>{\n const { wordSearches, entityIds } = extractSuggestionsResults({\n suggestions\n });\n const details = JSON.stringify({\n searchText,\n totalCount: suggestions.totalCount,\n totalWordSearch: wordSearches.length,\n totalEntity: entityIds.length,\n wordSearches,\n entityIds,\n language,\n requestId\n });\n logSearchApiSuggestions({\n details\n });\n }).catch((error)=>{\n logSearchApiSuggestionsError({\n details: JSON.stringify({\n searchText,\n requestId,\n error\n })\n });\n });\n };\n}\nconst extractSearchPromises = ({ entityType, urlQuery, requestId, state })=>{\n const emptyResults = Promise.resolve({\n items: [],\n count: 0,\n requestId: Constants.ReservedCorrelationIds.EmptyId\n });\n const appsResults$ = entityType === Constants.FilteredSearchType.All || entityType === Constants.FilteredSearchType.Apps ? entityRestClient.getFilteredApps({\n urlQuery,\n searchActionType: Constants.Search.ActionType.Suggestions,\n requestId\n }) : emptyResults;\n const servicesResults$ = entityType === Constants.FilteredSearchType.All || entityType === Constants.FilteredSearchType.Services ? entityRestClient.getFilteredServices({\n urlQuery,\n searchActionType: Constants.Search.ActionType.Suggestions,\n requestId\n }) : emptyResults;\n const cloudsIndustryResults$ = state.config.isAppSource && (entityType === Constants.FilteredSearchType.All || entityType === Constants.FilteredSearchType.CloudsIndustry) ? entityRestClient.getFilteredCloudsIndustry({\n urlQuery,\n searchActionType: Constants.Search.ActionType.Suggestions,\n requestId\n }) : emptyResults;\n return {\n appsResults$,\n servicesResults$,\n cloudsIndustryResults$\n };\n};\nexport function performFilteredSearch({ entityType, searchString, searchId, considerFilters, requestId }) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const startTime = Date.now();\n let searchPhase = Constants.FilteredSearchPhase.Started;\n const resultsString = Constants.searchTypeString.AppsAndServices;\n searchString = getSearchQuery(searchString);\n dispatch(createSearchboxInputChangedAction({\n searchString\n }));\n const state = getState();\n const urlQuery = _object_spread(_object_spread_props(_object_spread({}, considerFilters ? state.config.requestFilteredQuery : {}), {\n [Constants.TileDataAdditionalQueryParams.country]: state.services.selectedCountry,\n [Constants.TileDataAdditionalQueryParams.region]: state.services.selectedRegion,\n [Constants.TileDataAdditionalQueryParams.page]: '1',\n [Constants.TileDataFilteredQueryParams.search]: searchString\n }), getActiveFeaturedFlags(state.config.featureFlags));\n const { appsResults$, servicesResults$, cloudsIndustryResults$ } = extractSearchPromises({\n entityType,\n urlQuery,\n requestId,\n state\n });\n return Promise.all([\n appsResults$,\n servicesResults$,\n cloudsIndustryResults$\n ]).then(([appsResults, servicesResults, cloudsIndustryResults])=>{\n var _apps_, _services_, _cloudsIndustry_;\n searchPhase = Constants.FilteredSearchPhase.SearchResultsReturned;\n const duration = Date.now() - startTime;\n let bundleCount = 0;\n let apps = appsResults.items;\n const services = servicesResults.items;\n const cloudsIndustry = cloudsIndustryResults.items;\n const results = removeDuplicateAddIns(apps, 'entityId');\n apps = results.apps;\n bundleCount = results.bundleCount;\n searchPhase = Constants.FilteredSearchPhase.DuplicateAddInsRemoved;\n const requestId = appsResults.requestId || servicesResults.requestId || cloudsIndustryResults.requestId;\n const searchResponseId = appsResults.searchResponseId;\n dispatch(createFilteredSearchResultsReceivedAction({\n appSearchResults: apps,\n servicesSearchResults: services,\n cloudsIndustrySearchResults: cloudsIndustry,\n appsCount: appsResults.count - results.duplicateAddInsCount,\n servicesCount: servicesResults.count,\n cloudsIndustryCount: cloudsIndustryResults.count,\n searchid: searchId + 1,\n requestId,\n searchResponseId\n }));\n searchPhase = Constants.FilteredSearchPhase.SearchActionCreated;\n logSearchTelemetry(Constants.Telemetry.ActionModifier.Suggestions, {\n results: resultsString,\n searchTerm: searchString,\n appResults: (apps === null || apps === void 0 ? void 0 : apps.length) || 0,\n servicesResults: (services === null || services === void 0 ? void 0 : services.length) || 0,\n cloudsIndustry: (cloudsIndustry === null || cloudsIndustry === void 0 ? void 0 : cloudsIndustry.length) || 0,\n bundleAppResults: bundleCount,\n duration,\n origin: ((_apps_ = apps[0]) === null || _apps_ === void 0 ? void 0 : _apps_.origin) || ((_services_ = services[0]) === null || _services_ === void 0 ? void 0 : _services_.origin) || ((_cloudsIndustry_ = cloudsIndustry[0]) === null || _cloudsIndustry_ === void 0 ? void 0 : _cloudsIndustry_.origin) || null,\n topResults: takeTopResults({\n apps,\n services,\n cloudsIndustry\n }),\n requestId,\n searchResponseId\n });\n searchPhase = Constants.FilteredSearchPhase.SearchTelemetryLogged;\n return [\n apps,\n services,\n cloudsIndustry\n ];\n }).catch((error)=>{\n var _error_response;\n logSearchTelemetry(Constants.Telemetry.ActionModifier.Error, {\n results: resultsString,\n searchTerm: searchString,\n duration: Date.now() - startTime,\n error: stringifyError(error),\n responseError: (_error_response = error.response) === null || _error_response === void 0 ? void 0 : _error_response.body,\n searchPhase\n });\n return [\n [],\n [],\n []\n ];\n });\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\n/** Get product from ARM, for private OR for public. If private or both do cannot be found, this means one of the following:\n * 1. There's an issue with catalog and ingestion (probably ICM)\n * 2. It's a preview offer, in that case there should be flightcode with the request\n * */ export function getProduct(entityId, market) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n dispatch(createFetchingProductAction());\n let product;\n try {\n const mprpAppData = yield armRestClient.getPrivateOrPublicPublicId(entityId, market); // Catches restricted audience\n product = new Product(mprpAppData);\n } catch (ex) {\n // Search for preview offer in CatalogApi with flightCode.\n // Call from armRestClient doesn't accept flight code so we have to call catalogApi directly.\n // This is relevant for publishers who want to test the preview without adding themselves to the restricted audience list for preview\n const flightCodes = getState().config.flightCodes;\n const mprpAppData = yield catalogApiRestClient.getProduct(entityId, flightCodes, market);\n product = new Product(mprpAppData);\n } finally{\n dispatch(createProduct({\n id: entityId,\n product\n }));\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function performPartnersSearch(searchString) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const startTime = Date.now();\n const searchPhase = Constants.FilteredSearchPhase.Started;\n const resultsString = Constants.searchTypeString.Partners;\n searchString = getSearchQuery(searchString);\n dispatch(createSearchboxInputChangedAction({\n searchString\n }));\n if (searchString.length < 2) {\n return;\n }\n const partnerSearchResponse = yield entityRestClient.searchPartners(searchString, getState().config.locale || Constants.DefaultLocale, getState().config.partnersApiHost).catch((error)=>{\n logSearchTelemetry(Constants.Telemetry.ActionModifier.Error, {\n results: resultsString,\n searchTerm: searchString,\n duration: Date.now() - startTime,\n error: stringifyError(error),\n searchPhase\n });\n return [\n [],\n [],\n []\n ];\n });\n let partnerSearchResults = [];\n if (partnerSearchResponse && partnerSearchResponse.suggestions) {\n partnerSearchResults = partnerSearchResponse.suggestions.map((suggestion)=>{\n return {\n id: suggestion.val,\n logo: undefined,\n text: suggestion.text,\n type: Constants.searchItemType.partner,\n original: {\n type: suggestion.type,\n val: suggestion.val,\n text: suggestion.text\n }\n };\n });\n }\n dispatch(createPartnerSearchResultsReceivedAction({\n partnerSearchResults\n }));\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function performSearchAll(rawSearchText, // eslint-disable-next-line @typescript-eslint/no-unused-vars\nsearchSortingOption = Constants.SearchSortingOption.BestMatch) {\n return function(dispatch) {\n return dispatchSearchQueryChangedAction(dispatch, rawSearchText);\n };\n}\nexport function getAppPricing(entityId) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const { isEmbedded, billingCountryCode: billingRegion, flightCodes, featureFlags } = getState().config;\n const urlQuery = getActiveFeaturedFlags(featureFlags);\n let appPricing$;\n if (__CLIENT__) {\n appPricing$ = entityRestClient.getAppPricing({\n entityId,\n isEmbedded,\n flightCodes,\n billingRegion,\n urlQuery\n });\n } else {\n appPricing$ = pricingViewService.getAppDetailPricing({\n request: mockRequest({\n state: getState()\n }),\n entityId,\n isEmbedded,\n billingRegion,\n flightCodes,\n featureFlags\n });\n }\n let futurePrices$;\n if (__CLIENT__) {\n futurePrices$ = entityRestClient.getFuturePrices({\n entityId,\n isEmbedded,\n flightCodes,\n billingRegion\n });\n } else {\n futurePrices$ = pricingViewService.getAppDetailFuturePricing({\n request: mockRequest({\n state: getState()\n }),\n entityId,\n isEmbedded,\n billingRegion,\n flightCodes,\n featureFlags\n });\n }\n const [pricing, futurePrices] = yield Promise.all([\n appPricing$.catch((error)=>{\n dispatch(createAppDetailPricingReceivedAction({\n entityId,\n pricing: {\n billingRegion\n },\n futurePrices: null\n }));\n throw error;\n }),\n futurePrices$.catch(()=>{\n // If the request for future price failed the PDP will be load without future price.\n return null;\n })\n ]);\n dispatch(createAppDetailPricingReceivedAction({\n entityId,\n pricing,\n futurePrices\n }));\n return [\n pricing,\n futurePrices\n ];\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function getAppDetail(entityId, isPrivate) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const { billingCountryCode: billingRegion, flightCodes } = getState().config;\n let entityDetails$;\n if (isPrivate) {\n entityDetails$ = ensurePrivateOffer(entityId, billingRegion, getState);\n } else {\n if (__CLIENT__) {\n entityDetails$ = entityRestClient.getApp({\n entityId,\n flightCodes\n });\n } else {\n entityDetails$ = detailsViewService.getAppDetailView({\n entityId,\n flightCodes,\n request: mockRequest({\n state: getState()\n })\n });\n }\n }\n const entityDetails = yield entityDetails$;\n if (isPrivate) {\n dispatch(createEntityFullDataReceivedAction({\n entityType: Constants.EntityType.App,\n entityDetails\n }));\n } else {\n dispatch(createEntityDetailsReceivedAction({\n entityType: Constants.EntityType.App,\n entityDetails\n }));\n dispatch(createEntityDetailsReceivedAction({\n entityType: Constants.EntityType.CloudsIndustry,\n entityDetails\n }));\n if (getState().apps.pricingPayload) {\n dispatch(createAppPricingDataReceivedAction({\n entityId,\n pricingPayload: getState().apps.pricingPayload\n }));\n }\n }\n return entityDetails;\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function getAppRelatedAppsItems(entityId) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n var _getProductByUrlKey;\n const action = Constants.Telemetry.Action.GetAppSuggestedItems;\n const start = Date.now();\n const embedHost = (_getProductByUrlKey = getProductByUrlKey({\n urlKey: getState().config.embedHost\n })) === null || _getProductByUrlKey === void 0 ? void 0 : _getProductByUrlKey.UrlKey;\n telemtry(action, Constants.Telemetry.ActionModifier.Start, {\n entityId,\n embedHost\n });\n dispatch(createRelatedAppsItemsLoadingAction({\n entityType: Constants.EntityType.App,\n entityId\n }));\n let relatedAppsItems$;\n if (__CLIENT__) {\n relatedAppsItems$ = entityRestClient.getAppRelatedAppsItems(entityId, embedHost);\n } else {\n relatedAppsItems$ = tilesViewService.getAppRelatedAppsItemsView({\n entityId,\n embedHost,\n request: mockRequest({\n state: getState()\n }),\n flightCodes: getState().config.flightCodes\n });\n }\n try {\n var _relatedAppsItems_suggestedItems, _relatedAppsItems_saasLinkingItems, _relatedAppsItems_linkedAddIns;\n const relatedAppsItems = (yield relatedAppsItems$) || {\n saasLinkingItems: [],\n suggestedItems: [],\n linkedAddIns: []\n };\n telemtry(action, Constants.Telemetry.ActionModifier.End, {\n duration: Date.now() - start,\n entityId,\n suggestedItems: (_relatedAppsItems_suggestedItems = relatedAppsItems.suggestedItems) === null || _relatedAppsItems_suggestedItems === void 0 ? void 0 : _relatedAppsItems_suggestedItems.map((item)=>item.entityId),\n saasLinkingItems: (_relatedAppsItems_saasLinkingItems = relatedAppsItems.saasLinkingItems) === null || _relatedAppsItems_saasLinkingItems === void 0 ? void 0 : _relatedAppsItems_saasLinkingItems.map((item)=>item.entityId),\n linkedAddIns: (_relatedAppsItems_linkedAddIns = relatedAppsItems.linkedAddIns) === null || _relatedAppsItems_linkedAddIns === void 0 ? void 0 : _relatedAppsItems_linkedAddIns.map((item)=>item.entityId)\n });\n dispatch(createRelatedAppsItemsReceivedAction({\n entityType: Constants.EntityType.App,\n entityId,\n relatedAppsItems\n }));\n if (getState().apps.pricingPayload) {\n dispatch(createRelatedAppsItemsPricingDataReceivedAction(getState().apps.pricingPayload));\n }\n return relatedAppsItems;\n } catch (error) {\n telemtry(action, Constants.Telemetry.ActionModifier.Error, {\n duration: Date.now() - start,\n entityId,\n error: stringifyError(error)\n });\n throw error;\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function getServiceRelatedAppsItems(entityId) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const start = Date.now();\n const action = Constants.Telemetry.Action.GetServiceSuggestedItems;\n const query = getState().config.query;\n const country = extractCountryCodeFromQueryParam(query);\n const region = query && query.region || getState().services.selectedRegion;\n telemtry(action, Constants.Telemetry.ActionModifier.Start, {\n entityId\n });\n dispatch(createRelatedAppsItemsLoadingAction({\n entityType: Constants.EntityType.Service,\n entityId\n }));\n try {\n var _relatedAppsItems_suggestedItems, _relatedAppsItems_saasLinkingItems, _relatedAppsItems_linkedAddIns;\n let relatedAppsItems$;\n if (__CLIENT__) {\n relatedAppsItems$ = entityRestClient.getServiceRelatedAppsItems(entityId, country, region);\n } else {\n relatedAppsItems$ = servicesViewService.getServiceSuggestedItemsView({\n country,\n region,\n entityId,\n request: mockRequest({\n state: getState()\n })\n });\n }\n const relatedAppsItems = (yield relatedAppsItems$) || {\n saasLinkingItems: [],\n suggestedItems: [],\n linkedAddIns: []\n };\n telemtry(action, Constants.Telemetry.ActionModifier.End, {\n duration: Date.now() - start,\n entityId,\n suggestedItems: (_relatedAppsItems_suggestedItems = relatedAppsItems.suggestedItems) === null || _relatedAppsItems_suggestedItems === void 0 ? void 0 : _relatedAppsItems_suggestedItems.map((item)=>item.entityId),\n saasLinkingItems: (_relatedAppsItems_saasLinkingItems = relatedAppsItems.saasLinkingItems) === null || _relatedAppsItems_saasLinkingItems === void 0 ? void 0 : _relatedAppsItems_saasLinkingItems.map((item)=>item.entityId),\n linkedAddIns: (_relatedAppsItems_linkedAddIns = relatedAppsItems.linkedAddIns) === null || _relatedAppsItems_linkedAddIns === void 0 ? void 0 : _relatedAppsItems_linkedAddIns.map((item)=>item.entityId)\n });\n dispatch(createRelatedAppsItemsReceivedAction({\n entityType: Constants.EntityType.Service,\n entityId,\n relatedAppsItems\n }));\n return relatedAppsItems;\n } catch (error) {\n telemtry(action, Constants.Telemetry.ActionModifier.Error, {\n duration: Date.now() - start,\n entityId,\n error: stringifyError(error)\n });\n throw error;\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function changeBillingRegion({ countryCode, shouldSetCountyCodeCookie = true }) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const { billingCountryCode, pricingDataLoaded, featureFlags } = getState().config;\n const urlQuery = getActiveFeaturedFlags(featureFlags);\n if (!countryCode) {\n countryCode = getCookieItem(Constants.Cookies.billingRegionCookie, false) || AzureEnvironmentSettings.defaultCountryCode;\n dispatch(createBillingRegionReadFromCookieAction({\n billingRegion: countryCode\n }));\n }\n if (countryCode === billingCountryCode && pricingDataLoaded) {\n return;\n }\n dispatch(createAppPricingDataRequestedAction(null));\n try {\n const appsPricings = yield entityRestClient.getAllAppsPricing({\n billingRegion: countryCode,\n urlQuery\n });\n const { billingRegion, startingPrices } = appsPricings || {};\n if (billingRegion && shouldSetCountyCodeCookie) {\n saveCookieItem(Constants.Cookies.billingRegionCookie, billingRegion);\n }\n const pricingPayload = {\n pricingData: startingPrices,\n countryCode: billingRegion\n };\n dispatch(createAppsPricingDataReceivedAction(pricingPayload));\n dispatch(createFavouriteAppsPricingDataReceivedAction(pricingPayload));\n dispatch(createRelatedAppsItemsPricingDataReceivedAction(pricingPayload));\n dispatch(createRecommendedAppsItemsPricingDataReceivedAction(pricingPayload));\n return appsPricings;\n } catch (error) {\n const pricingPayload = {\n pricingData: {},\n countryCode\n };\n dispatch(createAppsPricingDataReceivedAction(pricingPayload));\n dispatch(createRecommendedAppsItemsPricingDataReceivedAction(pricingPayload));\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction updateUserInfoForEmbed(userInfo) {\n const cookie = getCookieItem('appsourcelead');\n let isAlternateEmailFromCookie = false;\n if (cookie && cookie.alternateEmail && cookie.email) {\n const userEmail = userInfo && userInfo.email ? userInfo.email.toLowerCase() : ' ';\n // If userInfo already has alternateEmail (from graph call on server), do NOT overwrite it here\n // also ensure that cookie's email is matching useremail to avoid scenario where user signs in into other sites that updated the cookie to some MSA\n if (!userInfo.alternateEmail && userEmail === cookie.email.toLowerCase()) {\n userInfo.alternateEmail = cookie.alternateEmail;\n isAlternateEmailFromCookie = true;\n }\n }\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.PageLoad,\n actionModifier: Constants.Telemetry.ActionModifier.CookieData,\n details: JSON.stringify({\n alternateEmailExists: !!(cookie && cookie.alternateEmail),\n emailHasOnMicrosoft: userInfo && userInfo.email ? isOnMicrosoftEmail(userInfo.email) : false,\n alternateEmailFromCookie: isAlternateEmailFromCookie\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n return userInfo;\n}\nexport function sendLead(payload) {\n return /*#__PURE__*/ _async_to_generator(function*() {\n const requestId = generateGuid();\n telemtry(Constants.Telemetry.Action.SendLead, Constants.Telemetry.ActionModifier.InProgress, {\n payload: scrubLeadPayload(payload),\n requestId\n });\n const startTime = Date.now();\n try {\n yield leadgenRestClient.sendLead(payload, {\n requestId\n });\n telemtry(Constants.Telemetry.Action.SendLead, Constants.Telemetry.ActionModifier.End, {\n duration: Date.now() - startTime,\n requestId\n });\n } catch (error) {\n const errorMessage = stringifyError(error);\n telemtry(Constants.Telemetry.Action.SendLead, Constants.Telemetry.ActionModifier.Error, {\n errorMessage,\n duration: Date.now() - startTime,\n requestId\n });\n throw new Error(errorMessage);\n }\n });\n}\nexport function sendLeadInfo({ item, ctaType, notes, planId }) {\n return function(dispatch, getState) {\n try {\n telemtry(Constants.Telemetry.Action.SendLeadInfo, Constants.Telemetry.ActionModifier.Start, {});\n if (!item) {\n throw new Error(Constants.Telemetry.LeadsDropReason.ItemNotAvailable);\n }\n const isService = item.entityType === Constants.EntityType.Service;\n const state = getState();\n const userState = state.users;\n const customerInfo = {\n firstName: userState.profile.firstName,\n lastName: userState.profile.lastName,\n phone: userState.profile.phone,\n country: userState.profile.country,\n company: userState.profile.company,\n title: userState.profile.title\n };\n const { landingView, currentView, isEmbedded, embedHost } = state.config;\n const url = getWindow().location.href;\n const campaigns = getCampaignsForAcquisitionFromUrl({\n url,\n landingView,\n currentView,\n previousPage,\n routes,\n entityId: item.entityId\n });\n const privateApp = isService ? false : item === null || item === void 0 ? void 0 : item.privateApp;\n const actionCode = isService ? Constants.ActionCodes.ConsultingServices : undefined;\n const payload = createLeadPayload({\n entityId: item.entityId,\n privateApp,\n ctaType,\n actionCode,\n campaigns,\n customerInfo,\n notes,\n uniquePlanId: planId,\n isEmbedded,\n embedHost\n });\n return Promise.all([\n dispatch(sendLead(payload)),\n dispatch(createClearUserPropertiesAction(null))\n ]);\n } catch (error) {\n telemtry(Constants.Telemetry.Action.SendLeadInfo, Constants.Telemetry.ActionModifier.Error, {\n error\n });\n throw error;\n }\n };\n}\nexport function loadUserProductReviewMetadata({ legacyId }) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const { reviewsAPI, reviewsAPIVersion, featureFlags: { ReviewsMyCommentsFilter } } = getState().config;\n if (ReviewsMyCommentsFilter === 'true') {\n try {\n const { commentReviewIds } = yield reviewsCatalogRestClient.getReviewsMetadata({\n reviewsAPI,\n reviewsAPIVersion,\n legacyId\n });\n dispatch(createEntityUserCommentedReviewIdsUpdateListAction({\n commentReviewIds\n }));\n } catch (error) {\n launchReviewsTelemetry(Constants.Telemetry.Action.Error, Constants.Telemetry.ActionModifier.ReviewItemCommentedReviewIds, {\n error\n });\n logger.error(stringifyError(error), {\n action: Constants.Telemetry.Action.Error,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemCommentedReviewIds\n });\n dispatch(createEntityUserCommentedReviewIdsUpdateListAction({\n commentReviewIds: []\n }));\n }\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function getReviews(authMethod, authKey, entityId) {\n return function() {\n return reviewRestClient.get(authMethod, authKey, entityId);\n };\n}\nexport function deleteReview(reviewFormData) {\n return function(dispatch, getState) {\n const { reviewsAPI, reviewsAPIVersion } = getState().config;\n const { reviewId, offerId } = reviewFormData;\n return userReviewRestClient.remove({\n reviewsAPI,\n reviewsAPIVersion,\n reviewId\n }).then(()=>dispatch(getAppReviews(offerId)), dispatch(loadUserProductReviewMetadata({\n legacyId: offerId\n })));\n };\n}\nexport function submitReview(reviewFormData) {\n return function(dispatch, getState) {\n const { reviewsAPI, reviewsAPIVersion, storefrontName: source } = getState().config;\n const { offerId } = reviewFormData;\n return userReviewRestClient.submit(_object_spread_props(_object_spread({\n reviewsAPI,\n reviewsAPIVersion\n }, reviewFormData), {\n source\n })).then(()=>dispatch(getAppReviews(offerId)));\n };\n}\nexport function updateReview(reviewFormData) {\n return function(dispatch, getState) {\n const { reviewsAPI, reviewsAPIVersion } = getState().config;\n const { offerId } = reviewFormData;\n return userReviewRestClient.update(_object_spread({\n reviewsAPI,\n reviewsAPIVersion\n }, reviewFormData)).then(()=>dispatch(getAppReviews(offerId)));\n };\n}\nexport function getReportEmbedToken(reportData) {\n return function() {\n return fieldHubRestClient.generateReportEmbedToken(reportData);\n };\n}\n// for appsource, we do not support field hub yet\nexport function updateFieldHubUserType() {\n return function() {\n return Promise.resolve();\n };\n}\nexport function getFilteredServiceData() {\n return function() {\n return Promise.resolve();\n };\n}\nexport function getAppReviewCommentCollection({ offerId, reviewId, page, itemsPerPage }) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const { reviewsAPI, reviewsAPIVersion } = getState().config;\n dispatch(createEntityReviewCommentsLoadingAction({\n offerId,\n reviewId,\n isLoading: true\n }));\n const res = yield appReviewCommentsRestClient.getAppReviewComments({\n offerId,\n reviewId,\n page,\n itemsPerPage,\n reviewsAPI,\n reviewsAPIVersion\n });\n dispatch(createEntityReviewCommentsUpdateTotalCommentCountAction({\n reviewId,\n offerId,\n totalComments: res.totalComments\n }));\n dispatch(createEntityReviewCommentsReceivedAction({\n offerId,\n reviewId,\n comments: res.comments,\n pageNumber: page\n }));\n dispatch(createEntityReviewCommentsLoadingAction({\n offerId,\n reviewId,\n isLoading: false\n }));\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function clearAppReviewCommentCollection({ offerId, reviewId }) {\n return function(dispatch) {\n dispatch(createEntityReviewCommentsCleanupAction({\n reviewId,\n offerId\n }));\n };\n}\nexport function ensureAppReviewCommentCollectionData({ offerId, reviewId, page, itemsPerPage }) {\n return function(dispatch) {\n dispatch(getAppReviewCommentCollection({\n offerId,\n reviewId,\n page,\n itemsPerPage\n }));\n };\n}\nexport function ensureAppReviewCommentCollectionStateInitialized({ offerId, reviewId, totalComments }) {\n return function(dispatch) {\n dispatch(createEntityReviewCommentsInitializeStateAction({\n offerId,\n reviewId,\n totalComments\n }));\n };\n}\nexport function ensureClearAppReviewCommentCollectionData({ offerId, reviewId }) {\n return function(dispatch) {\n dispatch(clearAppReviewCommentCollection({\n offerId,\n reviewId\n }));\n };\n}\nexport function createAppReviewComment({ offerId, reviewId, commentContent, isNewlyAddedComment = false }) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const { reviewsAPI, reviewsAPIVersion, storefrontName: source } = getState().config;\n dispatch(createEntityReviewCommentModalAction({\n showModal: true,\n modalMode: Constants.Reviews.ReviewCommentModalMode.Loading\n }));\n const actionResult = yield appReviewCommentsRestClient.createReviewComment({\n offerId,\n reviewId,\n commentContent,\n reviewsAPI,\n reviewsAPIVersion,\n source\n });\n dispatch(createEntityReviewCommentCreateResult({\n reviewId,\n offerId,\n actionResult,\n isNewlyAddedComment\n }));\n if (!actionResult || actionResult.error) {\n dispatch(createEntityReviewCommentModalAction({\n showModal: true,\n modalMode: actionResult.error === Constants.Reviews.ReviewCommentActionError.ContentViolation ? Constants.Reviews.ReviewCommentModalMode.ContentViolation : Constants.Reviews.ReviewCommentModalMode.CreateError\n }));\n } else {\n // Hide loader\n dispatch(createEntityReviewCommentModalAction({\n showModal: false,\n modalMode: Constants.Reviews.ReviewCommentModalMode.Loading\n }));\n dispatch(loadUserProductReviewMetadata({\n legacyId: offerId\n }));\n }\n return actionResult;\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function deleteReviewComment({ offerId, reviewId, commentId, isNewlyAddedComment = false }) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const { reviewsAPI, reviewsAPIVersion } = getState().config;\n const actionResult = yield appReviewCommentsRestClient.deleteReviewComment({\n offerId,\n reviewId,\n commentId,\n reviewsAPI,\n reviewsAPIVersion\n });\n dispatch(createEntityReviewCommentDeleteResult({\n reviewId,\n offerId,\n actionResult,\n isNewlyAddedComment\n }));\n dispatch(loadUserProductReviewMetadata({\n legacyId: offerId\n }));\n return actionResult;\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function updateReviewComment({ offerId, reviewId, commentId, commentContent, isNewlyAddedComment = false }) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const { reviewsAPI, reviewsAPIVersion } = getState().config;\n const actionResult = yield appReviewCommentsRestClient.updateReviewComment({\n offerId,\n reviewId,\n commentId,\n commentContent,\n reviewsAPI,\n reviewsAPIVersion\n });\n dispatch(createEntityReviewCommentUpdateResult({\n reviewId,\n offerId,\n actionResult,\n isNewlyAddedComment\n }));\n return actionResult;\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function loadUserMarkedAsHelpfulReviews({ offerId }) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const { reviewsAPI, reviewsAPIVersion } = getState().config;\n const { reviewIds, error } = yield appReviewMarkAsHelpfulRestClient.getUserReviewsMarkedAsHelpful({\n reviewsAPI,\n reviewsAPIVersion,\n offerId\n });\n if (!error) {\n dispatch(createEntityMarkedAsHelpfulReviewUpdateListAction({\n offerId,\n reviewIds\n }));\n } else {\n launchReviewsTelemetry(Constants.Telemetry.Action.Error, Constants.Telemetry.ActionModifier.ReviewsGetMarkedAsHelpful, {\n error\n });\n logger.error(JSON.stringify({\n error\n }), {\n action: Constants.Telemetry.Action.Error,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewsGetMarkedAsHelpful\n });\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function loadLinkedInProductGroup({ legacyOfferId }) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const { linkedinAPI, linkedinAPIVersion } = getState().config;\n try {\n const { linkedInProductGroup } = yield linkedInRestClient.getLinkedInProductgroupInfo({\n legacyOfferId,\n linkedinAPI,\n linkedinAPIVersion\n });\n dispatch(createEntityLinkedInProductGroupUpdateAction({\n legacyOfferId,\n linkedInProductGroup\n }));\n } catch (error) {\n launchReviewsTelemetry(Constants.Telemetry.Action.Error, Constants.Telemetry.ActionModifier.GetLinkedInProductGroup, {\n error\n });\n logger.error(stringifyError({\n error\n }), {\n action: Constants.Telemetry.Action.Error,\n actionModifier: Constants.Telemetry.ActionModifier.GetLinkedInProductGroup\n });\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function reportItem(itemReport) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const { communityAPI, communityAPIVersion } = getState().config;\n try {\n yield reportReviewRestClient.createReportReview({\n itemReport,\n communityAPI,\n communityAPIVersion\n });\n } catch (error) {\n launchReviewsTelemetry(Constants.Telemetry.Action.Error, Constants.Telemetry.ActionModifier.ReportReview, {\n error\n });\n logger.error(stringifyError({\n error\n }), {\n action: Constants.Telemetry.Action.Error,\n actionModifier: Constants.Telemetry.ActionModifier.ReportReview\n });\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function setReviewMarkedAsHelpful({ offerId, review, isHelpful }) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const state = getState();\n const { reviewsAPI, reviewsAPIVersion, storefrontName: source } = state.config;\n const { userReviewIdsLoading } = state.apps.appReviewsData.markedAsHelpful;\n const { id: reviewId, mark_as_helpful_count: prevMarkAsHelpfulCount } = review;\n const telemetryBasePayload = {\n offerId,\n reviewId,\n isHelpful\n };\n if (!userReviewIdsLoading[`${reviewId}`]) {\n dispatch(createEntityReviewSetIsHelpfulLoadingAction({\n reviewId,\n isLoading: true\n }));\n // Immediately update both the isHelpful value and the review's marked as helpful count to reflect the user's action\n dispatch(createEntityReviewSetIsHelpfulAction({\n reviewId,\n isHelpful\n }));\n dispatch(createEntityReviewSetMarkAsHelpfulCount({\n count: prevMarkAsHelpfulCount + (isHelpful ? 1 : -1),\n reviewId\n }));\n launchReviewsTelemetry(Constants.Telemetry.Action.Submitting, Constants.Telemetry.ActionModifier.ReviewSetMarkedAsHelpful, telemetryBasePayload);\n logger.info(JSON.stringify(telemetryBasePayload), {\n action: Constants.Telemetry.Action.Submitting,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewSetMarkedAsHelpful\n });\n const { error } = yield appReviewMarkAsHelpfulRestClient.setReviewMarkedAsHelpful({\n offerId,\n reviewId,\n reviewsAPI,\n reviewsAPIVersion,\n isHelpful,\n source: isHelpful ? source : null\n });\n if (error) {\n launchReviewsTelemetry(Constants.Telemetry.Action.SubmitError, Constants.Telemetry.ActionModifier.ReviewSetMarkedAsHelpful, _object_spread_props(_object_spread({}, telemetryBasePayload), {\n error\n }));\n logger.error(JSON.stringify(_object_spread_props(_object_spread({}, telemetryBasePayload), {\n error\n })), {\n action: Constants.Telemetry.Action.SubmitError,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewSetMarkedAsHelpful\n });\n // Display the error message\n dispatch(createEntityReviewMarkAsHelpfulModalAction({\n showModal: true\n }));\n // Set the is helpful and the count values back to what they were\n dispatch(createEntityReviewSetMarkAsHelpfulCount({\n count: prevMarkAsHelpfulCount,\n reviewId\n }));\n dispatch(createEntityReviewSetIsHelpfulAction({\n reviewId,\n isHelpful: !isHelpful\n }));\n } else {\n launchReviewsTelemetry(Constants.Telemetry.Action.Submitted, Constants.Telemetry.ActionModifier.ReviewSetMarkedAsHelpful, telemetryBasePayload);\n logger.info(JSON.stringify(telemetryBasePayload), {\n action: Constants.Telemetry.Action.Submitted,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewSetMarkedAsHelpful\n });\n }\n dispatch(createEntityReviewSetIsHelpfulLoadingAction({\n reviewId,\n isLoading: false\n }));\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function ensureAppDetailsData(entityId, isPrivate) {\n return function(dispatch, getState) {\n if (!entityId) {\n return Promise.resolve(false);\n }\n entityId = entityId.toLowerCase();\n if (entityId === getState().apps.entityIdLoading) {\n return Promise.resolve(false);\n }\n if (entityId === getState().apps.entityIdFailed) {\n return Promise.resolve(false);\n }\n const promises = [];\n if (shouldEnsureAppDetails(entityId, getState()) || isPrivate && shouldEnsureAppPricings(entityId, getState())) {\n promises.push(dispatch(getAppDetail(entityId, isPrivate)));\n }\n if (shouldEnsureAppPricings(entityId, getState()) && !isPrivate) {\n promises.push(dispatch(getAppPricing(entityId)));\n }\n if (shouldEnsureAppRelatedApps(entityId, getState()) && !isPrivate) {\n promises.push(dispatch(getAppRelatedAppsItems(entityId)));\n }\n if (!promises.length) {\n return Promise.resolve(false);\n }\n dispatch(createSetEntityIdLoadingAction({\n entityType: Constants.EntityType.App,\n entityId\n }));\n dispatch(createSetEntityIdFailedAction({\n entityType: Constants.EntityType.App,\n entityId: ''\n }));\n const start = Date.now();\n return Promise.all(promises).then(()=>{\n const payload = {\n page: getWindow() && getWindow().location.href,\n action: Constants.Telemetry.Action.EnsureAppDetailsData,\n actionModifier: Constants.Telemetry.ActionModifier.End,\n details: JSON.stringify({\n duration: Date.now() - start,\n entityId\n })\n };\n SharedInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n dispatch(createSetEntityIdLoadingAction({\n entityType: Constants.EntityType.App,\n entityId: ''\n }));\n return true;\n }).catch((error)=>{\n var _error_error;\n const payload = {\n page: getWindow() && getWindow().location.href,\n action: Constants.Telemetry.Action.EnsureAppDetailsData,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: JSON.stringify({\n duration: Date.now() - start,\n error: stringifyError(error)\n })\n };\n SharedInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n if ((error === null || error === void 0 ? void 0 : (_error_error = error.error) === null || _error_error === void 0 ? void 0 : _error_error.code) === StatusCodes.NOT_FOUND) {\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n } else {\n logger.error(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n }\n dispatch(createSetEntityIdLoadingAction({\n entityType: Constants.EntityType.App,\n entityId: ''\n }));\n dispatch(createSetEntityIdFailedAction({\n entityType: Constants.EntityType.App,\n entityId\n }));\n throw error;\n });\n };\n}\nexport function getServiceDetail(entityId) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const state = getState();\n const { flightCodes } = state.config;\n try {\n let serviceDetailData$;\n if (__CLIENT__) {\n serviceDetailData$ = entityRestClient.getServices(entityId, undefined, undefined, flightCodes);\n } else {\n serviceDetailData$ = servicesDetailsViewService.getServiceDetailView({\n entityId,\n flightCodes,\n request: mockRequest({\n state: getState()\n })\n });\n }\n const serviceDetailData = yield serviceDetailData$;\n const dispatchActionAndResolve = ()=>{\n dispatch(createEntityDetailsReceivedAction({\n entityType: Constants.EntityType.Service,\n entityDetails: serviceDetailData\n }));\n dispatch(createEntityDetailsReceivedAction({\n entityType: Constants.EntityType.CloudsIndustry,\n entityDetails: serviceDetailData\n }));\n return serviceDetailData;\n };\n dispatchActionAndResolve();\n } catch (error) {\n // we can recover from not getting app details, but for now I do not want to (no designed experience)\n // the below dispatch is to make sure\n dispatch(createEntityDetailsReceivedAction({\n entityType: Constants.EntityType.Service,\n entityDetails: null\n }));\n dispatch(createEntityDetailsReceivedAction({\n entityType: Constants.EntityType.CloudsIndustry,\n entityDetails: null\n }));\n throw error;\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function ensureServiceDetailsData(entityId) {\n return function(dispatch, getState) {\n if (!entityId) {\n return Promise.resolve(false);\n }\n entityId = entityId.toLowerCase();\n if (entityId === getState().services.entityIdLoading) {\n return Promise.resolve(false);\n }\n if (entityId === getState().services.entityIdFailed) {\n return Promise.resolve(false);\n }\n const promises = [];\n if (shouldEnsureServiceDetails(entityId, getState())) {\n promises.push(dispatch(getServiceDetail(entityId)));\n }\n if (shouldEnsureServiceRelatedApps(entityId, getState())) {\n promises.push(dispatch(getServiceRelatedAppsItems(entityId)));\n }\n if (!promises.length) {\n return Promise.resolve(false);\n }\n dispatch(createSetEntityIdFailedAction({\n entityType: Constants.EntityType.Service,\n entityId: ''\n }));\n dispatch(createSetEntityIdLoadingAction({\n entityType: Constants.EntityType.Service,\n entityId\n }));\n const start = Date.now();\n return Promise.all(promises).then(()=>{\n const payload = {\n page: getWindow() && getWindow().location.href,\n action: Constants.Telemetry.Action.EnsureServiceDetailsData,\n actionModifier: Constants.Telemetry.ActionModifier.End,\n details: JSON.stringify({\n duration: Date.now() - start,\n entityId\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n dispatch(createSetEntityIdLoadingAction({\n entityType: Constants.EntityType.Service,\n entityId: ''\n }));\n return true;\n }).catch((error)=>{\n const payload = {\n page: getWindow() && getWindow().location.href,\n action: Constants.Telemetry.Action.EnsureServiceDetailsData,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: JSON.stringify({\n duration: Date.now() - start,\n error: stringifyError(error)\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.error(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n dispatch(createSetEntityIdLoadingAction({\n entityType: Constants.EntityType.Service,\n entityId: ''\n }));\n dispatch(createSetEntityIdFailedAction({\n entityType: Constants.EntityType.Service,\n entityId\n }));\n throw error;\n });\n };\n}\nexport function getUserProfile() {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n // user must be signed to get user profile and flag ProfileExp\n if (!getState().users.signedIn || !(getState().config.featureFlags.ProfileExp === 'true')) {\n return;\n }\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.getUserProfile,\n actionModifier: Constants.Telemetry.ActionModifier.Start,\n details: ''\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n dispatch(createUserProfileLoadingAction({\n isLoading: true\n }));\n try {\n const userProfile = yield userRestClient.getUserProfile();\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', _object_spread_props(_object_spread({}, payload), {\n actionModifier: Constants.Telemetry.ActionModifier.End\n }));\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: Constants.Telemetry.ActionModifier.End\n });\n dispatch(createUserProfileAction(userProfile));\n } catch (err) {\n const stringifiedError = stringifyError(err);\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', _object_spread_props(_object_spread({}, payload), {\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: stringifiedError\n }));\n logger.info(stringifiedError, {\n action: payload.action,\n actionModifier: Constants.Telemetry.ActionModifier.Error\n });\n } finally{\n dispatch(createUserProfileLoadingAction({\n isLoading: false\n }));\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function getCustomers() {\n return function(dispatch, getState) {\n const user = getState().users;\n if (!user || !user.signedIn || user.isMSAUser) {\n return Promise.resolve();\n }\n return new Promise((resolve)=>{\n purchaseRestClient.getCustomers({\n oid: user.oid,\n tid: user.tid\n }).then((customers)=>{\n dispatch(createSetCustomersAction(customers));\n if (customers && customers.length > 0) {\n let selectedCustomer = customers.filter((x)=>x.type === CustomerType.Organization);\n if (selectedCustomer.length === 0) {\n selectedCustomer = customers.filter((x)=>x.type === CustomerType.Individual);\n }\n if (selectedCustomer && selectedCustomer.length > 0) {\n dispatch(createSetActiveCustomerAction(selectedCustomer[0]));\n }\n }\n resolve();\n }).catch((error)=>{\n logError('thunkActions.getCustomers', error);\n });\n });\n };\n}\nexport function getUserTenantsDetails() {\n return function(dispatch, getState) {\n const state = getState();\n if (!getState().users.signedIn && !state.config.isEmbedded) {\n return Promise.resolve();\n }\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.GetTenantDetails,\n actionModifier: Constants.Telemetry.ActionModifier.Start,\n details: JSON.stringify({\n isSignedIn: state.users.signedIn,\n tid: state.users.tid\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n dispatch(createUserTenantsDetailsLoadingAction({\n isLoading: true,\n hasError: false\n }));\n return userRestClient.getUserTenantsDetails().then(({ value })=>{\n const selectedTenant = value.find((tenant)=>state.users.tid === tenant.tenantId) || {\n tenantId: '',\n displayName: '',\n defaultDomain: '',\n countryCode: '',\n domains: [],\n id: '',\n tenantCategory: '',\n tenantType: '',\n azureSubscriptions: {}\n };\n dispatch(createUserTenantsDetailsAction(selectedTenant));\n dispatch(createUserTenantsDetailsLoadingAction({\n isLoading: false,\n hasError: false\n }));\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', _object_spread_props(_object_spread({}, payload), {\n actionModifier: Constants.Telemetry.ActionModifier.End\n }));\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: Constants.Telemetry.ActionModifier.End\n });\n }).catch((error)=>{\n dispatch(createUserTenantsDetailsLoadingAction({\n isLoading: false,\n hasError: true\n }));\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', _object_spread_props(_object_spread({}, payload), {\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: JSON.stringify({\n isSignedIn: state.users.signedIn,\n tid: state.users.tid,\n error\n })\n }));\n logger.error(JSON.stringify({\n isSignedIn: state.users.signedIn,\n tid: state.users.tid,\n error\n }), {\n action: payload.action,\n actionModifier: Constants.Telemetry.ActionModifier.Error\n });\n });\n };\n}\nexport function getUserBillingAccounts() {\n return function(dispatch, getState) {\n const state = getState();\n if (!state.users.signedIn && !state.config.isEmbedded) {\n return Promise.resolve();\n }\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.getUserBillingAccounts,\n actionModifier: Constants.Telemetry.ActionModifier.Start,\n details: JSON.stringify({\n isSignedIn: state.users.signedIn,\n tid: state.users.tid\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n dispatch(createSetAccountIsLoadingAction({\n isLoading: true\n }));\n return userRestClient.getUserBillingAccounts().then((billingAccounts)=>{\n const billingEAAccounts = billingAccounts.value.filter((account)=>{\n const { properties: { agreementType, accountType } } = account;\n return (agreementType === BillingAgreementType.EnterpriseAgreement || agreementType === BillingAgreementType.MicrosoftCustomerAgreement) && accountType === BillingAccountType.Enterprise;\n });\n dispatch(createSetAccountAction({\n isLoading: false,\n isEAAccount: !!billingEAAccounts.length,\n accounts: billingAccounts.value,\n hasError: false\n }));\n payload.details = JSON.stringify({\n isSignedIn: state.users.signedIn,\n tid: state.users.tid,\n billingEAAccounts\n });\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', _object_spread_props(_object_spread({}, payload), {\n actionModifier: Constants.Telemetry.ActionModifier.End\n }));\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: Constants.Telemetry.ActionModifier.End\n });\n }).catch((error)=>{\n createSetAccountAction({\n isLoading: false,\n isEAAccount: false,\n accounts: null,\n hasError: true\n });\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', _object_spread_props(_object_spread({}, payload), {\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: JSON.stringify({\n isSignedIn: state.users.signedIn,\n tid: state.users.tid,\n error\n })\n }));\n logger.error(JSON.stringify({\n isSignedIn: state.users.signedIn,\n tid: state.users.tid,\n error: stringifyError(error)\n }), {\n action: payload.action,\n actionModifier: Constants.Telemetry.ActionModifier.Error\n });\n });\n };\n}\nexport function getTenantType() {\n return function(dispatch, getState) {\n const user = getState().users;\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.GetTenantType,\n actionModifier: Constants.Telemetry.ActionModifier.Start,\n details: JSON.stringify({\n isSignedIn: user.signedIn,\n isMSAUser: user.isMSAUser\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n if (!user.signedIn) {\n // if user is not signed in we cannot make this call\n return Promise.resolve();\n }\n if (user.isMSAUser) {\n dispatch(createSetTenantTypeAction(Constants.TenantType.Msa));\n return Promise.resolve();\n }\n // Prefetch the customer checkout page performance.\n dispatch(getCustomers());\n return new Promise((resolve)=>{\n const email = user.email;\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.GetTenantType,\n actionModifier: Constants.Telemetry.ActionModifier.Debug,\n details: JSON.stringify({\n isSignedIn: user.signedIn,\n isMSAUser: user.isMSAUser,\n hasEmail: !!email\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.debug(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n });\n };\n}\nexport function checkAdminMemberships() {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const state = getState();\n if (!state.users.signedIn || state.config.isEmbedded) {\n return Promise.resolve();\n }\n try {\n const adminMemberships = yield graphRestClient.checkAdminMemberShips();\n if (adminMemberships) {\n dispatch(createUpdateUserRoleDefinitions(adminMemberships));\n }\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.GetUserTenantInfo,\n actionModifier: Constants.Telemetry.ActionModifier.Info,\n details: JSON.stringify({\n adminType: adminMemberships\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n } catch (error) {\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.GetUserTenantInfo,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: stringifyError(error)\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.error(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function updateUser({ userDetails }) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n HttpModule.updateAccessToken(userDetails.accessToken);\n dispatch(createUserLoginDetailsAction(userDetails));\n // dispatch finished loading\n dispatch(createUserSignInFetchStatusAction({\n loading: false\n }));\n // update user data\n dispatch(getUserProfile());\n dispatch(fetchUserFavourites());\n dispatch(checkAdminMemberships());\n if (getState().config.isAppSource && !getState().config.isEmbedded) {\n dispatch(getUserTenantsDetails());\n dispatch(getTenantType());\n dispatch(getUserBillingAccounts());\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function updateUserProfile(data) {\n return function(dispatch) {\n return Promise.resolve().then(()=>{\n dispatch(createUpdateUserProfileAction(data));\n return Promise.resolve();\n })// eslint-disable-next-line node/handle-callback-err\n .catch(()=>{\n return Promise.resolve();\n });\n };\n}\nexport function getDynamicCampaign(request) {\n return function(dispatch) {\n return new Promise((resolve, reject)=>{\n const dispatchActionAndResolve = (campaignData)=>{\n dispatch(createDynamicCampaignReceivedAction({\n campaignInfo: campaignData\n }));\n resolve();\n };\n dynamicCampaignRestClient.getDynamicCampaign(request).then((campaignHtml)=>{\n dispatchActionAndResolve({\n html: campaignHtml\n });\n }).catch((error)=>{\n if (error.status !== 404) {\n // dispatch a received campaign action with no campaign info (null)\n dispatchActionAndResolve(null);\n }\n reject(error);\n });\n });\n };\n}\nexport function createCustomer() {\n return function(dispatch, getState) {\n dispatch(createClearErrorAction());\n const customers = getState().checkout.customers;\n if (customers && customers.length > 0) {\n // check to see if we already have a customer, if so, don't create it\n return Promise.resolve();\n }\n return new Promise((resolve, reject)=>{\n // new customer that's not bootstrapped, create the customer\n let firstName = getState().users.firstName;\n let lastName = getState().users.lastName;\n const displayName = getState().users.displayName;\n // firstname/lastname are required, so check if we have them otherwise work around the issue\n if (!firstName && !lastName && displayName) {\n firstName = displayName;\n lastName = '-';\n } else if (!firstName) {\n firstName = '-';\n lastName = '-';\n } else if (!lastName) {\n lastName = '-';\n }\n const newCustomer = {\n type: CustomerType.Individual,\n address: {\n firstName,\n lastName,\n country: getState().config.billingCountryCode.toUpperCase()\n }\n };\n purchaseRestClient.createCustomer(newCustomer).then((response)=>{\n // create response does not include the address, so we need to update that ourselves\n const customer = _object_spread_props(_object_spread({}, response), {\n address: newCustomer.address\n });\n dispatch(createSetActiveCustomerAction(customer));\n resolve();\n }).catch((error)=>{\n dispatch(createErrorAction());\n reject(error);\n });\n });\n };\n}\nexport function updateCustomer(address) {\n return function(dispatch) {\n return new Promise((resolve)=>{\n purchaseRestClient.updateCustomer(address).then(()=>{\n dispatch(createUpdateCustomerAction(address));\n resolve();\n }).catch((error)=>{\n logError('thunkActions.updateCustomer', error);\n });\n });\n };\n}\nexport function generatePublisherOffer(subscriptionId) {\n return function(dispatch) {\n return new Promise((resolve, reject)=>{\n purchaseRestClient.getPublisherOfferInfo(subscriptionId).then((response)=>{\n dispatch(createSetPublisherTokenResponse(response));\n resolve();\n }).catch((error)=>{\n dispatch(createSetPublisherTokenResponse({}));\n reject(error);\n });\n });\n };\n}\nexport function preWarmAccount(addTestHeader) {\n return function(_, getState) {\n const { config: { commerceApiHost } } = getState();\n try {\n commerceApiRestClient.preWarmAccount({\n commerceApiHost,\n addTestHeader\n });\n } catch (ex) {}\n };\n}\nexport function updatePurchaseStatus() {\n return (dispatch, getState)=>{\n const reviewsData = getState().apps.appReviewsData;\n dispatch(createGetAppReviewsAction(_object_spread_props(_object_spread({}, reviewsData), {\n isPurchased: true\n })));\n };\n}\nexport function setStorefrontName(storefrontName) {\n return (dispatch)=>{\n dispatch(createSetStorefrontNameAction(storefrontName));\n };\n}\nexport function getRecommenedSizes({ entityId, planId, createUiDefinitionEndpoint }) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n const { entityId: prevEntityId, planId: prevPlanId, loading } = getState().apps.recommendedSizesState;\n if (loading || prevEntityId === entityId && prevPlanId === planId) {\n return;\n }\n dispatch(createLoadingRecommenededSizes({\n entityId,\n planId\n }));\n try {\n const createUiDefinition = yield entityRestClient.getCreateUiDefinition({\n createUiDefinitionEndpoint\n });\n const recommendedSizes = parseCatalogRecommendedSizes(createUiDefinition);\n dispatch(createSetRecommenededSizes({\n entityId,\n planId,\n recommendedSizes\n }));\n } catch (error) {\n dispatch(createSetRecommenededSizes({\n entityId,\n planId,\n recommendedSizes: []\n }));\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\nexport function ensureCheckoutApp({ entityId }) {\n return /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(dispatch, getState) {\n try {\n return yield Promise.all([\n dispatch(getAppDetail(entityId, false)),\n dispatch(getAppPricing(entityId))\n ]);\n } catch (error) {\n const servicePromises = yield dispatch(ensureServiceDetailsData(entityId));\n const state = getState();\n const targetApp = state.services.dataList.find((offer)=>(offer === null || offer === void 0 ? void 0 : offer.entityId.toString().toLowerCase()) === entityId.toString().toLowerCase());\n if (targetApp === null || targetApp === void 0 ? void 0 : targetApp.isHiddenPrivateOffer) {\n return servicePromises;\n }\n throw error;\n }\n });\n return function(dispatch, getState) {\n return _ref.apply(this, arguments);\n };\n }();\n}\n","import { Constants } from '@shared/utils/constants';\nimport { logError } from '@shared/utils/httpClientUtil';\nimport { getAppConfig } from '@shared/services/init/appConfig';\nimport { logger } from '@src/logger';\nimport * as httpProtocol from './httpProtocol';\nexport function getProduct(productId, hideKey, market = 'US') {\n const endpoint = `${getAppConfig('MPRPHost')}/offers/${productId}`;\n const options = {\n requireCorrelationId: true,\n stringifyPostData: false,\n allowOrigin: true,\n authenticationType: httpProtocol.AuthenticationTypes.Unauthenticated,\n returnRawResponse: false\n };\n const get = httpProtocol.get(endpoint, options);\n if (hideKey) {\n get.addQueryEntry(`${Constants.QueryStrings.hideKeys}[0]`, hideKey);\n }\n return get.addQueryEntry(Constants.QueryStrings.apiVersion, Constants.mprpApiVersion).addQueryEntry(Constants.QueryStrings.market, market).request().catch((error)=>{\n logError('getProductById', error);\n logger.error('getProductById', {\n action: Constants.Telemetry.Action.getProduct,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n error\n });\n return Promise.reject(error);\n });\n}\n","import { Constants } from '@shared/utils/constants';\nimport { createSearchQueryChangedAction } from '@shared/actions/actions';\nexport function dispatchSearchQueryChangedAction(dispatch, searchText) {\n return Promise.resolve().then(()=>{\n dispatch(createSearchQueryChangedAction({\n performedQuery: searchText,\n entityType: Constants.EntityType.App\n }));\n dispatch(createSearchQueryChangedAction({\n performedQuery: searchText,\n entityType: Constants.EntityType.Service\n }));\n });\n}\nconst numProductsToTake = 5;\nconst takeTopN = (entities)=>{\n return entities.slice(0, numProductsToTake).map(({ entityId })=>entityId).join(', ');\n};\nexport const takeTopResults = ({ apps = [], cloudsIndustry = [], services = [] })=>{\n const topApps = takeTopN(apps);\n const topConsultingServices = takeTopN(services);\n const topIndustryClouds = takeTopN(cloudsIndustry);\n return JSON.stringify({\n topApps,\n topConsultingServices,\n topIndustryClouds\n });\n};\n","import * as httpProtocol from './httpProtocol';\nimport { Constants } from '../../utils/constants';\nimport { getAppConfig } from '../../services/init/appConfig';\nimport { logError } from '../../utils/httpClientUtil';\nexport function getUserProfile() {\n const endpoint = '/view/userProfile';\n const options = {\n requireCorrelationId: true,\n stringifyPostData: false,\n authenticationType: httpProtocol.AuthenticationTypes.MarketplaceLeads,\n setBearerHeader: true\n };\n const get = httpProtocol.get(endpoint, options);\n return get.request().catch((error)=>{\n logError('getUserProfile', error);\n return Promise.reject(error);\n });\n}\nexport function getUserTenantsDetails() {\n const endpoint = `${getAppConfig('armApiHost')}/tenants?api-version=2020-01-01`;\n const options = {\n requireCorrelationId: true,\n stringifyPostData: false,\n authenticationType: httpProtocol.AuthenticationTypes.Arm,\n setBearerHeader: false\n };\n const get = httpProtocol.get(endpoint, options);\n return get.request().catch((error)=>{\n logError('getUserTenantsDetails', error);\n return Promise.reject(error);\n });\n}\nexport function getUserBillingAccounts() {\n const endpoint = `${getAppConfig('armApiHost')}/providers/Microsoft.Billing/billingAccounts`;\n const options = {\n requireCorrelationId: true,\n stringifyPostData: false,\n allowOrigin: true,\n authenticationType: httpProtocol.AuthenticationTypes.Arm,\n contentType: 'application/json',\n returnRawResponse: false\n };\n const get = httpProtocol.get(endpoint, options);\n return get.addQueryEntry(Constants.QueryStrings.apiVersion, Constants.armBillingAccountsApiVersion).addQueryEntry(Constants.QueryStrings.expand, 'properties/enrollmentDetails').request().catch((error)=>{\n logError('getUserBillingAccounts', error);\n return Promise.reject(error);\n });\n}\n","import { actionCreator } from '@shared/actions/actions';\nexport const UpdateUserFavouriteFetchDataStatusAction = 'UpdateUserFavouriteFetchDataStatusAction';\nexport const createUpdateUserFavouriteFetchDataStatusAction = actionCreator(UpdateUserFavouriteFetchDataStatusAction);\nexport const ReceiveUserFavouriteDataAction = 'ReceiveUserFavouriteDataAction';\nexport const createReceiveUserFavouriteDataAction = actionCreator(ReceiveUserFavouriteDataAction);\nexport const DeleteUserFavouriteItemAction = 'DeleteUserFavouriteItemAction';\nexport const createDeleteUserFavouriteItemAction = actionCreator(DeleteUserFavouriteItemAction);\nexport const UpsertUserFavouriteItemAction = 'UpsertUserFavouriteItemAction';\nexport const createUpsertUserFavouriteItemAction = actionCreator(UpsertUserFavouriteItemAction);\nexport const FavouriteAppsPricingDataReceivedAction = 'FavouriteAppsPricingDataReceivedAction';\nexport const createFavouriteAppsPricingDataReceivedAction = actionCreator(FavouriteAppsPricingDataReceivedAction);\n","import * as httpProtocol from './httpProtocol';\nimport { Constants } from './../../utils/constants';\nimport { getAppConfig } from './../init/appConfig';\nimport { logError } from './../../utils/httpClientUtil';\nconst options = {\n requireCorrelationId: true,\n stringifyPostData: false,\n authenticationType: httpProtocol.AuthenticationTypes.Agreement,\n setBearerHeader: true\n};\nexport function getUserFavouriteItems() {\n const endpoint = Constants.UserFavourite.ViewEndpoint;\n const httpGet = httpProtocol.get(endpoint, options);\n return httpGet.addQueryEntry(Constants.QueryStrings.version, getAppConfig(Constants.marketplaceApiVersion)).request().catch((error)=>{\n logError('getUserFavouriteItems', error);\n return Promise.reject(error);\n });\n}\nexport function addUserFavouriteItem(payload) {\n const endpoint = Constants.UserFavourite.ViewEndpoint;\n const httpPost = httpProtocol.post(endpoint, options);\n return httpPost.addQueryEntry(Constants.QueryStrings.version, getAppConfig(Constants.marketplaceApiVersion)).setData(payload).request().catch((error)=>{\n logError('addUserFavouriteItem', error);\n return Promise.reject(error);\n });\n}\nexport function deleteUserFavouriteItem(entityGuid, applicationType) {\n const params = entityGuid;\n const endpoint = `${Constants.UserFavourite.ViewEndpoint}/${params}`;\n const httpDelete = httpProtocol.del(endpoint, options);\n return httpDelete.addQueryEntry(Constants.QueryStrings.version, getAppConfig(Constants.marketplaceApiVersion)).addQueryEntry(Constants.QueryStrings.applicationType, applicationType).request().catch((error)=>{\n logError('deleteUserFavouriteItem', error);\n return Promise.reject(error);\n });\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport * as favouriteRestClient from '@shared/services/http/userFavouriteRestClient';\nimport { createReceiveUserFavouriteDataAction, createUpdateUserFavouriteFetchDataStatusAction, createDeleteUserFavouriteItemAction, createUpsertUserFavouriteItemAction, createFavouriteAppsPricingDataReceivedAction } from '@shared/actions/userFavouriteActions';\nimport { Constants } from '@shared/utils/constants';\nimport { shouldPerformFetchFavourite, invalidateFavourites, validateFavourites, failedDataStatus, fetchPricing } from '@shared/utils/userFavouriteThunkActionUtils';\nimport { SharedInstrumentService } from '@shared/services/telemetry/shared/sharedInstrument';\nimport { getWindow } from '@shared/services/window';\nimport { stringifyError } from '@shared/utils/errorUtils';\nimport { logger } from '@src/logger';\n/**\n * fetch favourite if needed, i.e. favourite entity are invalid\n */ export function fetchUserFavourites() {\n return (dispatch, getState)=>{\n const favourite = getState().userFavourite;\n const user = getState().users;\n // if user is not signed in, we will\n // 1) skip fetching favourite\n // 2) update fetch status to invalid\n if (!user.signedIn) {\n // dispatch invalidate action only if needed\n if (favourite.fetchDataStatus !== Constants.UserFavourite.FetchDataStatus.Invalid) {\n dispatch(invalidateFavourites());\n }\n return Promise.resolve();\n }\n // if user is signed in, we will\n // 1) skip fetching favourite, if favourite in redux store is already valid, or is performing a fetch in another thread\n // 3) will fetch favourite, if favourite is invalid\n if (!shouldPerformFetchFavourite(favourite.fetchDataStatus)) {\n return Promise.resolve();\n }\n dispatch(createUpdateUserFavouriteFetchDataStatusAction({\n fetchDataStatus: Constants.UserFavourite.FetchDataStatus.IsFetching\n }));\n return favouriteRestClient.getUserFavouriteItems().then((rawUserFavourites)=>{\n dispatch(createReceiveUserFavouriteDataAction(_object_spread({}, rawUserFavourites)));\n if (getState().apps.pricingPayload) {\n dispatch(createFavouriteAppsPricingDataReceivedAction(getState().apps.pricingPayload));\n }\n dispatch(validateFavourites());\n return Promise.resolve();\n }).catch((error)=>{\n var _getWindow;\n const payload = {\n page: (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : _getWindow.location.href,\n action: Constants.Telemetry.Action.FetchUserFavourites,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: JSON.stringify({\n error: stringifyError(error)\n })\n };\n SharedInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.error(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n dispatch(failedDataStatus());\n return Promise.resolve();\n });\n };\n}\n/**\n * upsert a favourite given an applicationType, i.e. add or update\n *\n * @param payload consists as same with marketplace api payload, which are\n * applicationId: application ID of a favourite entity\n * planId: plan ID of a favourite entity\n * applicationType: application type of a favourite entity\n *\n * @param entityId if given, it will try to fetch pricing details to obtain its 1st plan Id, if any\n */ export function upsertUserFavourite(payload, item, entityId = undefined) {\n return (dispatch, getState)=>{\n return dispatch(fetchUserFavourites()).then(()=>{\n const favourite = getState().userFavourite;\n // skip upsertting favourite item, if favourite data is invalid\n if (favourite.fetchDataStatus === Constants.UserFavourite.FetchDataStatus.Invalid) {\n return Promise.resolve();\n }\n // upsert favourite item, if favourite data is valid\n return dispatch(fetchPricing(entityId, payload.applicationType)).then((planId)=>{\n const updatedPayload = _object_spread_props(_object_spread({}, payload), {\n planId: planId\n });\n return favouriteRestClient.addUserFavouriteItem(updatedPayload);\n }).then((response)=>{\n const errorResponse = response;\n if (errorResponse.nonCriticalError !== Constants.UserFavourite.NotCriticalFailure.ItemExist && errorResponse.nonCriticalError !== Constants.UserFavourite.NotCriticalFailure.MaximumQuotaReached) {\n const postResponse = response;\n dispatch(createUpsertUserFavouriteItemAction(_object_spread_props(_object_spread({}, postResponse), {\n item\n })));\n return Promise.resolve();\n }\n }).catch((error)=>{\n var _getWindow;\n const payload = {\n page: (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : _getWindow.location.href,\n action: Constants.Telemetry.Action.UpsertUserFavourite,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: JSON.stringify({\n error: stringifyError(error)\n })\n };\n SharedInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.error(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n return Promise.resolve();\n });\n }).catch((error)=>{\n var _getWindow;\n const payload = {\n page: (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : _getWindow.location.href,\n action: Constants.Telemetry.Action.UpsertUserFavourite,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: JSON.stringify({\n error: stringifyError(error)\n })\n };\n SharedInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.error(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n return Promise.resolve();\n });\n };\n}\n/**\n * delete favourite\n *\n * @param entityGuid: guid generated to identify a favourite entity\n * @param applicationType: application type of a favourite entity\n */ export function deleteUserFavourite(entityGuid, applicationType) {\n return (dispatch, getState)=>{\n return dispatch(fetchUserFavourites()).then(()=>{\n const favourite = getState().userFavourite;\n // skip deleting favourite item, if favourite data is invalid\n if (favourite.fetchDataStatus === Constants.UserFavourite.FetchDataStatus.Invalid) {\n return Promise.resolve();\n }\n // delete favourite item, if favourite data is valid\n return favouriteRestClient.deleteUserFavouriteItem(entityGuid, applicationType).then((response)=>{\n if (response !== Constants.UserFavourite.NotCriticalFailure.ItemNotExist) {\n dispatch(createDeleteUserFavouriteItemAction({\n entityGuid: entityGuid,\n applicationType: applicationType\n }));\n }\n return Promise.resolve();\n }).catch((error)=>{\n var _getWindow;\n const payload = {\n page: (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : _getWindow.location.href,\n action: Constants.Telemetry.Action.DeleteUserFavourite,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: JSON.stringify({\n error: stringifyError(error)\n })\n };\n SharedInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.error(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n return Promise.resolve();\n });\n }).catch((error)=>{\n var _getWindow;\n const payload = {\n page: (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : _getWindow.location.href,\n action: Constants.Telemetry.Action.DeleteUserFavourite,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: JSON.stringify({\n error: stringifyError(error)\n })\n };\n SharedInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.error(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n return Promise.resolve();\n });\n };\n}\n","import { Constants } from './../utils/constants';\nimport { createUpdateUserFavouriteFetchDataStatusAction } from './../actions/userFavouriteActions';\nexport function shouldPerformFetchFavourite(fetchDataStatus) {\n // fetch favourite data only if favourite entity state is invalid\n return fetchDataStatus === Constants.UserFavourite.FetchDataStatus.Invalid;\n}\n/**\n * invalidate redux favourite store by flagging fetch data status as invalid\n */ export function invalidateFavourites() {\n return (dispatch, getState)=>{\n const fetchDataStatus = Constants.UserFavourite.FetchDataStatus.Invalid;\n dispatch(createUpdateUserFavouriteFetchDataStatusAction({\n fetchDataStatus: fetchDataStatus\n }));\n };\n}\n/**\n * validate redux favourite store by flagging fetch data status as valid\n */ export function validateFavourites() {\n return (dispatch, getState)=>{\n const fetchDataStatus = Constants.UserFavourite.FetchDataStatus.Valid;\n dispatch(createUpdateUserFavouriteFetchDataStatusAction({\n fetchDataStatus: fetchDataStatus\n }));\n };\n}\nexport function fetchPricing(entityId, applicationType) {\n return (dispatch, getState)=>{\n return Promise.resolve(undefined);\n };\n}\n/**\n * mark call failure to redux favourite store by flagging fetch data status as failure to avoid infinite loop\n */ export function failedDataStatus() {\n return (dispatch, getState)=>{\n const fetchDataStatus = Constants.UserFavourite.FetchDataStatus.Failure;\n dispatch(createUpdateUserFavouriteFetchDataStatusAction({\n fetchDataStatus: fetchDataStatus\n }));\n };\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport SpzaComponent from './spzaComponent';\nimport { InternalLink } from './internalLink';\nimport { Constants } from './../utils/constants';\nexport class ButtonLink extends SpzaComponent {\n renderImpl() {\n let button = null;\n switch(this.props.type){\n case Constants.ButtonType.Link:\n button = /*#__PURE__*/ _jsxs(InternalLink, {\n accEnabled: this.props.accEnabled,\n href: this.props.href,\n role: \"link\",\n children: [\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"ms-fontSize-14\",\n children: this.props.label + ' '\n }),\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"ms-fontSize-16 ms-fontWeight-semibold\",\n children: this.props.value\n })\n ]\n });\n break;\n case Constants.ButtonType.Label:\n button = /*#__PURE__*/ _jsxs(\"div\", {\n className: \"buttonLinkContainer\",\n children: [\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"ms-fontSize-14 label\",\n children: this.props.label + ' '\n }),\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"ms-fontSize-16 ms-fontWeight-semibold\",\n children: this.props.value\n })\n ]\n });\n break;\n default:\n button = /*#__PURE__*/ _jsx(\"div\", {});\n }\n return /*#__PURE__*/ _jsx(\"div\", {\n className: 'button-link ' + this.props.className,\n children: button\n });\n }\n constructor(...args){\n super(...args), _define_property(this, \"context\", void 0);\n }\n}\nButtonLink.contextTypes = {};\n","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { Text, mergeStyleSets, Stack } from '@fluentui/react';\nconst contentStyles = mergeStyleSets({\n italicFont: {\n fontStyle: 'italic'\n },\n title: {\n marginTop: 4\n },\n subTitle: {\n marginTop: 8\n },\n leftSpace: {\n paddingLeft: 6\n }\n});\nexport const ShowingResultsFor = ({ showingResultsForText, previousSearchText }, context)=>{\n const { title, leftSpace, italicFont } = contentStyles;\n return /*#__PURE__*/ _jsxs(_Fragment, {\n children: [\n /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(Text, {\n variant: \"medium\",\n children: `${context.loc('Showing_Results_For_NoResults_Prefix', 'No results found for')} `\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n className: leftSpace,\n children: /*#__PURE__*/ _jsx(Text, {\n className: \"ms-fontSize-14 ms-fontWeight-semibold\",\n children: `‘${previousSearchText}’`\n })\n })\n ]\n }),\n /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n className: title,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(Text, {\n className: \"ms-fontSize-20\",\n children: `${context.loc('Showing_Results_For_Prefix', 'Showing results for')} `\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n className: leftSpace,\n children: /*#__PURE__*/ _jsx(Text, {\n as: 'h1',\n variant: \"xLarge\",\n className: italicFont,\n children: `‘${showingResultsForText}’`\n })\n })\n ]\n })\n ]\n });\n};\nShowingResultsFor.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { Text, mergeStyleSets, Stack, Link } from '@fluentui/react';\nimport { useSelector } from 'react-redux';\nimport { ShowingResultsFor } from '@appsource/components/ShowingResultsFor';\nimport { SortingDropdown } from '@shared/components/sortingDropdown';\nimport { Constants } from '@shared/utils/constants';\nimport { routes } from '@shared/routerHistory';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport { ThumbsUpDown } from '@appsource/components/thumbsUpDown';\nexport const TitleComponent = ({ localizedTitle, previousSearchText = '', showingResultsForText = '', titleAsH1 = true })=>{\n return showingResultsForText.length > 0 ? /*#__PURE__*/ _jsx(ShowingResultsFor, {\n showingResultsForText: showingResultsForText,\n previousSearchText: previousSearchText\n }) : /*#__PURE__*/ _jsx(Text, {\n as: titleAsH1 ? 'h1' : 'h2',\n variant: \"xLarge\",\n className: \"galleryTitle\",\n children: localizedTitle\n });\n};\nconst contentStyles = mergeStyleSets({\n subTitle: {\n marginTop: 8\n },\n container: {\n marginBottom: 20\n },\n leftSpace: {\n paddingLeft: 6\n }\n});\nconst { Popularity, RecentlyUpdated, BestMatch, RatingAverage } = Constants.SearchSortingOption;\nconst nonDefaultSortingOptions = [\n Popularity,\n RecentlyUpdated,\n RatingAverage\n];\nconst { marketplaceServices, marketplace, marketplaceCloudsIndustry } = routes;\nconst viewToRouteMap = {\n [Constants.Views.appGallery]: marketplace,\n [Constants.Views.serviceGallery]: marketplaceServices,\n [Constants.Views.cloudsIndustryGallery]: marketplaceCloudsIndustry\n};\nexport const FilteredGalleryHeader = ({ otherGalleriesLinks, subTitle, numResults, localizedTitle, hideSortingDropdown, titleAsH1 }, context)=>{\n var _searchParams_get;\n const { showingResultsFor: showingResultsForText = '', previousSearchText = '', currentView } = useSelector(({ search: { showingResultsFor, previousSearchText }, config: { currentView, featureFlags: { sortByRatingEnabled, allNewSortsEnabled, sortByRecentlyUpdatedEnabled } } })=>({\n showingResultsFor,\n previousSearchText,\n currentView,\n sortByRatingEnabled,\n allNewSortsEnabled,\n sortByRecentlyUpdatedEnabled\n }));\n const navigate = useNavigate();\n const [searchParams] = useSearchParams();\n const sortByQueryParam = searchParams.get(Constants.FilterQuery.sortBy);\n let defaultSortValue = BestMatch;\n if (sortByQueryParam && nonDefaultSortingOptions.includes(sortByQueryParam)) {\n defaultSortValue = sortByQueryParam;\n }\n const baseRoute = viewToRouteMap[`${currentView}`] || marketplace;\n const { container, leftSpace, subTitle: subTitleClass } = contentStyles;\n const handleClearSearch = ()=>{\n const url = context.buildHref(baseRoute, {}, {\n [Constants.FilterQuery.search]: ''\n }, false);\n navigate(url);\n };\n const shouldDisplayClearSearch = previousSearchText || ((_searchParams_get = searchParams.get('search')) === null || _searchParams_get === void 0 ? void 0 : _searchParams_get.length) > 0;\n return /*#__PURE__*/ _jsxs(_Fragment, {\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n role: \"status\",\n \"aria-label\": `${numResults} items found`\n }),\n /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n horizontalAlign: \"space-between\",\n className: container,\n wrap: true,\n tokens: {\n childrenGap: 6\n },\n children: [\n /*#__PURE__*/ _jsxs(Stack.Item, {\n children: [\n /*#__PURE__*/ _jsx(TitleComponent, {\n localizedTitle: localizedTitle,\n previousSearchText: previousSearchText,\n showingResultsForText: showingResultsForText,\n titleAsH1: titleAsH1\n }),\n /*#__PURE__*/ _jsxs(Stack, {\n tokens: {\n childrenGap: 4\n },\n horizontal: true,\n className: subTitleClass,\n wrap: true,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(Text, {\n block: true,\n children: subTitle\n })\n }),\n !shouldDisplayClearSearch && otherGalleriesLinks && /*#__PURE__*/ _jsx(Stack.Item, {\n className: leftSpace,\n children: otherGalleriesLinks\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: shouldDisplayClearSearch && /*#__PURE__*/ _jsx(Link, {\n onClick: ()=>handleClearSearch(),\n underline: true,\n as: \"button\",\n children: context.loc('ClearSearch', 'Clear search')\n })\n })\n ]\n }),\n shouldDisplayClearSearch && otherGalleriesLinks && /*#__PURE__*/ _jsx(Stack.Item, {\n tokens: {\n margin: '8px 0'\n },\n children: otherGalleriesLinks\n }),\n !!showingResultsForText.length && /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(ThumbsUpDown, {\n localizedQuestion: context.loc('Feedback_ShowingResultsFor', \"Are these results what you're looking for?\")\n })\n })\n ]\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(Stack, {\n verticalAlign: \"start\",\n horizontalAlign: \"end\",\n children: numResults > 0 && /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(SortingDropdown, {\n defaultKey: defaultSortValue,\n route: baseRoute,\n hide: hideSortingDropdown\n })\n })\n })\n })\n ]\n })\n ]\n });\n};\nFilteredGalleryHeader.contextTypes = {\n loc: PropTypes.func,\n buildHref: PropTypes.func\n};\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { useState } from 'react';\nimport Tooltip from '@shared/components/tooltip';\nimport { DirectionalHint, Stack, Text, Spinner, SpinnerSize } from '@fluentui/react';\nimport { AppTileLinkedItems } from '@shared/components/appTileLinkedItems';\nimport { logger } from '@src/logger';\nimport { Constants } from '@shared/utils/constants';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { ItemsContainerComponent } from '@shared/components/itemsContainer';\nimport { getAppRelatedAppsItems } from '@shared/services/http/entityRestClient';\nconst tooltipHostStyles = {\n root: {\n overflow: 'hidden',\n display: 'inline-block'\n }\n};\nconst stackContainerTokens = {\n childrenGap: 8\n};\nconst textSize = 'smallPlus';\nconst maxTooltipWidth = 450;\nconst calloutProps = {\n isBeakVisible: true,\n gapSpace: 6\n};\nexport const ItemsTooltip = ({ children, title, linkedItemsIds, items, parentItem })=>{\n const [linkedItemsData, setLinkedItemsData] = useState([]);\n const getLinkedAppDataItems = /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*() {\n const items = yield getAppRelatedAppsItems(parentItem.entityId, '');\n if (items.saasLinkingItems.length) {\n setLinkedItemsData(items.saasLinkingItems);\n }\n if (items.linkedAddIns.length) {\n setLinkedItemsData(items.linkedAddIns);\n }\n });\n return function getLinkedAppDataItems() {\n return _ref.apply(this, arguments);\n };\n }();\n const toolipToggled = (isTooltipVisible)=>{\n const instrument = SpzaInstrumentService.getProvider();\n const { title, entityId } = parentItem;\n if (isTooltipVisible) {\n const payload = {\n page: location.pathname,\n action: Constants.Telemetry.Action.Hover,\n actionModifier: Constants.Telemetry.ActionModifier.SaasLinkTooltip,\n details: JSON.stringify({\n title,\n entityId\n })\n };\n instrument.probe(Constants.Telemetry.ProbeName.LogInfo, payload);\n logger.info('', payload);\n if (!(linkedItemsData === null || linkedItemsData === void 0 ? void 0 : linkedItemsData.length) && (linkedItemsIds === null || linkedItemsIds === void 0 ? void 0 : linkedItemsIds.length)) {\n getLinkedAppDataItems();\n }\n }\n };\n const renderAppTileLinkedItem = ()=>{\n return (linkedItemsData === null || linkedItemsData === void 0 ? void 0 : linkedItemsData.length) ? /*#__PURE__*/ _jsx(AppTileLinkedItems, {\n title: title,\n linkedItems: linkedItemsData,\n hoveredItem: parentItem\n }) : /*#__PURE__*/ _jsx(Spinner, {\n size: SpinnerSize.large\n });\n };\n return (linkedItemsIds === null || linkedItemsIds === void 0 ? void 0 : linkedItemsIds.length) || (items === null || items === void 0 ? void 0 : items.length) ? /*#__PURE__*/ _jsx(Tooltip, {\n onTooltipToggle: (linkedItemsIds === null || linkedItemsIds === void 0 ? void 0 : linkedItemsIds.length) ? toolipToggled : null,\n tooltipHostProps: {\n tooltipProps: {\n onRenderContent: ()=>(linkedItemsIds === null || linkedItemsIds === void 0 ? void 0 : linkedItemsIds.length) ? renderAppTileLinkedItem() : (items === null || items === void 0 ? void 0 : items.length) ? /*#__PURE__*/ _jsxs(Stack, {\n tokens: stackContainerTokens,\n children: [\n title && /*#__PURE__*/ _jsx(Text, {\n variant: textSize,\n children: title\n }),\n /*#__PURE__*/ _jsx(ItemsContainerComponent, {\n items: items,\n withText: true,\n wrap: true,\n textSize: textSize,\n withDivider: false\n })\n ]\n }) : null,\n maxWidth: `${maxTooltipWidth}px`\n },\n calloutProps,\n styles: tooltipHostStyles,\n directionalHint: (linkedItemsIds === null || linkedItemsIds === void 0 ? void 0 : linkedItemsIds.length) ? DirectionalHint.rightCenter : DirectionalHint.topCenter\n },\n children: children\n }) : null;\n};\n","/* eslint-disable react/forbid-dom-props */ function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from './spzaComponent';\nimport { routes } from '@shared/routerHistory';\nimport { Link } from 'react-router-dom';\nexport class SuccessStory extends SpzaComponent {\n getAppTile(app, tileKey) {\n const { iconURL, shortDescription, shortDescriptionFallback, entityId, productFamily, title } = app;\n const route = this.context.buildHref(routes.appDetails, {\n productId: productFamily,\n entityId\n }, {\n tab: 'Overview'\n });\n const description = this.context.loc(shortDescription, shortDescriptionFallback);\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"tileWrapper\",\n children: [\n /*#__PURE__*/ _jsx(\"img\", {\n className: \"icon\",\n src: iconURL,\n alt: description\n }),\n /*#__PURE__*/ _jsx(\"h2\", {\n className: \"title\",\n children: title\n }),\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"description\",\n children: description\n }),\n /*#__PURE__*/ _jsx(Link, {\n className: \"link\",\n \"data-bi-id\": entityId,\n \"data-bi-area\": \"SuccessStory learn more link\",\n to: route,\n children: this.context.loc('AppSource_Banner_LearnMore', 'Learn more >')\n })\n ]\n }, tileKey);\n }\n renderImpl() {\n const { author: { name, title }, description, descriptionFallback, recommendations, image } = this.props;\n const backgroundImage = {\n backgroundImage: `linear-gradient(256.63deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.55)), url(${image})`\n };\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"storyContainer\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"image\",\n style: backgroundImage,\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: \"contentContainer\",\n children: [\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"testimonial\",\n children: [\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"title\",\n children: this.context.loc(description, descriptionFallback)\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"author\",\n children: [\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"authorName\",\n children: name\n }),\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"authorTitle\",\n children: title\n })\n ]\n })\n ]\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"apps appsDesktop\",\n children: recommendations.map((app, index)=>this.getAppTile(app, index))\n })\n ]\n })\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"apps appsMobile\",\n children: recommendations.map((app, index)=>this.getAppTile(app, index))\n })\n ]\n });\n }\n constructor(...args){\n super(...args), _define_property(this, \"context\", void 0);\n }\n}\nSuccessStory.contextTypes = {\n buildHref: PropTypes.func,\n renderErrorModal: PropTypes.func,\n loc: PropTypes.func\n};\n","import Finance from '@shared/images/homepage/Finance.jpg';\nimport LowCode from '@shared/images/homepage/LowCode.jpg';\nimport Service from '@shared/images/homepage/Service.jpg';\nimport SupplyChain from '@shared/images/homepage/SupplyChain.jpg';\nimport CustomerExperience from '@shared/images/homepage/CustomerExperience.jpg';\n/** â„¢ */ const trademark = '\\u2122';\nexport const TestimonialsId = {\n Finance: 'Finance',\n LowCode: 'LowCode',\n Service: 'Service',\n SupplyChain: 'SupplyChain',\n CustomerExperience: 'CustomerExperience'\n};\nexport const testimonials = [\n {\n id: TestimonialsId.LowCode,\n title: 'Success_Story_Area1_Title',\n image: LowCode,\n description: 'Testimonial_LowCode',\n descriptionFallback: '\"The smart features in Maplytics have made our search process faster and easier for users, saving hours of employee time.\"',\n author: {\n name: 'Abby Torres',\n title: 'Director of Information Technology ReEmployAbility'\n },\n recommendations: [\n {\n productFamily: 'dynamics-365',\n entityId: 'inogic.f6f3c73f-29de-4fa8-a396-87ea8a07b6c4',\n title: 'Maplytics: Maps + CRM',\n iconURL: 'https://store-images.s-microsoft.com/image/apps.6214.3b6ff61e-e12d-44db-aeaf-5145a958ce40.be7576ed-81f3-4957-bbba-9c34161e56b6.dbc37bc4-11b0-4899-b229-23d1be6473b8',\n shortDescription: 'Testimonial_LowCode_Product_Description',\n shortDescriptionFallback: 'Leverage the power of location-based intelligence'\n }\n ]\n },\n {\n id: TestimonialsId.Finance,\n title: 'Success_Story_Area2_Title',\n image: Finance,\n description: 'Testimonial_Finance',\n descriptionFallback: '\"With Binary Stream, we can produce auditable reports with certainty and confidence. This has proven very effective, and we are now reaping the cost savings.\"',\n author: {\n name: 'Lyn Donnelly',\n title: 'Management Accountant at PR Finance Group Ltd.'\n },\n recommendations: [\n {\n productFamily: 'dynamics-365-business-central',\n entityId: 'binary-stream-software.ec403ee3-66eb-4565-95db-30cacf093e19',\n title: 'Subscription Billing Suite',\n iconURL: 'https://store-images.s-microsoft.com/image/apps.48588.41a6f731-100c-49a6-b081-360e15c6678f.0c64271c-afe2-48ae-821f-bf6276ecf4be.c7a3b37e-4942-4970-bd07-7c335ae0507b',\n shortDescription: 'Testimonial_Finance_Product_Description',\n shortDescriptionFallback: 'Manage contracts with ease by automating complex recurring billing cycles'\n }\n ]\n },\n {\n id: TestimonialsId.Service,\n title: 'Success_Story_Area3_Title',\n image: Service,\n description: 'Testimonial_Service',\n descriptionFallback: '\"b+s has been a great partner! Our contact center has unique use cases that their technical team helped us navigate and resolve.\"',\n author: {\n name: 'Lee Christiansen',\n title: 'Director – Network Infrastructure and Operations Mountain America Credit Union'\n },\n recommendations: [\n {\n productFamily: 'dynamics-365',\n entityId: 'buchersuterag1580892733541.connects',\n title: 'b+s Connects',\n iconURL: 'https://store-images.s-microsoft.com/image/apps.27812.5094e61f-ca74-440b-bc07-9e3ff81af5a9.7985c97a-706b-455e-aa98-552c5b2be291.39338e28-b888-4224-9893-835a4feb9b24',\n shortDescription: 'Testimonial_Service_Product_Description',\n shortDescriptionFallback: 'Designed to assist contact center agents in their delivery of outstanding customer service'\n }\n ]\n },\n {\n id: TestimonialsId.SupplyChain,\n title: 'Success_Story_Area4_Title',\n image: SupplyChain,\n description: 'Testimonial_SupplyChain',\n descriptionFallback: '\"We decided to look for a new ERP system that would integrate with SPS Commerce because we had such a positive experience working with SPS.\"',\n author: {\n name: 'Anthony Flores',\n title: 'Demand Planning and Analytics Manager'\n },\n recommendations: [\n {\n productFamily: 'dynamics-365-for-operations',\n entityId: 'spscommerce1602261903756.spscommerce_edi',\n title: 'SPS Commerce EDI for Dynamics 365',\n iconURL: 'https://store-images.s-microsoft.com/image/apps.35888.58b103f3-e263-4602-a5e2-63ef90aacf25.e9d91376-8efa-481f-8994-56316cded698.16f16b87-f998-4e36-aef4-041694ea7a11',\n shortDescription: 'Testimonial_SupplyChain_Product_Description',\n shortDescriptionFallback: 'Eliminate the time and cost of human errors due to manual data entry'\n }\n ]\n },\n {\n id: TestimonialsId.CustomerExperience,\n title: 'Success_Story_Area5_Title',\n image: CustomerExperience,\n description: 'Testimonial_CustomerExperience',\n descriptionFallback: '\"Powerful deduplication solution with many options to refine the merging options. On top: an excellent support, fast and competent!\"',\n author: {\n name: 'Georg Grawatsch',\n title: 'Product Owner CRM Falstaff Verlags-GmbH'\n },\n recommendations: [\n {\n productFamily: 'dynamics-365',\n entityId: 'data8.duplicare',\n title: `Data8 Duplicare${trademark}`,\n iconURL: 'https://store-images.s-microsoft.com/image/apps.13144.a4207375-054f-4781-b7c7-91f123382727.05a75a43-af0e-4390-9bd9-73f7902f3853.d772ae32-0844-4d46-b68a-d30493d2ce55',\n shortDescription: 'Testimonial_CustomerExperience_Product_Description',\n shortDescriptionFallback: 'Deduplication via advanced fuzzy duplicate detection and multi-record merging'\n }\n ]\n }\n];\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { Tab, Tabs, TabsTheme } from '@shared/components/tabs';\nimport { SuccessStory } from '@shared/components/successStory';\nimport { urlReplace, routes } from '@shared/routerHistory';\nimport { testimonials } from './Testimonials.data';\nimport { OwnerType } from '@shared/utils/detailUtils';\nconst biArea = 'homePage';\nexport const Testimonials = ({ defaultTestimonialTabName }, context)=>{\n const getSuccessStoryTabHref = (tabId)=>{\n const params = {\n filterTab: null,\n successStoryTab: tabId,\n industry: null\n };\n return context === null || context === void 0 ? void 0 : context.buildHref(routes.home, null, params);\n };\n const changeSuccessStoryTabCallback = (tabId)=>{\n const newPath = getSuccessStoryTabHref(tabId) || '';\n urlReplace(newPath);\n };\n return /*#__PURE__*/ _jsx(Tabs, {\n defaultTab: defaultTestimonialTabName,\n ownerType: OwnerType.App,\n theme: TabsTheme.gray,\n ownerId: 'homeSuccessStory',\n centerize: true,\n changeTabCallback: (tabId)=>{\n changeSuccessStoryTabCallback(tabId);\n },\n getTabHref: (tabId)=>getSuccessStoryTabHref(tabId),\n children: testimonials.map((story)=>{\n const { title, id, author, description, descriptionFallback, image, recommendations } = story;\n return /*#__PURE__*/ _jsx(Tab, {\n title: context.loc(title, title),\n name: id,\n otherProps: {\n 'data-bi-id': id,\n 'data-bi-type': 'successStory',\n 'data-bi-area': biArea\n },\n children: /*#__PURE__*/ _jsx(SuccessStory, {\n author: author,\n description: description,\n descriptionFallback: descriptionFallback,\n id: id,\n image: image,\n recommendations: recommendations,\n title: title\n })\n }, id);\n })\n });\n};\nTestimonials.contextTypes = {\n buildHref: PropTypes.func,\n loc: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from './spzaComponent';\nclass Animation extends SpzaComponent {\n renderImpl() {\n return this.props.isCircular ? /*#__PURE__*/ _jsxs(\"div\", {\n className: \"c-progress f-indeterminate-local f-progress-small\",\n role: \"progressbar\",\n \"aria-valuetext\": \"Loading...\",\n tabIndex: 0,\n \"aria-label\": \"indeterminate local small progress bar\",\n children: [\n /*#__PURE__*/ _jsx(\"span\", {}),\n /*#__PURE__*/ _jsx(\"span\", {}),\n /*#__PURE__*/ _jsx(\"span\", {}),\n /*#__PURE__*/ _jsx(\"span\", {}),\n /*#__PURE__*/ _jsx(\"span\", {})\n ]\n }) : /*#__PURE__*/ _jsxs(\"div\", {\n className: \"c-progress f-indeterminate-regional\",\n role: \"progressbar\",\n \"aria-valuetext\": \"Loading...\",\n tabIndex: 0,\n children: [\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"aniDot\"\n }),\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"aniDot\"\n }),\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"aniDot\"\n }),\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"aniDot\"\n }),\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"aniDot\"\n })\n ]\n });\n }\n}\nexport { Animation as default };\nAnimation.contextTypes = {\n renderErrorModal: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { getTotalExternalRatingSummariesInfo, getRatingSummaryByType } from '@shared/utils/reviewsUtils';\nimport * as PropTypes from 'prop-types';\nimport { Text, mergeStyleSets } from '@fluentui/react';\nimport { NeutralColors } from '@fluentui/theme';\nimport { Constants } from '@shared/utils/constants';\nimport { RatingsInfo } from '@shared/components/ratings/ratingsInfo';\nconst contentStyles = mergeStyleSets({\n separator: {\n color: NeutralColors.gray90,\n margin: '0px 12px',\n fontSize: 18\n }\n});\nvar HeaderRatingBarInfoKey = /*#__PURE__*/ function(HeaderRatingBarInfoKey) {\n HeaderRatingBarInfoKey[\"Internal\"] = \"internal\";\n HeaderRatingBarInfoKey[\"External\"] = \"external\";\n HeaderRatingBarInfoKey[\"All\"] = \"all\";\n return HeaderRatingBarInfoKey;\n}(HeaderRatingBarInfoKey || {});\nexport const AppDetailsHeaderRatingBar = ({ app }, context)=>{\n const allRatingSummaryObj = getRatingSummaryByType(app === null || app === void 0 ? void 0 : app.ratingSummaries, Constants.Reviews.ReviewsSource.All);\n const avgRating = (allRatingSummaryObj === null || allRatingSummaryObj === void 0 ? void 0 : allRatingSummaryObj.AverageRating) || app.AverageRating || 0;\n const ratingsCount = (allRatingSummaryObj === null || allRatingSummaryObj === void 0 ? void 0 : allRatingSummaryObj.TotalRatings) || app.NumberOfRatings || 0;\n const externalSummariesInfo = getTotalExternalRatingSummariesInfo(app.ratingSummaries);\n if (ratingsCount <= 0 && externalSummariesInfo.totalRatings <= 0) {\n return null;\n }\n return /*#__PURE__*/ _jsxs(\"div\", {\n itemProp: \"itemReviewed\",\n itemScope: true,\n itemType: Constants.Reviews.Microdata.AppItemType,\n children: [\n /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"name\",\n content: app.title\n }),\n /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"applicationCategory\",\n content: Constants.Reviews.Microdata.AppCategory\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"appRatingCell\",\n itemProp: \"aggregateRating\",\n itemScope: true,\n itemType: \"https://schema.org/AggregateRating\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: \"detailsRating\",\n children: allRatingSummaryObj ? /*#__PURE__*/ _jsx(RatingsInfo, {\n avgRating: avgRating,\n ratingsCount: ratingsCount,\n title: context.loc('Global_Loc_ratingsLower', 'ratings'),\n context: context\n }, \"all\") : /*#__PURE__*/ _jsxs(_Fragment, {\n children: [\n /*#__PURE__*/ _jsx(RatingsInfo, {\n avgRating: avgRating,\n ratingsCount: ratingsCount,\n title: context.loc('RatingSummary_Title', 'Marketplace ratings'),\n context: context\n }, \"internal\"),\n externalSummariesInfo.totalRatings > 0 && /*#__PURE__*/ _jsx(Text, {\n className: contentStyles.separator,\n children: \"|\"\n }),\n externalSummariesInfo.totalRatings > 0 && /*#__PURE__*/ _jsx(RatingsInfo, {\n avgRating: externalSummariesInfo.averageRatings,\n ratingsCount: externalSummariesInfo.totalRatings,\n title: context.loc('appDetails_ExternalRatings', 'external ratings'),\n context: context\n }, \"external\")\n ]\n })\n })\n }),\n /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"reviewCount\",\n content: ratingsCount.toString()\n }),\n /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"ratingValue\",\n content: parseFloat(avgRating.toString()).toFixed(2)\n })\n ]\n })\n ]\n });\n};\nAppDetailsHeaderRatingBar.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { Text, mergeStyleSets, Stack, ScreenWidthMinXLarge } from '@fluentui/react';\nimport { Constants } from '@shared/utils/constants';\nimport { routes } from '@shared/routerHistory';\nimport { NeutralColors } from '@fluentui/theme';\nimport { LinkedItem } from '@shared/components/linkedItem';\nimport classNames from 'classnames';\nconst titleAndTileStackStyle = {\n childrenGap: 16\n};\nconst appDetailsLinkedItemsStyles = mergeStyleSets({\n container: {\n marginTop: 20\n },\n linkedItemsContainer: {\n marginTop: 15\n },\n header: {\n color: NeutralColors.gray130,\n fontWeight: 600\n },\n LinkedItemsStyle: {\n width: '456px',\n [`@media (max-width: ${ScreenWidthMinXLarge}px)`]: {\n width: '312px'\n }\n }\n});\nconst horizontalGapStackTokens = {\n childrenGap: 24\n};\nconst getLinkedItemLink = ({ linkedItem, productId, context })=>{\n return context.buildHref(routes.appDetails, {\n productId,\n entityId: linkedItem.entityId\n }, {\n tab: 'Overview'\n });\n};\nconst addinOnClick = ({ linkedItem, context, event })=>{\n const lastCtaType = linkedItem.ctaTypes[linkedItem.ctaTypes.length - 1];\n context.ctaCallback({\n entity: linkedItem,\n entityType: Constants.EntityType.App,\n ctaType: lastCtaType,\n actionModifier: Constants.Telemetry.ActionModifier.AppDetailCTAButton,\n hasLicense: false\n });\n event.preventDefault();\n};\nconst renderLinkedItems = ({ billingCountryCode, context, productId, linkedItems, isSaaSRendering, isLoadingUserData, locale })=>{\n return /*#__PURE__*/ _jsx(Stack, {\n horizontal: true,\n wrap: true,\n tokens: horizontalGapStackTokens,\n children: linkedItems.map((item, index)=>/*#__PURE__*/ _jsx(Stack.Item, {\n className: classNames([\n appDetailsLinkedItemsStyles.LinkedItemsStyle\n ]),\n children: /*#__PURE__*/ _jsx(LinkedItem, {\n linkedItem: item,\n billingCountryCode: billingCountryCode,\n isInAppDetail: true,\n isSaaSRendering: isSaaSRendering,\n ctaButtonClick: isSaaSRendering ? ({ linkedItem })=>{\n getLinkedItemLink({\n linkedItem,\n productId,\n context\n });\n } : ({ linkedItem, event })=>{\n addinOnClick({\n linkedItem,\n context,\n event\n });\n },\n isLoadingUserData: isLoadingUserData,\n getLinkedItemLink: getLinkedItemLink,\n locale: locale\n })\n }, index))\n });\n};\nexport const AppDetailsLinkedItemsComponent = ({ billingCountryCode, productId, linkedItems, isSaaSRendering, isLoadingUserData, headerString, locale }, context)=>{\n return (linkedItems === null || linkedItems === void 0 ? void 0 : linkedItems.length) ? /*#__PURE__*/ _jsxs(Stack, {\n tokens: titleAndTileStackStyle,\n className: classNames([\n 'linkedItemsContainer',\n [\n appDetailsLinkedItemsStyles.container\n ]\n ]),\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: headerString && /*#__PURE__*/ _jsx(Text, {\n variant: \"mediumPlus\",\n className: appDetailsLinkedItemsStyles.header,\n children: headerString\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: renderLinkedItems({\n billingCountryCode,\n productId,\n linkedItems,\n isSaaSRendering,\n isLoadingUserData,\n context,\n locale\n })\n })\n ]\n }) : null;\n};\nAppDetailsLinkedItemsComponent.contextTypes = {\n buildHref: PropTypes.func,\n ctaCallback: PropTypes.func\n};\nexport const AppDetailsLinkedItems = AppDetailsLinkedItemsComponent;\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { mergeStyleSets } from '@fluentui/react';\nimport * as PropTypes from 'prop-types';\nimport { NeutralColors } from '@fluentui/theme';\nimport { AppReviewCommentCollectionPaginationButton } from '@shared/components/appReviewCommentCollection';\nconst contentStyles = mergeStyleSets({\n commentsContainer: {\n marginBottom: '20px'\n },\n paginationContainer: {\n marginTop: '10px'\n },\n emptyMessage: {\n margin: '15px 0',\n color: NeutralColors.gray130\n },\n loader: {\n margin: '25px 0'\n }\n});\nexport function AppReviewItemCommentPagination({ currentPage, totalPageCount, onSeeMoreClick, onSeeLessClick }, context) {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: contentStyles.paginationContainer,\n children: [\n currentPage < totalPageCount && /*#__PURE__*/ _jsx(AppReviewCommentCollectionPaginationButton, {\n \"data-bi-id\": \"reviewCommentsPaginationSeeMore\",\n \"data-bi-name\": \"Review Comments Section See More Button\",\n onClick: ()=>onSeeMoreClick(),\n text: context.loc('ReviewItem_CommentSection_LoadMore_Button_Label', 'See more'),\n iconName: \"ChevronDown\"\n }),\n totalPageCount > 1 && currentPage >= totalPageCount && /*#__PURE__*/ _jsx(AppReviewCommentCollectionPaginationButton, {\n \"data-bi-id\": \"reviewCommentsPaginationSeeLess\",\n \"data-bi-name\": \"Review Comments Section See Less Button\",\n onClick: ()=>onSeeLessClick(),\n text: context.loc('ReviewItem_CommentSection_Collapse_Button_Label', 'See less'),\n iconName: \"ChevronUp\"\n })\n ]\n });\n}\nAppReviewItemCommentPagination.contextTypes = {\n loc: PropTypes.func\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { NeutralColors } from '@fluentui/theme';\nimport { mergeStyleSets } from '@fluentui/react';\nconst appReviewCommentStyles = mergeStyleSets({\n commentsContainer: {\n marginBottom: '20px'\n },\n paginationContainer: {\n marginTop: '10px'\n },\n emptyMessage: {\n margin: '15px 0',\n color: NeutralColors.gray130\n },\n loader: {\n margin: '25px 0'\n }\n});\nexport function AppReviewItemCommentEmptyMessage(params, context) {\n return /*#__PURE__*/ _jsx(\"div\", {\n className: appReviewCommentStyles.emptyMessage,\n children: context.loc('ReviewItem_CommentSection_Empty_Message', 'No comments yet. Be the first one to comment.')\n });\n}\nAppReviewItemCommentEmptyMessage.contextTypes = {\n loc: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { AppReviewCommentItem } from '@shared/components/appReviewCommentItem';\nimport { mergeStyleSets, Spinner, SpinnerSize, Stack } from '@fluentui/react';\nimport { Constants } from '@shared/utils/constants';\nimport { NeutralColors } from '@fluentui/theme';\nimport { AppReviewItemCommentPagination } from '@shared/components/appReviewCommentCollection/appReviewItemCommentPagination';\nimport { AppReviewItemCommentEmptyMessage } from '@shared/components/appReviewCommentCollection/appReviewItemCommentEmptyMessage';\nconst contentStyles = mergeStyleSets({\n commentsContainer: {\n marginBottom: '20px'\n },\n paginationContainer: {\n marginTop: '10px'\n },\n emptyMessage: {\n margin: '15px 0',\n color: NeutralColors.gray130\n },\n loader: {\n margin: '25px 0'\n }\n});\nexport function AppReviewItemCommentCollectionListSection({ comments, currentPage, locale, totalPageCount, onSeeMoreClick, onSeeLessClick, onCommentDelete, onCommentEdit }) {\n const mapCommentsToComponents = ({ reducedCommentIds, commentsById })=>{\n return reducedCommentIds.slice(0, currentPage * Constants.Reviews.CommentsPerPage).map((commentId)=>/*#__PURE__*/ _jsx(AppReviewCommentItem, {\n onEdit: (updatedContent)=>{\n onCommentEdit(commentId, updatedContent, false);\n },\n onDelete: ()=>{\n onCommentDelete(commentId, false);\n },\n locale: locale,\n comment: commentsById[`${commentId}`]\n }, commentId));\n };\n const mapNewlyAddedCommentsToComponents = (comments)=>{\n return comments.map((comment)=>/*#__PURE__*/ _jsx(AppReviewCommentItem, {\n onEdit: (updatedContent)=>onCommentEdit(comment.id, updatedContent, true),\n onDelete: ()=>onCommentDelete(comment.id, true),\n locale: locale,\n comment: comment\n }, comment.id));\n };\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: contentStyles.commentsContainer,\n children: [\n (comments === null || comments === void 0 ? void 0 : comments.reducedCommentIds.length) ? [\n ...mapCommentsToComponents(comments),\n /*#__PURE__*/ _jsx(AppReviewItemCommentPagination, {\n currentPage: currentPage,\n totalPageCount: totalPageCount,\n onSeeMoreClick: ()=>onSeeMoreClick(),\n onSeeLessClick: ()=>onSeeLessClick()\n }, \"pagination\")\n ] : !(comments === null || comments === void 0 ? void 0 : comments.isLoading) && /*#__PURE__*/ _jsx(AppReviewItemCommentEmptyMessage, {}),\n (comments === null || comments === void 0 ? void 0 : comments.isLoading) && /*#__PURE__*/ _jsx(Stack, {\n horizontal: true,\n className: contentStyles.loader,\n children: /*#__PURE__*/ _jsx(Spinner, {\n size: SpinnerSize.large\n })\n }),\n (comments === null || comments === void 0 ? void 0 : comments.newlyAddedComments) ? mapNewlyAddedCommentsToComponents(comments.newlyAddedComments) : null\n ]\n });\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { useEffect, useState } from 'react';\nimport { Constants } from '@shared/utils/constants';\nimport { launchTelemetry } from '@shared/utils/reviewsUtils';\nimport { AppReviewItemCommentComposer } from '@shared/components/appReviewItemCommentComposer';\nimport { logger } from '@src/logger';\nimport { AppReviewItemCommentCollectionListSection } from '@shared/components/appReviewCommentCollection/appReviewItemCommentCollectionListSection';\nexport const AppReviewCommentCollection = ({ comments = null, expanded, review, loadData, clearData, locale, signedIn, openModal, createComment, deleteComment, editComment, ensureStateInitialized, unloadPages, isStateInitialized = false })=>{\n const [currentPage, setCurrentPage] = useState(1);\n const [composeText, setComposeText] = useState('');\n /**\n * Triggers loading of comments for the current page, if necessary,\n * e.g. during an initial expansion of the component, page navigation.\n */ const loadCurrentPageDataIfNeeded = ()=>{\n if (expanded && loadData && comments) {\n // Load the current page if there are no comments, if the initial loading was never triggered,\n // or if the user navigated to the next page which hasn't yet bee loaded.\n if (!comments.commentIds.length || currentPage > comments.currentLoadedPage) {\n loadData({\n offerId: review.offer_id,\n reviewId: review.id,\n page: currentPage,\n itemsPerPage: Constants.Reviews.CommentsPerPage\n });\n }\n }\n };\n const loadNextPage = ()=>{\n // If we already loaded enough data, simply append the visible page - otherwise, append both\n setCurrentPage((prev)=>prev + 1);\n };\n const resetPagination = ()=>{\n unloadPages({\n offerId: review.offer_id,\n reviewId: review.id\n });\n setCurrentPage(1);\n };\n const onSeeLessClick = ()=>{\n resetPagination();\n launchTelemetry(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.ReviewItemCommentsSeeLess, {\n reviewId: review === null || review === void 0 ? void 0 : review.id,\n offerId: review === null || review === void 0 ? void 0 : review.offer_id\n });\n logger.info(JSON.stringify({\n reviewId: review === null || review === void 0 ? void 0 : review.id,\n offerId: review === null || review === void 0 ? void 0 : review.offer_id\n }), {\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemCommentsSeeLess\n });\n };\n const onSeeMoreClick = ()=>{\n loadNextPage();\n launchTelemetry(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.ReviewItemCommentsSeeMore, {\n reviewId: review === null || review === void 0 ? void 0 : review.id,\n offerId: review === null || review === void 0 ? void 0 : review.offer_id\n });\n logger.info(JSON.stringify({\n reviewId: review === null || review === void 0 ? void 0 : review.id,\n offerId: review === null || review === void 0 ? void 0 : review.offer_id\n }), {\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemCommentsSeeMore\n });\n };\n const openSignInModal = ()=>{\n openModal({\n modalId: Constants.ModalType.SignIn\n });\n launchTelemetry(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.ReviewItemCommentsSignIn, {\n reviewId: review === null || review === void 0 ? void 0 : review.id,\n offerId: review === null || review === void 0 ? void 0 : review.offer_id\n });\n logger.info(JSON.stringify({\n reviewId: review === null || review === void 0 ? void 0 : review.id,\n offerId: review === null || review === void 0 ? void 0 : review.offer_id\n }), {\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemCommentsSignIn\n });\n };\n const shouldNewCommentEnterNewlyAddedList = ()=>{\n return currentPage < comments.totalPages;\n };\n const onSubmitComment = /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(content) {\n if (createComment) {\n try {\n const res = yield createComment({\n offerId: review.offer_id,\n reviewId: review.id,\n addToNewlyAdded: shouldNewCommentEnterNewlyAddedList(),\n content\n });\n if (!(res === null || res === void 0 ? void 0 : res.error)) {\n setComposeText('');\n launchTelemetry(Constants.Telemetry.Action.Submitted, Constants.Telemetry.ActionModifier.ReviewItemCommentCreationSubmit, {\n reviewId: review === null || review === void 0 ? void 0 : review.id,\n offerId: review === null || review === void 0 ? void 0 : review.offer_id,\n content\n });\n logger.info(JSON.stringify({\n reviewId: review === null || review === void 0 ? void 0 : review.id,\n offerId: review === null || review === void 0 ? void 0 : review.offer_id,\n content\n }), {\n action: Constants.Telemetry.Action.Submitted,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemCommentCreationSubmit\n });\n }\n } catch (e) {\n launchTelemetry(Constants.Telemetry.Action.SubmitError, Constants.Telemetry.ActionModifier.ReviewItemCommentCreationSubmit, {\n reviewId: review === null || review === void 0 ? void 0 : review.id,\n offerId: review === null || review === void 0 ? void 0 : review.offer_id,\n error: `Encountered an error while attempting to create a comment, error: ${e}`\n });\n logger.error(JSON.stringify({\n reviewId: review === null || review === void 0 ? void 0 : review.id,\n offerId: review === null || review === void 0 ? void 0 : review.offer_id,\n error: `Encountered an error while attempting to create a comment, error: ${e}`\n }), {\n action: Constants.Telemetry.Action.SubmitError,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemCommentCreationSubmit\n });\n }\n }\n });\n return function onSubmitComment(content) {\n return _ref.apply(this, arguments);\n };\n }();\n const onComposerTextChange = (newContent)=>{\n setComposeText(newContent);\n };\n useEffect(()=>{\n if (expanded) {\n ensureStateInitialized({\n offerId: review.offer_id,\n reviewId: review.id,\n totalComments: review.comments_count\n });\n }\n loadCurrentPageDataIfNeeded();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n expanded,\n currentPage,\n isStateInitialized\n ]);\n useEffect(()=>{\n if (isStateInitialized && comments.currentLoadedPage) {\n clearData({\n offerId: review.offer_id,\n reviewId: review.id\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n signedIn\n ]);\n useEffect(()=>{\n return ()=>{\n clearData({\n offerId: review.offer_id,\n reviewId: review.id\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n return expanded && comments !== null && /*#__PURE__*/ _jsxs(\"div\", {\n children: [\n /*#__PURE__*/ _jsx(AppReviewItemCommentCollectionListSection, {\n comments: comments,\n currentPage: currentPage,\n locale: locale,\n totalPageCount: comments.totalPages,\n onSeeMoreClick: ()=>onSeeMoreClick(),\n onSeeLessClick: ()=>onSeeLessClick(),\n onCommentDelete: (commentId, isNewlyAddedComment)=>{\n deleteComment({\n commentId,\n offerId: review.offer_id,\n reviewId: review.id,\n isNewlyAddedComment\n });\n },\n onCommentEdit: (commentId, updatedContent, isNewlyAddedComment)=>{\n editComment({\n offerId: review.offer_id,\n reviewId: review.id,\n commentId,\n isNewlyAddedComment,\n updatedContent\n });\n }\n }),\n /*#__PURE__*/ _jsx(AppReviewItemCommentComposer, {\n onChange: (content)=>onComposerTextChange(content),\n signedIn: signedIn,\n openSignInModal: ()=>openSignInModal(),\n onSubmit: ()=>{\n onSubmitComment(composeText);\n },\n initialContent: composeText\n })\n ]\n });\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _object_without_properties(source, excluded) {\n if (source == null) return {};\n var target = _object_without_properties_loose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for(i = 0; i < sourceSymbolKeys.length; i++){\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\nfunction _object_without_properties_loose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for(i = 0; i < sourceKeys.length; i++){\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { Icon, Link, mergeStyleSets, Stack } from '@fluentui/react';\nconst contentStyles = mergeStyleSets({\n stack: {\n alignItems: 'center'\n },\n link: {\n padding: '5px 0'\n }\n});\nconst stackTokens = {\n childrenGap: 8\n};\nexport const AppReviewCommentCollectionPaginationButton = (_param)=>{\n var { iconName, text, onClick } = _param, additionalProps = _object_without_properties(_param, [\n \"iconName\",\n \"text\",\n \"onClick\"\n ]);\n return /*#__PURE__*/ _jsx(Link, _object_spread_props(_object_spread({\n className: contentStyles.link,\n onClick: onClick\n }, additionalProps), {\n children: /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n className: contentStyles.stack,\n tokens: stackTokens,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: text\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(Icon, {\n iconName: iconName\n })\n })\n ]\n })\n }));\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { useEffect, useState } from 'react';\nimport { getLocaleDate } from '@shared/utils/appUtils';\nimport * as PropTypes from 'prop-types';\nimport { mergeStyleSets, Text, Persona, PersonaSize, Stack } from '@fluentui/react';\nimport { NeutralColors } from '@fluentui/theme';\nimport { AppReviewItemCommentComposer } from '@shared/components/appReviewItemCommentComposer';\nimport { Constants } from '@shared/utils/constants';\nimport { launchTelemetry } from '@shared/utils/reviewsUtils';\nimport { logger } from '@src/logger';\nimport { AppReviewCommentItemToolbar } from '@shared/components/appReviewCommentItemToolbar';\nconst appReviewCommentItemStyles = mergeStyleSets({\n commentItem: {\n marginTop: '24px'\n },\n commentAuthorName: {\n color: NeutralColors.gray130,\n fontWeight: 600\n },\n deletedItemText: {\n color: '#4f4f4f',\n fontStyle: 'italic'\n },\n commentAuthorInfoBar: {\n marginBottom: '10px',\n minHeight: '35px'\n },\n editedLabel: {\n color: NeutralColors.gray120\n },\n postTime: {\n color: NeutralColors.gray130,\n overflow: 'hidden'\n },\n smallScreenToolbar: [\n 'ms-hiddenLgUp',\n {\n marginTop: 10,\n marginBottom: 10\n }\n ],\n mediumScreenToolbar: [\n 'ms-hiddenMdDown',\n {\n margin: '0 4px'\n }\n ],\n personaDetails: {\n paddingRight: 0\n }\n});\nconst commentAuthorInfoBarStackTokenDef = {\n childrenGap: 4\n};\nexport function AppReviewCommentItemContent({ comment }) {\n return /*#__PURE__*/ _jsx(Text, {\n children: comment.content\n });\n}\nexport function AppReviewCommentItemEditedLabel({ context }) {\n return /*#__PURE__*/ _jsx(Text, {\n className: appReviewCommentItemStyles.editedLabel,\n children: context.loc('ReviewItem_CommentSection_Comment_Updated_Label', 'Edited')\n });\n}\nAppReviewCommentItemEditedLabel.contextTypes = {\n loc: PropTypes.func\n};\nexport function AppReviewCommentItemPostTime({ comment, locale }, context) {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: appReviewCommentItemStyles.postTime,\n children: [\n /*#__PURE__*/ _jsx(Text, {\n nowrap: true,\n block: true,\n className: \"ms-hiddenMdDown\",\n children: context.locParams('ReviewItem_CommentSection_Comment_Posted_Time_Label_Long', [\n getLocaleDate(comment.updatedAt, locale)\n ], 'replied on {0}')\n }),\n /*#__PURE__*/ _jsx(Text, {\n nowrap: true,\n block: true,\n className: \"ms-hiddenLgUp\",\n children: context.locParams('ReviewItem_CommentSection_Comment_Posted_Time_Label_Short', [\n getLocaleDate(comment.updatedAt, locale)\n ], '- {0}')\n })\n ]\n });\n}\nAppReviewCommentItemPostTime.contextTypes = {\n locParams: PropTypes.func\n};\nexport function AppReviewCommentItemAuthorName({ comment }) {\n var _comment_customerInfo;\n return /*#__PURE__*/ _jsx(Persona, {\n onRenderPrimaryText: ()=>{\n var _comment_customerInfo;\n return /*#__PURE__*/ _jsx(Text, {\n className: appReviewCommentItemStyles.commentAuthorName,\n children: (_comment_customerInfo = comment.customerInfo) === null || _comment_customerInfo === void 0 ? void 0 : _comment_customerInfo.name\n });\n },\n text: (_comment_customerInfo = comment.customerInfo) === null || _comment_customerInfo === void 0 ? void 0 : _comment_customerInfo.name,\n size: PersonaSize.size24,\n styles: {\n details: appReviewCommentItemStyles.personaDetails\n }\n });\n}\nexport const AppReviewCommentItem = ({ comment, locale, onDelete, onEdit }, context)=>{\n const [isEditing, setIsEditing] = useState(false);\n const [updatedContent, setUpdatedContent] = useState(comment.content);\n const toggleEdit = ()=>{\n setIsEditing((prevState)=>!prevState);\n };\n const onDeleteClick = ()=>{\n launchTelemetry(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.ReviewItemCommentDeleteButton, {\n commentId: comment.id,\n reviewId: comment.reviewId\n });\n logger.info(JSON.stringify({\n commentId: comment.id,\n reviewId: comment.reviewId\n }), {\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemCommentDeleteButton\n });\n onDelete();\n };\n const onEditClick = ()=>{\n launchTelemetry(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.ReviewItemCommentEditButton, {\n commentId: comment === null || comment === void 0 ? void 0 : comment.id,\n reviewId: comment === null || comment === void 0 ? void 0 : comment.reviewId\n });\n logger.info(JSON.stringify({\n commentId: comment === null || comment === void 0 ? void 0 : comment.id,\n reviewId: comment === null || comment === void 0 ? void 0 : comment.reviewId\n }), {\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemCommentEditButton\n });\n toggleEdit();\n };\n useEffect(()=>{\n setIsEditing(false);\n }, [\n comment\n ]);\n return /*#__PURE__*/ _jsx(\"div\", {\n className: appReviewCommentItemStyles.commentItem,\n tabIndex: 0,\n children: !(comment === null || comment === void 0 ? void 0 : comment.isDeleted) ? /*#__PURE__*/ _jsxs(\"div\", {\n children: [\n /*#__PURE__*/ _jsxs(Stack, {\n tokens: commentAuthorInfoBarStackTokenDef,\n horizontal: true,\n verticalAlign: \"center\",\n className: appReviewCommentItemStyles.commentAuthorInfoBar,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n disableShrink: true,\n children: /*#__PURE__*/ _jsx(AppReviewCommentItemAuthorName, {\n comment: comment\n })\n }),\n /*#__PURE__*/ _jsx(AppReviewCommentItemPostTime, {\n comment: comment,\n locale: locale\n }),\n comment.isOwner && /*#__PURE__*/ _jsx(AppReviewCommentItemToolbar, {\n className: appReviewCommentItemStyles.mediumScreenToolbar,\n onDeleteToggle: onDeleteClick,\n onEditToggle: onEditClick,\n isEditing: isEditing\n }),\n comment.createdAt !== comment.updatedAt && /*#__PURE__*/ _jsx(AppReviewCommentItemEditedLabel, {\n context: context\n })\n ]\n }),\n !isEditing && /*#__PURE__*/ _jsx(AppReviewCommentItemContent, {\n comment: comment\n }),\n comment.isOwner && !isEditing && /*#__PURE__*/ _jsx(AppReviewCommentItemToolbar, {\n className: appReviewCommentItemStyles.smallScreenToolbar,\n onDeleteToggle: onDeleteClick,\n onEditToggle: onEditClick,\n isEditing: isEditing\n }),\n isEditing && /*#__PURE__*/ _jsx(AppReviewItemCommentComposer, {\n initialContent: updatedContent,\n editMode: true,\n onCloseEdit: toggleEdit,\n onChange: (content)=>setUpdatedContent(content),\n onSubmit: ()=>onEdit(updatedContent),\n onDeleteToggle: onDeleteClick,\n onEditToggle: onEditClick\n })\n ]\n }) : /*#__PURE__*/ _jsx(\"div\", {\n children: /*#__PURE__*/ _jsx(Stack, {\n horizontal: true,\n verticalAlign: \"center\",\n tokens: {\n childrenGap: 8\n },\n children: /*#__PURE__*/ _jsx(Persona, {\n size: PersonaSize.size24,\n initialsColor: \"#919191\",\n onRenderPrimaryText: ()=>/*#__PURE__*/ _jsx(Text, {\n className: appReviewCommentItemStyles.deletedItemText,\n children: context.loc('ReviewItem_CommentSection_Comment_Deleted_Label', 'This comment was deleted.')\n }),\n styles: {\n details: appReviewCommentItemStyles.personaDetails\n }\n })\n })\n })\n });\n};\nAppReviewCommentItem.contextTypes = {\n locParams: PropTypes.func,\n loc: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { IconButton, Stack, TooltipDelay, TooltipHost } from '@fluentui/react';\nimport * as PropTypes from 'prop-types';\nexport const AppReviewCommentItemToolbar = ({ onDeleteToggle, onEditToggle, className, isEditing = false }, context)=>{\n const icons = {\n delete: {\n iconName: 'Delete'\n },\n edit: {\n iconName: 'Edit'\n }\n };\n const tooltipCalloutProps = {\n gapSpace: 5\n };\n return /*#__PURE__*/ _jsx(\"div\", {\n className: className,\n children: /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n tokens: {\n childrenGap: 4\n },\n children: [\n /*#__PURE__*/ _jsx(TooltipHost, {\n content: context.loc('ReviewItem_CommentSection_Comment_Edit_Button_Tooltip', 'Edit your comment'),\n calloutProps: tooltipCalloutProps,\n delay: TooltipDelay.zero,\n children: /*#__PURE__*/ _jsx(IconButton, {\n iconProps: icons.edit,\n onClick: ()=>{\n !isEditing && onEditToggle();\n },\n checked: isEditing,\n text: context.loc('ReviewItem_CommentSection_Comment_Edit_Button_Label', 'Edit'),\n ariaLabel: context.loc('ReviewItem_CommentSection_Comment_Edit_Button_Label', 'Edit')\n })\n }),\n /*#__PURE__*/ _jsx(TooltipHost, {\n content: context.loc('ReviewItem_CommentSection_Comment_Delete_Button_Tooltip', 'Delete your comment'),\n calloutProps: tooltipCalloutProps,\n delay: TooltipDelay.zero,\n children: /*#__PURE__*/ _jsx(IconButton, {\n iconProps: icons.delete,\n onClick: onDeleteToggle,\n text: context.loc('ReviewItem_CommentSection_Comment_Delete_Button_Label', 'Delete'),\n ariaLabel: context.loc('ReviewItem_CommentSection_Comment_Delete_Button_Label', 'Delete')\n })\n })\n ]\n })\n });\n};\nAppReviewCommentItemToolbar.contextTypes = {\n loc: PropTypes.func\n};\n","/* eslint-disable @typescript-eslint/no-empty-function */ import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { Link, mergeStyleSets, MessageBar, PrimaryButton, TextField, DefaultButton, Stack } from '@fluentui/react';\nimport { Constants } from '@shared/utils/constants';\nimport * as PropTypes from 'prop-types';\nimport { useEffect, useState } from 'react';\nimport { AppReviewCommentItemToolbar } from './appReviewCommentItemToolbar';\nconst BUTTON_SPACING = 10;\nconst appReviewCommentComposerStyles = mergeStyleSets({\n commentTextArea: {\n marginBottom: '10px'\n },\n submitButton: {\n marginLeft: `${BUTTON_SPACING / 2} !important`\n },\n commentToolbar: [\n 'ms-hiddenLgUp',\n {\n marginRight: BUTTON_SPACING / 2\n }\n ]\n});\nconst tokenDef = {\n childrenGap: BUTTON_SPACING\n};\nexport function AppReviewItemCommentComposer({ signedIn = true, openSignInModal = ()=>{}, onSubmit, initialContent = '', editMode = false, onCloseEdit = ()=>{}, onChange = ()=>{}, onDeleteToggle = ()=>{}, onEditToggle = ()=>{} }, context) {\n const [isDisabled, setIsDisabled] = useState(false);\n const [isShowContentLengthError, setIsShowContentLengthError] = useState(false);\n const isContentValid = (content)=>{\n if (content) {\n return content.length > 0 && content.length <= Constants.Reviews.MaxCommentComposeLength;\n }\n return false;\n };\n useEffect(()=>{\n setIsDisabled(!isContentValid(initialContent));\n setIsShowContentLengthError(false);\n }, [\n initialContent\n ]);\n if (!signedIn) {\n return /*#__PURE__*/ _jsxs(MessageBar, {\n children: [\n context.loc('ReviewItem_CommentSection_Unauthenticated_Compose_Info_SignIn_Description', 'To post comments please '),\n /*#__PURE__*/ _jsx(Link, {\n onClick: openSignInModal,\n children: context.loc('ReviewItem_CommentSection_Unauthenticated_Compose_Info_SignIn_Link', 'sign in.')\n })\n ]\n });\n } else {\n return /*#__PURE__*/ _jsxs(\"div\", {\n children: [\n /*#__PURE__*/ _jsx(TextField, {\n ariaLabel: context.loc('ReviewItem_CommentSection_Compose_TextBox_Aria_Label', 'Review comment text box'),\n multiline: true,\n resizable: false,\n value: initialContent,\n maxLength: Constants.Reviews.MaxCommentComposeLength,\n className: appReviewCommentComposerStyles.commentTextArea,\n onChange: (e, value)=>{\n onChange(value);\n // If the content length warning is showing and the user reduced the content length, hide the warning\n if (isShowContentLengthError && value.length < Constants.Reviews.MaxCommentComposeLength) {\n setIsShowContentLengthError(false);\n }\n },\n onKeyDown: ()=>{\n setIsShowContentLengthError(initialContent.length >= Constants.Reviews.MaxCommentComposeLength);\n },\n errorMessage: isShowContentLengthError && context.locParams('ReviewItem_CommentSection_Compose_LongContent_Warning', [\n Constants.Reviews.MaxCommentComposeLength.toString()\n ], 'You can enter a comment with a maximum of {0} characters') || null\n }),\n /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n wrap: true,\n tokens: tokenDef,\n children: [\n editMode && /*#__PURE__*/ _jsx(AppReviewCommentItemToolbar, {\n className: appReviewCommentComposerStyles.commentToolbar,\n onDeleteToggle: onDeleteToggle,\n onEditToggle: onEditToggle,\n isEditing: true\n }),\n /*#__PURE__*/ _jsx(PrimaryButton, {\n className: appReviewCommentComposerStyles.submitButton,\n text: context.loc(!editMode ? 'ReviewItem_CommentSection_Compose_Post_Button_Label' : 'ReviewItem_CommentSection_Compose_Edit_Button_Label'),\n onClick: onSubmit,\n allowDisabledFocus: true,\n disabled: isDisabled\n }),\n editMode && /*#__PURE__*/ _jsx(DefaultButton, {\n text: context.loc('ReviewItem_CommentSection_Compose_Edit_Discard_Button_Label'),\n onClick: onCloseEdit,\n allowDisabledFocus: true\n })\n ]\n })\n ]\n });\n }\n}\nAppReviewItemCommentComposer.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func\n};\n","/* eslint-disable @typescript-eslint/no-empty-function */ function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { useCallback, useRef } from 'react';\nimport { Callout, CommandBar, CommandBarButton, DirectionalHint, mergeStyleSets } from '@fluentui/react';\nimport * as PropTypes from 'prop-types';\nconst contentStyles = mergeStyleSets({\n reviewButtonsStack: {\n padding: 0\n },\n markedAsHelpfulThanksCallout: {\n padding: '8px 24px'\n }\n});\nexport const AppReviewItemToolbar = ({ onToggleComments = ()=>{}, onReportAbuse = ()=>{}, onMarkAsHelpful = ()=>{}, review, isMarkedAsHelpful = false, showMarkAsHelpfulThanks }, context)=>{\n const markAsHelpfulButtonRef = useRef(null);\n const toolbarButtonsContainerRef = useRef(null);\n const initializeItems = useCallback(()=>{\n const items = [];\n items.push({\n key: 'markAsHelpful',\n onClick: onMarkAsHelpful,\n iconProps: {\n iconName: !isMarkedAsHelpful ? 'Like' : 'LikeSolid'\n },\n text: context.locParams('ReviewItem_MarkAsHelpfulButton_Label', [\n review.mark_as_helpful_count.toString()\n ], 'Mark as helpful ({0})'),\n commandBarButtonAs: ({ key, onClick, iconProps, text })=>{\n const buttonProps = {\n key,\n role: 'button',\n onClick,\n iconProps,\n text,\n elementRef: markAsHelpfulButtonRef\n };\n return /*#__PURE__*/ _jsx(CommandBarButton, _object_spread_props(_object_spread({}, buttonProps), {\n role: \"menuitem\"\n }));\n }\n });\n items.push({\n key: 'comments',\n onClick: onToggleComments,\n iconProps: {\n iconName: 'Chat'\n },\n text: context.locParams('ReviewItem_CommentsButton_Label', [\n review.comments_count.toString()\n ], 'Comments ({0})')\n });\n items.push({\n key: 'report',\n onClick: onReportAbuse,\n iconProps: {\n iconName: 'Flag'\n },\n text: context.loc('ReportButton_Label', 'Report review')\n });\n return items;\n }, [\n isMarkedAsHelpful,\n onMarkAsHelpful\n ]);\n const items = initializeItems();\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"appReviewButtons\",\n ref: toolbarButtonsContainerRef,\n children: [\n /*#__PURE__*/ _jsx(CommandBar, {\n items: items,\n overflowButtonProps: {\n menuProps: {\n isBeakVisible: false,\n items: []\n }\n },\n styles: {\n root: contentStyles.reviewButtonsStack\n }\n }),\n showMarkAsHelpfulThanks && /*#__PURE__*/ _jsx(Callout, {\n directionalHint: DirectionalHint.topCenter,\n className: contentStyles.markedAsHelpfulThanksCallout,\n target: markAsHelpfulButtonRef.current ? markAsHelpfulButtonRef : toolbarButtonsContainerRef,\n doNotLayer: true,\n children: context.loc('ReviewItem_MarkAsHelpful_Submitted_Thanks_Label', 'Thank you')\n })\n ]\n });\n};\nAppReviewItemToolbar.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n reportAbuseCallback: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { getLocaleDate } from '../../shared/utils/appUtils';\nexport const ReviewIsvReply = (props)=>{\n const classNames = require('classnames-minimal');\n const [isImageLoadingError, setIsImageLoadingError] = React.useState(false);\n const imageClassName = classNames({\n isvIcon: !isImageLoadingError\n });\n const containerClasses = classNames({\n isvReplyContainer: true,\n [props.classes]: props.classes\n });\n const replyDate = getLocaleDate(props.isvReply.replied_at, props.locale);\n const handleLoadError = ()=>{\n setIsImageLoadingError(true);\n };\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: containerClasses,\n children: [\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"isvReplyTitle\",\n children: [\n /*#__PURE__*/ _jsx(\"img\", {\n className: imageClassName,\n alt: \"product-icon\",\n src: props.iconUrl,\n onError: handleLoadError\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"isvName\",\n children: props.publisherName ? props.publisherName : ''\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"replyDate\",\n children: [\n \"replied on \",\n replyDate\n ]\n })\n ]\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"isvReplyContent\",\n children: props.isvReply.content\n })\n ]\n });\n};\n","import { ensureAppReviewCommentCollectionData, ensureClearAppReviewCommentCollectionData, createAppReviewComment, ensureAppReviewCommentCollectionStateInitialized } from '@shared/actions/thunkActions';\nimport { AppReviewCommentCollection as AppReviewCommentCollectionComponent } from '@shared/components/appReviewCommentCollection';\nimport { connect } from 'react-redux';\nimport { createModalAction, createEntityReviewCommentModalAction, createEntityReviewCommentsUnloadPagesAction } from '@shared/actions/actions';\nimport { Constants } from '@shared/utils/constants';\nconst mapStateToProps = (state, ownProps)=>{\n var _state_apps_appReviewsData, _state_apps, _ownProps_review, _state_apps_appReviewsData1, _state_apps1, _state_users;\n const commentsState = ((_state_apps = state.apps) === null || _state_apps === void 0 ? void 0 : (_state_apps_appReviewsData = _state_apps.appReviewsData) === null || _state_apps_appReviewsData === void 0 ? void 0 : _state_apps_appReviewsData.reviewComments) && ((_state_apps1 = state.apps) === null || _state_apps1 === void 0 ? void 0 : (_state_apps_appReviewsData1 = _state_apps1.appReviewsData) === null || _state_apps_appReviewsData1 === void 0 ? void 0 : _state_apps_appReviewsData1.reviewComments[(_ownProps_review = ownProps.review) === null || _ownProps_review === void 0 ? void 0 : _ownProps_review.id]) || null;\n return {\n signedIn: (_state_users = state.users) === null || _state_users === void 0 ? void 0 : _state_users.signedIn,\n comments: commentsState,\n expanded: ownProps.expanded,\n locale: ownProps.locale,\n review: ownProps.review,\n isStateInitialized: commentsState !== null\n };\n};\nconst mapDispatchToProps = (dispatch)=>{\n return {\n loadData: ({ offerId, reviewId, page, itemsPerPage })=>dispatch(ensureAppReviewCommentCollectionData({\n offerId,\n reviewId,\n page,\n itemsPerPage\n })),\n clearData: ({ offerId, reviewId })=>dispatch(ensureClearAppReviewCommentCollectionData({\n offerId,\n reviewId\n })),\n createComment: ({ offerId, reviewId, content, addToNewlyAdded })=>dispatch(createAppReviewComment({\n offerId,\n reviewId,\n commentContent: content,\n isNewlyAddedComment: addToNewlyAdded\n })),\n editComment: ({ offerId, reviewId, commentId, updatedContent, isNewlyAddedComment = false })=>dispatch(createEntityReviewCommentModalAction({\n showModal: true,\n modalMode: Constants.Reviews.ReviewCommentModalMode.ConfirmUpdate,\n actionPayload: {\n offerId,\n reviewId,\n commentId,\n commentContent: updatedContent,\n isNewlyAddedComment\n }\n })),\n deleteComment: ({ offerId, reviewId, commentId, isNewlyAddedComment = false })=>dispatch(createEntityReviewCommentModalAction({\n showModal: true,\n modalMode: Constants.Reviews.ReviewCommentModalMode.ConfirmDelete,\n actionPayload: {\n commentId,\n reviewId,\n offerId,\n isNewlyAddedComment\n }\n })),\n openModal: ({ modalId })=>{\n return dispatch(createModalAction({\n showModal: true,\n modalId: modalId\n }));\n },\n ensureStateInitialized: ({ offerId, reviewId, totalComments })=>{\n return dispatch(ensureAppReviewCommentCollectionStateInitialized({\n offerId,\n reviewId,\n totalComments\n }));\n },\n unloadPages: ({ offerId, reviewId })=>{\n return dispatch(createEntityReviewCommentsUnloadPagesAction({\n offerId,\n reviewId\n }));\n }\n };\n};\nexport const AppReviewCommentCollection = connect(mapStateToProps, mapDispatchToProps)(AppReviewCommentCollectionComponent);\n","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React, { useEffect, useState } from 'react';\nimport { Link, mergeStyleSets, MessageBar } from '@fluentui/react';\nimport { AppReviewItemToolbar } from '@shared/components/appReviewItemToolbar';\nimport { ReviewIsvReply } from '@shared/components/reviewIsvReply';\nimport { AppReviewCommentCollection } from '@shared/containers/appReviewCommentCollection';\nimport { launchTelemetry } from '@shared/utils/reviewsUtils';\nimport { Constants } from '@shared/utils/constants';\nimport { logger } from '@src/logger';\nimport { useBoolean } from '@fluentui/react-hooks';\nimport * as PropTypes from 'prop-types';\nconst contentStyles = mergeStyleSets({\n markAsHelpfulAuthMsg: {\n marginTop: 24\n }\n});\nconst MARK_AS_HELPFUL_MESSAGE_HIDE_MS = 2000;\nexport const AppReviewSocialContent = ({ isEmbed, review, onReportClick, locale, iconUrl, publisherName, isSignedIn, isMarkedAsHelpful, onToggleMarkAsHelpful, openSignInModal }, context)=>{\n const [commentsExpanded, setCommentsExpanded] = useState(false);\n const [markAsHelpfulAuthMsgExpanded, setMarkAsHelpfulAuthMsgExpanded] = useState(false);\n const [showMarkedAsHelpfulThanks, { setFalse: hideMarkAsHelpfulMessage, setTrue: showMarkAsHelpfulMessage }] = useBoolean(false);\n const triggerMarkAsHelpfulThanksMessage = ()=>{\n showMarkAsHelpfulMessage();\n // Hide the \"Thank you\" callout after the configured amount of milliseconds\n const timeout = setTimeout(()=>{\n hideMarkAsHelpfulMessage();\n clearTimeout(timeout);\n }, MARK_AS_HELPFUL_MESSAGE_HIDE_MS);\n };\n useEffect(()=>{\n if (markAsHelpfulAuthMsgExpanded && isSignedIn) {\n setMarkAsHelpfulAuthMsgExpanded(false);\n }\n }, [\n isSignedIn\n ]);\n const toggleComments = ()=>{\n const payload = {\n action: commentsExpanded ? Constants.Telemetry.Action.Collapse : Constants.Telemetry.Action.Expand,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemCommentsToggleButton,\n details: {\n reviewId: review === null || review === void 0 ? void 0 : review.id,\n appId: review === null || review === void 0 ? void 0 : review.offer_id\n }\n };\n launchTelemetry(payload.action, payload.actionModifier, payload.details);\n logger.info(JSON.stringify(payload.details), {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n setMarkAsHelpfulAuthMsgExpanded(false);\n setCommentsExpanded((prevCommentsExpanded)=>!prevCommentsExpanded);\n };\n const toggleMarkAsHelpfulAuthMsg = ()=>{\n const payload = {\n action: markAsHelpfulAuthMsgExpanded ? Constants.Telemetry.Action.Collapse : Constants.Telemetry.Action.Expand,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemMarkAsHelpfulUnauthorizedMessage,\n details: {\n reviewId: review === null || review === void 0 ? void 0 : review.id,\n appId: review === null || review === void 0 ? void 0 : review.offer_id\n }\n };\n launchTelemetry(payload.action, payload.actionModifier, payload.details);\n logger.info(JSON.stringify(payload.details), {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n setCommentsExpanded(false);\n setMarkAsHelpfulAuthMsgExpanded((prevMarkAsHelpfulAuthMsgExpanded)=>!prevMarkAsHelpfulAuthMsgExpanded);\n };\n const onMarkAsHelpfulClick = ()=>{\n const { id: reviewId, offer_id: offerId } = review;\n const telemetryPayload = {\n reviewId,\n offerId,\n prevIsMarkedAsHelpful: isMarkedAsHelpful\n };\n launchTelemetry(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.ReviewItemMarkAsHelpfulButton, telemetryPayload);\n logger.info(JSON.stringify(telemetryPayload), {\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemMarkAsHelpfulButton\n });\n if (isSignedIn) {\n const isHelpful = !isMarkedAsHelpful;\n onToggleMarkAsHelpful({\n isHelpful\n });\n if (isHelpful) {\n triggerMarkAsHelpfulThanksMessage();\n }\n } else {\n toggleMarkAsHelpfulAuthMsg();\n }\n };\n const onMarkAsHelpfulSignInClick = ()=>{\n openSignInModal();\n launchTelemetry(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.ReviewItemMarkAsHelpfulSignIn, {\n reviewId: review === null || review === void 0 ? void 0 : review.id,\n offerId: review === null || review === void 0 ? void 0 : review.offer_id\n });\n logger.info(JSON.stringify({\n reviewId: review === null || review === void 0 ? void 0 : review.id,\n offerId: review === null || review === void 0 ? void 0 : review.offer_id\n }), {\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.ReviewItemMarkAsHelpfulSignIn\n });\n };\n return /*#__PURE__*/ _jsxs(_Fragment, {\n children: [\n isEmbed || !review.title && !review.content ? null : /*#__PURE__*/ _jsx(AppReviewItemToolbar, {\n onReportAbuse: onReportClick,\n onToggleComments: toggleComments,\n onMarkAsHelpful: onMarkAsHelpfulClick,\n review: review,\n isMarkedAsHelpful: isMarkedAsHelpful,\n showMarkAsHelpfulThanks: showMarkedAsHelpfulThanks\n }),\n review.isv_reply && /*#__PURE__*/ _jsx(ReviewIsvReply, {\n isvReply: review.isv_reply,\n locale: locale,\n iconUrl: iconUrl,\n publisherName: publisherName\n }),\n /*#__PURE__*/ _jsx(AppReviewCommentCollection, {\n expanded: commentsExpanded,\n review: review,\n locale: locale\n }),\n markAsHelpfulAuthMsgExpanded && /*#__PURE__*/ _jsxs(MessageBar, {\n styles: {\n root: contentStyles.markAsHelpfulAuthMsg\n },\n children: [\n context.loc('ReviewItem_MarkAsHelpful_Unauthenticated_SignIn_Description', 'To mark as helpful please '),\n /*#__PURE__*/ _jsx(Link, {\n onClick: onMarkAsHelpfulSignInClick,\n children: context.loc('ReviewItem_MarkAsHelpful_Unauthenticated_SignIn_Link', 'sign in.')\n })\n ]\n })\n ]\n });\n};\nAppReviewSocialContent.contextTypes = {\n loc: PropTypes.func\n};\n","/* eslint-disable react/forbid-dom-props */ function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { Stack, Text, Image } from '@fluentui/react';\nimport { v4 } from 'uuid';\nimport SpzaComponent from '@shared/components/spzaComponent';\nimport { PricingStates, AppTag } from '@shared/Models';\nimport { DataMap } from '@shared/utils/dataMapping';\nimport { BaseTile } from '@shared/containers/baseTile';\nimport { Constants, OfferType } from '@shared/utils/constants';\nimport { isOfficeNonSaasApp, isOfficeApp, isSaaS, getParentProductTitle, getCTATypeForActionString, isTransactApp, isAvailableInThisRegion, isPrivateOffer, getPDPRoute, isBagTransactable, isPowerBIVisuals, getCtaBagTransactable, getBadgeTypes, getProductByUrlKey } from '@shared/utils/appUtils';\nimport { generateTileClickPayloadAndLogTelemetry, getProductsList, hideCertificateBadges } from '@shared/utils/detailUtils';\nimport { getStartingFromPriceText } from '@shared/utils/pricing';\nimport { getComponentXYCoordinate, getTileComponentRank } from '@shared/utils/reactUtils';\nimport { isAppSource, isEmbed } from '@embed/embedHostUtils';\nimport { getPrimaryProductUrl, bitMasksMatchFilter } from '@shared/utils/datamappingHelpers';\nimport { SharedColors } from '@fluentui/theme';\nimport PBICertified from '@shared/images/badges/PBICertified.svg';\nimport AzureExpertsMSP from '@shared/images/badges/AzureExpertsMSP.svg';\nimport PrivateOffer from '@shared/images/badges/PrivateOffer.svg';\nimport OfficeAwards from '@shared/images/badges/OfficeAwards.svg';\nimport SolutionMap from '@shared/images/badges/SolutionMap.svg';\nimport MicrosoftCertified from '@shared/images/badges/MicrosoftCertified.svg';\nimport AzureBenefitEligibleIMG from '@shared/images/badges/AzureBenefitEligible.svg';\nimport CertifiedSoftware from '@shared/images/badges/badge_CertifiedSoftware.svg';\nimport freeTrial from '@shared/images/tileFreeTrialBadge.svg';\nimport { ItemsTooltip } from '@shared/components/ItemsTooltip';\nimport { isOneTimePaymentOffer } from '@shared/utils/onetimepaymentoffers';\nimport { getRatingSummaryByType } from '@shared/utils/reviewsUtils';\nconst { CTAType: { Install: CTAInstall, BuyLicense: CTABuyLicense, Get: CTAGet, RequestTrial: CTARequestTrial, Try: CTATry, Purchase: CTAPurchase }, ActionStrings: { Install: ActionInstall, BuyLicense: ActionBuyLicense, Get: ActionGet, RequestTrial: ActionRequestTrial, Try: ActionTry }, JsllCTAId: { Install: JsllCTAIdInstall, Try: JsllCTAIdTry, BuyLicense: JsllCTAIdBuyLicense } } = Constants;\nconst badgesInformation = [\n {\n badge: Constants.BadgeType.AzureBenefitEligible,\n loc: 'Global_Loc_Azure_benefit',\n title: 'Azure benefit eligible',\n src: AzureBenefitEligibleIMG\n },\n {\n badge: Constants.BadgeType.MicrosoftCertified,\n loc: 'Microsoft365Certified_Badge',\n title: 'Microsoft 365 Certified',\n src: MicrosoftCertified,\n hidden: ()=>hideCertificateBadges()\n },\n {\n badge: Constants.BadgeType.PBICertified,\n loc: 'PowerBICertified_Badge',\n title: 'Power BI Certified',\n src: PBICertified\n },\n {\n badge: Constants.BadgeType.CertifiedSoftware,\n loc: 'CertifiedSoftware',\n title: 'Certified software',\n src: CertifiedSoftware\n },\n {\n badge: Constants.BadgeType.PreferredSolution,\n loc: 'MicrosoftPreferredSolution_Badge',\n title: 'Microsoft preferred solution',\n src: SolutionMap\n },\n {\n badge: Constants.BadgeType.AzureExpertsMSP,\n loc: 'AzureExpertsMSP_Badge',\n title: 'Azure Experts MSP',\n src: AzureExpertsMSP\n },\n {\n badge: Constants.BadgeType.Microsoft365AppAward,\n loc: 'Microsoft365AppAward_Badge',\n title: 'Microsoft 365 App Award',\n src: OfficeAwards\n },\n {\n badge: Constants.BadgeType.PrivateOffer,\n loc: 'UserPrivatePlan_Badge',\n title: 'Private Plan',\n src: PrivateOffer,\n customClassName: 'size-14'\n },\n {\n badge: Constants.BadgeType.FreeTrial,\n loc: 'FreeTrial_Badge',\n title: 'Free trial',\n src: freeTrial\n }\n];\nexport class AppTile extends SpzaComponent {\n handleKeyPress(event) {\n // only enter key should open the corresponding pop up\n if (event.charCode === Constants.SystemKey.Enter) {\n if (event.preventDefault) {\n event.preventDefault();\n }\n this.getApp(event);\n }\n }\n getApp(e) {\n e.stopPropagation();\n const { closeTile, currentView, actionString, ctaTypes, licenseManagement, entityId, AverageRating, NumberOfRatings, doesTenantHasLicenseForApp, linkedAddIns, uiRole, activeFilters, searchSortingOption, count, searchReqId, setTileCheckoutSource, ribbonKey } = this.props;\n if (closeTile && currentView === Constants.currentView.AppDetails) {\n this.props.closeTile();\n }\n let ctaType = getCTATypeForActionString(actionString);\n // Since Get and Purchase have the same action strings, fix the CTA type for purchase\n if (ctaTypes.length && ctaTypes[0] === CTAPurchase) {\n ctaType = CTAPurchase;\n }\n if (this.isPBIVApp) {\n ctaType = CTAGet;\n } else if (isBagTransactable(this.props)) {\n ctaType = getCtaBagTransactable(uiRole, doesTenantHasLicenseForApp, licenseManagement === null || licenseManagement === void 0 ? void 0 : licenseManagement.isFreemium);\n } else if (licenseManagement === null || licenseManagement === void 0 ? void 0 : licenseManagement.isMicrosoftManaged) {\n var _this_getCtaMicrosoftManaged;\n ctaType = (_this_getCtaMicrosoftManaged = this.getCtaMicrosoftManaged()) === null || _this_getCtaMicrosoftManaged === void 0 ? void 0 : _this_getCtaMicrosoftManaged.type;\n }\n const reference = this.refs[`appTile ${entityId}`];\n const coordinate = getComponentXYCoordinate(reference);\n const tileRank = getTileComponentRank(reference);\n const badgeTypes = getBadgeTypes(this.props);\n setTileCheckoutSource();\n const details = {\n id: entityId,\n rank: JSON.stringify(tileRank),\n xOffset: coordinate.x,\n yOffset: coordinate.y,\n CTAType: ctaType,\n currentView,\n appAverageRating: AverageRating,\n appNumOfRatings: NumberOfRatings,\n isMicrosoftManaged: licenseManagement && licenseManagement.isMicrosoftManaged,\n isFreemium: licenseManagement && licenseManagement.isFreemium,\n hasLicense: doesTenantHasLicenseForApp,\n isSaaSBundle: false,\n discoveryData: {\n totalNumOfResults: count,\n activeFilters,\n sortingBy: searchSortingOption,\n searchRequestId: searchReqId\n },\n badge: JSON.stringify(badgeTypes)\n };\n // Add Legacy Telemetry Properties for Bundle App Tile CTA Click\n if (linkedAddIns && linkedAddIns.length > 0) {\n details.isSaaSBundle = true;\n }\n generateTileClickPayloadAndLogTelemetry(Constants.Telemetry.ActionModifier.AppTileCTAButton, details);\n this.context.ctaCallback({\n entity: this.props,\n entityType: Constants.EntityType.App,\n ctaType,\n actionModifier: Constants.Telemetry.ActionModifier.AppTileCTAButton,\n hasLicense: doesTenantHasLicenseForApp,\n ribbonKey\n });\n }\n renderStartingPrice() {\n const { startingPrice, billingCountryCode, offerType, entityId, locale } = this.props;\n const isOneTimePayment = isOneTimePaymentOffer(entityId);\n if ((startingPrice === null || startingPrice === void 0 ? void 0 : startingPrice.pricingData) && startingPrice.pricingData !== PricingStates.NoPricingData) {\n if (startingPrice.pricingData === PricingStates.FreeApp) {\n return `${this.context.loc('Pricing_Free', 'Free')}`;\n }\n if (startingPrice.pricingData === PricingStates.StartFromFree) {\n return `${this.context.loc('Pricing_StartsAt', 'Starts at')} ${this.context.loc('Pricing_Free', 'Free')}`;\n }\n if (startingPrice.pricingData === PricingStates.AdditionalPurchasesRequired) {\n return `${this.context.loc('AdditionalPurchaseMayBeRequired', 'Additional purchase may be required')}`;\n }\n if (startingPrice.pricingData === PricingStates.BYOL) {\n return `${this.context.loc('Bring_Your_Own_License_Shortcut', 'Bring your own license')}`;\n }\n if (typeof startingPrice.pricingData === 'object') {\n const price = getStartingFromPriceText({\n startingPrice,\n offerType,\n context: this.context,\n countryCode: billingCountryCode,\n locale,\n isOneTimePaymentOffer: isOneTimePayment\n });\n return `${this.context.loc('Pricing_StartsAt', 'Starts at')} ${price}`;\n }\n if (!isAvailableInThisRegion(this.props)) {\n return `${this.context.loc('Not_Available_In_Billing_Region', 'Not available in your region')}`;\n }\n }\n }\n renderPopularity() {\n if (this.props.showPopularity && this.props.popularity) {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"pricingText\",\n children: [\n \"P#: \",\n this.props.popularity * 1000 || 'none'\n ]\n });\n }\n return null;\n }\n getTag(keys) {\n const res = [];\n for(let i = 0; i < keys.length; i++){\n const tag = AppTag[`${keys[`${i}`]}`];\n if (tag) {\n res.push(tag);\n }\n }\n return res;\n }\n // Returns array of products an app tile is built for\n getBuiltFor() {\n const builtForList = [];\n const productTitle = getPrimaryProductUrl(this.props.primaryProduct);\n // Temporary fix for PowerApps to have their builtfor displayed as Apps\n // until we come up with the complete design\n if (this.props.products[DataMap.products.PowerApps.FilterGroup] && (this.props.products[DataMap.products.PowerApps.FilterGroup] & DataMap.products.PowerApps.FilterID) > 0) {\n builtForList.push('Apps');\n } else if (this.props.primaryProduct && productTitle && isOfficeNonSaasApp(productTitle, this.props.products)) {\n for(const key in DataMap.products){\n if (isOfficeNonSaasApp(DataMap.products[`${key}`].UrlKey) && bitMasksMatchFilter(this.props.products, DataMap.products[`${key}`])) {\n if (!DataMap.products[`${key}`].ShortcutFilters) {\n builtForList.push(DataMap.products[`${key}`].Title);\n }\n }\n }\n } else {\n const parentProductTitle = getParentProductTitle(productTitle, 'dynamics-365');\n builtForList.push(parentProductTitle || this.props.builtFor);\n }\n return builtForList;\n }\n renderLinkedAddIns() {\n const { linkedAddIns, shouldShowLinkedAddIn, item } = this.props;\n const stackTokens = {\n childrenGap: 8\n };\n const textStyles = {\n root: {\n color: SharedColors.cyanBlue10,\n textDecoration: 'underline',\n whiteSpace: 'nowrap'\n }\n };\n if ((linkedAddIns === null || linkedAddIns === void 0 ? void 0 : linkedAddIns.length) && shouldShowLinkedAddIn) {\n return /*#__PURE__*/ _jsx(Stack, {\n horizontal: true,\n tokens: stackTokens,\n children: /*#__PURE__*/ _jsx(ItemsTooltip, {\n linkedItemsIds: linkedAddIns.map(({ entityId })=>entityId),\n title: this.context.loc('AppTileText_RelatedAddInsOnHoverText', 'This app includes the full version of these add-ins:'),\n parentItem: item,\n children: /*#__PURE__*/ _jsx(Text, {\n variant: \"smallPlus\",\n styles: textStyles,\n tabIndex: 0,\n children: this.context.loc('AppTileText_RelatedAddIns', '+included add-ins')\n })\n })\n });\n }\n }\n renderLinkedWebApps() {\n const { linkedSaaS, shouldShowLinkedWebApps, item } = this.props;\n const stackTokens = {\n childrenGap: 4\n };\n const textStyles = {\n root: {\n color: SharedColors.cyanBlue10,\n textDecoration: 'underline',\n whiteSpace: 'nowrap'\n }\n };\n if ((linkedSaaS === null || linkedSaaS === void 0 ? void 0 : linkedSaaS.length) && shouldShowLinkedWebApps) {\n return /*#__PURE__*/ _jsx(Stack, {\n horizontal: true,\n reversed: true,\n horizontalAlign: \"end\",\n tokens: stackTokens,\n children: /*#__PURE__*/ _jsx(ItemsTooltip, {\n linkedItemsIds: linkedSaaS.map(({ entityId })=>entityId),\n title: this.context.loc('AppTileText_RelatedWebAppsOnHoverText', 'Available SaaS package (includes a full version of this add-in):'),\n parentItem: item,\n children: /*#__PURE__*/ _jsx(Text, {\n variant: \"smallPlus\",\n styles: textStyles,\n tabIndex: 0,\n children: this.context.loc('AppTileText_RelatedWebApps', 'view package options')\n })\n })\n });\n }\n }\n // Returns brand icon for a product\n getBrandIconFromProduct(title) {\n return title === 'Web app' ? /*#__PURE__*/ _jsx(\"div\", {\n className: 'icon-webapp-12'\n }) : /*#__PURE__*/ _jsx(\"div\", {\n className: 'ms-BrandIcon-svg--icon16 product-icon-12 ms-BrandIcon--' + title.toLowerCase()\n });\n }\n // Returns component in the form icon + product name\n getBuiltForRenderItem(title) {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"built-for-product-container\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"built-for-product-icon-wrapper\",\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: \"built-for-icon\",\n children: this.getBrandIconFromProduct(title)\n })\n }),\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"built-for-product-title\",\n children: title\n })\n ]\n });\n }\n // Renders built for prduct type information for app (product type can be one or more)\n renderBuiltForProductType() {\n const builtForProducts = this.getBuiltFor();\n let builtForItems;\n const productTitle = getPrimaryProductUrl(this.props.primaryProduct);\n if ((isAppSource(this.props.embedHost) || isEmbed(this.props.embedHost)) && (isOfficeApp(productTitle) || isSaaS(productTitle))) {\n if (builtForProducts.length === 1 && (builtForProducts[0] === DataMap.products.Office365.Title || builtForProducts[0] === DataMap.products.AzureforWebApps.Title)) {\n builtForItems = /*#__PURE__*/ _jsx(\"div\", {\n className: \"built-for-outer-wrapper\",\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: \"built-for-container\",\n children: this.getBuiltForRenderItem('Web app')\n })\n });\n } else {\n const builtForItemsFirstRow = [];\n const builtForItemsSecondRow = [];\n for(let i = 0; i < builtForProducts.length; i++){\n if (i < 2) {\n builtForItemsFirstRow.push(this.getBuiltForRenderItem(builtForProducts[`${i}`]));\n } else if (i < 4) {\n builtForItemsSecondRow.push(this.getBuiltForRenderItem(builtForProducts[`${i}`]));\n } else if (i >= 4) {\n const moreHintStr = '...';\n builtForItemsSecondRow.push(/*#__PURE__*/ _jsx(\"div\", {\n className: \"built-for-product-container\",\n children: /*#__PURE__*/ _jsx(\"span\", {\n className: \"product-tip\",\n children: moreHintStr\n })\n }));\n break;\n }\n }\n builtForItems = /*#__PURE__*/ _jsxs(\"div\", {\n className: \"built-for-outer-wrapper\",\n children: [\n builtForItemsFirstRow.length > 0 && /*#__PURE__*/ _jsx(\"div\", {\n className: \"built-for-container\",\n children: builtForItemsFirstRow\n }),\n builtForItemsSecondRow.length > 0 && /*#__PURE__*/ _jsx(\"div\", {\n className: \"built-for-container\",\n children: builtForItemsSecondRow\n })\n ]\n });\n }\n } else {\n builtForItems = null;\n }\n return builtForItems;\n }\n renderDescription(id, shortDescription) {\n let maxNumberOfLines = 3;\n if (this.props.AverageRating) maxNumberOfLines--;\n const builtFor = this.getBuiltFor();\n if (builtFor && builtFor.length > 2) maxNumberOfLines--;\n const style = {\n '-webkit-line-clamp': maxNumberOfLines.toString(),\n maxHeight: `${maxNumberOfLines * 17}px`\n };\n return(// eslint-disable-next-line react/forbid-dom-props\n /*#__PURE__*/ _jsx(\"h5\", {\n style: style,\n id: 'desc-' + id,\n className: \"c-paragraph-4 description\",\n children: shortDescription\n }));\n }\n renderRatings() {\n const { ratingSummaries } = this.props;\n const allRatingSummaryObj = getRatingSummaryByType(ratingSummaries, Constants.Reviews.ReviewsSource.All);\n const avgRating = (allRatingSummaryObj === null || allRatingSummaryObj === void 0 ? void 0 : allRatingSummaryObj.AverageRating) || this.props.AverageRating;\n const ratingsCount = (allRatingSummaryObj === null || allRatingSummaryObj === void 0 ? void 0 : allRatingSummaryObj.TotalRatings) || this.props.NumberOfRatings;\n return ratingsCount >= 1 && {\n avgRating,\n ratingsCount,\n key: 'internal',\n text: this.context.loc('Tile_ASRatings', 'ratings')\n };\n }\n getCTAData() {\n const { isEmbedded, ctaTypes, billingCountryCode } = this.props;\n const ctaBaseData = this.getCtaBaseData();\n const { area, view } = this.getCtaExtraData();\n return (ctaBaseData === null || ctaBaseData === void 0 ? void 0 : ctaBaseData.text) && {\n id: ctaBaseData.id || Constants.JsllCTAId[Constants.CTAType[ctaBaseData.type]],\n title: ctaBaseData.text,\n area,\n view,\n onClick: this.getApp.bind(this),\n entityId: this.props.entityId,\n CtaType: this.props.offerType === OfferType.SaaSApp ? isTransactApp({\n isEmbedded,\n ctaTypes,\n appData: this.props,\n billingRegion: billingCountryCode\n }) ? Constants.JsllSaas.SaasTransactable : Constants.JsllSaas.SaasNonTransactable : Constants.JsllCTAId[Constants.CTAType[ctaBaseData.type]],\n disabled: !isAvailableInThisRegion(this.props)\n };\n }\n getCtaBaseData() {\n const { licenseManagement, startingPrice, trials, uiRole, doesTenantHasLicenseForApp } = this.props;\n if (this.isPBIVApp) {\n return this.getCtaInstall();\n } else if (isBagTransactable(this.props)) {\n return getCtaBagTransactable(uiRole, doesTenantHasLicenseForApp, licenseManagement === null || licenseManagement === void 0 ? void 0 : licenseManagement.isFreemium) === CTAInstall ? this.getCtaInstall() : this.getCtaBuyLicense();\n } else if (licenseManagement === null || licenseManagement === void 0 ? void 0 : licenseManagement.isMicrosoftManaged) {\n return this.getCtaMicrosoftManaged();\n } else if ((startingPrice === null || startingPrice === void 0 ? void 0 : startingPrice.hasFreeTrial) || trials === DataMap.trials['free-trial'].FilterID) {\n return this.getCtaTry();\n }\n return this.getCtaByActionString();\n }\n getCtaMicrosoftManaged() {\n const { uiRole, licenseManagement, doesTenantHasLicenseForApp: doesTenantHaveAppLicense, signedIn } = this.props;\n if (!isAvailableInThisRegion(this.props)) {\n return null; // This means the button would dissappear\n }\n if (!signedIn) {\n return this.getCtaRequestTrial();\n }\n const adminCanInstall = (licenseManagement === null || licenseManagement === void 0 ? void 0 : licenseManagement.isFreemium) || doesTenantHaveAppLicense;\n if (uiRole === Constants.UiRole.Admin && adminCanInstall) {\n return this.getCtaGet();\n } else {\n return this.getCtaRequestTrial();\n }\n }\n getCtaGet() {\n return {\n id: Constants.JsllCTAId[`${ActionGet}`],\n type: CTAGet,\n text: this.context.loc(ActionGet, 'Get')\n };\n }\n getCtaRequestTrial() {\n return {\n id: Constants.JsllCTAId[`${ActionRequestTrial}`],\n type: CTARequestTrial,\n text: this.context.loc(ActionRequestTrial, 'Contact Me')\n };\n }\n getCtaTry() {\n return {\n id: JsllCTAIdTry,\n type: CTATry,\n text: this.context.loc(ActionTry, 'Free Trial')\n };\n }\n getCtaInstall() {\n return {\n id: JsllCTAIdInstall,\n type: CTAInstall,\n text: this.context.loc(ActionInstall, 'Install')\n };\n }\n getCtaBuyLicense() {\n return {\n id: JsllCTAIdBuyLicense,\n type: CTABuyLicense,\n text: this.context.loc(ActionBuyLicense, 'Buy License')\n };\n }\n getCtaByActionString() {\n return {\n id: Constants.JsllCTAId[this.props.actionString] || this.props.actionString,\n text: this.context.loc(this.props.actionString)\n };\n }\n getCtaExtraData() {\n let area;\n let view;\n const linkedAddIns = this.props.linkedAddIns;\n if (linkedAddIns && linkedAddIns.length > 0) {\n if (this.props.currentView === Constants.currentView.AppDetails) {\n area = Constants.Telemetry.AreaName.ParentSaaSTile;\n } else if (this.props.currentView === Constants.currentView.AppGallery || this.props.currentView === Constants.currentView.SearchAppGallery) {\n area = Constants.Telemetry.AreaName.AppTile;\n }\n view = Constants.Telemetry.TemplateName.SaaSBundle;\n } else if (this.props.linkedSaaS) {\n view = Constants.Telemetry.AreaName.BundleAddIn;\n area = Constants.Telemetry.AreaName.AppTile;\n } else {\n area = Constants.Telemetry.AreaName.AppTile;\n }\n return {\n area,\n view\n };\n }\n getAppDetailsUrl(productType, appType) {\n return this.context.buildHref(getPDPRoute(appType), {\n productId: productType,\n entityId: this.props.entityId\n }, {\n tab: 'Overview'\n });\n }\n getProducts() {\n return this.props.products && Object.keys(this.props.products).length > 0 && getProductsList(this.props.products);\n }\n renderBadge() {\n const { entityId } = this.props;\n const badges = getBadgeTypes(this.props);\n const hasFreeTrial = badges.includes(Constants.BadgeType.FreeTrial);\n const filteredBadges = hasFreeTrial && badges.length > 3 ? badges.slice(0, 2).concat([\n Constants.BadgeType.FreeTrial\n ]) : badges.slice(0, 4);\n return this.props.isHydrated && filteredBadges.length > 0 ? /*#__PURE__*/ _jsx(Stack, {\n className: \"tileBadgeContainer\",\n horizontal: true,\n children: badgesInformation.filter(({ badge })=>filteredBadges.includes(badge)).map(({ src, loc = '', title = '', customClassName = '', hidden }, idx)=>/*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(Image, {\n className: `tileBadge ${customClassName}`,\n hidden: hidden === null || hidden === void 0 ? void 0 : hidden(),\n src: src,\n title: this.context.loc(loc, title),\n alt: this.context.loc(loc, title)\n })\n }, `${entityId}-badge-${idx}`))\n }) : null;\n }\n renderImpl() {\n const productString = getPrimaryProductUrl(this.props.primaryProduct);\n const productData = getProductByUrlKey({\n urlKey: productString\n });\n const product = productData ? productData.UrlKey : productString;\n const isPrivate = isPrivateOffer(this.props.appType);\n const appDetailUrl = this.getAppDetailsUrl(product, this.props.appType);\n const { showPopularity, popularity, shouldShowLinkedAddIn, shouldShowLinkedWebApps, ribbonKey = '' } = this.props;\n return /*#__PURE__*/ _jsx(BaseTile, {\n totalTiles: this.props.totalTiles,\n badge: this.renderBadge(),\n id: this.props.entityId,\n componentInstance: this.componentInstance,\n item: this.props.item,\n iconURL: this.props.iconURL,\n title: this.props.title,\n tileDataRequestId: this.props.tileDataRequestId,\n publisher: this.props.publisher,\n description: this.props.shortDescription,\n ctaData: this.getCTAData(),\n detailUrl: appDetailUrl,\n tileIndex: this.props.tileIndex,\n currentView: this.props.currentView,\n userFavouriteEntityType: isPrivate ? null : Constants.UserFavourite.ApplicationTypes.ITApplications,\n linkedAddIns: this.renderLinkedAddIns(),\n linkedWebApps: this.renderLinkedWebApps(),\n price: this.renderStartingPrice(),\n rating: this.renderRatings(),\n openTileCallback: this.context.openTileCallback,\n products: this.getProducts(),\n context: this.context,\n popularity: showPopularity && popularity,\n shouldShowLinkedAddIn: shouldShowLinkedAddIn,\n shouldShowLinkedWebApps: shouldShowLinkedWebApps,\n badgeTypes: getBadgeTypes(this.props),\n ribbonKey: ribbonKey\n });\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"context\", void 0), _define_property(this, \"componentInstance\", void 0), _define_property(this, \"isPBIVApp\", isPowerBIVisuals(getPrimaryProductUrl(this.props.primaryProduct)));\n this.componentInstance = v4();\n }\n}\nAppTile.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n buildHref: PropTypes.func,\n ctaCallback: PropTypes.func,\n renderErrorModal: PropTypes.func,\n openTileCallback: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport ProductsComponent from '@shared/components/products';\nimport * as PropTypes from 'prop-types';\nimport { DataMap } from '@shared/utils/dataMapping';\nimport { getProductsList } from '@shared/utils/detailUtils';\nimport { TelemetryImage } from '@shared/components/telemetryImage';\nimport { Stack, Text, mergeStyleSets, FontIcon, StackItem, Separator } from '@fluentui/react';\nimport React, { Fragment } from 'react';\nimport classNames from 'classnames';\nimport { NeutralColors, SharedColors } from '@fluentui/theme';\nimport { logger } from '@src/logger';\nimport { Constants } from '@shared/utils/constants';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { routes } from '@shared/routerHistory';\nimport { Link, useLocation } from 'react-router-dom';\nimport { RatingsInfo } from '@shared/components/ratings/ratingsInfo';\nconst containerTokens = {\n childrenGap: 24,\n padding: 20\n};\nconst itemsTokens = {\n childrenGap: 8\n};\nconst itemsInsideLinkedTokens = {\n childrenGap: 8\n};\nconst titleAndStarsStackToken = {\n childrenGap: 8\n};\nconst parentStackTokens = {\n childrenGap: 8,\n padding: 8\n};\nconst appTileLinkedItemsStyles = mergeStyleSets({\n itemImage: {\n width: 60,\n height: 60,\n display: 'flex',\n backgroundColor: NeutralColors.white\n },\n textWeight: {\n fontWeight: 600\n },\n linkItemTitle: {\n fontWeight: 600,\n color: NeutralColors.gray160,\n overflow: 'hidden',\n '-webkit-box-orient': 'vertical',\n display: '-webkit-box',\n '-webkit-line-clamp': '2'\n },\n linkItemContainer: {\n justifyContent: 'space-around'\n },\n moreProductsStyle: {\n paddingTop: 3\n },\n imageStackItemStyle: {\n '& .appTileHoverImage': {\n width: 40,\n height: 40,\n margin: 'auto'\n }\n },\n starsAndRattingContainer: {\n '& .ratingInfoSection .detailsRatingStar': {\n marginBottom: 0\n }\n },\n rattingText: {\n color: NeutralColors.gray130\n },\n rattingStarText: {\n marginRight: 4,\n padding: 0,\n fontSize: 12\n },\n iconClass: {\n height: 16,\n width: 16,\n color: SharedColors.cyanBlue10\n }\n});\nconst seperatorStyle = {\n root: [\n {\n selectors: {\n '::before': {\n background: NeutralColors.gray40\n }\n }\n }\n ]\n};\nconst tileStyle = {\n root: {\n selectors: {\n '&:hover': {\n backgroundColor: NeutralColors.gray10\n }\n }\n }\n};\nconst getProducts = (products)=>{\n var _ref;\n return (_ref = products && Object.keys(products).length > 0 && getProductsList(products)) !== null && _ref !== void 0 ? _ref : [];\n};\nconst getRatingsData = ({ context, ratingsAverage, ratingsNum })=>{\n return ratingsNum >= 1 && {\n avgRating: ratingsAverage,\n ratingsCount: ratingsNum,\n key: 'internal',\n text: context.loc('Tile_ASRatings', 'ratings')\n };\n};\nconst getLinkedItemLink = ({ linkedItem, context })=>{\n const { entityId, linkedSaaS } = linkedItem;\n const productId = linkedSaaS ? DataMap.products.AzureforWebApps.UrlKey : DataMap.products.Office365.UrlKey;\n return context.buildHref(routes.appDetails, {\n productId,\n entityId\n }, {\n tab: 'Overview'\n });\n};\nconst logTelemetryInfo = ({ linkedItem, hoveredItem, location })=>{\n const instrument = SpzaInstrumentService.getProvider();\n const { title, entityId } = linkedItem;\n const { title: hoveredTitle, entityId: hoveredEntityId } = hoveredItem;\n const payload = {\n page: location.pathname,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.SaasLinkTooltip,\n details: JSON.stringify({\n title,\n entityId,\n hoveredTitle,\n hoveredEntityId\n })\n };\n instrument.probe(Constants.Telemetry.ProbeName.LogInfo, payload);\n logger.info('', payload);\n};\nconst LinkedItem = ({ linkedItem, hoveredItem }, context)=>{\n const location = useLocation();\n const itemProducts = getProducts(linkedItem.products);\n const ratingsData = getRatingsData({\n context,\n ratingsAverage: linkedItem.AverageRating,\n ratingsNum: linkedItem.NumberOfRatings\n });\n return /*#__PURE__*/ _jsx(Link, {\n to: getLinkedItemLink({\n linkedItem,\n context\n }),\n onClick: ()=>{\n logTelemetryInfo({\n linkedItem,\n hoveredItem,\n location\n });\n },\n children: /*#__PURE__*/ _jsx(Stack, {\n tokens: parentStackTokens,\n styles: tileStyle,\n children: /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n tokens: itemsInsideLinkedTokens,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n className: classNames([\n appTileLinkedItemsStyles.imageStackItemStyle\n ]),\n align: \"center\",\n children: /*#__PURE__*/ _jsx(TelemetryImage, {\n src: linkedItem.iconURL,\n alt: context.loc('Linked_Item_Icon', 'linked item icon'),\n className: classNames([\n appTileLinkedItemsStyles.itemImage\n ], 'ms-depth-8'),\n imgClassName: \"appTileHoverImage\"\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n grow: 1,\n children: /*#__PURE__*/ _jsxs(Stack, {\n tokens: titleAndStarsStackToken,\n className: appTileLinkedItemsStyles.linkItemContainer,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(Text, {\n variant: \"mediumPlus\",\n block: true,\n className: classNames([\n appTileLinkedItemsStyles.linkItemTitle\n ]),\n children: linkedItem.title\n })\n }),\n (itemProducts === null || itemProducts === void 0 ? void 0 : itemProducts.length) && /*#__PURE__*/ _jsx(Stack.Item, {\n grow: 1,\n className: classNames([\n appTileLinkedItemsStyles.moreProductsStyle\n ]),\n children: /*#__PURE__*/ _jsx(ProductsComponent, {\n textSize: \"smallPlus\",\n withText: true,\n productsItems: itemProducts\n })\n }),\n ratingsData && /*#__PURE__*/ _jsx(Stack.Item, {\n className: classNames([\n appTileLinkedItemsStyles.starsAndRattingContainer\n ]),\n children: /*#__PURE__*/ _jsx(RatingsInfo, {\n avgRating: ratingsData.avgRating,\n ratingsCount: ratingsData.ratingsCount,\n title: ratingsData.text,\n context: context,\n textSize: \"smallPlus\",\n starClass: classNames([\n appTileLinkedItemsStyles.rattingStarText\n ]),\n ratingClass: classNames([\n appTileLinkedItemsStyles.rattingText\n ])\n }, ratingsData.key)\n })\n ]\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n align: \"center\",\n children: /*#__PURE__*/ _jsx(FontIcon, {\n iconName: \"ChevronRight\",\n className: appTileLinkedItemsStyles.iconClass\n })\n })\n ]\n })\n })\n })\n });\n};\nexport const AppTileLinkedItems = ({ title, linkedItems, hoveredItem })=>{\n return /*#__PURE__*/ _jsxs(Stack, {\n tokens: containerTokens,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: title && /*#__PURE__*/ _jsx(Text, {\n variant: \"medium\",\n className: appTileLinkedItemsStyles.textWeight,\n children: title\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(Stack, {\n tokens: itemsTokens,\n children: linkedItems === null || linkedItems === void 0 ? void 0 : linkedItems.map((item, index, linkedItems)=>/*#__PURE__*/ _jsxs(Fragment, {\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(LinkedItem, {\n linkedItem: item,\n hoveredItem: hoveredItem\n })\n }),\n index + 1 !== linkedItems.length && /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(Stack, {\n children: /*#__PURE__*/ _jsx(StackItem, {\n children: /*#__PURE__*/ _jsx(Separator, {\n styles: seperatorStyle\n })\n })\n })\n })\n ]\n }, index))\n })\n })\n ]\n });\n};\nLinkedItem.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n buildHref: PropTypes.func\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nimport React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { Constants, OfferType } from '@shared/utils/constants';\nimport { isTransactApp, isAvailableInThisRegion } from '@shared/utils/appUtils';\nexport const getDataBiView = ({ linkedAddIns, linkedSaaS })=>{\n let dataBiView = '';\n if ((linkedAddIns === null || linkedAddIns === void 0 ? void 0 : linkedAddIns.length) > 0) {\n dataBiView = Constants.Telemetry.TemplateName.SaaSBundle;\n } else if (linkedSaaS) {\n dataBiView = Constants.Telemetry.AreaName.BundleAddIn;\n }\n return dataBiView;\n};\nexport const getDataBiType = ({ app, billingCountryCode })=>{\n const { ctaTypes = [] } = app;\n return app.offerType === OfferType.SaaSApp ? isTransactApp({\n isEmbedded: false,\n ctaTypes,\n appData: app,\n billingRegion: billingCountryCode\n }) ? Constants.JsllSaas.SaasTransactable : Constants.JsllSaas.SaasNonTransactable : '';\n};\nexport const BaseCtaButton = ({ app, startingPrice, isLoadingUserData, billingCountryCode, CtaComponent, ctaType })=>{\n const newProp = {\n disabled: !isAvailableInThisRegion({\n startingPrice\n }) || isLoadingUserData,\n 'data-bi-id': Constants.JsllCTAId[Constants.CTAType[`${ctaType}`]],\n 'data-bi-name': app.entityId,\n 'data-bi-type': getDataBiType({\n app,\n billingCountryCode\n }),\n 'data-bi-area': Constants.Telemetry.AreaName.AppDetails,\n 'data-bi-view': getDataBiView(app)\n };\n const ClonedElementWithMoreProps = /*#__PURE__*/ React.cloneElement(CtaComponent, _object_spread({}, newProp));\n return ClonedElementWithMoreProps;\n};\nBaseCtaButton.contextTypes = {\n locParams: PropTypes.func,\n loc: PropTypes.func\n};\n","/* eslint-disable react/forbid-dom-props */ function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from './spzaComponent';\nimport { InternalLink } from './internalLink';\nimport * as DetailUtils from './../utils/detailUtils';\nexport class BreadcrumbUrl extends SpzaComponent {\n buildGalleryLink(title, href) {\n return /*#__PURE__*/ _jsx(InternalLink, {\n href: href,\n role: \"link\",\n className: 'c-button goBackButton',\n additionalCommand: ()=>{\n DetailUtils.generateBreadcrumbPayloadAndLogTelemetry('Apps');\n },\n accEnabled: true,\n \"aria-label\": `${title} link breadcrumb region`,\n \"aria-current\": \"page\",\n children: title\n });\n }\n renderImpl() {\n const { hideBreadcrumbUrl } = this.props;\n return /*#__PURE__*/ _jsx(\"div\", {\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: \"navigationBar\",\n id: \"maincontent\",\n children: !hideBreadcrumbUrl && /*#__PURE__*/ _jsx(\"nav\", {\n className: \"breadcrumb\",\n \"aria-label\": \"breadcrumbs\",\n children: this.props.linksList.map((link, index)=>{\n const title = this.context.loc(link.locKey);\n const key = `breadcrumb-${link.href}-${title}`;\n link.href = link.href || this.props.href;\n if (index === this.props.linksList.length - 1) {\n return /*#__PURE__*/ _jsx(\"h1\", {\n className: \"appTabButton\",\n \"aria-label\": \"breadcrumb\",\n \"aria-current\": \"page\",\n children: this.context.loc(link.locKey)\n }, key);\n }\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"breadcrumbItem\",\n children: [\n this.buildGalleryLink(title, link.href),\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"c-glyph\"\n })\n ]\n }, key);\n })\n })\n })\n });\n }\n constructor(...args){\n super(...args), _define_property(this, \"context\", void 0);\n }\n}\nBreadcrumbUrl.contextTypes = {\n loc: PropTypes.func\n};\n","/* eslint-disable react/prop-types */ import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { TelemetryImage } from './telemetryImage';\nexport const Card = ({ logoURL, title, subtitle, children })=>{\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"card ms-depth-8\",\n children: [\n logoURL && /*#__PURE__*/ _jsx(\"div\", {\n className: \"iconHost ms-depth-8\",\n children: /*#__PURE__*/ _jsx(TelemetryImage, {\n src: logoURL,\n className: \"appLargeIcon\",\n itemPropName: \"image\",\n title: title\n })\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"header\",\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: \"titleBlock\",\n children: [\n /*#__PURE__*/ _jsx(\"h1\", {\n className: \"ms-fontSize-28 ms-fontWeight-semibold title\",\n children: title\n }),\n /*#__PURE__*/ _jsx(\"h2\", {\n className: \"ms-fontSize-14 subTitle\",\n children: subtitle\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"mainContent\",\n children: children\n })\n ]\n })\n })\n ]\n });\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { AppTile } from '@shared/containers/appTile';\nimport { Constants } from '@shared/utils/constants';\nimport SpzaComponent from '@shared/components/spzaComponent';\nimport { ServiceTile } from '@shared/containers/serviceTile';\nclass CommonTile extends SpzaComponent {\n renderImpl() {\n if (this.props.entityType === Constants.EntityType.Service) {\n return /*#__PURE__*/ _jsx(ServiceTile, _object_spread({}, this.props));\n }\n return /*#__PURE__*/ _jsx(AppTile, _object_spread({}, this.props));\n }\n}\nexport { CommonTile as default };\n","import { mergeStyleSets } from '@fluentui/react';\nexport const openInNewWindowButtonStyles = mergeStyleSets({\n openInNewWindowButton: {\n '& .ms-Button-flexContainer': {\n display: 'flex',\n flexDirection: 'row-reverse'\n }\n }\n});\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React from 'react';\nimport classNames from 'classnames';\nimport * as PropTypes from 'prop-types';\nimport { getWindow } from '@shared/services/window';\nimport { Constants } from '@shared/utils/constants';\nimport { getActionStringForCTAType, isAvailableInThisRegion, isOpenInNewWindowButton, processHandoffURLAndTitle } from '@shared/utils/appUtils';\nimport { getTooltipSilentLogIn } from '@shared/utils/silentLogInUtils';\nimport SpzaComponent from '@shared/components/spzaComponent';\nimport { BaseCtaButton } from '@shared/components/baseCtaButton';\nimport { PrimaryButton, mergeStyleSets, DefaultButton } from '@fluentui/react';\nimport { openInNewWindowButtonStyles } from '@shared/components/contentStyles';\nimport { hidePowerBiVisualPricing } from '@shared/utils/pricing';\nconst ctaButtonsClassNames = mergeStyleSets({\n ctaButton: {\n padding: '5px 25px',\n marginTop: 4,\n marginRight: 8\n }\n});\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport class CtaButtons extends SpzaComponent {\n componentDidMount() {\n var _getWindow_performance, _getWindow;\n const window = getWindow();\n const { navigationStart = 0, requestStart = 0 } = ((_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow_performance = _getWindow.performance) === null || _getWindow_performance === void 0 ? void 0 : _getWindow_performance.timing) || {};\n if (window) {\n window.loadTimePDPCTA = performance.now() - (requestStart - navigationStart);\n }\n }\n ctaDefaultButton(ctaType, isOpenInNewWindow) {\n const { startingPrice, isLoadingUserData, onCTAClick } = this.props;\n const { loc } = this.context;\n return /*#__PURE__*/ _jsx(DefaultButton, {\n text: loc(getActionStringForCTAType(ctaType)),\n className: classNames([\n ctaButtonsClassNames.ctaButton,\n 'pdpButton',\n {\n [openInNewWindowButtonStyles.openInNewWindowButton]: isOpenInNewWindow\n }\n ]),\n disabled: !isAvailableInThisRegion({\n startingPrice\n }) || isLoadingUserData,\n onClick: ()=>onCTAClick(ctaType),\n iconProps: isOpenInNewWindow ? {\n iconName: 'OpenInNewWindow'\n } : {}\n }, ctaType);\n }\n ctaPrimaryButton(ctaType, isOpenInNewWindow) {\n const { startingPrice, isLoadingUserData, onCTAClick, isEmbedded, app } = this.props;\n const { loc } = this.context;\n const isPBIVisualPriceHidden = hidePowerBiVisualPricing({\n app,\n isEmbedded\n });\n return /*#__PURE__*/ _jsx(PrimaryButton, {\n text: isPBIVisualPriceHidden && ctaType === Constants.CTAType.Install ? loc('CTA_Install_free', 'Install free') : loc(getActionStringForCTAType(ctaType)),\n className: classNames([\n ctaButtonsClassNames.ctaButton,\n 'requestButton',\n {\n [openInNewWindowButtonStyles.openInNewWindowButton]: isOpenInNewWindow\n }\n ]),\n disabled: !isAvailableInThisRegion({\n startingPrice\n }) || isLoadingUserData,\n onClick: ()=>onCTAClick(ctaType),\n iconProps: isOpenInNewWindow ? {\n iconName: 'OpenInNewWindow'\n } : {}\n }, ctaType);\n }\n renderImpl() {\n const { app, startingPrice, isLoadingUserData, billingCountryCode, isEmbedded, openInNewWindowButtonFlag } = this.props;\n const { url } = processHandoffURLAndTitle(app);\n const buttons = app.ctaTypes.map((ctaType, index)=>{\n const isOpenInNewWindow = openInNewWindowButtonFlag && isOpenInNewWindowButton({\n isEmbedded,\n ctaType,\n appData: app,\n billingRegion: billingCountryCode,\n url\n });\n const button = index ? this.ctaDefaultButton(ctaType, isOpenInNewWindow) : this.ctaPrimaryButton(ctaType, isOpenInNewWindow);\n const baseCtaCompoent = /*#__PURE__*/ _jsx(BaseCtaButton, {\n app: app,\n billingCountryCode: billingCountryCode,\n startingPrice: startingPrice,\n isLoadingUserData: isLoadingUserData,\n CtaComponent: button,\n ctaType: ctaType\n });\n return getTooltipSilentLogIn(baseCtaCompoent, isLoadingUserData);\n });\n return /*#__PURE__*/ _jsx(_Fragment, {\n children: buttons\n });\n }\n constructor(...args){\n super(...args), _define_property(this, \"context\", void 0);\n }\n}\nCtaButtons.contextTypes = {\n locParams: PropTypes.func,\n loc: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React from 'react';\nimport * as PropTypes from 'prop-types';\n// eslint-disable-next-line import/named\nimport { Text, mergeStyleSets } from '@fluentui/react';\nimport { getPricingLocale } from '@shared/utils/pricing';\nconst classes = mergeStyleSets({\n customMeterRoot: {\n whiteSpace: 'break-spaces'\n },\n plusText: {\n marginTop: 10\n }\n});\nexport const CustomMeterPricingMaxFractionDigits = 5;\nconst MetersInclude = ({ customMeter, variant }, context)=>{\n const includedMeters = customMeter.filter((cm)=>cm.includedQuantity !== '0');\n if (!includedMeters.length) {\n return null;\n }\n return /*#__PURE__*/ _jsxs(_Fragment, {\n children: [\n /*#__PURE__*/ _jsx(Text, {\n variant: variant,\n block: true,\n children: context.loc('CustomMeter_Includes', 'Includes:')\n }),\n includedMeters.map((meter)=>/*#__PURE__*/ _jsx(Text, {\n block: true,\n variant: variant,\n children: `${meter.title}: ${meter.includedQuantity}`\n }, meter.availabilityId))\n ]\n });\n};\nconst MetersBreakdown = ({ sku, customMeter, billingCountry, variant, locale }, context)=>{\n const { countryCode } = billingCountry;\n return /*#__PURE__*/ _jsxs(_Fragment, {\n children: [\n /*#__PURE__*/ _jsx(Text, {\n block: true,\n className: classes.plusText,\n variant: variant,\n children: context.loc('CustomMeter_Plus', 'Plus:')\n }),\n customMeter.map((meter)=>{\n const localeString = getPricingLocale({\n locale,\n countryCode\n });\n const priceString = meter.rate.toLocaleString(localeString, {\n style: 'currency',\n currency: sku.currencyCode,\n maximumFractionDigits: CustomMeterPricingMaxFractionDigits\n });\n return /*#__PURE__*/ _jsx(Text, {\n block: true,\n variant: variant,\n children: `${meter.title}: ${priceString} ${meter.unit.toLowerCase()}`\n }, meter.availabilityId);\n })\n ]\n });\n};\nexport const CustomMeterPricing = ({ price, billingCountry, sku, variant, locale })=>{\n const { customMeter } = price;\n if (!(customMeter === null || customMeter === void 0 ? void 0 : customMeter.length)) {\n return null;\n }\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: classes.customMeterRoot,\n children: [\n /*#__PURE__*/ _jsx(MetersInclude, {\n customMeter: customMeter,\n variant: variant\n }),\n /*#__PURE__*/ _jsx(MetersBreakdown, {\n sku: sku,\n billingCountry: billingCountry,\n customMeter: customMeter,\n variant: variant,\n locale: locale\n })\n ]\n });\n};\nMetersInclude.contextTypes = {\n locParams: PropTypes.func,\n loc: PropTypes.func\n};\nMetersBreakdown.contextTypes = {\n locParams: PropTypes.func,\n loc: PropTypes.func\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _object_without_properties(source, excluded) {\n if (source == null) return {};\n var target = _object_without_properties_loose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for(i = 0; i < sourceSymbolKeys.length; i++){\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\nfunction _object_without_properties_loose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for(i = 0; i < sourceKeys.length; i++){\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport SpzaComponent from './spzaComponent';\nimport { getAttributes } from '../utils/externalLinkUtils';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { getWindow } from '@shared/services/window';\nimport { Constants } from '@shared/utils/constants';\nimport { logger } from '@src/logger';\n/**\n * Behaves similar with HTML DOM <a></a>\n * But dedicated to open a new tab, and log telemetry for link clicked.\n * When a link contains a 'mail:to', instead of opening a new tab, showing an email dialog\n */ export class ExternalLink extends SpzaComponent {\n renderImpl() {\n const _this_props = this.props, { href, children, telemetryDetails } = _this_props, rest = _object_without_properties(_this_props, [\n \"href\",\n \"children\",\n \"telemetryDetails\"\n ]);\n const attributes = getAttributes(_object_spread({\n href,\n children\n }, rest));\n return /*#__PURE__*/ _jsx(\"a\", _object_spread_props(_object_spread({}, attributes), {\n onClick: (event)=>{\n var _this_props_onClickHandle, _this_props;\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.ExternalLink,\n details: telemetryDetails || JSON.stringify(href)\n };\n this.provider.probe(Constants.Telemetry.ProbeName.LogInfo, payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n (_this_props_onClickHandle = (_this_props = this.props).onClickHandle) === null || _this_props_onClickHandle === void 0 ? void 0 : _this_props_onClickHandle.call(_this_props, event);\n },\n children: children\n }));\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"context\", void 0), _define_property(this, \"provider\", void 0);\n this.provider = SpzaInstrumentService.getProvider();\n }\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nimport { Constants } from '../utils/constants';\nimport { urlAssign } from './../routerHistory';\nimport { getWindow } from './../services/window';\nimport { SpzaInstrumentService } from '../services/telemetry/spza/spzaInstrument';\nimport { logger } from '@src/logger';\nexport function getOverrideAttributes(props) {\n const isEmailLink = props.href.indexOf('mailto:') === 0;\n const overrideAttributes = {};\n // override attribute onClick event\n overrideAttributes.onClick = (event)=>{\n if (props.onClickHandle) {\n props.onClickHandle(event);\n }\n if (props.onClick) {\n props.onClick(event);\n }\n const detailText = isEmailLink ? 'External Link Clicked, Email Dialog opened' : 'External Link Clicked, New Tab opened';\n logTelemetry(Constants.Telemetry.Action.Click, Constants.Telemetry.ActionModifier.Link, detailText);\n logger.info(detailText, {\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.Link\n });\n event.preventDefault();\n // props.shouldOpenInTab is true as default\n const shouldOpenInTab = !isEmailLink && props.shouldOpenInTab !== false;\n urlAssign(props.href, shouldOpenInTab);\n };\n // override attribute tabIndex\n overrideAttributes.tabIndex = props.tabIndex || (props.accessibilityEnabled ? 0 : -1);\n return overrideAttributes;\n}\nexport function getAttributes(props) {\n // override attributes\n const overrideAttributes = getOverrideAttributes(props);\n // attributes\n let attributes = {};\n Object.keys(props).filter((propName)=>[\n 'children',\n 'accessibilityEnabled',\n 'onClickHandle',\n 'shouldOpenInTab'\n ].indexOf(propName) < 0).forEach((propName)=>attributes[`${propName}`] = props[`${propName}`]);\n attributes = _object_spread({}, attributes, overrideAttributes);\n return attributes;\n}\n/**\n * log telemetry\n */ export function logTelemetry(action, actionModifier, details) {\n const pageUrl = getWindow() && getWindow().location && getWindow().location.href;\n const payload = {\n page: pageUrl,\n action: action,\n actionModifier: actionModifier\n };\n if (details) {\n const detailsName = 'details';\n payload[`${detailsName}`] = details;\n }\n SpzaInstrumentService.getProvider().probe(Constants.Telemetry.ProbeName.LogInfo, payload);\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from '@shared/components/spzaComponent';\nimport { Icon, TooltipHost } from '@fluentui/react';\nimport { getUTCDateString } from '@shared/utils/futurePricesUtils';\nimport { uniqueId } from 'lodash-es';\nimport classNames from 'classnames';\nimport { Text } from '@fluentui/react/lib/Text';\nclass FuturePriceTooltip extends SpzaComponent {\n renderImpl() {\n const iconId = 'futurePriceTooltipIcon' + uniqueId();\n const { className = '' } = this.props.futurePrice;\n const futurePriceTooltipClass = classNames('futurePrice', className);\n const textClass = classNames('futurePriceLabel', className);\n return /*#__PURE__*/ _jsx(\"div\", {\n className: futurePriceTooltipClass,\n children: /*#__PURE__*/ _jsx(TooltipHost, {\n tooltipProps: this.tooltipProps,\n id: 'future-price-tooltip',\n calloutProps: {\n target: `#${iconId}`,\n gapSpace: 5\n },\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: 'futurePriceTooltip',\n children: [\n /*#__PURE__*/ _jsx(Icon, {\n \"aria-describedby\": 'future-price-tooltip',\n iconName: \"Info\",\n className: \"futurePriceIcon\",\n id: iconId\n }),\n /*#__PURE__*/ _jsx(Text, {\n className: textClass,\n children: this.context.loc('FuturePrices_upcomingPriceChange', 'Upcoming price change')\n })\n ]\n })\n })\n });\n }\n constructor(...args){\n super(...args), _define_property(this, \"context\", void 0), _define_property(this, \"tooltipContent\", ()=>{\n const { startDate, price, priceComponent, className = '' } = this.props.futurePrice;\n const startDateText = getUTCDateString(startDate, this.context);\n const futurePriceTooltipClass = classNames('futurePriceTooltipContent', className);\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: futurePriceTooltipClass,\n children: [\n /*#__PURE__*/ _jsx(\"span\", {\n children: this.context.locParams('FuturePrices_message', [\n startDateText\n ])\n }),\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"price\",\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML: {\n __html: price\n }\n }),\n priceComponent\n ]\n });\n }), _define_property(this, \"tooltipProps\", {\n onRenderContent: this.tooltipContent\n });\n }\n}\nexport { FuturePriceTooltip as default };\nFuturePriceTooltip.contextTypes = {\n renderErrorModal: PropTypes.func,\n locParams: PropTypes.func,\n loc: PropTypes.func,\n locDateString: PropTypes.func\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from '@shared/components/spzaComponent';\nimport { mergeStyleSets, MessageBar } from '@fluentui/react';\nimport { Text } from '@fluentui/react/lib/Text';\nconst classes = mergeStyleSets({\n warningText: {\n lineHeight: 'normal'\n }\n});\nclass FuturePriceWarning extends SpzaComponent {\n renderImpl() {\n var _this_props_futurePrices_skus, _this_props_futurePrices;\n return !!((_this_props_futurePrices = this.props.futurePrices) === null || _this_props_futurePrices === void 0 ? void 0 : (_this_props_futurePrices_skus = _this_props_futurePrices.skus) === null || _this_props_futurePrices_skus === void 0 ? void 0 : _this_props_futurePrices_skus.length) && /*#__PURE__*/ _jsx(MessageBar, {\n className: \"futurePriceMessageBar\",\n isMultiline: false,\n children: /*#__PURE__*/ _jsx(Text, {\n className: classes.warningText,\n children: this.context.loc('FuturePrices_warning', 'Please note some prices will be changing. View details below.')\n })\n });\n }\n constructor(...args){\n super(...args), _define_property(this, \"context\", void 0);\n }\n}\nexport { FuturePriceWarning as default };\nFuturePriceWarning.contextTypes = {\n renderErrorModal: PropTypes.func,\n loc: PropTypes.func\n};\n","/* eslint-disable react/prop-types */ import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { InternalLink } from './internalLink';\nexport const IconLink = ({ iconClassName, accEnabled, href, className, onClick, title, children })=>{\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"icon-link\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: classNames(iconClassName, 'icon')\n }),\n /*#__PURE__*/ _jsx(InternalLink, {\n accEnabled: accEnabled,\n href: href,\n role: \"link\",\n className: className,\n onClick: onClick,\n title: title,\n children: children\n })\n ]\n });\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { DefaultPalette, mergeStyleSets, Text } from '@fluentui/react';\nimport * as PropTypes from 'prop-types';\nconst classes = mergeStyleSets({\n freeTrialText: {\n color: DefaultPalette.green,\n background: '#DFF6DD',\n padding: '5.25px 8px 7px 8px',\n borderRadius: 2,\n fontSize: 13,\n height: 28,\n display: 'inline-block'\n }\n});\nexport const FreeTrialBadge = (_, context)=>{\n return /*#__PURE__*/ _jsx(Text, {\n className: classes.freeTrialText,\n nowrap: true,\n variant: \"smallPlus\",\n children: context.loc('CTA_Try')\n });\n};\nFreeTrialBadge.contextTypes = {\n loc: PropTypes.func\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { TelemetryImage } from '@shared/components/telemetryImage';\nimport pdpPrivateBadge from '@shared/images/pdp-privateBadge.svg';\nimport React from 'react';\nexport const PrivatePlanBadge = ()=>{\n return /*#__PURE__*/ _jsx(TelemetryImage, {\n src: pdpPrivateBadge,\n alt: \"Private plan badge\"\n });\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { Stack, Text, mergeStyleSets, PrimaryButton } from '@fluentui/react';\nimport { FreeTrialBadge, PrivatePlanBadge } from '@shared/components';\nimport classNames from 'classnames';\nimport { NeutralColors } from '@fluentui/theme';\nconst classes = mergeStyleSets({\n planNameText: {\n minWidth: 144,\n maxWidth: 296,\n whiteSpace: 'break-spaces',\n fontWeight: 600,\n color: NeutralColors.gray160\n },\n hidden: {\n visibility: 'hidden'\n },\n getItNowButton: {\n marginTop: 16\n }\n});\nconst FreeTrialBadgeItem = ({ sku })=>{\n return /*#__PURE__*/ _jsx(Stack.Item, {\n className: classNames({\n [classes.hidden]: !sku.freeTrialDurationDays\n }),\n children: /*#__PURE__*/ _jsx(FreeTrialBadge, {})\n });\n};\nconst PrivateBadgeItem = ({ sku })=>{\n return /*#__PURE__*/ _jsx(Stack.Item, {\n className: classNames({\n [classes.hidden]: !sku.isPrivate\n }),\n children: /*#__PURE__*/ _jsx(PrivatePlanBadge, {})\n });\n};\nconst Badges = ({ sku, offerHasFreeTrialPlans, offerHasPrivatePlans })=>{\n if (!offerHasFreeTrialPlans && !offerHasPrivatePlans) {\n return null;\n }\n return /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n tokens: {\n childrenGap: 8\n },\n children: [\n offerHasFreeTrialPlans && /*#__PURE__*/ _jsx(FreeTrialBadgeItem, {\n sku: sku\n }),\n offerHasPrivatePlans && /*#__PURE__*/ _jsx(PrivateBadgeItem, {\n sku: sku\n })\n ]\n });\n};\nexport const SaasPlanNameCell = ({ offerHasPrivatePlans, offerHasFreeTrialPlans, sku, onGetInNowClicked }, context)=>{\n return /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n horizontalAlign: \"space-between\",\n tokens: {\n childrenGap: 16\n },\n children: [\n /*#__PURE__*/ _jsxs(Stack.Item, {\n children: [\n /*#__PURE__*/ _jsx(Text, {\n className: classes.planNameText,\n block: true,\n children: sku.title\n }),\n /*#__PURE__*/ _jsx(PrimaryButton, {\n className: classes.getItNowButton,\n text: context.loc('CTA_Get', 'Get it now'),\n onClick: onGetInNowClicked\n })\n ]\n }),\n /*#__PURE__*/ _jsx(Badges, {\n sku: sku,\n offerHasFreeTrialPlans: offerHasFreeTrialPlans,\n offerHasPrivatePlans: offerHasPrivatePlans\n })\n ]\n });\n};\nSaasPlanNameCell.contextTypes = {\n locParams: PropTypes.func,\n loc: PropTypes.func\n};\n","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { Text, mergeStyleSets } from '@fluentui/react';\nimport { getPriceWithFrequencyText } from '@shared/utils/pricing';\nimport { CustomMeterPricing } from '@shared/components';\nimport FuturePriceTooltip from '@shared/components/futurePriceTooltip';\nconst classes = mergeStyleSets({\n pricingCellRoot: {\n whiteSpace: 'break-spaces'\n }\n});\nconst SaasPricingContent = ({ sku, price, billingCountry, variant, locale }, context)=>{\n const { countryCode } = billingCountry;\n const priceText = getPriceWithFrequencyText({\n context,\n priceObject: price,\n isQuantifiable: sku.isQuantifiable,\n countryCode,\n currency: sku.currencyCode,\n maximumFractionDigits: 2,\n onetimePaymentTranslation: 'Pricing_Onetime_Payment',\n locale\n });\n const freeTrialText = price.freeDurationDays ? context.loc('First_Month_Free_Trial', 'First month free, then ') : ''; // SaaS offers can only have 30 days(1 month) trial\n const fullPricingText = `${freeTrialText}${priceText}`;\n return /*#__PURE__*/ _jsxs(_Fragment, {\n children: [\n /*#__PURE__*/ _jsx(Text, {\n variant: variant,\n children: fullPricingText\n }),\n /*#__PURE__*/ _jsx(CustomMeterPricing, {\n sku: sku,\n billingCountry: billingCountry,\n price: price,\n variant: variant,\n locale: locale\n })\n ]\n });\n};\nexport const SaasPricingCell = ({ sku, futurePriceSku, price, billingCountry, shouldBlockPrices, locale }, context)=>{\n var _futurePriceSku_termPrices;\n if (shouldBlockPrices) {\n return /*#__PURE__*/ _jsx(Text, {\n children: context.loc('Pricing_ContactPublisher', 'Contact the publisher for pricing information and to purchase the license')\n });\n }\n const futurePriceTerm = futurePriceSku === null || futurePriceSku === void 0 ? void 0 : (_futurePriceSku_termPrices = futurePriceSku.termPrices) === null || _futurePriceSku_termPrices === void 0 ? void 0 : _futurePriceSku_termPrices.find((futurePriceTerm)=>futurePriceTerm.termId === price.termId);\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: classes.pricingCellRoot,\n children: [\n /*#__PURE__*/ _jsx(SaasPricingContent, {\n sku: sku,\n price: price,\n billingCountry: billingCountry,\n locale: locale\n }),\n futurePriceTerm && /*#__PURE__*/ _jsx(FuturePriceTooltip, {\n futurePrice: {\n priceComponent: /*#__PURE__*/ _jsx(\"div\", {\n children: /*#__PURE__*/ _jsx(SaasPricingContent, {\n sku: futurePriceSku,\n price: futurePriceTerm,\n billingCountry: billingCountry,\n variant: \"small\",\n locale: locale\n })\n }),\n startDate: futurePriceSku.startDate\n }\n })\n ]\n });\n};\nSaasPricingCell.contextTypes = {\n locParams: PropTypes.func,\n loc: PropTypes.func\n};\nSaasPricingContent.contextTypes = {\n locParams: PropTypes.func,\n loc: PropTypes.func\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { DirectionalHint, mergeStyleSets, Text } from '@fluentui/react';\nimport { NeutralColors } from '@fluentui/theme';\nimport Tooltip from '@shared/components/tooltip';\nimport { getPriceWithCurrencySymbol } from '@shared/utils/pricing';\nconst classes = mergeStyleSets({\n subtotalText: {\n fontWeight: 600,\n color: NeutralColors.gray160\n }\n});\nexport const SaasSubtotalCell = ({ sku, price, billingCountry, locale }, context)=>{\n const { countryCode } = billingCountry;\n const subtotalPriceText = getPriceWithCurrencySymbol(price.value, countryCode, sku.currencyCode, 2, locale);\n const subtotalText = sku.isQuantifiable ? context.locParams('Pricing_Multiyear_Subtotal_Per_User', [\n subtotalPriceText\n ], `${subtotalPriceText}/user`) : subtotalPriceText;\n return /*#__PURE__*/ _jsx(Tooltip, {\n tooltipHostProps: {\n content: subtotalText,\n directionalHint: DirectionalHint.bottomLeftEdge\n },\n children: /*#__PURE__*/ _jsx(Text, {\n className: classes.subtotalText,\n children: subtotalText\n })\n });\n};\nSaasSubtotalCell.contextTypes = {\n locParams: PropTypes.func,\n loc: PropTypes.func\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { Text } from '@fluentui/react';\nimport { SafeHtmlWrapper } from '@shared/components';\nimport { Constants } from '@shared/utils/constants';\nimport { getBillingTermTranslated } from '@shared/utils/pricing';\nimport { SaasPlanNameCell } from '../saasPlanNameCell';\nimport { SaasPricingCell } from '../saasPricingCell';\nimport { SaasSubtotalCell } from '../saasSubtotalCell';\nconst planNameWidthsByNumberOfTags = [\n {\n // 0 Tags\n minWidth: 176,\n maxWidth: 422\n },\n {\n // 1 Tag\n minWidth: 284,\n maxWidth: 530\n },\n {\n // 2 Tags\n minWidth: 366,\n maxWidth: 612\n }\n];\nconst baseColumn = {\n styles: {\n cellTitle: {\n paddingLeft: 16\n },\n root: {\n height: 'fit-content'\n }\n }\n};\nconst getPlanNameColumn = (context, skus, onGetInNowClicked)=>{\n const hasPrivatePlans = skus.some((sku)=>sku.isPrivate);\n const hasFreeTrial = skus.some((sku)=>sku.freeTrialDurationDays);\n const planNameWidths = planNameWidthsByNumberOfTags[Number(hasPrivatePlans) + Number(hasFreeTrial)];\n return _object_spread_props(_object_spread({}, baseColumn), {\n key: 'plan-name',\n name: context.loc('SimplePlanPricing_ColumnHeader_Plan', 'Plan'),\n minWidth: planNameWidths.minWidth,\n maxWidth: planNameWidths.maxWidth,\n onRender: ({ sku })=>/*#__PURE__*/ _jsx(SaasPlanNameCell, {\n sku: sku,\n offerHasFreeTrialPlans: skus.some((sku)=>sku.freeTrialDurationDays),\n offerHasPrivatePlans: skus.some((sku)=>sku.isPrivate),\n onGetInNowClicked: ()=>onGetInNowClicked(sku.id)\n })\n });\n};\nconst getDescriptionColumn = (context)=>_object_spread_props(_object_spread({}, baseColumn), {\n key: 'description',\n name: context.loc('SimplePlanPricing_ColumnHeader_Description', 'Description'),\n minWidth: 320,\n maxWidth: 696,\n onRender: ({ sku })=>/*#__PURE__*/ _jsx(SafeHtmlWrapper, {\n className: \"plan-description-wrapper\",\n html: sku.description\n })\n });\nconst getPriceAndPaymentOptionsColumn = (context, billingCountry, shouldBlockPrices, locale)=>_object_spread_props(_object_spread({}, baseColumn), {\n key: 'price-and-payment',\n name: context.loc('SimplePlanPricing_ColumnHeader_PriceAndPaymentOptions', 'Price/payment options'),\n minWidth: 206,\n isMultiline: true,\n onRender: ({ price, sku, futurePriceSku })=>/*#__PURE__*/ _jsx(SaasPricingCell, {\n price: price,\n sku: sku,\n futurePriceSku: futurePriceSku,\n billingCountry: billingCountry,\n shouldBlockPrices: shouldBlockPrices,\n locale: locale\n })\n });\nconst getBillingTermColumn = (context)=>_object_spread_props(_object_spread({}, baseColumn), {\n key: 'billing-term',\n name: context.loc('SimplePlanPricing_ColumnHeader_BillingTerm', 'Billing term'),\n minWidth: 136,\n isMultiline: true,\n onRender: ({ price })=>/*#__PURE__*/ _jsx(Text, {\n children: `${getBillingTermTranslated({\n context,\n term: price.unit,\n useHyphen: true,\n isSubscription: true\n })}`\n })\n });\nexport const subtotalColumnKey = 'subtotal';\nconst getSubtotalColumn = (context, billingCountry, locale)=>_object_spread_props(_object_spread({}, baseColumn), {\n key: subtotalColumnKey,\n name: context.loc('SimplePlanPricing_ColumnHeader_Subtotal', 'Subtotal'),\n minWidth: 136,\n isMultiline: true,\n onRender: ({ price, sku })=>/*#__PURE__*/ _jsx(SaasSubtotalCell, {\n sku: sku,\n price: price,\n billingCountry: billingCountry,\n locale: locale\n })\n });\nconst getNumberOfUsersColumn = (context, locale)=>_object_spread_props(_object_spread({}, baseColumn), {\n key: 'number-of-users',\n name: context.loc('SimplePlanPricing_ColumnHeader_NumberOfUsers', 'No. of users'),\n minWidth: 136,\n onRender: ({ sku: { minQuantity, maxQuantity } })=>{\n const minQuantityText = minQuantity.toLocaleString(locale);\n const maxQuantityText = Math.min(Constants.Checkout.MaxQuantity, maxQuantity).toLocaleString(locale);\n return /*#__PURE__*/ _jsx(Text, {\n children: `${minQuantityText} - ${maxQuantityText}`\n });\n }\n });\nexport const getColumns = ({ context, skus, billingCountry, locale, onGetInNowClicked, shouldBlockPrices, isOneTimePayment })=>{\n const planNameColumn = getPlanNameColumn(context, skus, onGetInNowClicked);\n const descriptionColumn = getDescriptionColumn(context);\n const priceAndPaymentOptionsColumn = getPriceAndPaymentOptionsColumn(context, billingCountry, shouldBlockPrices, locale);\n const billingTermColumn = getBillingTermColumn(context);\n const subtotalColumn = getSubtotalColumn(context, billingCountry, locale);\n const columns = isOneTimePayment ? [\n planNameColumn,\n descriptionColumn,\n priceAndPaymentOptionsColumn,\n subtotalColumn\n ] : [\n planNameColumn,\n descriptionColumn,\n priceAndPaymentOptionsColumn,\n billingTermColumn,\n subtotalColumn\n ];\n const isSeatBased = skus.some((sku)=>sku.minQuantity && sku.maxQuantity);\n if (isSeatBased) {\n const numberOfUsersColumn = getNumberOfUsersColumn(context, locale);\n const descriptionColumnIndex = 1;\n columns.splice(descriptionColumnIndex + 1, 0, numberOfUsersColumn);\n }\n return columns;\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React, { useMemo } from 'react';\nimport { NeutralColors } from '@fluentui/theme';\nimport classNames from 'classnames';\nimport { sortTermPrices } from '@shared/utils/pricing';\nimport { subtotalColumnKey } from '../saasPricingTableColumns';\nimport { mergeStyleSets, Stack } from '@fluentui/react';\nconst classes = mergeStyleSets({\n cell: {\n borderBottom: `1px solid ${NeutralColors.gray30}`\n },\n rightBorder: {\n borderRight: `1px solid ${NeutralColors.gray20}`\n },\n topBorder: {\n borderTop: `1px solid ${NeutralColors.gray20}`\n },\n padding: {\n padding: '16px'\n },\n subtotalCell: {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n }\n});\nexport const SaasPricingRow = ({ item, columns, rowWidth })=>{\n const { sku, futurePriceSku } = item;\n const sortedPrices = useMemo(()=>sortTermPrices(sku.termPrices), [\n sku.termPrices\n ]);\n const multilineColumns = useMemo(()=>columns.filter((column)=>column.isMultiline), [\n columns\n ]);\n const numberOfPrices = sortedPrices.length;\n const cellHeightPercentage = `${100 / numberOfPrices}%`;\n const getRowsForColumn = (column)=>multilineColumns.includes(column) ? sortedPrices : [\n sortedPrices[0]\n ];\n const getCellStyle = (column)=>({\n width: column.calculatedWidth,\n maxWidth: column.calculatedWidth\n });\n return /*#__PURE__*/ _jsx(Stack, {\n role: \"row\",\n horizontal: true,\n horizontalAlign: \"start\",\n style: {\n width: rowWidth\n },\n children: columns.map((column, columnIndex)=>{\n const rowsForColumn = getRowsForColumn(column);\n return /*#__PURE__*/ _jsx(Stack, {\n role: \"cell\",\n style: getCellStyle(column),\n className: classNames(classes.cell, {\n [classes.rightBorder]: columnIndex !== columns.length - 1,\n [classes.subtotalCell]: column.key === subtotalColumnKey\n }),\n children: rowsForColumn.map((price, index)=>{\n const isTopBorder = index !== 0;\n const stackHeight = rowsForColumn.length > 1 ? cellHeightPercentage : 'auto';\n const className = classNames(classes.padding, {\n [classes.topBorder]: isTopBorder\n });\n return /*#__PURE__*/ _jsx(Stack, {\n className: className,\n style: {\n height: stackHeight\n },\n children: column.onRender({\n sku,\n futurePriceSku,\n price\n })\n }, index);\n })\n }, column.key);\n })\n });\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React, { useEffect, useMemo } from 'react';\nimport * as PropTypes from 'prop-types';\nimport { CheckboxVisibility, ConstrainMode, DetailsHeader, DetailsList, DetailsListLayoutMode } from '@fluentui/react';\nimport { Constants } from '@shared/utils/constants';\nimport { renderNotAvailablePriceUI } from '@shared/utils/pricing';\nimport { getColumns } from '@shared/components/saasPricingTableBase/saasPricingTableColumns';\nimport { SaasPricingRow } from '@shared/components/saasPricingTableBase/saasPricingRow';\nimport { logger } from '@src/logger';\nimport { getWindow } from '@shared/services/window';\nimport { useSpzaInstrumentService } from '@shared/hooks';\nimport { sortingSKUs } from '@shared/utils/appUtils';\nimport { isOneTimePaymentOffer } from '@shared/utils/onetimepaymentoffers';\nconst renderRow = (rowProps)=>/*#__PURE__*/ _jsx(SaasPricingRow, _object_spread({}, rowProps));\nconst headerStyles = {\n root: {\n height: 20,\n lineHeight: 20,\n paddingBottom: 8\n }\n};\nconst cellStyles = {\n cellExtraRightPadding: 0,\n cellLeftPadding: 0,\n cellRightPadding: 0\n};\nconst sortRows = (rows)=>rows.sort(({ sku: a }, { sku: b })=>sortingSKUs({\n a,\n b\n }));\nexport const defaultRenderHeader = (headerProps)=>{\n return /*#__PURE__*/ _jsx(DetailsHeader, _object_spread_props(_object_spread({}, headerProps), {\n styles: headerStyles\n }));\n};\nexport const SaasPricingTableBase = ({ app, billingCountry, locale, shouldBlockPrices, onGetInNowClicked, detailsListPropsOverride }, context)=>{\n const { pricingInformation: pricing, futurePricesInformation: futurePrices, entityId } = app;\n const isOneTimePayment = isOneTimePaymentOffer(entityId);\n const skus = (pricing === null || pricing === void 0 ? void 0 : pricing.skus) || [];\n const futurePricesSkus = (futurePrices === null || futurePrices === void 0 ? void 0 : futurePrices.skus) || [];\n const [instrument] = useSpzaInstrumentService();\n const columns = useMemo(()=>getColumns({\n context,\n skus,\n billingCountry,\n onGetInNowClicked,\n shouldBlockPrices,\n locale,\n isOneTimePayment\n }), [\n context,\n skus,\n billingCountry,\n onGetInNowClicked,\n shouldBlockPrices,\n locale\n ]);\n const items = useMemo(()=>sortRows(skus.map((sku)=>{\n const futurePriceSku = futurePricesSkus.find((futureSku)=>futureSku.id === sku.id);\n return {\n sku,\n futurePriceSku\n };\n })), [\n skus,\n futurePricesSkus\n ]);\n useEffect(()=>{\n const { bigId, entityId } = app;\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.LongTermSaaS,\n actionModifier: Constants.Telemetry.ActionModifier.LongTermSaasTablePresented,\n details: JSON.stringify({\n bigId,\n entityId\n })\n };\n logger.info(`LongTermSaas PDP table was loaded. bigId: ${bigId}, entityId: ${entityId}`, payload);\n // Using old logger for the transition period\n instrument.probe('logAndFlushTelemetryInfo', payload);\n }, []);\n if (!pricing) {\n return /*#__PURE__*/ _jsx(\"div\", {\n children: context.loc('Loading')\n });\n }\n if (!(skus === null || skus === void 0 ? void 0 : skus.length)) {\n return renderNotAvailablePriceUI(context);\n }\n return /*#__PURE__*/ _jsx(DetailsList, _object_spread({\n items: items,\n columns: columns,\n onRenderRow: renderRow,\n onRenderDetailsHeader: defaultRenderHeader,\n layoutMode: DetailsListLayoutMode.justified,\n checkboxVisibility: CheckboxVisibility.hidden,\n disableSelectionZone: true,\n cellStyleProps: cellStyles,\n constrainMode: ConstrainMode.unconstrained\n }, detailsListPropsOverride));\n};\nSaasPricingTableBase.contextTypes = {\n locParams: PropTypes.func,\n loc: PropTypes.func\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _object_without_properties(source, excluded) {\n if (source == null) return {};\n var target = _object_without_properties_loose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for(i = 0; i < sourceSymbolKeys.length; i++){\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\nfunction _object_without_properties_loose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for(i = 0; i < sourceKeys.length; i++){\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport SpzaComponent from './spzaComponent';\nimport { urlPush } from '../../shared/routerHistory';\nimport { getWindow } from '@shared/services/window';\nimport { Constants } from '@shared/utils/constants';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { logger } from '@src/logger';\nimport { omit } from 'lodash-es';\nexport class InternalLink extends SpzaComponent {\n addHiddenFocus() {\n if (this.internalLinkElement) {\n this.internalLinkElement.classList.add('x-hidden-focus');\n }\n }\n removeHiddenFocus() {\n if (this.internalLinkElement) {\n this.internalLinkElement.classList.remove('x-hidden-focus');\n }\n }\n renderImpl() {\n const _this_props = this.props, { telemetryDetails } = _this_props, rest = _object_without_properties(_this_props, [\n \"telemetryDetails\"\n ]);\n let href = null;\n let onClick = null;\n let children = null;\n const aTagAccEnabled = rest.role !== 'checkbox' && rest.accEnabled ? 0 : -1;\n const otherProps = {};\n let additionalCommand = null;\n for(const p in omit(rest, 'accEnabled')){\n const val = rest[`${p}`];\n if (p === 'href') {\n href = val;\n } else if (p === 'onClick') {\n onClick = val;\n } else if (p === 'children') {\n children = val;\n } else if (p === 'additionalCommand') {\n additionalCommand = val;\n } else {\n otherProps[`${p}`] = val;\n }\n }\n let callback;\n if (onClick) {\n callback = (e)=>{\n if (additionalCommand) {\n additionalCommand(e);\n }\n onClick(e);\n e.preventDefault();\n };\n } else {\n callback = (e)=>{\n if (additionalCommand) {\n additionalCommand(e);\n }\n e.preventDefault();\n urlPush(href, this.props.scrollToTop);\n };\n }\n const { scrollToTop } = otherProps, domProps = _object_without_properties(otherProps, [\n \"scrollToTop\"\n ]);\n return /*#__PURE__*/ _jsx(\"a\", _object_spread_props(_object_spread({}, domProps), {\n href: href,\n onClick: (event)=>{\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.InternalLink,\n details: telemetryDetails || JSON.stringify(href)\n };\n this.provider.probe(Constants.Telemetry.ProbeName.LogInfo, payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n return callback(event);\n },\n tabIndex: aTagAccEnabled,\n ref: (element)=>this.internalLinkElement = element,\n onMouseDown: ()=>this.addHiddenFocus(),\n onBlur: ()=>this.removeHiddenFocus(),\n children: children\n }));\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"internalLinkElement\", void 0), _define_property(this, \"provider\", void 0);\n this.provider = SpzaInstrumentService.getProvider();\n this.addHiddenFocus = this.addHiddenFocus.bind(this);\n this.removeHiddenFocus = this.removeHiddenFocus.bind(this);\n }\n}\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React, { useRef, useEffect, useState } from 'react';\nimport { NeutralColors, SharedColors } from '@fluentui/theme';\nimport { Text, FontIcon, mergeStyleSets } from '@fluentui/react';\nimport { getWindow } from '@shared/services/window';\nimport { Constants } from '@shared/utils/constants';\nimport { ItemsTooltip } from '@shared/components/ItemsTooltip';\nimport { InternalLink } from '@shared/components/internalLink';\nimport word from '@shared/images/ProductIcons/Word.svg';\nimport outlook from '@shared/images/ProductIcons/Outlook.svg';\nimport onenote from '@shared/images/ProductIcons/OneNote.svg';\nimport officemetaos from '@shared/images/ProductIcons/OfficeMetaOS.svg';\nimport teams from '@shared/images/ProductIcons/Teams.svg';\nimport excel from '@shared/images/ProductIcons/Excel.svg';\nimport sharepoint from '@shared/images/ProductIcons/SharePoint.svg';\nimport viva from '@shared/images/ProductIcons/Viva.svg';\nimport powerpoint from '@shared/images/ProductIcons/PowerPoint.svg';\nimport project from '@shared/images/ProductIcons/Project.svg';\nimport azure from '@shared/images/ProductIcons/azure.png';\nimport webApps from '@shared/images/ProductIcons/web-apps.svg';\nimport dynamics365Marketing from '@shared/images/ProductIcons/dynamics-365-marketing.svg';\nimport dynamics365Commerce from '@shared/images/ProductIcons/dynamics-365-commerce.svg';\nimport dynamics365SupplyChainManagment from '@shared/images/ProductIcons/dynamics-365-supply-chain-management.svg';\nimport dynamics365ForFinanceAndOperations from '@shared/images/ProductIcons/dynamics-365-for-finance-and-operations.svg';\nimport dynamics365ForSales from '@shared/images/ProductIcons/dynamics-365-for-sales.svg';\nimport dynamics365BusinessCentral from '@shared/images/ProductIcons/dynamics-365-business-central.svg';\nimport dynamics365ForCustomerServices from '@shared/images/ProductIcons/dynamics-365-for-customer-services.svg';\nimport dynamics365ForFieldServices from '@shared/images/ProductIcons/dynamics-365-for-field-services.svg';\nimport dynamics365ForProjectServiceAutomation from '@shared/images/ProductIcons/dynamics-365-for-project-service-automation.svg';\nimport dynamics365CustomerInsights from '@shared/images/ProductIcons/dynamics-365-customer-insights.svg';\nimport dynamics365CustomerVoice from '@shared/images/ProductIcons/dynamics-365-customer-voice.svg';\nimport dynamics365ProjectOperations from '@shared/images/ProductIcons/dynamics-365-project-operations.svg';\nimport dynamics365MixedReality from '@shared/images/ProductIcons/dynamics-365-mixed-reality.svg';\nimport dynamics365HumanResources from '@shared/images/ProductIcons/dynamics-365-human-resources.svg';\nimport m365AdoptionAndChangeManagement from '@shared/images/ProductIcons/m365-sa-adoption-and-change-management.svg';\nimport m365CallingForMicrosoftTeams from '@shared/images/ProductIcons/m365-sa-calling-for-microsoft-teams.svg';\nimport m365CloudSecurity from '@shared/images/ProductIcons/m365-sa-cloud-security.svg';\nimport m365ComplianceAdvisoryServices from '@shared/images/ProductIcons/m365-sa-compliance-advisory-services.svg';\nimport m365DeviceDeploymentAndManagement from '@shared/images/ProductIcons/m365-sa-device-deployment-and-management.svg';\nimport m365FirstlineWorkers from '@shared/images/ProductIcons/m365-sa-firstline-workers.svg';\nimport m365IdentityAndAccessManagement from '@shared/images/ProductIcons/m365-sa-identity-and-access-management.svg';\nimport m365InformationProtectionAndGovernance from '@shared/images/ProductIcons/m365-sa-information-protection-and-governance.svg';\nimport m365InsiderRisk from '@shared/images/ProductIcons/m365-sa-insider-risk.svg';\nimport m365KnowledgeAndInsights from '@shared/images/ProductIcons/m365-sa-knowledge-and-insights.svg';\nimport m365MeetingRoomsForMicrosoftTeams from '@shared/images/ProductIcons/m365-sa-meeting-rooms-for-microsoft-teams.svg';\nimport m365MeetingsForMicrosoftTeams from '@shared/images/ProductIcons/m365-sa-meetings-for-microsoft-teams.svg';\nimport m365LiveEvents from '@shared/images/ProductIcons/m365-sa-microsoft-365-live-events.svg';\nimport m365MobileDeviceManagement from '@shared/images/ProductIcons/m365-sa-mobile-device-management.svg';\nimport m365PowerPlatformForTeams from '@shared/images/ProductIcons/m365-sa-power-platform-for-teams.svg';\nimport m365TeamsCustomSolutions from '@shared/images/ProductIcons/m365-sa-teams-custom-solutions.svg';\nimport m365TeamworkDeployment from '@shared/images/ProductIcons/m365-sa-teamwork-deployment.svg';\nimport m365ThreatProtection from '@shared/images/ProductIcons/m365-sa-threat-protection.svg';\nimport m365WorkspaceAnalytics from '@shared/images/ProductIcons/m365-sa-workplace-analytics.svg';\nimport powerBI from '@shared/images/ProductIcons/power-bi.svg';\nimport powerBIVisuals from '@shared/images/ProductIcons/power-bi-visuals.svg';\nimport powerAutomate from '@shared/images/ProductIcons/power-automate.svg';\nimport powerVirtualAgents from '@shared/images/ProductIcons/power-virtual-agents.svg';\nimport powerapps from '@shared/images/ProductIcons/PowerApps.svg';\nimport powerpages from '@shared/images/ProductIcons/powerpages.svg';\nimport appServices from '@shared/images/ProductIcons/App-Services.svg';\nimport azureServices from '@shared/images/ProductIcons/Azure.svg';\nimport kubernetesServices from '@shared/images/ProductIcons/Kubernetes-Services.svg';\nimport managedService from '@shared/images/ProductIcons/Managed-Service.svg';\nimport virtualMachine from '@shared/images/ProductIcons/Virtual-Machine.svg';\nimport entraId from '@shared/images/ProductIcons/entra-id.svg';\nimport classNames from 'classnames';\nconst iconsMap = {\n word,\n outlook,\n onenote,\n officemetaos,\n teams,\n excel,\n sharepoint,\n viva,\n powerpoint,\n project,\n azure,\n 'web-apps': webApps,\n // 'power-platform': true,\n // 'dynamics-365': true,\n 'dynamics-365-marketing': dynamics365Marketing,\n 'dynamics-365-commerce': dynamics365Commerce,\n 'dynamics-365-supply-chain-management': dynamics365SupplyChainManagment,\n // 'dynamics-365-for-operations': true,\n 'dynamics-365-for-finance-and-operations': dynamics365ForFinanceAndOperations,\n 'dynamics-365-for-sales': dynamics365ForSales,\n 'dynamics-365-business-central': dynamics365BusinessCentral,\n 'dynamics-365-for-customer-services': dynamics365ForCustomerServices,\n 'dynamics-365-for-field-services': dynamics365ForFieldServices,\n 'dynamics-365-for-project-service-automation': dynamics365ForProjectServiceAutomation,\n 'dynamics-365-customer-insights': dynamics365CustomerInsights,\n 'dynamics-365-customer-voice': dynamics365CustomerVoice,\n 'dynamics-365-project-operations': dynamics365ProjectOperations,\n // 'dynamics-365-project-services': true,\n 'dynamics-365-mixed-reality': dynamics365MixedReality,\n 'dynamics-365-human-resources': dynamics365HumanResources,\n 'm365-sa-adoption-and-change-management': m365AdoptionAndChangeManagement,\n 'm365-sa-calling-for-microsoft-teams': m365CallingForMicrosoftTeams,\n 'm365-sa-cloud-security': m365CloudSecurity,\n 'm365-sa-compliance-advisory-services': m365ComplianceAdvisoryServices,\n 'm365-sa-device-deployment-and-management': m365DeviceDeploymentAndManagement,\n 'm365-sa-firstline-workers': m365FirstlineWorkers,\n 'm365-sa-identity-and-access-management': m365IdentityAndAccessManagement,\n 'm365-sa-information-protection-and-governance': m365InformationProtectionAndGovernance,\n 'm365-sa-insider-risk': m365InsiderRisk,\n 'm365-sa-knowledge-and-insights': m365KnowledgeAndInsights,\n 'm365-sa-meeting-rooms-for-microsoft-teams': m365MeetingRoomsForMicrosoftTeams,\n 'm365-sa-meetings-for-microsoft-teams': m365MeetingsForMicrosoftTeams,\n 'm365-sa-microsoft-365-live-events': m365LiveEvents,\n 'm365-sa-mobile-device-management': m365MobileDeviceManagement,\n 'm365-sa-power-platform-for-teams': m365PowerPlatformForTeams,\n 'm365-sa-teams-custom-solutions': m365TeamsCustomSolutions,\n 'm365-sa-teamwork-deployment': m365TeamworkDeployment,\n 'm365-sa-threat-protection': m365ThreatProtection,\n 'm365-sa-workplace-analytics': m365WorkspaceAnalytics,\n 'power-bi': powerBI,\n 'power-bi-visuals': powerBIVisuals,\n 'power-automate': powerAutomate,\n 'power-virtual-agents': powerVirtualAgents,\n powerapps,\n powerpages,\n 'azure-services': azureServices,\n container: kubernetesServices,\n 'virtual-machine': virtualMachine,\n 'entra-apps': entraId,\n 'azure-application': appServices,\n 'managed-services': managedService\n};\nconst pixelsPerChar = {\n medium: 9,\n smallPlus: 6\n};\nconst firstIconMargin = 2;\nconst iconSize = 16;\nconst totalIconMargin = 8;\nconst totalTextMargin = totalIconMargin;\nconst dividerSize = iconSize;\nconst optionalLeftNumberSize = (textSize)=>2 * pixelsPerChar[`${textSize}`];\nconst minTextSize = (textSize)=>3 * pixelsPerChar[`${textSize}`];\nconst classStyles = mergeStyleSets({\n icon: [\n {\n display: 'inline-block',\n margin: `0 ${totalIconMargin / 2}px`\n }\n ],\n firstIcon: [\n {\n margin: `0 ${totalIconMargin / 2}px 0 0`\n }\n ],\n divider: [\n {\n fontSize: iconSize,\n color: NeutralColors.gray40\n }\n ],\n hoveredText: [\n {\n margin: `0px ${totalTextMargin / 2}px`,\n color: SharedColors.cyanBlue10,\n textDecoration: 'underline'\n }\n ],\n link: [\n {\n margin: `2px ${totalTextMargin / 2}px`\n }\n ],\n linkText: [\n {\n color: SharedColors.cyanBlue10\n }\n ],\n text: [\n {\n margin: `0px ${totalTextMargin / 2}px`\n },\n {\n color: NeutralColors.gray130\n }\n ]\n});\nconst containerClassName = (wrap)=>mergeStyleSets({\n container: [\n 'itemsContainer',\n {\n flexWrap: wrap ? 'wrap' : 'nowrap'\n }\n ]\n });\nconst sizes = {\n icon: iconSize + totalIconMargin,\n text: (length, textSize)=>length * pixelsPerChar[`${textSize}`] + totalTextMargin\n};\nexport const ItemsContainerIcon = ({ itemType, className = classStyles.icon })=>/*#__PURE__*/ _jsx(\"img\", {\n src: iconsMap[`${itemType}`],\n width: iconSize,\n height: iconSize,\n alt: `${itemType} product icon`,\n className: className\n });\nexport const ItemsContainerDivider = ()=>/*#__PURE__*/ _jsx(FontIcon, {\n iconName: \"Separator\",\n className: classStyles.divider\n });\nexport const ItemsContainerText = ({ text, hovered = false, textSize = 'medium' })=>{\n const classes = classNames({\n [classStyles.hoveredText]: hovered\n });\n return /*#__PURE__*/ _jsx(Text, {\n variant: textSize,\n className: hovered ? classes : classStyles.text,\n children: text\n });\n};\nexport const ItemsContainerLinkText = ({ entityId, type, text, hovered, hrefCallback, logOnClick, dataBiId, textSize = 'medium' })=>{\n return hrefCallback ? /*#__PURE__*/ _jsx(InternalLink, {\n href: hrefCallback(entityId),\n additionalCommand: logOnClick ? ()=>logOnClick(type) : null,\n \"data-bi-id\": dataBiId,\n \"data-bi-name\": entityId,\n \"data-bi-view\": Constants.Telemetry.TemplateName.SaaSBundle,\n \"data-bi-area\": Constants.Telemetry.AreaName.AppDetails,\n accEnabled: true,\n className: classStyles.link,\n children: /*#__PURE__*/ _jsx(Text, {\n className: classStyles.linkText,\n variant: textSize,\n children: text\n })\n }) : /*#__PURE__*/ _jsx(ItemsContainerText, {\n text: text,\n textSize: textSize,\n hovered: hovered\n });\n};\nexport const ItemsContainerComponent = ({ items, logOnClick, hrefCallback, tooltipTitle, textSize = 'medium', wrap = false, withText = false, withTooltip = false, dataBiId = 'View AddIn', withDivider = true, linkedAddIns = null, linkedWebApps = null })=>{\n var _ref_current;\n const ref = useRef(null);\n const [elementWidth, setElementWidth] = useState((ref === null || ref === void 0 ? void 0 : (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.clientWidth) || 0);\n const onResize = ()=>{\n if (ref.current) {\n setElementWidth(ref.current.clientWidth);\n }\n };\n useEffect(()=>setElementWidth(ref.current.clientWidth), []);\n useEffect(()=>{\n var _getWindow;\n (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : _getWindow.addEventListener('resize', onResize);\n return ()=>{\n var _getWindow;\n (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : _getWindow.removeEventListener('resize', onResize);\n };\n }, []);\n const insertEllipsis = (itemIndex, productIndex, elements, productsNumber)=>{\n let leftNumber = productsNumber - productIndex;\n if (itemIndex > 0) {\n elements.push(/*#__PURE__*/ _jsx(ItemsContainerText, {\n text: \"...\",\n textSize: textSize,\n hovered: withTooltip\n }, `${itemIndex}_ellipsis`));\n leftNumber -= 1;\n }\n if (leftNumber > 0) elements.push(/*#__PURE__*/ _jsx(ItemsContainerText, {\n text: `+${leftNumber}`,\n textSize: textSize,\n hovered: withTooltip\n }, `${itemIndex}_ellipsis2`));\n return elements;\n };\n const renderElements = ()=>{\n const productsCount = items.length;\n const shouldAddLeftNumber = productsCount > 1;\n const additionalLeftNumberSize = shouldAddLeftNumber ? optionalLeftNumberSize(textSize) : 0;\n const maxWidth = wrap ? Infinity : elementWidth - additionalLeftNumberSize;\n const elementsToRender = [];\n let currentWidth = 0;\n for(let productIndex = 0; productIndex < productsCount; productIndex++){\n const icons = items[`${productIndex}`].icons;\n const lastProduct = productIndex >= productsCount - 1;\n for(let itemIndex = 0; itemIndex < icons.length; itemIndex++){\n const lastType = items[`${productIndex}`].urlKey ? itemIndex === icons.length - 1 : true;\n const shouldAddDivider = itemIndex === 0 && !lastProduct && withDivider;\n let additionalSize = shouldAddDivider ? dividerSize : 0;\n if (currentWidth + sizes.icon + additionalSize < maxWidth) {\n currentWidth += sizes.icon + additionalSize;\n if (!withDivider && productIndex === 0) {\n elementsToRender.push(/*#__PURE__*/ _jsx(ItemsContainerIcon, {\n itemType: icons[`${itemIndex}`],\n className: classStyles.firstIcon\n }, `${productIndex}_${itemIndex}`));\n additionalSize -= firstIconMargin;\n } else {\n elementsToRender.push(/*#__PURE__*/ _jsx(ItemsContainerIcon, {\n itemType: icons[`${itemIndex}`]\n }, `${productIndex}_${itemIndex}`));\n }\n if (lastType) {\n const productName = items[`${productIndex}`].title;\n const productNameLength = sizes.text(productName.length, textSize);\n const totalMaxWidth = lastProduct ? maxWidth + additionalLeftNumberSize : maxWidth;\n const totalProductNameLength = withDivider ? productNameLength : productNameLength + totalTextMargin / 2;\n if (withText) {\n if (currentWidth + minTextSize(textSize) <= totalMaxWidth) {\n if (currentWidth + productNameLength > totalMaxWidth) {\n const leftNumber = productsCount - productIndex;\n // if we cant push the whole product name, then remove the icon and add +1\n elementsToRender.pop();\n elementsToRender.push(/*#__PURE__*/ _jsx(ItemsContainerText, {\n text: `+${leftNumber}`,\n textSize: textSize,\n hovered: withTooltip\n }, `${items[`${productIndex}`].urlKey}_linkText3`));\n return elementsToRender;\n } else {\n elementsToRender.push(/*#__PURE__*/ _jsx(ItemsContainerLinkText, {\n entityId: items[`${productIndex}`].urlKey,\n type: icons[0],\n text: productName,\n textSize: textSize,\n hrefCallback: hrefCallback,\n logOnClick: logOnClick,\n dataBiId: dataBiId\n }, `${items[`${productIndex}`].urlKey}_${productIndex}_linkText`));\n }\n currentWidth += totalProductNameLength;\n } else {\n elementsToRender.push(/*#__PURE__*/ _jsx(ItemsContainerText, {\n text: \"...\",\n textSize: textSize,\n hovered: withTooltip\n }, `${productIndex}_linkText2`));\n if (lastProduct) return elementsToRender;\n const leftNumber = productsCount - productIndex - 1;\n if (leftNumber > 0) elementsToRender.push(/*#__PURE__*/ _jsx(ItemsContainerText, {\n text: `+${leftNumber}`,\n textSize: textSize,\n hovered: withTooltip\n }, `${items[`${productIndex}`].urlKey}_linkText3`));\n return elementsToRender;\n }\n }\n if (!lastProduct && withDivider) elementsToRender.push(/*#__PURE__*/ _jsx(ItemsContainerDivider, {}, `${items[`${productIndex}`].urlKey}_linkDivider`));\n }\n } else {\n return insertEllipsis(itemIndex, productIndex, elementsToRender, productsCount);\n }\n }\n }\n if (linkedWebApps) {\n elementsToRender.push(linkedWebApps);\n }\n if (linkedAddIns) {\n elementsToRender.push(linkedAddIns);\n }\n return elementsToRender.map((element, index)=>/*#__PURE__*/ _jsx(React.Fragment, {\n children: element\n }, index));\n };\n return /*#__PURE__*/ _jsx(\"div\", {\n ref: ref,\n className: \"itemsRootContainer\",\n children: withTooltip ? /*#__PURE__*/ _jsx(ItemsTooltip, {\n title: tooltipTitle,\n items: items,\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: containerClassName(wrap).container,\n children: renderElements()\n })\n }) : /*#__PURE__*/ _jsx(\"div\", {\n className: containerClassName(wrap).container,\n children: renderElements()\n })\n });\n};\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React, { useState } from 'react';\nimport ProductsComponent from '@shared/components/products';\nimport * as PropTypes from 'prop-types';\nimport { getProductsList } from '@shared/utils/detailUtils';\nimport { TelemetryImage } from '@shared/components/telemetryImage';\nimport { Stack, Text, mergeStyleSets, DefaultButton, ScreenWidthMinXLarge } from '@fluentui/react';\nimport classNames from 'classnames';\nimport { NeutralColors } from '@fluentui/theme';\nimport { bulidStartingPriceElement, getStartingPriceElement, shouldBlockPricing } from '@shared/utils/pricing';\nimport { BaseCtaButton } from '@shared/components/baseCtaButton';\nimport { Constants } from '@shared/utils/constants';\nimport { Link, useLocation } from 'react-router-dom';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { logger } from '@src/logger';\nimport { RatingsInfo } from '@shared/components/ratings/ratingsInfo';\nconst containerTokens = {\n childrenGap: 16,\n padding: 16\n};\nconst verticalItemsTokens = {\n childrenGap: 8,\n paddingTop: 16,\n paddingBottom: 16\n};\nconst linkedItemStyles = mergeStyleSets({\n itemImage: {\n width: 60,\n height: 60,\n display: 'flex',\n backgroundColor: NeutralColors.white\n },\n linkItemTitle: {\n height: 48,\n fontWeight: 600,\n color: NeutralColors.gray160,\n overflow: 'hidden',\n display: '-webkit-box',\n textOverflow: 'ellipsis',\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '2'\n },\n linkItemContainer: {\n justifyContent: 'space-around'\n },\n moreProductsStyle: {\n paddingTop: 3\n },\n imageStackItemStyle: {\n '& .appTileHoverImage': {\n width: 50,\n height: 50,\n margin: 'auto'\n }\n },\n productsAndStarsStackItemStyle: {\n marginBottom: 8\n },\n startingPriceElementContainer: {\n maxWidth: '237px',\n display: 'block',\n '& .button-link': {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n textAlign: 'start'\n },\n '& .buttonLinkContainer': {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n textAlign: 'start'\n },\n '& .dark': {\n marginTop: 0\n },\n [`@media (max-width: ${ScreenWidthMinXLarge}px)`]: {\n display: 'none'\n }\n },\n starsAndRattingContainer: {\n height: 20,\n '& .ratingInfoSection .detailsRatingStar': {\n marginBottom: 0\n }\n },\n rattingText: {\n color: NeutralColors.gray130\n },\n rattingStarText: {\n marginRight: 4,\n padding: 0,\n fontSize: 12\n },\n pricingAndCtaToken: {\n marginTop: 12\n },\n ctaButton: {\n maxWidth: 115\n }\n});\nconst tileStyle = {\n root: {\n selectors: {\n '&:hover': {\n backgroundColor: NeutralColors.gray10\n }\n }\n }\n};\nconst ctaButtonStyle = {\n textContainer: {\n overflow: 'hidden'\n },\n label: {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis'\n }\n};\nconst getProducts = (products)=>{\n return products && Object.keys(products).length > 0 && getProductsList(products);\n};\nconst getRatingsData = (context, ratingsAverage, ratingsNum)=>{\n return ratingsNum >= 1 && {\n avgRating: ratingsAverage,\n ratingsCount: ratingsNum,\n key: 'internal',\n text: context.loc('Tile_ASRatings', 'ratings')\n };\n};\nconst logTelemetryInfo = ({ linkedItem, location })=>{\n const instrument = SpzaInstrumentService.getProvider();\n const { title, entityId } = linkedItem;\n const payload = {\n page: location.pathname,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.SaaSLinkingTile,\n details: JSON.stringify({\n title,\n entityId\n })\n };\n instrument.probe(Constants.Telemetry.ProbeName.LogInfo, payload);\n logger.info('', payload);\n};\nexport const LinkedItem = ({ linkedItem, isInAppDetail, billingCountryCode, isSaaSRendering, ctaButtonClick, isLoadingUserData, getLinkedItemLink, productId, locale }, context)=>{\n const [isCardHover, setIsCardHover] = useState(false);\n const location = useLocation();\n const itemProducts = getProducts(linkedItem.products);\n const ratingsData = getRatingsData(context, linkedItem.AverageRating, linkedItem.NumberOfRatings);\n const startingPrice = shouldBlockPricing(linkedItem) ? null : linkedItem.startingPrice;\n const pricingElement = getStartingPriceElement({\n app: linkedItem,\n billingCountryCode,\n startingPrice,\n context,\n locale\n });\n return /*#__PURE__*/ _jsx(Link, {\n to: getLinkedItemLink({\n linkedItem,\n productId,\n context\n }),\n onClick: ()=>{\n logTelemetryInfo({\n linkedItem,\n location\n });\n },\n children: /*#__PURE__*/ _jsxs(Stack, {\n tokens: containerTokens,\n horizontal: true,\n className: classNames({\n 'ms-depth-8': isInAppDetail\n }),\n onMouseEnter: ()=>setIsCardHover(true),\n onMouseLeave: ()=>setIsCardHover(false),\n styles: tileStyle,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n className: classNames([\n linkedItemStyles.imageStackItemStyle\n ]),\n children: /*#__PURE__*/ _jsx(TelemetryImage, {\n src: linkedItem.iconURL,\n alt: \"linked item icon\",\n className: classNames([\n linkedItemStyles.itemImage\n ], 'ms-depth-8'),\n imgClassName: \"appTileHoverImage\"\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n grow: 1,\n children: /*#__PURE__*/ _jsxs(Stack, {\n tokens: verticalItemsTokens,\n className: linkedItemStyles.linkItemContainer,\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(Text, {\n variant: \"large\",\n className: classNames([\n linkedItemStyles.linkItemTitle\n ]),\n children: linkedItem.title\n })\n }),\n (itemProducts === null || itemProducts === void 0 ? void 0 : itemProducts.length) && /*#__PURE__*/ _jsx(Stack.Item, {\n grow: 1,\n className: classNames([\n linkedItemStyles.moreProductsStyle\n ]),\n children: /*#__PURE__*/ _jsx(ProductsComponent, {\n withTooltip: true,\n textSize: \"smallPlus\",\n withText: true,\n productsItems: itemProducts\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n className: classNames([\n linkedItemStyles.starsAndRattingContainer\n ]),\n children: ratingsData && /*#__PURE__*/ _jsx(RatingsInfo, {\n avgRating: ratingsData.avgRating,\n ratingsCount: ratingsData.ratingsCount,\n title: ratingsData.text,\n context: context,\n textSize: \"smallPlus\",\n starClass: classNames([\n linkedItemStyles.rattingStarText\n ]),\n ratingClass: classNames([\n linkedItemStyles.rattingText\n ])\n }, ratingsData.key)\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n className: classNames([\n linkedItemStyles.pricingAndCtaToken\n ]),\n children: [\n /*#__PURE__*/ _jsx(Stack.Item, {\n className: linkedItemStyles.startingPriceElementContainer,\n title: pricingElement === null || pricingElement === void 0 ? void 0 : pricingElement.value,\n children: bulidStartingPriceElement({\n app: linkedItem,\n pricingLinkClassName: 'dark',\n billingCountryCode,\n context,\n locale\n })\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n disableShrink: true,\n children: isSaaSRendering ? /*#__PURE__*/ _jsx(DefaultButton, {\n primary: isCardHover,\n text: context.loc('Button_LearnMore', 'Learn more'),\n onClick: (event)=>{\n ctaButtonClick({\n linkedItem,\n event\n });\n },\n className: classNames([\n linkedItemStyles.ctaButton\n ]),\n styles: ctaButtonStyle,\n title: context.loc('Button_LearnMore', 'Learn more')\n }) : /*#__PURE__*/ _jsx(BaseCtaButton, {\n app: linkedItem,\n billingCountryCode: billingCountryCode,\n startingPrice: linkedItem.startingPrice,\n isLoadingUserData: isLoadingUserData,\n CtaComponent: /*#__PURE__*/ _jsx(DefaultButton, {\n primary: isCardHover,\n text: context.loc('CTA_Get', 'Get it now'),\n onClick: (event)=>{\n ctaButtonClick({\n linkedItem,\n event\n });\n },\n className: classNames([\n linkedItemStyles.ctaButton\n ]),\n styles: ctaButtonStyle,\n title: context.loc('CTA_Get', 'Get it now')\n }),\n ctaType: Constants.CTAType.Get\n })\n })\n ]\n })\n })\n ]\n })\n })\n ]\n })\n });\n};\nLinkedItem.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n buildHref: PropTypes.func\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { Dialog, DialogType, DialogFooter, PrimaryButton, Stack, FontIcon, mergeStyleSets } from '@fluentui/react';\nimport { NeutralColors } from '@fluentui/theme';\nconst closeButtonText = 'Done';\nconst iconName = 'Completed';\nconst modalMinWidth = '560px';\nconst modalProps = {\n isDarkOverlay: false\n};\nconst stackTokens = {\n childrenGap: 8\n};\nconst classNames = mergeStyleSets({\n icon: [\n {\n fontSize: 16,\n height: 16,\n width: 16,\n color: '#107C10',\n marginTop: 2\n }\n ]\n});\nconst dialogStyles = {\n main: {\n minHeight: 100\n }\n};\nconst dialogContentStyles = {\n header: {\n color: NeutralColors.gray160\n }\n};\nconst dialogContentProps = (context)=>{\n return {\n type: DialogType.close,\n closeButtonAriaLabel: context.loc('SubmittedModal_CloseButton_AriaText', 'Close'),\n styles: dialogContentStyles\n };\n};\nexport const SubmittedModal = ({ hidden, onDismiss, title, children, context })=>{\n return /*#__PURE__*/ _jsxs(Dialog, {\n hidden: hidden,\n dialogContentProps: _object_spread_props(_object_spread({}, dialogContentProps(context)), {\n title\n }),\n minWidth: modalMinWidth,\n modalProps: modalProps,\n styles: dialogStyles,\n onDismiss: onDismiss,\n children: [\n /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n tokens: stackTokens,\n children: [\n /*#__PURE__*/ _jsx(FontIcon, {\n iconName: iconName,\n className: classNames.icon\n }),\n /*#__PURE__*/ _jsx(Stack.Item, {\n children: children\n })\n ]\n }),\n /*#__PURE__*/ _jsx(DialogFooter, {\n children: /*#__PURE__*/ _jsx(PrimaryButton, {\n text: context.loc('SubmittedModal_CloseButton_Text', closeButtonText),\n onClick: onDismiss\n })\n })\n ]\n });\n};\n","import { jsx as _jsx, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { useSelector } from 'react-redux';\nimport { Constants, Environment } from '@shared/utils/constants';\nimport { getLocalStorageItem } from '@shared/utils/browserStorageUtils';\nimport { useMsClarityIdentify, useMsClarityTracking } from '@shared/hooks';\n// Learn more about clarity API here: https://learn.microsoft.com/en-us/clarity/setup-and-installation/clarity-api\nexport const IClarityFunctionNames = {\n IDENTIFY: 'identify',\n SET: 'set',\n CONSENT: 'consent',\n UPGRADE: 'upgrade'\n};\nexport const MsClarityEnabledEnvironments = [\n Environment.Canary,\n Environment.Production,\n Environment.Development\n];\nexport const MsClarity = ({ allowTracking })=>{\n const { correlationId } = useSelector((state)=>state.config);\n const spzaId = getLocalStorageItem(Constants.LocalStorage.spzaUserId);\n useMsClarityTracking({\n allowTracking\n });\n useMsClarityIdentify({\n spzaId,\n correlationId\n });\n return /*#__PURE__*/ _jsx(_Fragment, {});\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { ItemsContainerComponent } from '@shared/components/itemsContainer';\nconst ProductsComponent = ({ productsItems, tooltipTitle, textSize = 'medium', wrap = false, withText = false, withTooltip = false, linkedAddIns = null, linkedWebApps = null })=>{\n const items = React.useMemo(()=>productsItems.map((item)=>{\n return {\n icons: [\n item.urlKey\n ],\n title: item.title\n };\n }), [\n productsItems\n ]);\n return /*#__PURE__*/ _jsx(ItemsContainerComponent, {\n items: items,\n textSize: textSize,\n tooltipTitle: tooltipTitle,\n withText: withText,\n withTooltip: withTooltip,\n wrap: wrap,\n withDivider: false,\n linkedAddIns: linkedAddIns,\n linkedWebApps: linkedWebApps\n });\n};\nexport default ProductsComponent;\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport * as React from 'react';\nimport { logClientError } from '@shared/utils/appUtils';\nclass PureSpzaComponent extends React.PureComponent {\n renderImpl() {\n // should never be called\n throw new Error('PureSpzaComponent renderImpl method should never be called!\\nMake sure you are implementing renderImpl in your Component');\n }\n renderFailImpl(err) {\n // rendering must _never_ let an error escape. This puts react in a bad state and\n // current versions (15.x) cannot deal with that.\n logClientError(err, 'client side error: [From pureSpzaComponent] ');\n // no longer we render the error modal from here the main client hook up handles all errors.\n throw err;\n }\n render() {\n try {\n return this.renderImpl();\n } catch (err) {\n return this.renderFailImpl(err);\n }\n }\n constructor(...args){\n super(...args), _define_property(this, \"context\", void 0);\n }\n}\nexport { PureSpzaComponent as default };\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { Text, Icon, Label } from '@fluentui/react';\nimport classNames from 'classnames';\nimport { NeutralColors } from '@fluentui/theme';\nexport const RatingsInfo = ({ avgRating, ratingsCount, key, title, context, textSize, starClass, ratingClass })=>{\n const styles = {\n root: [\n 'detailsRatingStar',\n textSize ? {\n fontSize: 13,\n margin: '0 4px 0 0'\n } : {\n fontSize: 16,\n margin: '0 4px 3px 0'\n },\n !ratingsCount && {\n color: NeutralColors.gray90\n }\n ]\n };\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"ratingInfoSection\",\n children: [\n /*#__PURE__*/ _jsx(Icon, {\n iconName: ratingsCount ? 'FavoriteStarFill' : 'FavoriteStar',\n title: title || context.loc('RatingSummary_Title', 'Marketplace ratings'),\n styles: styles\n }),\n /*#__PURE__*/ _jsx(Label, {\n className: classNames([\n starClass || 'detailsRatingAvgNumOfStars'\n ]),\n children: avgRating.toFixed(1)\n }),\n /*#__PURE__*/ _jsxs(Text, {\n className: classNames([\n ratingClass || 'detailsRatingNumOfRatingText'\n ]),\n variant: textSize || 'medium',\n children: [\n \"(\",\n ratingsCount,\n \" \",\n title,\n \")\"\n ]\n })\n ]\n }, `${key}DetailsRating`);\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { ScreenWidthMinLarge, ScreenWidthMinXLarge, ScreenWidthMinXXLarge, Text, mergeStyleSets } from '@fluentui/react';\nimport Slider from 'react-slick';\nimport SpzaComponent from './spzaComponent';\nimport { urlPush } from 'routerHistory';\nimport { InternalLink } from './internalLink';\nimport { getNpsModule } from '@appsource/utils/nps';\nimport classNames from 'classnames';\nimport { TelemetryImage } from '@shared/components/telemetryImage';\nconst contentStyles = mergeStyleSets({\n ribbonHeaderImage: {\n verticalAlign: 'top',\n display: 'inline-block',\n marginLeft: '8px'\n }\n});\nfunction CrouselNextArrow(props) {\n const { onClick } = props;\n return /*#__PURE__*/ _jsx(\"button\", {\n className: classNames({\n crouselArrow: true,\n crouselArrowRight: true,\n 'icon-arrow-right-32': true\n }),\n onClick: onClick,\n \"aria-label\": \"Next page\"\n });\n}\nfunction CrouselPrevArrow(props) {\n const { onClick } = props;\n return /*#__PURE__*/ _jsx(\"button\", {\n className: classNames({\n crouselArrow: true,\n crouselArrowLeft: true,\n 'icon-arrow-left-32': true\n }),\n onClick: onClick,\n \"aria-label\": \"Previous page\"\n });\n}\nclass Ribbon extends SpzaComponent {\n componentDidMount() {\n window.addEventListener('resize', this.hideAriaHiddenTiles);\n }\n componentWillUnmount() {\n window.removeEventListener('resize', this.hideAriaHiddenTiles);\n }\n componentDidUpdate() {\n this.hideAriaHiddenTiles();\n }\n hideAriaHiddenTiles() {\n // Fix https://github.com/akiran/react-slick/issues/1535\n Array.from(document.querySelectorAll('.slick-slide')).forEach((slide)=>{\n var _slide_classList;\n if ((_slide_classList = slide.classList) === null || _slide_classList === void 0 ? void 0 : _slide_classList.contains('slick-active')) {\n slide.style.visibility = 'visible';\n } else {\n slide.style.visibility = 'hidden';\n }\n });\n }\n visibleAriaHiddenTiles() {\n Array.from(document.querySelectorAll('.slick-slide')).forEach((slide)=>{\n slide.style.visibility = 'visible';\n });\n }\n onRibbonButtonClick() {\n var _getNpsModule;\n if (this.props.onClick) {\n this.props.onClick();\n } else {\n urlPush(this.props.seeMoreUrl, true);\n }\n (_getNpsModule = getNpsModule()) === null || _getNpsModule === void 0 ? void 0 : _getNpsModule.increaseActionsCounter('seeAllActionsCount');\n }\n renderRibbonButton() {\n return this.props.seeMoreUrl && /*#__PURE__*/ _jsxs(InternalLink, {\n onClick: ()=>this.onRibbonButtonClick(),\n className: \"ribbonHeaderButton\",\n href: this.props.seeMoreUrl,\n accEnabled: true,\n \"aria-label\": `see all for ${this.props.title}`,\n children: [\n this.props.seeMoreText,\n this.props.isSeeMoreButton && /*#__PURE__*/ _jsx(Text, {\n variant: \"medium\",\n className: \"c-glyph\"\n })\n ]\n });\n }\n renderCarouselTiles() {\n const { children } = this.props;\n const childrenCount = React.Children.count(children);\n const settings = {\n speed: 500,\n slidesToShow: 4,\n // Critical for dealing with a bug in react-slick which caused to double elements when infinite is true and slidesToShow is less than children count - https://github.com/akiran/react-slick/issues/1171\n infinite: childrenCount > 4,\n slidesToScroll: 1,\n swipeToSlide: false,\n responsive: [\n {\n breakpoint: ScreenWidthMinXXLarge,\n settings: {\n slidesToShow: 3,\n infinite: childrenCount > 3\n }\n },\n {\n breakpoint: ScreenWidthMinXLarge,\n settings: {\n slidesToShow: 2,\n infinite: childrenCount > 2\n }\n },\n {\n breakpoint: ScreenWidthMinLarge,\n settings: {\n slidesToShow: 1,\n infinite: childrenCount > 1\n }\n }\n ],\n nextArrow: /*#__PURE__*/ _jsx(CrouselNextArrow, {}),\n prevArrow: /*#__PURE__*/ _jsx(CrouselPrevArrow, {}),\n beforeChange: ()=>this.visibleAriaHiddenTiles(),\n afterChange: ()=>this.hideAriaHiddenTiles()\n };\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"ribbonSlider\",\n children: /*#__PURE__*/ _jsx(Slider, _object_spread_props(_object_spread({}, settings), {\n children: this.props.children\n }))\n });\n }\n renderTiles() {\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"ribbonTiles\",\n children: this.props.carousel ? this.renderCarouselTiles() : this.props.children\n });\n }\n renderHeader() {\n const { imgSource, title, subHeader } = this.props;\n return title ? /*#__PURE__*/ _jsxs(\"div\", {\n className: \"ribbonHeaderContainer\",\n children: [\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"ribbonHeader\",\n children: [\n /*#__PURE__*/ _jsx(Text, {\n variant: \"large\",\n className: \"ribbonHeaderText\",\n as: 'h2',\n children: title\n }),\n this.renderRibbonButton(),\n imgSource && /*#__PURE__*/ _jsx(TelemetryImage, {\n className: contentStyles.ribbonHeaderImage,\n src: imgSource\n })\n ]\n }),\n subHeader ? /*#__PURE__*/ _jsx(\"div\", {\n className: \"ribbonSubHeader\",\n children: subHeader\n }) : null\n ]\n }) : null;\n }\n renderImpl() {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: 'ribbon',\n \"aria-label\": `${this.props.title} swimlane`,\n role: \"banner\",\n children: [\n this.renderHeader(),\n this.renderTiles()\n ]\n });\n }\n constructor(...args){\n super(...args), _define_property(this, \"context\", void 0);\n }\n}\nexport { Ribbon as default };\nRibbon.contextTypes = {\n renderErrorModal: PropTypes.func\n};\n","import { deepEqual, isArray } from './objectUtils';\nimport { Constants } from './constants';\n/**\n * get option index\n *\n * get option index by comparing with option to-find by value, instead of reference\n *\n * NOTE:\n * Always use this function to get option index,\n * finds a match by comparing two options are deep equal\n *\n * @param options: array of options\n * @param optionToFind: option to find in array of options\n */ export function getOptionIndex(options, optionToFind) {\n let optionIndex = -1;\n if (!isArray(options) || !optionToFind) {\n return optionIndex;\n }\n options.some((option, index)=>{\n const match = deepEqual(option, optionToFind);\n if (match) {\n optionIndex = index;\n }\n return match;\n });\n return optionIndex;\n}\n// for search input\nexport function getFilteredOptions(options, optionToFind) {\n let res = options;\n if (optionToFind.length) {\n res = res.filter((o)=>o.text.toLowerCase().indexOf(optionToFind.toLowerCase()) !== -1);\n }\n return res;\n}\nexport function getContainerClassName(className) {\n return `c-select-menu richTextDropDown outline-focus ${className || ''}`;\n}\nexport function getContainerAriaLabel(dropdownLabel) {\n return dropdownLabel || '';\n}\nexport const CONTAINER_ROLE = 'button';\nexport function getOptionClassName(option, highLightOption) {\n const highlightClassName = isOptionSelected(option, highLightOption) ? 'highlight' : '';\n return `c-menu-item ${highlightClassName}`;\n}\nexport function isOptionSelected(option, highLightOption) {\n return deepEqual(highLightOption, option, true);\n}\nexport function isHoverEvent(eventType) {\n return eventType === Constants.EventType.MouseEnter || eventType === Constants.EventType.MouseLeave || eventType === Constants.EventType.ReactMouseEnter || eventType === Constants.EventType.ReactMouseLeave;\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { SearchBox } from '@fluentui/react';\nimport SpzaComponent from './spzaComponent';\nimport { Constants } from './../utils/constants';\nimport { deepEqual } from './../utils/objectUtils';\nimport { getOptionIndex, getContainerAriaLabel, getContainerClassName, getOptionClassName, CONTAINER_ROLE, isHoverEvent, getFilteredOptions, isOptionSelected } from './../utils/richTextDropDownUtils';\nimport classNames from 'classnames';\nexport class RichTextDropDown extends SpzaComponent {\n renderValueMethod(item) {\n if (this.props.renderValueHandle) {\n return this.props.renderValueHandle(item);\n }\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"item\",\n children: /*#__PURE__*/ _jsx(\"span\", {\n className: \"text-item\",\n children: item.text\n })\n });\n }\n renderOptionMethod(item) {\n if (this.props.renderOptionHandle) {\n return this.props.renderOptionHandle(item);\n }\n if (this.isSearchEnabled() && this.state.searchValue.length) {\n const searchValue = this.state.searchValue;\n const countryName = item.text;\n const start = countryName.toLowerCase().indexOf(searchValue.toLowerCase());\n const end = start + searchValue.length - 1;\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"item\",\n children: [\n countryName.substr(0, start),\n /*#__PURE__*/ _jsx(\"b\", {\n className: \"item-search\",\n children: countryName.substr(start, end - start + 1)\n }),\n countryName.substr(end + 1)\n ]\n });\n }\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"item\",\n children: item.text\n });\n }\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (!deepEqual(this.props.options, nextProps.options) || !deepEqual(this.props.value, nextProps.value)) {\n this.setState({\n value: nextProps.value\n });\n }\n }\n openDropDown(eventType) {\n var _this_dropdownElement;\n (_this_dropdownElement = this.dropdownElement) === null || _this_dropdownElement === void 0 ? void 0 : _this_dropdownElement.classList.remove('outline-focus');\n if (this.shouldSkipEventHandle(eventType)) {\n return;\n }\n this.setState({\n isOpen: true\n }, ()=>{\n if (this.isHoverEnabled()) {\n var _this_dropdownElement;\n (_this_dropdownElement = this.dropdownElement) === null || _this_dropdownElement === void 0 ? void 0 : _this_dropdownElement.focus();\n }\n if (this.isSearchEnabled() && this.searchBoxElement) {\n this.searchBoxElement.focus();\n }\n });\n if (this.state.value) {\n this.setState({\n highLightOption: this.state.value\n });\n }\n // reset to true everytime dropdown opens\n this.shouldCloseOnBlur = true;\n }\n closeDropDown(eventType) {\n var _this_dropdownElement;\n if (this.shouldSkipEventHandle(eventType)) {\n return;\n }\n (_this_dropdownElement = this.dropdownElement) === null || _this_dropdownElement === void 0 ? void 0 : _this_dropdownElement.setAttribute('aria-expanded', 'false');\n this.setState({\n isOpen: false,\n searchValue: ''\n });\n this.removeTabIndex();\n this.lastFocusableIndex = -1;\n this.lastFocusableGroupIndex = -1;\n // reset to true everytime dropdown closes\n this.shouldCloseOnBlur = true;\n }\n onBlur(eventType, event) {\n var _this_dropdownElement;\n (_this_dropdownElement = this.dropdownElement) === null || _this_dropdownElement === void 0 ? void 0 : _this_dropdownElement.classList.add('outline-focus');\n // after change onMouseDown to onClick for menu item need not to close dropdown.\n // header menu items have tabindex and this onBlur method fires before item onClick handler\n if (this.isHoverEnabled() || this.isEventOnSearch(event)) {\n return;\n }\n if (this.shouldCloseOnBlur) {\n this.closeDropDown(eventType);\n if (this.props.onBlurHandle) {\n this.props.onBlurHandle();\n }\n }\n // reset to true everytime dropdown loses focues\n this.shouldCloseOnBlur = true;\n }\n isHoverEnabled() {\n return this.props.hoverEnabled && this.userInteractionType === Constants.UserInteractionType.Mouse || !this.props.isDisabled;\n }\n isSearchEnabled() {\n return (this.props.searchEnabled || false) && !this.props.isDisabled;\n }\n isEventOnSearch(event) {\n if (event.type === Constants.EventType.Click) {\n return this.isSearchEnabled() && event.target.tagName === Constants.HTMLElements.INPUT;\n } else if (event.type === Constants.EventType.Blur) {\n return this.isSearchEnabled() && event.currentTarget.contains(event.relatedTarget) && (event.relatedTarget.tagName === Constants.HTMLElements.INPUT || Constants.HTMLElements.BUTTON);\n } else {\n return false;\n }\n }\n shouldSkipEventHandle(eventType) {\n return isHoverEvent(eventType) && !this.isHoverEnabled();\n }\n removeTabIndex() {\n if (this.lastFocusableIndex !== -1 && this.lastFocusableGroupIndex !== -1) {\n const previousMenu = document.getElementsByClassName('richTextDropDown')[this.lastFocusableGroupIndex];\n if (previousMenu) {\n const previousMenuItem = previousMenu.getElementsByClassName('c-menu-item')[this.lastFocusableIndex];\n if (previousMenuItem) {\n previousMenuItem.removeAttribute('tabIndex');\n }\n }\n }\n }\n resetFocus(targetIndex) {\n this.removeTabIndex();\n const richMenus = document.getElementsByClassName('richTextDropDown');\n if (richMenus) {\n for(let i = 0; i < richMenus.length; i++){\n if (richMenus[`${i}`].getAttribute('aria-expanded') === 'true') {\n this.lastFocusableGroupIndex = i;\n break;\n }\n }\n }\n this.lastFocusableIndex = targetIndex;\n const currentMenu = document.getElementsByClassName('richTextDropDown')[this.lastFocusableGroupIndex];\n if (currentMenu) {\n const currentMenuItem = currentMenu.getElementsByClassName('c-menu-item')[`${targetIndex}`];\n if (currentMenuItem) {\n currentMenuItem.setAttribute('tabIndex', '0');\n currentMenuItem.focus();\n }\n }\n }\n onKeyDown(event, eventType) {\n let isEventDefaultEnabled = false;\n const options = this.props.options;\n const optionLength = this.props.options.length;\n if (this.props.isDisabled) return;\n switch(event.keyCode){\n case Constants.SystemKey.Up:\n if (event.altKey) {\n this.toggleOpen(eventType);\n } else {\n if (!this.state.isOpen) {\n let index = getOptionIndex(options, this.state.value);\n index = index >= 0 ? index : 0;\n const prevItemIndex = (index - 1 + optionLength) % optionLength;\n const value = options[`${prevItemIndex}`];\n this.setState({\n value: value\n });\n this.props.onChangeHandle(value, options);\n } else {\n this.shouldCloseOnBlur = false;\n if (!this.state.highLightOption) {\n this.setState({\n highLightOption: options[optionLength - 1]\n });\n } else {\n const itemIndex = getOptionIndex(options, this.state.highLightOption);\n const prevItemIndex = (itemIndex - 1 + optionLength) % optionLength;\n this.setState({\n highLightOption: options[`${prevItemIndex}`]\n });\n this.resetFocus(prevItemIndex);\n }\n }\n }\n break;\n case Constants.SystemKey.Down:\n if (event.altKey) {\n this.toggleOpen(eventType);\n } else {\n if (!this.state.isOpen) {\n let index = getOptionIndex(options, this.state.value);\n index = index >= 0 ? index : 0;\n const nextItemIndex = (index + 1) % optionLength;\n const value = options[`${nextItemIndex}`];\n this.setState({\n value: value\n });\n this.props.onChangeHandle(value, options);\n } else {\n this.shouldCloseOnBlur = false;\n if (!this.state.highLightOption) {\n this.setState({\n highLightOption: options[0]\n });\n } else {\n const itemIndex = getOptionIndex(options, this.state.highLightOption);\n const nextItemIndex = (itemIndex + 1) % optionLength;\n this.setState({\n highLightOption: options[`${nextItemIndex}`]\n });\n this.resetFocus(nextItemIndex);\n }\n }\n }\n break;\n case Constants.SystemKey.Enter:\n case Constants.SystemKey.Space:\n this.toggleOpen(eventType);\n break;\n case Constants.SystemKey.Esc:\n var _this_dropdownElement;\n (_this_dropdownElement = this.dropdownElement) === null || _this_dropdownElement === void 0 ? void 0 : _this_dropdownElement.focus();\n this.closeDropDown(eventType);\n break;\n case Constants.SystemKey.Tab:\n var _this_dropdownElement1;\n isEventDefaultEnabled = true;\n (_this_dropdownElement1 = this.dropdownElement) === null || _this_dropdownElement1 === void 0 ? void 0 : _this_dropdownElement1.focus();\n this.closeDropDown(eventType);\n break;\n }\n if (!isEventDefaultEnabled && !this.isSearchEnabled()) {\n event.preventDefault();\n }\n }\n onDropdownClicked(eventType, event) {\n if (this.state.isOpen && !this.isEventOnSearch(event)) {\n this.closeDropDown(eventType);\n } else if (!this.props.isDisabled) {\n this.openDropDown(eventType);\n }\n if (eventType === Constants.EventType.Click) {\n this.userInteractionType = Constants.UserInteractionType.Mouse;\n }\n }\n onOptionClicked(option, eventType) {\n this.setState({\n value: option\n });\n this.props.onChangeHandle(option, this.props.options);\n this.closeDropDown(eventType);\n }\n toggleOpen(eventType) {\n if (!this.state.isOpen) {\n this.openDropDown(eventType);\n } else {\n var _this_dropdownElement;\n if (this.state.highLightOption) {\n this.onOptionClicked(this.state.highLightOption, eventType);\n }\n (_this_dropdownElement = this.dropdownElement) === null || _this_dropdownElement === void 0 ? void 0 : _this_dropdownElement.focus();\n this.closeDropDown(eventType);\n }\n }\n sortOptions(options) {\n const sortedOptions = options.sort((a, b)=>{\n const titleA = a.title.toUpperCase();\n const titleB = b.title.toUpperCase();\n return titleA < titleB ? 1 : titleA > titleB ? -1 : 0;\n });\n return sortedOptions;\n }\n renderImpl() {\n const labelPrefix = this.props.dropdownLabel || (this.dropdownElement && this.dropdownElement.innerText ? this.dropdownElement.innerText.split('\\n')[0].trim() : '');\n let options = !this.isSearchEnabled() ? this.props.options : getFilteredOptions(this.props.options, this.state.searchValue);\n options = this.props.isSorted ? this.sortOptions(options) : options;\n const dropdownClass = classNames({\n [getContainerClassName(this.props.className)]: true,\n disabledDropdown: this.props.isDisabled\n });\n const selectedOption = this.state.value ? this.state.value.text + ' selected' : this.context.loc('Menu_Aria_Label', 'Menu');\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: dropdownClass,\n onBlur: (event)=>this.onBlur(event.type, event),\n onTouchStart: ()=>this.userInteractionType = Constants.UserInteractionType.Touch,\n onClick: (event)=>this.onDropdownClicked(event.type, event),\n onMouseEnter: (event)=>this.openDropDown(event.type),\n onMouseLeave: (event)=>this.closeDropDown(event.type),\n onKeyDown: (event)=>this.onKeyDown(event, event.type),\n suppressContentEditableWarning: true,\n tabIndex: 0,\n \"aria-expanded\": this.state.isOpen,\n \"aria-label\": getContainerAriaLabel(labelPrefix) + ' ' + selectedOption,\n ref: (element)=>this.dropdownElement = element,\n role: CONTAINER_ROLE,\n \"aria-haspopup\": \"listbox\",\n children: [\n !this.state.isOpen || this.state.isOpen && !this.isSearchEnabled() ? /*#__PURE__*/ _jsxs(\"a\", {\n className: \"valueBox\",\n \"aria-hidden\": true,\n children: [\n this.renderValueMethod(this.state.value),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"toggle\",\n \"aria-hidden\": true,\n children: /*#__PURE__*/ _jsx(\"span\", {\n className: \"c-glyph\"\n })\n })\n ]\n }) : /*#__PURE__*/ _jsx(SearchBox, {\n placeholder: this.context.loc('Search_Placeholder'),\n value: this.state.searchValue,\n onEscape: (event)=>this.closeDropDown(event.type),\n onClear: ()=>{\n this.setState({\n searchValue: ''\n });\n },\n onChange: (event, newValue)=>this.setState({\n searchValue: newValue\n }),\n onSearch: (newValue)=>this.setState({\n searchValue: newValue\n }),\n disableAnimation: true,\n disabled: this.props.isDisabled,\n componentRef: (element)=>this.searchBoxElement = element\n }),\n this.state.isOpen && /*#__PURE__*/ _jsx(\"ul\", {\n className: \"c-menu\",\n role: \"listbox\",\n children: options.map((option, index)=>/*#__PURE__*/ _jsxs(\"li\", {\n role: \"option\",\n className: getOptionClassName(option, this.state.highLightOption),\n onClick: (event)=>this.onOptionClicked(option, event.type),\n onTouchEnd: (event)=>this.onOptionClicked(option, event.type),\n onMouseEnter: ()=>this.setState({\n highLightOption: option\n }),\n \"aria-selected\": isOptionSelected(option, this.state.highLightOption),\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"value\",\n children: this.renderOptionMethod(option)\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"placeholder\"\n })\n ]\n }, index))\n })\n ]\n });\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"context\", void 0), _define_property(this, \"dropdownElement\", void 0), _define_property(this, \"searchBoxElement\", void 0), _define_property(this, \"lastFocusableIndex\", -1), _define_property(this, \"lastFocusableGroupIndex\", -1), _define_property(this, \"shouldCloseOnBlur\", void 0), _define_property(this, \"userInteractionType\", Constants.UserInteractionType.Mouse);\n this.state = {\n value: this.props.value,\n searchValue: ''\n };\n this.renderValueMethod = this.renderValueMethod.bind(this);\n this.renderOptionMethod = this.renderOptionMethod.bind(this);\n }\n}\nRichTextDropDown.contextTypes = {\n loc: PropTypes.func,\n renderErrorModal: PropTypes.func\n};\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport DOMPurify from 'dompurify';\nimport React, { useMemo } from 'react';\nimport { JSDOM } from 'jsdom';\nlet DOMPurifyServer;\nif (!__CLIENT__) {\n const { window } = new JSDOM('');\n DOMPurifyServer = DOMPurify(window);\n}\nexport const SafeHtmlWrapper = ({ html, className })=>{\n const sanitize = __CLIENT__ ? DOMPurify.sanitize : DOMPurifyServer.sanitize;\n const sanitizedHtml = useMemo(()=>sanitize(html, {\n ADD_ATTR: [\n 'target'\n ]\n }), [\n html\n ]);\n // eslint-disable-next-line react/no-danger\n return /*#__PURE__*/ _jsx(\"div\", {\n className: className,\n dangerouslySetInnerHTML: {\n __html: sanitizedHtml\n }\n });\n};\n","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport React, { useState } from 'react';\nimport * as PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { useLocation, useNavigate } from 'react-router-dom';\nimport { Dropdown, mergeStyleSets } from '@fluentui/react';\nimport { Constants } from '@shared/utils/constants';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { windowScrollToTop } from '@shared/utils/filterHelpers';\nimport { logger } from '@src/logger';\nimport { BusinessTelemetry } from '@shared/utils/businessConstants';\nimport sortByImage from '@shared/images/sortByIcon.svg';\nconst DataBi = BusinessTelemetry.dataBi;\nconst $backgroundColor = '#ffffff';\nconst $primaryText = '#323130';\nconst contentStyles = mergeStyleSets({\n dropdownWidth: {\n minWidth: '150px'\n },\n SearchSortBy: {\n display: 'flex',\n fontSize: '14px',\n lineHeight: '20px',\n marginTop: 'auto',\n paddingBottom: '4px',\n '& .spza-sub-filter-dropdown': {\n '& .valueBox': {\n outline: 'none',\n width: 'max-content',\n border: 'none',\n '& .item': {\n padding: '3px 7px 3px 3px'\n },\n '.item > span': {\n width: 'max-content'\n },\n '.toggle': {\n width: '24px'\n }\n }\n }\n },\n sortByIconAndText: {\n color: {\n $primaryText\n },\n margin: '0px 5px 0px 0px',\n backgroundSize: '16px 16px',\n padding: '5px 0px 0px 24px',\n backgroundRepeat: 'no-repeat',\n backgroundPosition: 'left',\n backgroundColor: {\n $backgroundColor\n },\n backgroundImage: `url(${sortByImage})`,\n '& .ms-Dropdown:not(.is-open)': {\n '& .ms-Dropdown-title': {\n borderWidth: '0px'\n }\n }\n }\n});\nexport const SortingDropdown = ({ defaultKey, route, hide }, context)=>{\n const [isOpen, setIsOpen] = useState(false);\n const [searchByKey, setSearchByKey] = useState(defaultKey);\n const isSortingSupported = route.name !== Constants.Views.cloudsIndustryGallery;\n const location = useLocation();\n const navigate = useNavigate();\n const getSortingOptions = ()=>{\n let options = [\n {\n text: context.loc('AppsGlobalFilters_SearchSortingOptions_BestMatch', 'Best match'),\n key: Constants.SearchSortingOption.BestMatch\n },\n {\n text: context.loc('AppsGlobalFilters_SearchSortingOptions_Popularity', 'Most viewed'),\n key: Constants.SearchSortingOption.Popularity\n }\n ];\n const areNewSortsSupported = route.name === Constants.Views.appGallery;\n if (areNewSortsSupported) {\n options = [\n ...options,\n {\n text: context.loc('AppsGlobalFilters_SearchSortingOptions_Rating', 'Average rating'),\n key: Constants.SearchSortingOption.RatingAverage\n },\n {\n text: context.loc('AppsGlobalFilters_SearchSortingOptions_LastUpdated', 'Recent version update '),\n key: Constants.SearchSortingOption.RecentlyUpdated\n }\n ];\n }\n return options;\n };\n const options = getSortingOptions();\n const onSortingChangeHandle = (option)=>{\n const payload = {\n page: location.pathname,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.SortSearchResults,\n details: option.key\n };\n SpzaInstrumentService.getProvider().probe(Constants.Telemetry.ProbeName.LogInfo, payload);\n logger.info(payload.details, payload);\n const sortingLink = context.buildHref(route, null, {\n sortBy: option.key === Constants.SearchSortingOption.BestMatch ? null : option.key\n });\n // Set the state for display to update immediately (testability)\n setSearchByKey(option.key);\n // Navigate to the URL for functionality\n navigate(sortingLink);\n };\n const onSortingClickHandle = ()=>{\n const payload = {\n page: location.pathname,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.SortSearchOpened\n };\n SpzaInstrumentService.getProvider().probe(Constants.Telemetry.ProbeName.LogInfo, payload);\n logger.info('', payload);\n if (!isOpen) {\n setIsOpen((isOpen)=>!isOpen);\n }\n };\n const detectKeyboardClick = ({ event: { key } })=>{\n const currentOptionsIndex = options.findIndex((option)=>option.key === searchByKey);\n if (key === Constants.SystemKeyAsString.Enter || key === Constants.SystemKeyAsString.Space) {\n onSortingChangeHandle(options[`${currentOptionsIndex}`]);\n }\n if (key === Constants.SystemKeyAsString.ArrowUp) {\n const nextIdx = currentOptionsIndex - 1 <= 0 ? 0 : currentOptionsIndex - 1;\n setSearchByKey(options[`${nextIdx}`].key);\n }\n if (key === Constants.SystemKeyAsString.ArrowDown) {\n const nextIdx = currentOptionsIndex + 1 >= options.length ? options.length : currentOptionsIndex + 1;\n setSearchByKey(options[`${nextIdx}`].key);\n }\n };\n const onDropdownChange = ({ option })=>{\n onSortingChangeHandle(option);\n windowScrollToTop();\n };\n const activeSortByOption = options.filter((option)=>option.key === searchByKey)[0] || options[0];\n const sortingDropdownClass = classNames({\n [contentStyles.dropdownWidth]: isOpen\n });\n return /*#__PURE__*/ _jsx(_Fragment, {\n children: !hide && isSortingSupported && /*#__PURE__*/ _jsxs(\"div\", {\n className: contentStyles.SearchSortBy,\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: contentStyles.sortByIconAndText,\n children: context.loc('AppsGlobalFilters_SearchSortingOptions_Title', 'Sort By:')\n }),\n /*#__PURE__*/ _jsx(Dropdown, {\n \"data-bi-id\": DataBi.sortingDropdownId,\n \"data-bi-name\": DataBi.sortingDropdownName,\n selectedKey: activeSortByOption.key,\n options: options,\n onKeyDown: (event)=>detectKeyboardClick({\n event\n }),\n ariaLabel: context.loc('AppsGlobalFilters_SearchSortingOptions_AriaLabel', 'Sort by'),\n className: sortingDropdownClass,\n onChange: (_, option)=>onDropdownChange({\n option\n }),\n onClick: onSortingClickHandle,\n onDismiss: ()=>{\n setIsOpen((isOpen)=>!isOpen);\n },\n selectedKeys: [\n activeSortByOption.key.toString()\n ]\n })\n ]\n })\n });\n};\nSortingDropdown.contextTypes = {\n loc: PropTypes.func,\n buildHref: PropTypes.func\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport * as React from 'react';\nimport { logClientError } from '../utils/appUtils';\nclass SpzaComponent extends React.Component {\n renderImpl() {\n // should never be called\n throw new Error('SpzaComponent renderImpl method should never be called!\\nMake sure you are implementing renderImpl in your Component');\n }\n renderFailImpl(err) {\n // rendering must _never_ let an error escape. This puts react in a bad state and\n // current versions (15.x) cannot deal with that.\n logClientError(err, 'client side error: [From spzaComponent] ');\n // no longer we render the error modal from here the main client hook up handles all errors.\n throw err;\n }\n render() {\n try {\n return this.renderImpl();\n } catch (err) {\n return this.renderFailImpl(err);\n }\n }\n constructor(...args){\n super(...args), _define_property(this, \"context\", void 0);\n }\n}\nexport { SpzaComponent as default };\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport SpzaComponent from './spzaComponent';\n// eslint-disable-next-line import/named\nimport { Text } from '@fluentui/react';\nimport * as React from 'react';\nimport { Tab, Tabs } from './tabs';\nexport class StickyCard extends SpzaComponent {\n static handleScroll(curWindow, appearUnderElementId) {\n const elementToAppearAfter = document.getElementById(appearUnderElementId);\n if (curWindow && elementToAppearAfter && elementToAppearAfter.offsetTop) {\n const tabsYOffset = elementToAppearAfter.offsetTop + 43;\n if (curWindow.pageYOffset > tabsYOffset) {\n return true;\n }\n return false;\n }\n }\n renderImpl() {\n const titleStyles = {\n root: {\n marginLeft: 8,\n fontWeight: 600,\n lineHeight: 20\n }\n };\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"stickyCard\",\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: \"stickyCardContainer\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"stickyCardSubContainer\",\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: \"stickyCardLeft\",\n children: [\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"stickCardPublisher\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"stickyCardIcon\",\n children: /*#__PURE__*/ _jsx(\"div\", {\n children: /*#__PURE__*/ _jsx(\"img\", {\n className: \"StickyIconImg\",\n src: this.props.logoURL,\n alt: this.props.title + ' icon',\n onError: (e)=>e && e.target && e.target.style ? e.target.style.display = 'none' : null\n })\n })\n }),\n /*#__PURE__*/ _jsx(Text, {\n variant: \"medium\",\n block: true,\n nowrap: true,\n styles: titleStyles,\n children: this.props.title\n })\n ]\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"stickyCardTabs\",\n children: /*#__PURE__*/ _jsx(Tabs, {\n defaultTab: this.props.tabsProps.defaultTab,\n ownerType: this.props.tabsProps.ownerType,\n ownerId: this.props.tabsProps.ownerId,\n changeTabCallback: this.props.tabsProps.changeTabCallback,\n getTabHref: this.props.tabsProps.getTabHref,\n children: this.props.tabsChilds.map((tabChild, index)=>/*#__PURE__*/ _jsx(Tab, {\n title: tabChild.title,\n name: tabChild.name,\n textBadge: tabChild.textBadge,\n children: /*#__PURE__*/ _jsx(\"div\", {})\n }, index))\n })\n })\n ]\n })\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: \"stickyCardRight\",\n children: /*#__PURE__*/ _jsx(\"div\", {\n className: \"stickyCardSubContainer\",\n children: this.props.children\n })\n })\n })\n ]\n })\n });\n }\n constructor(...args){\n super(...args), _define_property(this, \"context\", void 0);\n }\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from './spzaComponent';\nimport * as DetailUtils from '@shared/utils/detailUtils';\nimport { Constants } from '@shared/utils/constants';\nimport { mergeStyles } from '@fluentui/react';\nimport classNames from 'classnames';\nimport { Link } from 'react-router-dom';\nexport const TAB_SELECTED = 'tabSelected';\nexport const DEFAULT_TAB = 'defaultTab';\nexport const SELECTED_TAB_QUERY = `.${DEFAULT_TAB}.${TAB_SELECTED}`;\nexport class Tab extends SpzaComponent {\n renderImpl() {\n return this.props.children;\n }\n}\nconst tabsClass = mergeStyles({\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'center'\n});\nexport var TabsTheme = /*#__PURE__*/ function(TabsTheme) {\n TabsTheme[TabsTheme[\"gray\"] = 0] = \"gray\";\n return TabsTheme;\n}({});\nexport class Tabs extends SpzaComponent {\n changeTabWithName(e, name) {\n e.preventDefault();\n const detailsObject = {\n tab: name\n };\n DetailUtils.generateClickPayloadAndLogTelemetry(this.props.ownerType, this.props.ownerId, Constants.Telemetry.ActionModifier.Tab, detailsObject);\n this.props.changeTabCallback(name);\n }\n getCurrentTabIndex() {\n const tabsList = this.getNonNullChildren();\n const length = tabsList.length;\n for(let index = 0; index < length; index++){\n const tab = tabsList[`${index}`].valueOf();\n if (tab.props.name === this.props.defaultTab) {\n return index;\n }\n }\n return 0;\n }\n getHeaderElement(currentTabIndex) {\n const { getTabHref } = this.props;\n return function(child, index) {\n var _child_props;\n const classes = classNames({\n [TAB_SELECTED]: currentTabIndex === index,\n [DEFAULT_TAB]: true\n });\n if (child === null || child === void 0 ? void 0 : (_child_props = child.props) === null || _child_props === void 0 ? void 0 : _child_props.children) {\n const otherProps = child.props.otherProps || {};\n const { name, title, textBadge } = child.props;\n return /*#__PURE__*/ _jsx(Link, _object_spread_props(_object_spread({\n to: getTabHref(name),\n className: classes,\n role: \"tab\",\n \"aria-selected\": currentTabIndex === index,\n onClick: (e)=>{\n this.changeTabWithName(e, name);\n }\n }, otherProps), {\n children: textBadge ? /*#__PURE__*/ _jsxs(\"label\", {\n children: [\n title,\n \" \",\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"tabTextBadge\",\n children: textBadge\n })\n ]\n }) : /*#__PURE__*/ _jsx(\"label\", {\n children: title\n })\n }), 'tab' + index);\n } else {\n return null;\n }\n };\n }\n getNonNullChildren() {\n return React.Children.toArray(this.props.children);\n }\n // Returns the number of non-null children.\n getNonNullChildrenCount() {\n return this.getNonNullChildren().length;\n }\n shouldRenderHeader() {\n return this.getNonNullChildrenCount() > 1;\n }\n renderHeaders(currentTabIndex) {\n // we do not render a header if there's only one tab\n if (!this.shouldRenderHeader()) {\n return null;\n } else {\n const createHeaderElement = this.getHeaderElement(currentTabIndex);\n const tabClass = classNames({\n [tabsClass]: this.props.centerize\n });\n return /*#__PURE__*/ _jsx(\"div\", {\n className: tabClass,\n children: this.getNonNullChildren().map(createHeaderElement.bind(this))\n });\n }\n }\n renderImpl() {\n const currentTabIndex = this.getCurrentTabIndex();\n const tabContainerClass = 'tabContainer ' + (this.props.theme === 0 ? 'gray' : '');\n return /*#__PURE__*/ _jsxs(_Fragment, {\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: tabContainerClass,\n role: \"tablist\",\n \"aria-busy\": \"true\",\n children: this.renderHeaders(currentTabIndex)\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"tabContent\",\n children: this.getNonNullChildren()[`${currentTabIndex}`]\n })\n ]\n });\n }\n}\nTab.contextTypes = {\n renderErrorModal: PropTypes.func\n};\nTabs.contextTypes = {\n renderErrorModal: PropTypes.func\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport SpzaComponent from './spzaComponent';\nimport { SpzaInstrumentService } from '../services/telemetry/spza/spzaInstrument';\nimport { Constants } from '../utils/constants';\nimport { logger } from '@src/logger';\nimport classNames from 'classnames';\nconst minimumLoatimeForTelemetry = 10000;\nconst processedImageLoadedSrcList = {};\nconst processedImageErrorSrcList = {};\nexport function onImageLoaded(src, startTime) {\n const timeTaken = Date.now() - startTime;\n if (!processedImageLoadedSrcList[`${src}`] && timeTaken > minimumLoatimeForTelemetry) {\n processedImageLoadedSrcList[`${src}`] = true;\n const payload = {\n page: src,\n action: Constants.Telemetry.Action.ImageLoad,\n actionModifier: Constants.Telemetry.ActionModifier.End,\n details: `Elapsed time: ${timeTaken} ms`\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n page: payload.page\n });\n }\n}\nexport function onImageErrored(src, startTime) {\n if (!processedImageErrorSrcList[`${src}`]) {\n processedImageErrorSrcList[`${src}`] = true;\n const payload = {\n page: src,\n action: Constants.Telemetry.Action.ImageLoad,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: `Elapsed time: ${Date.now() - startTime} ms`\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.error(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n page: payload.page\n });\n }\n}\nexport class TelemetryImage extends SpzaComponent {\n getAlt(alt, title, isVideo) {\n if (alt) {\n return alt;\n } else if (title) {\n return title + ' image';\n } else if (isVideo) {\n return 'play video';\n } else {\n return 'image';\n }\n }\n componentDidMount() {\n // since componentDidMount is only called at client side after the initial client side rendering\n // is finished which would be consistent with the server side rendering result.\n // then readyForNonInitialRendering is set to true here which would trigger another round of client side rendering.\n this.setState({\n readyForNonInitialRendering: true,\n startTime: Date.now()\n });\n }\n renderImpl() {\n const { title, alt, isVideo, className, src, onError, imgClassName } = this.props;\n const { startTime } = this.state;\n return /*#__PURE__*/ _jsx(\"div\", {\n className: classNames('delayLoadImage', 'telemetry', className),\n children: this.state.readyForNonInitialRendering ? /*#__PURE__*/ _jsx(\"img\", {\n itemProp: this.microTaggingItemPropName,\n src: src,\n alt: this.getAlt(alt, title, isVideo),\n onLoad: ()=>onImageLoaded(src, startTime),\n onError: (event)=>{\n onImageErrored(src, startTime);\n onError === null || onError === void 0 ? void 0 : onError(event);\n },\n \"aria-label\": this.getAlt(alt, title, isVideo),\n className: imgClassName || null\n }) : src\n });\n }\n constructor(props){\n super(props), _define_property(this, \"microTaggingItemPropName\", '');\n const { itemPropName } = this.props;\n this.state = {\n readyForNonInitialRendering: false,\n startTime: 0\n };\n this.microTaggingItemPropName = itemPropName || 'thumbnailUrl';\n }\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { TooltipDelay, TooltipHost } from '@fluentui/react';\nimport { useId } from '@fluentui/react-hooks';\nimport { noop } from 'lodash-es';\nconst Tooltip = ({ children, tooltipHostProps = {}, onTooltipToggle = noop })=>{\n const tooltipId = useId('tooltip');\n const tooltipStyles = {\n content: {\n cursor: 'default'\n }\n };\n const tooltipProps = {\n styles: tooltipStyles\n };\n const calloutProps = {\n gapSpace: 5,\n isBeakVisible: false,\n setInitialFocus: false,\n dismissOnTargetClick: true\n };\n const onTooltipToggleHandle = (isTooltipVisible)=>{\n onTooltipToggle === null || onTooltipToggle === void 0 ? void 0 : onTooltipToggle(isTooltipVisible);\n };\n return /*#__PURE__*/ _jsx(TooltipHost, _object_spread_props(_object_spread({\n id: tooltipId,\n onTooltipToggle: onTooltipToggleHandle,\n delay: TooltipDelay.long,\n closeDelay: 0,\n tooltipProps: tooltipProps,\n calloutProps: calloutProps\n }, tooltipHostProps), {\n children: children\n }));\n};\nexport default Tooltip;\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport * as React from 'react';\nimport { connect } from 'react-redux';\nimport { getTelemetryDetailContentCurrentView, isSaaS, isOfficeSaasApp } from '@shared/utils/appUtils';\nimport { PricingStates, CheckoutSource } from '@shared/Models';\nimport { isAppSource, isEmbed } from '@embed/embedHostUtils';\nimport { getPrimaryProductUrl } from '@shared/utils/datamappingHelpers';\nimport { createSetCheckoutSource } from '@shared/actions/checkoutActions';\nimport { AppTile as AppTileComponent } from '@shared/components/appTile/appTile';\nimport { isMaccUser } from '@shared/utils/userUtils';\nimport { withHydration } from '@shared/hooks/useHydration';\n// If the Addin has a preview offer in his linkedSaas, we dont need to count them. only the non-preview offers\nconst previewOffers = '-preview';\nconst skipPreviewSaaS = (linkedSaas)=>{\n const linkedItemsIds = linkedSaas.map(({ entityId })=>entityId);\n return linkedItemsIds.filter((entityId)=>!entityId.endsWith(previewOffers));\n};\nconst mapStateToProps = (state, ownProps)=>{\n var _ownProps_linkedSaaS;\n const productUrlkey = getPrimaryProductUrl(ownProps.primaryProduct);\n let shouldShowLinkedAddIn = ownProps.shouldShowLinkedAddIn;\n let shouldShowLinkedWebApps = ((_ownProps_linkedSaaS = ownProps.linkedSaaS) === null || _ownProps_linkedSaaS === void 0 ? void 0 : _ownProps_linkedSaaS.length) > 0 && skipPreviewSaaS(ownProps.linkedSaaS).length > 0;\n if (isSaaS(productUrlkey) || isOfficeSaasApp(productUrlkey, ownProps.products)) {\n if ((isAppSource(ownProps.embedHost) || isEmbed(ownProps.embedHost)) && ownProps.linkedAddIns !== undefined && ownProps.linkedAddIns.length > 0) {\n shouldShowLinkedAddIn = true;\n shouldShowLinkedWebApps = false;\n }\n } else if (!(isSaaS(productUrlkey) && isOfficeSaasApp(productUrlkey, ownProps.products)) && shouldShowLinkedWebApps) {\n shouldShowLinkedAddIn = false;\n }\n const { billingCountryCode, correlationId, isEmbedded, currentView, currentGalleryViewIsCurated, isMobile, featureFlags, query, requestId: searchReqId, locale } = state.config;\n const { signedIn, profile, loading } = state.users;\n const { ShowPopularity } = featureFlags;\n const { activeFilters: appsActiveFilters, count: appsCount } = state.apps;\n const { activeFilters: servicesActiveFilters, count: servicesCount } = state.services;\n const managedLicenses = (profile === null || profile === void 0 ? void 0 : profile.managedLicenses) || [];\n const doesTenantHasLicenseForApp = managedLicenses.some((x)=>x.productId === ownProps.bigId);\n const startingPrice = isEmbedded && !(ownProps.licenseManagement && ownProps.licenseManagement.isMicrosoftManaged) ? {\n pricingData: PricingStates.AlwaysAvailable\n } : ownProps.startingPrice;\n return _object_spread_props(_object_spread({}, ownProps), {\n billingCountryCode,\n startingPrice,\n tileDataRequestId: state.apps.tileDataRequestId,\n correlationId,\n isEmbedded,\n signedIn,\n currentView: getTelemetryDetailContentCurrentView(currentView, currentGalleryViewIsCurated),\n isMobile,\n showPopularity: ShowPopularity === 'true',\n uiRole: profile && profile.uiRole,\n shouldShowLinkedAddIn,\n shouldShowLinkedWebApps,\n doesTenantHasLicenseForApp,\n isLoadingUserData: loading,\n searchSortingBy: query.sortBy,\n activeFilters: currentView === 'appGallery' ? appsActiveFilters : servicesActiveFilters,\n count: currentView === 'appGallery' ? appsCount : servicesCount,\n searchReqId,\n locale,\n isMaccUser: isMaccUser(state.users)\n });\n};\nexport const mapDispatchToProps = (dispatch)=>{\n return {\n setTileCheckoutSource: ()=>dispatch(createSetCheckoutSource({\n source: CheckoutSource.Tile\n }))\n };\n};\nexport const AppTile = connect(mapStateToProps, mapDispatchToProps)(withHydration(AppTileComponent));\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from './spzaComponent';\nimport { SpzaInstrumentService } from './../services/telemetry/spza/spzaInstrument';\nimport { Constants } from './../utils/constants';\nimport { getUserFavouriteEntity } from './../utils/userFavouriteUtils';\nimport { getWindow } from '../../shared/services/window';\nimport { ActionButton } from '@fluentui/react';\nimport { CommunicationColors, NeutralColors } from '@fluentui/theme';\nimport { logger } from '@src/logger';\nconst favoriteStarFilled = {\n iconName: 'FavoriteStarFill',\n styles: {\n root: {\n color: NeutralColors.gray130\n }\n }\n};\nconst favoriteStarAdd = {\n iconName: 'AddFavorite',\n styles: {\n root: {\n color: NeutralColors.gray130\n }\n }\n};\nconst favoriteStarFilledHover = {\n iconName: 'FavoriteStarFill',\n styles: {\n root: {\n color: CommunicationColors.primary\n }\n }\n};\nconst favoriteStarAddHover = {\n iconName: 'AddFavorite',\n styles: {\n root: {\n color: CommunicationColors.primary\n }\n }\n};\nexport class UserFavouriteTileButton extends SpzaComponent {\n componentDidMount() {\n this.props.fetchUserFavouriteData();\n }\n componentWillUnmount() {\n this.disposed = true;\n }\n setFavouriteItemModifyComplete() {\n if (!this.disposed) {\n this.setState({\n itemModifyStatus: Constants.UserFavourite.DataItemModifyStatus.Done\n });\n }\n }\n onClickUserFavouriteButton(event) {\n event.preventDefault();\n event.stopPropagation();\n const entityId = this.props.entityId;\n const userFavouriteEntity = getUserFavouriteEntity(this.props.userFavourite, entityId);\n const upsertPayload = {\n applicationType: this.props.entityType,\n applicationId: entityId,\n // plan Id will be updated when savefavourite called\n planId: ''\n };\n // telemetry\n const details = userFavouriteEntity ? {\n action: Constants.Telemetry.Action.Delete,\n userFavouriteInfo: _object_spread({}, userFavouriteEntity)\n } : {\n action: Constants.Telemetry.Action.Upsert,\n userFavouriteInfo: _object_spread({}, upsertPayload)\n };\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.UserFavouriteTileButton,\n details: JSON.stringify(details)\n };\n this.instrument.probe(Constants.Telemetry.ProbeName.LogInfo, payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n // toggle user favourite on entity\n if (userFavouriteEntity) {\n // Delete a favourite\n // save the user action\n // display saved result beforehand\n this.setState({\n itemModifyStatus: Constants.UserFavourite.DataItemModifyStatus.Delete\n });\n // REST DELETE\n this.props.deleteFavourite(userFavouriteEntity.entityGuid, userFavouriteEntity.applicationType)// TO-DO: cannot use .finally() on promise\n .then(()=>{\n this.setFavouriteItemModifyComplete();\n }).catch(()=>{\n this.setFavouriteItemModifyComplete();\n });\n } else {\n // Upsert a favourite\n // save the user action\n // display saved result beforehand\n this.setState({\n itemModifyStatus: Constants.UserFavourite.DataItemModifyStatus.Upsert\n });\n // REST POST\n this.props.savefavourite(entityId, _object_spread({}, upsertPayload), this.props.item)// TO-DO: cannot use .finally() on promise\n .then(()=>{\n this.setFavouriteItemModifyComplete();\n }).catch(()=>{\n this.setFavouriteItemModifyComplete();\n });\n }\n }\n shouldShowSavedStatus(hasUserSavedFavourite) {\n const { itemModifyStatus } = this.state;\n return hasUserSavedFavourite && (itemModifyStatus === Constants.UserFavourite.DataItemModifyStatus.Done || itemModifyStatus === Constants.UserFavourite.DataItemModifyStatus.None) || !hasUserSavedFavourite && itemModifyStatus === Constants.UserFavourite.DataItemModifyStatus.Upsert;\n }\n handleMouseEnter() {\n this.setState({\n isCardHover: true\n });\n }\n handleMouseLeave() {\n this.setState({\n isCardHover: false\n });\n }\n renderImpl() {\n const hasUserSavedFavourite = !!getUserFavouriteEntity(this.props.userFavourite, this.props.entityId);\n const shouldShowSavedStatus = this.shouldShowSavedStatus(hasUserSavedFavourite);\n const title = shouldShowSavedStatus ? this.context.loc('UserFavourite_TileButton_Remove') : this.context.loc('UserFavourite_TileButton_Save');\n return this.props.userInfo.signedIn && /*#__PURE__*/ _jsx(ActionButton, {\n \"data-bi-id\": 'TileAddToFavorites',\n iconProps: hasUserSavedFavourite ? this.state.isCardHover ? favoriteStarFilledHover : favoriteStarFilled : this.state.isCardHover ? favoriteStarAddHover : favoriteStarAdd,\n onClick: this.onClickUserFavouriteButton,\n title: title,\n \"aria-label\": title,\n onMouseEnter: this.handleMouseEnter.bind(this),\n onMouseLeave: this.handleMouseLeave.bind(this)\n });\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"context\", void 0), _define_property(this, \"instrument\", void 0), _define_property(this, \"disposed\", false);\n this.instrument = SpzaInstrumentService.getProvider();\n this.state = {\n // this state property is to fix the flicker when user (un)save an favourite, due to the delay of a REST call to server\n // makes user think (un)save is an immediate action to effect,\n // this is done by changing the classname before the REST call, and reset the classname after REST call\n // in order to change and change it back, we need to record the user action\n itemModifyStatus: Constants.UserFavourite.DataItemModifyStatus.None,\n isCardHover: false\n };\n this.onClickUserFavouriteButton = this.onClickUserFavouriteButton.bind(this);\n }\n}\nUserFavouriteTileButton.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n buildHref: PropTypes.func,\n renderErrorModal: PropTypes.func\n};\n","import * as React from 'react';\nimport { upsertUserFavourite, deleteUserFavourite, fetchUserFavourites } from './../actions/userFavouriteThunkActions';\nimport { UserFavouriteTileButton as UserFavouriteTileButtonComponent } from '@shared/components/userFavouriteTileButton';\nconst { connect } = require('react-redux');\nexport const mapStateToProps = (state, ownProps)=>{\n return {\n userInfo: state.users,\n userFavourite: state.userFavourite,\n entityId: ownProps.entityId,\n entityType: ownProps.entityType,\n item: ownProps.item\n };\n};\nexport const mapDispatchToProps = (dispatch, ownProps)=>{\n return {\n fetchUserFavouriteData: ()=>dispatch(fetchUserFavourites()),\n savefavourite: (entityId, payload, item)=>dispatch(upsertUserFavourite(payload, item, entityId)),\n deleteFavourite: (entityGuid, applicationType)=>dispatch(deleteUserFavourite(entityGuid, applicationType))\n };\n};\nconst UserFavouriteTileButton = connect(mapStateToProps, mapDispatchToProps)(UserFavouriteTileButtonComponent);\nexport default UserFavouriteTileButton;\n","/* eslint-disable react/forbid-dom-props */ import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { Constants } from './../utils/constants';\nimport { generateTileClickPayloadAndLogTelemetry } from './../utils/detailUtils';\nimport { getComponentXYCoordinate, getTileComponentRank } from './../utils/reactUtils';\nimport UserFavouriteTileButton from './../containers/userFavouriteTileButton';\nimport { DefaultButton, Stack, Text, mergeStyleSets } from '@fluentui/react';\nimport { useEffect, useRef } from 'react';\nimport { TelemetryImage } from './telemetryImage';\nimport { getNpsModule } from '@appsource/utils/nps';\nimport ProductsComponent from './products';\nimport { NeutralColors } from '@fluentui/theme';\nimport { getTooltipSilentLogIn } from '@shared/utils/silentLogInUtils';\nimport classNames from 'classnames';\nimport { isOneTimePaymentOffer } from '@shared/utils/onetimepaymentoffers';\nimport { InternalLink } from '@shared/components/internalLink';\nimport { RatingsInfo } from './ratings/ratingsInfo';\nimport { useHydration } from '@shared/hooks/useHydration';\nconst pricingStyle = {\n root: {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n }\n};\nconst contentStyle = mergeStyleSets({\n subText: [\n {\n color: NeutralColors.gray130,\n marginBottom: '5px'\n }\n ],\n startingPriceText: [\n {\n color: NeutralColors.gray160,\n 'font-weight': 600\n }\n ],\n lightText: [\n {\n marginRight: '4px'\n }\n ],\n ctaButton: [\n {\n marginTop: '12px'\n }\n ],\n publisher: [\n {\n height: '48px'\n }\n ],\n linkesButton: [\n {\n background: 'none',\n border: 'none',\n padding: 0\n }\n ],\n tileContent: [\n {\n height: '320px'\n }\n ],\n embedTileContent: [\n {\n height: '380px'\n }\n ]\n});\nexport const TileCTAbutton = ({ ctaData, isLoadingUserData, isEmbedded })=>{\n const [isCTAHover, setIsCTAHover] = React.useState(false);\n const { title, disabled, id, entityId, CtaType, area, view, onClick } = ctaData;\n const button = /*#__PURE__*/ _jsx(DefaultButton, {\n primary: isCTAHover,\n className: contentStyle.ctaButton,\n name: \"button\",\n type: \"submit\",\n text: title,\n disabled: disabled || isLoadingUserData && !isEmbedded,\n \"data-bi-id\": id,\n \"data-bi-name\": entityId,\n \"data-bi-type\": CtaType,\n \"data-bi-area\": area,\n \"data-bi-view\": view,\n onClick: (e)=>{\n e.preventDefault();\n return onClick(e);\n },\n onKeyDown: (e)=>{\n if (e.charCode === Constants.SystemKey.Enter) {\n onClick();\n }\n },\n onMouseEnter: ()=>setIsCTAHover(true),\n onMouseLeave: ()=>setIsCTAHover(false)\n });\n return getTooltipSilentLogIn(button, isLoadingUserData);\n};\nconst TileFooter = ({ isEmbedded, isLoadingUserData, onKeyDown, ctaData, price, popularity, onClick, rating, context, userFavouriteEntityType, id, item })=>{\n return /*#__PURE__*/ _jsxs(Stack, {\n verticalAlign: \"end\",\n className: \"tileFooterBox\",\n tokens: {\n childrenGap: 2\n },\n children: [\n rating && /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(RatingsInfo, {\n avgRating: rating.avgRating,\n ratingsCount: rating.ratingsCount,\n title: rating.text,\n context: context,\n textSize: 'smallPlus'\n }, rating.key)\n }),\n price && /*#__PURE__*/ _jsx(Stack.Item, {\n children: /*#__PURE__*/ _jsx(Stack, {\n horizontal: true,\n tokens: {\n childrenGap: 2\n },\n children: /*#__PURE__*/ _jsx(Stack.Item, {\n shrink: 1,\n styles: pricingStyle,\n children: /*#__PURE__*/ _jsx(Text, {\n variant: 'small',\n className: `${contentStyle.startingPriceText}`,\n children: price\n })\n })\n })\n }),\n /*#__PURE__*/ _jsxs(Stack, {\n horizontal: true,\n verticalAlign: \"baseline\",\n tokens: {\n childrenGap: 5\n },\n children: [\n ctaData && /*#__PURE__*/ _jsx(TileCTAbutton, {\n onKeyDown: onKeyDown,\n isLoadingUserData: isLoadingUserData,\n ctaData: ctaData,\n isEmbedded: isEmbedded\n }),\n userFavouriteEntityType && /*#__PURE__*/ _jsx(UserFavouriteTileButton, {\n entityId: id,\n entityType: userFavouriteEntityType,\n item: item\n })\n ]\n }),\n popularity && /*#__PURE__*/ _jsxs(Text, {\n children: [\n \"P#: \",\n popularity * 1000 || 'none'\n ]\n })\n ]\n });\n};\nexport const BaseTile = ({ id, item, iconURL, title, tileDataRequestId, publisher, description, ctaData, detailUrl, tileIndex, componentInstance, userFavouriteEntityType, currentView, linkedAddIns, linkedWebApps, price, rating, badge, onOpenTile, products, totalTiles, context, isLoadingUserData, popularity, count, activeFilters, searchSortingBy, searchReqId, shouldShowLinkedAddIn, shouldShowLinkedWebApps, badgeTypes, ribbonKey = '', isEmbedded })=>{\n const index = tileIndex + 1;\n const tileId = `${componentInstance}-${id.replace('.', '-')}_${index}`;\n const [imgUrlError, setImgUrlError] = React.useState(false);\n const isHydrated = useHydration();\n useEffect(()=>{\n setImgUrlError(true);\n }, []);\n const ref = useRef(null);\n const logOnClick = ()=>{\n const reference = ref.current;\n const coordinate = getComponentXYCoordinate(reference);\n const tileRank = getTileComponentRank(reference);\n const details = {\n id,\n rank: JSON.stringify(tileRank),\n xOffset: coordinate.x,\n yOffset: coordinate.y,\n currentView,\n tileDataRequestId,\n discoveryData: {\n totalNumOfResults: count,\n activeFilters,\n sortingBy: searchSortingBy,\n searchRequestId: searchReqId\n },\n badges: JSON.stringify(badgeTypes),\n ribbonKey,\n publisherId: item.publisherId,\n appName: item.entityId\n };\n // Add Legacy Telemetry Properties for Bundle Tile Click\n if (shouldShowLinkedAddIn || shouldShowLinkedWebApps) {\n details.isSaaSBundle = true;\n }\n generateTileClickPayloadAndLogTelemetry(Constants.Telemetry.ActionModifier.Tile, details);\n };\n const handleTileClick = (event)=>{\n onOpenTile === null || onOpenTile === void 0 ? void 0 : onOpenTile(event);\n logOnClick();\n };\n const handleTileKeyDown = (event)=>{\n if (event.key === Constants.SystemKeyString.Enter) {\n handleTileClick(event);\n }\n };\n const preventNavigation = (e)=>{\n e.preventDefault();\n e.stopPropagation();\n };\n const descriptionclassNames = classNames({\n multineEllipsis: true,\n description: !linkedAddIns,\n mobileDescription: true\n });\n const oneTimePaymentOffer = isOneTimePaymentOffer(id);\n return /*#__PURE__*/ _jsx(InternalLink, {\n \"data-testid\": `tile-link-container`,\n title: title,\n className: \"tileContainer\",\n href: detailUrl,\n ref: ref,\n role: \"link\",\n \"aria-labelledby\": `label-${tileId} labelBy-${tileId}`,\n \"aria-describedby\": `desc-${tileId} descPrice-${tileId} descCompetency-${tileId}`,\n \"data-bi-name\": id,\n \"data-bi-area\": linkedAddIns && currentView === Constants.currentView.AppDetails ? Constants.Telemetry.AreaName.ParentSaaSTile : Constants.Telemetry.AreaName.AppTile,\n \"data-bi-view\": Constants.Telemetry.TemplateName.SaaSBundle,\n accEnabled: true,\n onKeyDown: handleTileKeyDown,\n children: /*#__PURE__*/ _jsxs(Stack, {\n verticalAlign: \"space-between\",\n className: \"tileContent ms-depth-8\",\n onClick: (e)=>{\n var _getNpsModule;\n handleTileClick(e);\n (_getNpsModule = getNpsModule()) === null || _getNpsModule === void 0 ? void 0 : _getNpsModule.increaseActionsCounter('pdpViewsCount');\n },\n children: [\n badge,\n /*#__PURE__*/ _jsxs(Stack, {\n tokens: {\n childrenGap: 8\n },\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: 'tileIcon ms-depth-8',\n children: iconURL && imgUrlError && /*#__PURE__*/ _jsx(TelemetryImage, {\n src: iconURL,\n alt: `${title} icon`,\n onError: ()=>setImgUrlError(false),\n itemPropName: 'tileImage'\n })\n }),\n /*#__PURE__*/ _jsxs(Stack, {\n className: 'tileHeaderBox',\n tokens: {\n childrenGap: 8\n },\n children: [\n /*#__PURE__*/ _jsx(Text, {\n variant: 'large',\n nowrap: true,\n block: true,\n className: `${contentStyle.publisher} title multineEllipsis ms-fontWeight-semibold`,\n children: title\n }),\n /*#__PURE__*/ _jsx(Text, {\n variant: 'small',\n className: `${contentStyle.subText} publisher`,\n children: publisher\n }),\n !oneTimePaymentOffer && !!(products === null || products === void 0 ? void 0 : products.length) && /*#__PURE__*/ _jsx(ProductsComponent, {\n textSize: 'smallPlus',\n withTooltip: true,\n tooltipTitle: 'Applicable to:',\n withText: true,\n productsItems: products,\n linkedAddIns: linkedAddIns,\n linkedWebApps: linkedWebApps\n }),\n /*#__PURE__*/ _jsx(Text, {\n variant: 'small',\n className: `${contentStyle.subText} ${descriptionclassNames} `,\n children: description\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n id: `labelIndexString-${tileId}`,\n className: \"totalTiles\",\n children: `${index} out of ${totalTiles}`\n })\n ]\n })\n ]\n }),\n isHydrated && /*#__PURE__*/ _jsx(TileFooter, {\n onClick: preventNavigation,\n onKeyDown: handleTileKeyDown,\n isEmbedded: isEmbedded,\n isLoadingUserData: isLoadingUserData,\n item: item,\n userFavouriteEntityType: userFavouriteEntityType,\n ctaData: ctaData,\n id: id,\n price: price,\n popularity: popularity,\n rating: rating,\n context: context\n }),\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"mobileUserFavourite\",\n onClick: preventNavigation,\n children: userFavouriteEntityType && /*#__PURE__*/ _jsx(UserFavouriteTileButton, {\n entityId: id,\n entityType: userFavouriteEntityType,\n item: item\n })\n })\n ]\n })\n });\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { BaseTile as BaseTileComponent } from '@shared/components/baseTile';\nimport { connect } from 'react-redux';\nconst mapStateToProps = (state, ownProps)=>{\n const { activeFilters: appsActiveFilters, count: appsCount } = state.apps;\n const { activeFilters: servicesActiveFilters, count: servicesCount } = state.services;\n const { currentView, query, requestId: searchReqId, isEmbedded } = state.config;\n return _object_spread_props(_object_spread({}, ownProps), {\n isLoadingUserData: state.users.loading,\n activeFilters: currentView === 'appGallery' ? appsActiveFilters : servicesActiveFilters,\n count: currentView === 'appGallery' ? appsCount : servicesCount,\n searchReqId,\n searchSortingBy: query.sortBy,\n isEmbedded\n });\n};\nexport const BaseTile = connect(mapStateToProps, null)(BaseTileComponent);\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from './spzaComponent';\nimport { Constants } from '../utils/constants';\nimport { getWindow } from 'services/window';\nimport { SpzaInstrumentService } from '../services/telemetry/spza/spzaInstrument';\nimport { logger } from '@src/logger';\nexport class DynamicCampaign extends SpzaComponent {\n componentDidMount() {\n // add a function to the window object to be able to call a component method from the html\n window.ctaCallback = (ctaEntity)=>this.showDialog(ctaEntity);\n this.generateLoadingPageTelemetry();\n }\n generateLoadingPageTelemetry() {\n if (this.props.dynamicCampaign) {\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.PageLoad,\n actionModifier: Constants.Telemetry.ActionModifier.End\n };\n this.instrument.probe('logTelemetryInfo', payload);\n logger.info('', {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n }\n }\n generateCtaClickTelemetry() {\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.AppDynamicCampaignCTAButton\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info('', {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n }\n showDialog(ctaEntity) {\n this.generateCtaClickTelemetry();\n const entity = {\n entityId: ctaEntity.appId\n };\n this.context.ctaCallback({\n entity,\n entityType: ctaEntity.entityType,\n ctaType: ctaEntity.ctaType,\n actionModifier: Constants.Telemetry.ActionModifier.AppDynamicCampaignCTAButton\n });\n }\n createHtmlMarkup() {\n const dynamicCampaign = this.props.dynamicCampaign;\n return {\n __html: dynamicCampaign.html\n };\n }\n renderDefaultPage() {\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"campaignDefaultPage Header c-heading-2\",\n children: \"Campaign not found !\"\n });\n }\n renderImpl() {\n // eslint-disable-next-line react/no-danger\n return this.props.dynamicCampaign ? /*#__PURE__*/ _jsx(\"div\", {\n dangerouslySetInnerHTML: this.createHtmlMarkup()\n }) : this.renderDefaultPage();\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"context\", void 0), _define_property(this, \"instrument\", void 0);\n this.instrument = SpzaInstrumentService.getProvider();\n this.showDialog = this.showDialog.bind(this);\n }\n}\nDynamicCampaign.contextTypes = {\n loc: PropTypes.func,\n locDateString: PropTypes.func,\n locParams: PropTypes.func,\n buildHref: PropTypes.func,\n ctaCallback: PropTypes.func,\n contactCallback: PropTypes.func,\n renderErrorModal: PropTypes.func,\n openTileCallback: PropTypes.func\n};\n","import { DynamicCampaign as DynamicCampaignComponent } from './../components/dynamicCampaign';\nimport { getDynamicCampaign } from '../actions/thunkActions';\nimport { connect } from 'react-redux';\nexport const mapStateToProps = (state)=>{\n return {\n dynamicCampaign: state.dynamicCampaign\n };\n};\nconst Campaign = connect(mapStateToProps)(DynamicCampaignComponent);\nexport default Campaign;\nexport const ensureAsyncDataSSR = (dispatch, getState, params, request)=>{\n request.params.id = params.id;\n request.params.publisher = params.publisher;\n return dispatch(getDynamicCampaign(request));\n};\n","/* eslint-disable react/forbid-dom-props */ function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { TooltipHost } from '@fluentui/react';\nimport { v4 } from 'uuid';\nimport { getUserFavouriteEntityServiceType } from '@shared/utils/userFavouriteDedicatedUtils';\nimport SpzaComponent from '@shared/components/spzaComponent';\nimport { BaseTile } from '@shared/containers/baseTile';\nimport { Constants } from '@shared/utils/constants';\nimport { generateTileClickPayloadAndLogTelemetry, getProductsList } from '@shared/utils/detailUtils';\nimport { getComponentXYCoordinate, getTileComponentRank } from '@shared/utils/reactUtils';\nimport { routes } from '@shared/routerHistory';\nimport { findBestMatchCountryCode, getReplacedCountryQueryParam, createCountryFilterQueryParam, getProductTitleForTile, getStartingPriceHeader } from '@shared/utils/consultingServicesUtils';\nimport { stripHTML } from '@shared/utils/appUtils';\nimport IntegratedSolution from '@shared/images/badges/IntegratedSolution.svg';\nimport AzureExpertsMSPBadge from '@shared/images/badges/AzureExpertsMSP.svg';\nexport class ServiceTile extends SpzaComponent {\n getService(e) {\n var _this_props_extraData;\n e.stopPropagation();\n const { setTileCheckoutSource } = this.props;\n const reference = this.refs['appTile' + this.props.entityId];\n const coordinate = getComponentXYCoordinate(reference);\n const tileRank = getTileComponentRank(reference);\n const { ribbonKey = '' } = this.props;\n setTileCheckoutSource();\n const details = {\n id: this.props.entityId,\n rank: JSON.stringify(tileRank),\n xOffset: coordinate.x,\n yOffset: coordinate.y,\n CTAType: ((_this_props_extraData = this.props.extraData) === null || _this_props_extraData === void 0 ? void 0 : _this_props_extraData.serviceActionType) || '',\n currentView: this.props.currentView\n };\n generateTileClickPayloadAndLogTelemetry(Constants.Telemetry.ActionModifier.ServiceTileCTAButton, details);\n this.context.ctaCallback({\n entity: this.props,\n entityType: Constants.EntityType.Service,\n ctaType: Constants.CTAType.Service,\n actionModifier: Constants.Telemetry.ActionModifier.ServiceTileCTAButton,\n ribbonKey\n });\n }\n shouldComponentUpdate(nextProps) {\n return this.props.entityId !== nextProps.entityId || this.props.currentView !== nextProps.currentView || this.props.countryContext !== nextProps.countryContext;\n }\n renderPrice() {\n const { extraData, countryContext, selectedLocale } = this.props;\n return getStartingPriceHeader(extraData === null || extraData === void 0 ? void 0 : extraData.multiCountryPricing, countryContext, selectedLocale, this.context);\n }\n renderBuiltForItem() {\n return /*#__PURE__*/ _jsx(\"div\", {\n children: getProductTitleForTile(this.props.products)\n });\n }\n getReplacedCountryQueryParamIfNeeded() {\n // Play defense - return alternative country only if we can find one.\n if (this.props.extraData && this.props.extraData.multiCountryPricing && this.props.extraData.multiCountryPricing[0]) {\n // No country context - use first country as default.\n if (!this.props.countryContext) {\n const firstCountry = this.props.extraData.multiCountryPricing[0].countryRegion;\n let replaceCountryParam = getReplacedCountryQueryParam(this.props.query, firstCountry);\n // No country query param to replace - create new one.\n if (!replaceCountryParam) {\n replaceCountryParam = createCountryFilterQueryParam(firstCountry, this.props.isAppSource);\n }\n return replaceCountryParam;\n }\n const foundCountryCode = findBestMatchCountryCode(this.props.extraData.multiCountryPricing, this.props.countryContext);\n // If there is mismatch between country context and what we found in the service. replace the country param.\n if (foundCountryCode !== this.props.countryContext && this.props.query) {\n return getReplacedCountryQueryParam(this.props.query, foundCountryCode);\n }\n }\n return null;\n }\n renderBadge() {\n var _this_props_tags;\n const AzureExpertsMSP = ((_this_props_tags = this.props.tags) === null || _this_props_tags === void 0 ? void 0 : _this_props_tags.length) > 0 && this.props.tags.indexOf(Constants.BadgeType.AzureExpertsMSP) >= 0;\n const hasIntSolutionBadge = Object.prototype.hasOwnProperty.call(Constants.ServicesIdWithBadge, this.props.entityId);\n const tooltipText = this.context.loc('MicrosoftIntegratedSolution_badge', 'Microsoft Integrated Solution badge');\n if (!hasIntSolutionBadge && !AzureExpertsMSP) {\n return null;\n }\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: 'tileBadgeContainer',\n children: [\n hasIntSolutionBadge && /*#__PURE__*/ _jsx(\"div\", {\n className: \"serviceTileBadge\",\n tabIndex: 0,\n children: /*#__PURE__*/ _jsx(TooltipHost, {\n content: tooltipText,\n children: /*#__PURE__*/ _jsx(\"img\", {\n src: IntegratedSolution,\n alt: tooltipText\n })\n })\n }),\n AzureExpertsMSP && /*#__PURE__*/ _jsx(\"div\", {\n className: \"expertBadge\",\n children: /*#__PURE__*/ _jsx(\"img\", {\n className: \"tileBadge\",\n src: AzureExpertsMSPBadge,\n title: this.context.loc('AzureExpertsMSP_Badge', 'Azure Experts MSP'),\n alt: this.context.loc('AzureExpertsMSP_Badge', 'Azure Experts MSP')\n })\n })\n ]\n });\n }\n getCTAData() {\n var _this_props_extraData;\n const ctaText = ((_this_props_extraData = this.props.extraData) === null || _this_props_extraData === void 0 ? void 0 : _this_props_extraData.serviceActionType) || '';\n return ctaText && {\n id: Constants.JsllCTAId.ContactMe,\n title: this.context.loc('CTA_Services'),\n area: 'Services Tile',\n onClick: this.getService.bind(this),\n entityId: this.props.entityId\n };\n }\n getProducts() {\n var _this_props;\n return ((_this_props = this.props) === null || _this_props === void 0 ? void 0 : _this_props.products) && Object.keys(this.props.products).length > 0 && getProductsList(this.props.products);\n }\n renderImpl() {\n var _this_props_extraData;\n const replaceCountryParams = this.getReplacedCountryQueryParamIfNeeded();\n const serviceDetailUrl = this.context.buildHref(routes.serviceDetail, {\n entityId: this.props.entityId\n }, replaceCountryParams, true);\n const { ribbonKey = '' } = this.props;\n var _this_props_extraData_shortDescription;\n return /*#__PURE__*/ _jsx(BaseTile, {\n totalTiles: this.props.totalTiles,\n id: this.props.entityId,\n componentInstance: this.componentInstance,\n item: this.props.item,\n iconURL: this.props.extraData && this.props.extraData.smallIconUri,\n title: this.props.title,\n description: stripHTML((_this_props_extraData_shortDescription = (_this_props_extraData = this.props.extraData) === null || _this_props_extraData === void 0 ? void 0 : _this_props_extraData.shortDescription) !== null && _this_props_extraData_shortDescription !== void 0 ? _this_props_extraData_shortDescription : ''),\n publisher: this.props.publisher,\n ctaData: this.getCTAData(),\n detailUrl: serviceDetailUrl,\n tileIndex: this.props.tileIndex,\n currentView: this.props.currentView,\n userFavouriteEntityType: getUserFavouriteEntityServiceType(),\n price: this.renderPrice(),\n badge: this.renderBadge(),\n openTileCallback: this.context.openTileCallback,\n products: this.getProducts(),\n context: this.context,\n ribbonKey: ribbonKey\n });\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"context\", void 0), _define_property(this, \"componentInstance\", v4());\n this.getReplacedCountryQueryParamIfNeeded = this.getReplacedCountryQueryParamIfNeeded.bind(this);\n }\n}\nServiceTile.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n buildHref: PropTypes.func,\n ctaCallback: PropTypes.func,\n renderErrorModal: PropTypes.func,\n openTileCallback: PropTypes.func\n};\n","import * as React from 'react';\nimport { connect } from 'react-redux';\nimport { ServiceTile as ServiceTileComponent } from 'components/serviceTile';\nimport { getTelemetryDetailContentCurrentView } from '@shared/utils/appUtils';\nimport { createSetCheckoutSource } from '@shared/actions/checkoutActions';\nimport { CheckoutSource } from '@shared/Models';\nconst mapStateToProps = (state, ownProps)=>{\n var _state_config, _state_config1, _state_config2, _state_config3, _state_users;\n return {\n currentView: getTelemetryDetailContentCurrentView((_state_config = state.config) === null || _state_config === void 0 ? void 0 : _state_config.currentView, (_state_config1 = state.config) === null || _state_config1 === void 0 ? void 0 : _state_config1.currentGalleryViewIsCurated),\n query: (_state_config2 = state.config) === null || _state_config2 === void 0 ? void 0 : _state_config2.query,\n isAppSource: (_state_config3 = state.config) === null || _state_config3 === void 0 ? void 0 : _state_config3.isAppSource,\n isLoadingUserData: (_state_users = state.users) === null || _state_users === void 0 ? void 0 : _state_users.loading,\n ribbonKey: ownProps.ribbonKey\n };\n};\nexport const mapDispatchToProps = (dispatch)=>{\n return {\n setTileCheckoutSource: ()=>dispatch(createSetCheckoutSource({\n source: CheckoutSource.Tile\n }))\n };\n};\nexport const ServiceTile = connect(mapStateToProps, mapDispatchToProps)(ServiceTileComponent);\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport SpzaComponent from './spzaComponent';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { Constants } from '@shared/utils/constants';\nimport { getUserFavouriteEntity } from '@shared/utils/userFavouriteUtils';\nimport { getWindow } from '@shared/services/window';\nimport { ActionButton } from '@fluentui/react';\nimport { logger } from '@src/logger';\nconst favoriteStarHollow = {\n iconName: 'FavoriteStar'\n};\nconst favoriteStarFilled = {\n iconName: 'FavoriteStarFill'\n};\nexport class UserFavouriteTileDetailButton extends SpzaComponent {\n componentDidMount() {\n this.props.fetchUserFavouriteData();\n }\n setFavouriteItemModifyComplete() {\n this.setState({\n itemModifyStatus: Constants.UserFavourite.DataItemModifyStatus.Done\n });\n }\n onClickUserFavouriteButton() {\n const userFavouriteEntity = getUserFavouriteEntity(this.props.userFavourite, this.props.entityId);\n const upsertPayload = {\n applicationType: this.props.entityType,\n applicationId: this.props.entityId\n };\n // telemetry\n const details = userFavouriteEntity ? {\n action: Constants.Telemetry.Action.Delete,\n userFavouriteInfo: _object_spread({}, userFavouriteEntity)\n } : {\n action: Constants.Telemetry.Action.Upsert,\n userFavouriteInfo: _object_spread({}, upsertPayload)\n };\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.UserFavouriteTileDetailButton,\n details: JSON.stringify(details)\n };\n this.instrument.probe(Constants.Telemetry.ProbeName.LogInfo, payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n // toggle user favourite on entity\n if (userFavouriteEntity) {\n // Delete a favourite\n // save the user action\n // display saved result beforehand\n this.setState({\n itemModifyStatus: Constants.UserFavourite.DataItemModifyStatus.Delete\n });\n // REST DELETE\n this.props.deleteFavourite(userFavouriteEntity.entityGuid, userFavouriteEntity.applicationType)// TO-DO: cannot use .finally() on promise\n .then(()=>{\n this.setFavouriteItemModifyComplete();\n }).catch(()=>{\n this.setFavouriteItemModifyComplete();\n });\n } else {\n // Upsert a favourite\n // save the user action\n // display saved result beforehand\n this.setState({\n itemModifyStatus: Constants.UserFavourite.DataItemModifyStatus.Upsert\n });\n // REST POST\n this.props.savefavourite(_object_spread({}, upsertPayload), this.props.item)// TO-DO: cannot use .finally() on promise\n .then(()=>{\n this.setFavouriteItemModifyComplete();\n }).catch(()=>{\n this.setFavouriteItemModifyComplete();\n });\n }\n }\n renderImpl() {\n const hasUserSavedFavourite = !!getUserFavouriteEntity(this.props.userFavourite, this.props.entityId);\n const itemModifyStatus = this.state.itemModifyStatus;\n const shouldShowSavedStatus = hasUserSavedFavourite && (itemModifyStatus === Constants.UserFavourite.DataItemModifyStatus.Done || itemModifyStatus === Constants.UserFavourite.DataItemModifyStatus.None) || !hasUserSavedFavourite && itemModifyStatus === Constants.UserFavourite.DataItemModifyStatus.Upsert;\n const title = shouldShowSavedStatus ? this.context.loc('UserFavourite_TileDetailButton_Saved') : this.context.loc('UserFavourite_TileDetailButton_Save');\n return this.props.userInfo.signedIn && /*#__PURE__*/ _jsx(ActionButton, {\n iconProps: hasUserSavedFavourite ? favoriteStarFilled : favoriteStarHollow,\n allowDisabledFocus: true,\n onClick: this.onClickUserFavouriteButton,\n className: this.props.className,\n children: title\n });\n }\n constructor(props, context){\n super(props, context), _define_property(this, \"context\", void 0), _define_property(this, \"instrument\", void 0);\n this.instrument = SpzaInstrumentService.getProvider();\n this.state = {\n // this state property is to fix the flicker when user (un)save an favourite, due to the delay of a REST call to server\n // makes user think (un)save is an immediate action to effect,\n // this is done by changing the classname before the REST call, and reset the classname after REST call\n // in order to change and change it back, we need to record the user action\n itemModifyStatus: Constants.UserFavourite.DataItemModifyStatus.None\n };\n this.onClickUserFavouriteButton = this.onClickUserFavouriteButton.bind(this);\n }\n}\nUserFavouriteTileDetailButton.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n buildHref: PropTypes.func,\n renderErrorModal: PropTypes.func\n};\n","import * as React from 'react';\nimport { upsertUserFavourite, deleteUserFavourite, fetchUserFavourites } from '@shared/actions/userFavouriteThunkActions';\nimport { UserFavouriteTileDetailButton as UserFavouriteTileDetailButtonComponent } from '@shared/components/userFavouriteTileDetailButton';\nimport { connect } from 'react-redux';\nexport const mapStateToProps = (state, ownProps)=>{\n return {\n userInfo: state.users,\n userFavourite: state.userFavourite,\n entityId: ownProps.entityId,\n entityType: ownProps.entityType,\n item: ownProps.item,\n className: ownProps.className\n };\n};\nexport const mapDispatchToProps = (dispatch)=>{\n return {\n fetchUserFavouriteData: ()=>dispatch(fetchUserFavourites()),\n savefavourite: (payload, item)=>dispatch(upsertUserFavourite(payload, item)),\n deleteFavourite: (entityGuid, applicationType)=>dispatch(deleteUserFavourite(entityGuid, applicationType))\n };\n};\nconst UserFavouriteTileDetailButton = connect(mapStateToProps, mapDispatchToProps)(UserFavouriteTileDetailButtonComponent);\nexport default UserFavouriteTileDetailButton;\n","import { useEffect } from 'react';\nimport { getWindow } from '@fluentui/react';\nimport { IClarityFunctionNames } from '@shared/components';\nexport const useMsClarityIdentify = ({ correlationId, spzaId })=>{\n useEffect(()=>{\n if (correlationId && spzaId && getWindow()) {\n var _getWindow;\n (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : _getWindow.clarity(IClarityFunctionNames.IDENTIFY, spzaId, correlationId);\n }\n }, [\n spzaId,\n correlationId\n ]);\n};\nexport const useMsClarityTracking = ({ allowTracking })=>{\n useEffect(()=>{\n const currentWindow = getWindow();\n if (allowTracking && (currentWindow === null || currentWindow === void 0 ? void 0 : currentWindow.clarity)) {\n currentWindow === null || currentWindow === void 0 ? void 0 : currentWindow.clarity(IClarityFunctionNames.CONSENT);\n }\n }, [\n allowTracking\n ]);\n};\n","/* istanbul ignore file */ function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport React, { useEffect, useState } from 'react';\n/**\n * This hook is used in functional components.\n * Use it whenever you must render only when the hydration phase is complete (i.e. first lifecycle has been invoked)\n */ export function useHydration() {\n const [isHydrated, setIsHydrated] = useState(false);\n useEffect(()=>{\n setIsHydrated(true);\n }, []);\n return isHydrated;\n}\n/**\n * Used for legacy class components. Please avoid using this and use the hook {@link useHydration} instead inside a functional component.\n */ export function withHydration(WrappedComponent) {\n return function ComponentWithHydration(props) {\n const isHydrated = useHydration();\n return /*#__PURE__*/ _jsx(WrappedComponent, _object_spread_props(_object_spread({}, props), {\n isHydrated: isHydrated\n }));\n };\n}\n","import { useRef } from 'react';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nexport const useSpzaInstrumentService = ()=>{\n const refInstrument = useRef(SpzaInstrumentService.getProvider());\n return [\n refInstrument.current\n ];\n};\n","import { ApplicationInsights } from '@microsoft/1ds-analytics-web-js';\nimport { AuthPlugin, AuthType } from '@microsoft/1ds-auth-js';\nimport * as appConfig from '@shared/services/init/appConfig';\nimport { PropertiesPlugin } from '@microsoft/1ds-properties-js';\nimport { CorrelationVectorPlugin } from '@microsoft/1ds-cv-js';\nimport { getWindow } from '@shared/services/window';\nimport { Constants, Environment, OneDSEnvs } from '@shared/utils/constants';\nimport { getGPCValue } from '@shared/utils/privacyUtils';\nconst envsMap = {\n [Environment.Production]: OneDSEnvs.Production,\n [Environment.Canary]: OneDSEnvs.Canary,\n [Environment.Development]: OneDSEnvs.Internal,\n [Environment.Dogfood]: OneDSEnvs.Dogfood,\n [Environment.Test]: OneDSEnvs.Test\n};\nconst getEnvName = ()=>{\n var _getWindow___INITIAL_STATE___config_siteEnvironment, _getWindow___INITIAL_STATE___config, _getWindow___INITIAL_STATE__, _getWindow;\n var _getWindow___INITIAL_STATE___config_siteEnvironment_toLowerCase;\n const siteEnvironment = (_getWindow___INITIAL_STATE___config_siteEnvironment_toLowerCase = (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow___INITIAL_STATE__ = _getWindow.__INITIAL_STATE__) === null || _getWindow___INITIAL_STATE__ === void 0 ? void 0 : (_getWindow___INITIAL_STATE___config = _getWindow___INITIAL_STATE__.config) === null || _getWindow___INITIAL_STATE___config === void 0 ? void 0 : (_getWindow___INITIAL_STATE___config_siteEnvironment = _getWindow___INITIAL_STATE___config.siteEnvironment) === null || _getWindow___INITIAL_STATE___config_siteEnvironment === void 0 ? void 0 : _getWindow___INITIAL_STATE___config_siteEnvironment.toLowerCase()) !== null && _getWindow___INITIAL_STATE___config_siteEnvironment_toLowerCase !== void 0 ? _getWindow___INITIAL_STATE___config_siteEnvironment_toLowerCase : process.env.siteEnvironment;\n const env = envsMap[`${siteEnvironment}`];\n if (!env) {\n throw new Error('failed to load env name for telemetry');\n }\n return env;\n};\nconst initiate1DS = ()=>{\n var _getWindow___INITIAL_STATE___config, _getWindow___INITIAL_STATE__, _getWindow, _getWindow___INITIAL_STATE___config1, _getWindow___INITIAL_STATE__1, _getWindow1;\n const analytics = new ApplicationInsights();\n const authPlugin = new AuthPlugin();\n const propertiesPlugin = new PropertiesPlugin();\n const cvPlugin = new CorrelationVectorPlugin();\n const webAnalyticsConfig = {\n urlCollectQuery: true,\n urlCollectHash: true,\n // Web Analytics Plugin configuration\n autoCapture: {\n scroll: true,\n pageView: true,\n onLoad: true,\n onUnload: true,\n click: true,\n resize: true,\n lineage: true,\n jsError: true\n },\n shareAuthStatus: true,\n callback: {\n signedinStatus: ()=>{\n var _getWindow___INITIAL_STATE___users, _getWindow___INITIAL_STATE__, _getWindow;\n var _getWindow___INITIAL_STATE___users_signedIn;\n return (_getWindow___INITIAL_STATE___users_signedIn = (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow___INITIAL_STATE__ = _getWindow.__INITIAL_STATE__) === null || _getWindow___INITIAL_STATE__ === void 0 ? void 0 : (_getWindow___INITIAL_STATE___users = _getWindow___INITIAL_STATE__.users) === null || _getWindow___INITIAL_STATE___users === void 0 ? void 0 : _getWindow___INITIAL_STATE___users.signedIn) !== null && _getWindow___INITIAL_STATE___users_signedIn !== void 0 ? _getWindow___INITIAL_STATE___users_signedIn : false;\n }\n }\n };\n const authConfig = {\n authType: AuthType.AAD,\n loggedInStatusCallback: ()=>{\n var _getWindow___INITIAL_STATE___users, _getWindow___INITIAL_STATE__, _getWindow;\n var _getWindow___INITIAL_STATE___users_signedIn;\n return (_getWindow___INITIAL_STATE___users_signedIn = (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow___INITIAL_STATE__ = _getWindow.__INITIAL_STATE__) === null || _getWindow___INITIAL_STATE__ === void 0 ? void 0 : (_getWindow___INITIAL_STATE___users = _getWindow___INITIAL_STATE__.users) === null || _getWindow___INITIAL_STATE___users === void 0 ? void 0 : _getWindow___INITIAL_STATE___users.signedIn) !== null && _getWindow___INITIAL_STATE___users_signedIn !== void 0 ? _getWindow___INITIAL_STATE___users_signedIn : false;\n }\n };\n var _getGPCValue;\n const propertiesPluginConfig = {\n populateBrowserInfo: true,\n populateOperatingSystemInfo: true,\n enableApplicationInsightsTrace: true,\n enableApplicationInsightsUser: true,\n userConsentCookieName: Constants.Cookies.privacyConsentAcceptedDate,\n env: getEnvName(),\n // eslint-disable-next-line camelcase\n gpcDataSharingOptIn: (_getGPCValue = getGPCValue()) !== null && _getGPCValue !== void 0 ? _getGPCValue : true,\n callback: {\n userConsentDetails: ()=>appConfig.get('siteConsent')\n }\n };\n const config = {\n propertyConfiguration: propertiesPluginConfig,\n instrumentationKey: (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow___INITIAL_STATE__ = _getWindow.__INITIAL_STATE__) === null || _getWindow___INITIAL_STATE__ === void 0 ? void 0 : (_getWindow___INITIAL_STATE___config = _getWindow___INITIAL_STATE__.config) === null || _getWindow___INITIAL_STATE___config === void 0 ? void 0 : _getWindow___INITIAL_STATE___config.telemetryInstrumentationKey,\n endpointUrl: (_getWindow1 = getWindow()) === null || _getWindow1 === void 0 ? void 0 : (_getWindow___INITIAL_STATE__1 = _getWindow1.__INITIAL_STATE__) === null || _getWindow___INITIAL_STATE__1 === void 0 ? void 0 : (_getWindow___INITIAL_STATE___config1 = _getWindow___INITIAL_STATE__1.config) === null || _getWindow___INITIAL_STATE___config1 === void 0 ? void 0 : _getWindow___INITIAL_STATE___config1.telemetryEndpoint,\n webAnalyticsConfiguration: webAnalyticsConfig,\n extensions: [\n authPlugin,\n propertiesPlugin,\n cvPlugin\n ],\n extensionConfig: {\n [authPlugin.identifier]: authConfig,\n [propertiesPlugin.identifier]: propertiesPluginConfig\n },\n perfEvtsSendAll: true\n };\n analytics.initialize(config, []);\n return analytics;\n};\nexport default (()=>__CLIENT__ && initiate1DS());\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport initBusinessTelemetry from '@shared/services/telemetry/1DSClient';\nimport { logger } from '@src/logger';\nconst telemetryClient = ()=>{\n let telemetryClient = null;\n return ()=>{\n if (!telemetryClient) {\n telemetryClient = initBusinessTelemetry();\n }\n return telemetryClient;\n };\n};\nconst getTelemetryClient = telemetryClient();\nexport const initBusinessTelemetryClient = getTelemetryClient;\nexport const useTelemetry = ()=>{\n const pageView = /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(overrideValues, customProperties) {\n const telemetryClient = getTelemetryClient();\n telemetryClient.capturePageView(overrideValues, customProperties);\n logger.clientLogger.logger.capturePageView(overrideValues, customProperties);\n });\n return function pageView(overrideValues, customProperties) {\n return _ref.apply(this, arguments);\n };\n }();\n const pageAction = /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*(element, overrideValues, customProperties, isRightClick) {\n const telemetryClient = getTelemetryClient();\n telemetryClient.capturePageAction(element, overrideValues, customProperties, isRightClick);\n logger.clientLogger.logger.capturePageAction(element, overrideValues, customProperties, isRightClick);\n });\n return function pageAction(element, overrideValues, customProperties, isRightClick) {\n return _ref.apply(this, arguments);\n };\n }();\n const flushTelemetryBuffer = ()=>{\n const telemetryClient = getTelemetryClient();\n telemetryClient.getPostChannel().flush(false);\n logger.flush();\n };\n return [\n {\n pageAction,\n pageView,\n flushTelemetryBuffer\n },\n {\n telemetryClient\n }\n ];\n};\n","import { Logger } from './base';\nimport { stringifyError } from '@shared/utils/errorUtils';\nexport var ClientLogsCollection = /*#__PURE__*/ function(ClientLogsCollection) {\n ClientLogsCollection[\"Telemetry\"] = \"Telemetry\";\n ClientLogsCollection[\"Feedback\"] = \"Feedback\";\n return ClientLogsCollection;\n}({});\nexport class ClientLoggerTelemetry extends Logger {\n info({ error, collection = \"Telemetry\", action = '', actionModifier = '', details = '', appName = '', page = '', product = '-1' }) {\n this.log('Info', collection, {\n details,\n appName,\n product,\n page,\n error: error ? stringifyError(error) : '',\n action,\n actionModifier\n });\n }\n debug({ error, collection = \"Telemetry\", action = '', actionModifier = '', details = '', appName = '', page = '', product = '-1' }) {\n this.log('Debug', collection, {\n details,\n appName,\n product,\n page,\n error: error ? stringifyError(error) : '',\n action,\n actionModifier\n });\n }\n warning({ error, collection = \"Telemetry\", action = '', actionModifier = '', details = '', appName = '', page = '', product = '-1' }) {\n this.log('Warn', collection, {\n details,\n appName,\n product,\n page,\n error: error ? stringifyError(error) : '',\n action,\n actionModifier\n });\n }\n error({ error, collection = \"Telemetry\", action = '', actionModifier = '', details = '', appName = '', page = '', product = '-1' }) {\n this.log('Error', collection, {\n details,\n appName,\n product,\n page,\n error: error ? stringifyError(error) : '',\n action,\n actionModifier\n });\n }\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport sha256 from 'crypto-js/sha256';\nimport { getWindow } from '@shared/services/window';\nimport { getSpzaUserIdAndNewUserModifier, getTrailIdAndData } from '@shared/utils/appUtils';\nimport { Constants } from '@shared/utils/constants';\nconst OneDSEventNames = {\n ClientError: 'Ms.Web.ClientError'\n};\nconst getCommonData = ()=>{\n var _initialConfiguration_siteEnvironment, _initialConfiguration_query, _getTrailIdAndData, _getWindow_navigator, _getWindow_location, _getWindow_navigator_connection, _getWindow_navigator1;\n const initialConfiguration = getWindow().__INITIAL_STATE__.config;\n return {\n environment: ((_initialConfiguration_siteEnvironment = initialConfiguration.siteEnvironment) === null || _initialConfiguration_siteEnvironment === void 0 ? void 0 : _initialConfiguration_siteEnvironment.toLowerCase()) || '',\n appVersion: initialConfiguration.appVersion || '',\n region: initialConfiguration.region || '',\n spzaId: getSpzaUserIdAndNewUserModifier().spzaUserId || '',\n hostType: !initialConfiguration.isEmbedded ? Constants.appSource : Constants.appSourceEmbed,\n locale: ((_initialConfiguration_query = initialConfiguration.query) === null || _initialConfiguration_query === void 0 ? void 0 : _initialConfiguration_query.locale) || '',\n correlationId: initialConfiguration.correlationId || Constants.ReservedCorrelationIds.EmptyId,\n mshash: ((_getTrailIdAndData = getTrailIdAndData()) === null || _getTrailIdAndData === void 0 ? void 0 : _getTrailIdAndData.trailId) || '',\n userAgent: ((_getWindow_navigator = getWindow().navigator) === null || _getWindow_navigator === void 0 ? void 0 : _getWindow_navigator.userAgent) || '',\n host: ((_getWindow_location = getWindow().location) === null || _getWindow_location === void 0 ? void 0 : _getWindow_location.host) || '',\n landingView: initialConfiguration.landingView || '',\n connectionEffectiveType: ((_getWindow_navigator1 = getWindow().navigator) === null || _getWindow_navigator1 === void 0 ? void 0 : (_getWindow_navigator_connection = _getWindow_navigator1.connection) === null || _getWindow_navigator_connection === void 0 ? void 0 : _getWindow_navigator_connection.effectiveType) || ''\n };\n};\nexport class Logger {\n modifyClientError(item) {\n if (item.name !== OneDSEventNames.ClientError) {\n return;\n }\n if (Array.isArray(item.baseData.exceptions)) {\n item.baseData.exceptions = JSON.stringify(item.baseData.exceptions);\n }\n if (Array.isArray(item.tags)) {\n delete item.tags;\n }\n }\n get logger() {\n return this._1dsLogger;\n }\n initialize(_1dsLogger, store) {\n this._1dsLogger = _1dsLogger;\n this.store = store;\n this.logMetadata = getCommonData();\n this._1dsLogger.addTelemetryInitializer(this.modifyClientError);\n Object.entries(this.logMetadata).forEach(([key, value])=>{\n this._1dsLogger.getPropertyManager().setProperty(key, value);\n });\n // Flush preload events - if any\n Promise.resolve().then(()=>this.preLoadEvents.forEach(({ level, collection, payload })=>this.log(level, collection, payload)));\n }\n log(level, collection, loggerPayload) {\n if (this._1dsLogger && this.logMetadata) {\n try {\n var _this_store, _state_modal, _state_checkout_items_, _state_checkout_items, _state_checkout, _getWindow_navigator, _getWindow, _getWindow_navigator1, _getWindow1, _getWindow_location, _getWindow2, _getWindow3, _this__1dsLogger;\n const state = (_this_store = this.store) === null || _this_store === void 0 ? void 0 : _this_store.getState();\n const { oid, tid, signedIn, isMSAUser, userSegment } = (state === null || state === void 0 ? void 0 : state.users) || {};\n const { config: { featureFlags } } = state;\n const hashedOid = oid ? sha256(oid).toString().toLowerCase() : '';\n const appName = loggerPayload.appName ? loggerPayload.appName : (state === null || state === void 0 ? void 0 : (_state_modal = state.modal) === null || _state_modal === void 0 ? void 0 : _state_modal.entityId) || ((_state_checkout = state.checkout) === null || _state_checkout === void 0 ? void 0 : (_state_checkout_items = _state_checkout.items) === null || _state_checkout_items === void 0 ? void 0 : (_state_checkout_items_ = _state_checkout_items[0]) === null || _state_checkout_items_ === void 0 ? void 0 : _state_checkout_items_.entityId) || '';\n const data = _object_spread_props(_object_spread({}, loggerPayload), {\n browserLanguage: ((_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow_navigator = _getWindow.navigator) === null || _getWindow_navigator === void 0 ? void 0 : _getWindow_navigator.language) || ((_getWindow1 = getWindow()) === null || _getWindow1 === void 0 ? void 0 : (_getWindow_navigator1 = _getWindow1.navigator) === null || _getWindow_navigator1 === void 0 ? void 0 : _getWindow_navigator1.userLanguage) || '',\n page: loggerPayload.page || ((_getWindow2 = getWindow()) === null || _getWindow2 === void 0 ? void 0 : (_getWindow_location = _getWindow2.location) === null || _getWindow_location === void 0 ? void 0 : _getWindow_location.href) || '',\n embed: `${((_getWindow3 = getWindow()) === null || _getWindow3 === void 0 ? void 0 : _getWindow3.AppsourceMode) === 'Embed'}`,\n duration: loggerPayload.duration || -1,\n clientTimestamp: new Date().toISOString(),\n hashedOid,\n tid: tid || '',\n isLoggedIn: `${!!signedIn}`,\n isMSA: `${!!isMSAUser}`,\n accountType: userSegment || '',\n collection,\n level,\n appName\n });\n (_this__1dsLogger = this._1dsLogger) === null || _this__1dsLogger === void 0 ? void 0 : _this__1dsLogger.trackEvent({\n name: `${this.logMetadata.environment.toUpperCase()}.${collection}`\n }, data);\n if (featureFlags.logToConsole) {\n console.log(JSON.stringify(data));\n }\n } catch (e) {}\n } else {\n this.preLoadEvents.push({\n level,\n collection,\n payload: loggerPayload\n });\n }\n }\n flush() {\n this._1dsLogger.getPostChannel().flush(false);\n }\n constructor(){\n _define_property(this, \"_1dsLogger\", void 0);\n _define_property(this, \"logMetadata\", void 0);\n _define_property(this, \"store\", void 0);\n _define_property(this, \"preLoadEvents\", []);\n }\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nimport { Logger } from './base';\nexport var SystemLogsCollection = /*#__PURE__*/ function(SystemLogsCollection) {\n SystemLogsCollection[\"OutgoingRequests\"] = \"OutgoingRequests\";\n return SystemLogsCollection;\n}({});\nexport class SystemLoggerTelemetry extends Logger {\n info({ collection = \"OutgoingRequests\", event }) {\n this.log('Info', collection, _object_spread({}, event));\n }\n debug({ collection = \"OutgoingRequests\", event }) {\n this.log('Debug', collection, _object_spread({}, event));\n }\n error({ collection = \"OutgoingRequests\", event }) {\n this.log('Error', collection, _object_spread({}, event));\n }\n warning({ collection = \"OutgoingRequests\", event }) {\n this.log('Warn', collection, _object_spread({}, event));\n }\n}\n","import { AuthPlugin, AuthType } from '@microsoft/1ds-auth-js';\nimport { PropertiesPlugin } from '@microsoft/1ds-properties-js';\nimport { CorrelationVectorPlugin } from '@microsoft/1ds-cv-js';\nimport { QosPlugin } from '@microsoft/1ds-qos-js';\nimport { getWindow } from '@shared/services/window';\nimport { Constants, Environment, OneDSEnvs } from '@shared/utils/constants';\nimport * as appConfig from '@shared/services/init/appConfig';\nimport { getGPCValue } from '@shared/utils/privacyUtils';\nconst envsMap = {\n [Environment.Production]: OneDSEnvs.Production,\n [Environment.Canary]: OneDSEnvs.Canary,\n [Environment.Development]: OneDSEnvs.Internal,\n [Environment.Dogfood]: OneDSEnvs.Dogfood,\n [Environment.Test]: OneDSEnvs.Test\n};\nconst getEnvName = ()=>{\n var _getWindow___INITIAL_STATE___config_siteEnvironment, _getWindow___INITIAL_STATE___config, _getWindow___INITIAL_STATE__, _getWindow, _process_env, _process;\n var _getWindow___INITIAL_STATE___config_siteEnvironment_toLowerCase;\n const siteEnvironment = (_getWindow___INITIAL_STATE___config_siteEnvironment_toLowerCase = (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow___INITIAL_STATE__ = _getWindow.__INITIAL_STATE__) === null || _getWindow___INITIAL_STATE__ === void 0 ? void 0 : (_getWindow___INITIAL_STATE___config = _getWindow___INITIAL_STATE__.config) === null || _getWindow___INITIAL_STATE___config === void 0 ? void 0 : (_getWindow___INITIAL_STATE___config_siteEnvironment = _getWindow___INITIAL_STATE___config.siteEnvironment) === null || _getWindow___INITIAL_STATE___config_siteEnvironment === void 0 ? void 0 : _getWindow___INITIAL_STATE___config_siteEnvironment.toLowerCase()) !== null && _getWindow___INITIAL_STATE___config_siteEnvironment_toLowerCase !== void 0 ? _getWindow___INITIAL_STATE___config_siteEnvironment_toLowerCase : (_process = process) === null || _process === void 0 ? void 0 : (_process_env = _process.env) === null || _process_env === void 0 ? void 0 : _process_env.siteEnvironment;\n const env = envsMap[`${siteEnvironment}`];\n if (!env) {\n throw new Error('failed to load env name for telemetry');\n }\n return env;\n};\nconst authPlugin = new AuthPlugin();\nconst propertiesPlugin = new PropertiesPlugin();\nconst cvPlugin = new CorrelationVectorPlugin();\nconst qosPlugin = new QosPlugin();\nconst webAnalyticsConfig = {\n urlCollectQuery: true,\n urlCollectHash: true,\n autoCapture: {\n scroll: true,\n pageView: true,\n onLoad: true,\n onUnload: true,\n click: true,\n resize: true,\n lineage: true,\n jsError: true\n },\n shareAuthStatus: true,\n callback: {\n signedinStatus: ()=>{\n var _getWindow___INITIAL_STATE___users, _getWindow___INITIAL_STATE__, _getWindow;\n var _getWindow___INITIAL_STATE___users_signedIn;\n return (_getWindow___INITIAL_STATE___users_signedIn = (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow___INITIAL_STATE__ = _getWindow.__INITIAL_STATE__) === null || _getWindow___INITIAL_STATE__ === void 0 ? void 0 : (_getWindow___INITIAL_STATE___users = _getWindow___INITIAL_STATE__.users) === null || _getWindow___INITIAL_STATE___users === void 0 ? void 0 : _getWindow___INITIAL_STATE___users.signedIn) !== null && _getWindow___INITIAL_STATE___users_signedIn !== void 0 ? _getWindow___INITIAL_STATE___users_signedIn : false;\n }\n }\n};\nconst authConfig = {\n authType: AuthType.AAD,\n loggedInStatusCallback: ()=>{\n var _getWindow___INITIAL_STATE___users, _getWindow___INITIAL_STATE__, _getWindow;\n var _getWindow___INITIAL_STATE___users_signedIn;\n return (_getWindow___INITIAL_STATE___users_signedIn = (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow___INITIAL_STATE__ = _getWindow.__INITIAL_STATE__) === null || _getWindow___INITIAL_STATE__ === void 0 ? void 0 : (_getWindow___INITIAL_STATE___users = _getWindow___INITIAL_STATE__.users) === null || _getWindow___INITIAL_STATE___users === void 0 ? void 0 : _getWindow___INITIAL_STATE___users.signedIn) !== null && _getWindow___INITIAL_STATE___users_signedIn !== void 0 ? _getWindow___INITIAL_STATE___users_signedIn : false;\n }\n};\nconst propertiesPluginConfig = ()=>{\n var _getGPCValue;\n return {\n populateBrowserInfo: true,\n populateOperatingSystemInfo: true,\n enableApplicationInsightsTrace: true,\n enableApplicationInsightsUser: true,\n userConsentCookieName: Constants.Cookies.privacyConsentAcceptedDate,\n env: getEnvName(),\n // eslint-disable-next-line camelcase\n gpcDataSharingOptIn: (_getGPCValue = getGPCValue()) !== null && _getGPCValue !== void 0 ? _getGPCValue : true,\n callback: {\n userConsentDetails: ()=>appConfig.get('siteConsent')\n }\n };\n};\nconst qosConfig = ()=>{\n var _getWindow;\n return {\n disableAjaxTracking: false,\n disableFetchTracking: false,\n maxAjaxCallsPerView: -1,\n excludeRequestFromAutoTrackingPatterns: [\n (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : _getWindow.__INITIAL_STATE__.config.telemetryEndpoint.toLowerCase()\n ]\n };\n};\nexport const config = ()=>{\n var _getWindow, _getWindow1;\n return {\n propertyConfiguration: propertiesPluginConfig(),\n instrumentationKey: (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : _getWindow.__INITIAL_STATE__.config.loggingInstrumentationKey,\n endpointUrl: (_getWindow1 = getWindow()) === null || _getWindow1 === void 0 ? void 0 : _getWindow1.__INITIAL_STATE__.config.telemetryEndpoint,\n webAnalyticsConfiguration: webAnalyticsConfig,\n extensions: [\n authPlugin,\n propertiesPlugin,\n cvPlugin,\n qosPlugin\n ],\n extensionConfig: {\n [authPlugin.identifier]: authConfig,\n [propertiesPlugin.identifier]: propertiesPluginConfig(),\n [qosPlugin.identifier]: qosConfig()\n },\n perfEvtsSendAll: true\n };\n};\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { BrowserPerformanceClient, PublicClientApplication } from '@azure/msal-browser';\nimport { logger } from '@src/logger';\nimport { Constants } from '@shared/utils/constants';\nimport { stringifyError } from '@shared/utils/errorUtils';\nimport { getConfig } from './config';\nclass AuthClient {\n static getInstance() {\n if (__CLIENT__) {\n if (!AuthClient.instance) {\n const config = getConfig();\n AuthClient.instance = new PublicClientApplication(_object_spread_props(_object_spread({}, config), {\n telemetry: {\n client: new BrowserPerformanceClient(config)\n }\n }));\n }\n return AuthClient.instance;\n } else {\n console.warn('Cannot get PCA instance on server');\n return null;\n }\n }\n static initialize({ onSuccess, onFailure }) {\n return _async_to_generator(function*() {\n const instance = AuthClient.getInstance();\n if (!AuthClient.initialized) {\n try {\n yield instance.initialize();\n AuthClient.initialized = true;\n onSuccess();\n logger.info('MSAL initialized successfully', {\n action: Constants.Telemetry.Action.Login,\n actionModifier: Constants.Telemetry.ActionModifier.MsalInitializationSuccess\n });\n } catch (error) {\n onFailure === null || onFailure === void 0 ? void 0 : onFailure();\n logger.error(stringifyError(error), {\n action: Constants.Telemetry.Action.Login,\n actionModifier: Constants.Telemetry.ActionModifier.MsalInitializationError,\n error\n });\n }\n } else {\n onSuccess();\n }\n })();\n }\n // eslint-disable-next-line no-useless-constructor\n constructor(){\n // Private constructor to prevent direct construction calls\n }\n}\n_define_property(AuthClient, \"instance\", void 0);\n_define_property(AuthClient, \"initialized\", false);\nexport default AuthClient;\n","import { BrowserCacheLocation } from '@azure/msal-browser';\nimport { getWindow } from '@shared/services/window';\nimport { getRedirectLoginUrl } from './windowUtils';\nexport const getSilentRedirectUri = ()=>`${getRedirectLoginUrl()}/auth-redirect.html`;\nexport const getImplicitRedirectUri = ()=>`${getRedirectLoginUrl()}/redirect`;\nexport const getConfig = ()=>{\n const { aadApplicationId, aadLoginUrl } = getWindow().__INITIAL_STATE__.config;\n return {\n auth: {\n clientId: aadApplicationId,\n authority: `${aadLoginUrl}organizations`,\n redirectUri: getSilentRedirectUri(),\n navigateToLoginRequestUrl: true\n },\n system: {\n allowNativeBroker: false,\n iframeHashTimeout: 20000\n },\n cache: {\n cacheLocation: BrowserCacheLocation.MemoryStorage,\n storeAuthStateInCookie: true,\n secureCookies: true\n }\n };\n};\n","import { getWindow } from '@shared/services/window';\nimport { isEmbedded } from '@shared/utils/appUtils';\nexport const getScopeByAADResource = ()=>{\n const { aadApplicationId, marketplaceLeadsAudienceId, jarvisCM, mprpAadApplicationId, pifdEndpoint, commerceApi, graphApi, agreementAppId } = getWindow().__INITIAL_STATE__.config;\n return {\n spza: `${aadApplicationId}/.default`,\n arm: `${mprpAadApplicationId}.default`,\n graph: `${graphApi}/.default`,\n pifd: `${pifdEndpoint}.default`,\n commerce: `${commerceApi}/.default`,\n jarvis: `${jarvisCM}.default`,\n marketplaceLeads: `${marketplaceLeadsAudienceId}/.default`,\n agreement: `${agreementAppId}/.default`\n };\n};\nexport const getExtraScopesToConsent = ()=>{\n return isEmbedded() ? [] : [\n getScopeByAADResource().arm\n ];\n};\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { getScopeByAADResource } from './scopes';\nimport { Constants } from '@shared/utils/constants';\nimport { logger } from '@src/logger';\nimport AuthClient from './client';\nimport { pick } from 'lodash-es';\nexport const fetchAccessTokens = /*#__PURE__*/ function() {\n var _ref = _async_to_generator(function*({ resources }) {\n const scopesByResource = getScopeByAADResource();\n const filteredScopesByResource = pick(scopesByResource, resources);\n const filteredResources = Object.keys(filteredScopesByResource);\n const results = yield Promise.allSettled(filteredResources.map((resource)=>{\n return AuthClient.getInstance().acquireTokenSilent({\n scopes: [\n filteredScopesByResource[`${resource}`]\n ],\n forceRefresh: true\n });\n }));\n return results.reduce((acc, result, index)=>{\n const resource = filteredResources[`${index}`];\n if (result.status === 'rejected') {\n logger.error(JSON.stringify({\n resource,\n error: result.reason\n }), {\n action: Constants.Telemetry.Action.Login,\n actionModifier: Constants.Telemetry.ActionModifier.AccessTokenSilentFetchingError,\n error: result.reason\n });\n } else {\n logger.info(JSON.stringify({\n resource,\n fromCache: result.value.fromCache\n }), {\n action: Constants.Telemetry.Action.Login,\n actionModifier: Constants.Telemetry.ActionModifier.AccessTokenSilentFetchingSuccess\n });\n }\n return _object_spread_props(_object_spread({}, acc), {\n [`${resource}`]: result.status === 'fulfilled' ? result.value.accessToken : ''\n });\n }, {});\n });\n return function fetchAccessTokens(_) {\n return _ref.apply(this, arguments);\n };\n}();\n","import { getWindow } from '@shared/services/window';\nconst redirectLoginSuffix = ()=>{\n var _getWindow, _getWindow1, _getWindow2;\n const isHttps = ((_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : _getWindow.location.port) === '443' || ((_getWindow1 = getWindow()) === null || _getWindow1 === void 0 ? void 0 : _getWindow1.location.protocol) === 'https:';\n const retVal = !isHttps && `:${(_getWindow2 = getWindow()) === null || _getWindow2 === void 0 ? void 0 : _getWindow2.location.port}` || '';\n return retVal;\n};\nexport const getRedirectLoginUrl = ()=>{\n var _getWindow, _getWindow1;\n return `${(_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : _getWindow.location.protocol}//${(_getWindow1 = getWindow()) === null || _getWindow1 === void 0 ? void 0 : _getWindow1.location.hostname}${redirectLoginSuffix()}`;\n};\n","import { getWindow } from '../services/window';\nexport const listOfUrlKeysToExcludeInAppsource = [\n 'all',\n 'admin-portal',\n 'other-unsegmented',\n 'all-office',\n 'azure',\n 'dynamics-365-for-operations'\n];\nexport const listOfUrlKeysTopLevelInAmp = [\n 'apps',\n 'featured',\n 'trending',\n 'top-test-drives',\n 'operating-systems',\n 'devops',\n 'onprem-to-cloud-migration',\n 'consulting-services'\n];\nexport const listOfUrlKeysToShowInHomePageAppsource = [\n 'web-apps',\n 'power-platform',\n 'dynamics-365',\n 'office',\n 'analytics',\n 'ai-machine-learning',\n 'ai-for-business',\n 'bot-apps',\n 'collaboration',\n 'project-management',\n 'compliance-legals',\n 'customer-service',\n 'finance',\n 'geolocation',\n 'human-resources',\n 'internet-of-things',\n 'it-management-tools',\n 'commerce',\n 'marketing',\n 'operations',\n 'productivity',\n 'sales',\n 'automotive',\n 'defense-and-intelligence',\n 'distribution',\n 'education',\n 'financial-services',\n 'government',\n 'healthcare',\n 'hospitality-and-travel',\n 'energy',\n 'manufacturing-resources',\n 'retail-and-consumer-goods',\n 'media-communications',\n 'professional-services',\n 'nonprofit',\n 'sustainability'\n];\nexport const oldToNewUrlKeys = {\n 'dashboard-data-visualization': 'visualization-reporting',\n 'ai-machine-learning': 'ai-plus-machine-learning',\n 'contact-management': 'contact-and-people',\n 'meeting-calendar-management': 'meeting-management',\n 'site-design-management': 'site-design-and-management',\n 'voice-video-conferencing': 'voice-and-video-conferencing',\n 'project-management': 'task-and-project-management',\n 'compliance-legals': 'compliance-and-legal',\n 'tax-audit': 'tax-and-audit',\n 'data-governance-privacy': 'data-governance-and-privacy',\n 'health-safety': 'health-and-safety',\n 'back-office-employee-service': 'back-office-and-employee-service',\n 'knowledge-case-management': 'knowledge-and-case-management',\n 'social-media-omnichannel-engagement': 'social-media-and-omnichannel-engagement',\n 'analytics-consolidation-reporting': 'analytics-consolidation-and-reporting',\n 'payments-credit-collections': 'credit-and-collections',\n 'compliance-risk-management': 'compliance-and-risk-management',\n 'geolocation-maps': 'maps',\n 'people-analytics-and-Insights': 'workforce-planning-and-analytics',\n 'asset-management-operations': 'asset-management-and-operations',\n 'safety-security': 'safety-and-security',\n 'smart-infrastructure-resources': 'smart-infrastructure-and-resources',\n 'vehicles-mobility': 'vehicles-and-mobility',\n 'it-management-tools': 'it-and-management-tools',\n commerce: 'Commerce',\n 'e-commerce-social-commerce-and-marketplaces': 'e-commerce',\n 'marketing-analytics': 'analytics-marketing',\n 'campaign-management-automation': 'campaign-management-and-automation',\n 'events-resource-management': 'events-and-resource-management',\n 'research-analysist': 'research-and-analysis',\n operations: 'operations-and-supply-chain',\n 'asset-production-management': 'asset-and-production-management',\n 'information-management-connectivity': 'information-management-and-connectivity',\n 'planning-purchasing-reporting': 'planning-purchasing-and-reporting',\n 'quality-service-management': 'quality-and-service-management',\n 'sales-order-management': 'sales-and-order-management',\n 'transportation-warehouse-management': 'transportation-and-warehouse-management',\n 'content-creation-management': 'content-creation-and-management',\n 'language-translation': 'language-and-translation',\n 'document-and-file-management': 'document-management',\n 'search-reference': 'search-and-reference',\n sales: 'Sales',\n 'business-data-management': 'business-data-enrichment',\n 'primary-secondary-education': 'primary-and-secondary-education',\n banking: 'banking-and-capital-markets',\n 'life-sciences': 'pharmaceuticals',\n 'manufacturing-resources': 'manufacturing-and-resources',\n 'process-manufacturing': 'chemical-and-agrochemical',\n retailL2: 'retailers',\n 'media-communications': 'media-and-communications',\n 'media-entertainment': 'media-and-entertainment',\n nonprofit: 'other-public-sector-industries',\n sustainability: 'SustainabilityIndustry'\n};\nexport const filterHideList = [\n 'automated-ml',\n 'bot-services',\n 'business-robotic-process-automation',\n 'cognitive-services',\n 'data-labelling',\n 'data-preparation',\n 'knowledge-mining',\n 'ml-operations',\n 'ml-service',\n 'bigData',\n 'data-analytics',\n 'data-insights',\n 'predictive-analytics',\n 'real-time-streaming-analytics',\n 'blockchain',\n 'compute',\n 'containers',\n 'databases',\n 'developer-tools',\n 'devops',\n 'identity',\n 'integration',\n 'data-analytics-and-visualization',\n 'iot-connectivity',\n 'iot-core-services',\n 'iot-edge-modules',\n 'iot-iiot-platforms',\n 'iot-security',\n 'iot-solutions',\n 'media',\n 'migration',\n 'mixed-reality',\n 'monitoring-and-diagnostics',\n 'networking',\n 'security',\n 'storage',\n 'web',\n 'marketing-analytics',\n 'agriculture',\n 'architecture-and-construction',\n 'real-estate'\n];\n// The key is the old, and the value is the oneTaxonomy\nexport const legacyKeyMapping = {\n Analytics: 'analytics',\n ArtificialIntelligence: 'ai-plus-machine-learning',\n Collaboration: 'collaboration',\n Commerce_AS_L1: 'Commerce',\n ComplianceLegal_AS: 'compliance-and-legal',\n CustomerService: 'customer-service',\n Finance: 'finance',\n Geolocation_AS: 'geolocation',\n HumanResources: 'human-resources',\n IoT: 'internet-of-things',\n ITandAdministration: 'it-and-management-tools',\n Marketing: 'marketing',\n OperationsSupplyChain: 'operations-and-supply-chain',\n Productivity: 'productivity',\n ProjectManagement: 'task-and-project-management',\n Automotive_AS: 'automotive',\n DefenseIntelligence_AS_L1: 'defense-and-intelligence',\n Distribution: 'distribution',\n Education: 'education',\n FinancialServices: 'financial-services',\n Government: 'government',\n HealthCareandLifeSciences: 'healthcare',\n HospitalityTravel_AS: 'hospitality-and-travel',\n Energy_AS_L1: 'energy',\n 'manufacturing-resources': 'manufacturing-and-resources',\n RetailandConsumerGoods: 'retail-and-consumer-goods',\n MediaCommunications_AS: 'media-and-communications',\n ProfessionalServices: 'professional-services',\n NonprofitIGO_AS_L1: 'other-public-sector-industries',\n Sustainability_AS: 'SustainabilityIndustry'\n};\nexport const legacySubKeyMapping = {\n AdvancedAnalytics: 'advanced-analytics',\n DashboardDataVisualization_AS: 'visualization-reporting',\n AIBusiness_AS: 'ai-for-business',\n BotApps_AS: 'bot-apps',\n ContactManagement_AS: 'contact-and-people',\n Chat_AS: 'chat',\n MeetingCalendarManagement_AS: 'meeting-management',\n SiteManagement_AS: 'site-design-and-management',\n VoiceVidedoConferencing_AS: 'voice-and-video-conferencing',\n ProjectSalesProposalsBids_AS_L2: 'project-sales-proposals-bids',\n ProjectPlanningTracking_AS_L2: 'project-planning-tracking',\n ProjectResourcePlanningUtilizationMetrics_AS_L2: 'project-resource-planning-utilization-metrics',\n ProjectTimeExpenseReporting_AS_L2: 'project-time-expense-reporting',\n ProjectInvoicing_AS_L2: 'project-invoicing',\n ProjectAccountingRevenueRecognition_AS_L2: 'project-accounting-revenue-recognition',\n TaxAudit_AS: 'tax-and-audit',\n Legal_AS: 'legal',\n DataGovernancePrivacy_AS: 'data-governance-and-privacy',\n HealthSafety_AS: 'health-and-safety',\n ContactCenter_AS: 'contact-center',\n FaceToFaceService_AS: 'face-to-face-service',\n BackOfficeEmployeeService_AS: 'back-office-and-employee-service',\n KnowledgeManagement_AS: 'knowledge-and-case-management',\n SocialOmnichannelEngagement_AS: 'social-media-and-omnichannel-engagement',\n Accounting_AS: 'accounting',\n AssetManagement_AS: 'asset-management',\n AnalyticsReporting_AS: 'analytics-consolidation-and-reporting',\n PaymentsCreditCollections_AS: 'credit-and-collections',\n ComplianceRiskManagement_AS: 'compliance-and-risk-management',\n Maps_AS: 'maps',\n NewsWeather_AS: 'news-and-weather',\n AddressValidation_AS: 'address-validation',\n TalentAcquisition_AS: 'talent-acquisition',\n TalentManagement_AS: 'talent-management',\n HROperations_AS: 'hr-operations',\n PeopleAnalyticsInsights_AS: 'workforce-planning-and-analytics',\n AssetManagementOperations_AS: 'asset-management-and-operations',\n ConnectedProducts_AS: 'connected-products',\n IntelligentSupplyChain_AS: 'intelligent-supply-chain',\n PredictiveMaintenance_AS: 'predictive-maintenance',\n RemoteMonitoring_AS: 'remote-monitoring',\n SafetySecurity_AS: 'safety-and-security',\n SmartInfraResources_AS: 'smart-infrastructure-and-resources',\n VehiclesMobility_AS: 'vehicles-and-mobility',\n ManagementSolutions_AS: 'management-solutions',\n BusinessApplications_AS: 'business-applications',\n StoreManagement_AS_L2: 'store-management',\n LoyaltyGifting_AS_L2: 'loyalty-gifting',\n ProductInformationContentManagement_AS_L2: 'product-information-content-management',\n PersonalizationRatingsReviews_AS_L2: 'personalization-ratings-reviews',\n SubscriptionPostPurchaseServices_AS_L2: 'subscription-post-purchase-services',\n Advertisement_AS: 'advertisement',\n Analytics_AS: 'analytics-marketing',\n CampaignMgMAutomation_AS: 'campaign-management-and-automation',\n EmailMarketing_AS: 'email-marketing',\n EventsResourceManagement_AS: 'events-and-resource-management',\n ResearchAnalysis_AS: 'research-and-analysis',\n SocialMedia_AS: 'social-media',\n PricingOptimization_AS: 'pricing-optimization',\n AssetProdManagement_AS: 'asset-and-production-management',\n DemandForecasting_AS: 'demand-forecasting',\n InfoMgMConnectivity_AS: 'information-management-and-connectivity',\n PlanPurchasingReporting_AS: 'planning-purchasing-and-reporting',\n QualityServiceManagement_AS: 'quality-and-service-management',\n SalesOrderManagement_AS: 'sales-and-order-management',\n TransportManagement_AS: 'transportation-and-warehouse-management',\n ContentCreationMgmt_AS: 'content-creation-and-management',\n LanguageTranslation_AS: 'language-and-translation',\n DocumentFileManagement_AS: 'document-management',\n WorkflowAutomation_AS: 'workflow-automation',\n Blogs_AS: 'blogs',\n EmailManagement_AS: 'email-management',\n SearchReference_AS: 'search-and-reference',\n Gamification_AS: 'gamification',\n Telesales_AS: 'telesales',\n ConfigurePriceQuote_AS: 'configure-price-quote',\n ContractManagement_AS: 'contract-management',\n CRM_AS: 'crm',\n BusinessDataManagement_AS: 'business-data-enrichment',\n SalesEnablement_AS: 'sales-enablement',\n ParcelPackageShipping_AS: 'parcel-and-package-shipping',\n Wholesale_AS: 'wholesale',\n HigherEducation_AS: 'higher-education',\n PrimarySecondaryEducation_AS: 'primary-and-secondary-education',\n LibrariesMuseums_AS: 'libraries-and-museums',\n Banking_AS: 'banking-and-capital-markets',\n Insurance_AS: 'insurance',\n CapitalMarkets_AS: 'capital-markets',\n PublicFinance_AS: 'public-finance',\n CriticalInfrastructure_AS: 'critical-infrastructure',\n CivilianGovernment_AS: 'civilian-government',\n PublicSafetyJustice_AS: 'public-safety-and-justice',\n HealthPayor_AS: 'health-payor',\n HealthProvider_AS: 'health-provider',\n Life_Sciences_AS: 'pharmaceuticals',\n HotelsLeisure_AS: 'hotels-and-leisure',\n TravelTransportation_AS: 'travel-and-transportation',\n RestaurantsFoodServices_AS: 'restaurants-and-food-services',\n ProcessManufacturing_AS_L2: 'chemical-and-agrochemical',\n DiscreteManufacturing_AS_L2: 'discrete-manufacturing',\n ConsumerGoods_AS_L2: 'consumer-goods',\n Retail_AS_L2: 'retailers',\n MediaEntertainment_AS: 'media-and-entertainment',\n Telecommunications_AS: 'telecommunications',\n PartnerProfessionalServices_AS: 'partner-professional-services',\n ArchitectureConstruction_AS_L2: 'architecture-and-construction',\n RealEstate_AS_L2: 'real-estate'\n};\nexport const urlKeysMapping = {\n 'dashboard-data-visualization': 'visualization-reporting',\n 'ai-machine-learning': 'ai-plus-machine-learning',\n 'contact-management': 'contact-and-people',\n 'meeting-calendar-management': 'meeting-management',\n 'site-design-management': 'site-design-and-management',\n 'voice-video-conferencing': 'voice-and-video-conferencing',\n 'project-management': 'task-and-project-management',\n 'compliance-legals': 'compliance-and-legal',\n 'tax-audit': 'tax-and-audit',\n 'data-governance-privacy': 'data-governance-and-privacy',\n 'health-safety': 'health-and-safety',\n 'back-office-employee-service': 'back-office-and-employee-service',\n 'knowledge-case-management': 'knowledge-and-case-management',\n 'social-media-omnichannel-engagement': 'social-media-and-omnichannel-engagement',\n 'analytics-consolidation-reporting': 'analytics-consolidation-and-reporting',\n 'payments-credit-collections': 'credit-and-collections',\n 'compliance-risk-management': 'compliance-and-risk-management',\n 'geolocation-maps': 'maps',\n 'people-analytics-and-Insights': 'workforce-planning-and-analytics',\n 'asset-management-operations': 'asset-management-and-operations',\n 'safety-security': 'safety-and-security',\n 'smart-infrastructure-resources': 'smart-infrastructure-and-resources',\n 'vehicles-mobility': 'vehicles-and-mobility',\n 'it-management-tools': 'it-and-management-tools',\n commerce: 'Commerce',\n 'e-commerce-social-commerce-and-marketplaces': 'undefined',\n 'marketing-analytics': 'analytics-marketing',\n 'campaign-management-automation': 'campaign-management-and-automation',\n 'events-resource-management': 'events-and-resource-management',\n 'research-analysist': 'research-and-analysis',\n operations: 'operations-and-supply-chain',\n 'asset-production-management': 'asset-and-production-management',\n 'information-management-connectivity': 'information-management-and-connectivity',\n 'planning-purchasing-reporting': 'planning-purchasing-and-reporting',\n 'quality-service-management': 'quality-and-service-management',\n 'sales-order-management': 'sales-and-order-management',\n 'transportation-warehouse-management': 'transportation-and-warehouse-management',\n 'content-creation-management': 'content-creation-and-management',\n 'language-translation': 'language-and-translation',\n 'document-and-file-management': 'document-management',\n 'search-reference': 'search-and-reference',\n sales: 'Sales',\n 'business-data-management': 'business-data-enrichment',\n 'primary-secondary-education': 'primary-and-secondary-education',\n banking: 'banking-and-capital-markets',\n 'life-sciences': 'pharmaceuticals',\n 'manufacturing-resources': 'manufacturing-and-resources',\n 'process-manufacturing': 'chemical-and-agrochemical',\n retailL2: 'retailers',\n 'media-communications': 'media-and-communications',\n 'media-entertainment': 'media-and-entertainment',\n nonprofit: 'other-public-sector-industries',\n sustainability: 'SustainabilityIndustry'\n};\nexport const isOneTaxonomyEnabled = ()=>{\n var _process, _getWindow___INITIAL_STATE___config, _getWindow___INITIAL_STATE__, _getWindow;\n return ((_process = process) === null || _process === void 0 ? void 0 : _process.env.enableOneTaxonomy) === 'true' || ((_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow___INITIAL_STATE__ = _getWindow.__INITIAL_STATE__) === null || _getWindow___INITIAL_STATE__ === void 0 ? void 0 : (_getWindow___INITIAL_STATE___config = _getWindow___INITIAL_STATE__.config) === null || _getWindow___INITIAL_STATE___config === void 0 ? void 0 : _getWindow___INITIAL_STATE___config.enableOneTaxonomy);\n};\nexport const newToOldUrlKeys = Object.fromEntries(Object.entries(oldToNewUrlKeys).map(([newKey, oldKey])=>[\n oldKey,\n newKey\n ]));\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { reduce, isEmpty, isEqualWith, isArray, differenceWith, isEqual } from 'lodash-es';\nimport xss from 'xss';\nimport { stringifyError } from '@shared/utils/errorUtils';\nimport { logger } from '@src/logger';\nconst objCompare = (obj1, obj2)=>{\n return isEqualWith(obj1, obj2, function(v1, v2, key) {\n if (key === undefined) {\n return undefined;\n }\n if (v1 === v2) {\n return true;\n }\n if (isArray(v1) && isArray(v2)) {\n if (isEmpty(differenceWith(v1, v2, isEqual))) {\n return true;\n }\n }\n return false;\n });\n};\nconst recursiveDecode = ({ value, run = 3 })=>{\n if (run <= 0) {\n return value;\n }\n const decodedValue = decodeURIComponent(value);\n return decodedValue === value ? value : recursiveDecode({\n value: decodedValue,\n run: --run\n });\n};\nconst parseQuery = ({ query = {}, parser })=>reduce(query, (acc, value, key)=>{\n const decodedValue = isArray(value) && value.map((arrayValue)=>parser(arrayValue)) || parser(value);\n return _object_spread_props(_object_spread({}, acc), {\n [parser(key)]: decodedValue\n });\n }, {});\nconst decodeString = (value)=>recursiveDecode({\n value\n });\nconst xssDecodeString = (value)=>{\n return xss(decodeString(value));\n};\nconst decodeQuery = (query)=>{\n return parseQuery({\n query,\n parser: (value)=>decodeString(value)\n });\n};\nconst xssDecodeQuery = (query)=>{\n return parseQuery({\n query,\n parser: (value)=>xssDecodeString(value)\n });\n};\nexport const getXssDiff = ({ req: { url, query } })=>{\n let hasDiff = false;\n try {\n const decodedUrl = decodeString(JSON.parse(`\"${url}\"`));\n const xssDecodedUrl = xssDecodeString(decodedUrl);\n const hasUrlDiff = decodedUrl !== xssDecodedUrl;\n const decodedQuery = decodeQuery(query);\n const xssDecodedQuery = xssDecodeQuery(query);\n const hasQueryDiff = !objCompare(decodedQuery, xssDecodedQuery);\n hasDiff = hasQueryDiff || hasUrlDiff;\n } catch (e) {\n hasDiff = true;\n logger.debug(stringifyError({\n msg: 'failed to parse query diff',\n err: e\n }), {\n action: 'xssMiddleware'\n });\n }\n return hasDiff;\n};\nexport const getXssDiffString = ({ url })=>{\n const urlObject = new URL(url);\n return getXssDiff({\n req: {\n url: urlObject.pathname,\n query: Object.fromEntries(urlObject.searchParams)\n }\n });\n};\n","/* eslint-disable security/detect-non-literal-fs-filename */ function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { createBrowserHistory } from 'history';\nimport React from 'react';\nimport { matchRoutes, useLocation, useNavigate, useParams } from 'react-router';\nimport { Constants } from '@shared/utils/constants';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { getWindow, getDocument } from '@shared/services/window';\nimport { IFeatureFlags } from '../State';\nimport { campaignParams, getAppViewParams } from '@shared/utils/routeUtils';\nimport { saveDataToBrowserAfterUserAgreedPrivacyConsent } from '@shared/utils/browserStorageUtils';\nimport { getCanonicalLink } from '@shared/utils/seoUtils';\nimport { getHostFromBrowserUrl, getProtocolFromBrowserUrl } from './utils/urlUtils';\nimport { getAppConfig } from '@shared/services/init/appConfig';\nimport { useTelemetry } from '@shared/hooks/useTelemetry';\nimport { logger } from '@src/logger';\nimport { getXssDiffString } from '@shared/utils/xssUtils';\nconst EMBED_PREFIX = '/embed';\nlet isEmbedded = false;\nlet appRoutes = [];\nexport let previousPage = '';\nexport let appHistory = null;\nexport const canonicalLink = (originalUrl)=>{\n var _document_documentElement;\n const document = getDocument();\n const canonical = document === null || document === void 0 ? void 0 : (_document_documentElement = document.documentElement) === null || _document_documentElement === void 0 ? void 0 : _document_documentElement.querySelector(\"link[rel='canonical']\");\n if (canonical) {\n const appName = getAppConfig('appName');\n const isMac = appName === Constants.canonicalAMPEnvAppName;\n const host = getHostFromBrowserUrl();\n const protocol = getProtocolFromBrowserUrl();\n const canonicalLinkPrefix = `${protocol}//${host}`;\n const canonicalLink = getCanonicalLink(originalUrl, isMac);\n const documentCanonicalLink = `${canonicalLinkPrefix}${canonicalLink}`;\n canonical.setAttribute('href', documentCanonicalLink);\n }\n};\nfunction embedURL(url) {\n return url.startsWith(EMBED_PREFIX) ? url : `${EMBED_PREFIX}${url}`;\n}\nfunction isRouteChangingAction(action) {\n return [\n 'PUSH',\n 'POP',\n 'REPLACE'\n ].indexOf(action) > -1;\n}\nexport function isValidRoute(location) {\n const base = isEmbedded ? EMBED_PREFIX : '/';\n return Boolean(matchRoutes(appRoutes, location, base));\n}\nfunction onRouteChanged(location) {\n const originalUrl = location.pathname + location.search;\n const payload = {\n page: originalUrl,\n action: Constants.Telemetry.Action.RouteChanged,\n actionModifier: Constants.Telemetry.ActionModifier.Start,\n details: JSON.stringify({\n previousPage\n })\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n page: payload.page\n });\n canonicalLink(originalUrl);\n}\nfunction refererByCallbackUrl(location) {\n const { pathname, search } = location;\n if (pathname.includes('/callback')) {\n const searchParams = new URLSearchParams(search);\n const state = searchParams.get('state');\n if (!state) {\n return null;\n }\n try {\n const _state = JSON.parse(state);\n const decodedFrom = decodeURIComponent(_state.from);\n const stateHostname = decodeURIComponent(_state.hostName);\n return (decodedFrom === null || decodedFrom === void 0 ? void 0 : decodedFrom.startsWith(stateHostname)) && !getXssDiffString({\n url: decodedFrom\n }) ? decodedFrom : pathname;\n } catch (e) {\n return null;\n }\n }\n return null;\n}\nexport function initRouterHistory(args) {\n var _args_embedded;\n const embedded = (_args_embedded = args.embedded) !== null && _args_embedded !== void 0 ? _args_embedded : false;\n appRoutes = args.appRoutes;\n isEmbedded = embedded;\n appHistory = createBrowserHistory({\n window: getWindow()\n });\n let previousLocation = getWindow().location;\n // in case client receives a /callback path as a result of post-sso-login we want the client to render the referer url and not the callback url\n if (previousLocation.pathname.includes('/callback')) {\n const refererPathname = refererByCallbackUrl(previousLocation);\n if (refererPathname) {\n appHistory.push(refererPathname);\n }\n }\n appHistory.listen((update)=>{\n if (isRouteChangingAction(update.action)) {\n onRouteChanged(previousLocation);\n }\n previousLocation = getWindow().location;\n });\n}\n// These object defines valid queryParams for the different states in the app. This allows us to\n// 'smartly' drop and add query parameters when navigating between pages\nconst FilterQuery = Constants.FilterQuery;\nexport const routeParams = {\n appView: getAppViewParams().concat(Object.keys(new IFeatureFlags())),\n home: [\n 'successStoryTab'\n ],\n marketplace: [\n FilterQuery.industry,\n FilterQuery.category,\n FilterQuery.subcategories,\n FilterQuery.subindustries,\n FilterQuery.product,\n 'search',\n 'showPrivateApps',\n 'page',\n 'pageSize',\n 'serviceType',\n 'country',\n 'region',\n 'certification',\n 'filters',\n FilterQuery.sortBy\n ],\n partnersDir: [\n 'filter',\n 'contact'\n ],\n partnerSuggestion: [\n 'text',\n 'type',\n 'value'\n ],\n blog: [],\n appDetails: [\n 'breadcrumbUrl',\n 'tab',\n 'survey'\n ],\n checkout: [],\n orderConfirmation: [],\n myReviews: [],\n localePicker: [],\n partners: [],\n partnersForm: [],\n partnerDetail: [\n 'breadcrumbUrl',\n 'tab'\n ],\n sell: [],\n about: [],\n serviceDetail: [\n 'breadcrumbUrl'\n ],\n userFavouriteDetail: [],\n privateOffersDetail: [],\n sitemap: []\n};\nexport const routes = {\n localePicker: {\n name: Constants.Views.locale,\n getPath: ()=>'/localepicker',\n params: routeParams.localePicker.concat(routeParams.appView)\n },\n home: {\n name: Constants.Views.home,\n getPath: ()=>'/home',\n params: routeParams.home.concat(routeParams.appView)\n },\n marketplace: {\n name: Constants.Views.appGallery,\n getPath: ()=>`/${Constants.appsGallery}`,\n params: routeParams.marketplace.concat(routeParams.appView),\n initialParamsValue: {\n page: '1',\n search: null,\n sortBy: null,\n [FilterQuery.filters]: null,\n [FilterQuery.category]: null,\n [FilterQuery.industry]: null,\n [FilterQuery.subcategories]: null,\n [FilterQuery.subindustries]: null,\n [FilterQuery.product]: null,\n serviceType: null\n }\n },\n marketplaceCloudsIndustry: {\n name: Constants.Views.cloudsIndustryGallery,\n getPath: ()=>`/${Constants.cloudsIndustryGallery}`,\n params: routeParams.marketplace.concat(routeParams.appView),\n initialParamsValue: {\n page: '1',\n search: null,\n sortBy: null,\n [FilterQuery.filters]: null,\n [FilterQuery.category]: null,\n [FilterQuery.industry]: null,\n [FilterQuery.subcategories]: null,\n [FilterQuery.subindustries]: null,\n [FilterQuery.product]: null,\n serviceType: null\n }\n },\n appDetails: {\n name: Constants.Views.appDetails,\n getPath: (routeArgs)=>'/product/' + routeArgs.productId + '/' + routeArgs.entityId,\n params: routeParams.appDetails.concat(routeParams.appView)\n },\n checkout: {\n name: Constants.Views.checkout,\n getPath: (routeArgs)=>'/marketplace/checkout/' + routeArgs.entityId,\n params: routeParams.checkout.concat(routeParams.appView)\n },\n orderConfirmation: {\n name: Constants.Views.orderConfirmation,\n getPath: ()=>'/marketplace/order-confirmation',\n params: routeParams.orderConfirmation.concat(routeParams.appView)\n },\n partners: {\n name: Constants.Views.partners,\n getPath: ()=>'/partners',\n params: routeParams.partners.concat(routeParams.appView)\n },\n blog: {\n name: Constants.Views.blog,\n getPath: ()=>'/blog',\n params: routeParams.blog.concat(routeParams.appView)\n },\n myReviews: {\n name: Constants.Views.reviews,\n getPath: ()=>'/user/my-reviews',\n params: routeParams.myReviews.concat(routeParams.appView)\n },\n marketing: {\n name: Constants.Views.sell,\n getPath: ()=>'/sell',\n params: routeParams.sell.concat(routeParams.appView)\n },\n about: {\n name: Constants.Views.about,\n getPath: ()=>'/about',\n params: routeParams.about.concat(routeParams.appView)\n },\n billingRegion: {\n name: Constants.Views.billingregion,\n getPath: ()=>'/billingregion',\n params: routeParams.about.concat(routeParams.appView)\n },\n fieldHub: {\n name: Constants.Views.fieldHub,\n getPath: ()=>'/account-hub',\n params: routeParams.about.concat(routeParams.appView)\n },\n marketplaceServices: {\n name: Constants.Views.serviceGallery,\n getPath: ()=>`/${Constants.csGallery}`,\n params: routeParams.marketplace.concat(routeParams.appView),\n featureFlag: 'ServiceOffers'\n },\n serviceDetail: {\n name: Constants.Views.serviceDetails,\n getPath: (routeArgs)=>`/${Constants.csGallery}/` + routeArgs.entityId,\n params: routeParams.serviceDetail.concat(routeParams.appView)\n },\n marketplacePartners: {\n name: Constants.Views.partnersHost,\n getPath: ()=>`/${Constants.partnersAppSource}`,\n params: routeParams.partnersDir.concat(routeParams.appView)\n },\n marketplacePartnerDetail: {\n name: Constants.Views.partnerDetails,\n getPath: (routeArgs)=>`/${Constants.partnersAppSource}/` + routeArgs.entityId + '/' + routeArgs.tabId,\n params: routeParams.partnerDetail.concat(routeParams.appView)\n },\n marketplacePartnerDetailContact: {\n name: Constants.Views.partnerDetailsContact,\n getPath: (routeArgs)=>`/${Constants.partnersAppSource}/` + routeArgs.entityId + '/' + routeArgs.tabId + '/contact',\n params: routeParams.partnerDetail.concat(routeParams.appView)\n },\n marketplacePartnerSuggestion: {\n name: Constants.Views.partnerSuggestion,\n getPath: ()=>`/${Constants.partnersAppSource}/suggestion`,\n params: routeParams.partnerSuggestion.concat(routeParams.appView)\n },\n userFavouriteDetail: {\n name: Constants.Views.userFavouriteDetail,\n getPath: ()=>'/user/my-favourites',\n params: routeParams.userFavouriteDetail.concat(routeParams.appView)\n },\n privateOffers: {\n name: Constants.Views.privateOffers,\n getPath: ()=>'/user/private-offers',\n params: routeParams.privateOffersDetail.concat(routeParams.appView)\n },\n privateOfferDetails: {\n name: Constants.Views.privateOfferDetails,\n getPath: (routeArgs)=>`/${Constants.privateOffers}/product/${routeArgs.productId}/${routeArgs.entityId}`,\n params: routeParams.appDetails.concat(routeParams.appView)\n },\n campaigns: {\n name: Constants.Views.campaigns,\n getPath: (routeArgs)=>`campaigns/${routeArgs.publisher}/${routeArgs.id}`,\n params: routeParams.sitemap.concat(routeParams.appView)\n },\n sitemap: {\n name: Constants.Views.sitemap,\n getPath: ()=>'/sitemap',\n params: routeParams.sitemap.concat(routeParams.appView)\n },\n redirect: {\n name: 'redirect',\n getPath: ()=>'/redirect',\n params: routeParams.sitemap.concat(routeParams.appView)\n }\n};\n// TODO: Support L2 categories\nexport function buildHref(route, oldRouteParams, newRouteParams, oldParams, newParams, keepAllParams, locale, keepCampaignParams) {\n const validQueryParams = route.params;\n // merge old route params\n if (oldRouteParams) {\n const routeKeys = Object.keys(oldRouteParams);\n if (!newRouteParams) {\n newRouteParams = {};\n }\n routeKeys.forEach(function(key) {\n if (oldRouteParams && newRouteParams[`${key}`] === undefined) {\n newRouteParams[`${key}`] = oldRouteParams[`${key}`];\n }\n });\n }\n let path = route.getPath(newRouteParams);\n if (locale) {\n path = '/' + locale + path;\n }\n const targetParams = {};\n for(const op in oldParams){\n targetParams[`${op}`] = oldParams[`${op}`];\n }\n if (!keepCampaignParams) {\n campaignParams.forEach((campaignParam)=>{\n if (targetParams[`${campaignParam}`]) {\n delete targetParams[`${campaignParam}`];\n }\n });\n }\n for(const np in newParams){\n const v = newParams[`${np}`];\n if (!v) {\n if (targetParams[`${np}`]) {\n delete targetParams[`${np}`];\n }\n continue;\n }\n const startChar = v.charAt(0);\n // ';' leading a string means to append to exist params\n if (startChar === ';') {\n const newParam = v.substr(1);\n // No existing params for the current key\n if (!oldParams[`${np}`]) {\n targetParams[`${np}`] = newParam;\n } else {\n const splitParams = newParam.split(';');\n targetParams[`${np}`] = splitParams.reduce((acc, key)=>{\n const keyLength = key.length;\n const keyIndex = targetParams[`${np}`].indexOf(key);\n // make sure it's not a subset of another item\n // e.g web-apps: starter-web-apps or web-apps-framework\n // the word web-apps is found in both however it is also an option on its own\n if (keyIndex > 0) {\n const previousCharacter = targetParams[`${np}`][keyIndex - 1];\n const endCharacter = targetParams[`${np}`][keyIndex + keyLength];\n // if it is encapsulated by ';'\n // or preceded by ';' and is the last word\n // it means we found the perfect match\n if (previousCharacter === ';' && (!endCharacter || endCharacter === ';')) {\n return acc;\n }\n }\n return acc + ';' + key;\n }, targetParams[`${np}`]);\n // should split and join without dupes\n }\n } else if (startChar === '!') {\n const newParam = v.substr(1);\n if (oldParams[`${np}`]) {\n // should split and join without dupes\n const splitNewParams = newParam.split(';');\n const splitOldParams = oldParams[`${np}`].split(';');\n // eslint-disable-next-line array-callback-return\n splitNewParams.map((key)=>{\n const pos = splitOldParams.indexOf(key);\n if (pos >= 0) {\n splitOldParams.splice(pos, 1);\n }\n });\n targetParams[`${np}`] = splitOldParams.join(';');\n if (targetParams[`${np}`].length === 0) {\n delete targetParams[`${np}`];\n }\n }\n } else {\n targetParams[`${np}`] = v;\n }\n }\n // DIY createHref because browserHistory doesn't work\n // return browserHistory.createHref({ pathname: path, query: targetParams });\n let queryString = '';\n let emptyQuery = true;\n for(const tp in targetParams){\n if (validQueryParams.indexOf(tp) >= 0 || validQueryParams.indexOf(tp && tp.toLowerCase()) >= 0 || keepAllParams) {\n queryString += (emptyQuery ? '?' : '&') + tp + '=' + encodeURIComponent(targetParams[`${tp}`]);\n emptyQuery = false;\n }\n }\n const relativeUrl = `${path}${queryString}`;\n return relativeUrl;\n}\nexport function appendQueryParams(path, queryParams) {\n if (!path) {\n path = '';\n }\n if (queryParams) {\n const keys = Object.keys(queryParams);\n if (keys.length > 0) {\n path += path.indexOf('?') > 0 ? '&' : '?';\n path += keys.map((k)=>k + '=' + queryParams[`${k}`]).join('&');\n }\n }\n return path;\n}\n// This function returns a full relative path\n// for '/embed' paths in the embedded app, it will remove the '/embed' part\nexport const getCurrentRelativeUrl = ()=>{\n const currWindow = getWindow();\n let breadcrumbUrl = currWindow.location.pathname;\n if (currWindow.location.search) {\n breadcrumbUrl += currWindow.location.search;\n }\n if (breadcrumbUrl.indexOf(EMBED_PREFIX) === 0) {\n breadcrumbUrl = breadcrumbUrl.substr(6);\n }\n return breadcrumbUrl;\n};\nexport const urlPush = (location, scrollToTop = false)=>{\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const [{ pageView }] = useTelemetry();\n if (!appHistory) {\n return;\n }\n previousPage = getWindow().location.href;\n const data = {\n previousPage\n };\n const payload = {\n page: location,\n action: Constants.Telemetry.Action.PageLoad,\n actionModifier: Constants.Telemetry.ActionModifier.Start,\n details: JSON.stringify(data)\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n page: payload.page\n });\n // The embedded app should never push anything onto the history stack\n if (isEmbedded) {\n const embedLocation = embedURL(location);\n if (isValidRoute(embedLocation)) {\n appHistory.replace(embedLocation); // CodeQL [SM01507] already checking if safe redirect by checking isValidRoute\n }\n } else {\n // save cookie and local storage if needed and not show cookie banner, until the cookie is expired (which is for 13 months)\n saveDataToBrowserAfterUserAgreedPrivacyConsent();\n if (isValidRoute(location)) {\n appHistory.push(location);\n }\n if (scrollToTop) {\n scrollTo(0, 0);\n }\n }\n pageView({\n referrerUri: previousPage\n });\n};\nexport const urlReplace = (location)=>{\n if (!appHistory) {\n return;\n }\n // save cookie and local storage if needed and not show cookie banner, until the cookie is expired (which is for 13 months)\n saveDataToBrowserAfterUserAgreedPrivacyConsent();\n previousPage = getWindow().location.href;\n const nextLocation = isEmbedded ? embedURL(location) : location;\n if (isValidRoute(nextLocation)) {\n appHistory.replace(nextLocation); // CodeQL [SM01507] already checking if safe redirect by checking isValidRoute\n }\n};\nexport const urlBack = (fallbackLocation)=>{\n if (appHistory && previousPage) {\n appHistory.back();\n } else if (fallbackLocation) {\n urlPush(fallbackLocation);\n }\n};\n/**\n * simple assign to window.location.href\n * @param href should be fully constructed, with host, pathname, and etc.\n */ export const urlAssign = (href, shouldOpenInNewTab)=>{\n if (shouldOpenInNewTab) {\n getWindow() && getWindow().open(href, '_blank');\n } else if (getWindow() && getWindow().location) {\n getWindow().location.href = href;\n }\n};\nexport function getQueryParamsObject(search) {\n const searchParams = new URLSearchParams(search);\n const result = {};\n searchParams.forEach((value, key)=>{\n result[`${key}`] = value;\n });\n return result;\n}\nexport const removeUserUniqueQueryParams = ()=>{\n const currentLocation = getWindow().location;\n const urlToReplace = new URL(currentLocation.href);\n if (urlToReplace.searchParams.get(Constants.QueryStrings.CorrelationId)) {\n urlToReplace.searchParams.delete(Constants.QueryStrings.CorrelationId);\n }\n if (urlToReplace.searchParams.get(Constants.QueryStrings.Referer)) {\n urlToReplace.searchParams.delete(Constants.QueryStrings.Referer);\n }\n if (urlToReplace.href !== currentLocation.href) urlReplace(urlToReplace.href);\n};\n/**\n * @deprecated\n * This function exists for migrating react-router v3 to react-router-dom v6\n * and will serve only legacy Class Components that haven't been transitioned to functional components\n * Please use the relevant hooks instead in functional components\n */ export function withRouter(Component) {\n return function ComponentWithRouter(props) {\n const location = useLocation();\n const navigate = useNavigate();\n const params = useParams();\n const query = getQueryParamsObject(location === null || location === void 0 ? void 0 : location.search);\n return /*#__PURE__*/ _jsx(Component, _object_spread_props(_object_spread({}, props), {\n // @ts-expect-error location with backwards compatible query\n location: _object_spread_props(_object_spread({}, location), {\n query\n }),\n params: params,\n router: {\n location,\n navigate,\n params\n },\n routeParams: params\n }));\n };\n}\n","import { logger } from '@src/logger';\nimport { ClientLogsCollection } from '@shared/logger';\nexport function storeFeedback({ action, actionModifier, details }) {\n logger.clientLogger.info({\n collection: ClientLogsCollection.Feedback,\n action,\n actionModifier,\n details\n });\n}\n","import { Constants } from '@shared/utils/constants';\nimport { logError } from '@shared/utils/httpClientUtil';\nimport { getAppConfig } from '@shared/services/init/appConfig';\nimport { logger } from '@src/logger';\nimport * as httpProtocol from './httpProtocol';\nexport function getUserPrivateApps(billingRegion) {\n const endpoint = '/view/privateApps';\n const options = {\n requireCorrelationId: true,\n stringifyPostData: false,\n authenticationType: httpProtocol.AuthenticationTypes.Arm,\n setBearerHeader: true\n };\n const get = httpProtocol.get(endpoint, options);\n return get.addQueryEntry(Constants.QueryStrings.version, Constants.mprpApiVersion).addQueryEntry(Constants.QueryStrings.billingRegion, billingRegion).request().catch((error)=>{\n logError('getUserPrivateOffers', error);\n return Promise.reject(error);\n });\n}\nexport function getUserPrivateApp(entitiyId, billingRegion) {\n const endpoint = '/view/privateApp/' + entitiyId;\n const options = {\n requireCorrelationId: true,\n stringifyPostData: false,\n authenticationType: httpProtocol.AuthenticationTypes.Arm,\n setBearerHeader: true\n };\n const get = httpProtocol.get(endpoint, options);\n return get.addQueryEntry(Constants.QueryStrings.version, Constants.mprpApiVersion).addQueryEntry(Constants.QueryStrings.billingRegion, billingRegion).request().catch((error)=>{\n logError('getUserPrivateOffers', error);\n return Promise.reject(error);\n });\n}\n/** This method uses ARM to get the signed-in user's subscriptions (via bearer) */ export function getUserSubscriptions() {\n const endpoint = `${getAppConfig('armApiHost')}/subscriptions`;\n const options = {\n requireCorrelationId: true,\n stringifyPostData: false,\n allowOrigin: true,\n authenticationType: httpProtocol.AuthenticationTypes.Arm,\n contentType: 'application/json',\n returnRawResponse: false\n };\n const get = httpProtocol.get(endpoint, options);\n return get.addQueryEntry(Constants.QueryStrings.apiVersion, Constants.armSubscriptionApiVersion).request().catch((error)=>{\n logError('getUserSubscriptions', error);\n return Promise.reject(error);\n });\n}\nexport function getPrivateOrPublicPublicId(productId, market = 'US') {\n const endpoint = `${getAppConfig('armApiHost')}/providers/Microsoft.Marketplace/offers/${productId}`;\n const options = {\n requireCorrelationId: true,\n stringifyPostData: false,\n allowOrigin: true,\n authenticationType: httpProtocol.AuthenticationTypes.Arm,\n contentType: 'application/json',\n returnRawResponse: false\n };\n const get = httpProtocol.get(endpoint, options);\n return get.addQueryEntry(Constants.QueryStrings.apiVersion, Constants.mprpApiVersion).addQueryEntry(Constants.QueryStrings.market, market === null || market === void 0 ? void 0 : market.toUpperCase()).addQueryEntry(Constants.QueryStrings.ExcludePublic, 'false') // Hardcoded false since we always want to get an offer, public or private, during checkout\n .addQueryEntry(Constants.QueryStrings.includeStopSoldPlans, 'false').addQueryEntry(Constants.QueryStrings.includePrivateOffers, 'True').request().catch((error)=>{\n logError('getPrivateOfferById', error);\n logger.error('getPrivateOfferById', {\n action: 'Get product from catalog',\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n error\n });\n return Promise.reject(error);\n });\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport * as httpProtocol from './httpProtocol';\nimport { Constants } from '@shared/utils/constants';\nimport { getAppConfig } from '@shared/services/init/appConfig';\nimport { logError } from '@shared/utils/httpClientUtil';\nconst option = {\n requireCorrelationId: true,\n stringifyPostData: false,\n authenticationType: httpProtocol.AuthenticationTypes.Unauthenticated\n};\nexport function getTileData({ flightCodes, embedHost, billingRegion, requestId, entityType, urlQuery, isConverged }) {\n const endpoint = Constants.Endpoints.View.TileData;\n let _request;\n const tileDataOption = _object_spread_props(_object_spread({}, option), {\n requestId,\n requestCallback: (request)=>_request = request\n });\n const get = httpProtocol.get(endpoint, tileDataOption);\n if (flightCodes) {\n get.addQueryEntry(Constants.QueryStrings.flightCodes, flightCodes);\n }\n if (isConverged) {\n get.addQueryEntry(Constants.QueryStrings.isConverged, 'true');\n }\n if (embedHost) {\n get.addQueryEntry(Constants.QueryStrings.embedHost, embedHost);\n }\n if (billingRegion) {\n get.addQueryEntry(Constants.QueryStrings.billingRegion, billingRegion);\n }\n if (entityType) {\n get.addQueryEntry(Constants.QueryStrings.entityType, entityType);\n }\n if (urlQuery) {\n for(const key in urlQuery){\n if (Object.prototype.hasOwnProperty.call(urlQuery, key)) {\n get.addQueryEntry(key, urlQuery[`${key}`]);\n }\n }\n }\n const data$ = get.request().catch((error)=>{\n logError('getTileData', error);\n return Promise.reject(error);\n });\n return {\n data$,\n request: ()=>_request\n };\n}\nexport function getAppPricing(_) {\n return _getAppPricing.apply(this, arguments);\n}\nfunction _getAppPricing() {\n _getAppPricing = _async_to_generator(function*({ entityId, isEmbedded, flightCodes, billingRegion, urlQuery = {} }) {\n let endpoint = `${Constants.Endpoints.View.AppPricing}/${entityId}`;\n if (billingRegion) {\n endpoint += '/' + billingRegion;\n }\n const get = httpProtocol.get(endpoint, option);\n if (isEmbedded) {\n get.addQueryEntry(Constants.QueryStrings.isEmbedded, true.toString());\n }\n if (flightCodes) {\n get.addQueryEntry(Constants.QueryStrings.flightCodes, flightCodes);\n }\n for(const key in urlQuery){\n get.addQueryEntry(key, urlQuery[`${key}`]);\n }\n try {\n return yield get.request();\n } catch (error) {\n logError('getAppPricing', error);\n throw error;\n }\n });\n return _getAppPricing.apply(this, arguments);\n}\nexport function getFuturePrices(_) {\n return _getFuturePrices.apply(this, arguments);\n}\nfunction _getFuturePrices() {\n _getFuturePrices = _async_to_generator(function*({ entityId, isEmbedded, billingRegion, flightCodes }) {\n let endpoint = `${Constants.Endpoints.View.AppFuturePricing}/${entityId}`;\n if (billingRegion) {\n endpoint += '/' + billingRegion;\n }\n const get = httpProtocol.get(endpoint, option);\n if (isEmbedded) {\n get.addQueryEntry(Constants.QueryStrings.isEmbedded, true.toString());\n }\n if (flightCodes) {\n get.addQueryEntry(Constants.QueryStrings.flightCodes, flightCodes);\n }\n try {\n return yield get.request();\n } catch (error) {\n logError('getFuturePrices', error);\n throw error;\n }\n });\n return _getFuturePrices.apply(this, arguments);\n}\nexport function getApp(_) {\n return _getApp.apply(this, arguments);\n}\nfunction _getApp() {\n _getApp = _async_to_generator(function*({ entityId, flightCodes }) {\n const endpoint = `/view/app/${entityId}`;\n const get = httpProtocol.get(endpoint, option);\n if (flightCodes) {\n get.addQueryEntry(Constants.QueryStrings.flightCodes, flightCodes);\n }\n try {\n return yield get.request();\n } catch (error) {\n logError('getApp', error);\n return yield Promise.reject(error);\n }\n });\n return _getApp.apply(this, arguments);\n}\nexport function getAppRelatedAppsItems(entityId, embedHost) {\n const endpoint = `/view/app/${entityId}/relatedApps`;\n const get = httpProtocol.get(endpoint, option);\n if (embedHost) {\n get.addQueryEntry(Constants.QueryStrings.embedHost, embedHost);\n }\n return get.addQueryEntry(Constants.QueryStrings.version, getAppConfig(Constants.apiVersion)).request().catch((error)=>{\n logError('getAppRelatedAppsItems', error);\n return Promise.reject(error);\n });\n}\nexport function getFilteredApps({ billingRegion, flightCodes, embedHost, options: { includeTestProducts = false, isConverged = false } = {}, urlQuery, searchActionType = Constants.Search.ActionType.Search, requestId = '' }) {\n const endpoint = '/view/filteredapps';\n const get = httpProtocol.get(endpoint, option);\n get.setRetry(2);\n if (flightCodes) {\n get.addQueryEntry(Constants.QueryStrings.flightCodes, flightCodes);\n }\n if (includeTestProducts) {\n get.addQueryEntry(Constants.QueryStrings.includeTestProducts, 'true');\n }\n if (isConverged) {\n get.addQueryEntry(Constants.QueryStrings.isConverged, 'true');\n }\n if (embedHost) {\n get.addQueryEntry(Constants.QueryStrings.embedHost, embedHost);\n }\n if (billingRegion) {\n get.addQueryEntry(Constants.QueryStrings.billingRegion, billingRegion);\n }\n for(const key in urlQuery){\n get.addQueryEntry(key, urlQuery[`${key}`]);\n }\n get.addHeader({\n SearchActionType: searchActionType\n });\n return get.addQueryEntry(Constants.QueryStrings.version, getAppConfig(Constants.apiVersion)).setHeader(Constants.Headers.CatalogApiClientRequestId, requestId).request().catch((error)=>{\n logError('getFilteredApps', error);\n return Promise.reject(error);\n });\n}\nexport function getFilteredCloudsIndustry({ urlQuery, requestId, searchActionType = Constants.Search.ActionType.Search }) {\n const queryParams = _object_spread({\n [Constants.QueryStrings.version]: getAppConfig(Constants.apiVersion)\n }, urlQuery);\n const get = httpProtocol.get(Constants.Endpoints.View.CloudsIndustryFiltered, _object_spread_props(_object_spread({}, option), {\n queryParams\n }));\n get.setRetry(2);\n get.addHeader({\n SearchActionType: searchActionType\n });\n return get.setHeader(Constants.Headers.CatalogApiClientRequestId, requestId).request().catch((error)=>{\n logError('getFilteredCloudsIndustry', error);\n return Promise.reject(error);\n });\n}\nexport function getAllAppsPricing(_) {\n return _getAllAppsPricing.apply(this, arguments);\n}\nfunction _getAllAppsPricing() {\n _getAllAppsPricing = _async_to_generator(function*({ billingRegion, urlQuery = {} }) {\n let endpoint = Constants.Endpoints.View.AppPricing;\n if (billingRegion) {\n endpoint += '/' + billingRegion;\n }\n const get = httpProtocol.get(endpoint, option);\n for(const key in urlQuery){\n get.addQueryEntry(key, urlQuery[`${key}`]);\n }\n try {\n return get.request();\n } catch (error) {\n logError('getAllAppsPricing', error);\n throw error;\n }\n });\n return _getAllAppsPricing.apply(this, arguments);\n}\nexport function getServices(id = '', country = '', region = '', flightCode = '') {\n let endpoint = '';\n if (id) {\n endpoint += '/view/consultingservice/' + id;\n } else {\n endpoint += '/view/services';\n }\n const get = httpProtocol.get(endpoint, option);\n if (country) {\n get.addQueryEntry(Constants.QueryStrings.country, country);\n }\n if (region) {\n get.addQueryEntry(Constants.QueryStrings.region, region);\n }\n if (flightCode) {\n get.addQueryEntry(Constants.QueryStrings.flightCodes, flightCode);\n }\n return get.request().catch((error)=>{\n logError('getServices', error);\n return Promise.reject(error);\n });\n}\nexport function getServiceRelatedAppsItems(entityId, country, region) {\n const endpoint = `/view/consultingservice/${entityId}/relatedServices`;\n const get = httpProtocol.get(endpoint, option);\n if (country) {\n get.addQueryEntry(Constants.QueryStrings.country, country);\n }\n if (region) {\n get.addQueryEntry(Constants.QueryStrings.region, region);\n }\n return get.request().catch((error)=>{\n logError('getServiceRelatedItems', error);\n return Promise.reject(error);\n });\n}\nexport function getFilteredServices({ urlQuery, searchActionType = Constants.Search.ActionType.Search, requestId, options: { includeTestProducts = false, isConverged = false } = {} }) {\n const endpoint = '/view/filteredservices';\n const get = httpProtocol.get(endpoint, option);\n get.setRetry(2);\n for(const key in urlQuery){\n if (Object.prototype.hasOwnProperty.call(urlQuery, key)) {\n get.addQueryEntry(key, urlQuery[`${key}`]);\n }\n }\n if (includeTestProducts) {\n get.addQueryEntry(Constants.QueryStrings.includeTestProducts, 'true');\n }\n if (isConverged) {\n get.addQueryEntry(Constants.QueryStrings.isConverged, 'true');\n }\n get.addHeader({\n SearchActionType: searchActionType\n });\n return get.setHeader(Constants.Headers.CatalogApiClientRequestId, requestId).request().catch((error)=>{\n logError('getFilteredServices', error);\n return Promise.reject(error);\n });\n}\nexport function searchPartners(query, locale, partnersApiHost) {\n return _searchPartners.apply(this, arguments);\n}\nfunction _searchPartners() {\n _searchPartners = _async_to_generator(function*(query, locale, partnersApiHost) {\n const searchOption = {\n clientType: 'webBrowser',\n authenticationType: httpProtocol.AuthenticationTypes.Unauthenticated\n };\n const endpoint = `${partnersApiHost}/${Constants.partnersSearchApiRoute}`;\n try {\n return httpProtocol.get(endpoint, searchOption).addQueryEntry(Constants.QueryStrings.searchLocale, locale).addQueryEntry(Constants.QueryStrings.searchQuery, query).request();\n } catch (error) {\n logError('searchPartners error', error);\n return Promise.reject(error);\n }\n });\n return _searchPartners.apply(this, arguments);\n}\nexport function getAppsDataMap({ embedHost }) {\n const endpoint = '/view/appsdatamap';\n const get = httpProtocol.get(endpoint, option);\n if (embedHost) {\n get.addQueryEntry(Constants.QueryStrings.embedHost, embedHost);\n }\n return get.addQueryEntry(Constants.QueryStrings.version, getAppConfig(Constants.apiVersion)).request().catch((error)=>{\n logError('getAppsDataMap', error);\n return Promise.reject(error);\n });\n}\nexport function getCloudsIndustryDataMap() {\n const get = httpProtocol.get(Constants.Endpoints.View.CloudsIndustryDataMap, option);\n return get.addQueryEntry(Constants.QueryStrings.version, getAppConfig(Constants.apiVersion)).request().catch((error)=>{\n logError('getCloudsIndustryDataMap', error);\n return Promise.reject(error);\n });\n}\nexport function getServicesDataMap() {\n const endpoint = '/view/servicesdatamap';\n const get = httpProtocol.get(endpoint, option);\n return get.request().catch((error)=>{\n logError('getServicesDataMap', error);\n return Promise.reject(error);\n });\n}\nexport function getCreateUiDefinition(_) {\n return _getCreateUiDefinition.apply(this, arguments);\n}\nfunction _getCreateUiDefinition() {\n _getCreateUiDefinition = _async_to_generator(function*({ createUiDefinitionEndpoint }) {\n const get = httpProtocol.get(createUiDefinitionEndpoint, option);\n return get.request().catch((error)=>{\n logError('getCreateUiDefinition', error);\n return Promise.reject(error);\n });\n });\n return _getCreateUiDefinition.apply(this, arguments);\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nimport { isEmpty } from 'lodash-es';\nimport * as superagent from 'superagent';\nimport { generateGuid } from '@shared/utils/appUtils';\nimport { Constants } from '@shared/utils/constants';\nimport { HttpError } from '@server/errors';\nimport { getAppConfig } from '@shared/services/init/appConfig';\nimport { shouldRefreshToken, logOutRequestStart, logOutRequestEnd, logOutRequestError, scrubHeaders } from '@shared/utils/httpClientUtil';\nimport { createSetAccessTokenAction } from '@shared/actions/actions';\nimport { mergeAccessToken } from '@shared/utils/accessToken';\nimport { fetchAccessTokens } from '@shared/msal/tokens';\n// eslint-disable-next-line @typescript-eslint/no-var-requires\nconst queryString = require('query-string');\n(function(HttpModule) {\n let accessToken = null;\n let store = null;\n function updateAccessToken(newAccessToken) {\n if (!isEmpty(newAccessToken)) {\n accessToken = _object_spread({}, newAccessToken);\n }\n }\n HttpModule.updateAccessToken = updateAccessToken;\n function getAccessToken() {\n return accessToken;\n }\n HttpModule.getAccessToken = getAccessToken;\n function updateStore(outerStore) {\n store = outerStore;\n }\n HttpModule.updateStore = updateStore;\n function getStore() {\n return store;\n }\n HttpModule.getStore = getStore;\n})(HttpModule || (HttpModule = {}));\n// bitmasks for the authentication types\nexport var AuthenticationTypes = /*#__PURE__*/ function(AuthenticationTypes) {\n AuthenticationTypes[AuthenticationTypes[\"Unauthenticated\"] = 0] = \"Unauthenticated\";\n AuthenticationTypes[AuthenticationTypes[\"Spza\"] = 1] = \"Spza\";\n AuthenticationTypes[AuthenticationTypes[\"Graph\"] = 4] = \"Graph\";\n AuthenticationTypes[AuthenticationTypes[\"Arm\"] = 16] = \"Arm\";\n AuthenticationTypes[AuthenticationTypes[\"JarvisCM\"] = 64] = \"JarvisCM\";\n AuthenticationTypes[AuthenticationTypes[\"Pifd\"] = 128] = \"Pifd\";\n AuthenticationTypes[AuthenticationTypes[\"CommerceApi\"] = 256] = \"CommerceApi\";\n AuthenticationTypes[AuthenticationTypes[\"MarketplaceLeads\"] = 512] = \"MarketplaceLeads\";\n AuthenticationTypes[AuthenticationTypes[\"Agreement\"] = 1024] = \"Agreement\";\n return AuthenticationTypes;\n}({});\nfunction isResponseWithHeader(response) {\n return !!(response === null || response === void 0 ? void 0 : response._header);\n}\nfunction isResponseWithRequest(response) {\n return !!(response === null || response === void 0 ? void 0 : response.request);\n}\nfunction isResponseWithReq(response) {\n return !!(response === null || response === void 0 ? void 0 : response.req);\n}\nexport function scrubResponseHeaders(response) {\n if (response === null || response === void 0 ? void 0 : response.headers) {\n response.headers = scrubHeaders(response.headers);\n }\n if (response === null || response === void 0 ? void 0 : response.header) {\n response.header = scrubHeaders(response.header);\n }\n if (isResponseWithHeader(response)) {\n response._header = scrubHeaders(response._header);\n }\n}\nfunction scrubErrorHeaders(error) {\n scrubResponseHeaders(error === null || error === void 0 ? void 0 : error.response);\n if (isResponseWithRequest(error === null || error === void 0 ? void 0 : error.response)) {\n scrubResponseHeaders(error.response.request);\n }\n if (isResponseWithReq(error === null || error === void 0 ? void 0 : error.response)) {\n scrubResponseHeaders(error.response.req);\n }\n return error;\n}\nexport class HttpWrapper {\n initQuery(queryParams) {\n for(const key in queryParams){\n if (Object.prototype.hasOwnProperty.call(queryParams, key)) {\n const value = queryParams[`${key}`];\n if (value !== null && value !== undefined) {\n this.addQueryEntry(key, value);\n }\n }\n }\n return this;\n }\n addOption(option) {\n for(const entry in option){\n // eslint-disable-next-line no-prototype-builtins\n if (option.hasOwnProperty(entry)) {\n this.option[`${entry}`] = option[`${entry}`];\n }\n }\n return this.option;\n }\n copyOption(option) {\n option = option || this.option;\n const copy = {\n authenticationType: 0\n };\n for(const entry in option){\n // eslint-disable-next-line no-prototype-builtins\n if (option.hasOwnProperty(entry)) {\n copy[`${entry}`] = option[`${entry}`];\n }\n }\n return copy;\n }\n setQuery(query) {\n if (query) {\n this.query = query;\n }\n return this;\n }\n addQuery(query) {\n for(const entry in query){\n // eslint-disable-next-line no-prototype-builtins\n if (query.hasOwnProperty(entry)) {\n this.query[`${entry}`] = query[`${entry}`];\n }\n }\n return this;\n }\n addQueryEntry(entry, value) {\n if (!this.query) {\n this.setQuery({});\n }\n this.query[`${entry}`] = value;\n return this;\n }\n getQueryString(query) {\n query = query || this.query;\n if (query) {\n // It uses encodeURIComponent if 'strict' is set to false. Otherwise it strictly encodes URI components with strict-uri-encode.\n return queryString.stringify(query, {\n strict: false\n });\n } else {\n return '';\n }\n }\n setData(data) {\n this.data = data;\n return this;\n }\n setRetry(retry) {\n this.option.retry = retry;\n return this;\n }\n setHeader(entry, value) {\n this.header[`${entry}`] = value;\n return this;\n }\n setAuthHeader(token, authHeaderTitle = Constants.Headers.Authorization) {\n if (token) {\n this.header[`${authHeaderTitle}`] = token.startsWith('Bearer') ? token : 'Bearer ' + token;\n }\n return this;\n }\n addHeader(header) {\n for(const entry in header){\n // eslint-disable-next-line no-prototype-builtins\n if (header.hasOwnProperty(entry)) {\n this.header[`${entry}`] = header[`${entry}`];\n }\n }\n return this;\n }\n emptyQuery() {\n if (!this.query) {\n return true;\n }\n for(const entry in this.query){\n // eslint-disable-next-line no-prototype-builtins\n if (this.query.hasOwnProperty(entry)) {\n return false;\n }\n }\n return true;\n }\n request(retry) {\n return this.requestWithHeaders(retry).then((d)=>d.data);\n }\n requestWithHeaders(retry) {\n let url = this.endpoint;\n if (!this.emptyQuery()) {\n url += '?' + this.getQueryString(this.query);\n }\n let request = null;\n if (this.method === 'POST') {\n request = superagent.post(url);\n }\n if (this.method === 'PATCH') {\n request = superagent.patch(url);\n }\n if (this.method === 'PUT') {\n request = superagent.put(url);\n }\n if (this.method === 'GET') {\n request = superagent.get(url);\n }\n if (this.method === 'DELETE') {\n request = superagent.delete(url);\n }\n if (retry == null) {\n retry = this.option.retry;\n }\n if (retry > 0) {\n request.retry(retry);\n }\n const timeout = this.option.timeout;\n if (timeout && timeout > 0) {\n request.timeout(timeout);\n }\n if (this.option.setBuffer) {\n request.buffer();\n }\n if (this.option.responseType) {\n request.responseType(this.option.responseType);\n }\n if (this.option.type) {\n request.type(this.option.type);\n }\n if (getAppConfig().agent && this.endpoint.startsWith('https')) {\n request.agent(getAppConfig().agent);\n }\n if (this.option.allowOrigin) {\n this.addHeader({\n 'Access-Control-Allow-Origin': '*',\n 'Access-Control-Allow-Methods': 'POST, PUT, GET, OPTIONS, DELETE',\n 'Access-Control-Allow-Headers': 'x-requested-with'\n });\n }\n if (this.option.requireCorrelationId && !this.header[Constants.Headers.CorrelationId]) {\n return Promise.reject(Error('CorrelationId not found in the header'));\n }\n // set headers\n for(const property in this.header){\n // eslint-disable-next-line no-prototype-builtins\n if (this.header.hasOwnProperty(property)) {\n request.set(property, this.header[`${property}`]);\n }\n }\n // POST & DELETE\n if (this.method === 'POST' || this.method === 'PATCH' || this.method === 'PUT' || this.method === 'DELETE') {\n if (this.option.contentType === 'application/json' && typeof this.data !== 'string' && this.option.stringifyPostData) {\n request.send(JSON.stringify(this.data));\n } else {\n request.send(this.data);\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const self = this;\n // refresh access token\n let shouldRefreshAccessToken = false;\n if (this.option.authenticationType > 0) {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n const accessToken = HttpModule.getAccessToken();\n if (__CLIENT__ && accessToken) {\n if (this.option.authenticationType & 1) {\n shouldRefreshAccessToken = shouldRefreshAccessToken || shouldRefreshToken(accessToken.spza);\n }\n if (this.option.authenticationType & 4) {\n shouldRefreshAccessToken = shouldRefreshAccessToken || shouldRefreshToken(accessToken.graph);\n }\n if (this.option.authenticationType & 16) {\n shouldRefreshAccessToken = shouldRefreshAccessToken || shouldRefreshToken(accessToken.arm);\n }\n if (this.option.authenticationType & 256) {\n shouldRefreshAccessToken = shouldRefreshAccessToken || shouldRefreshToken(accessToken.commerce);\n }\n if (this.option.authenticationType & 64) {\n shouldRefreshAccessToken = shouldRefreshAccessToken || shouldRefreshToken(accessToken.jarvis);\n }\n if (this.option.authenticationType & 128) {\n shouldRefreshAccessToken = shouldRefreshAccessToken || shouldRefreshToken(accessToken.pifd);\n }\n if (this.option.authenticationType & 512) {\n shouldRefreshAccessToken = shouldRefreshAccessToken || shouldRefreshToken(accessToken.marketplaceLeads);\n }\n if (this.option.authenticationType & 1024) {\n shouldRefreshAccessToken = shouldRefreshAccessToken || shouldRefreshToken(accessToken.agreement);\n }\n }\n }\n const setAuthenticationHeaders = (authenticationType, accessToken, setBearerHeader = false)=>{\n if (accessToken) {\n if (authenticationType & 1 && accessToken.spza) {\n if (setBearerHeader) {\n request.set(Constants.Headers.Authorization, Constants.Headers.Bearer + accessToken.spza);\n } else {\n request.set(Constants.Headers.Authorization, accessToken.spza);\n }\n }\n if (authenticationType & 4 && accessToken.graph) {\n request.set(Constants.Headers.Authorization, Constants.Headers.Bearer + accessToken.graph);\n }\n if (authenticationType & 16 && accessToken.arm) {\n request.set(Constants.Headers.Authorization, Constants.Headers.Bearer + accessToken.arm);\n }\n if (authenticationType & 256 && accessToken.commerce) {\n request.set(Constants.Headers.Authorization, Constants.Headers.Bearer + accessToken.commerce);\n }\n if (authenticationType & 64 && accessToken.jarvis) {\n request.set(Constants.Headers.Authorization, Constants.Headers.Bearer + accessToken.jarvis);\n }\n if (authenticationType & 128 && accessToken.pifd) {\n request.set(Constants.Headers.Authorization, Constants.Headers.Bearer + accessToken.pifd);\n }\n if (authenticationType & 512 && accessToken.marketplaceLeads) {\n request.set(Constants.Headers.Authorization, Constants.Headers.Bearer + accessToken.marketplaceLeads);\n }\n if (authenticationType & 1024 && accessToken.agreement) {\n request.set(Constants.Headers.Authorization, Constants.Headers.Bearer + accessToken.agreement);\n }\n }\n };\n // the end request promise\n // it will perform the actual POST, PUT, GET or DEL\n const endRequest = ()=>{\n // sets the authentication headers depending on authentication type (if needed)\n setAuthenticationHeaders(this.option.authenticationType, HttpModule.getAccessToken(), this.option.setBearerHeader);\n return new Promise((resolve, reject)=>{\n setTimeout(()=>logOutRequestStart(request));\n if (self.option.requestCallback) {\n self.option.requestCallback({\n abort: ()=>{\n return request.abort();\n }\n });\n }\n const start = Date.now();\n request.end((err, res)=>{\n var _res_headers_contenttype, _res_headers_contenttype1;\n const duration = Date.now() - start;\n if (self.option.requestCallback) {\n self.option.requestCallback(null);\n }\n if (err) {\n const error = new HttpError(err);\n setTimeout(()=>logOutRequestError(request, res, duration, error, false));\n return reject(error);\n }\n const isJSON = (_res_headers_contenttype = res.headers['content-type']) === null || _res_headers_contenttype === void 0 ? void 0 : _res_headers_contenttype.includes('application/json');\n const isRemoteChunk = ((_res_headers_contenttype1 = res.headers['content-type']) === null || _res_headers_contenttype1 === void 0 ? void 0 : _res_headers_contenttype1.includes('application/javascript')) && (this.endpoint.includes('agorasstatic') || this.endpoint.endsWith('remoteEntry.js'));\n setTimeout(()=>logOutRequestEnd(request, res, duration));\n if (self.option.returnRawResponse) {\n resolve({\n data: res,\n headers: res.headers\n });\n } else if (res.ok && isJSON) {\n resolve({\n data: res.body,\n headers: res.headers\n });\n } else if (isRemoteChunk) {\n resolve({\n data: res.body.toString('utf-8'),\n headers: res.headers\n });\n } else {\n resolve({\n data: res.text,\n headers: res.headers\n });\n }\n });\n });\n };\n if (shouldRefreshAccessToken) {\n // refresh access token will never fail\n // it is designed to always resolve even if the refresh itself fails\n const promise = fetchAccessTokens({\n resources: [\n 'spza',\n 'arm',\n 'graph',\n 'commerce',\n 'jarvis',\n 'marketplaceLeads',\n 'pifd',\n 'agreement'\n ]\n });\n return promise.then((accessToken)=>{\n var _HttpModule_getStore;\n // update the accesstoken in the state\n if (!accessToken) {\n return Promise.reject(Constants.Telemetry.Action.RefreshToken);\n }\n const storedToken = mergeAccessToken({\n currentAccessToken: HttpModule.getAccessToken(),\n newAccessToken: accessToken\n });\n (_HttpModule_getStore = HttpModule.getStore()) === null || _HttpModule_getStore === void 0 ? void 0 : _HttpModule_getStore.dispatch(createSetAccessTokenAction(storedToken));\n HttpModule.updateAccessToken(storedToken);\n // endRequest returns a promise. So we need not catch exceptions from this then(..)\n return endRequest();\n });\n }\n return endRequest();\n }\n constructor(endpoint, method, option){\n _define_property(this, \"endpoint\", '');\n _define_property(this, \"query\", {});\n _define_property(this, \"baseUrl\", '');\n _define_property(this, \"header\", {});\n _define_property(this, \"option\", {});\n _define_property(this, \"method\", '');\n _define_property(this, \"data\", void 0);\n const appConfig = getAppConfig();\n // set default option\n this.addOption({\n clientType: appConfig.runtimeEnvironment,\n contentType: 'application/json',\n requireCorrelationId: true,\n flushTelemetry: false,\n retry: 2,\n stringifyPostData: false,\n parseResult: true,\n allowOrigin: false,\n fullEndpoint: false,\n returnRawResponse: false,\n authenticationType: 0,\n setBearerHeader: false,\n queryParams: {}\n });\n // merge custom option\n if (option) {\n this.addOption(option);\n }\n if (this.option.fullEndpoint) {\n this.baseUrl = appConfig.hostname;\n this.endpoint = `${this.baseUrl}${endpoint}`;\n } else {\n if (__SERVER__ && endpoint.startsWith('/')) {\n endpoint = `${appConfig.hostname}${endpoint}`;\n }\n this.endpoint = endpoint;\n }\n if (appConfig.XMSClientName) {\n this.header[Constants.Headers.XMSClientName] = appConfig.XMSClientName;\n }\n if (this.option.clientType !== 'browser') {\n this.header[Constants.Headers.UserAgent] = appConfig.httpUserAgent;\n }\n // set correlationId\n if (this.option.requireCorrelationId) {\n this.header[Constants.Headers.CorrelationId] = appConfig.correlationId;\n }\n this.header[Constants.Headers.ContentType] = this.option.contentType;\n this.header[Constants.Headers.RequestId] = this.option.requestId || generateGuid();\n this.initQuery(this.option.queryParams);\n this.method = method;\n }\n}\nexport function post(endpoint, option) {\n return new HttpWrapper(endpoint, 'POST', option);\n}\nexport function patch(endpoint, option) {\n return new HttpWrapper(endpoint, 'PATCH', option);\n}\nexport function put(endpoint, option) {\n return new HttpWrapper(endpoint, 'PUT', option);\n}\nexport function get(endpoint, option) {\n return new HttpWrapper(endpoint, 'GET', option);\n}\nexport function del(endpoint, option) {\n return new HttpWrapper(endpoint, 'DELETE', option);\n}\nexport const errorMessage = {\n 'Failed to post': 'Failed to make a POST request',\n 'Failed to get': 'Failed to make a GET request',\n 'Failed to delete': 'Failed to make a DELETE request',\n 'appId not availble': 'appId is not available to perform this operation',\n 'correlationId not availble': 'correlationId is missing to perform this operation'\n};\nexport var HttpModule;\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nclass RequestError extends Error {\n getRequestUrl(err) {\n var _err_response_request, _err_response, _err_response_req, _err_response1;\n // @ts-expect-error - superagent types do not reflect the existence of the req property\n return ((_err_response = err.response) === null || _err_response === void 0 ? void 0 : (_err_response_request = _err_response.request) === null || _err_response_request === void 0 ? void 0 : _err_response_request.url) || ((_err_response1 = err.response) === null || _err_response1 === void 0 ? void 0 : (_err_response_req = _err_response1.req) === null || _err_response_req === void 0 ? void 0 : _err_response_req.url);\n }\n constructor(err){\n super(err.toString()), _define_property(this, \"status\", void 0), _define_property(this, \"statusCode\", void 0), _define_property(this, \"name\", void 0), _define_property(this, \"message\", void 0), _define_property(this, \"stack\", void 0);\n const requestUrl = this.getRequestUrl(err);\n this.message = `failed requesting ${requestUrl}: ${err.message}; status code ${err.status}`;\n this.status = err.status;\n this.statusCode = err.status;\n this.name = err.name;\n this.stack = err.stack;\n }\n}\nexport default RequestError;\n","function getRootObject() {\n const root = globalThis;\n return root;\n}\nexport function get(entry) {\n let root = getRootObject();\n if (entry) {\n return root.APPCONFIG[entry];\n }\n return root.APPCONFIG;\n}\nexport function set(entry, value) {\n let root = getRootObject();\n root.APPCONFIG[entry] = value;\n}\nexport function setConfigs(configs) {\n let root = getRootObject();\n for(let entry in configs){\n if (configs.hasOwnProperty(entry)) {\n root.APPCONFIG[entry] = configs[entry];\n }\n }\n}\nexport let getAppConfig = get;\nexport function init(configs) {\n let root = getRootObject();\n root.APPCONFIG = {};\n root.getAppConfig = get;\n if (configs) {\n setConfigs(configs);\n }\n}\n","// ----------------------------------------------------------------------\n// <copyright company=\"Microsoft Corporation\">\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// </copyright>\n// ----------------------------------------------------------------------\nexport class LibAction {\n count(aggregratingName, service) {\n service.aggregation.increase(aggregratingName);\n }\n}\n","// ----------------------------------------------------------------------\n// <copyright company=\"Microsoft Corporation\">\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// </copyright>\n// ----------------------------------------------------------------------\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nexport class InfoBuffer {\n lookup(entryName) {\n return this.record[entryName];\n }\n remove(entryName) {\n this.record[entryName] = undefined;\n }\n create(entryName, info) {\n if (this.record[entryName]) {\n return false;\n }\n this.record[entryName] = info;\n return true;\n }\n update(entryName, info) {\n if (!this.record[entryName]) {\n return false;\n }\n this.record[entryName] = info;\n return true;\n }\n constructor(name){\n _define_property(this, \"name\", void 0);\n _define_property(this, \"record\", void 0);\n this.name = name || 'instrument.core.InfoBuffer';\n this.record = {};\n }\n}\nexport class AggregationBuffer {\n increase(entryName) {\n this.record[entryName] += 1;\n let action = this.callback['increase'];\n if (action) {\n action.apply(this, [\n entryName,\n this.record[entryName]\n ]);\n }\n return true;\n }\n add(entryName, size) {\n this.record[entryName] += size;\n let action = this.callback['add'];\n if (action) {\n action.apply(this, [\n entryName,\n this.record[entryName]\n ]);\n }\n return true;\n }\n empty(entryName) {\n if (!this.record[entryName]) {\n return false;\n }\n this.record[entryName] = 0;\n let action = this.callback['empty'];\n if (action) {\n action.apply(this, [\n entryName,\n this.record[entryName]\n ]);\n }\n return true;\n }\n addEntry(entryName) {\n if (this.record[entryName]) {\n return false;\n }\n this.record[entryName] = 0;\n return true;\n }\n constructor(name){\n _define_property(this, \"name\", void 0);\n _define_property(this, \"record\", void 0);\n _define_property(this, \"callback\", void 0);\n this.name = name || 'instrument.core.AggregationBuffer';\n this.record = {};\n this.callback = {};\n }\n}\nexport class Buffer {\n push(item) {\n if (this.overflow && this.size + 1 > this.length) {\n this.overflow(this.data[(this.end + 1) % this.length], this);\n }\n this.data[(this.end + 1) % this.length] = item;\n if (this.size < this.length) {\n if (this.size + 1 > this.length) {\n this.size = this.length;\n } else {\n this.size += 1;\n }\n }\n this.end = (this.end + 1) % this.length;\n this.start = (this.length + this.end - this.size + 1) % this.length;\n return this.size;\n }\n pop() {\n if (this.size === 0) {\n return null;\n }\n let item = this.data[this.end];\n delete this.data[this.end];\n this.end = (this.end - 1 + this.length) % this.length;\n this.size--;\n return item;\n }\n firstItem() {\n return this.data[this.start];\n }\n lastItem() {\n return this.data[this.end];\n }\n getItem(index) {\n return this.data[(this.start + index) % this.length];\n }\n setItem(index, item) {\n this.data[(this.start + index) % this.length] = item;\n }\n isEmpty() {\n return this.size === 0;\n }\n isFull(additionalSize = 0) {\n return this.getLength() + additionalSize > this.size;\n }\n setOverflow(overflow) {\n this.overflow = overflow;\n }\n getLength() {\n return this.length;\n }\n getSize() {\n return this.size;\n }\n getEnd() {\n return this.end;\n }\n empty() {\n this.size = this.start = 0;\n this.end = this.length - 1;\n return this;\n }\n jsondump() {\n return JSON.stringify(this.data);\n }\n constructor(length){\n _define_property(this, \"name\", void 0);\n _define_property(this, \"data\", void 0);\n _define_property(this, \"size\", void 0);\n _define_property(this, \"length\", void 0);\n _define_property(this, \"start\", void 0);\n _define_property(this, \"end\", void 0);\n _define_property(this, \"overflow\", void 0);\n this.name = 'instrument.core.Buffer';\n this.data = [];\n this.size = 0;\n this.overflow = null;\n this.start = 0;\n this.end = 0;\n this.length = length;\n }\n}\n","// ----------------------------------------------------------------------\n// <copyright company='Microsoft Corporation'>\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// </copyright>\n// ----------------------------------------------------------------------\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nexport class ConsumerService {\n register(service) {\n return service.addConsumerService(this);\n }\n constructor(name, instrumentService){\n _define_property(this, \"name\", void 0);\n _define_property(this, \"action\", void 0);\n _define_property(this, \"buffer\", void 0);\n _define_property(this, \"aggregation\", void 0);\n _define_property(this, \"instrumentService\", void 0);\n this.name = name;\n if (instrumentService) {\n this.instrumentService = instrumentService;\n this.register(instrumentService);\n }\n }\n}\n","// ----------------------------------------------------------------------\n// <copyright company='Microsoft Corporation'>\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// </copyright>\n// ----------------------------------------------------------------------\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { InfoBuffer } from './buffer';\nexport class InstrumentService {\n getProvider(name) {\n let providerName = name ? name : 'static';\n return this.provider[providerName];\n }\n addProvider(provider) {\n let name = provider.name;\n if (this.provider[name] !== undefined) {\n return false;\n }\n this.provider[name] = provider;\n return true;\n }\n updateProvider(provider) {\n let name = provider.name;\n if (this.provider[name] === undefined) {\n return false;\n }\n this.provider[name] = provider;\n return true;\n }\n removeProvider(name) {\n this.provider[name] = undefined;\n }\n getConsumerService(name) {\n return this.service[name];\n }\n addConsumerService(ConsumerService) {\n let name = ConsumerService.name;\n if (this.service[name] !== undefined) {\n return false;\n }\n this.service[name] = ConsumerService;\n return true;\n }\n updateConsumerService(service) {\n let name = service.name;\n if (this.service[name] === undefined) {\n return false;\n }\n this.service[name] = service;\n return true;\n }\n removeConsumerService(name) {\n this.service[name] = undefined;\n }\n // its not private, its public.\n constructor(){\n _define_property(this, \"name\", void 0);\n _define_property(this, \"provider\", void 0);\n _define_property(this, \"service\", void 0);\n _define_property(this, \"systemInfo\", void 0);\n this.name = 'instrumentService';\n this.provider = {};\n this.service = {};\n this.systemInfo = new InfoBuffer();\n }\n}\n","// ----------------------------------------------------------------------\n// <copyright company='Microsoft Corporation'>\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// </copyright>\n// ----------------------------------------------------------------------\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nexport class Provider {\n register(service) {\n return service.addProvider(this);\n }\n enableProbe(probeName, service, action) {\n let ecb = {\n service: service,\n action: action\n };\n if (!this.enabling[probeName]) {\n this.enabling[probeName] = [];\n }\n this.enabling[probeName].push(ecb);\n return true;\n }\n disableProbe(probeName) {\n this.enabling[probeName] = undefined;\n }\n probe(name, context) {\n let enablings = this.enabling[name];\n if (enablings) {\n for (let enabling of enablings){\n enabling.action(name, enabling.service, context);\n }\n }\n }\n constructor(name, instrumentService){\n _define_property(this, \"name\", void 0);\n _define_property(this, \"namedProbe\", void 0);\n _define_property(this, \"enabling\", void 0);\n this.name = name;\n if (instrumentService) {\n this.register(instrumentService);\n }\n this.enabling = {};\n }\n}\n","// ----------------------------------------------------------------------\n// <copyright company=\"Microsoft Corporation\">\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// </copyright>\n// ----------------------------------------------------------------------\nimport { Provider } from '../core/provider';\nexport class StaticProvider extends Provider {\n constructor(name, instrumentService){\n super(name, instrumentService);\n }\n}\n","// ----------------------------------------------------------------------\n// <copyright company='Microsoft Corporation'>\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// </copyright>\n// ----------------------------------------------------------------------\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { LibAction } from '../core/action';\nimport { Buffer, AggregationBuffer } from '../core/buffer';\nimport { ConsumerService } from '../core/consumer';\nimport { SpzaInstrumentService } from '../spza/spzaInstrument';\nimport { Constants } from '../../../utils/constants';\nimport * as httpProtocol from '../../http/httpProtocol';\nimport { getAppConfig } from '../../init/appConfig';\nimport { getWindow } from '../../../services/window';\nimport { logger } from '@src/logger';\nconst PUBLISH_RETRY_COUNT = 2;\nclass TelemetryActions extends LibAction {\n initSystemInfo(probeName, service) {\n service.systemInfo.correlationId = getAppConfig('correlationId');\n }\n loggerFlush(probeName, service) {\n const buffer = service.buffer;\n const events = [];\n if (buffer && buffer.getSize() > 0) {\n while(!buffer.isEmpty()){\n const event = buffer.pop().data;\n events.push(event);\n }\n const correlationId = getAppConfig('correlationId');\n const telemetryPayload = {\n events,\n correlationId\n };\n service.action.publishTelemetryEvent(telemetryPayload);\n }\n }\n serverLogInfoMessageEvent(probeName, service, payload) {\n if (payload.actionModifier === Constants.Telemetry.ActionModifier.Error) {\n service.action.logHelper.Logger.logError(payload.action, payload.details, '');\n logger.error(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n appName: payload.appName,\n page: payload.page\n });\n } else {\n service.action.logHelper.Logger.logInfoMessage(payload.action, payload.details);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n appName: payload.appName,\n page: payload.page\n });\n }\n }\n clientLogInfoMessageEvent(probeName, service, payload) {\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n }\n serverLogErrorMessageEvent(probeName, service, payload) {\n service.action.logHelper.Logger.logError(payload.operation, payload.message, '');\n logger.error(payload.message, {\n action: payload.operation\n });\n }\n clientLogErrorMessageEvent(probeName, service, payload) {}\n serverLogOutRequestEvent(probeName, service, payload) {\n service.action.logHelper.Logger.ServerLogOutRequest(payload);\n }\n clientLogOutRequestEvent(probeName, service, payload) {\n service.action.pushRecordInBuffer(probeName, service, payload, false);\n }\n clientlogAndFlushOutRequestEvent(probeName, service, payload) {\n service.action.pushRecordInBuffer(probeName, service, payload, true);\n }\n publishTelemetryEvent(telemetryPayload) {\n const window = getWindow();\n if (window) {\n const outEvents = {\n TelemetryEvents: telemetryPayload.events\n };\n const serializedEvents = JSON.stringify(outEvents);\n const options = {\n authenticationType: httpProtocol.AuthenticationTypes.Unauthenticated,\n retry: PUBLISH_RETRY_COUNT\n };\n const { region } = getAppConfig('config');\n httpProtocol.post('/api/logOutRequests', options).setData(serializedEvents).setHeader(Constants.Headers.CorrelationId, telemetryPayload.correlationId).setHeader(Constants.Headers.XMSClientRegion, region).request().then((res)=>{\n console.log('[Success] Telemetry Out Requsts Logs submitted successfully');\n }, (err)=>{\n console.log('[Fail] Telemetry Out Requsts Log failed : ' + err);\n });\n }\n }\n pushRecordInBuffer(probeName, service, event, flushLog) {\n const record = {\n provider: 'shared',\n probe: probeName,\n time: new Date().getTime(),\n data: event\n };\n service.buffer.push(record);\n if (service.buffer.getSize() > service.maxBufferSize || flushLog) {\n service.action.loggerFlush(probeName, service);\n } else {\n // let's start a timer to flush the buffer\n // this will help safeguard against never reaching the maxBufferSize\n // and risk not storing anything at all\n service.action.startBufferTimer(probeName, service);\n }\n }\n startBufferTimer(probeName, service) {\n const window = getWindow();\n if (window) {\n const flushTimer = 30000; // 30 seconds\n if (this.timer) {\n window.clearTimeout(this.timer);\n this.timer = 0;\n }\n this.timer = window.setTimeout(()=>{\n // flush the buffer if we have anything in it\n if (service.buffer.getSize() > 0) {\n service.action.loggerFlush(probeName, service);\n }\n this.timer = 0;\n }, flushTimer);\n }\n }\n constructor(isClient){\n super(), _define_property(this, \"timer\", 0), _define_property(this, \"logHelper\", null);\n if (!isClient) {\n this.logHelper = require('../../../../server/LogHelper');\n }\n }\n}\nexport class SharedTelemetryService extends ConsumerService {\n registerProbes(isClient) {\n const p = this.instrumentService.getProvider('shared');\n if (p) {\n p.enableProbe('initSystemInfo', this, this.action.initSystemInfo);\n p.enableProbe('logTelemetryInfo', this, isClient ? this.action.clientLogInfoMessageEvent : this.action.serverLogInfoMessageEvent);\n p.enableProbe('logMessageError', this, isClient ? this.action.clientLogErrorMessageEvent : this.action.serverLogErrorMessageEvent);\n p.enableProbe('logOutRequestEventInfo', this, isClient ? this.action.clientLogOutRequestEvent : this.action.serverLogOutRequestEvent);\n p.enableProbe('logAndFlushOutRequestEventInfo', this, isClient ? this.action.clientlogAndFlushOutRequestEvent : this.action.serverLogOutRequestEvent);\n p.enableProbe('flushTelemetryInfo', this, isClient ? this.action.loggerFlush : ()=>{});\n }\n }\n constructor(instrumentService, isClient){\n super('shared telemetry', instrumentService), _define_property(this, \"buffer\", void 0), _define_property(this, \"action\", void 0), _define_property(this, \"systemInfo\", void 0), _define_property(this, \"host\", void 0), _define_property(this, \"maxBufferSize\", void 0);\n this.action = new TelemetryActions(isClient);\n if (instrumentService) {\n this.systemInfo = instrumentService.systemInfo;\n }\n if (isClient) {\n this.buffer = new Buffer(150);\n this.maxBufferSize = 20;\n this.aggregation = new AggregationBuffer();\n }\n this.registerProbes(isClient);\n }\n}\n","// ----------------------------------------------------------------------\n// <copyright company='Microsoft Corporation'>\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// </copyright>\n// ---------------------------------------------------------------------\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { InstrumentService } from '../core/instrument';\nimport { StaticProvider } from '../providers/staticProvider';\nimport { SharedTelemetryService } from './sharedTelemetry';\nimport * as appConfig from '../../init/appConfig';\nexport class SharedInstrumentService extends InstrumentService {\n static getInstance() {\n if (SharedInstrumentService._instance === null) {\n const isClient = appConfig.get('runtimeEnvironment') === 'browser';\n SharedInstrumentService._instance = new SharedInstrumentService(isClient);\n }\n return SharedInstrumentService._instance;\n }\n static getProvider() {\n return SharedInstrumentService.getInstance().getProvider('shared');\n }\n constructor(isClient){\n if (SharedInstrumentService._instance) {\n throw new Error('Error : Instantiation failed. Use SharedInstrumentService.getInstance');\n } else {\n super(), _define_property(this, \"staticProvider\", void 0), _define_property(this, \"telemetryService\", void 0);\n this.name = 'SharedInstrument';\n this.staticProvider = new StaticProvider('shared', this);\n this.telemetryService = new SharedTelemetryService(this, isClient);\n SharedInstrumentService._instance = this;\n }\n }\n}\n_define_property(SharedInstrumentService, \"_instance\", null);\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { logger } from '@src/logger';\nimport { LibAction } from '../core/action';\nimport { Buffer, AggregationBuffer } from '../core/buffer';\nimport { ConsumerService } from '../core/consumer';\nimport { Constants } from '../../../utils/constants';\nimport * as httpProtocol from '../../http/httpProtocol';\nimport { getAppConfig } from '../../init/appConfig';\nimport { getNetworkStats } from '@shared/utils/appUtils';\nimport { getWindow } from '@shared/services/window';\nconst PUBLISH_RETRY_COUNT = 2;\nclass TelemetryActions extends LibAction {\n initSystemInfo(probeName, service) {\n service.systemInfo.correlationId = getAppConfig('correlationId');\n }\n loggerFlush(probeName, service) {\n const buffer = service.buffer;\n const events = [];\n if (buffer && buffer.getSize() > 0) {\n while(!buffer.isEmpty()){\n const event = buffer.pop().data;\n events.push(event);\n }\n const correlationId = getAppConfig('correlationId');\n const telemetryPayload = {\n events: events,\n correlationId: correlationId\n };\n service.action.publishTelemetryEvent(telemetryPayload);\n }\n }\n logEvent(probeName, service, payload) {\n const event = service.createDebugEvent(payload);\n service.action.pushRecordInBuffer(probeName, service, event, payload.flushLog);\n }\n logAndFlushEvent(probeName, service, payload) {\n const event = service.createDebugEvent(payload);\n service.action.pushRecordInBuffer(probeName, service, event, true);\n }\n logUserSystemInfo(probeName, service, locale) {\n const screenResolution = {\n Width: screen.width,\n Height: screen.height,\n PixelRatio: window.devicePixelRatio ? window.devicePixelRatio : 0\n };\n const browser = service.action.detectBrowser().split(' ');\n const browserInfo = {\n Browser: browser[0],\n version: browser[1]\n };\n const data = {\n 'Screen Resolution': screenResolution,\n 'Browser Info': browserInfo,\n Locale: locale,\n connection: getNetworkStats()\n };\n const obj = {\n page: '',\n action: Constants.Telemetry.Action.UserSettings,\n actionModifier: 'Info',\n details: JSON.stringify(data)\n };\n const event = service.createDebugEvent(obj);\n service.action.pushRecordInBuffer(probeName, service, event, false);\n logger.info(obj.details, {\n action: obj.action,\n actionModifier: obj.actionModifier,\n page: obj.page\n });\n }\n logOneTimeInfo(probeName, service, payload) {\n const obj = {\n page: '',\n action: payload.eventName,\n actionModifier: payload.actionModifier ? payload.actionModifier : 'Info',\n details: payload.data,\n isFeedback: payload.isFeedback ? payload.isFeedback : false\n };\n const event = service.createDebugEvent(obj);\n service.action.pushRecordInBuffer(probeName, service, event, payload.flushLog);\n }\n publishTelemetryEvent(telemetryPayload) {\n const outEvents = {\n TelemetryEvents: telemetryPayload.events\n };\n const serializedEvents = JSON.stringify(outEvents);\n const options = {\n authenticationType: httpProtocol.AuthenticationTypes.Unauthenticated,\n retry: PUBLISH_RETRY_COUNT\n };\n const { region } = getAppConfig('config');\n httpProtocol.post('/api/log', options).setData(serializedEvents).setHeader(Constants.Headers.CorrelationId, telemetryPayload.correlationId).setHeader(Constants.Headers.XMSClientRegion, region).request().then(()=>{\n console.log('[Success] Telemetry Logs submitted successfully');\n }, (err)=>{\n console.log('[Fail] Telemetry Log failed : ' + err);\n });\n }\n detectBrowser() {\n const ua = navigator.userAgent;\n let tem;\n let M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\n if (/trident/i.test(M[1])) {\n tem = /\\brv[ :]+(\\d+)/g.exec(ua) || [];\n return 'IE ' + (tem[1] || '');\n }\n if (M[1] === 'Chrome') {\n tem = ua.match(/\\b(OPR|Edge)\\/(\\d+)/);\n if (tem != null) {\n return tem.slice(1).join(' ').replace('OPR', 'Opera');\n }\n }\n M = M[2] ? [\n M[1],\n M[2]\n ] : [\n navigator.appName,\n navigator.appVersion,\n '-?'\n ];\n if ((tem = ua.match(/version\\/(\\d+)/i)) != null) {\n M.splice(1, 1, tem[1]);\n }\n return M.join(' ');\n }\n pushRecordInBuffer(probeName, service, event, flushLog) {\n const record = {\n provider: 'static',\n probe: probeName,\n time: new Date().getTime(),\n data: event\n };\n service.buffer.push(record);\n if (service.buffer.getSize() > service.maxBufferSize || flushLog) {\n service.action.loggerFlush(probeName, service);\n } else {\n // let's start a timer to flush the buffer\n // this will help safeguard against never reaching the maxBufferSize\n // and risk not storing anything at all\n service.action.startBufferTimer(probeName, service);\n }\n }\n startBufferTimer(probeName, service) {\n var _getWindow_setTimeout, _getWindow;\n const flushTimer = 30000; // 30 seconds\n if (this.timeoutID > -1) {\n window.clearTimeout(this.timeoutID);\n this.timeoutID = -1;\n }\n this.timeoutID = (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow_setTimeout = _getWindow.setTimeout) === null || _getWindow_setTimeout === void 0 ? void 0 : _getWindow_setTimeout.call(_getWindow, ()=>{\n // flush the buffer if we have anything in it\n if (service.buffer.getSize() > 0) {\n service.action.loggerFlush(probeName, service);\n }\n this.timeoutID = -1;\n }, flushTimer);\n }\n constructor(...args){\n super(...args), _define_property(this, \"timeoutID\", -1);\n }\n}\nexport class SpzaTelemetryService extends ConsumerService {\n createDebugEvent(obj) {\n const event = {\n page: obj.page ? obj.page : '',\n action: obj.action ? obj.action : '',\n actionModifier: obj.actionModifier ? obj.actionModifier : '',\n clientTimestamp: new Date().toISOString(),\n appName: obj.appName ? obj.appName : '',\n product: obj.product ? obj.product : -1,\n featureFlag: obj.featureFlag ? obj.featureFlag : '',\n details: obj.details ? obj.details : '',\n oid: this._tenantInfo && this._tenantInfo.oid ? this._tenantInfo.oid : '',\n tid: this._tenantInfo && this._tenantInfo.tid ? this._tenantInfo.tid : '',\n spzaId: this._spzaId ? this._spzaId : '',\n mshash: this._trailId ? this._trailId : '',\n hostType: this._hostType ? this._hostType : '',\n isFeedback: obj.isFeedback ? obj.isFeedback : false\n };\n return event;\n }\n registerProbes() {\n const p = this.instrumentService.getProvider('static');\n if (p) {\n p.enableProbe('initSystemInfo', this, this.action.initSystemInfo);\n p.enableProbe('logTelemetryInfo', this, this.action.logEvent);\n p.enableProbe('logAndFlushTelemetryInfo', this, this.action.logAndFlushEvent);\n p.enableProbe('flushTelemetryInfo', this, this.action.loggerFlush);\n // These are one time telemetry events\n p.enableProbe('logUserSystemInfo', this, this.action.logUserSystemInfo);\n p.enableProbe('logOneTimeInfo', this, this.action.logOneTimeInfo);\n }\n }\n registerSpzaId(spzaId) {\n this._spzaId = spzaId;\n }\n registerTrailId(trailId) {\n this._trailId = trailId;\n }\n registerTenantInfo(oid, tid) {\n this._tenantInfo.oid = oid;\n this._tenantInfo.tid = tid;\n }\n registerHostType(hostType) {\n this._hostType = hostType;\n }\n constructor(instrumentService, isClient){\n const name = isClient ? 'client telemetry' : 'server telemetry';\n super(name, instrumentService), _define_property(this, \"buffer\", void 0), _define_property(this, \"action\", void 0), _define_property(this, \"systemInfo\", void 0), _define_property(this, \"host\", void 0), _define_property(this, \"maxBufferSize\", void 0), _define_property(this, \"_spzaId\", void 0), _define_property(this, \"_trailId\", void 0), _define_property(this, \"_tenantInfo\", void 0), _define_property(this, \"_hostType\", void 0);\n this._spzaId = '';\n this._trailId = '';\n this._tenantInfo = {\n oid: '',\n tid: ''\n };\n this._hostType = '';\n if (isClient) {\n this.action = new TelemetryActions();\n this.buffer = new Buffer(150);\n // This is the maximum number of records stored in the buffer before flushing\n this.maxBufferSize = 20;\n this.aggregation = new AggregationBuffer();\n if (instrumentService) {\n this.systemInfo = instrumentService.systemInfo;\n }\n this.registerProbes();\n }\n }\n}\n","// ----------------------------------------------------------------------\n// <copyright company='Microsoft Corporation'>\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// </copyright>\n// ---------------------------------------------------------------------\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { InstrumentService } from '../core/instrument';\nimport { StaticProvider } from '../providers/staticProvider';\nimport { SpzaTelemetryService } from './spzaTelemetry';\nexport class SpzaInstrumentService extends InstrumentService {\n static getInstance(isClient = true) {\n if (SpzaInstrumentService._instance === null) {\n SpzaInstrumentService._instance = new SpzaInstrumentService(isClient);\n }\n return SpzaInstrumentService._instance;\n }\n static getProvider(isClient = true) {\n return SpzaInstrumentService.getInstance(isClient).getProvider();\n }\n static registerSpzaId(spzaId) {\n return SpzaInstrumentService.getInstance().telemetryService.registerSpzaId(spzaId);\n }\n static registerTrailId(trailId) {\n return SpzaInstrumentService.getInstance().telemetryService.registerTrailId(trailId);\n }\n static registerTenantInfo(oid, tid) {\n return SpzaInstrumentService.getInstance().telemetryService.registerTenantInfo(oid, tid);\n }\n static registerHostType(hostType) {\n return SpzaInstrumentService.getInstance().telemetryService.registerHostType(hostType);\n }\n // Ideally the design should leverage the Add\\RemoveProvider and Add\\RemoveConsumerServices\n // for this. However, we currently hard code the usage of StaticProvider as well as use\n // probe method directly all over our client code for instrumentation.\n // This will be the cheapest change, with no fall-outs\\open issues for now.\n // In future if we add other types of providers, we will anyway need to decouple our dependency\n // on static providers and at the time we can make both client and server explcitly op-into\n // the providers\\consumers of their choice.\n static disableInstrumentation() {\n SpzaInstrumentService.getInstance(false);\n }\n constructor(isClient){\n if (SpzaInstrumentService._instance) {\n throw new Error('Error : Instantiation failed. Use SpzaInstrumentService.getInstance');\n } else {\n super(), _define_property(this, \"staticProvider\", void 0), _define_property(this, \"telemetryService\", void 0);\n this.name = 'SpzaInstrument';\n this.staticProvider = new StaticProvider('static', this);\n this.telemetryService = new SpzaTelemetryService(this, isClient);\n SpzaInstrumentService._instance = this;\n }\n }\n}\n_define_property(SpzaInstrumentService, \"_instance\", null);\n","import jsdom from 'jsdom';\nexport const getWindow = ()=>{\n return typeof window !== 'undefined' && window;\n};\nexport const getDocument = ()=>{\n let doc;\n if (__SERVER__) {\n const vDOM = new jsdom.JSDOM('');\n doc = vDOM.window.document;\n }\n return typeof document !== 'undefined' && document || doc;\n};\nexport function getActiveElement() {\n return getDocument().activeElement;\n}\nexport function isActiveElement(element) {\n return element === getActiveElement();\n}\n","export const ApiVersion = '2017-04-24';\nexport const marketplaceApiVersion = '2017-04-15';\nexport const enrichReviewCommentsApiVersion = '2021-03-01';\nexport const catalogServicesApiVersion = '2021-06-01';\nexport const reviewsCatalogApiVersion = '2021-03-01';\nexport const newSearchApiVersion = '2023-01-01-preview';\nexport const rnrApiVersion = '2021-03-01';\nexport const marketplaceLeadsApiVersion = '2022-07-01';\nexport const oneTaxonomyApiVersion = '2022-02-02';\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nexport const mergeAccessToken = ({ currentAccessToken, newAccessToken })=>{\n return Object.keys(newAccessToken).reduce((previousObject, currentKey)=>{\n return _object_spread_props(_object_spread({}, previousObject), {\n [currentKey]: newAccessToken[`${currentKey}`] || currentAccessToken[`${currentKey}`]\n });\n }, currentAccessToken);\n};\n","/* istanbul ignore file */ export const countryCodeToNameMap = {\n AD: 'Andorra',\n AE: 'United Arab Emirates',\n AF: 'Afghanistan',\n AG: 'Antigua and Barbuda',\n AI: 'Anguilla',\n AL: 'Albania',\n AM: 'Armenia',\n AO: 'Angola',\n AQ: 'Antarctica',\n AR: 'Argentina',\n AS: 'American Samoa',\n AT: 'Austria',\n AU: 'Australia',\n AW: 'Aruba',\n AX: 'Ã…land Islands',\n AZ: 'Azerbaijan',\n BA: 'Bosnia and Herzegovina',\n BB: 'Barbados',\n BD: 'Bangladesh',\n BE: 'Belgium',\n BF: 'Burkina Faso',\n BG: 'Bulgaria',\n BH: 'Bahrain',\n BI: 'Burundi',\n BJ: 'Benin',\n BL: 'Saint Barthélemy',\n BM: 'Bermuda',\n BN: 'Brunei Darussalam',\n BO: 'Bolivia, Plurinational State of',\n BQ: 'Bonaire, Sint Eustatius and Saba',\n BR: 'Brazil',\n BS: 'Bahamas',\n BT: 'Bhutan',\n BV: 'Bouvet Island',\n BW: 'Botswana',\n BY: 'Belarus',\n BZ: 'Belize',\n CA: 'Canada',\n CC: 'Cocos (Keeling) Islands',\n CD: 'Congo, the Democratic Republic of the',\n CF: 'Central African Republic',\n CG: 'Congo',\n CH: 'Switzerland',\n CI: \"Côte d'Ivoire\",\n CK: 'Cook Islands',\n CL: 'Chile',\n CM: 'Cameroon',\n CN: 'China',\n CO: 'Colombia',\n CR: 'Costa Rica',\n CU: 'Cuba',\n CV: 'Cabo Verde',\n CW: 'Curaçao',\n CX: 'Christmas Island',\n CY: 'Cyprus',\n CZ: 'Czechia',\n DE: 'Germany',\n DJ: 'Djibouti',\n DK: 'Denmark',\n DM: 'Dominica',\n DO: 'Dominican Republic',\n DZ: 'Algeria',\n EC: 'Ecuador',\n EE: 'Estonia',\n EG: 'Egypt',\n EH: 'Western Sahara',\n ER: 'Eritrea',\n ES: 'Spain',\n ET: 'Ethiopia',\n FI: 'Finland',\n FJ: 'Fiji',\n FK: 'Falkland Islands (Malvinas)',\n FM: 'Micronesia, Federated States of',\n FO: 'Faroe Islands',\n FR: 'France',\n GA: 'Gabon',\n GB: 'United Kingdom of Great Britain and Northern Ireland',\n GD: 'Grenada',\n GE: 'Georgia',\n GF: 'French Guiana',\n GG: 'Guernsey',\n GH: 'Ghana',\n GI: 'Gibraltar',\n GL: 'Greenland',\n GM: 'Gambia',\n GN: 'Guinea',\n GP: 'Guadeloupe',\n GQ: 'Equatorial Guinea',\n GR: 'Greece',\n GS: 'South Georgia and the South Sandwich Islands',\n GT: 'Guatemala',\n GU: 'Guam',\n GW: 'Guinea-Bissau',\n GY: 'Guyana',\n HK: 'Hong Kong',\n HM: 'Heard Island and McDonald Islands',\n HN: 'Honduras',\n HR: 'Croatia',\n HT: 'Haiti',\n HU: 'Hungary',\n ID: 'Indonesia',\n IE: 'Ireland',\n IL: 'Israel',\n IM: 'Isle of Man',\n IN: 'India',\n IO: 'British Indian Ocean Territory',\n IQ: 'Iraq',\n IR: 'Iran, Islamic Republic of',\n IS: 'Iceland',\n IT: 'Italy',\n JE: 'Jersey',\n JM: 'Jamaica',\n JO: 'Jordan',\n JP: 'Japan',\n KE: 'Kenya',\n KG: 'Kyrgyzstan',\n KH: 'Cambodia',\n KI: 'Kiribati',\n KM: 'Comoros',\n KN: 'Saint Kitts and Nevis',\n KP: \"Korea, Democratic People's Republic of\",\n KR: 'Korea, Republic of',\n KW: 'Kuwait',\n KY: 'Cayman Islands',\n KZ: 'Kazakhstan',\n LA: \"Lao People's Democratic Republic\",\n LB: 'Lebanon',\n LC: 'Saint Lucia',\n LI: 'Liechtenstein',\n LK: 'Sri Lanka',\n LR: 'Liberia',\n LS: 'Lesotho',\n LT: 'Lithuania',\n LU: 'Luxembourg',\n LV: 'Latvia',\n LY: 'Libya',\n MA: 'Morocco',\n MC: 'Monaco',\n MD: 'Moldova, Republic of',\n ME: 'Montenegro',\n MF: 'Saint Martin (French part)',\n MG: 'Madagascar',\n MH: 'Marshall Islands',\n MK: 'Macedonia, the former Yugoslav Republic of',\n ML: 'Mali',\n MM: 'Myanmar',\n MN: 'Mongolia',\n MO: 'Macao',\n MP: 'Northern Mariana Islands',\n MQ: 'Martinique',\n MR: 'Mauritania',\n MS: 'Montserrat',\n MT: 'Malta',\n MU: 'Mauritius',\n MV: 'Maldives',\n MW: 'Malawi',\n MX: 'Mexico',\n MY: 'Malaysia',\n MZ: 'Mozambique',\n NA: 'Namibia',\n NC: 'New Caledonia',\n NE: 'Niger',\n NF: 'Norfolk Island',\n NG: 'Nigeria',\n NI: 'Nicaragua',\n NL: 'Netherlands',\n NO: 'Norway',\n NP: 'Nepal',\n NR: 'Nauru',\n NU: 'Niue',\n NZ: 'New Zealand',\n OM: 'Oman',\n PA: 'Panama',\n PE: 'Peru',\n PF: 'French Polynesia',\n PG: 'Papua New Guinea',\n PH: 'Philippines',\n PK: 'Pakistan',\n PL: 'Poland',\n PM: 'Saint Pierre and Miquelon',\n PN: 'Pitcairn',\n PR: 'Puerto Rico',\n PS: 'Palestine, State of',\n PT: 'Portugal',\n PW: 'Palau',\n PY: 'Paraguay',\n QA: 'Qatar',\n RE: 'Réunion',\n RO: 'Romania',\n RS: 'Serbia',\n RU: 'Russian Federation',\n RW: 'Rwanda',\n SA: 'Saudi Arabia',\n SB: 'Solomon Islands',\n SC: 'Seychelles',\n SD: 'Sudan',\n SE: 'Sweden',\n SG: 'Singapore',\n SH: 'Saint Helena, Ascension and Tristan da Cunha',\n SI: 'Slovenia',\n SJ: 'Svalbard and Jan Mayen',\n SK: 'Slovakia',\n SL: 'Sierra Leone',\n SM: 'San Marino',\n SN: 'Senegal',\n SO: 'Somalia',\n SR: 'Suriname',\n SS: 'South Sudan',\n ST: 'Sao Tome and Principe',\n SV: 'El Salvador',\n SX: 'Sint Maarten (Dutch part)',\n SY: 'Syrian Arab Republic',\n SZ: 'Swaziland',\n TC: 'Turks and Caicos Islands',\n TD: 'Chad',\n TF: 'French Southern Territories',\n TG: 'Togo',\n TH: 'Thailand',\n TJ: 'Tajikistan',\n TK: 'Tokelau',\n TL: 'Timor-Leste',\n TM: 'Turkmenistan',\n TN: 'Tunisia',\n TO: 'Tonga',\n TR: 'Turkey',\n TT: 'Trinidad and Tobago',\n TV: 'Tuvalu',\n TW: 'Taiwan, Province of China',\n TZ: 'Tanzania, United Republic of',\n UA: 'Ukraine',\n UG: 'Uganda',\n UM: 'United States Minor Outlying Islands',\n US: 'United States of America',\n UY: 'Uruguay',\n UZ: 'Uzbekistan',\n VA: 'Holy See',\n VC: 'Saint Vincent and the Grenadines',\n VE: 'Venezuela, Bolivarian Republic of',\n VG: 'Virgin Islands, British',\n VI: 'Virgin Islands, U.S.',\n VN: 'Viet Nam',\n VU: 'Vanuatu',\n WF: 'Wallis and Futuna',\n WS: 'Samoa',\n YE: 'Yemen',\n YT: 'Mayotte',\n ZA: 'South Africa',\n ZM: 'Zambia',\n ZW: 'Zimbabwe'\n};\n","/* eslint-disable no-useless-escape */ import { Constants } from '@shared/utils/constants';\nimport { countryCodeToNameMap } from '@shared/utils/countryCodeMap';\nimport { serviceOffersSupportedStatesCodes } from '@shared/utils/serviceOffersSupportedStatesCodes';\nimport { urlKeys } from '@shared/utils/datamappingHelpers';\nconst paramToDataMapKey = {\n [Constants.QueryStrings.product]: Constants.DataMapCollectionKeys.products,\n [Constants.QueryStrings.category]: Constants.DataMapCollectionKeys.categories,\n [Constants.QueryStrings.industry]: Constants.DataMapCollectionKeys.industries,\n [Constants.QueryStrings.serviceType]: Constants.DataMapCollectionKeys.serviceTypes\n};\nfunction parseQuery(queryString) {\n const query = {};\n const pairs = queryString.split('&');\n for (const pair of pairs){\n const matches = pair.match(/([^\\=]+)(\\=?)(.*)/);\n if (matches) {\n const name = matches[1];\n const value = matches[3];\n query[decodeURIComponent(name)] = value || '';\n }\n }\n return query;\n}\nexport function optimizeQueryParameters({ queryParams }) {\n const optimizeQueryParameters = {};\n for(const name in queryParams){\n const rawValue = queryParams[`${name}`] || '';\n // TODO (technical debt): although rawValue has a string type, the value might be different (an array for example). The toString call is necessary to prevent crashes until the IUrlQuery casting will work as expected.\n const valueUpper = rawValue.toString().toUpperCase();\n const loweredName = name.toLowerCase();\n const dataMappingName = paramToDataMapKey[`${loweredName}`];\n if (rawValue) {\n if (loweredName === Constants.QueryStrings.country) {\n if (countryCodeToNameMap[`${valueUpper}`]) {\n optimizeQueryParameters[Constants.QueryStrings.country] = valueUpper;\n }\n } else if (loweredName === Constants.QueryStrings.region) {\n if (serviceOffersSupportedStatesCodes[`${valueUpper}`]) {\n optimizeQueryParameters[Constants.QueryStrings.region] = valueUpper;\n }\n } else if (dataMappingName && typeof rawValue === 'string') {\n const value = rawValue.split(';').sort().filter((value)=>urlKeys[`${dataMappingName}`][`${value}`]).join(';');\n if (value) {\n optimizeQueryParameters[`${name}`] = value;\n }\n } else {\n optimizeQueryParameters[`${name}`] = rawValue;\n }\n }\n }\n return optimizeQueryParameters;\n}\n/**\n * This function will remove any non-existing URL values which will not found in the DataMapping file.\n * Hence we will optimize the cache keys and increase cache hits\n * @param originalUrl Original URL from client, composite from path and query params\n * @param paramToDataMapKey Helper function which convert URL query parameter name to DataMapping.UrlKeys collection\n */ export function optimizeUrl(originalUrl) {\n const decodedUrl = decodeURIComponent(originalUrl);\n // Helper regex to extract the queryy params\n const matchResult = decodedUrl.match(/([^\\?]+)\\?(.*)/);\n if (!matchResult) {\n return decodedUrl;\n }\n const [fullMatch, path, queryParamsString] = matchResult;\n if (!fullMatch || !path || !queryParamsString) {\n return decodedUrl;\n }\n const queryParams = parseQuery(queryParamsString);\n const optimizedQueryParameters = optimizeQueryParameters({\n queryParams\n });\n const newQueryString = Object.keys(optimizedQueryParameters).map((name)=>`${name}=${optimizedQueryParameters[`${name}`]}`).join('&');\n // Helper regex to return the original url path with the optimized query params\n return decodedUrl.replace(/\\?(.*)/, `?${newQueryString}`);\n}\n","export const getHttpPrefix = ()=>process.env.useHTTPS === 'true' ? 'https:' : 'http:';\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport qs from 'qs';\nimport urljoin from 'url-join';\nimport queryStringUtils from 'query-string';\nimport { getAppConfig } from '@shared/services/init/appConfig';\nimport { getHttpPrefix } from '@src/server/utils/func';\nexport class Url {\n getUrl(stringifyWithQs = false) {\n if (!this.host) {\n return '';\n }\n let url = this.host.startsWith('http') ? this.host : urljoin(getHttpPrefix(), this.host);\n url += this.endpoint;\n if (this.query) {\n url += '?' + (stringifyWithQs ? qs.stringify(this.query) : queryStringUtils.stringify(this.query));\n }\n return url;\n }\n constructor(endpoint, query, host){\n _define_property(this, \"host\", void 0);\n _define_property(this, \"query\", void 0);\n _define_property(this, \"endpoint\", void 0);\n this.host = host || getAppConfig('hostname');\n this.endpoint = endpoint;\n this.query = query || {};\n }\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { parse } from 'stack-trace';\nimport isEmail from 'validator/lib/isEmail';\nimport { getDataValuesFromUrlKey } from '@shared/utils/dataMappingUtils';\nimport { optimizeQueryParameters } from '@shared/utils/optimizeUrlHelper';\nimport { Constants, OfferType, PlanPricingType } from '@shared/utils/constants';\nimport { PricingStates, UserSegment, OdataRawObjectAppType, ISearchFilterCategory, TermsStrings, AppTag, Badges } from '@shared/Models';\nimport { getWindow } from '@shared/services/window';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { SharedInstrumentService } from '@shared/services/telemetry/shared/sharedInstrument';\nimport { DataMap } from '@shared/utils/dataMapping';\nimport { getAppConfig } from '@shared/services/init/appConfig';\nimport { Url } from '@shared/services/http/urlUtils';\nimport * as embedHostUtils from '@embed/embedHostUtils';\nimport { createAppViewTelemetryLoggedAction, createFeatureFlagsReceivedAction } from '@shared/actions/actions';\nimport { IFeatureFlags } from '@src/State';\nimport { extractCampaignsFromUrl, getEntityIdFromUrl, updateHandOffUrlWithCampaignParams } from '@shared/utils/routeUtils';\nimport { getLocalStorageItem, getSessionStorageItem, hasUserAgreedPrivacyConsent, saveLocalStorageItem, saveSessionStorageItem } from '@shared/utils/browserStorageUtils';\nimport { isArray, isNullorUndefined } from '@shared/utils/objectUtils';\nimport { buildHref, routes } from '@shared/routerHistory';\nimport { getQueryFromBrowserUrl } from '@shared/utils/urlUtils';\nimport { getTrimmedWords, isEmptyNullorUndefinedString } from '@shared/utils/stringUtils';\nimport { getPrimaryProductUrl, bitMasksContainSomeBitMask, bitMasksMatch, bitMasksMatchFilter, bitMasksMatchBitMask, productKeyByUrlKey, productKeyByBackendKey, getShortCutBitmask } from '@shared/utils/datamappingHelpers';\nimport { loadPartnerManifest } from '@shared/utils/partnerManifestLoader';\nimport { logger } from '@src/logger';\nimport { isString } from 'lodash-es';\nimport { useTelemetry } from '@shared/hooks/useTelemetry';\nimport sha256 from 'crypto-js/sha256';\nimport { BusinessTelemetry } from '@shared/utils/businessConstants';\nimport { isAppContactForm } from '@shared/utils/modals';\nimport { v4 as uuidv4 } from 'uuid';\n// eslint-disable-next-line react-hooks/rules-of-hooks\nconst [{ flushTelemetryBuffer }] = useTelemetry();\nexport function generateGuid() {\n return uuidv4(); // random string, no time sequenced.\n}\nexport function attachClickHandlerToElement(id, handler) {\n const el = document.getElementById(id);\n if (el) {\n el.onclick = handler;\n }\n}\nexport const getProductByUrlKey = ({ urlKey })=>{\n const productKey = productKeyByUrlKey[`${urlKey}`];\n return DataMap.products[`${productKey}`];\n};\nexport const getProductByBackendKey = ({ backendKey })=>{\n const productKey = productKeyByBackendKey[`${backendKey}`];\n return DataMap.products[`${productKey}`];\n};\nexport function categoryInfoToBitmask(categoryInfo) {\n const { FilterGroup, FilterID } = categoryInfo || {};\n return categoryInfo ? {\n property: FilterGroup,\n mask: FilterID\n } : null;\n}\nfunction getCategoryBitmaskInfo({ collection, dataValueKey, subCollection, dataValueChildKey }) {\n var _DataMap____SubCategoryDataMapping, _DataMap___;\n const categoryInfo = (_DataMap___ = DataMap[`${collection}`][`${subCollection}`][`${dataValueKey}`]) === null || _DataMap___ === void 0 ? void 0 : (_DataMap____SubCategoryDataMapping = _DataMap___.SubCategoryDataMapping) === null || _DataMap____SubCategoryDataMapping === void 0 ? void 0 : _DataMap____SubCategoryDataMapping[`${dataValueChildKey}`];\n return categoryInfoToBitmask(categoryInfo);\n}\nfunction getGeneralBitmaskInfo({ collection, dataValueKey }) {\n const categoryInfo = DataMap[`${collection}`][`${dataValueKey}`];\n return categoryInfoToBitmask(categoryInfo);\n}\nfunction getIndustriesBitmaskInfo({ collection, dataValueKey, dataValueChildKey }) {\n var _DataMap___SubCategoryDataMapping, _DataMap__;\n const categoryInfo = (_DataMap__ = DataMap[`${collection}`][`${dataValueKey}`]) === null || _DataMap__ === void 0 ? void 0 : (_DataMap___SubCategoryDataMapping = _DataMap__.SubCategoryDataMapping) === null || _DataMap___SubCategoryDataMapping === void 0 ? void 0 : _DataMap___SubCategoryDataMapping[`${dataValueChildKey}`];\n return categoryInfoToBitmask(categoryInfo);\n}\nconst bitmaskInfoType = {\n [Constants.DataMapCollectionKeys.categories]: getCategoryBitmaskInfo,\n [Constants.DataMapCollectionKeys.products]: getGeneralBitmaskInfo,\n [Constants.DataMapCollectionKeys.industries]: getIndustriesBitmaskInfo,\n [Constants.DataMapCollectionKeys.cloudIndustries]: getIndustriesBitmaskInfo,\n [Constants.DataMapCollectionKeys.serviceTypes]: getGeneralBitmaskInfo,\n [Constants.DataMapCollectionKeys.trials]: getGeneralBitmaskInfo,\n [Constants.DataMapCollectionKeys.pricingModel]: getGeneralBitmaskInfo,\n [Constants.DataMapCollectionKeys.ratings]: getGeneralBitmaskInfo,\n [Constants.DataMapCollectionKeys.appCompliance]: getGeneralBitmaskInfo,\n [Constants.DataMapCollectionKeys.azureBenefitEligible]: getGeneralBitmaskInfo,\n [Constants.DataMapCollectionKeys.copilotExtension]: getGeneralBitmaskInfo,\n [Constants.DataMapCollectionKeys.productType]: getGeneralBitmaskInfo\n};\nexport const getBitMaskInfo = ({ collection, dataValueKey, subCollection, dataValueChildKey })=>{\n const bitmaskType = bitmaskInfoType[`${collection}`];\n return bitmaskType({\n collection,\n dataValueKey,\n subCollection,\n dataValueChildKey\n });\n};\nexport const getProdcutBitMaskInfo = (categoryInfo)=>{\n const { FilterGroup, FilterID } = categoryInfo || {};\n return categoryInfo ? {\n property: FilterGroup,\n mask: FilterID\n } : null;\n};\nexport const isEmbedded = ()=>{\n const AppsourceMode = getWindow().AppsourceMode;\n return AppsourceMode === 'Embed';\n};\n// Does a reverse look up on the data map from the product display name to get the product key\n// Reverse lookup as dont want to create a new map to maintain\nexport function getProductLongTitleFromDisplayName(displayName) {\n for(const item in DataMap.products){\n // When you iterate over an Enum it gives you both the indexes and the string values\n // The regex makes sure you dont compare the indexes.\n // eslint-disable-next-line no-prototype-builtins\n if (DataMap.products.hasOwnProperty(item) && !/^\\d+$/.test(item)) {\n if (displayName === DataMap.products[`${item}`].BackendKey) {\n return DataMap.products[`${item}`].LongTitle;\n }\n }\n }\n // Came here means none the expected products matched,\n // Some one handcrafted the Url with a non existant prod.\n // return an empty string as you cannot show details anyways\n return displayName;\n}\n// format the string which has {0}, {1} arguments\nexport function getFormattedString(baseString, args) {\n for(let i = 0; i < args.length; i++){\n // eslint-disable-next-line security/detect-non-literal-regexp\n const regEx = new RegExp('\\\\{' + i + '\\\\}', 'gm');\n baseString = baseString.replace(regEx, args[`${i}`]);\n }\n return baseString;\n}\nexport function getTelemetryResponseUrl(appId) {\n const query = {};\n query[Constants.QueryStrings.ApplicationId] = appId;\n query[Constants.QueryStrings.CorrelationId] = getAppConfig('correlationId');\n const url = new Url('/api/notifyresult', query);\n return url.getUrl();\n}\nexport function getPaymentRedirectUrl(entityId, referredBy) {\n const url = new Url(buildHref(routes.checkout, null, {\n entityId\n }, null, null), {\n referredBy\n });\n return url.getUrl();\n}\nfunction bitmaskMatch(product, bitmaskValue, products) {\n let match = false;\n if (products) {\n match = bitMasksContainSomeBitMask(bitmaskValue, products);\n } else {\n const productInfo = getProductByUrlKey({\n urlKey: product\n });\n if (product && productInfo) {\n match = bitMasksMatchFilter(bitmaskValue, productInfo);\n }\n }\n return match;\n}\n// This API returns if a product belongs to office Add-ins\n// ShortcutBitmask contains the bitmask value of all the office child products.\n// DataMap.products['office365'].ShortcutBitmask = 8355840 which is equal to 'OR' of all the child product filterIds\n// we are sending office365 as the primary product for both Saas apps and Saas add-ins. So, added the products param as well\nexport function isOfficeNonSaasApp(product, products) {\n const productMask = {\n [DataMap.products.AzureforWebApps.FilterGroup]: DataMap.products.AzureforWebApps.FilterID\n };\n return bitmaskMatch(product, getShortCutBitmask(DataMap.products.Office365), products) && !bitmaskMatch(product, productMask, products);\n}\n// returns the title of the parent product if product belongs to parent product\n// checks whether product belongs to parent Product\nexport function getParentProductTitle(product, parentProduct) {\n const productInfo = getProductByUrlKey({\n urlKey: parentProduct\n });\n if (bitmaskMatch(product, getShortCutBitmask(productInfo))) {\n return productInfo.LongTitle;\n }\n}\n// This API returns if a product belongs to office Saas apps\n// we are sending office365 as the primary product for both Saas apps and Saas add-ins. So, added the products param as well\nexport function isOfficeSaasApp(product, products) {\n const productOfficeMask = {\n [DataMap.products.Office365.FilterGroup]: DataMap.products.Office365.FilterID\n };\n const productWebAppsMask = {\n [DataMap.products.AzureforWebApps.FilterGroup]: DataMap.products.AzureforWebApps.FilterID\n };\n return bitmaskMatch(product, productOfficeMask, products) && bitmaskMatch(product, productWebAppsMask, products);\n}\n// This API returns if a product belongs to office category (Add-ins + Saas apps)\n// we are sending office365 as the primary product for both Saas apps and Saas add-ins. So, added the products param as well\nexport function isOfficeApp(product, products) {\n const bitmaskVal = getShortCutBitmask(DataMap.products.Office365);\n return bitmaskMatch(product, bitmaskVal, products);\n}\nexport function isSaaS(product, products) {\n const bitmaskVal = getShortCutBitmask(DataMap.products.AzureforWebApps);\n return bitmaskMatch(product, bitmaskVal, products);\n}\nexport const isSaaSApp = ({ primaryProduct })=>{\n return isSaaS(getPrimaryProductUrl(primaryProduct));\n};\nexport function isD365(product, products) {\n const bitmaskVal = getShortCutBitmask(DataMap.products.Dynamics365);\n return bitmaskMatch(product, bitmaskVal, products);\n}\nexport const isD365App = ({ primaryProduct })=>{\n return isD365(getPrimaryProductUrl(primaryProduct));\n};\nexport function isD365BC(product, products) {\n const bitmaskVal = getShortCutBitmask(DataMap.products.Dynamics365forBusinessCentral);\n return bitmaskMatch(product, bitmaskVal, products);\n}\nexport const isD365BCApp = ({ primaryProduct })=>{\n return isD365BC(getPrimaryProductUrl(primaryProduct));\n};\nexport const isPowerBIVisuals = (product, products)=>{\n const bitmaskVal = getShortCutBitmask(DataMap.products.PowerBICustomVisual);\n return bitmaskMatch(product, bitmaskVal, products);\n};\nexport const isPowerBIVisualsApp = ({ primaryProduct })=>{\n return isPowerBIVisuals(getPrimaryProductUrl(primaryProduct));\n};\nexport function isPowerBI(product, products) {\n const bitmaskVal = getShortCutBitmask(DataMap.products.PowerBI);\n return bitmaskMatch(product, bitmaskVal, products);\n}\nexport function isAzure(product, products) {\n const bitmaskVal = getShortCutBitmask(DataMap.products.Azure);\n return bitmaskMatch(product, bitmaskVal, products);\n}\nexport function isAzureApp({ primaryProduct }) {\n return isAzure(getPrimaryProductUrl(primaryProduct));\n}\n/** This is a temporary function.\n * AppSource has to support offers from Office and from BigCat during the migration.\n * Once all offers have been migrated, this function and all references to it can be deleted. */ export function isMigratedPowerBIVisual(appInfo) {\n return appInfo && appInfo.downloadLink && appInfo.downloadSampleLink && appInfo.bigId;\n}\nexport function shouldDownloadPowerBIVisual(appInfo, isEmbedded) {\n return appInfo && isPowerBIVisuals(getPrimaryProductUrl(appInfo.primaryProduct)) && isMigratedPowerBIVisual(appInfo) && !isEmbedded;\n}\nexport function isTransactableOfferType(app) {\n return app && [\n isSaaSApp,\n isD365App,\n isD365BCApp,\n isPowerBIVisualsApp\n ].some((fn)=>fn(app));\n}\nexport function isLTS(app) {\n var _app_pricingInformation_skus, _app_pricingInformation;\n return (_app_pricingInformation = app.pricingInformation) === null || _app_pricingInformation === void 0 ? void 0 : (_app_pricingInformation_skus = _app_pricingInformation.skus) === null || _app_pricingInformation_skus === void 0 ? void 0 : _app_pricingInformation_skus.find((sku)=>{\n var _sku_termPrices;\n return (_sku_termPrices = sku.termPrices) === null || _sku_termPrices === void 0 ? void 0 : _sku_termPrices.find((termPrice)=>termPrice.unit === TermsStrings.Term2YString || termPrice.unit === TermsStrings.Term3YString || termPrice.billingPlan);\n });\n}\nexport const isTransactApp = ({ isEmbedded, ctaTypes, appData, billingRegion })=>{\n return !isEmbedded && appData && (ctaTypes === null || ctaTypes === void 0 ? void 0 : ctaTypes.some((ctaType)=>[\n Constants.CTAType.Purchase,\n Constants.CTAType.BuyLicense\n ].includes(ctaType))) && billingRegion && isTransactableOfferType(appData);\n};\n/** An offer is considered BAG transactable if it:\n * - Is of offer type Dynamics 365 CE, Dynamics 365 BC or Power BI Visuals\n * - Has prices associated with the offer\n */ export const isBagTransactable = (appData)=>{\n const primaryProductUrl = getPrimaryProductUrl(appData === null || appData === void 0 ? void 0 : appData.primaryProduct);\n const isBagEnabledD365BC = isD365BC(primaryProductUrl);\n const isBagEnabledD365 = isD365(primaryProductUrl) && primaryProductUrl !== 'dynamics-365-business-central';\n const isBagEnabledPowerBIVisual = isPowerBIVisuals(primaryProductUrl);\n const isBagOfferType = isBagEnabledD365 || isBagEnabledD365BC || isBagEnabledPowerBIVisual;\n return isBagOfferType && appData.hasPrices;\n};\nexport function getTransactCTATypes(targetApp, uiRole, doesTenantHasLicenseForApp, isEmbedded, billingRegion) {\n var _targetApp_licenseManagement;\n const ctaTypes = [];\n const isAdmin = uiRole === Constants.UiRole.Admin;\n if (isBagTransactable(targetApp)) {\n var _targetApp_licenseManagement1;\n /* Only administrator can install D365CE apps for users in tenant.\n Administrator and Non-Administrator can install D365BC apps for users in tenant if it has licenses.\n Any user can install Power BI Visuals, since they are all Freemium.\n If the offer is Freemium, Install must be the primary action.\n */ const showInstallFirst = isD365(getPrimaryProductUrl(targetApp === null || targetApp === void 0 ? void 0 : targetApp.primaryProduct)) && isAdmin && (targetApp === null || targetApp === void 0 ? void 0 : (_targetApp_licenseManagement1 = targetApp.licenseManagement) === null || _targetApp_licenseManagement1 === void 0 ? void 0 : _targetApp_licenseManagement1.isFreemium) || isPowerBIVisuals(getPrimaryProductUrl(targetApp === null || targetApp === void 0 ? void 0 : targetApp.primaryProduct));\n const isD365BCApp = isD365BC(getPrimaryProductUrl(targetApp === null || targetApp === void 0 ? void 0 : targetApp.primaryProduct));\n if (!isD365BCApp && showInstallFirst) {\n ctaTypes.push(Constants.CTAType.Install);\n ctaTypes.push(Constants.CTAType.BuyLicense);\n } else if (!isD365BCApp && isAdmin && doesTenantHasLicenseForApp || isD365BCApp && doesTenantHasLicenseForApp) {\n ctaTypes.push(Constants.CTAType.BuyLicense);\n ctaTypes.push(Constants.CTAType.Install);\n } else {\n ctaTypes.push(Constants.CTAType.BuyLicense);\n }\n } else if (isPowerBIVisuals(getPrimaryProductUrl(targetApp === null || targetApp === void 0 ? void 0 : targetApp.primaryProduct))) {\n ctaTypes.push(Constants.CTAType.Get);\n } else if (targetApp === null || targetApp === void 0 ? void 0 : (_targetApp_licenseManagement = targetApp.licenseManagement) === null || _targetApp_licenseManagement === void 0 ? void 0 : _targetApp_licenseManagement.isMicrosoftManaged) {\n const showGetCta = targetApp.licenseManagement.isFreemium || doesTenantHasLicenseForApp;\n if (isAdmin && showGetCta) {\n ctaTypes.push(Constants.CTAType.Get);\n ctaTypes.push(Constants.CTAType.RequestTrial);\n } else {\n ctaTypes.push(Constants.CTAType.RequestTrial);\n }\n }\n const isTransactableD365App = isD365(getPrimaryProductUrl(targetApp === null || targetApp === void 0 ? void 0 : targetApp.primaryProduct)) && isTransactApp({\n isEmbedded,\n ctaTypes: targetApp.ctaTypes,\n appData: targetApp,\n billingRegion\n });\n if (isTransactableD365App) {\n ctaTypes.push(Constants.CTAType.RequestTrial);\n }\n return ctaTypes.length ? ctaTypes : null;\n}\nexport function getCtaBagTransactable(uiRole, doesTenantHasLicenseForApp, isFreemium) {\n const isAdmin = uiRole === Constants.UiRole.Admin;\n const { CTAType: { Install, BuyLicense } } = Constants;\n if (isAdmin && (doesTenantHasLicenseForApp || isFreemium)) {\n return Install;\n } else {\n return BuyLicense;\n }\n}\nexport function isSharepointApp(products) {\n return bitMasksMatchBitMask(products, getProdcutBitMaskInfo(DataMap.products.SharePoint));\n}\nexport function isLeadGenEnabled(appData) {\n return appData.leadgenEnabled !== undefined ? appData.leadgenEnabled : null;\n}\nfunction getOfficeHandoffParams(appId, correlationId, locale) {\n const urlArgs = [];\n // These values for auth type are given by Office Store team\n const storeConfig = getAppConfig('config');\n // default values\n let ui = 'en-us';\n // 'locale' also denote the content market applicable for the app.\n // This can be removed once we build support for localization.\n let contentMarket = locale || 'en-us';\n if (storeConfig === null || storeConfig === void 0 ? void 0 : storeConfig.locale) {\n contentMarket = ui = storeConfig.locale;\n }\n // This is the URL which we are trying to fill the parameters for: https://pages.store.office.com/addininstaller.aspx?assetid={0}&ui={1}&rs={2}&sourcecorrid={3}\n urlArgs.push(appId);\n urlArgs.push(ui); // ui => UI language\n urlArgs.push(contentMarket); // rs => Content Market\n urlArgs.push(correlationId);\n return urlArgs;\n}\nexport function getHandoffUrlForProduct(productUrlKey, appId, products, locale) {\n const config = loadPartnerManifest();\n const handOffUrl = config.handoff[`${productUrlKey}`];\n // For office Saas apps, we use the default handoff url which we receive from the backend\n // For Power BI Visuals, we no longer route externally to Office\n if (!handOffUrl || isOfficeSaasApp(productUrlKey, products)) {\n return null;\n }\n const correlationId = getAppConfig('correlationId');\n let urlArgs = [];\n if (isOfficeApp(productUrlKey)) {\n urlArgs = getOfficeHandoffParams(appId, correlationId, locale);\n } else {\n urlArgs = [\n encodeURIComponent(appId),\n encodeURIComponent(getTelemetryResponseUrl(appId)),\n correlationId\n ];\n }\n const handOffURL = getFormattedString(handOffUrl, urlArgs);\n return handOffURL;\n}\nexport function processHandoffURLAndTitle(appData) {\n var _getWindow_location, _getWindow;\n if (!appData) {\n return {\n url: null,\n handoffTitle: null\n };\n }\n const { primaryProduct, entityId, products, locale, title, handoffURL } = appData;\n // We get the Handoff URL from the Partners Manifest file. If the url is null,\n // we need to read the url from the app meta data.\n let handoffTitle;\n let url = getHandoffUrlForProduct(getPrimaryProductUrl(primaryProduct), entityId, products, locale);\n if (!url) {\n if (handoffURL) {\n url = handoffURL;\n const notifyURL = getTelemetryResponseUrl(entityId);\n const queryParams = url.indexOf('?') > -1 ? '&responseUrl=' + notifyURL : '?responseUrl=' + notifyURL;\n url = url + queryParams;\n // Taking you to Azure/Office doesn't make sense for ISV SaaS apps during transition animation popup.\n // So, for only this case, we update the builtFor field.\n // Also, there is a special case for Power BI. For all the content packs, we use the title as Power BI\n const { property, mask } = getProdcutBitMaskInfo(DataMap.products.PowerBI);\n if (!bitMasksMatch(primaryProduct, property, mask)) {\n handoffTitle = title;\n }\n }\n }\n url = updateHandOffUrlWithCampaignParams(url, (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow_location = _getWindow.location) === null || _getWindow_location === void 0 ? void 0 : _getWindow_location.href);\n return {\n url,\n handoffTitle\n };\n}\nexport function isPrivateOffer(appType) {\n if (appType === OdataRawObjectAppType.private) {\n return true;\n }\n return false;\n}\nexport function isOpenInNewWindowButton({ isEmbedded, ctaType, appData, billingRegion, url }) {\n const isTransactable = isTransactApp({\n isEmbedded,\n ctaTypes: [\n ctaType\n ],\n appData,\n billingRegion\n }) || isPrivateOffer(appData === null || appData === void 0 ? void 0 : appData.appType);\n return(// Product decision that for test drive we always show the \"open in new tab\" icon.\n // We couldn't know if the test drive will send the user outside before the button is created\n ctaType === Constants.CTAType.TestDrive || !!url && !isAppContactForm(appData, ctaType) && !isTransactable && !shouldDownloadPowerBIVisual(appData, isEmbedded) && !isEmbedded);\n}\nexport function getDataMapValues(collection, bitmask) {\n return Object.keys(collection).reduce((acc, value)=>{\n if (bitMasksMatchFilter(bitmask, collection[`${value}`])) {\n acc.push(collection[`${value}`]);\n }\n return acc;\n }, []);\n}\nexport function getProductFieldFromDataMap(collection, bitmask, field) {\n const dataMapValues = getDataMapValues(collection, bitmask);\n return dataMapValues ? dataMapValues[0][`${field}`] : '';\n}\nexport function getActionStringForCTAType(ctaType) {\n // Falling back to Get if we ctaType does not match.\n return Constants.ActionStrings[Constants.CTAType[`${ctaType}`]];\n}\n// Utility function to determine if an email has 'onmicrosoft.com' or 'ccsctp.net' [email sufixes for PROD/DF and INT respectively]\nexport function isOnMicrosoftEmail(email) {\n return !!(email && (email.substr(-'onmicrosoft.com'.length) === 'onmicrosoft.com' || email.substr(-'ccsctp.net'.length) === 'ccsctp.net'));\n}\nexport function getLeadGenEmailId(userInfo) {\n return userInfo.email && userInfo.alternateEmail && isOnMicrosoftEmail(userInfo.email) && userInfo.alternateEmail !== 'undefined' ? userInfo.alternateEmail : userInfo.email;\n}\nconst urlList = [\n 'https://powerbi-df.analysis-df.windows.net',\n 'https://dxt.powerbi.com',\n 'https://msit.powerbi.com',\n 'https://app.powerbi.com',\n 'https://app.powerbi.cn',\n 'https://app.powerbigov.us',\n 'https://app.powerbi.de',\n 'https://app.analysis.windows-int.net',\n 'https://home.dynamics.com',\n 'https://tip1.home.dynamics.com',\n 'https://tip1.web.powerapps.com',\n 'https://powerapps.cloudapp.net',\n 'https://portal.analysis.windows-int.net',\n 'https://appgallery.spza-internal.net',\n 'https://appgallery.spza-staging.net',\n 'http://localhost:3000',\n 'https://service.powerapps.com',\n 'https://dxtcurrent.powerbi.com',\n 'https://dxtprevious.powerbi.com',\n 'https://dxtnext.powerbi.com',\n 'https://cosell.dev.microsoft.com',\n 'https://cosell.ppe.microsoft.com',\n 'https://cosell.microsoft.com',\n 'https://partnersalespreview.microsoft.com',\n 'https://partnersales.microsoft.com'\n];\nconst httpsSubString = 'https://';\nexport function checkOriginSource(endpoint) {\n if (!endpoint) {\n return false;\n }\n let origin = endpoint;\n let originStartIndex = 0;\n if (origin.indexOf(httpsSubString) === 0) {\n originStartIndex = httpsSubString.length;\n }\n const firstSlashIndex = origin.indexOf('/', originStartIndex);\n if (firstSlashIndex >= 0) {\n origin = origin.substr(0, firstSlashIndex);\n }\n for(let i = 0; i < urlList.length; i++){\n if (origin.toLocaleLowerCase() === urlList[`${i}`]) {\n return true;\n }\n }\n if (/^https:\\/\\/.*analysis.windows(-int)?.net/.test(origin) || // PowerBI (daily) env\n /^https:\\/\\/.*.dynamics.com/.test(origin) || // Dynamics CRM\n /^https:\\/\\/.*.dynamics.de/.test(origin) || // Dinamics CRM\n /^https:\\/\\/.*.financials.dynamics-tie.com/.test(origin) || /^https:\\/\\/.*.financials.dynamics-ppe.com/.test(origin) || /^https:\\/\\/.*.projectmadeira.com/.test(origin) || // Madeira PROD\n /^https:\\/\\/.*.projectmadeira-ppe.com/.test(origin) || // Madeira INT\n /^https:\\/\\/.*.projectmadeira-test.com/.test(origin)) {\n // Madeira test\n return true;\n } else {\n return false;\n }\n}\nexport function removeURLParameter(url, parameter) {\n // Split the url into 2 parts. The right side of the '?' has all the query parameters.\n const urlparts = url.split('?');\n if (urlparts.length >= 2) {\n const prefix = encodeURIComponent(parameter) + '=';\n // We use either '&' or ';' as the parameter seperaters. Use the second part of the urlParts which has queryParams\n const queryParams = urlparts[1].split(/[&;]/g);\n for(let i = queryParams.length; i-- > 0;){\n // Search the string for the last occurance of the prefix : Equivalent of string starts with\n if (queryParams[`${i}`].lastIndexOf(prefix, 0) !== -1) {\n queryParams.splice(i, 1); // Removes that element from the queryParams array\n }\n }\n const newUrl = urlparts[0] + (queryParams.length > 0 ? '?' + queryParams.join('&') : '');\n return newUrl;\n } else {\n return url;\n }\n}\n// Telemetry Helper Functions\nexport function getDataMapString(collection, bitmask, field) {\n const dataMapValues = getDataMapValues(collection, bitmask);\n const result = dataMapValues.map((value)=>{\n return value[`${field}`];\n }).join(', ');\n return result;\n}\nexport function getProductStringArray(productBitmask) {\n const productUrlKeyString = getDataMapString(DataMap.products, productBitmask, 'UrlKey');\n return getTrimmedWords(productUrlKeyString, ',');\n}\n/**\n * get consent dialog info for telemetry detail content\n *\n * @param hasCheckBox consent Dialog has consent checkbox: e.x. By click this ...\n * @param hasUserProfile consent Dialog has user profile: e.x. name, email, phone, job, company, ...\n *\n * @return\n * an object which has following properties\n * hasPhone: boolean determine whether dialog has phone or not\n * hasCheckbox: boolean determine whether dialog has checkbox or not\n */ export function getTelemetryDetailContentConsentDialogInfo(hasCheckbox = false, hasUserProfile = false) {\n const consentDialogInfo = {\n hasContactInfo: isNullorUndefined(hasUserProfile) ? undefined : hasUserProfile,\n hasCheckbox: isNullorUndefined(hasCheckbox) ? undefined : hasCheckbox\n };\n return consentDialogInfo;\n}\nfunction getTag(keys) {\n return keys.map((key)=>AppTag[`${key}`]);\n}\nexport function isCertifiedSoftware(app) {\n var _app_badges;\n return !!(app === null || app === void 0 ? void 0 : (_app_badges = app.badges) === null || _app_badges === void 0 ? void 0 : _app_badges.includes(Badges.MAICPPCertifiedSolution));\n}\nexport function isFreeTrial(app) {\n var _app_startingPrice, _app_pricingInformation;\n if (app.actionString === Constants.ActionStrings.Try) {\n return true;\n }\n // simple plan has startingPrice\n if ((_app_startingPrice = app.startingPrice) === null || _app_startingPrice === void 0 ? void 0 : _app_startingPrice.hasFreeTrial) {\n return true;\n }\n return (_app_pricingInformation = app.pricingInformation) === null || _app_pricingInformation === void 0 ? void 0 : _app_pricingInformation.skus.some((sku)=>sku.freeTrialDurationDays);\n}\nfunction isMicrosoftCertified({ CertificationState }) {\n return CertificationState === Constants.CertificationType.MicrosoftCertified;\n}\nfunction isPreferredSolution({ isSolutionMap = false }) {\n return isSolutionMap || false;\n}\nfunction isOfficeAwards({ tags, entityId }) {\n return (tags === null || tags === void 0 ? void 0 : tags.length) && getTag(tags)[0] === AppTag.OfficeAward || (entityId === null || entityId === void 0 ? void 0 : entityId.toUpperCase()) === Constants.HyperfishEntityId.toUpperCase();\n}\nfunction isPBICertified({ tags }) {\n return (tags === null || tags === void 0 ? void 0 : tags.length) && getTag(tags)[0] === AppTag.PowerBICertified;\n}\nfunction isAzureExpertsMSP({ tags }) {\n return tags === null || tags === void 0 ? void 0 : tags.includes(Constants.BadgeType.AzureExpertsMSP);\n}\nfunction isPrivateOfferBadge({ appType = OdataRawObjectAppType.public }) {\n return isPrivateOffer(appType);\n}\nfunction isAzureBenefitEligible({ AzureBenefitEligible = 0 }) {\n return AzureBenefitEligible !== 0;\n}\nconst badgesConditions = {\n [Constants.BadgeType.MicrosoftCertified]: isMicrosoftCertified,\n [Constants.BadgeType.PreferredSolution]: isPreferredSolution,\n [Constants.BadgeType.OfficeAwards]: isOfficeAwards,\n [Constants.BadgeType.PBICertified]: isPBICertified,\n [Constants.BadgeType.AzureExpertsMSP]: isAzureExpertsMSP,\n [Constants.BadgeType.PrivateOffer]: isPrivateOfferBadge,\n [Constants.BadgeType.AzureBenefitEligible]: isAzureBenefitEligible,\n [Constants.BadgeType.CertifiedSoftware]: isCertifiedSoftware,\n [Constants.BadgeType.FreeTrial]: isFreeTrial\n};\nexport function getBadgeTypes(appData) {\n return Object.entries(badgesConditions).filter(([, condition])=>condition(appData)).map(([badge])=>badge);\n}\n/**\n * get application telemetry detail content as string\n *\n * @param appInfo: application information\n * @param isNationalCloud: detetmine this application is Microsoft National Clouds: e.g. Azure, Dynamics 365, and Office 365\n * @param ctaTypes: click to action types\n * @param consentDialogHasUserProfile: if current view is a consent modal dialog, determine it has user contact information\n * @param consentDialogHasCheckbox: if current view is a consent modal dialog, determine it has checkbox\n *\n * @return:\n * a string serialized for telemetry property details\n */ export function getAppTelemetryDetailContentText({ appInfo, isNationalCloud, isEmbedded, ctaTypes, consentDialogHasUserProfile, consentDialogHasCheckbox, currentView, tileDataRequestId, uiRole, hasLicense, shouldShowUserTerms, planId, ribbonKey, trailId }) {\n if (!appInfo) {\n return '';\n }\n const { privateApp, leadgenEnabled: leadGenEnabled, title, builtFor, actionString, licenseManagement, entityId, offerType, startingPrice, products, publisher, publisherId } = appInfo;\n // data map, e.g. filter, property 'Title'\n const dataMapField = 'Title';\n const appPublisher = publisher && isNationalCloud ? sha256(publisher).toString() : publisher;\n const appPublisherId = publisherId && isNationalCloud ? sha256(publisherId).toString() : publisherId;\n const ctaTypeString = isArray(ctaTypes) && ctaTypes.map((ctaType)=>Constants.CTAType[`${ctaType}`]).join(', ') || undefined;\n const badgeTypes = getBadgeTypes(appInfo);\n const productAvailabilityType = privateApp ? BusinessTelemetry.ProductAvailabilityType.Private : BusinessTelemetry.ProductAvailabilityType.Public;\n const isSaasTransactApp = offerType === OfferType.SaaSApp ? startingPrice && typeof startingPrice.pricingData === 'object' ? 'true' : 'false' : '';\n const isTransactable = startingPrice && typeof startingPrice.pricingData === 'object' ? 'true' : 'false';\n const appTelemetryDetailContent = {\n title,\n publisher: appPublisher,\n builtFor,\n actionString,\n products: getDataMapString(DataMap.products, products, dataMapField),\n leadGenEnabled,\n ctaType: ctaTypeString,\n type: productAvailabilityType,\n currentView,\n tileDataRequestId: tileDataRequestId || '',\n isSaasTransactApp,\n isEmbedded,\n isTransactable,\n isMicrosoftManaged: licenseManagement === null || licenseManagement === void 0 ? void 0 : licenseManagement.isMicrosoftManaged,\n isFreemium: licenseManagement === null || licenseManagement === void 0 ? void 0 : licenseManagement.isFreemium,\n uiRole,\n hasLicense,\n showTerms: shouldShowUserTerms,\n badgeTypes,\n publisherId: appPublisherId,\n entityId,\n planId,\n ribbonKey,\n trailId\n };\n // if any of consentDialogHasUserProfile and consentDialogHasCheckbox has value\n // add consent dialog info into telemetry detail content\n if (!isNullorUndefined(consentDialogHasUserProfile) || !isNullorUndefined(consentDialogHasCheckbox)) {\n const consentDialogInfoKey = 'consentDialogInfo';\n appTelemetryDetailContent[`${consentDialogInfoKey}`] = getTelemetryDetailContentConsentDialogInfo(consentDialogHasCheckbox, consentDialogHasUserProfile);\n }\n return JSON.stringify(appTelemetryDetailContent);\n}\n/**\n * get consulting service telemetry detail content as string\n *\n * @param serviceInfo: consulting service information\n * @param isNationalCloud: detetmine this application is Microsoft National Clouds: e.g. Azure, Dynamics 365, and Office 365\n * @param ctaTypes: click to action types\n * @param consentDialogHasUserProfile: if current view is a consent modal dialog, determine it has user contact information\n * @param consentDialogHasCheckbox: if current view is a consent modal dialog, determine it has checkbox\n * @param currentView: name of main container component rendered in current page, e.x. 'galleryPage'\n *\n * @return:\n * a string serialized for telemetry property details\n */ export function getServiceTelemetryDetailContentText({ serviceInfo, isNationalCloud, ctaTypes, consentDialogHasUserProfile, consentDialogHasCheckbox, currentView, ribbonKey = '', trailId }) {\n if (!serviceInfo) {\n return '';\n }\n const { serviceTypes, title, industries, products, publisher, entityId, publisherId } = serviceInfo;\n // data map, e.g. filter, property 'Title'\n const dataMapField = 'Title';\n const ctaTypeString = isArray(ctaTypes) && ctaTypes.map((ctaType)=>Constants.CTAType[`${ctaType}`]).join(', ') || undefined;\n const appPublisher = publisher && isNationalCloud ? sha256(publisher).toString() : publisher;\n const appPublisherId = publisherId && isNationalCloud ? sha256(publisherId).toString() : publisherId;\n const serviceTelemetryDetailContent = {\n serviceName: title,\n publisher: appPublisher,\n actionString: Constants.ActionStrings.Service,\n products: getDataMapString(DataMap.products, products, dataMapField),\n industries: getDataMapString(DataMap.industries, industries, dataMapField),\n serviceTypes: Constants.ServiceTypes[`${serviceTypes}`],\n ctaType: ctaTypeString,\n currentView,\n entityId,\n publisherId: appPublisherId,\n ribbonKey,\n trailId\n };\n // if any of consentDialogHasUserProfile and consentDialogHasCheckbox has value\n // add consent dialog info into telemetry detail content\n if (!isNullorUndefined(consentDialogHasUserProfile) || !isNullorUndefined(consentDialogHasCheckbox)) {\n const consentDialogInfoKey = 'consentDialogInfo';\n serviceTelemetryDetailContent[`${consentDialogInfoKey}`] = getTelemetryDetailContentConsentDialogInfo(consentDialogHasCheckbox, consentDialogHasUserProfile);\n }\n return JSON.stringify(serviceTelemetryDetailContent);\n}\nexport function isEmbedHostDataDynamic(embedHost) {\n if (embedHost === DataMap.products.PowerBI.UrlKey) {\n return true;\n }\n return false;\n}\nexport function getEmbedHostName(embedHost) {\n var _getProductByUrlKey;\n return embedHost != null ? (_getProductByUrlKey = getProductByUrlKey({\n urlKey: embedHost\n })) === null || _getProductByUrlKey === void 0 ? void 0 : _getProductByUrlKey.UrlKey : 'portal';\n}\nexport function compareApiVersion(sourceVersion, targetVersion) {\n return sourceVersion < targetVersion ? -1 : sourceVersion > targetVersion ? 1 : 0;\n}\nexport function IsMoonCakeNationalCloud(nationalCloud) {\n if (nationalCloud) {\n if (nationalCloud.toLowerCase() === Constants.mooncakeNationalCloud) {\n return true;\n }\n }\n return false;\n}\nfunction getProductPropertyByProductKey(productKey, value, propertyName) {\n for(const key in DataMap.products){\n if (!!DataMap.products[`${key}`] && DataMap.products[`${key}`][`${productKey}`] === value) {\n return DataMap.products[`${key}`][`${propertyName}`];\n }\n }\n return null;\n}\nexport function getProductBackendKeyByLongTitle(productTitle) {\n return getProductPropertyByProductKey('LongTitle', productTitle, 'BackendKey');\n}\nexport function serializeUserProfileEmbedInfo(userInfo) {\n let profileToSave = '';\n for(const key in userInfo){\n if (key === Constants.userAcceptField) {\n continue;\n }\n profileToSave += key + ':' + userInfo[`${key}`] + '|';\n }\n return profileToSave;\n}\nexport function readUserProfileEmbedCookie(userProfileInCookie, user) {\n const userProfileInfo = userProfileInCookie.split('|');\n userProfileInfo.forEach((pair)=>{\n const colenIndex = pair.indexOf(':');\n if (colenIndex !== -1) {\n const key = pair.substring(0, colenIndex);\n const value = pair.substring(colenIndex + 1, pair.length);\n user[`${key}`] = value;\n }\n });\n}\nexport function logClientError(err, additionalDetails, file = '', isWarning = false) {\n try {\n var _getWindow_location, _getWindow;\n const value = err ? parse(err) : [];\n const stringifiedStack = value.map((sf)=>sf.toString()).join('\\n');\n let errorMessage = '';\n if (err && err.message) {\n errorMessage = `Error Message: ${err.message}\\n `;\n }\n additionalDetails = errorMessage + additionalDetails + '\\n Stack: ' + stringifiedStack;\n // adding the file to query errors based on the ones that have a valid file path hence raised from our code base vs ones raised by external components\n const details = {\n file,\n additionalDetails\n };\n console.error(err);\n const payload = {\n page: (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow_location = _getWindow.location) === null || _getWindow_location === void 0 ? void 0 : _getWindow_location.href,\n action: Constants.Telemetry.Action.PageLoad,\n actionModifier: isWarning ? Constants.Telemetry.ActionModifier.Warning : Constants.Telemetry.ActionModifier.Error,\n details: JSON.stringify(details),\n flushLog: true\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n const log = isWarning ? logger.warning.bind(logger) : logger.error.bind(logger);\n log(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n } catch (error) {\n console.error(error);\n }\n}\n// Utility function which determines if a string is a JSON or not.\n// Added this to avoid crash in few cases where we receive an object instead of a json string.\nexport function isJsonString(str) {\n let parsedObj = null;\n try {\n parsedObj = JSON.parse(str);\n } catch (e) {\n return null;\n }\n return parsedObj;\n}\n// function to loop through feature flags\n// and check if at least one of them is present in the queries or in the app settings\nexport function queryConfigContainsFeatureFlags(queryParams) {\n const featureFlags = new IFeatureFlags();\n const keys = Object.getOwnPropertyNames(featureFlags);\n const keysLength = keys.length;\n for(let i = 0; i < keysLength; i++){\n if (queryParams && queryParams[keys[`${i}`]]) {\n return true;\n } else if (process.env[keys[`${i}`]]) {\n return true;\n }\n }\n return false;\n}\n// function to loop through feature flags\n// and return an object with featureFlag values that are present in the query or in the app settings\n// while ignoring other params in the query\nexport function getParsedFeatureFlags(queryParams) {\n const result = new IFeatureFlags();\n if (queryParams) {\n const keys = Object.getOwnPropertyNames(result);\n const keysLength = keys.length;\n for(let i = 0; i < keysLength; i++){\n const ff = keys[`${i}`];\n if (queryParams[`${ff}`]) {\n if (typeof result[`${ff}`] === 'boolean') {\n result[`${ff}`] = queryParams[`${ff}`] === 'true';\n } else {\n result[`${ff}`] = queryParams[`${ff}`];\n }\n } else if (process.env[`${ff}`]) {\n result[`${ff}`] = process.env[`${ff}`];\n }\n }\n }\n result.activeCloudMarketplaceFeatures();\n return result;\n}\n// returns true or false whether the regular expression matches pattern\nexport function matchesExpression(spzaUserId, pattern) {\n const match = spzaUserId.match(pattern);\n if (match) {\n return match.index === 0;\n }\n return false;\n}\nexport function getSpzaUserIdAndNewUserModifier() {\n const spzaUserData = {\n spzaUserId: '',\n newUserModifier: Constants.Telemetry.ActionModifier.SpzaUserIdNew\n };\n // get spza user id\n spzaUserData.spzaUserId = getLocalStorageItem(Constants.LocalStorage.spzaUserId);\n // create spza user id\n if (isEmptyNullorUndefinedString(spzaUserData.spzaUserId)) {\n // NOTE: if local storage is not enabled in browser, we always create a new one everytime we access it\n spzaUserData.spzaUserId = generateGuid();\n // store spza user id\n saveLocalStorageItem(Constants.LocalStorage.spzaUserId, spzaUserData.spzaUserId);\n } else if (hasUserAgreedPrivacyConsent()) {\n // a returned user must meet following criteria\n // 1) user has agreed privacy agreement <=> spzaUserId is in browser local storage, and\n // 2) spzaUserId is found\n spzaUserData.newUserModifier = Constants.Telemetry.ActionModifier.SpzaUserIdReturn;\n }\n return spzaUserData;\n}\nexport function getTrailIdAndData(forceUpdate = false, action) {\n // get spza user trail id\n const data = JSON.parse(getSessionStorageItem(Constants.LocalStorage.trailId) || JSON.stringify({}));\n const trailData = _object_spread({\n trailId: '',\n trailIdModifier: Constants.Telemetry.ActionModifier.TrailIdUpdate,\n time: Date.now().toString()\n }, data);\n const sessionTimeOut = 1000 * 60 * 60 * 2; // 2h\n const isValid = new Date(parseInt(trailData.time)).getTime() + sessionTimeOut > Date.now();\n // create user trail id\n if (isEmptyNullorUndefinedString(trailData.trailId) || !isValid || forceUpdate) {\n trailData.trailId = `${generateGuid()}_${trailData.time}`;\n // store trail id\n saveSessionStorageItem(Constants.LocalStorage.trailId, JSON.stringify(trailData));\n if (forceUpdate) {\n trailData.trailIdModifier = `${Constants.Telemetry.ActionModifier.TrailIdUpdate} by force duo to ${action}`;\n SpzaInstrumentService.registerTrailId(trailData.trailId);\n }\n console.log('[TrailID]', trailData.trailId, trailData.trailIdModifier);\n } else if (hasUserAgreedPrivacyConsent()) {\n trailData.trailIdModifier = Constants.Telemetry.ActionModifier.TrailIdValid;\n }\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.TrailData,\n actionModifier: trailData.trailIdModifier,\n details: JSON.stringify(trailData)\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n return trailData;\n}\nexport function getLocaleDate(date, locale) {\n const options = {\n weekday: 'short',\n year: 'numeric',\n month: 'short',\n day: 'numeric'\n };\n if (date) {\n const parsedDate = new Date(date);\n return locale ? parsedDate.toLocaleDateString(locale, options) : parsedDate.toLocaleDateString();\n }\n return '';\n}\nexport function getNetworkStats() {\n var _navigator;\n const { effectiveType, rtt, downlink } = ((_navigator = navigator) === null || _navigator === void 0 ? void 0 : _navigator.connection) || {};\n return {\n downlink,\n rtt,\n effectiveType\n };\n}\nexport function logAssetsTelemetryEvents(store) {\n var _state_config, _state_config1, _getWindow_performance, _getWindow, _getWindow_performance1, _getWindow1;\n const state = store.getState();\n const instrument = SpzaInstrumentService.getProvider();\n const page = getWindow().location.href;\n const landingView = state === null || state === void 0 ? void 0 : (_state_config = state.config) === null || _state_config === void 0 ? void 0 : _state_config.currentView;\n const isEmbedded = ((_state_config1 = state.config) === null || _state_config1 === void 0 ? void 0 : _state_config1.isEmbedded) || false;\n const connection = getNetworkStats();\n const userAgent = navigator.userAgent;\n const additionalTelemetry = {\n landingView,\n isEmbedded,\n connection,\n userAgent\n };\n const { navigationStart = 0, requestStart = 0 } = ((_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow_performance = _getWindow.performance) === null || _getWindow_performance === void 0 ? void 0 : _getWindow_performance.timing) || {};\n const perfEntries = ((_getWindow1 = getWindow()) === null || _getWindow1 === void 0 ? void 0 : (_getWindow_performance1 = _getWindow1.performance) === null || _getWindow_performance1 === void 0 ? void 0 : _getWindow_performance1.getEntriesByType('resource')) || [];\n perfEntries.filter(({ initiatorType })=>initiatorType === 'script' || initiatorType === 'link').forEach((perfEntry)=>{\n const { name: src, initiatorType, responseEnd: performanceNow, duration } = perfEntry;\n const telemetryData = {\n page,\n action: Constants.Telemetry.Action.PerfResources,\n actionModifier: Constants.Telemetry.ActionModifier.Complete,\n details: JSON.stringify(_object_spread({\n src,\n initiatorType,\n performanceNow,\n durationSinceRequestStart: performanceNow - (requestStart - navigationStart),\n duration\n }, additionalTelemetry))\n };\n instrument.probe('logTelemetryInfo', telemetryData);\n logger.info(telemetryData.details, {\n action: telemetryData.action,\n actionModifier: telemetryData.actionModifier\n });\n });\n}\nexport function getHostType(isEmbed) {\n const hostType = !isEmbed ? Constants.appSource : Constants.appSourceEmbed;\n return hostType;\n}\nexport function getCTATypeForActionString(actionString) {\n if (!actionString) {\n return undefined;\n }\n const actionStrings = Object.keys(Constants.ActionStrings);\n for (const key of actionStrings){\n if (Constants.ActionStrings[`${key}`] === actionString) {\n return Constants.CTAType[`${key}`];\n }\n }\n return undefined;\n}\nexport function logTenantInfo(users, isAutoSign, spzaUserId) {\n const instrument = SpzaInstrumentService.getProvider();\n if (users && users.signedIn && users.email) {\n let tenant = '';\n const emailParts = users.email.split('@');\n if (emailParts.length > 1) {\n tenant = emailParts[1];\n }\n // When the user is signed in, we need to correlate the spzaUserId with the signed-in information.\n // We extract the tid and oid and then map it to the spzaUserId\n const userDetails = {\n 'tenant name': tenant,\n 'tenand id': users.tid ? users.tid : '',\n oid: users.oid ? users.oid : '',\n spzaUserId,\n isAutoSign,\n isMSAUser: users.isMSAUser,\n userSegment: users.userSegment && UserSegment[users.userSegment] || '',\n fieldHubUserType: Constants.FieldHubUserType.None,\n emailHash: sha256(users.email).toString(),\n alternateEmailHash: users.alternateEmail && users.alternateEmail !== 'undefined' ? sha256(users.alternateEmail).toString() : '',\n tenantType: users.tenantType\n };\n const tenantPayload = {\n eventName: Constants.Telemetry.Action.UserTenantInfo,\n data: JSON.stringify(userDetails)\n };\n instrument.probe('logOneTimeInfo', tenantPayload);\n logger.info(tenantPayload.data, {\n action: tenantPayload.eventName,\n actionModifier: Constants.Telemetry.ActionModifier.Info\n });\n }\n}\n// This method logs the landing page details, user settings, perf\nexport function logInitialTelemetryEvents(store) {\n var _getWindow_location, _getWindow;\n const timeAtTelemetryMethodCall = new Date().getTime();\n const state = store.getState();\n const instrument = SpzaInstrumentService.getProvider();\n // This sets the correlationId which will be passed to the telemetry request header\n instrument.probe('initSystemInfo');\n const sharedInstrument = SharedInstrumentService.getProvider();\n // This sets the correlationId which will be passed to the telemetry request header\n sharedInstrument.probe('initSystemInfo');\n // These are one time telemetry events\n instrument.probe('logUserSystemInfo', state.config.locale);\n const { spzaUserId, newUserModifier } = getSpzaUserIdAndNewUserModifier();\n SpzaInstrumentService.registerSpzaId(spzaUserId);\n const trailIdData = getTrailIdAndData();\n SpzaInstrumentService.registerTrailId(trailIdData.trailId);\n SpzaInstrumentService.registerHostType(getHostType(state.config.isEmbedded));\n const spzaUserIDPayload = _object_spread({\n eventName: Constants.Telemetry.Action.SpzaUserId,\n actionModifier: newUserModifier,\n data: spzaUserId\n }, trailIdData);\n instrument.probe('logOneTimeInfo', spzaUserIDPayload);\n logger.info(spzaUserIDPayload.data, {\n action: spzaUserIDPayload.eventName,\n actionModifier: spzaUserIDPayload.actionModifier\n });\n // Logs user tenant info if logged in\n logTenantInfo(state.users, false, spzaUserId);\n const embedHostName = getEmbedHostName(state.config.embedHost);\n const { landingView } = state.config;\n const landingDetails = {\n landingPageURL: getWindow().location.href,\n landingView,\n referrer: getWindow().document.referrer,\n isEmbedded: state.config.isEmbedded,\n embedHost: embedHostName,\n isAuthenticated: state.users ? state.users.signedIn : '',\n cloudType: state.config.nationalCloud,\n campaign: extractCampaignsFromUrl(getWindow().location.href),\n commitHash: __COMMIT_HASH__,\n userSegment: state.users && state.users.userSegment && UserSegment[state.users.userSegment] || ''\n };\n const appName = getEntityIdFromUrl({\n pathName: (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow_location = _getWindow.location) === null || _getWindow_location === void 0 ? void 0 : _getWindow_location.pathname\n });\n getWindow().telemetry({\n action: Constants.Telemetry.Action.Landing,\n actionModifier: Constants.Telemetry.ActionModifier.End,\n details: landingDetails,\n spzaId: spzaUserId,\n appName\n });\n // if app data is fetched after bundle load (like power bi), the page will not be rendered on\n // component mount. There will be an additional network call to fetch app data after the\n // initial window/frame load. So defer perf event to post app data retrieval\n if (!embedHostUtils.hasDynamicData(state.config.embedHost)) {\n const timing = performance.timing;\n // Telemetry for Network Latency\n const networkLatency = timing.responseEnd - timing.fetchStart;\n // The time taken for page load once the page is received from the server\n // we may find timing.loadEventEnd as 0 if called before load event fires.\n // If so, use current time as approximation till we fix it properly\n const loadEventEnd = timing.loadEventEnd !== 0 ? timing.loadEventEnd : timeAtTelemetryMethodCall;\n // The time taken for page load once the page is received from the server\n const pageLoadTime = loadEventEnd - timing.responseEnd;\n // The whole process of navigation and page load\n // notice the inconsistent usage of time (loadEventEnd), which makes the below not too useful for me\n const navigationToPageLoad = loadEventEnd - timing.navigationStart;\n // the data we are getting here is valuable, but seems very browser specific (some browsers do not properly support)\n // so introducing a new number here that will always be consistent:\n const timePassedSinceNavigationStart = timeAtTelemetryMethodCall - timing.navigationStart;\n const perfTimings = {\n networkLatency,\n pageLoadTime,\n navigationToPageLoad,\n timePassedSinceNavigationStart,\n allTimings: timing,\n isEmbedded: state.config.isEmbedded,\n embedHost: embedHostName,\n isAuthenticated: state.users ? state.users.signedIn : '',\n // The server created state will have the count set as 0, in case we are seeing any issue,\n // wherein without going to server we see app view being loaded this well let us know.\n TelemetryLoggedCount: state.config.appViewTelemetryLoggedCount,\n landingPageURL: getWindow().location.href\n };\n const perfPayload = {\n eventName: Constants.Telemetry.Action.PerfEvents,\n data: JSON.stringify(perfTimings),\n flushLog: true\n };\n // This would dispatch an action to update the incremented count in state\n store.dispatch(createAppViewTelemetryLoggedAction(null));\n instrument.probe('logOneTimeInfo', perfPayload);\n logger.info(perfPayload.data, {\n action: perfPayload.eventName,\n actionModifier: Constants.Telemetry.ActionModifier.Info\n });\n }\n}\n/**\n * Sets the Profile feature flag in the state tree to true\n * @param store application state tree\n */ export function setProfileFeatureFlag(store) {\n const state = store.getState();\n // need feature flags from config\n if (!state || !state.config) {\n return;\n }\n const data = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.EnableFeature,\n actionModifier: Constants.Telemetry.ActionModifier.Info,\n details: JSON.stringify('User Profile phone number feature enabled.')\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', data);\n logger.info(data.details, {\n action: data.action,\n actionModifier: data.actionModifier\n });\n const featureFlags = _object_spread_props(_object_spread({}, state.config.featureFlags), {\n ProfileExp: 'true'\n });\n store.dispatch(createFeatureFlagsReceivedAction(featureFlags));\n}\n/**\n * Checks and sets whether we need to set the profileExp flag to true in the state depending on the pattern\n * @param store application state tree\n * @param pattern regular expression to apply to spza user id.\n */ export function setProfileFeatureFlagWithPattern(store, pattern) {\n const userIdInfo = getSpzaUserIdAndNewUserModifier();\n // eslint-disable-next-line security/detect-non-literal-regexp\n const profileRegex = new RegExp(pattern);\n if (matchesExpression(userIdInfo.spzaUserId, profileRegex)) {\n setProfileFeatureFlag(store);\n }\n}\nexport function encodeVulnerableDataInInitalState(initialState) {\n const userState = initialState.users;\n userState.firstName = encodeURI(userState.firstName);\n userState.lastName = encodeURI(userState.lastName);\n userState.displayName = encodeURI(userState.displayName);\n userState.email = encodeURI(userState.email);\n userState.alternateEmail = encodeURI(userState.alternateEmail);\n}\nexport function decodeVulnerableDataInInitalState(initialState) {\n const userState = initialState.users;\n userState.firstName = decodeURI(userState.firstName);\n userState.lastName = decodeURI(userState.lastName);\n userState.displayName = decodeURI(userState.displayName);\n userState.email = decodeURI(userState.email);\n userState.alternateEmail = decodeURI(userState.alternateEmail);\n}\nexport function isMSASupported(products) {\n const matched = Object.values(DataMap.products).filter((product)=>!product.ShortcutFilters && bitMasksMatchFilter(products, product));\n return !!(matched.length && matched.every(({ AllowMSA })=>AllowMSA));\n}\nexport function isAppForMSAAccountOnly(primaryProduct, products, ctaType) {\n return isOfficeApp(getPrimaryProductUrl(primaryProduct)) && !isSharepointApp(products) && ctaType === Constants.CTAType.Purchase;\n}\nexport function getSignInModalTypeHelper(primaryProduct, products, userInfo, ctaType, isService, isTransactApp = false) {\n // If the user is in a consulting service\n if (isService) {\n // And already signed in, then we show the AAD sign in modal\n if (!userInfo.signedIn) {\n return Constants.SignInType.SignInWith_AAD;\n }\n // Otherwise, the user is already authorized.\n return Constants.SignInType.Authorized;\n }\n const isMSAUser = userInfo.isMSAUser;\n const isMSASupportedProduct = isMSASupported(products) && !isTransactApp;\n // To buy any office product other than sharepoint, the user should be signed in as a MSA user.\n const shouldForceMSA = isAppForMSAAccountOnly(primaryProduct, products, ctaType);\n if (!userInfo.signedIn) {\n if (shouldForceMSA) {\n return Constants.SignInType.SignInWith_MSA;\n } else if (isMSASupportedProduct) {\n return Constants.SignInType.SignInWith_MSA_AAD; // For WXPO products which support both\n } else {\n return Constants.SignInType.SignInWith_AAD;\n }\n }\n // already signed in as MSA and it is a transact app switch to AAD.\n if (userInfo.signedIn && isMSAUser && isTransactApp) {\n return Constants.SignInType.SwitchTo_AAD;\n }\n // If the user is not an MSA User and we have to force the user to be MSA, then we do so.\n if (userInfo.signedIn && !isMSAUser && shouldForceMSA) {\n return Constants.SignInType.SwitchTo_MSA;\n }\n // We need to switch to AAD signin dialog when :\n // 1) User is already signed in\n // 2) The product doesn't support MSA\n // 3) The user is an MSA user\n if (userInfo.signedIn && !isMSASupportedProduct && isMSAUser) {\n return Constants.SignInType.SwitchTo_AAD;\n }\n // If all the above conditions failed, it means the user is already signed in with proper authentication and can continue to Consent modal.\n return Constants.SignInType.Authorized;\n}\nexport function getSignInModalType(primaryProduct, products, userInfo, ctaType, isService, isTransactApp = false) {\n const isServiceEntity = !!isService;\n return isServiceEntity ? getSignInModalTypeHelper(null, null, userInfo, ctaType, isServiceEntity, isTransactApp) : getSignInModalTypeHelper(primaryProduct, products, userInfo, ctaType, isServiceEntity, isTransactApp);\n}\nexport function isAppForAdminCenter(app) {\n return !app.hideFromAdminPortal && bitMasksContainSomeBitMask(app.products, getShortCutBitmask(DataMap.products.AdminPortal)) && !(bitmaskMatch('web-apps', app.primaryProduct) && app.ctaTypes.length === 1 && app.ctaTypes[0] === Constants.CTAType.RequestTrial);\n}\nexport function embeddedAppDataFiltering(appData, embedHost) {\n let filteredApps = appData;\n if (embedHost) {\n let appFilter = (app)=>{\n const productInfo = getProductByUrlKey({\n urlKey: embedHost\n });\n const bitmaskInfo = getProdcutBitMaskInfo(productInfo);\n return bitMasksMatchBitMask(app.primaryProduct, bitmaskInfo);\n };\n // HACK: remove after Legacy CRM EmbedHost path is fixed\n if (embedHost === Constants.dynamics365.salesED) {\n appFilter = (app)=>{\n const bitmaskInfo = getProdcutBitMaskInfo(DataMap.products.Dynamics365);\n return bitMasksMatchBitMask(app.primaryProduct, bitmaskInfo);\n };\n }\n if (embedHost === Constants.dynamics365.dynamics365) {\n appFilter = (app)=>{\n const bitmaskOperationsED = getProdcutBitMaskInfo(DataMap.products.Dynamics365forOperations);\n const bitmaskDynamics365 = getProdcutBitMaskInfo(DataMap.products.Dynamics365);\n const bitmaskFinanceAndOperationsBD = getProdcutBitMaskInfo(DataMap.products.Dynamics365forBusinessCentral);\n return bitMasksMatchBitMask(app.primaryProduct, bitmaskOperationsED) || bitMasksMatchBitMask(app.primaryProduct, bitmaskDynamics365) || bitMasksMatchBitMask(app.primaryProduct, bitmaskFinanceAndOperationsBD);\n };\n }\n if (embedHost === Constants.adminPortal) {\n appFilter = (app)=>{\n return isAppForAdminCenter(app);\n };\n }\n filteredApps = appData.filter(appFilter);\n }\n return filteredApps;\n}\nexport function isEmailValid(email) {\n if (!email) {\n return false;\n }\n return isEmail(email);\n}\n// Validates whether the input is empty or not empty by trimming white spaces\n// validate callback is optional for extra validation\nexport function isValidInput(input, validateCallBack) {\n if (input) {\n const inputNoSpaces = input.trim();\n if (inputNoSpaces.length > 0) {\n if (validateCallBack) {\n return validateCallBack(input);\n } else {\n return true;\n }\n }\n }\n return false;\n}\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function getElement(search, key, selectorFunc) {\n let element = null;\n switch(search){\n case Constants.SearchBy.Id:\n element = document.getElementById(key);\n break;\n case Constants.SearchBy.Class:\n element = document.getElementsByClassName(key)[0];\n break;\n case Constants.SearchBy.Tag:\n element = document.getElementsByTagName(key)[0];\n break;\n case Constants.SearchBy.QuerySelector:\n {\n const elements = document.querySelectorAll(key);\n if (selectorFunc) {\n element = selectorFunc(elements);\n } else {\n element = elements.length > 0 ? elements[0] : null;\n }\n break;\n }\n }\n return element;\n}\nexport function focusElementByObject(elementToFocus) {\n const element = getElement(elementToFocus.search, elementToFocus.key, elementToFocus.selectorFunc);\n if (element) {\n element.focus();\n }\n return element;\n}\nexport function addClassToElement(search, key, className) {\n const element = getElement(search, key);\n if (element && element.classList) {\n element.classList.add(className);\n }\n}\nexport function removeClassToFirstMatchedElement(search, key, className) {\n const element = getElement(search, key);\n if (element && element.classList) {\n element.classList.remove(className);\n }\n}\nexport function removeClassFromElements(elementsClassName) {\n const elements = document.getElementsByClassName(elementsClassName);\n for(const clearElement in elements){\n if (elements[`${clearElement}`].classList && elements[`${clearElement}`].classList.contains(elementsClassName)) {\n elements[`${clearElement}`].classList.remove(elementsClassName);\n }\n }\n}\nexport function focusElement(search, key) {\n const element = getElement(search, key);\n if (element) {\n element.focus();\n }\n}\nexport function setTabindex(search, key, index) {\n const element = getElement(search, key);\n if (element) {\n element.tabIndex = index;\n }\n}\nexport function removeTabindex(search, key) {\n const element = getElement(search, key);\n if (element) {\n element.removeAttribute(Constants.HTMLAttribute.tabIndex);\n }\n}\nexport function addAttributes(search, key, attributes) {\n const element = getElement(search, key);\n if (element) {\n attributes.forEach((attribute)=>{\n element.setAttribute(attribute.key, attribute.value);\n });\n }\n}\nconst postMessageLogTemplate = (msg)=>`Embed: ${msg}`;\nexport function postMessageToHost(payload) {\n console.log(postMessageLogTemplate('emitting telemetry before post message'));\n flushTelemetryBuffer();\n console.log(postMessageLogTemplate(`Message posted with msgType ${payload.msgType}`));\n // Added a lag of 150ms here so that when we do a handoff, the telemetry call is not failed.\n // We use this 150ms buffer to construct the telemetry call and make it before we leave SPZA portal.\n getWindow().setTimeout(()=>{\n getWindow().parent.postMessage(payload, '*');\n }, 150);\n}\nexport function getQueryParam(req, param) {\n const value = req && req.query && req.query[`${param}`];\n return value;\n}\nexport function getListOfDynamics365Products(productsBitmask) {\n const productsList = [];\n DataMap.products.Dynamics365.ShortcutFilters.forEach((filter)=>{\n if (bitMasksMatch(productsBitmask, DataMap.products[`${filter}`].FilterGroup, DataMap.products[`${filter}`].FilterID)) {\n productsList.push(DataMap.products[`${filter}`].Title);\n }\n });\n return productsList;\n}\nexport function licenseDisplayTextSet(licenseType, license) {\n if (licenseType === Constants.Dynamics365LicenseType.dynamics365License) {\n if ((license.hasLicense ? 1 : 0) ^ (license.isDisputed ? 1 : 0)) {\n return Constants.dynamicsLicense.dynamics365License;\n } else {\n return Constants.dynamicsLicense.noLicense;\n }\n } else if (licenseType === Constants.Dynamics365LicenseType.dynamics365forBusinessLicense) {\n if ((license.hasLicense ? 1 : 0) ^ (license.isDisputed ? 1 : 0)) {\n return Constants.dynamicsLicense.dynamics365FinancialLicense;\n } else {\n return Constants.dynamicsLicense.noLicense;\n }\n } else {\n return '';\n }\n}\nexport function dynamicsLicenseTypeForEmbed(productBitmask) {\n const productList = getListOfDynamics365Products(productBitmask);\n if (productList && productList.length > 0) {\n for(let i = 0; i < productList.length; i++){\n if (productList[`${i}`] === DataMap.products.Dynamics365forSales.Title || productList[`${i}`] === DataMap.products.Dynamics365forFieldServices.Title || productList[`${i}`] === DataMap.products.Dynamics365forProjectServicesAutomation.Title || productList[`${i}`] === DataMap.products.Dynamics365forCustomerServices.Title) {\n return Constants.Dynamics365LicenseType.dynamics365License;\n }\n if (productList[`${i}`] === DataMap.products.Dynamics365forBusinessCentral.Title) {\n return Constants.Dynamics365LicenseType.dynamics365forBusinessLicense;\n }\n }\n }\n}\nexport function dynamicsLicenseType(userProfile, productsBitMask) {\n if (userProfile && userProfile.licenses && userProfile.licenses.length === Constants.dynamicsLicense.currentD365LicenseNumber) {\n return dynamicsLicenseTypeForEmbed(productsBitMask);\n } else {\n return Constants.Dynamics365LicenseType.noLicense;\n }\n}\nexport function setInitialLocalLicenseStore(licenses, licenseType) {\n if (licenseType === Constants.Dynamics365LicenseType.dynamics365License) {\n return licenses[Constants.Dynamics365LicenseIndex.dynamics365LicenseIndex];\n } else {\n return licenses[Constants.Dynamics365LicenseIndex.dynamics365ForBusinessLicenseIndex];\n }\n}\nexport function setInitialLicenseDisplayText(licenses, licenseType) {\n if (licenseType === Constants.Dynamics365LicenseType.dynamics365License) {\n return licenseDisplayTextSet(licenseType, licenses[Constants.Dynamics365LicenseIndex.dynamics365LicenseIndex]);\n } else {\n return licenseDisplayTextSet(licenseType, licenses[Constants.Dynamics365LicenseIndex.dynamics365ForBusinessLicenseIndex]);\n }\n}\nexport function shouldSendUserProfile(state, isService = false) {\n const isProfileExp = state && state.config && state.config.featureFlags && state.config.featureFlags.ProfileExp === 'true';\n const userState = state && state.users;\n const isUpdateRequiredByUserBeforeSend = userState && userState.profile && userState.profile.updateRequired === false;\n return (isProfileExp || isService) && isUpdateRequiredByUserBeforeSend;\n}\nexport function getLocaleFromState(state) {\n return !!state && !!state.config && !!state.config.locale ? state.config.locale : null;\n}\n/**\n * get currentView which contains curated data for Telemetry detail content\n *\n * helper for getTelemetryDetailContentCurrentView\n *\n * @param query broser url queries\n * @param filterQueryName browser url query name\n * @param isAppGallery is application gallery page\n *\n * @return\n * 1) detailed product curated, e.g. dynamics 365 curated, office 365 curated\n * 2) detailed industry e.g. education, distribution\n * 3) empty string, if filtered view is not a industry view which shows both curated and filtered\n */ export function getTelemetryDetailContentCurrentCuratedViewPrefix(query, filterQueryName, isAppGallery) {\n const filterQueryToFilterCollectionName = {\n product: Constants.filterMaps.products,\n industry: Constants.filterMaps.industries,\n category: Constants.filterMaps.categories,\n serviceType: Constants.filterMaps.serviceTypes\n };\n const isProcessingAppGalleryIndustryFilters = isAppGallery && filterQueryName === Constants.FilterQuery.industry;\n // industy view, shows both curated and filtered, so skip adding specific keyword 'curated'\n let curatedViewPrefix = isProcessingAppGalleryIndustryFilters ? '' : 'curated';\n if (!query) {\n return curatedViewPrefix;\n }\n // get first query value of query filterQueryName\n const filterQueryValues = typeof query[`${filterQueryName}`] === 'string' && query[`${filterQueryName}`].split(';').filter((queryValue)=>!!queryValue.trim()) || [];\n const filterQueryValue = filterQueryValues[0] || '';\n if (!filterQueryValue) {\n return curatedViewPrefix;\n }\n // for industry filterd view, it also shows curated data,\n // but only when one and only one active filter is a industry filter\n // check if it is not the case, return an empty string\n if (isProcessingAppGalleryIndustryFilters) {\n const areMultipleFilterCollectionsActive = Object.keys(query).filter((queryName)=>!!DataMap[filterQueryToFilterCollectionName[`${queryName}`]]).length >= 2;\n const areMultipleIndustryFiltersActive = filterQueryValues.length >= 2;\n const querySearch = query && query[Constants.filterTileTypes.search] || '';\n const isSearchMode = !!querySearch.trim();\n if (areMultipleFilterCollectionsActive || areMultipleIndustryFiltersActive || isSearchMode) {\n // it is not a industry view which shows curated or filtered, return empty string\n return curatedViewPrefix;\n }\n }\n const filterCollection = DataMap[filterQueryToFilterCollectionName[`${filterQueryName}`]];\n if (!filterCollection) {\n return curatedViewPrefix;\n }\n Object.keys(filterCollection).some((filterName)=>{\n const filter = filterCollection[`${filterName}`];\n const match = filter.UrlKey === filterQueryValue;\n // query matches with filter url key\n if (match) {\n const filterTitle = filter.Title && filter.Title.toLowerCase() || '';\n // note using 'join', which takes care of empty filterTitle, which avoids adding a space\n curatedViewPrefix = [\n filterTitle.trim(),\n curatedViewPrefix\n ].filter((word)=>word.trim()).join(' ');\n }\n return match;\n });\n return curatedViewPrefix;\n}\n/**\n * get currentView for Telemetry detail content\n *\n * additionally for gallery page, need to determine further whether it is\n * a) curated view\n * b) detailed product curated view (e.g. office 365 curated appGallery)\n * c) filtered view\n * d) industry view (e.g. education appGallery)\n * e) search filtered view\n *\n * @param currentView current rendered view name, one of routes property `name` in routerHistory.tsx\n * @param currentGalleryViewIsCurated only applies when current view is a gallery view, determine whether it is curated\n */ export function getTelemetryDetailContentCurrentView(currentView, currentGalleryViewIsCurated) {\n if (!currentView) {\n return undefined;\n }\n // get all gallery views from routes in routerHistory.tsx\n // e.g. appGallery, serviceGallery\n const galleryViews = [\n routes.marketplace.name,\n routes.marketplaceServices.name\n ];\n // if new current view is not a gallery view\n if (galleryViews.indexOf(currentView) < 0) {\n // simply return current view\n return currentView;\n }\n // get browser url query, needed to determine curated view, also to determine whether gallery page is showing search results\n // NOTE:\n // since this function is called in components may or may in coupled in routes\n // which means container may or may not get props.location.query, props.params\n // use function below to process queries\n const query = getQueryFromBrowserUrl();\n const isAppGallery = currentView === routes.marketplace.name;\n let galleryViewPrefix;\n // if gallery shows curated data, need to determine further whether it is\n // 1) product curated view, or\n // 2) curated view\n if (currentGalleryViewIsCurated) {\n galleryViewPrefix = getTelemetryDetailContentCurrentCuratedViewPrefix(query, Constants.FilterQuery.product, isAppGallery);\n } else {\n // if gallery shows filtered data, need to determine further whether it is\n // 1) filtered\n // 2) detailed industry view (shows both curated and filtered, if one and only one active filter is a industry filter)\n const querySearch = query && query[Constants.filterTileTypes.search] || '';\n galleryViewPrefix = // detailed industry view, or\n getTelemetryDetailContentCurrentCuratedViewPrefix(query, Constants.FilterQuery.industry, isAppGallery) || // simply filtered view\n (querySearch.trim() ? 'search filtered' : 'filtered');\n }\n const galleryView = [\n galleryViewPrefix,\n currentView\n ].filter((word)=>word.trim()).join(' ');\n return galleryView;\n}\nexport function getTileDataCuratedQueryParams(queryParams) {\n if (!queryParams) {\n return {};\n }\n const tileDataCuratedQueryParams = {};\n for(const urlKey in queryParams){\n if (Constants.TileDataCuratedQueryParams[`${urlKey}`]) {\n tileDataCuratedQueryParams[`${urlKey}`] = queryParams[`${urlKey}`];\n }\n }\n return tileDataCuratedQueryParams;\n}\nexport function getTileDataFilteredQueryParams(queryParams) {\n if (!queryParams) {\n return {};\n }\n const tileDataFilteredQueryParams = {};\n for(const urlKey in queryParams){\n if (Constants.TileDataFilteredQueryParams[`${urlKey}`]) {\n if (urlKey === Constants.TileDataFilteredQueryParams.search) {\n // Consider search when query length is properly\n if (queryParams[`${urlKey}`] && queryParams[`${urlKey}`].length > 1) {\n tileDataFilteredQueryParams[`${urlKey}`] = queryParams[`${urlKey}`];\n }\n } else {\n tileDataFilteredQueryParams[`${urlKey}`] = queryParams[`${urlKey}`];\n }\n }\n }\n return tileDataFilteredQueryParams;\n}\nexport function getTileDataAdditionalQueryParams(queryParams) {\n if (!queryParams) {\n return {};\n }\n const tileDataAdditionalQueryParams = {};\n for(const urlKey in queryParams){\n if (Constants.TileDataAdditionalQueryParams[`${urlKey}`]) {\n tileDataAdditionalQueryParams[`${urlKey}`] = queryParams[`${urlKey}`];\n }\n }\n // Initialize page\n tileDataAdditionalQueryParams[Constants.TileDataAdditionalQueryParams.page] = tileDataAdditionalQueryParams[Constants.TileDataAdditionalQueryParams.page] || '1';\n // Initialize country\n tileDataAdditionalQueryParams[Constants.TileDataAdditionalQueryParams.country] = (tileDataAdditionalQueryParams[Constants.TileDataAdditionalQueryParams.country] || Constants.usCountryCode).toUpperCase();\n // Initialize region\n tileDataAdditionalQueryParams[Constants.TileDataAdditionalQueryParams.region] = (tileDataAdditionalQueryParams[Constants.TileDataAdditionalQueryParams.region] || Constants.allStatesCode).toUpperCase();\n return tileDataAdditionalQueryParams;\n}\nexport function getTileDataQueryParams(queryParams) {\n if (!queryParams) {\n return {};\n }\n const optimizedTileDataQueryParams = optimizeQueryParameters({\n queryParams\n });\n const tileDataQueryParams = _object_spread({}, getTileDataCuratedQueryParams(optimizedTileDataQueryParams), getTileDataFilteredQueryParams(optimizedTileDataQueryParams), getTileDataAdditionalQueryParams(optimizedTileDataQueryParams));\n return tileDataQueryParams;\n}\nexport function getAppsTileDataQueryParams(queryParams) {\n const tileDataQueryParams = getTileDataQueryParams(queryParams);\n delete tileDataQueryParams[Constants.TileDataAdditionalQueryParams.country];\n delete tileDataQueryParams[Constants.TileDataAdditionalQueryParams.region];\n return tileDataQueryParams;\n}\nexport function validateTileDataAdditionalQueryParams(queryParams) {\n const country = queryParams[Constants.TileDataAdditionalQueryParams.country];\n const region = queryParams[Constants.TileDataAdditionalQueryParams.region];\n if (country && !isString(country) || region && !isString(region)) {\n throw new Error('Country or Region query params that are not strings are not supported');\n }\n}\nconst multipleAllowList = {\n [Constants.TileDataCuratedQueryParams.product]: true\n};\nexport function isQueryParamsPersist(queryParams) {\n var _tileDataQueryParams_Constants_TileDataAdditionalQueryParams_country, _tileDataQueryParams_Constants_TileDataAdditionalQueryParams_region;\n const tileDataQueryParams = getTileDataAdditionalQueryParams(queryParams);\n const tileDataCuratedQueryParams = getTileDataCuratedQueryParams(queryParams);\n const tileDataFilteredQueryParams = getTileDataFilteredQueryParams(queryParams);\n let isMultiple = false;\n if (Object.keys(tileDataCuratedQueryParams).length === 1) {\n const key = Object.keys(tileDataCuratedQueryParams)[0];\n if (!(key in multipleAllowList)) {\n const value = tileDataCuratedQueryParams[`${key}`];\n isMultiple = !!((value === null || value === void 0 ? void 0 : value.indexOf(';')) > -1);\n }\n }\n let isValidated = true;\n if (Object.keys(tileDataCuratedQueryParams).length === 1) {\n const curatedUrlKey = Object.keys(tileDataCuratedQueryParams)[0];\n const curatedUrlValue = typeof tileDataCuratedQueryParams[`${curatedUrlKey}`] === 'string' ? tileDataCuratedQueryParams[`${curatedUrlKey}`].split(';') : [];\n isValidated = curatedUrlValue.every((value)=>!!getDataValuesFromUrlKey(curatedUrlKey, value));\n }\n return tileDataQueryParams[Constants.TileDataAdditionalQueryParams.page] === '1' && ((_tileDataQueryParams_Constants_TileDataAdditionalQueryParams_country = tileDataQueryParams[Constants.TileDataAdditionalQueryParams.country]) === null || _tileDataQueryParams_Constants_TileDataAdditionalQueryParams_country === void 0 ? void 0 : _tileDataQueryParams_Constants_TileDataAdditionalQueryParams_country.toLowerCase()) === Constants.usCountryCode && ((_tileDataQueryParams_Constants_TileDataAdditionalQueryParams_region = tileDataQueryParams[Constants.TileDataAdditionalQueryParams.region]) === null || _tileDataQueryParams_Constants_TileDataAdditionalQueryParams_region === void 0 ? void 0 : _tileDataQueryParams_Constants_TileDataAdditionalQueryParams_region.toLowerCase()) === Constants.allStatesCode && Object.keys(tileDataFilteredQueryParams).length === 0 && Object.keys(tileDataCuratedQueryParams).length <= 1 && !isMultiple && isValidated;\n}\nexport function filterOutArrayFromIds(items, idField) {\n const map = {};\n return items.filter((item)=>{\n const id = item[`${idField}`] && item[`${idField}`].toString();\n return !map[`${id}`];\n });\n}\nexport function filterInArrayFromIds(items, idField, sections, sectionIdField) {\n const map = {};\n for (const item of items){\n const id = item[`${idField}`] && item[`${idField}`].toString();\n if (id) {\n map[`${id}`] = item;\n }\n }\n const filteredItems = [];\n for (const section of sections){\n const sectionId = section[`${sectionIdField}`] && section[`${sectionIdField}`].toString();\n if (map[`${sectionId}`]) {\n filteredItems.push(map[`${sectionId}`]);\n }\n }\n return filteredItems;\n}\n// Convert time stamp of the form \"_h_m_s\" for example \"1h30m10s\"\nexport function convertTimeToSeconds(timeStamp) {\n let totalTimeInSeconds = 0;\n if (timeStamp) {\n // eslint-disable-next-line security/detect-unsafe-regex\n const hours = timeStamp.match(/(\\d+)+h/);\n // eslint-disable-next-line security/detect-unsafe-regex\n const minutes = timeStamp.match(/(\\d+)+m/);\n // eslint-disable-next-line security/detect-unsafe-regex\n const seconds = timeStamp.match(/(\\d+)+s/);\n if (hours && hours[1]) {\n totalTimeInSeconds += parseInt(hours[1]) * 60 * 60;\n }\n if (minutes && minutes[1]) {\n totalTimeInSeconds += parseInt(minutes[1]) * 60;\n }\n if (seconds && seconds[1]) {\n totalTimeInSeconds += parseInt(seconds[1]);\n }\n }\n return isNaN(totalTimeInSeconds) ? 0 : totalTimeInSeconds;\n}\nexport function shouldEnsureAppDetails(entityId, state) {\n const appIndex = state.apps.idMap[`${entityId}`];\n if (isNaN(appIndex)) {\n return true;\n }\n const app = state.apps.dataList[`${appIndex}`];\n if (!app) {\n return true;\n }\n if (!app.detailInformation) {\n return true;\n }\n return false;\n}\nexport function shouldEnsureServiceDetails(entityId, state) {\n const appIndex = state.services.idMap[`${entityId}`];\n if (isNaN(appIndex)) {\n return true;\n }\n const service = state.services.dataList[`${appIndex}`];\n if (!service) {\n return true;\n }\n if (!service.detailInformation) {\n return true;\n }\n return false;\n}\nexport function shouldEnsureAppPricings(entityId, state) {\n var _app_pricingInformation_billingRegion, _app_pricingInformation, _state_config_billingCountryCode;\n if (__SERVER__) {\n return false;\n }\n const appIndex = state.apps.idMap[`${entityId}`];\n if (isNaN(appIndex)) {\n return true;\n }\n const app = state.apps.dataList[`${appIndex}`];\n if (!app) {\n return true;\n }\n if ((app === null || app === void 0 ? void 0 : (_app_pricingInformation = app.pricingInformation) === null || _app_pricingInformation === void 0 ? void 0 : (_app_pricingInformation_billingRegion = _app_pricingInformation.billingRegion) === null || _app_pricingInformation_billingRegion === void 0 ? void 0 : _app_pricingInformation_billingRegion.toLowerCase()) === ((_state_config_billingCountryCode = state.config.billingCountryCode) === null || _state_config_billingCountryCode === void 0 ? void 0 : _state_config_billingCountryCode.toLowerCase())) {\n return false;\n }\n return true;\n}\nexport function shouldEnsureAppReviews(entityId, state) {\n if (state.apps.appReviewsData && state.apps.appReviewsData.entityId === entityId) {\n return false;\n }\n return true;\n}\nexport function shouldEnsureAppRelatedApps(entityId, state) {\n if (entityId === state.apps.relatedAppsItems.entityId) {\n return false;\n }\n if (state.config.embedHost === DataMap.products.PowerBICustomVisual.UrlKey) {\n return false;\n }\n return true;\n}\nexport function shouldEnsureServiceRelatedApps(entityId, state) {\n if (entityId === state.services.relatedAppsItems.entityId) {\n return false;\n }\n return true;\n}\nexport function isAvailableInThisRegion({ startingPrice }) {\n return !!(startingPrice && startingPrice.pricingData !== PricingStates.NotAvailableInThisRegion);\n}\nexport function isExtensionFile(file) {\n const browsersExtensions = [\n 'chrome-extension',\n 'moz-extension'\n ];\n return browsersExtensions.some((browsersExtension)=>file.indexOf(browsersExtension) > -1);\n}\nexport function windowOnErrorHandler({ msg, file, line, error }) {\n try {\n const isWarning = isExtensionFile(file);\n logClientError(error, `client side error: [From mainClientHookup] ${msg} in file ${file} on line: ${line}`, file, isWarning);\n } catch (e) {\n console.error('something went wrong during logging' + e);\n }\n}\nconst allowedListUrlValuesCache = {\n [Constants.QueryStrings.country]: Constants.usCountryCode,\n [Constants.QueryStrings.region]: Constants.allStatesCode\n};\nfunction isAllowedListUrlValuesCache({ query = {} }) {\n return Object.entries(query).every(([key, value])=>{\n const validator = allowedListUrlValuesCache[key === null || key === void 0 ? void 0 : key.toLowerCase()];\n if (validator) {\n return (value === null || value === void 0 ? void 0 : value.toLowerCase()) === validator;\n }\n return true;\n });\n}\nexport function generateUrlCacheKey({ isEmbedded, landingView, locale, query, isMobile = false }) {\n const urlCacheKeys = [];\n const isMainRoute = [\n Constants.Views.home,\n Constants.Views.appGallery,\n Constants.Views.serviceGallery\n ].indexOf(landingView) > -1;\n if (isMainRoute) {\n const urlParamCacheKeyBlackList = isEmbedded ? Constants.EmbedUrlParamCacheKeyBlackList : Constants.UrlParamCacheKeyBlackList;\n const isBlackListUrlCache = Object.keys(query).some((urlKey)=>urlParamCacheKeyBlackList[urlKey === null || urlKey === void 0 ? void 0 : urlKey.toLowerCase()]);\n if (!isBlackListUrlCache && isAllowedListUrlValuesCache({\n query\n })) {\n const cacheParameters = _object_spread({}, query);\n cacheParameters[Constants.QueryStrings.page] = cacheParameters[Constants.QueryStrings.page] || '1';\n if (cacheParameters[Constants.QueryStrings.page] === '1') {\n urlCacheKeys.push(landingView);\n urlCacheKeys.push(`locale:${locale === null || locale === void 0 ? void 0 : locale.toLowerCase()}`);\n urlCacheKeys.push(`isEmbedded:${isEmbedded}`);\n urlCacheKeys.push(`isMobile:${isMobile}`);\n urlCacheKeys.push(`cacheParameters:[${Object.keys(cacheParameters).filter(Boolean).filter((key)=>Constants.UrlParamCacheKeyWhiteList[key.toLowerCase()]).sort().map((key)=>`${key.toLowerCase()}:${cacheParameters[`${key}`]}`).join(',')}]`);\n }\n }\n }\n return urlCacheKeys.join('|');\n}\nexport function getXMSClientName(appName) {\n return Constants.browserConfigsToClientNames[`${appName}`] || Constants.ClientNames.Default;\n}\nexport function getPDPRoute(appType) {\n return isPrivateOffer(appType) ? routes.privateOfferDetails : routes.appDetails;\n}\nexport function getGalleryRoute(appType) {\n const isPrivate = isPrivateOffer(appType);\n return {\n locKey: isPrivate ? 'UserPrivateOffers_Detail_AppTitle' : 'Embedded_Apps',\n href: isPrivate ? routes.privateOffers : routes.marketplace\n };\n}\nexport function productsUrlValuesToSearchFilter(applicationTarget, products) {\n const searchFilter = {\n category: ISearchFilterCategory.Products,\n values: []\n };\n if (applicationTarget === Constants.appSourceApplicationTargetName && products) {\n for (const productUrlKey of products){\n const dataValues = getDataValuesFromUrlKey(Constants.TileDataCuratedQueryParams.product, productUrlKey);\n if (typeof (dataValues === null || dataValues === void 0 ? void 0 : dataValues.ShortcutUrlKey) === 'string') {\n const shortcutUrlKeys = dataValues.ShortcutUrlKey.split(';').filter((shortcutUrlKey)=>shortcutUrlKey !== (dataValues === null || dataValues === void 0 ? void 0 : dataValues.UrlKey));\n for (const shortcutUrlKey of shortcutUrlKeys){\n const shortcutDataValues = getDataValuesFromUrlKey(Constants.TileDataCuratedQueryParams.product, shortcutUrlKey);\n if (shortcutDataValues === null || shortcutDataValues === void 0 ? void 0 : shortcutDataValues.Title) {\n searchFilter.values.push(shortcutDataValues.Title);\n }\n }\n }\n if (dataValues === null || dataValues === void 0 ? void 0 : dataValues.Title) {\n searchFilter.values.push(dataValues.Title);\n }\n }\n }\n return searchFilter;\n}\nexport function getTileDataEntityType(currentView) {\n const mapping = {\n [routes.marketplaceServices.name]: Constants.TileDataEntityType.Service,\n [routes.marketplaceCloudsIndustry.name]: Constants.TileDataEntityType.CloudsIndustry\n };\n return mapping[`${currentView}`] || Constants.TileDataEntityType.App;\n}\nexport function getMaxPageSize(req) {\n return req.headers.searchactiontype === Constants.Search.ActionType.Suggestions ? Constants.Search.maxNumOfSuggestions : Constants.FilteredGallery.pageSize;\n}\nexport function isService(offer) {\n return offer.entityType === Constants.EntityType.Service;\n}\nexport function isApp(offer) {\n return offer.entityType === Constants.EntityType.App;\n}\nexport function stripHTML(html) {\n return html.replace(Constants.removeHtmlRegex, '').trim();\n}\nexport function isEncoded({ txt = '' } = {}) {\n return txt !== decodeURIComponent(txt);\n}\nexport function isSignedInChanged(currentSignedIn, prevSignedIn) {\n return currentSignedIn && !prevSignedIn;\n}\nexport function getActiveFeaturedFlags(featureFlags) {\n return Object.keys(featureFlags || {}).filter((flag)=>featureFlags[`${flag}`] === 'true' && flag !== 'ProfileExp').reduce((acc, flag)=>_object_spread_props(_object_spread({}, acc), {\n [flag]: featureFlags[`${flag}`]\n }), {});\n}\nexport const shouldRenderPricing = ({ app, isEmbedded, billingRegion })=>{\n const { ctaTypes, licenseManagement, planPricingType } = app;\n const transactApp = isTransactApp({\n isEmbedded,\n ctaTypes,\n appData: app,\n billingRegion\n });\n const isMicrosoftManaged = !!(licenseManagement === null || licenseManagement === void 0 ? void 0 : licenseManagement.isMicrosoftManaged);\n return planPricingType !== PlanPricingType.None && (transactApp || isMicrosoftManaged);\n};\nexport function canRenderPricing({ app, isEmbedded, billingRegion }) {\n return isEmbedded && isPowerBIVisualsApp(app) ? isBagTransactable(app) : shouldRenderPricing({\n app,\n isEmbedded,\n billingRegion\n });\n}\nexport function shouldRenderPlanAndPricing(planPricingType) {\n return planPricingType !== PlanPricingType.None;\n}\nexport function parseCatalogRecommendedSizes({ parameters: { osPlatform, recommendedSizes } } = {\n parameters: {\n osPlatform: '',\n recommendedSizes: []\n }\n}) {\n return recommendedSizes.map((recommendedSize)=>{\n const parts = (recommendedSize || '').split('_');\n if (parts.length < 2) {\n return null;\n }\n const [tier, instance, version = '', version2 = ''] = parts;\n return [\n `${osPlatform}-${instance}${version}-${tier}`.toLowerCase(),\n `${osPlatform}-${instance}${version}${version2}-${tier}`.toLowerCase()\n ];\n }).reduce((accumulator, value)=>accumulator.concat(value), []).filter(Boolean);\n}\nexport function sortingSKUs({ a, b }) {\n var _a_title, _b_title;\n return a.displayRank - b.displayRank || ((_b_title = b.title) === null || _b_title === void 0 ? void 0 : _b_title.toUpperCase().localeCompare((_a_title = a.title) === null || _a_title === void 0 ? void 0 : _a_title.toUpperCase()));\n}\nexport function isProfessionalService({ service }) {\n return (service === null || service === void 0 ? void 0 : service.entityType) === Constants.EntityType.Service && (service === null || service === void 0 ? void 0 : service.isHiddenPrivateOffer);\n}\nexport function openInNewWindow(url) {\n const newWindow = window.open(url, '_blank');\n if (!newWindow || newWindow.closed || typeof newWindow.closed === 'undefined') {\n var _getWindow_location, _getWindow;\n const payload = {\n page: (_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow_location = _getWindow.location) === null || _getWindow_location === void 0 ? void 0 : _getWindow_location.href,\n action: Constants.Telemetry.Action.openInNewWindow,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: `Failed to open the URL: ${url} in new window`\n };\n logger.error('Failed to open in new window', {\n action: payload.action,\n actionModifier: payload.actionModifier,\n page: payload.page,\n error: payload.details\n });\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n }\n}\nexport const getServiceTypeFromBackEndKey = (serviceTypeBackendKey)=>{\n return Object.values(DataMap.serviceTypes).find((serviceType)=>serviceType.BackendKey === serviceTypeBackendKey);\n};\n","/* eslint-disable @typescript-eslint/no-namespace */ /* eslint-disable @typescript-eslint/no-use-before-define */ /* eslint-disable @typescript-eslint/prefer-namespace-keyword */ /* eslint-disable @typescript-eslint/no-inferrable-types */ function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { Constants } from './constants';\nimport { getCookieOptionExpires } from './cookieUtils';\nimport { getWindow, getDocument } from './../services/window';\nimport { isNullorUndefined } from './objectUtils';\nimport { isEmptyNullorUndefinedString } from './stringUtils';\nimport { SpzaInstrumentService } from '../services/telemetry/spza/spzaInstrument';\nimport { stringifyError } from './errorUtils';\nimport { logger } from '@src/logger';\n// NOTE:\n// DO NOT access directly to, or from browser, for following items\n// 1) cookie data, or\n// 2) local storage data\n//\n// instead, please use methods in this util to access\n// e.g.\n// get cookie data\n// 1) BrowserStorage.getBrowserStorage().getCookieItem(...)\n// 2) getCookieItem(...)\n// set cookie data\n// 1) BrowserStorage.getBrowserStorage().setCookieItem(...)\n// 2) saveCookieItem(...)\n// get local storage data\n// 1) BrowserStorage.getBrowserStorage().getLocalStorageItem(...)\n// 2) getLocalStorageItem(...)\n// set local storage data\n// 1) BrowserStorage.getBrowserStorage().setLocalStorageItem(...)\n// 2) saveLocalStorageItem(...)\n//\n// shortcut methods below are for ease of access\nexport function hasUserAgreedPrivacyConsent() {\n return BrowserStorage.getBrowserStorage().hasUserAgreedPrivacyConsent();\n}\nexport function saveDataToBrowserAfterUserAgreedPrivacyConsent() {\n BrowserStorage.getBrowserStorage().saveDataToBrowserAfterUserAgreedPrivacyConsent();\n}\nexport function saveCookieItem(itemName, itemValue, optionText = getCookieOptionExpires()) {\n BrowserStorage.getBrowserStorage().setCookieItem(itemName, itemValue, optionText);\n}\nexport function getCookieItem(itemName, shouldDecode = true) {\n return BrowserStorage.getBrowserStorage().getCookieItem(itemName, shouldDecode);\n}\nexport function saveLocalStorageItem(itemName, itemValue) {\n BrowserStorage.getBrowserStorage().setLocalStorageItem(itemName, itemValue);\n}\nexport function getLocalStorageItem(itemName) {\n return BrowserStorage.getBrowserStorage().getLocalStorageItem(itemName);\n}\nexport function saveSessionStorageItem(itemName, itemValue) {\n BrowserStorage.getBrowserStorage().setSessionStorageItem(itemName, itemValue);\n}\nexport function getSessionStorageItem(itemName) {\n return BrowserStorage.getBrowserStorage().getSessionStorageItem(itemName);\n}\n(function(BrowserStorage) {\n // singleton\n // eslint-disable-next-line no-undef-init\n let browserStorage = undefined;\n function getBrowserStorage() {\n if (!browserStorage) {\n browserStorage = new BrowserStorage1();\n }\n return browserStorage;\n }\n BrowserStorage.getBrowserStorage = getBrowserStorage;\n // DO NOT export class\n class BrowserStorage1 {\n getDefaultBrowserStorageData() {\n const browserStorageData = {\n localStorage: {},\n cookies: {}\n };\n return browserStorageData;\n }\n // since we have a flushStore method, store may be undefined when called after privacy consent expired, or\n getStore() {\n if (!this.store) {\n this.store = this.getDefaultBrowserStorageData();\n }\n return this.store;\n }\n /**\n * get cookie item value\n *\n * get cookie item value\n * 1) directly from browser, if user accepted privacy consent, and privacy consent has not expired, or\n * 2) from store buffer, if user hasn't accepted privacy consent, or privacy consent has expired\n *\n * @param itemName cookie item name\n * @param shouldDecode cookie should be decoded\n *\n * @returns value of cookie item, as primitive or an object\n */ getCookieItem(itemName, shouldDecode = true) {\n if (this.hasUserAgreedPrivacyConsent() || Constants.Cookies.Essential[`${itemName}`]) {\n return cookieUtils.getCookieItemFromBrowser(itemName, shouldDecode);\n }\n return this.getStore().cookies[`${itemName}`];\n }\n /**\n * set cookie item value\n *\n * set cookie item value\n * 1) directly to browser, if user accepted privacy consent, and privacy consent has not expired, or\n * 2) to store buffer, if user hasn't accepted privacy consent, or privacy consent has expired\n *\n * @param itemName cookie item name\n * @param itemName cookie item value\n * @param optionText cookie options as a string\n */ setCookieItem(itemName, itemValue, optionText = getCookieOptionExpires()) {\n if (this.hasUserAgreedPrivacyConsent() || Constants.Cookies.Essential[`${itemName}`]) {\n cookieUtils.setCookieItemToBrowser(itemName, itemValue, optionText);\n return;\n }\n const cookieData = this.getStore().cookies;\n cookieData[`${itemName}`] = itemValue;\n }\n /**\n * get local storage item value\n *\n * get local storage item value\n * 1) directly from browser, if user accepted privacy consent, and privacy consent has not expired, or\n * 2) from store buffer, if user hasn't accepted privacy consent, or privacy consent has expired\n *\n * @param itemName local storage item name\n *\n * @returns value of local storage item, as primitive or an object\n */ getLocalStorageItem(itemName) {\n const userAgreedPrivacyConsent = this.hasUserAgreedPrivacyConsent();\n logger.info(JSON.stringify({\n userAgreedPrivacyConsent,\n itemName\n }), {\n action: Constants.Telemetry.Action.LocalStorage,\n actionModifier: Constants.Telemetry.ActionModifier.GetItem\n });\n if (userAgreedPrivacyConsent || Constants.LocalStorage.Essentials.includes(itemName)) {\n return localStorageUtils.getLocalStorageItemFromBrowser(itemName);\n }\n return this.getStore().localStorage[`${itemName}`];\n }\n getSessionStorageItem(itemName) {\n if (this.hasUserAgreedPrivacyConsent()) {\n return localStorageUtils.getSessionStorageItemFromBrowser(itemName);\n }\n return this.getStore().localStorage[`${itemName}`];\n }\n /**\n * set local storage item value\n *\n * set local storage item value\n * 1) directly to browser, if user accepted privacy consent, and privacy consent has not expired, or\n * 2) to store buffer, if user hasn't accepted privacy consent, or privacy consent has expired\n *\n * @param itemName local storage item name\n * @param itemValue local storage item value\n */ setLocalStorageItem(itemName, itemValue) {\n const userAgreedPrivacyConsent = this.hasUserAgreedPrivacyConsent();\n logger.info(JSON.stringify({\n userAgreedPrivacyConsent,\n itemName\n }), {\n action: Constants.Telemetry.Action.LocalStorage,\n actionModifier: Constants.Telemetry.ActionModifier.SaveItem\n });\n if (userAgreedPrivacyConsent || Constants.LocalStorage.Essentials.includes(itemName)) {\n localStorageUtils.setLocalStorageItemToBrowser(itemName, itemValue);\n return;\n }\n const localStorageData = this.getStore().localStorage;\n localStorageData[`${itemName}`] = itemValue;\n }\n setSessionStorageItem(itemName, itemValue) {\n if (this.hasUserAgreedPrivacyConsent()) {\n localStorageUtils.setSessionStorageItemToBrowser(itemName, itemValue);\n return;\n }\n const sessionStorageData = this.getStore().localStorage;\n sessionStorageData[`${itemName}`] = itemValue;\n }\n /**\n * save browser storage buffer data to browser, then flush buffer\n */ saveDataToBrowserAfterUserAgreedPrivacyConsent() {\n if (!this.hasUserAgreedPrivacyConsent()) {\n // indicate user has agreed our privacy consent\n this.setUserHasAgreedPrivacyConsent();\n }\n // dump and flush\n this.dumpAndFlushStore();\n }\n /**\n * save browser storage buffer data to browser, then flush buffer\n */ dumpAndFlushStore() {\n // dump\n this.copyStoreToBrowser();\n // flush\n this.flushStore();\n }\n /**\n * copy browser storage buffer data to brower storage, i.e. cookie, and local storage\n */ copyStoreToBrowser() {\n // dump cookie\n this.copyStoreCookiesToBrowser();\n // dump local storage\n this.copyStoreLocalStorageToBrowser();\n }\n /**\n * copy browser storage cookie buffer data to brower storage cookie\n */ copyStoreCookiesToBrowser() {\n try {\n const cookieData = this.getStore().cookies;\n Object.keys(cookieData).forEach((cookieName)=>{\n const cookieValue = cookieData[`${cookieName}`];\n if (isEmptyNullorUndefinedString(cookieValue)) {\n return;\n }\n this.setCookieItem(cookieName, cookieValue);\n });\n } catch (error) {\n const errorText = isNullorUndefined(error) ? undefined : stringifyError(error);\n const errorMessage = `Failed: Dump browser storage cookie buffer data to browser storage cookie, Error: ${errorText}`;\n BrowserStorage.TelemetryUtils.logTelemetryForAccessError(Constants.Telemetry.Action.Copy, Constants.Telemetry.ActionModifier.BrowserStorageCookieDataBuffer, errorMessage);\n }\n }\n /**\n * copy browser storage local storage buffer data to brower storage local storage\n */ copyStoreLocalStorageToBrowser() {\n try {\n const localStorageData = this.getStore().localStorage;\n Object.keys(localStorageData).forEach((localStorageItemName)=>{\n const localStorageItemValue = localStorageData[`${localStorageItemName}`];\n if (isEmptyNullorUndefinedString(localStorageItemValue)) {\n return;\n }\n this.setLocalStorageItem(localStorageItemName, localStorageItemValue);\n });\n } catch (error) {\n const errorText = isNullorUndefined(error) ? undefined : stringifyError(error);\n const errorMessage = `Failed: Dump browser storage local storage buffer data to brower storage local storage, Error: ${errorText}`;\n BrowserStorage.TelemetryUtils.logTelemetryForAccessError(Constants.Telemetry.Action.Copy, Constants.Telemetry.ActionModifier.BrowserStorageLocalStorageDataBuffer, errorMessage);\n }\n }\n // flush browser storage buffer data\n flushStore() {\n this.store = this.getDefaultBrowserStorageData();\n }\n hasUserAgreedPrivacyConsent() {\n return cookieUtils.isValidForUserAgreedPrivacyConsent();\n }\n setUserHasAgreedPrivacyConsent() {\n cookieUtils.setUserHasAgreedPrivacyConsent();\n }\n constructor(store){\n // browser storage buffer consists of local storage data and cookie data\n _define_property(this, \"store\", void 0);\n this.store = store;\n if (!this.store) {\n this.store = this.getDefaultBrowserStorageData();\n }\n }\n }\n // NOTE: This module should only be used in class BrowserStorage\n // DO NOT export module\n (function(cookieUtils) {\n function getCookieItemFromBrowser(itemName, shouldDecode = true) {\n try {\n const cookiePrefix = `${itemName}=`;\n const cookieArray = getDocument().cookie.split(';').map((cookie)=>cookie.trim());\n // eslint-disable-next-line no-undef-init\n let cookieValue = undefined;\n // find the cookie\n // break the loop immediately once found\n cookieArray.some((cookie)=>{\n if (cookie.indexOf(cookiePrefix) === 0) {\n const rawValue = cookie.substring(cookiePrefix.length);\n cookieValue = shouldDecode ? JSON.parse(decodeURIComponent(rawValue)) : rawValue;\n return true;\n }\n return false;\n });\n return cookieValue;\n } catch (error) {\n const errorText = isNullorUndefined(error) ? undefined : stringifyError(error);\n const errorMessage = `Failed: read access of cookie item ${itemName} shouldDecode ${shouldDecode}, Error: ${errorText}`;\n BrowserStorage.TelemetryUtils.logTelemetryForAccessError(Constants.Telemetry.Action.ReadAccess, Constants.Telemetry.ActionModifier.CookieItem, errorMessage);\n return undefined;\n }\n }\n /**\n * read cookie directly from browser\n *\n * NOTE: this method should not be directly called elsewhere but only in class BrowserStorage\n *\n * @param itemName cookie item name\n * @param shouldDecode cookie should be decoded\n *\n * @returns value of cookie item, as primitive or an object\n */ cookieUtils.getCookieItemFromBrowser = getCookieItemFromBrowser;\n function setCookieItemToBrowser(itemName, itemValue, optionText = getCookieOptionExpires()) {\n try {\n getDocument().cookie = `${itemName}=${itemValue};path=/;${optionText}`;\n } catch (error) {\n const errorText = isNullorUndefined(error) ? undefined : stringifyError(error);\n const errorMessage = `Failed: write access of cookie item ${itemName} value ${itemValue}, Error: ${errorText}`;\n BrowserStorage.TelemetryUtils.logTelemetryForAccessError(Constants.Telemetry.Action.WriteAccess, Constants.Telemetry.ActionModifier.CookieItem, errorMessage);\n return errorMessage;\n }\n }\n /**\n * save cookie directly to browser\n *\n * NOTE: this method should not be directly called elsewhere but only in class BrowserStorage\n *\n * @param itemName cookie item name\n * @param itemValue cookie item value\n * @param optionText cookie options as a string\n */ cookieUtils.setCookieItemToBrowser = setCookieItemToBrowser;\n function isValidForUserAgreedPrivacyConsent() {\n const cookie = getCookieItemFromBrowser(Constants.Cookies.privacyConsentAcceptedDate, false);\n return !isCookieExpired(cookie);\n }\n /**\n * check whether user has agreed privacy consent, which should also be valid\n *\n * NOTE: this method is an exception which directly access the browser storage\n *\n * @returns true if all following apllies:\n * 1) user has agreed to privacy consent\n * 2) agreed privacy consent has not expired\n */ cookieUtils.isValidForUserAgreedPrivacyConsent = isValidForUserAgreedPrivacyConsent;\n /**\n * Check if user accepted privacy consent is expired.\n *\n * NOTE: currently is only capable of checking if cookie value consists only of a time string\n * TO DO: update to check other cookie expiry, whose cookie value has a substring of `;path=\\;${expiry}`\n *\n * @param cookieValue: cookie item value\n * @param expiry: valid duration, default is 13 months after saved in browser\n *\n * @returns\n * true, if cookie is empty, or has no expiration date, or expired\n * false, otherwise\n */ function isCookieExpired(cookieValue, expiry = Constants.CookieExpiry.Default) {\n if (!cookieValue) {\n return true;\n }\n const date = new Date();\n const currentTime = date.getTime();\n const cookieInitialTime = parseInt(cookieValue, 10);\n const cookieEndTime = cookieInitialTime + expiry;\n return currentTime > cookieEndTime;\n }\n function setUserHasAgreedPrivacyConsent() {\n setCookieItemToBrowserForUserAgreedPrivacyConsentDate();\n }\n /**\n * set a flag indicating user has agreed to privacy consent, banner at the top\n *\n * this is achieved by simply setting a privacy consent accepted date as a cookie in browser\n * NOTE: this method is an exception which directly access the browser storage\n */ cookieUtils.setUserHasAgreedPrivacyConsent = setUserHasAgreedPrivacyConsent;\n /**\n * save expiration date of privacy consent cookie (banner at the top)\n *\n * cookie banner won't show to user for next 13 months.\n * NOTE: this method is an exception which directly access the browser storage\n */ function setCookieItemToBrowserForUserAgreedPrivacyConsentDate() {\n // skip if user-agreed privacy consent is valid\n if (isValidForUserAgreedPrivacyConsent()) {\n return;\n }\n // update cookie accepted date to current\n const cookieAcceptedDate = Date.now().toString();\n // a cookie serves as\n // a) a value when checking expiry, also serves as\n // b) a flag indicating user has agreed privacy consent\n setCookieItemToBrowser(Constants.Cookies.privacyConsentAcceptedDate, cookieAcceptedDate);\n }\n })(cookieUtils || (cookieUtils = {}));\n // NOTE: This module should only be used in class BrowserStorage\n // DO NOT export module\n (function(localStorageUtils) {\n function getLocalStorageItemFromBrowser(itemName) {\n try {\n const localStorage = getWindow().localStorage;\n return localStorage.getItem(itemName);\n } catch (error) {\n const errorText = isNullorUndefined(error) ? undefined : stringifyError(error);\n const errorMessage = `Failed: read access of local storage item ${itemName}, Error: ${errorText}`;\n BrowserStorage.TelemetryUtils.logTelemetryForAccessError(Constants.Telemetry.Action.ReadAccess, Constants.Telemetry.ActionModifier.LocalStorageItem, errorMessage);\n return errorMessage;\n }\n }\n /**\n * read local storage item directly from browser\n *\n * NOTE: this method should not be directly called elsewhere but only in class BrowserStorage\n *\n * @param itemName local storage item name\n *\n * @returns local storage item value, as primitive or an object\n */ localStorageUtils.getLocalStorageItemFromBrowser = getLocalStorageItemFromBrowser;\n function getSessionStorageItemFromBrowser(itemName) {\n try {\n const sessionStorage = getWindow().sessionStorage;\n return sessionStorage.getItem(itemName);\n } catch (error) {\n const errorText = isNullorUndefined(error) ? undefined : stringifyError(error);\n const errorMessage = `Failed: read access of session storage item ${itemName}, Error: ${errorText}`;\n BrowserStorage.TelemetryUtils.logTelemetryForAccessError(Constants.Telemetry.Action.ReadAccess, Constants.Telemetry.ActionModifier.SessionStorageItem, errorMessage);\n throw errorMessage;\n }\n }\n localStorageUtils.getSessionStorageItemFromBrowser = getSessionStorageItemFromBrowser;\n function setLocalStorageItemToBrowser(itemName, itemValue) {\n try {\n const localStorage = getWindow().localStorage;\n localStorage.setItem(itemName, itemValue);\n } catch (error) {\n const errorText = isNullorUndefined(error) ? undefined : stringifyError(error);\n const errorMessage = `Failed: write access of local storage item ${itemName} value ${itemValue}, Error: ${errorText}`;\n BrowserStorage.TelemetryUtils.logTelemetryForAccessError(Constants.Telemetry.Action.WriteAccess, Constants.Telemetry.ActionModifier.LocalStorageItem, errorMessage);\n return errorMessage;\n }\n }\n /**\n * save local storage directly to browser\n *\n * NOTE: this method should not be directly called elsewhere but only in class BrowserStorage\n *\n * @param itemName local storage item name\n * @param itemValue local storage item value\n */ localStorageUtils.setLocalStorageItemToBrowser = setLocalStorageItemToBrowser;\n function setSessionStorageItemToBrowser(itemName, itemValue) {\n try {\n const sessionStorage = getWindow().sessionStorage;\n sessionStorage.setItem(itemName, itemValue);\n } catch (error) {\n const errorText = isNullorUndefined(error) ? undefined : stringifyError(error);\n const errorMessage = `Failed: write access of session storage item ${itemName} value ${itemValue}, Error: ${errorText}`;\n BrowserStorage.TelemetryUtils.logTelemetryForAccessError(Constants.Telemetry.Action.WriteAccess, Constants.Telemetry.ActionModifier.SessionStorageItem, errorMessage);\n throw errorMessage;\n }\n }\n localStorageUtils.setSessionStorageItemToBrowser = setSessionStorageItemToBrowser;\n })(localStorageUtils || (localStorageUtils = {}));\n (function(TelemetryUtils) {\n function logTelemetryForAccessError(action, actionModifier, errorMessage = undefined) {\n const page = getWindow() && getWindow().location && getWindow().location.href;\n const payload = {\n page: page,\n action: action,\n actionModifier: actionModifier,\n details: errorMessage\n };\n SpzaInstrumentService.getProvider().probe(Constants.Telemetry.ProbeName.LogInfo, payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n }\n /**\n * log telemetry read, or write access error on browser storage, cookie, and local storage\n *\n * @param action telemetry action\n * @param actionModifier telemetry action modifier\n * @param errorMessage telemetry details message\n */ TelemetryUtils.logTelemetryForAccessError = logTelemetryForAccessError;\n })(BrowserStorage.TelemetryUtils || (BrowserStorage.TelemetryUtils = {}));\n var cookieUtils, localStorageUtils;\n})(BrowserStorage || (BrowserStorage = {}));\nexport var BrowserStorage;\n","import { Constants } from './constants';\n// NOTE:\n// DO NOT access directly to, or from browser, for following items\n// 1) cookie data, or\n// 2) local storage data\n//\n// instead, please use methods in browserStorageUtils util to access\n// e.g.\n// get cookie data\n// 1) BrowserStorage.getBrowserStorage().getCookieItem(...)\n// 2) getCookieItem(...)\n// set cookie data\n// 1) BrowserStorage.getBrowserStorage().setCookieItem(...)\n// 2) saveCookieItem(...)\n// get local storage data\n// 1) BrowserStorage.getBrowserStorage().getLocalStorageItem(...)\n// 2) getLocalStorageItem(...)\n// set local storage data\n// 1) BrowserStorage.getBrowserStorage().setLocalStorageItem(...)\n// 2) saveLocalStorageItem(...)\n//\n/**\n * get cookie expires option\n *\n * @param expiry: cookie expiry\n *\n * @returns expiration date which is 13 months afterwards in milli-seconds.\n */ export function getCookieOptionExpires(expiry = Constants.CookieExpiry.Default) {\n const date = new Date();\n date.setTime(date.getTime() + expiry);\n const expiresOptionText = `expires=${date.toUTCString()}`;\n return expiresOptionText;\n}\n","/* istanbul ignore file */ /* eslint-disable @typescript-eslint/no-namespace */ (function(BusinessTelemetry) {\n (function(dataBi) {\n dataBi[\"sortingDropdownId\"] = \"sortByDropdown\";\n dataBi[\"sortingDropdownName\"] = \"Sorting dropdown\";\n })(BusinessTelemetry.dataBi || (BusinessTelemetry.dataBi = {}));\n (function(Filters) {\n Filters[\"Activating\"] = \"Activating\";\n Filters[\"Deactivating\"] = \"Deactivating\";\n Filters[\"FiltersCleared\"] = \"Filters cleared\";\n })(BusinessTelemetry.Filters || (BusinessTelemetry.Filters = {}));\n (function(ProductAvailabilityType) {\n ProductAvailabilityType[\"Private\"] = \"private\";\n ProductAvailabilityType[\"Public\"] = \"public\";\n })(BusinessTelemetry.ProductAvailabilityType || (BusinessTelemetry.ProductAvailabilityType = {}));\n})(BusinessTelemetry || (BusinessTelemetry = {}));\nexport var BusinessTelemetry;\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _async_to_generator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nimport { TermsStrings, PricingStates, IAvailabilityActions } from '@shared/Models';\nimport { Constants, Environment, supportedCountries as SUPPORTED_COUNTRIES, IConsentOption, allBillingCountries } from '@shared/utils/constants';\nimport { getWindow } from '@shared/services/window';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { getFullPriceString } from './pricing';\nimport { logger } from '@src/logger';\nimport { getPrimaryProductUrl } from '@shared/utils/datamappingHelpers';\nimport { getPDPRoute, getProductByUrlKey } from '@shared/utils/appUtils';\nimport { urlReplace } from '@shared/routerHistory';\nexport const updateCart = ({ props, id, title, description, quantity, isQuantifiable, minQuantity, currency, maxQuantity, billingTerm, termId, isRecurring, showAutoRenewMessage, bigId, skuId, hasFreeTrial, price })=>{\n const prevCartItem = props.checkout.items[0];\n const cartItem = {\n id,\n title,\n description,\n entityId: props.app.entityId,\n appTitle: props.app.title,\n appImageUri: props.app.iconURL,\n unitPrice: {\n currency: currency || prevCartItem && prevCartItem.unitPrice.currency,\n unit: billingTerm,\n value: price\n },\n linkedAddIns: props.app.linkedAddIns\n };\n cartItem.isQuantifiable = typeof isQuantifiable !== 'undefined' ? isQuantifiable : prevCartItem === null || prevCartItem === void 0 ? void 0 : prevCartItem.isQuantifiable;\n let quantityAsInt = parseInt(quantity, 10);\n if (isNaN(quantityAsInt)) {\n quantityAsInt = prevCartItem.quantity;\n }\n cartItem.quantityString = quantity || prevCartItem.quantityString;\n cartItem.quantity = quantityAsInt;\n cartItem.minQuantity = minQuantity || (prevCartItem === null || prevCartItem === void 0 ? void 0 : prevCartItem.minQuantity);\n cartItem.maxQuantity = maxQuantity || (prevCartItem === null || prevCartItem === void 0 ? void 0 : prevCartItem.maxQuantity);\n cartItem.termId = termId || (prevCartItem === null || prevCartItem === void 0 ? void 0 : prevCartItem.termId);\n cartItem.termDuration = billingTerm || (prevCartItem === null || prevCartItem === void 0 ? void 0 : prevCartItem.termDuration);\n cartItem.recurringBilling = isRecurring || (prevCartItem === null || prevCartItem === void 0 ? void 0 : prevCartItem.recurringBilling);\n cartItem.showAutoRenewMessage = showAutoRenewMessage || (prevCartItem === null || prevCartItem === void 0 ? void 0 : prevCartItem.showAutoRenewMessage);\n cartItem.bigId = bigId || (prevCartItem === null || prevCartItem === void 0 ? void 0 : prevCartItem.bigId);\n cartItem.skuId = skuId || (prevCartItem === null || prevCartItem === void 0 ? void 0 : prevCartItem.skuId);\n cartItem.hasFreeTrial = hasFreeTrial;\n // No need for input as it won't change during plan update\n cartItem.product = prevCartItem === null || prevCartItem === void 0 ? void 0 : prevCartItem.product;\n // every time something changes in the cart we reset status for calculate now link,\n // this should only be done if we also have a payment instrument selected\n if (JSON.stringify(cartItem) !== JSON.stringify(prevCartItem)) {\n props.setCartItem(cartItem);\n }\n};\nexport const isNewCustomer = ({ activeCustomer, customers })=>{\n return !activeCustomer && (customers === null || customers === void 0 ? void 0 : customers.length) === 0;\n};\nexport const checkoutBillingCountry = ({ activeCustomer, customers, defaultBillingCountry })=>{\n var _activeCustomer_address;\n var _activeCustomer_address_country;\n const billingCountry = isNewCustomer({\n activeCustomer,\n customers\n }) ? defaultBillingCountry : (_activeCustomer_address_country = activeCustomer === null || activeCustomer === void 0 ? void 0 : (_activeCustomer_address = activeCustomer.address) === null || _activeCustomer_address === void 0 ? void 0 : _activeCustomer_address.country) !== null && _activeCustomer_address_country !== void 0 ? _activeCustomer_address_country : customers[0].address.country;\n return billingCountry.toLowerCase();\n};\nexport function isAvailableInThisRegion({ startingPrice }) {\n return startingPrice && startingPrice.pricingData !== PricingStates.NotAvailableInThisRegion;\n}\nexport const isDevelopmentEnvironment = (env)=>{\n return env !== Environment.Production;\n};\nexport function getCountries() {\n const countriesList = allBillingCountries.filter((country)=>!!country.transactable).map((country)=>{\n return {\n text: country.name,\n value: country.countryCode\n };\n });\n return countriesList;\n}\nexport function logConfirmTelemetry(countryCode) {\n const logPayload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.BillingCountry,\n details: `Country ${countryCode} confirmed`\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', logPayload);\n logger.info(logPayload.details, {\n action: logPayload.action,\n actionModifier: logPayload.actionModifier\n });\n}\nexport function confirmBillingCountry(_) {\n return _confirmBillingCountry.apply(this, arguments);\n}\nfunction _confirmBillingCountry() {\n _confirmBillingCountry = _async_to_generator(function*({ config, setBillingCountry, createCustomer }) {\n try {\n yield setBillingCountry(config.billingCountryCode);\n createCustomer();\n } catch (e) {\n const logPayload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.CreateCustomer,\n details: `Error during create customer, or setting billing country, retrying create customer.`\n };\n createCustomer();\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', logPayload);\n logger.info(logPayload.details, {\n action: logPayload.action,\n actionModifier: logPayload.actionModifier\n });\n } finally{\n logConfirmTelemetry(config.billingCountryCode);\n }\n });\n return _confirmBillingCountry.apply(this, arguments);\n}\nexport const getConsentState = (countryCode)=>{\n const selectedCountry = SUPPORTED_COUNTRIES.find((country)=>country.countryCode.toLowerCase() === countryCode.toLowerCase());\n return selectedCountry.consentRequired;\n};\n/**\n * Determine if should show contact info in purchase disclaimer\n * @param consentOption The consent type to check if requires checkbox\n * @returns true if country doesn't require consent checkbox\n */ export const isContactInfoHiddenInDisclaimer = (consentOption)=>{\n const consentsNotContactInfo = [\n IConsentOption.Exclude\n ];\n return consentsNotContactInfo.includes(consentOption);\n};\n/**\n * These shouldn't be localized, they are used for logging purposes only.\n * @param stepId The stepId to convert back to string\n */ export const convertStepIdToName = (stepId)=>{\n const mapping = {\n 0: 'Billing region picker',\n 1: 'Select plan',\n 2: 'Price and payment options',\n 3: 'Purchase Blends screen',\n 4: 'Configure your purchase'\n };\n return mapping[`${stepId}`];\n};\nexport const getBillingPlanPricesPerTermDuration = ({ plan, billingDuration })=>{\n var _renewAvailability_terms_filter, _renewAvailability_terms;\n const renewAvailability = plan.availabilities.find((availability)=>{\n const { actions } = availability;\n return actions.includes(IAvailabilityActions.Renew) && actions.includes(IAvailabilityActions.Browse);\n });\n const prices = renewAvailability === null || renewAvailability === void 0 ? void 0 : (_renewAvailability_terms = renewAvailability.terms) === null || _renewAvailability_terms === void 0 ? void 0 : (_renewAvailability_terms_filter = _renewAvailability_terms.filter((term)=>term.termUnits === billingDuration)) === null || _renewAvailability_terms_filter === void 0 ? void 0 : _renewAvailability_terms_filter.map((term)=>({\n totalPrice: term.price,\n billingPlan: term.billingPlan,\n termDuration: term.termUnits,\n /** This is the RENEW termId in a free-trial availability-term */ termId: term.termId\n }));\n return prices || [];\n};\n/**\n * This method returns the full price string in the format of: \"First month three, then <SomePrice+Currency>\"\n * Depends on hasFree trial for first month free prefix\n * TermId should always be the renew termId with price, if it's the free trial termId, the price you'll see is 0.0 which is misleading.\n */ export const convertTermToString = ({ context, term, countryCode, isQuantifiable, hasFreeTrial, locale })=>{\n return getFullPriceString({\n context,\n countryCode,\n currency: term.price.currencyCode,\n priceValue: term.price.msrp,\n billingPlan: term.billingPlan,\n termDuration: term.renewTermUnits,\n isQuantifiable,\n hasFreeTrial,\n locale\n });\n};\nexport const pbAnnually = 'Annually';\nexport const pbMonthly = 'Monthly';\nexport const pbOther = 'Other';\nexport const getBillingCycle = (term, billingPlan)=>{\n const MultiYearTerms = [\n TermsStrings.Term3YString,\n TermsStrings.Term2YString\n ];\n if (MultiYearTerms.includes(term) || billingPlan) {\n return pbOther;\n }\n if ([\n TermsStrings.Term1YString,\n TermsStrings.YearString\n ].includes(term)) {\n return pbAnnually;\n }\n if ([\n TermsStrings.Term1MString,\n TermsStrings.MonthString\n ].includes(term)) {\n return pbMonthly;\n }\n};\nexport const buildUrlToAppDetails = (tab, app, buildHref)=>{\n const productString = getPrimaryProductUrl(app.primaryProduct);\n const productData = getProductByUrlKey({\n urlKey: productString\n });\n const product = productData ? productData.UrlKey : productString;\n // redirect to PDP page, Plan and Price tab\n const pdpUrl = buildHref(getPDPRoute(app.appType), {\n productId: product,\n entityId: app.entityId\n }, {\n tab\n }, true);\n return pdpUrl;\n};\nexport const redirectToAppDetails = (tab, app, buildHref)=>{\n const pdpUrl = buildUrlToAppDetails(tab, app, buildHref);\n urlReplace(pdpUrl);\n};\nexport const getPurchaseBlendsMessageOverrides = (context, isOneTimePayment, isProfessionalService)=>{\n const riskRejected = context.locParams('PurchaseBlends_Risk_Rejected_Error', [\n 'https://go.microsoft.com/fwlink/?linkid=2101400&clcid=0x409'\n ], 'This purchase cannot be completed. Please contact Microsoft support via this link: https://go.microsoft.com/fwlink/?linkid=2101400&clcid=0x409');\n return isOneTimePayment ? {\n 'component.message-center.risk_rejected_error': riskRejected,\n 'component.line-item.product-details.billing_term': ' ',\n 'component.line-item.product-details.recurring_billing': ' ',\n 'component.line-item.recurring-billing.off': ' ',\n 'component.line-item.duration.one_month': ' ',\n 'component.line-item.monthly_billing_cycle_per_user': ' ',\n 'component.line-item.duration.total.one_month': ' ',\n 'component.common.line-item.subtotal_term_message': ' '\n } : isProfessionalService ? {\n 'component.message-center.risk_rejected_error': riskRejected,\n 'component.line-item.product-details.recurring_billing': ' ',\n 'component.line-item.recurring-billing.off': ' '\n } : {\n 'component.message-center.risk_rejected_error': riskRejected\n };\n};\n","/* eslint-disable @typescript-eslint/no-namespace */ /* eslint-disable camelcase */ /* eslint-disable no-redeclare */ /* eslint-disable no-use-before-define */ /* This file should contain all the app constants which we use in the SPZA project */ function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { stringifyError } from '@shared/utils/errorUtils';\nexport var IConsentOption = /*#__PURE__*/ function(IConsentOption) {\n /** Requires users to manually tick the lead generation box to enable - default is disabled */ IConsentOption[\"OptIn\"] = \"optin\";\n /** Requires users to manually tick the lead generation box to disable - default is enabled */ IConsentOption[\"OptOut\"] = \"optout\";\n /** No checkbox, leads should be sent and this is for a notice only */ IConsentOption[\"Notice\"] = \"notice\";\n /** Text is different no leads are sent. */ IConsentOption[\"Exclude\"] = \"exclude\";\n /** Treated as OptIn */ IConsentOption[\"Unknown\"] = \"unknown\";\n return IConsentOption;\n}({});\nexport var LoginType = /*#__PURE__*/ function(LoginType) {\n LoginType[\"Silent\"] = \"Silent\";\n LoginType[\"Implicit\"] = \"Implicit\";\n return LoginType;\n}({});\n(function(Constants) {\n (function(Environment) {\n Environment[\"development\"] = \"development\";\n Environment[\"df\"] = \"df\";\n Environment[\"canary\"] = \"canary\";\n Environment[\"prod\"] = \"prod\";\n })(Constants.Environment || (Constants.Environment = {}));\n Constants.MSTenantId = '72f988bf-86f1-41af-91ab-2d7cd011db47';\n (function(AppName) {\n AppName[\"AppSource\"] = \"appsource\";\n })(Constants.AppName || (Constants.AppName = {}));\n Constants.UNKNOWN_NETWORK_INFO = 'unknown';\n Constants.notAvailable = 'N/A';\n (function(Featured) {\n Featured.AppDocId = 'featuredapps';\n Featured.ServiceDocId = 'featuredservices';\n })(Constants.Featured || (Constants.Featured = {}));\n (function(Tabs) {\n Tabs[\"PlansAndPrice\"] = \"PlansAndPrice\";\n Tabs[\"Overview\"] = \"Overview\";\n Tabs[\"DetailsAndSupport\"] = \"DetailsAndSupport\";\n Tabs[\"Reviews\"] = \"Reviews\";\n Tabs[\"Linkedin\"] = \"Linkedin\";\n })(Constants.Tabs || (Constants.Tabs = {}));\n (function(FilteredSearchType) {\n FilteredSearchType[\"All\"] = \"All\";\n FilteredSearchType[\"Apps\"] = \"Apps\";\n FilteredSearchType[\"Services\"] = \"Services\";\n FilteredSearchType[\"CloudsIndustry\"] = \"CloudsIndustry\";\n FilteredSearchType[\"Partners\"] = \"Partners\";\n })(Constants.FilteredSearchType || (Constants.FilteredSearchType = {}));\n (function(FilteredSearchPhase) {\n FilteredSearchPhase[\"Started\"] = \"Started\";\n FilteredSearchPhase[\"SearchResultsReturned\"] = \"Search Results Returned\";\n FilteredSearchPhase[\"DuplicateAddInsRemoved\"] = \"Duplicate Add Ins Removed\";\n FilteredSearchPhase[\"SearchActionCreated\"] = \"Search Action Created\";\n FilteredSearchPhase[\"SearchTelemetryLogged\"] = \"Search Telemetry Logged\";\n })(Constants.FilteredSearchPhase || (Constants.FilteredSearchPhase = {}));\n (function(HTMLElements) {\n HTMLElements[\"INPUT\"] = \"INPUT\";\n HTMLElements[\"BUTTON\"] = \"BUTTON\";\n })(Constants.HTMLElements || (Constants.HTMLElements = {}));\n (function(SigninStatus) {\n SigninStatus[SigninStatus[\"ValidTokenValidCookie\"] = 1] = \"ValidTokenValidCookie\";\n SigninStatus[SigninStatus[\"ExpiredTokenValidCookie\"] = 2] = \"ExpiredTokenValidCookie\";\n SigninStatus[SigninStatus[\"ExpiredTokenInvalidCookie\"] = 3] = \"ExpiredTokenInvalidCookie\";\n SigninStatus[SigninStatus[\"ValidTokenInvalidCookie\"] = 4] = \"ValidTokenInvalidCookie\";\n // Only client side state, where you cannot read the cookie and tell\n SigninStatus[SigninStatus[\"ValidTokenUnknownCookie\"] = 5] = \"ValidTokenUnknownCookie\";\n SigninStatus[SigninStatus[\"ValidationSkipped\"] = 6] = \"ValidationSkipped\";\n })(Constants.SigninStatus || (Constants.SigninStatus = {}));\n (function(PageToGiveMetaTag) {\n PageToGiveMetaTag[PageToGiveMetaTag[\"PageNotReady\"] = -1] = \"PageNotReady\";\n PageToGiveMetaTag[PageToGiveMetaTag[\"SpzaHomePage\"] = 1] = \"SpzaHomePage\";\n PageToGiveMetaTag[PageToGiveMetaTag[\"SpzaGalleryPage\"] = 2] = \"SpzaGalleryPage\";\n PageToGiveMetaTag[PageToGiveMetaTag[\"SpzaCSGalleryPage\"] = 3] = \"SpzaCSGalleryPage\";\n PageToGiveMetaTag[PageToGiveMetaTag[\"SpzaDetailPage\"] = 4] = \"SpzaDetailPage\";\n PageToGiveMetaTag[PageToGiveMetaTag[\"SpzaCSDetailPage\"] = 5] = \"SpzaCSDetailPage\";\n PageToGiveMetaTag[PageToGiveMetaTag[\"SpzaWordGalleryPage\"] = 6] = \"SpzaWordGalleryPage\";\n PageToGiveMetaTag[PageToGiveMetaTag[\"SpzaExcelGalleryPage\"] = 7] = \"SpzaExcelGalleryPage\";\n PageToGiveMetaTag[PageToGiveMetaTag[\"SpzaPowerpointGalleryPage\"] = 8] = \"SpzaPowerpointGalleryPage\";\n PageToGiveMetaTag[PageToGiveMetaTag[\"SpzaOutlookGalleryPage\"] = 9] = \"SpzaOutlookGalleryPage\";\n PageToGiveMetaTag[PageToGiveMetaTag[\"SpzaOfficeGalleryPage\"] = 10] = \"SpzaOfficeGalleryPage\";\n })(Constants.PageToGiveMetaTag || (Constants.PageToGiveMetaTag = {}));\n (function(RatingShowMode) {\n RatingShowMode[RatingShowMode[\"Error\"] = 1] = \"Error\";\n RatingShowMode[RatingShowMode[\"ContentViolation\"] = 2] = \"ContentViolation\";\n RatingShowMode[RatingShowMode[\"Success\"] = 3] = \"Success\";\n RatingShowMode[RatingShowMode[\"DeleteSuccess\"] = 4] = \"DeleteSuccess\";\n RatingShowMode[RatingShowMode[\"WriteNewReview\"] = 5] = \"WriteNewReview\";\n RatingShowMode[RatingShowMode[\"Loading\"] = 6] = \"Loading\";\n RatingShowMode[RatingShowMode[\"EnsureDelete\"] = 7] = \"EnsureDelete\";\n RatingShowMode[RatingShowMode[\"EditReview\"] = 8] = \"EditReview\";\n })(Constants.RatingShowMode || (Constants.RatingShowMode = {}));\n (function(CookieExpiry) {\n CookieExpiry.Default = 13 * 30 * 24 * 60 * 60 * 1000;\n CookieExpiry.Spza = 1000 * 60 * 60 * 24 * 13;\n CookieExpiry.RefreshToken = 1000 * 60 * 60 * 24 * 14;\n CookieExpiry.ExperimentDuration = 1000 * 60 * 60 * 24 * 90;\n })(Constants.CookieExpiry || (Constants.CookieExpiry = {}));\n (function(Reviews) {\n Reviews.CommentsPerPage = 10;\n Reviews.MaxSubsequentDeletedComments = 4;\n Reviews.MaxCommentComposeLength = 500;\n (function(ReviewCommentModalMode) {\n ReviewCommentModalMode[ReviewCommentModalMode[\"ContentViolation\"] = 0] = \"ContentViolation\";\n ReviewCommentModalMode[ReviewCommentModalMode[\"ConfirmDelete\"] = 1] = \"ConfirmDelete\";\n ReviewCommentModalMode[ReviewCommentModalMode[\"DeleteError\"] = 2] = \"DeleteError\";\n ReviewCommentModalMode[ReviewCommentModalMode[\"ConfirmUpdate\"] = 3] = \"ConfirmUpdate\";\n ReviewCommentModalMode[ReviewCommentModalMode[\"UpdateError\"] = 4] = \"UpdateError\";\n ReviewCommentModalMode[ReviewCommentModalMode[\"CreateError\"] = 5] = \"CreateError\";\n ReviewCommentModalMode[ReviewCommentModalMode[\"Loading\"] = 6] = \"Loading\";\n })(Reviews.ReviewCommentModalMode || (Reviews.ReviewCommentModalMode = {}));\n (function(ReviewCommentActionError) {\n ReviewCommentActionError[\"ContentViolation\"] = \"ContentViolation\";\n })(Reviews.ReviewCommentActionError || (Reviews.ReviewCommentActionError = {}));\n (function(Microdata) {\n Microdata.AppItemType = 'https://schema.org/SoftwareApplication';\n Microdata.AppCategory = 'UtilitiesApplication';\n })(Reviews.Microdata || (Reviews.Microdata = {}));\n (function(ReviewsSource) {\n ReviewsSource.Internal = 'Internal';\n ReviewsSource.External = 'External';\n ReviewsSource.All = 'All';\n })(Reviews.ReviewsSource || (Reviews.ReviewsSource = {}));\n })(Constants.Reviews || (Constants.Reviews = {}));\n (function(EntityType) {\n EntityType[EntityType[\"App\"] = 1] = \"App\";\n EntityType[EntityType[\"Service\"] = 2] = \"Service\";\n EntityType[EntityType[\"Partner\"] = 5] = \"Partner\";\n EntityType[EntityType[\"CloudsIndustry\"] = 6] = \"CloudsIndustry\";\n })(Constants.EntityType || (Constants.EntityType = {}));\n Constants.ECAPayloadAction = 'Create';\n (function(Dynamics365LicenseType) {\n Dynamics365LicenseType[Dynamics365LicenseType[\"dynamics365License\"] = 1] = \"dynamics365License\";\n Dynamics365LicenseType[Dynamics365LicenseType[\"dynamics365forBusinessLicense\"] = 2] = \"dynamics365forBusinessLicense\";\n Dynamics365LicenseType[Dynamics365LicenseType[\"noLicense\"] = -1] = \"noLicense\";\n })(Constants.Dynamics365LicenseType || (Constants.Dynamics365LicenseType = {}));\n (function(Dynamics365LicenseIndex) {\n Dynamics365LicenseIndex[Dynamics365LicenseIndex[\"dynamics365LicenseIndex\"] = 0] = \"dynamics365LicenseIndex\";\n Dynamics365LicenseIndex[Dynamics365LicenseIndex[\"dynamics365ForBusinessLicenseIndex\"] = 1] = \"dynamics365ForBusinessLicenseIndex\";\n })(Constants.Dynamics365LicenseIndex || (Constants.Dynamics365LicenseIndex = {}));\n (function(SearchBy) {\n SearchBy[SearchBy[\"Id\"] = 0] = \"Id\";\n SearchBy[SearchBy[\"Class\"] = 1] = \"Class\";\n SearchBy[SearchBy[\"Tag\"] = 2] = \"Tag\";\n SearchBy[SearchBy[\"None\"] = 3] = \"None\";\n SearchBy[SearchBy[\"QuerySelector\"] = 4] = \"QuerySelector\";\n })(Constants.SearchBy || (Constants.SearchBy = {}));\n (function(SystemKey) {\n SystemKey[SystemKey[\"Space\"] = 32] = \"Space\";\n SystemKey[SystemKey[\"Tab\"] = 9] = \"Tab\";\n SystemKey[SystemKey[\"Enter\"] = 13] = \"Enter\";\n SystemKey[SystemKey[\"Esc\"] = 27] = \"Esc\";\n SystemKey[SystemKey[\"Up\"] = 38] = \"Up\";\n SystemKey[SystemKey[\"Down\"] = 40] = \"Down\";\n })(Constants.SystemKey || (Constants.SystemKey = {}));\n (function(SystemKeyAsString) {\n SystemKeyAsString[\"Space\"] = \" \";\n SystemKeyAsString[\"Tab\"] = \"Tab\";\n SystemKeyAsString[\"Enter\"] = \"Enter\";\n SystemKeyAsString[\"Esc\"] = \"Escape\";\n SystemKeyAsString[\"ArrowUp\"] = \"ArrowUp\";\n SystemKeyAsString[\"ArrowDown\"] = \"ArrowDown\";\n })(Constants.SystemKeyAsString || (Constants.SystemKeyAsString = {}));\n (function(SystemKeyString) {\n SystemKeyString[\"Space\"] = \"Space\";\n SystemKeyString[\"Tab\"] = \"Tab\";\n SystemKeyString[\"Enter\"] = \"Enter\";\n SystemKeyString[\"Esc\"] = \"Esc\";\n SystemKeyString[\"Up\"] = \"Up\";\n SystemKeyString[\"Down\"] = \"Down\";\n })(Constants.SystemKeyString || (Constants.SystemKeyString = {}));\n (function(Recommendations) {\n Recommendations[\"WhatsNew\"] = \"WhatsNew\";\n Recommendations[\"Trending\"] = \"Trending\";\n Recommendations[\"WhatsNewMicrosoft365\"] = \"WhatsNewMicrosoft365\";\n Recommendations[\"TrendingMicrosoft365\"] = \"TrendingMicrosoft365\";\n })(Constants.Recommendations || (Constants.Recommendations = {}));\n (function(FieldHubUserType) {\n FieldHubUserType[FieldHubUserType[\"None\"] = 0] = \"None\";\n FieldHubUserType[FieldHubUserType[\"Limited\"] = 1] = \"Limited\";\n FieldHubUserType[FieldHubUserType[\"Full\"] = 2] = \"Full\";\n })(Constants.FieldHubUserType || (Constants.FieldHubUserType = {}));\n (function(VaritionKey) {\n VaritionKey[VaritionKey[\"Default\"] = 0] = \"Default\";\n VaritionKey[VaritionKey[\"Treatment\"] = 1] = \"Treatment\";\n VaritionKey[VaritionKey[\"TreatmentNewFilterAMP\"] = 2] = \"TreatmentNewFilterAMP\";\n })(Constants.VaritionKey || (Constants.VaritionKey = {}));\n (function(TenantType) {\n TenantType[TenantType[\"None\"] = 0] = \"None\";\n TenantType[TenantType[\"Viral\"] = 1] = \"Viral\";\n TenantType[TenantType[\"Managed\"] = 2] = \"Managed\";\n TenantType[TenantType[\"Msa\"] = 3] = \"Msa\";\n TenantType[TenantType[\"Unknown\"] = 4] = \"Unknown\";\n })(Constants.TenantType || (Constants.TenantType = {}));\n Constants.InvoiceLink = 'https://aka.ms/appsource/paybyinvoice';\n Constants.AzureSubscriptionLink = 'http://aka.ms/appsource/azuresub';\n Constants.AzureBenefitURL = 'http://aka.ms/appsource/azurebenefit';\n Constants.MicrosoftTermsURL = 'https://aka.ms/azuremarketplaceterms';\n Constants.MyOrdersLink = 'https://admin.microsoft.com/Adminportal/Home#/subscriptions/apps';\n Constants.AdminCenterLink = 'https://admin.microsoft.com/Adminportal/Home';\n Constants.AdminCenterYourProductsLink = 'https://admin.microsoft.com/adminportal/home?#/subscriptions';\n Constants.AdminCenterLicensesLink = 'https://admin.microsoft.com/adminportal/home?#/licenses';\n Constants.MicrosoftPrivacyStatementURL = 'https://aka.ms/AppSourcePrivacyStatement';\n Constants.MicrosoftRatingReviewPolicy = 'https://docs.microsoft.com/en-us/legal/marketplace/rating-review-policies';\n Constants.FeaturedAppsId = '99';\n Constants.InitializationRetryAttempts = process.env.initializationRetryAttempts ? parseInt(process.env.initializationRetryAttempts, 10) : 1;\n Constants.InitializationRetryDelay = process.env.initializationRetryDelay ? parseInt(process.env.initializationRetryDelay, 10) : 1000 * 60 * 5; // 5 minutes\n Constants.MaxItemsPerPageInReviews = 10;\n Constants.mooncakeNationalCloud = 'mooncake';\n Constants.fairfaxNationalCloud = 'fairfax';\n Constants.blackforestNationalCloud = 'blackforest';\n Constants.EmailRegex = /^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$/;\n Constants.LocaleRegex = /^[a-zA-Z- ]*$/;\n Constants.AlphaNumericRegex = /^[a-zA-Z0-9 ]+$/;\n Constants.SeoLocaleRegex = /[/][a-zA-Z]{2}-[a-zA-Z]{2,4}/;\n Constants.removeHtmlRegex = /<(.|\\n)*?>/g;\n Constants.crossListingRibbonItemCount = 5;\n Constants.memCacheExpiry = 1200000;\n Constants.testDriveDocumentationLink = 'https://go.microsoft.com/fwlink/?linkid=845086';\n Constants.ampTestDriveDocumentationLink = 'https://azure.microsoft.com/en-us/blog/azure-marketplace-test-drive/';\n Constants.purchaseInAppSourceLink = 'https://aka.ms/AppSourceDocOverview';\n Constants.appSourceContactUsLink = 'https://aka.ms/AppSourceContactUs';\n Constants.GraphResourceUrl = 'https://graph.windows.net';\n Constants.AccessTokenUrl = 'https://login.microsoftonline.com/common/oauth2/token';\n Constants.PowerBIResourceUrl = 'https://analysis.windows.net/powerbi/api';\n Constants.PowerBIVisualInstructionsUrl = 'https://go.microsoft.com/fwlink/?linkid=2161918';\n Constants.learnMoreCertifiedPBI = 'https://aka.ms/power-bi-custom-visuals-certified';\n Constants.learnMoreBillingPane = 'https://aka.ms/appsourcecountries';\n Constants.refreshAccessTokenInterval = 1000 * 60 * 45; // 45 minutes in ms\n Constants.ServicesUserSegment = 'Services';\n Constants.UserSegmentQueryParameter = 'usersegment';\n Constants.InitialStateCacheKey = 'initialState';\n Constants.everywhereFilterView = 'everywhere';\n Constants.URLCacheKeyIsMobileView = 'ismobileview';\n Constants.ABTesting = 'ABTesting';\n Constants.canoninalfilterQuery = 'filters=';\n Constants.canonicalAMPEnvWebAppName = 'mac';\n Constants.canonicalAMPEnvAppName = 'azureMarketPlace';\n Constants.tfsStringFieldMaxLength = 255;\n Constants.mpnIdMaxDigits = 7;\n Constants.enterpriseContractLink = 'https://go.microsoft.com/fwlink/?linkid=2041178';\n Constants.M365Admin = 'M365Admin';\n Constants.PanelWidth = '340px';\n Constants.PrimaryProductBitMaskKey = 'product_mask_1';\n Constants.AppSourceStorefronts = [\n 'appsource',\n 'teamsadmin',\n 'm365admin'\n ];\n Constants.redirectRoute = 'redirect';\n (function(ReviewsEnrichApiResponse) {\n ReviewsEnrichApiResponse.ContentViolation = 'ContentViolation';\n ReviewsEnrichApiResponse.UserDidntPurchase = 'user has not acquired the app';\n })(Constants.ReviewsEnrichApiResponse || (Constants.ReviewsEnrichApiResponse = {}));\n (function(Checkout) {\n Checkout.MaxQuantity = 1000000;\n Checkout.IsSaasBundle = 'isSaaSBundle';\n Checkout.ContentId = 'contentId';\n Checkout.OperationLocation = 'operation-location';\n Checkout.RetryAfter = 'retry-after';\n Checkout.DefaultPlanIdQueryParam = 'defaultPlanId';\n (function(TermId) {\n TermId.Monthly = 'hjdtn7tfnxcy';\n TermId.Yearly = 'nm5o4wf9fbfy';\n })(Checkout.TermId || (Checkout.TermId = {}));\n })(Constants.Checkout || (Constants.Checkout = {}));\n (function(OrderConfirmation) {\n OrderConfirmation.InternalServerErrorLimit = 3;\n OrderConfirmation.PreviewOffer = '-preview';\n OrderConfirmation.OfferNotFoundErrorMessage = 'was not found in the catalog';\n OrderConfirmation.TestHeaderLowerCase = 'test header';\n OrderConfirmation.CustomMetersErrorMessage = 'The purchase has failed because the plan you selected is not available for purchase from AppSource. It is available for purchase in Azure Portal.';\n OrderConfirmation.RiskPrepaidCardErrorReason = 'AzurePrepaidBINPolicy_Reject_Terminate';\n })(Constants.OrderConfirmation || (Constants.OrderConfirmation = {}));\n (function(StatusError) {\n StatusError.Conflict = 409;\n StatusError.InternalServerError = 500;\n })(Constants.StatusError || (Constants.StatusError = {}));\n (function(Cookies) {\n Cookies.AppSourceCookie = 'appsource';\n Cookies.unifiedExperience = 'unifiedExperience';\n Cookies.AppSourceLeadCookie = 'appsourcelead';\n Cookies.LocaleCookie = 'spzaLocale';\n Cookies.billingRegionCookie = 'appsourcebillingregion';\n Cookies.correlationId = 'correlationId';\n Cookies.privacyConsentAcceptedDate = 'privacyConsentAcceptedDate';\n Cookies.WCPBannerName = 'WCPcookieBannerId';\n Cookies.WCPManageCookieBtnId = 'c-uhff-footer_managecookies';\n Cookies.WCPDefaultLocale = 'en-US';\n Cookies.WCPEventName = 'wcpconsent-download-done';\n Cookies.AMC3PAdsOptOut = '3PAdsOptOut';\n (function(Errors) {\n Errors[\"ParsingExperimentsCookieError\"] = \"Failed to parse experiments cookie\";\n Errors[\"ParsingVariantsError\"] = \"Failed to parse variants within experiments cookie\";\n })(Cookies.Errors || (Cookies.Errors = {}));\n Cookies.Essential = {\n /** Cookie to track the session, essential for tracking user behavior */ [Constants.Cookies.correlationId]: true,\n [Constants.Cookies.AMC3PAdsOptOut]: true\n };\n })(Constants.Cookies || (Constants.Cookies = {}));\n (function(ConsentAnalyticAssets) {\n ConsentAnalyticAssets[\"GA\"] = \"GA\";\n })(Constants.ConsentAnalyticAssets || (Constants.ConsentAnalyticAssets = {}));\n (function(Catalog) {\n Catalog.RatingAverageDecimalPoints = 3;\n Catalog.RatingAverageDecimalPointsHelper = Math.pow(10, Catalog.RatingAverageDecimalPoints);\n Catalog.ImageNameUnavailable = 'Unavailable';\n Catalog.DefaultTestDriveVideoName = 'About this test drive';\n Catalog.DefaultTestDriveManual = 'Test drive manual';\n Catalog.DefaultOfficeLocale = 'en';\n Catalog.AllMarkets = 'ALL';\n Catalog.legacyPlanIdARM = '-arm';\n (function(CategoryId) {\n CategoryId[\"MicrosoftIotEdgeModule\"] = \"microsoft-iot-edge-module\";\n })(Catalog.CategoryId || (Catalog.CategoryId = {}));\n (function(MeterUnit) {\n MeterUnit[\"HR\"] = \"HR\";\n })(Catalog.MeterUnit || (Catalog.MeterUnit = {}));\n (function(MeterType) {\n MeterType[\"FreeTrialMeterType\"] = \"1 Compute Hour - FreeTrial\";\n })(Catalog.MeterType || (Catalog.MeterType = {}));\n (function(ArtificatsName) {\n ArtificatsName[\"DefaultTemplate\"] = \"DefaultTemplate\";\n ArtificatsName[\"UiDefinition\"] = \"UiDefinition.json\";\n ArtificatsName[\"CreateUiDefinition\"] = \"createuidefinition\";\n })(Catalog.ArtificatsName || (Catalog.ArtificatsName = {}));\n })(Constants.Catalog || (Constants.Catalog = {}));\n (function(LocalStorage) {\n LocalStorage.spzaUserId = 'spzaUserId';\n LocalStorage.trailId = 'trailId';\n LocalStorage.nps = 'nps';\n LocalStorage.npsNext = 'next';\n LocalStorage.npsNextText = 'nextText';\n LocalStorage.dontShowInstructions = 'dontShowInstructions';\n LocalStorage.LoginHint = 'loginHint';\n LocalStorage.Essentials = [\n Constants.LocalStorage.LoginHint\n ];\n })(Constants.LocalStorage || (Constants.LocalStorage = {}));\n Constants.usCountryCode = 'us';\n Constants.usCountryCodeUpper = Constants.usCountryCode.toUpperCase();\n Constants.caCountryCode = 'ca';\n Constants.auCountryCode = 'au';\n Constants.allCountriesCode = 'ALL';\n Constants.allStatesCode = 'all';\n Constants.allStatesCodeUpper = Constants.allStatesCode.toUpperCase();\n Constants.usdCurrency = 'USD';\n Constants.countryCodeQueryParam = 'country';\n Constants.regionCodeQueryParam = 'region';\n Constants.usFilterText = 'United States';\n Constants.auFilterText = 'Austrilia';\n Constants.allRegionsFilterText = 'All States/Provinces';\n Constants.userAcceptField = 'accepted';\n Constants.userProfileEmbedCookieName = 'userProfileEmbedHost';\n Constants.Country = 'country';\n (function(EventsApi) {\n EventsApi.View = 'view';\n EventsApi.BusinessApplicationsType = 'BusinessApplications';\n })(Constants.EventsApi || (Constants.EventsApi = {}));\n (function(UrlParamCacheKeyWhiteListKey) {\n UrlParamCacheKeyWhiteListKey[\"Product\"] = \"product\";\n UrlParamCacheKeyWhiteListKey[\"Service\"] = \"service\";\n UrlParamCacheKeyWhiteListKey[\"Default\"] = \"default\";\n })(Constants.UrlParamCacheKeyWhiteListKey || (Constants.UrlParamCacheKeyWhiteListKey = {}));\n (function(Search) {\n Search.numberOfTops = 1000;\n Search.searchFullQueryType = 'full';\n Search.maxNumOfSuggestions = 5;\n Search.cloudIndustryCategoriesFilter = 'CloudIndustryCategories/any()';\n Search.maxSearchTextLength = 200;\n (function(SuggestionTypes) {\n SuggestionTypes[\"WordSearch\"] = \"WordSearch\";\n SuggestionTypes[\"Entity\"] = \"Entity\";\n })(Search.SuggestionTypes || (Search.SuggestionTypes = {}));\n (function(QueryParams) {\n QueryParams.SuggestionTypes = 'suggestionTypes';\n QueryParams.SearchQuery = 'searchQuery';\n QueryParams.IndustryCloud = 'industryCloud';\n QueryParams.Language = 'language';\n QueryParams.Gallery = 'gallery';\n QueryParams.ProductTypes = 'productTypes';\n })(Search.QueryParams || (Search.QueryParams = {}));\n (function(Endpoints) {\n Endpoints.Search = '/search';\n Endpoints.Suggestions = 'suggestions/products';\n })(Search.Endpoints || (Search.Endpoints = {}));\n (function(ApiVersions) {\n ApiVersions.SearchApiSuggestions = '2022-09-25-preview';\n })(Search.ApiVersions || (Search.ApiVersions = {}));\n (function(SelectEntry) {\n SelectEntry.ApplicationId = 'ApplicationId';\n SelectEntry.ServiceId = 'ServiceId';\n })(Search.SelectEntry || (Search.SelectEntry = {}));\n (function(SearchMode) {\n SearchMode.All = 'all';\n })(Search.SearchMode || (Search.SearchMode = {}));\n (function(ActionType) {\n ActionType[\"Suggestions\"] = \"Suggestions\";\n ActionType[\"Search\"] = \"Search\";\n })(Search.ActionType || (Search.ActionType = {}));\n (function(OrderBy) {\n OrderBy[\"asc\"] = \"asc\";\n OrderBy[\"desc\"] = \"desc\";\n })(Search.OrderBy || (Search.OrderBy = {}));\n })(Constants.Search || (Constants.Search = {}));\n (function(FilteredGallery) {\n FilteredGallery.pageSize = 60;\n FilteredGallery.officeFilter = 'office';\n })(Constants.FilteredGallery || (Constants.FilteredGallery = {}));\n (function(TileDataEntityType) {\n TileDataEntityType[\"App\"] = \"App\";\n TileDataEntityType[\"Service\"] = \"Service\";\n TileDataEntityType[\"CloudsIndustry\"] = \"CloudsIndustry\";\n TileDataEntityType[\"All\"] = \"All\";\n })(Constants.TileDataEntityType || (Constants.TileDataEntityType = {}));\n (function(TileDataAdditionalQueryParams) {\n TileDataAdditionalQueryParams[\"sortBy\"] = \"sortBy\";\n TileDataAdditionalQueryParams[\"page\"] = \"page\";\n TileDataAdditionalQueryParams[\"region\"] = \"region\";\n TileDataAdditionalQueryParams[\"country\"] = \"country\";\n TileDataAdditionalQueryParams[\"includeTestProducts\"] = \"includeTestProducts\";\n })(Constants.TileDataAdditionalQueryParams || (Constants.TileDataAdditionalQueryParams = {}));\n (function(TileDataFilteredQueryParams) {\n TileDataFilteredQueryParams[\"search\"] = \"search\";\n TileDataFilteredQueryParams[\"subcategories\"] = \"subcategories\";\n TileDataFilteredQueryParams[\"subindustries\"] = \"subindustries\";\n TileDataFilteredQueryParams[\"filters\"] = \"filters\";\n TileDataFilteredQueryParams[\"serviceType\"] = \"serviceType\";\n })(Constants.TileDataFilteredQueryParams || (Constants.TileDataFilteredQueryParams = {}));\n (function(TileDataCuratedQueryParams) {\n TileDataCuratedQueryParams[\"category\"] = \"category\";\n TileDataCuratedQueryParams[\"industry\"] = \"industry\";\n TileDataCuratedQueryParams[\"product\"] = \"product\";\n })(Constants.TileDataCuratedQueryParams || (Constants.TileDataCuratedQueryParams = {}));\n (function(DataMapCollectionKeys) {\n DataMapCollectionKeys[\"categories\"] = \"categories\";\n DataMapCollectionKeys[\"industries\"] = \"industries\";\n DataMapCollectionKeys[\"cloudIndustries\"] = \"cloudIndustries\";\n DataMapCollectionKeys[\"products\"] = \"products\";\n DataMapCollectionKeys[\"serviceTypes\"] = \"serviceTypes\";\n DataMapCollectionKeys[\"trials\"] = \"trials\";\n DataMapCollectionKeys[\"pricingModel\"] = \"pricingModel\";\n DataMapCollectionKeys[\"ratings\"] = \"ratings\";\n DataMapCollectionKeys[\"appCompliance\"] = \"appCompliance\";\n DataMapCollectionKeys[\"azureBenefitEligible\"] = \"AzureBenefitEligible\";\n DataMapCollectionKeys[\"copilotExtension\"] = \"CopilotExtension\";\n DataMapCollectionKeys[\"productType\"] = \"productType\";\n })(Constants.DataMapCollectionKeys || (Constants.DataMapCollectionKeys = {}));\n (function(CategoriesDataMapCollectionKeys) {\n CategoriesDataMapCollectionKeys[\"default\"] = \"default\";\n CategoriesDataMapCollectionKeys[\"office\"] = \"office\";\n CategoriesDataMapCollectionKeys[\"powerBiVisuals\"] = \"powerBiVisuals\";\n CategoriesDataMapCollectionKeys[\"addIns\"] = \"addIns\";\n })(Constants.CategoriesDataMapCollectionKeys || (Constants.CategoriesDataMapCollectionKeys = {}));\n Constants.CuratedQueryParamsToDataMapCollectionKeyMap = {\n [\"category\"]: \"categories\",\n [\"industry\"]: \"industries\",\n [\"product\"]: \"products\"\n };\n Constants.UrlParamCacheKeyWhiteList = {\n country: true,\n region: true,\n tab: true,\n product: true,\n embedhost: true\n };\n Constants.UrlParamCacheKeyBlackList = {\n search: true,\n product: true,\n category: true,\n industry: true,\n subcategories: true,\n subindustries: true,\n filters: true,\n servicetype: true\n };\n Constants.EmbedUrlParamCacheKeyBlackList = _object_spread_props(_object_spread({}, Constants.UrlParamCacheKeyBlackList), {\n product: undefined\n });\n let UserPII = /*#__PURE__*/ function(UserPII) {\n UserPII[\"firstName\"] = \"firstName\";\n UserPII[\"lastName\"] = \"lastName\";\n UserPII[\"email\"] = \"email\";\n UserPII[\"phone\"] = \"phone\";\n UserPII[\"oid\"] = \"oid\";\n UserPII[\"alternateEmail\"] = \"alternateEmail\";\n return UserPII;\n }({});\n Constants.PIIFields = [\n \"firstName\",\n \"lastName\",\n \"email\",\n \"phone\",\n \"oid\",\n \"alternateEmail\"\n ];\n Constants.RawDataCacheKeyPrefix = 'RawData|';\n (function(Headers) {\n Headers.CV = 'ms-cv';\n Headers.RequestId = 'x-ms-requestid';\n Headers.CorrelationId = 'x-ms-correlationid';\n Headers.XMSUserAgent = 'x-ms-useragent';\n Headers.Source = 'x-ms-source';\n Headers.Bearer = 'Bearer '; // Please do not remove the whitespace at the end\n Headers.AccessKey = 'accesskey';\n Headers.Authorization = 'authorization';\n Headers.Referer = 'referer';\n Headers.InternalAuthorizationHeader = 'x-ms-authorization';\n Headers.Cookie = 'cookie';\n Headers.Host = 'host';\n Headers.iframeOptions = 'X-Frame-Options';\n Headers.ContentType = 'Content-Type';\n Headers.UserAgent = 'user-agent';\n Headers.XMSSourceAppSource = 'AppSource';\n Headers.XMSSourceAMP = 'AzureMarketplace';\n Headers.XMSClientName = 'x-ms-client-name';\n Headers.XForwardedFor = 'x-forwarded-for';\n Headers.XIISNodeRemoteAddr = 'x-iisnode-remote_addr';\n Headers.AcceptLanguages = 'accept-language';\n Headers.ApplicationType = 'x-ms-applicationType';\n Headers.CatalogApiClientRequestId = 'x-ms-client-request-id';\n Headers.ETag = 'ETag';\n Headers.CacheControl = 'Cache-Control';\n Headers.Pragma = 'Pragma';\n Headers.Expires = 'Expires';\n Headers.ApiKey = 'api-key';\n Headers.Origin = 'Origin';\n Headers.Accept = 'accept';\n Headers.XMsApp = 'x-ms-app';\n Headers.SetCookie = 'set-cookie';\n Headers.XMSAuthInternalToken = 'x-ms-auth-internal-token';\n Headers.XAPIKey = 'X-API-Key';\n Headers.XProofToken = 'x-proof-token';\n Headers.ProxyAuthorization = 'proxy-authorization';\n Headers.XMSClientObjectId = 'x-ms-client-object-id';\n Headers.XMSClientTenantId = 'x-ms-client-tenant-id';\n Headers.XMSClientRegion = 'x-ms-client-region';\n })(Constants.Headers || (Constants.Headers = {}));\n (function(OperationNames) {\n OperationNames.PassThroughLog = 'PassThroughLog ';\n OperationNames.PostTokens = 'Post Tokens';\n OperationNames.Server = 'Server';\n OperationNames.Request = 'Request';\n OperationNames.PreRequest = 'Potential AAD Callback Request';\n OperationNames.RateLimit = 'Rate Limit';\n OperationNames.TokenLog = 'Token Log';\n OperationNames.ParamsValidation = 'params Validation';\n OperationNames.MainRequest = 'Request Received';\n OperationNames.EnsureAsyncData = 'Ensure Async Data';\n OperationNames.GetHeaderData = 'Get Header Data';\n OperationNames.RenderReactApp = 'Render React App';\n OperationNames.WarmupRemoteModulesRendering = 'Warmup Remote Modules Rendering';\n OperationNames.FulFillRequest = 'Ful Fill Request';\n OperationNames.ProcessReduxStore = 'Process Redux Store';\n OperationNames.PreSSRPromises = 'Pre SSR Promises';\n OperationNames.SSRRequest = 'SSR Request';\n OperationNames.Embed = 'Embed';\n OperationNames.Signin = 'Signin';\n OperationNames.Signout = 'Logout';\n OperationNames.AADCallback = 'AAD Callback Request';\n OperationNames.LeadGen = 'LeadGeneration';\n OperationNames.SaveLeadGenSettings = 'SaveLeadGenSettings';\n OperationNames.SolutionsTestDriveAcquisition = 'Solutions Test Drive Acquisition';\n OperationNames.SolutionsInstanceStatus = 'Solutions Instance Status';\n OperationNames.SolutionsInstanceAction = 'Solutions Instance Action';\n OperationNames.AmpTestDriveAcquisition = 'AmpTestDriveAcquisition';\n OperationNames.AmpSolutionsInstanceStatus = 'AmpSolutionsInstanceStatusProcessor';\n OperationNames.AmpSolutionsInstanceAction = 'AmpSolutionsInstanceAction';\n OperationNames.AutoSignin = 'Auto Signin';\n OperationNames.Acquisition = 'Acquisition';\n OperationNames.LogCreateLeadPayload = 'LogCreateLeadPayload';\n OperationNames.LogAcquisitionPayload = 'LogAcquisitionPayload';\n OperationNames.UserAgent = 'User Agent';\n OperationNames.ObtainAccessToken = 'Obtain Access Token';\n OperationNames.CreateUser = 'create User';\n OperationNames.MsalGetTokenOnBehalf = 'msal.getTokenOnBehalf';\n OperationNames.SearchApi = 'searchRestClient.callSearch';\n OperationNames.SearchApiRemovedOffers = 'searchRestClient.callSearch.removedOffers';\n OperationNames.MarkoApi = 'searchRestClient.callMarkoSearch';\n OperationNames.CombinedSearch = 'searchRestClient.callSearchWithMarko';\n OperationNames.GetRefreshTokenFromCache = 'GetRefreshTokenFromCache';\n })(Constants.OperationNames || (Constants.OperationNames = {}));\n (function(CacheStatus) {\n CacheStatus[\"Healthy\"] = \"Healthy\";\n CacheStatus[\"Unhealthy\"] = \"Unhealthy\";\n })(Constants.CacheStatus || (Constants.CacheStatus = {}));\n (function(BrowserConfigs) {\n BrowserConfigs[\"appsource\"] = \"appsource\";\n BrowserConfigs[\"azureMarketPlace\"] = \"azureMarketPlace\";\n BrowserConfigs[\"embed\"] = \"embed\";\n })(Constants.BrowserConfigs || (Constants.BrowserConfigs = {}));\n (function(ClientNames) {\n ClientNames[\"AppSource\"] = \"AppSource\";\n ClientNames[\"AMP\"] = \"AMP\";\n ClientNames[\"Embedded\"] = \"Embedded\";\n ClientNames[\"Default\"] = \"\";\n })(Constants.ClientNames || (Constants.ClientNames = {}));\n (function(AppConfig) {\n AppConfig[\"correlationId\"] = \"correlationId\";\n })(Constants.AppConfig || (Constants.AppConfig = {}));\n Constants.browserConfigsToClientNames = {\n [\"appsource\"]: \"AppSource\",\n [\"azureMarketPlace\"]: \"AMP\",\n [\"embed\"]: \"Embedded\"\n };\n (function(HttpMessage) {\n HttpMessage.InvalidQueryParams = 'Invalid query parameters';\n HttpMessage.OneOrMoreErrors = 'One or more errors occured';\n HttpMessage.Forbidden = 'Forbidden';\n HttpMessage.NotFound = 'Not Found';\n HttpMessage.InternalServerError = 'Internal Server Error';\n HttpMessage.BadRequest = 'BadRequest';\n HttpMessage.AccessKeyExpired = 'Access key expired';\n HttpMessage.AccessKeyInvalid = 'Invalid access key, invalid cipher: Message integrity check failed';\n })(Constants.HttpMessage || (Constants.HttpMessage = {}));\n (function(ControllerOperations) {\n ControllerOperations.ValidateQueryParams = 'Validation of query parameters';\n ControllerOperations.ValidatePayload = 'Validation of payload';\n ControllerOperations.GenerateLead = 'Generation of lead';\n ControllerOperations.SaveLeadSettings = 'Saving lead settings';\n ControllerOperations.AuthoriseRequest = 'Authorization of request';\n })(Constants.ControllerOperations || (Constants.ControllerOperations = {}));\n (function(QueryStrings) {\n QueryStrings.isConverged = 'isConverged';\n QueryStrings.includeStopSoldPlans = 'includeStopSoldPlans';\n QueryStrings.CorrelationId = 'correlationId';\n QueryStrings.Referer = 'referer';\n QueryStrings.ApplicationId = 'appId';\n QueryStrings.PartnerId = 'partnerId';\n QueryStrings.Product = 'product';\n QueryStrings.PlanId = 'planId';\n QueryStrings.DemoId = 'demoId';\n QueryStrings.LabId = 'labId';\n QueryStrings.PublisherId = 'publisherId';\n QueryStrings.DemoSessionId = 'demoSessionId';\n QueryStrings.UrlQuery = 'urlQuery';\n QueryStrings.flightCodes = 'flightCodes';\n QueryStrings.flightCode = 'flightCode';\n QueryStrings.locale = 'locale';\n QueryStrings.tab = 'tab';\n QueryStrings.region = 'region';\n QueryStrings.billingRegion = 'billingregion';\n QueryStrings.entityType = 'entityType';\n QueryStrings.modalAppId = 'modalAppId';\n QueryStrings.modalECAId = 'modalECAId';\n QueryStrings.signInModalType = 'signInModalType';\n QueryStrings.productId = 'productId';\n QueryStrings.modalServiceId = 'modalServiceId';\n QueryStrings.modalReviewId = 'modalReviewId';\n QueryStrings.modalReviewAppId = 'modalReviewAppId';\n QueryStrings.modalReviewTitle = 'modalReviewTitle';\n QueryStrings.country = 'country';\n QueryStrings.ctaType = 'ctaType';\n QueryStrings.ete = 'ete';\n QueryStrings.apiVersion = 'api-version';\n QueryStrings.version = 'version';\n QueryStrings.showAllApps = 'showAllApps';\n QueryStrings.applicationType = 'applicationType';\n QueryStrings.modalRatingId = 'modalRatingId';\n QueryStrings.extraData = 'extraData';\n QueryStrings.embedHost = 'embedHost';\n QueryStrings.includeTestProducts = 'includeTestProducts';\n QueryStrings.isEmbedded = 'isEmbedded';\n QueryStrings.search = 'search';\n QueryStrings.industry = 'industry';\n QueryStrings.serviceType = 'serviceType';\n QueryStrings.category = 'category';\n QueryStrings.product = 'product';\n QueryStrings.page = 'page';\n QueryStrings.certification = 'certification';\n QueryStrings.UseSecondarySearch = 'UseSecondarySearch';\n QueryStrings.market = 'market';\n QueryStrings.productsFlow = 'productsFlow';\n QueryStrings.ExcludePublic = 'excludePublic';\n QueryStrings.hideKeys = 'HideKeys';\n QueryStrings.searchLocale = 'searchLocale';\n QueryStrings.searchQuery = 'searchQuery';\n QueryStrings.filter = '$filter';\n QueryStrings.skiptoken = '$skiptoken';\n QueryStrings.storefront = 'storefront';\n QueryStrings.HideKeys = 'HideKeys[]';\n QueryStrings.includePrivateOffers = 'includePrivateOffers';\n QueryStrings.expand = '$expand';\n (function(Auth) {\n Auth.HOST_NAME = 'hostName';\n Auth.LOGIN_TYPE = 'loginType';\n Auth.MSAL_USER_HOME_ID = 'msalUserHomeId';\n Auth.FROM = 'from';\n Auth.REFRESH_TOKEN = 'refreshToken';\n })(QueryStrings.Auth || (QueryStrings.Auth = {}));\n })(Constants.QueryStrings || (Constants.QueryStrings = {}));\n (function(Curated) {\n Curated.top = 'top';\n Curated.everything = 'everything';\n Curated.office365 = 'Office365';\n Curated.dynamics365 = 'Dynamics 365';\n Curated.powerPlatform = 'PowerPlatform';\n Curated.powerBi = 'Power BI';\n })(Constants.Curated || (Constants.Curated = {}));\n (function(AppActionTypes) {\n AppActionTypes.GET = 'GET';\n AppActionTypes.CREATE = 'CREATE';\n AppActionTypes.FREE = 'FREE';\n AppActionTypes.TRIAL = 'TRIAL';\n AppActionTypes.REQUESTFORTRIAL = 'REQUESTFORTRIAL';\n })(Constants.AppActionTypes || (Constants.AppActionTypes = {}));\n (function(ActionStrings) {\n ActionStrings.Get = 'CTA_Get';\n ActionStrings.Try = 'CTA_Try';\n ActionStrings.RequestTrial = 'CTA_ContactMe';\n ActionStrings.Contact = 'Contact';\n ActionStrings.TestDrive = 'CTA_TestDrive';\n ActionStrings.Service = 'Inquire';\n ActionStrings.Purchase = 'CTA_Get';\n ActionStrings.Select = 'Select';\n ActionStrings.Add = 'CTA_Add';\n ActionStrings.BuyLicense = 'CTA_BuyLicense';\n ActionStrings.Install = 'CTA_Install';\n })(Constants.ActionStrings || (Constants.ActionStrings = {}));\n (function(NpsActions) {\n NpsActions[\"pdpViewsCount\"] = \"pdpViewsCount\";\n NpsActions[\"searchActionsCount\"] = \"pdpViewsCount\";\n NpsActions[\"filterActionsCount\"] = \"filterActionsCount\";\n NpsActions[\"galleryChangesCount\"] = \"galleryChangesCount\";\n NpsActions[\"categoryChangesCount\"] = \"categoryChangesCount\";\n NpsActions[\"paginationActionsCount\"] = \"paginationActionsCount\";\n NpsActions[\"seeAllActionsCount\"] = \"seeAllActionsCount\";\n })(Constants.NpsActions || (Constants.NpsActions = {}));\n (function(BadgeType) {\n BadgeType[\"OfficeAwards\"] = \"OfficeAwards\";\n BadgeType[\"SolutionMap\"] = \"SolutionMap\";\n BadgeType[\"PBICertified\"] = \"PBICertified\";\n BadgeType[\"FreeTrial\"] = \"FreeTrial\";\n BadgeType[\"AzureExpertsMSP\"] = \"AzureExpertsMSP\";\n BadgeType[\"MicrosoftCertified\"] = \"MicrosoftCertified\";\n BadgeType[\"SelfAttested\"] = \"SelfAttested\";\n BadgeType[\"PrivateOffer\"] = \"PrivateOffer\";\n BadgeType[\"IntegratedSolution\"] = \"IntegratedSolution\";\n BadgeType[\"AzureBenefitEligible\"] = \"AzureBenefitEligible\";\n BadgeType[\"CertifiedSoftware\"] = \"CertifiedSoftware\";\n BadgeType[\"PreferredSolution\"] = \"PreferredSolution\";\n BadgeType[\"Microsoft365AppAward\"] = \"Microsoft365AppAward\";\n })(Constants.BadgeType || (Constants.BadgeType = {}));\n (function(ButtonType) {\n ButtonType[\"Link\"] = \"link\";\n ButtonType[\"Label\"] = \"label\";\n })(Constants.ButtonType || (Constants.ButtonType = {}));\n (function(CTAType) {\n CTAType[CTAType[\"Get\"] = 1] = \"Get\";\n CTAType[CTAType[\"Try\"] = 2] = \"Try\";\n CTAType[CTAType[\"RequestTrial\"] = 3] = \"RequestTrial\";\n CTAType[CTAType[\"Contact\"] = 4] = \"Contact\";\n CTAType[CTAType[\"TestDrive\"] = 5] = \"TestDrive\";\n CTAType[CTAType[\"Service\"] = 6] = \"Service\";\n CTAType[CTAType[\"Purchase\"] = 7] = \"Purchase\";\n CTAType[CTAType[\"Select\"] = 8] = \"Select\";\n CTAType[CTAType[\"AlreadyPurchased\"] = 9] = \"AlreadyPurchased\";\n CTAType[CTAType[\"Partner\"] = 10] = \"Partner\";\n CTAType[CTAType[\"DownloadSample\"] = 11] = \"DownloadSample\";\n CTAType[CTAType[\"Add\"] = 12] = \"Add\";\n CTAType[CTAType[\"BuyLicense\"] = 13] = \"BuyLicense\";\n CTAType[CTAType[\"Install\"] = 14] = \"Install\";\n })(Constants.CTAType || (Constants.CTAType = {}));\n (function(CertificationType) {\n CertificationType[\"Undefined\"] = \"Undefined\";\n CertificationType[\"None\"] = \"None\";\n CertificationType[\"SelfAttested\"] = \"SelfAttested\";\n CertificationType[\"MicrosoftCertified\"] = \"MicrosoftCertified\";\n })(Constants.CertificationType || (Constants.CertificationType = {}));\n (function(currentView) {\n currentView[\"AppDetails\"] = \"appDetails\";\n currentView[\"AppGallery\"] = \"curated appGallery\";\n currentView[\"SearchAppGallery\"] = \"search filtered appGallery\";\n })(Constants.currentView || (Constants.currentView = {}));\n (function(SignInType) {\n SignInType[SignInType[\"OldSignInModal\"] = 0] = \"OldSignInModal\";\n SignInType[SignInType[\"SignInWith_MSA_AAD\"] = 1] = \"SignInWith_MSA_AAD\";\n SignInType[SignInType[\"SignInWith_AAD\"] = 2] = \"SignInWith_AAD\";\n SignInType[SignInType[\"SignInWith_MSA\"] = 3] = \"SignInWith_MSA\";\n SignInType[SignInType[\"SwitchTo_AAD\"] = 4] = \"SwitchTo_AAD\";\n SignInType[SignInType[\"SwitchTo_MSA\"] = 5] = \"SwitchTo_MSA\";\n SignInType[SignInType[\"Authorized\"] = 6] = \"Authorized\";\n })(Constants.SignInType || (Constants.SignInType = {}));\n (function(SignInRedirect) {\n SignInRedirect.App = 'app';\n SignInRedirect.Service = 'service';\n SignInRedirect.ECA = 'eca';\n SignInRedirect.Review = 'review';\n SignInRedirect.Report = 'reportAbuse';\n SignInRedirect.Checkout = 'checkout';\n })(Constants.SignInRedirect || (Constants.SignInRedirect = {}));\n (function(ActionCodes) {\n ActionCodes.RequestTrial = 'PLT';\n ActionCodes.TryGet = 'INS';\n ActionCodes.Contact = 'CTT';\n ActionCodes.CrossListingContact = 'DNC';\n ActionCodes.TestDrive = 'StartTestDrive';\n ActionCodes.ConsultingServices = 'CSC';\n })(Constants.ActionCodes || (Constants.ActionCodes = {}));\n Constants.TestDriveOfferIdVersion = '0.1';\n (function(ModalType) {\n ModalType[ModalType[\"NoModalShow\"] = 0] = \"NoModalShow\";\n ModalType[ModalType[\"SignIn\"] = 1] = \"SignIn\";\n ModalType[ModalType[\"SignOut\"] = 2] = \"SignOut\";\n ModalType[ModalType[\"CTA\"] = 3] = \"CTA\";\n ModalType[ModalType[\"Contact\"] = 4] = \"Contact\";\n ModalType[ModalType[\"Image\"] = 5] = \"Image\";\n ModalType[ModalType[\"Video\"] = 6] = \"Video\";\n ModalType[ModalType[\"MediaModal\"] = 7] = \"MediaModal\";\n ModalType[ModalType[\"NPS\"] = 8] = \"NPS\";\n ModalType[ModalType[\"Rating\"] = 9] = \"Rating\";\n ModalType[ModalType[\"Error\"] = 10] = \"Error\";\n ModalType[ModalType[\"Drive\"] = 11] = \"Drive\";\n ModalType[ModalType[\"Iframe\"] = 12] = \"Iframe\";\n ModalType[ModalType[\"Disclaimer\"] = 13] = \"Disclaimer\";\n ModalType[ModalType[\"Animation\"] = 14] = \"Animation\";\n ModalType[ModalType[\"ReportAbuse\"] = 15] = \"ReportAbuse\";\n ModalType[ModalType[\"Instructions\"] = 16] = \"Instructions\";\n ModalType[ModalType[\"DownloadSample\"] = 17] = \"DownloadSample\";\n ModalType[ModalType[\"ReviewComment\"] = 18] = \"ReviewComment\";\n ModalType[ModalType[\"ReviewMarkAsHelpful\"] = 19] = \"ReviewMarkAsHelpful\";\n })(Constants.ModalType || (Constants.ModalType = {}));\n (function(dynamicsLicense) {\n dynamicsLicense.dynamics365License = 'Dynamics 365';\n dynamicsLicense.dynamics365FinancialLicense = 'Dynamics 365 for Financials';\n dynamicsLicense.noLicense = 'No License';\n dynamicsLicense.currentD365LicenseNumber = 2;\n })(Constants.dynamicsLicense || (Constants.dynamicsLicense = {}));\n Constants.adminPortal = 'admin-portal';\n Constants.adminPortalBackendKey = 'Admin Portal';\n Constants.officeBackendKey = 'Office 365';\n Constants.officeFlatBackendKey = 'Office365';\n (function(dynamics365) {\n dynamics365.dynamics365 = 'dynamics-365';\n dynamics365.operationsED = 'dynamics-365-for-operations';\n dynamics365.financeED = 'dynamics-365-for-finance-and-operations';\n dynamics365.salesED = 'dynamics-365-for-sales';\n dynamics365.fieldServicesED = 'dynamics-365-for-field-services';\n dynamics365.serviceAutomationED = 'dynamics-365-for-project-service-automation';\n dynamics365.customerServiceED = 'dynamics-365-for-customer-services';\n dynamics365.customerInsightsED = 'dynamics-365-customer-insights';\n dynamics365.financeAndOperationsBD = 'dynamics-365-business-central';\n dynamics365.marketingED = 'dynamics-365-marketing';\n dynamics365.commerceED = 'dynamics-365-commerce';\n dynamics365.supplyChainManagementED = 'dynamics-365-supply-chain-management';\n })(Constants.dynamics365 || (Constants.dynamics365 = {}));\n (function(PowerBI) {\n PowerBI.powerBi = 'power-bi';\n PowerBI.visuals = 'power-bi-visuals';\n })(Constants.PowerBI || (Constants.PowerBI = {}));\n (function(InternetOfThings) {\n InternetOfThings.urlKey = 'internet-of-things';\n })(Constants.InternetOfThings || (Constants.InternetOfThings = {}));\n (function(filterTileTypes) {\n filterTileTypes[\"search\"] = \"search\";\n filterTileTypes[\"product\"] = \"product\";\n filterTileTypes[\"industry\"] = \"industry\";\n filterTileTypes[\"category\"] = \"category\";\n filterTileTypes[\"serviceType\"] = \"serviceType\";\n })(Constants.filterTileTypes || (Constants.filterTileTypes = {}));\n (function(filterMaps) {\n filterMaps[\"products\"] = \"products\";\n filterMaps[\"industries\"] = \"industries\";\n filterMaps[\"categories\"] = \"categories\";\n filterMaps[\"serviceTypes\"] = \"serviceTypes\";\n })(Constants.filterMaps || (Constants.filterMaps = {}));\n (function(embedMessage) {\n embedMessage.refreshToken = 'refreshToken';\n embedMessage.loadMarketplaceV2 = 'loadMarketplaceV2';\n embedMessage.loadMarketplace = 'loadMarketplace';\n embedMessage.renewToken = 'renewToken';\n })(Constants.embedMessage || (Constants.embedMessage = {}));\n (function(Avert) {\n Avert.ReportAbuseCategories = [\n {\n locKey: 'ReportModal_None_Label',\n dropDownValue: 'None',\n avertIdentifier: 'None'\n },\n {\n locKey: 'ReportModal_OffensiveContent_Label',\n dropDownValue: 'OffensiveContent',\n avertIdentifier: 'OffensiveContent'\n },\n {\n locKey: 'ReportModal_SpamAndAdvertising_Label',\n dropDownValue: 'SpamAndAdvertising',\n avertIdentifier: 'Other'\n },\n {\n locKey: 'ReportModal_InvalidReview_Label',\n dropDownValue: 'InvalidReview',\n avertIdentifier: 'InvalidReview'\n },\n {\n locKey: 'ReportModal_Other_Label',\n dropDownValue: 'Other',\n avertIdentifier: 'Other'\n }\n ];\n })(Constants.Avert || (Constants.Avert = {}));\n (function(TeachingBubblePurchaseConfirmation) {\n TeachingBubblePurchaseConfirmation.AdminCenterLinkId = 'adminCenter';\n TeachingBubblePurchaseConfirmation.AdminCenterLinkName = 'Admin center link teaching bubble';\n TeachingBubblePurchaseConfirmation.AdminCenterYourProductsLinkId = 'adminCenterYourProducts';\n TeachingBubblePurchaseConfirmation.AdminCenterYourProductsLinkName = 'Admin center your products link teaching bubble';\n TeachingBubblePurchaseConfirmation.AdminCenterLicensesLinkId = 'adminCenterLicenses';\n TeachingBubblePurchaseConfirmation.AdminCenterLicensesLinkName = 'Admin center licenses link teaching bubble';\n })(Constants.TeachingBubblePurchaseConfirmation || (Constants.TeachingBubblePurchaseConfirmation = {}));\n (function(RequestsMethods) {\n RequestsMethods[\"GET\"] = \"GET\";\n RequestsMethods[\"POST\"] = \"POST\";\n RequestsMethods[\"PUT\"] = \"PUT\";\n RequestsMethods[\"PATCH\"] = \"PATCH\";\n RequestsMethods[\"DELETE\"] = \"DELETE\";\n RequestsMethods[\"OPTIONS\"] = \"OPTIONS\";\n RequestsMethods[\"HEAD\"] = \"HEAD\";\n })(Constants.RequestsMethods || (Constants.RequestsMethods = {}));\n (function(SearchSources) {\n SearchSources[\"Search\"] = \"Search\";\n SearchSources[\"Marko\"] = \"Marko\";\n SearchSources[\"SearchApi\"] = \"SearchApi\";\n })(Constants.SearchSources || (Constants.SearchSources = {}));\n (function(LeadCategory) {\n LeadCategory[\"Public\"] = \"public\";\n LeadCategory[\"Private\"] = \"private\";\n })(Constants.LeadCategory || (Constants.LeadCategory = {}));\n Constants.LeadSource = {\n SPZA: 'SPZA',\n D365BusinessCentral: 'D365BusinessCentral',\n D365Sales: 'D365Sales',\n Office: 'Office',\n PowerBI: 'PowerBI'\n };\n Constants.LeadSubSource = {\n InClient: 'InClient',\n Admin: 'Admin',\n Web: 'Web'\n };\n (function(Telemetry) {\n (function(Action) {\n Action.EmbedMessaging = 'Embed Messaging';\n Action.Country = 'Country';\n Action.Click = 'Click';\n Action.Skip = 'Skip';\n Action.VariantAssignment = 'VariantAssignment';\n Action.Search = 'Search';\n Action.MarkoSearchTestTraffic = 'Marko Search Test Traffic';\n Action.NewSearchApi = 'New Search Api';\n Action.ACS = 'ACS';\n Action.SortingSearch = 'SortingSearch';\n Action.Landing = 'Landing';\n Action.PageLoad = 'Page Load';\n Action.openInNewWindow = 'Open In New Window';\n Action.PerfResources = 'Perf resources';\n Action.EmbedMessageListener = 'Embed Message Listener';\n Action.NetworkCall = 'Network Call';\n Action.FilterClick = 'Filter Click';\n Action.FilterExpand = 'Filter Expand';\n Action.FilterChange = 'Filter Change';\n Action.FilterSearchChange = 'Filter Search Change';\n Action.NotifyResult = 'Notify Result';\n Action.ImageLoad = 'Image Load';\n Action.RefreshToken = 'Refresh Token';\n Action.ErrorModal = 'Error Modal';\n Action.MyOrgApps = 'My Org Apps';\n Action.PublishAcquisitionInfo = 'Publish AcquisitionInfo';\n Action.Check = 'Check';\n Action.Uncheck = 'Uncheck';\n Action.CreateUserFromToken = 'createUserFromToken';\n Action.SpzaUserId = 'spzaUserId';\n Action.GoogleId = 'googleClientId';\n Action.UserSettings = 'User Settings';\n Action.UserTenantInfo = 'User Tenant Info';\n Action.PerfEvents = 'Perf Telemetry Events';\n Action.NPS = 'NPS';\n Action.Feedback = 'Feedback';\n Action.FieldHub = 'FieldHub';\n Action.CrossListingInfo = 'Cross Listing Info';\n Action.EnableFeature = 'EnableFeature';\n Action.ClientLocation = 'ClientLocation';\n Action.Open = 'Open';\n Action.Close = 'Close';\n Action.Cancel = 'Cancel';\n Action.Expand = 'Expand';\n Action.Collapse = 'Collapse';\n Action.ReadAccess = 'Read Access';\n Action.WriteAccess = 'Write Access';\n Action.Copy = 'Copy';\n Action.Upsert = 'Upsert';\n Action.Delete = 'Delete';\n Action.Redirecting = 'Redirecting';\n Action.Submitting = 'Submitting';\n Action.Submitted = 'Submitted';\n Action.TileData = 'Tile Data';\n Action.MarkoSearch = 'Marko Search';\n Action.SearchCombinedResults = 'search combined results';\n Action.Error = 'Error';\n Action.SubmitError = 'Submit Error';\n Action.SessionError = 'Session Error';\n Action.LocalStorage = 'LocalStorage';\n Action.Hover = 'Hover';\n Action.ConsentBanner = 'ConsentBanner';\n Action.RouteChanged = 'Route Changed';\n Action.GetTenantType = 'Get Tenant Type';\n Action.GetTenantDetails = 'Get Tenant Details';\n Action.GetUserTenantInfo = \"Get user's tenant info\";\n Action.GetProduct = 'Get product';\n Action.GetPreviewProduct = 'GetPreviewProduct';\n Action.GetAppSuggestedItems = 'Get Suggested App Items';\n Action.GetAppRecommendedItems = 'Get Recommended App Items';\n Action.GetServiceRecommendedItems = 'Get Recommended Service Items';\n Action.GetPrivateOffers = 'Get Private Offers API';\n Action.GetPrivateOffer = 'Get Private Offer by ID API';\n Action.GetServiceSuggestedItems = 'Get Suggested Service Items';\n Action.EnsureAppDetailsData = 'Ensure App Details Data';\n Action.EnsureAppReviewsData = 'Ensure App Reviews Data';\n Action.EnsureServiceDetailsData = 'Ensure Service Details Data';\n Action.DeleteUserFavourite = 'Delete User Favourite';\n Action.UpsertUserFavourite = 'Upsert User Favourite';\n Action.FetchUserFavourites = 'Fetch User Favourites';\n Action.InputValidations = 'Inputs validations';\n Action.PartnerMessageListener = 'Partners Message Listener';\n Action.PartnerMessageSender = 'Partners Message Sender';\n Action.getUserBillingAccounts = 'get User BillingAccounts';\n Action.getUserProfile = 'get User Profile';\n Action.AssignFlight = 'Assign Flight';\n Action.OldCheckout = 'OldCheckout';\n Action.PlaceOrder = 'Place order';\n Action.Checkout = 'Checkout';\n Action.Purchase = 'Purchase';\n Action.PreWarm = 'PreWarm';\n Action.PreWarmAJAX = 'PreWarmAJAX';\n Action.TrailData = 'Trail Data';\n Action.RootHandler = 'Root Handler';\n Action.LongTermSaaS = 'LongTermSaaS';\n Action.PerfTiming = 'Perf timing';\n Action.PerfRedirect = 'Perf redirect';\n Action.PerfFetchStart = 'Perf fetch start';\n Action.PerfRequestStart = 'Perf request start';\n Action.PerfResponseStart = 'Perf response start';\n Action.PerfResponseEnd = 'Perf response end';\n Action.PerfDOMLoading = 'Perf DOM loading';\n Action.PerfDOMInteractive = 'Perf DOM interactive';\n Action.PerfDOMContentLoaded = 'Perf DOM content loaded';\n Action.Logout = 'Logout';\n Action.Login = 'Login';\n Action.LoginIframe = 'Login Iframe';\n Action.CVA = 'CVA';\n Action.TeachingBubble = 'Teaching bubble';\n Action.EmbedBuyLicenseClick = 'Embed Buy License Click';\n Action.EmbedInstallClick = 'Embed Install Click';\n Action.RemoteStatus = 'RemoteStatus';\n Action.SendLead = 'SendLead';\n Action.SendLeadInfo = 'SendLeadInfo';\n Action.GetLeadActionCode = 'GetLeadActionCode';\n Action.ProcessLeadInfo = 'ProcessLeadInfo';\n Action.GetCustomers = 'getCustomers';\n })(Telemetry.Action || (Telemetry.Action = {}));\n (function(ActionModifier) {\n ActionModifier.ReceiveMessage = 'Receive Message';\n ActionModifier.CloseAuth = 'close_auth';\n ActionModifier.PaymentLoaded = 'Payment Loaded';\n ActionModifier.SaasLinkTooltip = 'saaslinking tooltip';\n ActionModifier.SaaSLinkingTile = 'saaslinking tile';\n ActionModifier.RedirectButton = 'RedirectButton';\n ActionModifier.RedirectModal = 'RedirectModal';\n ActionModifier.FlagClicked = 'Country clicked';\n ActionModifier.FooterLocale = 'Footer locale';\n ActionModifier.CountryModal = 'Country modal';\n ActionModifier.SearchV1End = 'SearchV1End';\n ActionModifier.UserType = 'User Type';\n ActionModifier.AdminCenter = 'Admin Center';\n ActionModifier.AdminCenterYourProducts = 'Admin Center Your Products';\n ActionModifier.AdminCenterLicenses = 'Admin Center Licenses';\n ActionModifier.Start = 'Start';\n ActionModifier.InProgress = 'InProgress';\n ActionModifier.End = 'End';\n ActionModifier.Abandon = 'Abandon';\n ActionModifier.Skip = 'Skip';\n ActionModifier.StartBack = 'StartBack';\n ActionModifier.Error = 'Error';\n ActionModifier.Info = 'Info';\n ActionModifier.RRSubmit = 'R&R';\n ActionModifier.RRDelete = 'R&R Delete';\n ActionModifier.Link = 'Link';\n ActionModifier.Tab = 'Tab';\n ActionModifier.Debug = 'Debug';\n ActionModifier.Exception = 'Exception';\n ActionModifier.Warning = 'Warning';\n ActionModifier.Declined = 'Declined';\n ActionModifier.ConsentModal = 'Consent Modal Dialog';\n ActionModifier.LoginModal = 'Login Modal';\n ActionModifier.MyOrders = 'My Orders';\n ActionModifier.Signup = 'Signup';\n ActionModifier.ChangeCheckoutView = 'Change checkout view';\n ActionModifier.CrossListingContact = 'Cross Listing Contact';\n ActionModifier.SubmitLeadGen = 'Submit Lead Gen';\n ActionModifier.AppSearchSuggestions = 'App Search Suggestions';\n ActionModifier.ServiceSearchSuggestions = 'Consulting Service Search Suggestions';\n ActionModifier.ECASearchSuggestions = 'ECA Offer Search Suggestions';\n ActionModifier.AppSearchForAll = 'App Search For All';\n ActionModifier.ServicesSearchForAll = 'Consulting Services Search For All';\n ActionModifier.CloudsIndustrySearchForAll = 'Industry Clouds Search For All';\n ActionModifier.ParnerSearchAll = 'Partners Search For All';\n ActionModifier.ECASearchForAll = 'ECA Offers Search For All';\n ActionModifier.SearchReturned = 'Search Returned From Server';\n ActionModifier.TrailIdUpdate = 'TrailId update';\n ActionModifier.TrailIdValid = 'TrailId valid';\n ActionModifier.HeaderFromUrl = 'HeaderFromUrl';\n ActionModifier.HeaderFromCookie = 'HeaderFromCookie';\n ActionModifier.SpzaUserIdNew = 'New User';\n ActionModifier.SpzaUserIdReturn = 'Returning User';\n ActionModifier.Tile = 'Tile';\n ActionModifier.CookieData = 'CookieData';\n ActionModifier.BillingCountry = 'Billing Country';\n ActionModifier.ChooseSKU = 'Choose SKU';\n ActionModifier.OfferUnavailableInRegion = 'Offer Unavailable in Region';\n ActionModifier.DownloadCSV = 'Download CSV';\n ActionModifier.DownloadPBIVisual = 'Download Power BI Visual';\n ActionModifier.DownloadPBIVisualSample = 'Download Power BI Visual Sample';\n ActionModifier.VMFilter = 'VM Filter';\n ActionModifier.TestDrive = 'Test Drive';\n ActionModifier.AzureTestDrive = 'Azure Test Drive';\n ActionModifier.NavigatingToTestDrive = 'Navigating to test drive';\n ActionModifier.TestDriveDismissed = 'Test Drive Dismissed';\n ActionModifier.FilterClear = 'Filter Clear';\n ActionModifier.FilterPane = 'Filter Pane';\n ActionModifier.FilterTag = 'Filter Tag';\n ActionModifier.Feedback = 'feedback';\n ActionModifier.FeedbackModal = 'feedbackModal';\n ActionModifier.ShowingResultsForFeedback = 'ShowingResultsFor feedback';\n ActionModifier.Breadcrumb = 'Breadcrumb';\n ActionModifier.Results = 'Results';\n ActionModifier.FirstPartyAppPromotion = 'First Party App Promotion';\n ActionModifier.CTAInfo = 'CTA Info';\n ActionModifier.ResetFilters = 'Reset Filters';\n ActionModifier.GoogleInfo = 'Google Info';\n ActionModifier.SearchApiSuggestions = 'SearchApi Suggestions';\n ActionModifier.SearchApiSuggestionsError = 'SearchApi Suggestions Error';\n ActionModifier.Suggestions = 'Suggestions';\n ActionModifier.MailToCTA = 'CTA MailTo';\n ActionModifier.ContentDrawer = 'Content Drawer';\n ActionModifier.ReportCTA = 'Report CTA';\n ActionModifier.ReportModal = 'Report Modal';\n ActionModifier.D365License = 'Dynamic license dispute';\n ActionModifier.EmbedD365InstallButton = 'Dynamic Install Button';\n ActionModifier.EmbedBAGBuyLicenseButton = 'BAG Offer Buy License Button';\n ActionModifier.UserProfileEdit = 'User profile edit';\n ActionModifier.LeadCampaignGeneration = 'Lead Campaign Generate';\n ActionModifier.CTACheckBox = 'CTA Dialog Checkbox';\n ActionModifier.AppDetailCTAButton = 'App Detail Page CTA Button';\n ActionModifier.AppDetailCTAButtonFromTable = 'App Detail Page CTA Button From Table';\n ActionModifier.ECADetailCTAButton = 'ECA Detail Page CTA Button';\n ActionModifier.AppDynamicCampaignCTAButton = 'Dynamic Campaign CTA Button';\n ActionModifier.AppTileCTAButton = 'App Tile CTA Button';\n ActionModifier.ServiceDetailCTAButton = 'Service Detail Page CTA Button';\n ActionModifier.ServiceTileCTAButton = 'Service Tile CTA Button';\n ActionModifier.PartnerCTAButton = 'Partner CTA Button';\n ActionModifier.ReviewItemMoreButton = 'Review Item More Button';\n ActionModifier.ReviewPageNavigationButton = 'Review Page Navigation Button';\n ActionModifier.ReviewsGetMarkedAsHelpful = 'Reviews Get Marked As Helpful';\n ActionModifier.ReviewSetMarkedAsHelpful = 'Review Set Marked As Helpful';\n ActionModifier.ReviewItemMarkAsHelpfulUnauthorizedMessage = 'Review Item Mark As Helpful Unauthorized Message';\n ActionModifier.ReviewItemMarkAsHelpfulButton = 'Review Item Mark As Helpful Button';\n ActionModifier.ReviewItemMarkAsHelpfulSignIn = 'Review Item Mark As Helpful SignIn';\n ActionModifier.ReviewItemMarkAsHelpfulDialog = 'Review Item Mark As Helpful Dialog';\n ActionModifier.ReviewItemCommentsToggleButton = 'Review Item Comments Toggle Button';\n ActionModifier.ReviewItemCommentsSeeMore = 'Review Item Comments See More';\n ActionModifier.ReviewItemCommentsSignIn = 'Review Item Comments Sign In';\n ActionModifier.ReviewItemCommentsSeeLess = 'Review Item Comments See Less';\n ActionModifier.ReviewItemCommentDialog = 'Review Item Comment Dialog';\n ActionModifier.ReviewItemCommentDialogUpdate = 'Review Item Comment Dialog Update';\n ActionModifier.ReviewItemCommentDialogDelete = 'Review Item Comment Dialog Delete';\n ActionModifier.ReviewItemCommentCreationSubmit = 'Review Item Comment Creation Submit';\n ActionModifier.ReviewItemCommentEditButton = 'Review Item Comment Edit Button';\n ActionModifier.ReviewItemCommentDeleteButton = 'Review Item Comment Delete Button';\n ActionModifier.ReviewItemCommentedReviewIds = 'Review Item Commented Review Ids';\n ActionModifier.ReportReview = 'Report review';\n ActionModifier.LocalStorageItem = 'Local Storage Item';\n ActionModifier.SessionStorageItem = 'Session Storage Item';\n ActionModifier.CookieItem = 'Cookie Item';\n ActionModifier.BrowserStorageCookieDataBuffer = 'Browser Storage Cookie Data Buffer';\n ActionModifier.BrowserStorageLocalStorageDataBuffer = 'Browser Storage Local Storage Data Buffer';\n ActionModifier.AssignLicensesButton = 'Assign Licenses Button';\n ActionModifier.UserFavouriteNavigationBarButton = 'User Favourite Navigation Bar Button';\n ActionModifier.UserFavouriteTileDetailButton = 'User Favourite Tile Detail Button';\n ActionModifier.UserFavouriteTileButton = 'User Favourite Tile Button';\n ActionModifier.UserFavouriteDetailPage = 'User Favourite Detail Page';\n ActionModifier.OpenRatingModalFromReviewTab = 'Open Rating Modal From Review Tab';\n ActionModifier.HeaderTextItem = 'Header Text Item';\n ActionModifier.Purchase = 'Purchase';\n ActionModifier.CompletePurchase = 'CompletePurchase';\n ActionModifier.ToggleAdminExperience = 'ToggleAdminExperience';\n ActionModifier.PidlNoSelectionOptionsFound = 'No Selection PI Option Found';\n ActionModifier.PidlAddNewPaymentMethod = 'Add New Payment Method Button';\n ActionModifier.PidlAddPILoad = 'PIDL Load - Add Payment Method';\n ActionModifier.PidlHandlePaymentChallenge = 'PIDL Handle Payment Challenge';\n ActionModifier.ConfigureNowButton = 'Configure Now Button';\n ActionModifier.ConfigureNowLink = 'Configure Now Link';\n ActionModifier.PlanSelected = 'PlanSelected';\n ActionModifier.TermSelected = 'TermSelected';\n ActionModifier.PlaceOrderClicked = 'PlaceOrderClicked';\n ActionModifier.HandleTransactCheckout = 'Handle Transact Checkout Modal Redirect';\n ActionModifier.ScrollToTopButton = 'ScrollToTopButton';\n ActionModifier.FilterPDPReviews = 'Filter PDP Reviews';\n ActionModifier.SortPDPReviews = 'Sort PDP Reviews';\n ActionModifier.SortSearchResults = 'Sort Search Results';\n ActionModifier.SortSearchOpened = 'Sort Search Opened';\n ActionModifier.SearchWithinCurrentFilter = 'Search within current filter';\n ActionModifier.HomeApps = 'Home Apps Info';\n ActionModifier.PrivateOffers = 'private offers nav bar';\n ActionModifier.WriteReview = 'Write a review';\n ActionModifier.UpdateReview = 'Update a review';\n ActionModifier.DeleteReview = 'Delete a review';\n ActionModifier.OfficeOffersPurchase = 'Office Offers Purchase';\n ActionModifier.SitemapLinkClick = 'Sitemap Link Click';\n ActionModifier.ExternalRatingSummaryLink = 'External Rating Summary Link';\n ActionModifier.ExternalReviewLink = 'External Review Link';\n ActionModifier.ExternalLink = 'External Link';\n ActionModifier.InternalLink = 'Internal Link';\n ActionModifier.PurchaseErrorLink = 'Purchase Error Link';\n ActionModifier.CreateCustomer = 'Create customer';\n ActionModifier.NextCheckoutStep = 'Next Checkout Page';\n ActionModifier.ViewAllButton = 'View all button';\n ActionModifier.ClearFilters = 'Clear filters';\n ActionModifier.ClearSearchBoxText = 'Clear search box text';\n ActionModifier.ClearSearch = 'Clear search';\n ActionModifier.NoSearchResultsPage = 'No search results page';\n ActionModifier.NpsPreviewDismissed = 'Preview dismissed';\n ActionModifier.NpsSurveyDismissed = 'Survey dismissed';\n ActionModifier.NpsSurveySubmitted = 'Survey submitted';\n ActionModifier.NpsPresented = 'Presented';\n ActionModifier.SmileFrownFeedbackOpened = 'Opened';\n ActionModifier.SmileFrownFeedbackDismissed = 'Dismissed';\n ActionModifier.SearchApiNoResults = 'search api no results';\n ActionModifier.MarkoApiNoResults = 'marko api no results';\n ActionModifier.LongTermSaasTablePresented = 'Long Term SaaS Table Presented';\n ActionModifier.Complete = 'complete';\n ActionModifier.BillingCountrySelected = 'BillingCountrySelected';\n ActionModifier.BannerHyperLink = 'BannerHL';\n ActionModifier.BannerClick = 'BannerCL';\n ActionModifier.SSO_DETACHED_IFRAME_FROM_DOM = 'SSO iframe detached from DOM';\n ActionModifier.SSO_LOGIN_SUCCEEDED = 'SSO Login succeeded';\n ActionModifier.WINDOW_LISTENERS_INITIATED = 'Window listeners initiated';\n ActionModifier.SSR_LOGIN_STARTED = 'SSR login in process';\n ActionModifier.SSO_LOGIN_STARTED = 'SSO login started';\n ActionModifier.SSO_IFRAME_LOADED = 'SSO iframe loaded';\n ActionModifier.SSO_IFRAME_ATTACHED_TO_DOM = 'SSO iframe attached to DOM';\n ActionModifier.SSO_GET_LOGIN_URL = 'got user login url';\n ActionModifier.SSO_EXTRACT_CODE_NO_IFRAME = 'missing iframe element to extract code';\n ActionModifier.SSO_EMPTY_IFRAME_CODE = 'missing code in iframe';\n ActionModifier.SSO_LOGIN_ERROR = 'SSO login error';\n ActionModifier.SSO_LOGIN_TIMEOUT = 'SSO login timeout';\n ActionModifier.SSO_IFRAME_CODE_FOUND = 'found iframe code to extract refresh token';\n ActionModifier.SSO_FIRST_ATTEMPT = 'silent login attempt';\n ActionModifier.SSO_FALLBACK_ATTEMPT = 'explicit login attempt';\n ActionModifier.AccessTokenSilentFetchingError = 'AccessTokenSilentFetchingError';\n ActionModifier.AccessTokenSilentFetchingSuccess = 'AccessTokenSilentFetchingSuccess';\n ActionModifier.CreateAuthenticatedUserFailure = 'CreateAuthenticatedUserFailure';\n ActionModifier.CreateAuthenticatedUserSuccess = 'CreateAuthenticatedUserSuccess';\n ActionModifier.MsalInitializationSuccess = 'MsalInitializationSuccess';\n ActionModifier.MsalInitializationError = 'MsalInitializationError';\n ActionModifier.PreAuthRedirectFailed = 'PreAuthRedirectFailed';\n ActionModifier.AuthRedirectFailed = 'AuthRedirectFailed';\n ActionModifier.AuthRedirectSucceed = 'AuthRedirectSucceed';\n ActionModifier.AuthRedirectNotFromAAD = 'AuthRedirectNotFromAAD';\n ActionModifier.LogoutFailed = 'LogoutFailed';\n ActionModifier.AzureRedirect = 'AzureRedirect';\n ActionModifier.GetLinkedInProductGroup = 'get LinkedIn product group';\n ActionModifier.MenuClick = 'Menu Click';\n ActionModifier.Linkedin = 'Linkedin';\n ActionModifier.LinkedinFeedbackButton = 'Linkedin feedback button';\n ActionModifier.LinkedinLink = 'Linkedin link';\n ActionModifier.LinkedinEventLink = 'Linkedin event link';\n ActionModifier.LinkedinFeedbackSubmit = 'Linkedin feedback submit';\n ActionModifier.LinkedinFeedbackDismiss = 'Linkedin feedback dismiss';\n ActionModifier.OfflineRemote = 'Offline Remote';\n ActionModifier.OnlineRemote = 'Online Remote';\n ActionModifier.RemoveEventListener = 'Remove event listener';\n ActionModifier.HandleNewConsent = 'Handle new consent';\n ActionModifier.GetConsent = 'Get consent';\n ActionModifier.WcpConsentCallBack = 'WCP consent callback';\n ActionModifier.GetItem = 'GetItem';\n ActionModifier.SaveItem = 'SaveItem';\n ActionModifier.MigrationStateOldOnly = 'OldOnly';\n ActionModifier.MigrationStateNewOnly = 'NewOnly';\n ActionModifier.MigrationStateSideBySide = 'SideBySide';\n })(Telemetry.ActionModifier || (Telemetry.ActionModifier = {}));\n (function(LeadsDropReason) {\n LeadsDropReason.PreviewOffer = 'Preview offer.';\n LeadsDropReason.AppNotAvailableOrPrivate = 'App is not available or private.';\n LeadsDropReason.PowerBiTransact = 'Power BI Visuals leads allowed only for transact apps, with Buy Now CTA.';\n LeadsDropReason.ConsultingServices = 'Consulting services app is not part of the leads migration for now.';\n LeadsDropReason.EmbedWithoutLead = 'Embedded with offer type that defined not to generate lead.';\n LeadsDropReason.UserNotSignedIn = 'User not signed in.';\n LeadsDropReason.ItemNotAvailable = 'Item not available';\n })(Telemetry.LeadsDropReason || (Telemetry.LeadsDropReason = {}));\n (function(OutRequest) {\n OutRequest.Start = 'HttpOutboundRequest';\n OutRequest.EndWithSuccess = 'HttpOutboundRequestEndWithSuccess';\n OutRequest.EndWithClientError = 'HttpOutboundRequestEndWithClientError';\n OutRequest.EndWithServerError = 'HttpOutboundRequestEndWithServerError';\n })(Telemetry.OutRequest || (Telemetry.OutRequest = {}));\n (function(ProbeName) {\n ProbeName.LogInfo = 'logTelemetryInfo';\n ProbeName.FlushInfo = 'flushTelemetryInfo';\n ProbeName.LogAndFlushInfo = 'logAndFlushTelemetryInfo';\n })(Telemetry.ProbeName || (Telemetry.ProbeName = {}));\n (function(AreaName) {\n AreaName.FilterPane = 'Filter Pane';\n AreaName.AppDetails = 'App Details';\n AreaName.SuggestedSearch = 'Suggested Search';\n AreaName.SearchEntityDropDown = 'Search Entity Drop Down';\n AreaName.AppTile = 'App Tile';\n AreaName.ParentSaaSTile = 'Parent SaaS Tile';\n AreaName.BundleAddIn = 'Bundle Add-In';\n AreaName.ConsentModal = 'Consent Modal Dialog';\n })(Telemetry.AreaName || (Telemetry.AreaName = {}));\n (function(FeedbackName) {\n FeedbackName.Nps = 'NPS';\n })(Telemetry.FeedbackName || (Telemetry.FeedbackName = {}));\n (function(TemplateName) {\n TemplateName.SaaSBundle = 'SaaS Bundle';\n })(Telemetry.TemplateName || (Telemetry.TemplateName = {}));\n (function(Id) {\n Id.SuggestedClick = 'Suggested Click';\n Id.SearchDropDownClick = 'Search Drop Down Click';\n Id.Nps = 'NPS';\n })(Telemetry.Id || (Telemetry.Id = {}));\n (function(ContentType) {\n ContentType.LinkExpanded = 'Gallery filter link expanded';\n ContentType.LinkClicked = 'Gallery filter link clicked';\n ContentType.SaaSBundlePageView = 'SaaS Bundle Page View';\n ContentType.AddInBundlePageView = 'AddIn Bundle Page View';\n ContentType.CheckoutBundlePageView = 'SaaSBundle Checkout PageView';\n ContentType.OrderConfirmationBundlePageView = 'SaaSBundle OrderConfirmation PageView';\n ContentType.PlaceOrderSaaSBundle = 'SaaSBundle Place Order';\n ContentType.SkipConsentModal = 'SKIP_CONSENT';\n })(Telemetry.ContentType || (Telemetry.ContentType = {}));\n (function(PurchaseBlendsTelemetry) {\n PurchaseBlendsTelemetry.Bootstrapped = 'Bootstrapped';\n (function(Errors) {\n Errors.PBErrorPrefix = '[PB] Failure with status: ';\n Errors.ErrorIdPrefix = 'Error ids: ';\n })(PurchaseBlendsTelemetry.Errors || (PurchaseBlendsTelemetry.Errors = {}));\n PurchaseBlendsTelemetry.DismissedPrefix = 'Dismissed: ';\n PurchaseBlendsTelemetry.TotalTimeForPlaceOrderPrefix = 'Total time for purchase since place order: ';\n PurchaseBlendsTelemetry.PlaceOrderSuccess = '[PB] Place order success: ';\n PurchaseBlendsTelemetry.FinishedLoading = '[PB] FinishedLoading';\n PurchaseBlendsTelemetry.PageName = 'PurchaseBlends';\n PurchaseBlendsTelemetry.EditProfile = 'EditProfile';\n PurchaseBlendsTelemetry.EditProfileName = '[PB] Edit profile';\n PurchaseBlendsTelemetry.AddProfile = 'AddProfile';\n PurchaseBlendsTelemetry.AddProfileName = '[PB] Add profile';\n PurchaseBlendsTelemetry.PickBillingFrequency = 'PickBillingFrequency';\n PurchaseBlendsTelemetry.BillingFrequencyComponent = 'BillingFrequencyComponent';\n PurchaseBlendsTelemetry.PickBillingTerm = 'PickBillingTerm';\n PurchaseBlendsTelemetry.BillingTermComponent = 'BillingTermComponent';\n PurchaseBlendsTelemetry.AddPayment = 'AddPayment';\n PurchaseBlendsTelemetry.AddPaymentName = '[PB] Add payment';\n PurchaseBlendsTelemetry.AddBillingProfile = 'AddBillingProfile';\n PurchaseBlendsTelemetry.AddBillingProfileName = '[PB] Add billing profile';\n PurchaseBlendsTelemetry.EditBillingProfile = 'EditBillingProfile';\n PurchaseBlendsTelemetry.EditBillingProfileName = '[PB] Edit billing profile';\n PurchaseBlendsTelemetry.PurchaseBlendsDisclaimerComponent = 'PurchaseBlendsDisclaimerComponent';\n PurchaseBlendsTelemetry.PurchaseBlendsDisclaimerComponentName = 'Show user consent for disclaimer';\n })(Telemetry.PurchaseBlendsTelemetry || (Telemetry.PurchaseBlendsTelemetry = {}));\n })(Constants.Telemetry || (Constants.Telemetry = {}));\n (function(PurchaseBlends) {\n PurchaseBlends.NewCheckout = 'NewCheckout';\n PurchaseBlends.OldCheckout = 'OldCheckout';\n PurchaseBlends.AlreadyPurchasedKey = 'AlreadyPurchasedWithNewExperience';\n PurchaseBlends.AdminFlow = 'AdminFlow';\n PurchaseBlends.IWFlow = 'IWFlow';\n PurchaseBlends.Enrolled = 'true';\n PurchaseBlends.Excluded = 'false';\n PurchaseBlends.AlreadyPurchased = 'v';\n })(Constants.PurchaseBlends || (Constants.PurchaseBlends = {}));\n (function(RoleDefinitions) {\n RoleDefinitions.globalAdmin = '62e90394-69f5-4237-9190-012177145e10';\n RoleDefinitions.billingAdmin = 'b0f54661-2d74-4c50-afa3-1ec803f12efe';\n RoleDefinitions.rolesToCheck = [\n RoleDefinitions.globalAdmin,\n RoleDefinitions.billingAdmin\n ];\n })(Constants.RoleDefinitions || (Constants.RoleDefinitions = {}));\n (function(Flighting) {\n Flighting.OldCheckout = 'OldCheckout';\n Flighting.NewCheckout = 'NewCheckout';\n })(Constants.Flighting || (Constants.Flighting = {}));\n Constants.scrubbedHeaderValue = 'SCRUBBED';\n Constants.apiServicePrefix = 'api/v2.0';\n Constants.marketplaceApiServicePrefix = 'api';\n Constants.armSubscriptionApiVersion = '2020-01-01';\n Constants.armBillingAccountsApiVersion = '2019-10-01-preview';\n Constants.armIsMaccApiVersion = '2018-08-01-beta';\n Constants.mprpApiVersion = '2018-08-01-beta';\n Constants.appsourceApiVersion = '2017-04-24';\n Constants.dbSchemaVersion = '2017-04-24';\n Constants.userCollectionSchemaVersion = '2016-10-14';\n Constants.acquisitionCollectionSchemaVersion = '2017-04-27';\n Constants.TestDrivePath = 'JwtTokenDemoSession';\n Constants.MetadataDocType = 'Metadata';\n Constants.partitionedCollectionVersion = '2017-04-24';\n Constants.apiVersion = 'apiVersion';\n Constants.reviewsAPI = 'reviewsAPI';\n Constants.reviewsAPIVersion = 'reviewsAPIVersion';\n Constants.bundleVersion = 'bundleVersion';\n Constants.regionName = 'regionName';\n Constants.marketplaceApiVersion = 'marketplaceApiVersion';\n Constants.azureMarketplace = 'AzureMarketplace';\n Constants.appSource = 'AppSource';\n Constants.appSourceEmbed = 'AppSource_Embed';\n (function(CompetencyBadge) {\n CompetencyBadge[CompetencyBadge[\"Gold\"] = 0] = \"Gold\";\n CompetencyBadge[CompetencyBadge[\"Silver\"] = 1] = \"Silver\";\n CompetencyBadge[CompetencyBadge[\"BadgeNotFound\"] = 2] = \"BadgeNotFound\";\n })(Constants.CompetencyBadge || (Constants.CompetencyBadge = {}));\n Constants.FeaturedAppsOrder = [\n '99',\n '64',\n '128',\n '1024',\n '256',\n '1',\n '8',\n '512',\n '4',\n '32',\n '16'\n ];\n Constants.validEmbedExperienceProducts = [\n 'power-bi',\n 'power-bi-visuals',\n 'dynamics-365-business-central',\n 'dynamics-365-for-sales',\n 'dynamics-365'\n ];\n Constants.validEmbedExperienceEmbedHost = [\n 'admin-portal',\n 'dynamics-365'\n ];\n (function(TestDriveType) {\n TestDriveType.Showcase = 'Showcase';\n TestDriveType.AzureTestDriveService = 'AzureTestDriveService';\n TestDriveType.SolutionsTestDrive = 'SolutionsTestDrive';\n })(Constants.TestDriveType || (Constants.TestDriveType = {}));\n (function(TestDriveOutputType) {\n TestDriveOutputType.HandOffUrl = 'handoffurl';\n TestDriveOutputType.MetadataMarkdown = 'metadatamarkdown';\n })(Constants.TestDriveOutputType || (Constants.TestDriveOutputType = {}));\n (function(EmailCategories) {\n EmailCategories.ContactSI = 'Contact SI';\n EmailCategories.ContactSICrossListing = 'Contact SI (Cross listing)';\n EmailCategories.CorrelationIdArgKey = 'correlationId';\n EmailCategories.UserIdArgKey = 'userId';\n })(Constants.EmailCategories || (Constants.EmailCategories = {}));\n (function(ReservedCorrelationIds) {\n ReservedCorrelationIds.EmptyId = '00000000-0000-0000-0000-000000000000';\n ReservedCorrelationIds.RepoCacheRefresh = '00000000-0000-0000-0000-000000000001';\n ReservedCorrelationIds.SignInEmptyId = '00000000-0000-0000-0000-000000000002';\n ReservedCorrelationIds.ErrorId = '00000000-0000-0000-0000-111111111111';\n })(Constants.ReservedCorrelationIds || (Constants.ReservedCorrelationIds = {}));\n (function(ReservedOperationNames) {\n ReservedOperationNames.RepoCacheRefresh = 'RepoCacheRefresh';\n })(Constants.ReservedOperationNames || (Constants.ReservedOperationNames = {}));\n (function(CloudsIndustry) {\n CloudsIndustry.bitmaskPrefix = 'clouds_';\n })(Constants.CloudsIndustry || (Constants.CloudsIndustry = {}));\n (function(Endpoints) {\n (function(View) {\n View.AppPricing = '/view/appPricing';\n View.TileData = '/view/tiledata';\n View.FilteredApps = '/view/filteredapps';\n View.AppFuturePricing = '/view/appFuturePricing';\n View.CloudsIndustryDataMap = '/view/cloudsindustrydatamap';\n View.CloudsIndustryFeatured = '/view/featuredcloudsindustry';\n View.CloudsIndustryFiltered = '/view/filteredcloudsindustry';\n })(Endpoints.View || (Endpoints.View = {}));\n })(Constants.Endpoints || (Constants.Endpoints = {}));\n (function(TestDriveResponse) {\n TestDriveResponse.DemoSessionId = 'demoSessionId';\n TestDriveResponse.Status = 'status';\n TestDriveResponse.OutputItemList = 'outputItemList';\n TestDriveResponse.HandOffUrl = 'HandOffUrl';\n TestDriveResponse.StringKey = 'String';\n TestDriveResponse.AppUri = 'app Uri';\n TestDriveResponse.TestDrive = 'TestDrive';\n TestDriveResponse.SessionSource = 'sessionSource';\n TestDriveResponse.StoppedTime = 'stoppedTime';\n TestDriveResponse.MarketPlaceMetadataMarkdownKey = '_marketPlaceMetadataMarkdown';\n })(Constants.TestDriveResponse || (Constants.TestDriveResponse = {}));\n (function(VersionNeutralCollection) {\n VersionNeutralCollection.Reviews = 'reviews';\n VersionNeutralCollection.Users = 'users';\n })(Constants.VersionNeutralCollection || (Constants.VersionNeutralCollection = {}));\n (function(DocTypes) {\n DocTypes.App = 'App';\n DocTypes.Pricing = 'Pricing';\n DocTypes.SolutionManifest = 'SolutionManifest';\n })(Constants.DocTypes || (Constants.DocTypes = {}));\n (function(TestDriveState) {\n TestDriveState[TestDriveState[\"Hot\"] = 0] = \"Hot\";\n TestDriveState[TestDriveState[\"Cold\"] = 1] = \"Cold\";\n TestDriveState[TestDriveState[\"Error\"] = 2] = \"Error\";\n TestDriveState[TestDriveState[\"Unknown\"] = 3] = \"Unknown\";\n })(Constants.TestDriveState || (Constants.TestDriveState = {}));\n (function(StorefrontName) {\n StorefrontName.AppSource = 'AppSource';\n StorefrontName.Amp = 'Amp';\n StorefrontName.Ibiza = 'Ibiza';\n StorefrontName.G2 = 'G2';\n StorefrontName.Embed = 'Embed';\n })(Constants.StorefrontName || (Constants.StorefrontName = {}));\n Constants.InternalStoreFronts = [\n Constants.StorefrontName.AppSource,\n Constants.StorefrontName.Amp,\n Constants.StorefrontName.Ibiza\n ];\n (function(AuthType) {\n AuthType[AuthType[\"MSA\"] = 1] = \"MSA\";\n AuthType[AuthType[\"AAD\"] = 2] = \"AAD\";\n })(Constants.AuthType || (Constants.AuthType = {}));\n (function(ResourceTypes) {\n ResourceTypes[ResourceTypes[\"AppRelatedItems\"] = 0] = \"AppRelatedItems\";\n ResourceTypes[ResourceTypes[\"ServiceRelatedItems\"] = 1] = \"ServiceRelatedItems\";\n ResourceTypes[ResourceTypes[\"DataMapCloudsIndustry\"] = 2] = \"DataMapCloudsIndustry\";\n ResourceTypes[ResourceTypes[\"DataMapApps\"] = 3] = \"DataMapApps\";\n ResourceTypes[ResourceTypes[\"DataMapServices\"] = 4] = \"DataMapServices\";\n ResourceTypes[ResourceTypes[\"FilteredApps\"] = 5] = \"FilteredApps\";\n ResourceTypes[ResourceTypes[\"FilteredServices\"] = 6] = \"FilteredServices\";\n ResourceTypes[ResourceTypes[\"FilteredCloudsIndustry\"] = 7] = \"FilteredCloudsIndustry\";\n ResourceTypes[ResourceTypes[\"CuratedServices\"] = 8] = \"CuratedServices\";\n ResourceTypes[ResourceTypes[\"CuratedApps\"] = 9] = \"CuratedApps\";\n ResourceTypes[ResourceTypes[\"CuratedCloudsIndustry\"] = 10] = \"CuratedCloudsIndustry\";\n ResourceTypes[ResourceTypes[\"FlightCodedApp\"] = 11] = \"FlightCodedApp\";\n ResourceTypes[ResourceTypes[\"PreviewServices\"] = 12] = \"PreviewServices\";\n ResourceTypes[ResourceTypes[\"PreviewPricing\"] = 13] = \"PreviewPricing\";\n ResourceTypes[ResourceTypes[\"PreviewApps\"] = 14] = \"PreviewApps\";\n ResourceTypes[ResourceTypes[\"PreviewCloudsIndustry\"] = 15] = \"PreviewCloudsIndustry\";\n ResourceTypes[ResourceTypes[\"HashMapApps\"] = 16] = \"HashMapApps\";\n ResourceTypes[ResourceTypes[\"HashMapServices\"] = 17] = \"HashMapServices\";\n ResourceTypes[ResourceTypes[\"HashMapPreviewApps\"] = 18] = \"HashMapPreviewApps\";\n ResourceTypes[ResourceTypes[\"HashMapPreviewServices\"] = 19] = \"HashMapPreviewServices\";\n ResourceTypes[ResourceTypes[\"App\"] = 20] = \"App\";\n ResourceTypes[ResourceTypes[\"Service\"] = 21] = \"Service\";\n ResourceTypes[ResourceTypes[\"AllPublicCloudsIndustry\"] = 22] = \"AllPublicCloudsIndustry\";\n ResourceTypes[ResourceTypes[\"AllCloudsIndustry\"] = 23] = \"AllCloudsIndustry\";\n ResourceTypes[ResourceTypes[\"AllApps\"] = 24] = \"AllApps\";\n ResourceTypes[ResourceTypes[\"RawAllApps\"] = 25] = \"RawAllApps\";\n ResourceTypes[ResourceTypes[\"RawAllAppsCatalog\"] = 26] = \"RawAllAppsCatalog\";\n ResourceTypes[ResourceTypes[\"AllAppsExtra\"] = 27] = \"AllAppsExtra\";\n ResourceTypes[ResourceTypes[\"FeaturedApps\"] = 28] = \"FeaturedApps\";\n ResourceTypes[ResourceTypes[\"FeaturedCloudsIndustry\"] = 29] = \"FeaturedCloudsIndustry\";\n ResourceTypes[ResourceTypes[\"FlightCodedAndLiveApps\"] = 30] = \"FlightCodedAndLiveApps\";\n ResourceTypes[ResourceTypes[\"User\"] = 31] = \"User\";\n ResourceTypes[ResourceTypes[\"Pricing\"] = 32] = \"Pricing\";\n ResourceTypes[ResourceTypes[\"AppPricing\"] = 33] = \"AppPricing\";\n ResourceTypes[ResourceTypes[\"SolutionMetadata\"] = 34] = \"SolutionMetadata\";\n ResourceTypes[ResourceTypes[\"SolutionRuntime\"] = 35] = \"SolutionRuntime\";\n ResourceTypes[ResourceTypes[\"Acquisition\"] = 36] = \"Acquisition\";\n ResourceTypes[ResourceTypes[\"AllServices\"] = 37] = \"AllServices\";\n ResourceTypes[ResourceTypes[\"CatalogStartingPrices\"] = 38] = \"CatalogStartingPrices\";\n ResourceTypes[ResourceTypes[\"RawAllServices\"] = 39] = \"RawAllServices\";\n ResourceTypes[ResourceTypes[\"AllServicesExtra\"] = 40] = \"AllServicesExtra\";\n ResourceTypes[ResourceTypes[\"FeaturedServives\"] = 41] = \"FeaturedServives\";\n ResourceTypes[ResourceTypes[\"UserProfile\"] = 42] = \"UserProfile\";\n ResourceTypes[ResourceTypes[\"Event\"] = 43] = \"Event\";\n ResourceTypes[ResourceTypes[\"Review\"] = 44] = \"Review\";\n ResourceTypes[ResourceTypes[\"AllConsultingServices\"] = 45] = \"AllConsultingServices\";\n ResourceTypes[ResourceTypes[\"FeaturedServicesSections\"] = 46] = \"FeaturedServicesSections\";\n ResourceTypes[ResourceTypes[\"ServiceAcquisitions\"] = 47] = \"ServiceAcquisitions\";\n ResourceTypes[ResourceTypes[\"Favourites\"] = 48] = \"Favourites\";\n ResourceTypes[ResourceTypes[\"AllECAOffers\"] = 49] = \"AllECAOffers\";\n ResourceTypes[ResourceTypes[\"AllAppReviews\"] = 50] = \"AllAppReviews\";\n ResourceTypes[ResourceTypes[\"ECAAcquisitions\"] = 51] = \"ECAAcquisitions\";\n ResourceTypes[ResourceTypes[\"ReviewsByAppId\"] = 52] = \"ReviewsByAppId\";\n ResourceTypes[ResourceTypes[\"ReviewByIdByUser\"] = 53] = \"ReviewByIdByUser\";\n ResourceTypes[ResourceTypes[\"Customer\"] = 54] = \"Customer\";\n ResourceTypes[ResourceTypes[\"CustomerAddress\"] = 55] = \"CustomerAddress\";\n ResourceTypes[ResourceTypes[\"CalculatePrice\"] = 56] = \"CalculatePrice\";\n ResourceTypes[ResourceTypes[\"Purchase\"] = 57] = \"Purchase\";\n ResourceTypes[ResourceTypes[\"PublisherOffer\"] = 58] = \"PublisherOffer\";\n ResourceTypes[ResourceTypes[\"AllServicesCountries\"] = 59] = \"AllServicesCountries\";\n ResourceTypes[ResourceTypes[\"PrivateApps\"] = 60] = \"PrivateApps\";\n ResourceTypes[ResourceTypes[\"BillingAccounts\"] = 61] = \"BillingAccounts\";\n })(Constants.ResourceTypes || (Constants.ResourceTypes = {}));\n Constants.Office365Mapping = {\n // Legacy Online\n SharePoint_Online: [\n 'SharePoint Online'\n ],\n Access_Online: [\n 'Access Online'\n ],\n OneNote_Online: [\n 'OneNote Online'\n ],\n Project_Online: [\n 'Project Online'\n ],\n // On The Web\n Outlook_Online: [\n 'ProductOnTheWeb',\n 'Outlook'\n ],\n Excel_Online: [\n 'ProductOnTheWeb',\n 'Excel'\n ],\n PowerPoint_Online: [\n 'ProductOnTheWeb',\n 'PowerPoint'\n ],\n Word_Online: [\n 'ProductOnTheWeb',\n 'Word'\n ],\n Office_Online: [\n 'ProductOnTheWeb',\n 'Office app'\n ],\n // iPad\n Excel_iPad: [\n 'ProductOnIpad',\n 'Excel'\n ],\n Word_iPad: [\n 'ProductOnIpad',\n 'Word'\n ],\n PowerPoint_iPad: [\n 'ProductOnIpad',\n 'PowerPoint'\n ],\n // iOS\n Office_iOS: [\n 'ProductOnIos',\n 'Office app'\n ],\n Outlook_iOS: [\n 'ProductOnIos',\n 'Outlook'\n ],\n // Android\n Office_Android: [\n 'ProductOnAndroid',\n 'Office app'\n ],\n Outlook_Android: [\n 'ProductOnAndroid',\n 'Outlook'\n ],\n // Other\n App_Details_Requirements_Products_Office365: [\n 'Office 365'\n ],\n App_Details_Requirements_Products_ExcelIOS: [\n 'Excel for iPad'\n ],\n App_Details_Requirements_Products_WordIOS: [\n 'Word for iPad'\n ],\n App_Details_Requirements_Products_OutlookOnWeb: [\n 'ProductOnTheWeb',\n 'Outlook'\n ],\n App_Details_Requirements_Products_PowerPointIOS: [\n 'PowerPoint for iPad'\n ],\n App_Details_Requirements_Products_OneNoteWindows10: [\n 'OneNote for Windows 10'\n ],\n App_Details_Requirements_Products_PowerBI: [\n 'Power BI'\n ],\n App_Details_Requirements_Products_Teams: [\n 'Teams'\n ],\n OfficeProductForAndroid: [\n 'Outlook for Android'\n ],\n OfficeProductForIOS: [\n 'Outlook for iOS'\n ],\n Office: [\n 'Office app on Windows'\n ],\n // MAC products\n Word_2016_Mac: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'Word 2016',\n 'Mac'\n ]\n ],\n Word_2019_Mac: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'Word 2019',\n 'Mac'\n ]\n ],\n Excel_2016_Mac: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'Excel 2016',\n 'Mac'\n ]\n ],\n Excel_2019_Mac: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'Excel 2019',\n 'Mac'\n ]\n ],\n PowerPoint_2016_Mac: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'PowerPoint 2016',\n 'Mac'\n ]\n ],\n PowerPoint_2019_Mac: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'PowerPoint 2019',\n 'Mac'\n ]\n ],\n Outlook_2016_Mac: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'Outlook 2016',\n 'Mac'\n ]\n ],\n Outlook_2019_Mac: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'Outlook 2019',\n 'Mac'\n ]\n ],\n // WIN products\n Word_2013: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'Word 2013',\n 'Windows'\n ]\n ],\n Word_2013_SP1: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'Word 2013 SP1',\n 'Windows'\n ]\n ],\n Word_2016: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'Word 2016',\n 'Windows'\n ]\n ],\n Word_2019: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'Word 2019',\n 'Windows'\n ]\n ],\n Excel_2013: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'Excel 2013',\n 'Windows'\n ]\n ],\n Excel_2013_SP1: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'Excel 2013 SP1',\n 'Windows'\n ]\n ],\n Excel_2016: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'Excel 2016',\n 'Windows'\n ]\n ],\n Excel_2019: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'Excel 2019',\n 'Windows'\n ]\n ],\n PowerPoint_2013: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'PowerPoint 2013',\n 'Windows'\n ]\n ],\n PowerPoint_2013_SP1: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'PowerPoint 2013 SP1',\n 'Windows'\n ]\n ],\n PowerPoint_2016: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'PowerPoint 2016',\n 'Windows'\n ]\n ],\n PowerPoint_2019: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'PowerPoint 2019',\n 'Windows'\n ]\n ],\n Outlook_2013: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'Outlook 2013',\n 'Windows'\n ]\n ],\n Outlook_2013_SP1: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'Outlook 2013 SP1',\n 'Windows'\n ]\n ],\n Outlook_2016: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'Outlook 2016',\n 'Windows'\n ]\n ],\n Outlook_2019: [\n 'ProductVersionOrLaterOnPlatform',\n [\n 'Outlook 2019',\n 'Windows'\n ]\n ],\n // M365 products\n Excel_M365_Win: [\n 'ProductOnM365Plaform',\n [\n 'Excel',\n 'Windows'\n ]\n ],\n Excel_M365_Mac: [\n 'ProductOnM365Plaform',\n [\n 'Excel',\n 'Mac'\n ]\n ],\n Word_M365_Win: [\n 'ProductOnM365Plaform',\n [\n 'Word',\n 'Windows'\n ]\n ],\n Word_M365_Mac: [\n 'ProductOnM365Plaform',\n [\n 'Word',\n 'Mac'\n ]\n ],\n Outlook_M365_Win: [\n 'ProductOnM365Plaform',\n [\n 'Outlook',\n 'Windows'\n ]\n ],\n Outlook_M365_Mac: [\n 'ProductOnM365Plaform',\n [\n 'Outlook',\n 'Mac'\n ]\n ],\n PowerPoint_M365_Win: [\n 'ProductOnM365Plaform',\n [\n 'PowerPoint',\n 'Windows'\n ]\n ],\n PowerPoint_M365_Mac: [\n 'ProductOnM365Plaform',\n [\n 'PowerPoint',\n 'Mac'\n ]\n ],\n // Legacy products\n OfficeProductOrLater_SharePoint_2013: [\n 'ProductVersionOrLater',\n 'SharePoint 2013'\n ],\n OfficeProductOrLater_SharePoint_2016: [\n 'ProductVersionOrLater',\n 'SharePoint 2016'\n ],\n Access_2016_SP1: [\n 'ProductVersionOrLater',\n 'Access 2016 SP1'\n ],\n Excel_2016_SP1: [\n 'ProductVersionOrLater',\n 'Excel 2016 SP1'\n ],\n OneNote_2016_SP1: [\n 'ProductVersionOrLater',\n 'OneNote 2016 SP1'\n ],\n Outlook_2016_SP1: [\n 'ProductVersionOrLater',\n 'Outlook 2016 SP1'\n ],\n Project_2016_SP1: [\n 'ProductVersionOrLater',\n 'Project 2016 SP1'\n ],\n PowerPoint_2016_SP1: [\n 'ProductVersionOrLater',\n 'PowerPoint 2016 SP1'\n ],\n Word_2016_SP1: [\n 'ProductVersionOrLater',\n 'Word 2016 SP1'\n ],\n Access_2013_SP1: [\n 'ProductVersionOrLater',\n 'Access 2013 SP1'\n ],\n OneNote_2013_SP1: [\n 'ProductVersionOrLater',\n 'OneNote 2013 SP1'\n ],\n Project_2013_SP1: [\n 'ProductVersionOrLater',\n 'Project 2013 SP1'\n ],\n Access_2016: [\n 'ProductVersionOrLater',\n 'Access 2016'\n ],\n OneNote_2016: [\n 'ProductVersionOrLater',\n 'OneNote 2016'\n ],\n Project_2016: [\n 'ProductVersionOrLater',\n 'Project 2016'\n ],\n Access_2013: [\n 'ProductVersionOrLater',\n 'Access 2013'\n ],\n OneNote_2013: [\n 'ProductVersionOrLater',\n 'OneNote 2013'\n ],\n Project_2013: [\n 'ProductVersionOrLater',\n 'Project 2013'\n ]\n };\n Constants.OfficeAwardsMapping = {\n // Office 2017 App Awards\n AppAwards_2017_BestBizValue_Place1: [\n 'Best_Business_Value_for_An',\n 'Merchandise_Winner',\n '2017'\n ],\n AppAwards_2017_BestBizValue_Place2: [\n 'Best_Business_Value_for_An',\n 'Merchandise_Second',\n '2017'\n ],\n AppAwards_2017_BestBizValue_Place3: [\n 'Best_Business_Value_for_An',\n 'Merchandise_Third',\n '2017'\n ],\n AppAwards_2017_BestUX_Place1: [\n 'Best_User_Experience_For_An',\n 'Merchandise_Winner',\n '2017'\n ],\n AppAwards_2017_BestUX_Place2: [\n 'Best_User_Experience_For_An',\n 'Merchandise_Second',\n '2017'\n ],\n AppAwards_2017_BestUX_Place3: [\n 'Best_User_Experience_For_An',\n 'Merchandise_Third',\n '2017'\n ],\n AppAwards_2017_BestInt_Place1: [\n 'Best_Office_Integration_For_An',\n 'Merchandise_Winner',\n '2017'\n ],\n AppAwards_2017_BestInt_Place2: [\n 'Best_Office_Integration_For_An',\n 'Merchandise_Second',\n '2017'\n ],\n AppAwards_2017_BestInt_Place3: [\n 'Best_Office_Integration_For_An',\n 'Merchandise_Third',\n '2017'\n ],\n AppAwards_2017_Mobile_Place1: [\n 'Mobile_Award_For_An',\n 'Merchandise_Winner',\n '2017'\n ],\n AppAwards_2017_Overall_Place1: [\n 'Best_Overall_For_An',\n 'Merchandise_Winner',\n '2017'\n ],\n AppAwards_2017_Overall_Place2: [\n 'Best_Overall_For_An',\n 'Merchandise_Second',\n '2017'\n ],\n AppAwards_2017_Overall_Place3: [\n 'Best_Overall_For_An',\n 'Merchandise_Third',\n '2017'\n ],\n AppAwards_2017_Peoples_Choice: [\n 'Peoples_Choice_For_An',\n 'Merchandise_Winner',\n '2017'\n ],\n // Office 2018 App Awards\n AppAwards_2018_BestBizValue_Place1: [\n 'Best_Business_Value_for_An',\n 'Merchandise_Winner',\n '2018'\n ],\n AppAwards_2018_BestBizValue_Place2: [\n 'Best_Business_Value_for_An',\n 'Merchandise_Second',\n '2018'\n ],\n AppAwards_2018_BestBizValue_Place3: [\n 'Best_Business_Value_for_An',\n 'Merchandise_Third',\n '2018'\n ],\n AppAwards_2018_BestUX_Place1: [\n 'Best_User_Experience_For_An',\n 'Merchandise_Winner',\n '2018'\n ],\n AppAwards_2018_BestUX_Place2: [\n 'Best_User_Experience_For_An',\n 'Merchandise_Second',\n '2018'\n ],\n AppAwards_2018_BestUX_Place3: [\n 'Best_User_Experience_For_An',\n 'Merchandise_Third',\n '2018'\n ],\n AppAwards_2018_BestInt_Place1: [\n 'Best_Office_Integration_For_An',\n 'Merchandise_Winner',\n '2018'\n ],\n AppAwards_2018_BestInt_Place2: [\n 'Best_Office_Integration_For_An',\n 'Merchandise_Second',\n '2018'\n ],\n AppAwards_2018_BestInt_Place3: [\n 'Best_Office_Integration_For_An',\n 'Merchandise_Third',\n '2018'\n ],\n AppAwards_2018_Overall_Place1: [\n 'Best_Overall_For_An',\n 'Merchandise_Winner',\n '2018'\n ],\n AppAwards_2018_Overall_Place2: [\n 'Best_Overall_For_An',\n 'Merchandise_Second',\n '2018'\n ],\n AppAwards_2018_Overall_Place3: [\n 'Best_Overall_For_An',\n 'Merchandise_Third',\n '2018'\n ],\n AppAwards_2018_Peoples_Choice: [\n 'Peoples_Choice_For_An',\n 'Merchandise_Winner',\n '2018'\n ],\n // Office 2019+ App Awards\n AppAwards: [\n 'Office App Awards',\n 'General Office App Awards',\n '2019'\n ]\n };\n Constants.AcquisitionCtaContactIgnored = 'CTA_Contact';\n Constants.DefaultLocale = 'en-us';\n Constants.DefaultLanguage = 'en';\n (function(AcquisitionCategories) {\n AcquisitionCategories.Private = 'private';\n AcquisitionCategories.Public = 'public';\n })(Constants.AcquisitionCategories || (Constants.AcquisitionCategories = {}));\n Constants.defaultRoute = '/';\n Constants.privateOffers = 'private-offers';\n Constants.home = 'home';\n Constants.csGallery = 'marketplace/consulting-services';\n Constants.appsGallery = 'marketplace/apps';\n Constants.cloudsIndustryGallery = 'marketplace/cloudsIndustry';\n Constants.appDetailsCanonicalTabSuffix = '?tab=overview';\n Constants.partnersAppSource = 'marketplace/partner-dir';\n Constants.partnersIframe = 'partners';\n Constants.partnersSearchApiRoute = 'api/search/autocomplete';\n Constants.product = 'product';\n Constants.category = 'category';\n Constants.serviceType = 'serviceType';\n Constants.industry = 'industry';\n Constants.KeepInCanonicalFilters = [\n 'product',\n 'category',\n 'serviceType',\n 'industry'\n ];\n Constants.semicolon = '%3B';\n (function(GalleryTypes) {\n GalleryTypes.consultingServices = 'consulting-services';\n GalleryTypes.apps = 'apps';\n })(Constants.GalleryTypes || (Constants.GalleryTypes = {}));\n (function(GalleryOffersTypes) {\n GalleryOffersTypes[\"ConsultingServices\"] = \"consulting services\";\n GalleryOffersTypes[\"Apps\"] = \"apps\";\n GalleryOffersTypes[\"CloudsIndustry\"] = \"Industry Clouds\";\n GalleryOffersTypes[\"Partners\"] = \"Partners\";\n })(Constants.GalleryOffersTypes || (Constants.GalleryOffersTypes = {}));\n (function(Views) {\n Views[\"locale\"] = \"locale\";\n Views[\"appDetails\"] = \"appDetails\";\n Views[\"checkout\"] = \"checkout\";\n Views[\"orderConfirmation\"] = \"orderConfirmation\";\n Views[\"partners\"] = \"partners\";\n Views[\"blog\"] = \"blog\";\n Views[\"reviews\"] = \"reviews\";\n Views[\"sell\"] = \"sell\";\n Views[\"about\"] = \"about\";\n Views[\"billingregion\"] = \"billingregion\";\n Views[\"testdrive\"] = \"testdrive\";\n Views[\"fieldHub\"] = \"fieldHub\";\n Views[\"serviceDetails\"] = \"serviceDetails\";\n Views[\"partnerDetails\"] = \"partnerDetails\";\n Views[\"partnerDetailsContact\"] = \"partnerDetailsContact\";\n Views[\"partnerSuggestion\"] = \"partnerSuggestion\";\n Views[\"userFavouriteDetail\"] = \"userFavouriteDetail\";\n Views[\"privateOffers\"] = \"privateOffers\";\n Views[\"privateOfferDetails\"] = \"privateOfferDetails\";\n Views[\"campaigns\"] = \"campaigns\";\n Views[\"sitemap\"] = \"sitemap\";\n Views[\"home\"] = \"home\";\n Views[\"serviceGallery\"] = \"serviceGallery\";\n Views[\"appGallery\"] = \"appGallery\";\n Views[\"cloudsIndustryGallery\"] = \"cloudsIndustryGallery\";\n Views[\"partnersHost\"] = \"partnersHost\";\n })(Constants.Views || (Constants.Views = {}));\n (function(ReportAbuseDialog) {\n ReportAbuseDialog.dropdownHTMLIdName = 'report-abuse-dialog-category-dropdown';\n })(Constants.ReportAbuseDialog || (Constants.ReportAbuseDialog = {}));\n (function(HTMLAttribute) {\n HTMLAttribute.href = 'href';\n HTMLAttribute.className = 'class';\n HTMLAttribute.alt = 'alt';\n HTMLAttribute.text = 'text';\n HTMLAttribute.ariaExpanded = 'aria-expanded';\n HTMLAttribute.textContent = 'textContent';\n HTMLAttribute.ariaSelected = 'aria-selected';\n HTMLAttribute.ariaChecked = 'aria-checked';\n HTMLAttribute.ariaLabel = 'aria-label';\n HTMLAttribute.role = 'role';\n HTMLAttribute.id = 'id';\n HTMLAttribute.ariaActivedescendant = 'aria-activedescendant';\n HTMLAttribute.ariaLabeledBy = 'aria-labelledby';\n HTMLAttribute.tabIndex = 'tabIndex';\n HTMLAttribute.title = 'title';\n HTMLAttribute.autoComplete = 'autoComplete';\n })(Constants.HTMLAttribute || (Constants.HTMLAttribute = {}));\n (function(HTMLTag) {\n HTMLTag.button = 'button';\n })(Constants.HTMLTag || (Constants.HTMLTag = {}));\n (function(HTMLClassNameStrings) {\n HTMLClassNameStrings.tile = 'spza_tileWrapper';\n })(Constants.HTMLClassNameStrings || (Constants.HTMLClassNameStrings = {}));\n (function(searchItemType) {\n searchItemType.app = 'AppSearchResult';\n searchItemType.service = 'ServicesSearchResult';\n searchItemType.cloudsIndustry = 'CloudsIndustrySearchResult';\n searchItemType.showAll = 'SearchShowAll';\n searchItemType.searchWithinFilters = 'searchWithinFilters';\n searchItemType.eca = 'ECASearchResult';\n searchItemType.partner = 'PartnerSearchResult';\n })(Constants.searchItemType || (Constants.searchItemType = {}));\n (function(searchTypeString) {\n searchTypeString.AppsAndServices = 'Apps and Services';\n searchTypeString.ECAoffers = 'ECA Offers';\n searchTypeString.Partners = 'Partners';\n })(Constants.searchTypeString || (Constants.searchTypeString = {}));\n Constants.defaultCountryForPrivacy = 'EU';\n (function(TokenClaims) {\n TokenClaims[\"givenName\"] = \"given_name\";\n TokenClaims[\"familyName\"] = \"family_name\";\n })(Constants.TokenClaims || (Constants.TokenClaims = {}));\n (function(AzurePortal) {\n AzurePortal.PDPBladeById = 'https://portal.azure.com/#blade/Microsoft_Azure_Marketplace/galleryItemDetailsBladeNopdl/id/{0}';\n AzurePortal.CreateOfferById = 'https://portal.azure.com/#create/';\n AzurePortal.CreateOfferPreview = '/preview';\n })(Constants.AzurePortal || (Constants.AzurePortal = {}));\n Constants.partnerCenterLink = 'https://partner.microsoft.com/en-us/dashboard/account/v3/enrollment/introduction/azureisv';\n Constants.FilterCategoryToGlobalStrings = [\n 'virtual-machine-images',\n 'solution-templates'\n ];\n (function(FilterQuery) {\n // azure marketplace\n FilterQuery[\"filters\"] = \"filters\";\n FilterQuery[\"subcategories\"] = \"subcategories\";\n FilterQuery[\"subindustries\"] = \"subindustries\";\n // appsource\n FilterQuery[\"product\"] = \"product\";\n FilterQuery[\"industry\"] = \"industry\";\n FilterQuery[\"category\"] = \"category\";\n FilterQuery[\"serviceType\"] = \"serviceType\";\n FilterQuery[\"trials\"] = \"trials\";\n FilterQuery[\"pricingModel\"] = \"pricingModel\";\n FilterQuery[\"ratings\"] = \"ratings\";\n FilterQuery[\"appCompliance\"] = \"appCompliance\";\n FilterQuery[\"sortBy\"] = \"sortBy\";\n FilterQuery[\"azureBenefitEligible\"] = \"azureBenefitEligible\";\n FilterQuery[\"copilotExtension\"] = \"copilotExtension\";\n FilterQuery[\"productType\"] = \"productType\";\n FilterQuery[\"country\"] = \"country\";\n FilterQuery[\"region\"] = \"region\";\n FilterQuery[\"search\"] = \"search\";\n FilterQuery[\"page\"] = \"page\";\n })(Constants.FilterQuery || (Constants.FilterQuery = {}));\n (function(MACSubCategoryStrings) {\n MACSubCategoryStrings.FreeTrial = 'trials_freeTrial';\n MACSubCategoryStrings.Windows = 'windows';\n MACSubCategoryStrings.Linux = 'linux';\n MACSubCategoryStrings.WindowsBased = 'windowsBased';\n MACSubCategoryStrings.LinuxBased = 'linuxBased';\n MACSubCategoryStrings.SystemWindows = 'operatingSystem_windows';\n MACSubCategoryStrings.SystemLinux = 'operatingSystem_linux';\n MACSubCategoryStrings.TestDrive = 'trials_testDrive';\n MACSubCategoryStrings.Microsoft = 'Microsoft';\n MACSubCategoryStrings.PublisherMicrosoft = 'publisher_microsoft';\n MACSubCategoryStrings.PublisherPartner = 'publisher_partners';\n MACSubCategoryStrings.SaaS = 'SaaS';\n MACSubCategoryStrings.Containers = 'Containers_MP';\n MACSubCategoryStrings.ContainerImages = 'ContainerImages_MP';\n MACSubCategoryStrings.Countries = 'country';\n })(Constants.MACSubCategoryStrings || (Constants.MACSubCategoryStrings = {}));\n (function(TypeOf) {\n TypeOf.objectName = 'object';\n TypeOf.functionName = 'function';\n TypeOf.stringName = 'string';\n TypeOf.numberName = 'number';\n TypeOf.booleanName = 'boolean';\n TypeOf.undefinedName = 'undefined';\n TypeOf.nullName = 'null';\n })(Constants.TypeOf || (Constants.TypeOf = {}));\n (function(ServiceTypes) {\n ServiceTypes[ServiceTypes[\"Assessment\"] = 1] = \"Assessment\";\n ServiceTypes[ServiceTypes[\"Briefing\"] = 2] = \"Briefing\";\n ServiceTypes[ServiceTypes[\"Implementation\"] = 4] = \"Implementation\";\n ServiceTypes[ServiceTypes[\"ProofOfConcept\"] = 8] = \"ProofOfConcept\";\n ServiceTypes[ServiceTypes[\"WorkShop\"] = 16] = \"WorkShop\";\n })(Constants.ServiceTypes || (Constants.ServiceTypes = {}));\n (function(RegExpFlag) {\n RegExpFlag.Global = 'g';\n RegExpFlag.MultiLine = 'm';\n RegExpFlag.CaseInsensitive = 'i';\n RegExpFlag.Sticky = 'y';\n RegExpFlag.Unicode = 'g';\n RegExpFlag.SingleLine = 'i';\n })(Constants.RegExpFlag || (Constants.RegExpFlag = {}));\n (function(UserFavourite) {\n (function(ApplicationTypes) {\n ApplicationTypes[\"ITApplications\"] = \"ITApplications\";\n ApplicationTypes[\"BusinessApplications\"] = \"BusinessApplications\";\n ApplicationTypes[\"ITConsultingServices\"] = \"ITConsultingServices\";\n ApplicationTypes[\"BusinessConsultingServices\"] = \"BusinessConsultingServices\";\n })(UserFavourite.ApplicationTypes || (UserFavourite.ApplicationTypes = {}));\n (function(NotCriticalFailure) {\n NotCriticalFailure[\"ItemExist\"] = \"ItemExist\";\n NotCriticalFailure[\"ItemNotExist\"] = \"ItemNotExist\";\n NotCriticalFailure[\"MaximumQuotaReached\"] = \"MaximumQuotaReached\";\n })(UserFavourite.NotCriticalFailure || (UserFavourite.NotCriticalFailure = {}));\n (function(FetchDataStatus) {\n FetchDataStatus[\"Invalid\"] = \"Invalid\";\n FetchDataStatus[\"IsFetching\"] = \"IsFetching\";\n FetchDataStatus[\"Valid\"] = \"Valid\";\n FetchDataStatus[\"Failure\"] = \"Failure\";\n })(UserFavourite.FetchDataStatus || (UserFavourite.FetchDataStatus = {}));\n (function(DataItemModifyStatus) {\n DataItemModifyStatus[\"Delete\"] = \"Delete\";\n DataItemModifyStatus[\"Upsert\"] = \"Upsert\";\n DataItemModifyStatus[\"None\"] = \"None\";\n // after an operation has finished\n DataItemModifyStatus[\"Done\"] = \"Done\";\n })(UserFavourite.DataItemModifyStatus || (UserFavourite.DataItemModifyStatus = {}));\n UserFavourite.ViewEndpoint = '/view/favourites';\n })(Constants.UserFavourite || (Constants.UserFavourite = {}));\n (function(ODataError) {\n ODataError.DefaultCode = 500;\n ODataError.DefaultMessage = 'Error Object Not Found, Default to Internal Server Error';\n ODataError.DefaultMessageCircularObject = 'Circular Object Cannot Expand for Details';\n ODataError.DefaultMessageHandle = (error)=>`Error Message Not Found, Showing Original Error Object: ${stringifyError(error)}`;\n })(Constants.ODataError || (Constants.ODataError = {}));\n (function(AccessToken) {\n AccessToken.DefaultHost = 'https://login.microsoftonline.com/';\n AccessToken.DefaultCommonPath = '/oauth2/token';\n })(Constants.AccessToken || (Constants.AccessToken = {}));\n (function(appSourceUrls) {\n appSourceUrls.prod = 'https://appsource.microsoft.com';\n appSourceUrls.df = 'https://appgallery.spza-staging.net';\n appSourceUrls.canary = 'https://appgallery.spza-canary.net';\n appSourceUrls.development = 'http://localhost:3000/';\n })(Constants.appSourceUrls || (Constants.appSourceUrls = {}));\n (function(Header) {\n Header.classNamePrefix = 'spza-header';\n Header.localizationNamePrefix = 'Appsource_Header';\n (function(Classname) {\n Classname.itemActive = 'active';\n Classname.itemNotActive = 'inactive';\n })(Header.Classname || (Header.Classname = {}));\n })(Constants.Header || (Constants.Header = {}));\n (function(UserInteractionType) {\n UserInteractionType[\"Touch\"] = \"Touch\";\n UserInteractionType[\"Mouse\"] = \"Mouse\";\n })(Constants.UserInteractionType || (Constants.UserInteractionType = {}));\n (function(EventType) {\n EventType[\"None\"] = \"none\";\n EventType[\"Click\"] = \"click\";\n EventType[\"MouseEnter\"] = \"mouseenter\";\n EventType[\"ReactMouseEnter\"] = \"react-mouseenter\";\n EventType[\"MouseLeave\"] = \"mouseleave\";\n EventType[\"ReactMouseLeave\"] = \"react-mouseleave\";\n EventType[\"KeyDown\"] = \"keydown\";\n EventType[\"KeyUp\"] = \"keyup\";\n EventType[\"Blur\"] = \"blur\";\n })(Constants.EventType || (Constants.EventType = {}));\n (function(UserActionComponentType) {\n UserActionComponentType[\"Dialog\"] = \"Dialog\";\n UserActionComponentType[\"DropdownOptionItem\"] = \"DropdownOptionItem\";\n })(Constants.UserActionComponentType || (Constants.UserActionComponentType = {}));\n (function(UserComponent) {\n (function(DropdownItemName) {\n DropdownItemName[\"userAction\"] = \"userAction\";\n DropdownItemName[\"userFavourite\"] = \"userFavourite\";\n DropdownItemName[\"feedback\"] = \"feeback\";\n })(UserComponent.DropdownItemName || (UserComponent.DropdownItemName = {}));\n UserComponent.dropdownItemNameToClassName = {\n [\"userAction\"]: 'userActions .userTabSignOut button',\n [\"userFavourite\"]: 'spza-user-favourite-navigation-bar-button-container',\n [\"feeback\"]: 'spza_feedback'\n };\n UserComponent.dropdownItemClassNameArray = Object.keys(UserComponent.dropdownItemNameToClassName).map((key)=>UserComponent.dropdownItemNameToClassName[`${key}`]);\n UserComponent.activeClassName = 'dropdown-item-active';\n UserComponent.dropdownOptionContainerClassName = 'spza-user-mobile-nav-bar-dropdown';\n UserComponent.dropdownActiveOptionContainerClassName = `${UserComponent.dropdownOptionContainerClassName}.active`;\n UserComponent.dropdownValueClassName = 'spza-user-mobile-container .spza-user-nav-bar-button';\n UserComponent.dropdownContainerClassName = 'spza-user-mobile-container';\n })(Constants.UserComponent || (Constants.UserComponent = {}));\n Constants.MACPrivacyTermsURL = 'https://aka.ms/azuremarketplaceterms';\n Constants.HyperfishEntityId = 'hyperfish.8437f635-56d2-402b-bb8b-2b5549267c61';\n Constants.IgnoredPricingEntityId = 'dummy';\n (function(ErrorCodes) {\n ErrorCodes[ErrorCodes[\"XSS\"] = 1] = \"XSS\";\n })(Constants.ErrorCodes || (Constants.ErrorCodes = {}));\n Constants.ServicesIdWithBadge = {\n 'bardess.customer-360-powered-by-zero2hero': 1,\n 'publicis-sapient.rapid_commerce': 2,\n 'xentit.azure-xentit-trendmicro-qualys-hcss-12months': 3,\n 'rcg-us.rcg-enable-credit-analytics': 4,\n 'sirrus7.sirrus7-devops-acceleration-engine': 5,\n 'new-signature.eos_appfactory': 6,\n 'prodware.devicetone_iot_for_connected_field_service': 7,\n 'avanadeinc.intelligent_ma_due_diligence': 8,\n 'rivermeadowsoftwareinc.rapid-datacenter-consolidation-jumpstart': 9,\n 'barhead_solutions.unison_p2p': 10\n };\n Constants.appSourceApplicationTargetName = 'appsource';\n (function(JsllCTAId) {\n JsllCTAId.Contact = 'CTA_Contact';\n JsllCTAId.ContactMe = 'CTA_ContactMe';\n JsllCTAId.Select = 'CTA_Select';\n JsllCTAId.Get = 'CTA_Get';\n JsllCTAId.Try = 'CTA_Try';\n JsllCTAId.RequestTrial = 'CTA_ContactMe';\n JsllCTAId.TestDrive = 'CTA_TestDrive';\n JsllCTAId.Service = 'CTA_Inquire';\n JsllCTAId.Purchase = 'CTA_Get';\n JsllCTAId.MailALink = 'CTA_MailMeALink';\n JsllCTAId.Configure = 'CTA_Configure';\n JsllCTAId.ContactPartner = 'CTA_ContactPartner';\n JsllCTAId.RepeatTestDrive = 'CTA_RepeatTestDrive';\n JsllCTAId.RetryTestDrive = 'CTA_RetryTestDrive';\n JsllCTAId.Continue = 'CTA_Continue';\n JsllCTAId.Close = 'CTA_Close';\n JsllCTAId.Done = 'CTA_Done';\n JsllCTAId.SubmitFeedback = 'CTA_SubmitFeedback';\n JsllCTAId.SendFeedbackEmail = 'CTA_SendFeedbackEmail';\n JsllCTAId.WriteReview = 'CTA_WriteReview';\n JsllCTAId.UpdateReview = 'CTA_UpdateReview';\n JsllCTAId.SubmitReview = 'CTA_SubmitReview';\n JsllCTAId.DeleteReview = 'CTA_DeleteReview';\n JsllCTAId.SignIn = 'CTA_SignIn';\n JsllCTAId.SignUp = 'CTA_SignUp';\n JsllCTAId.ViewAllButton = 'CTA_ViewAllButton';\n JsllCTAId.ClearFilters = 'CTA_ClearFilters';\n JsllCTAId.DownloadSample = 'CTA_DownloadSample';\n JsllCTAId.Add = 'CTA_Add';\n JsllCTAId.BuyLicense = 'CTA_BuyLicense';\n JsllCTAId.Install = 'CTA_Install';\n JsllCTAId.AlreadyPurchased = 'CTA_AlreadyPurchased';\n JsllCTAId.Partner = 'CTA_Partner';\n })(Constants.JsllCTAId || (Constants.JsllCTAId = {}));\n (function(JsllSaas) {\n JsllSaas.OrderConfirmed = 'OrderConfirmed';\n JsllSaas.TransactableSaasPdpView = 'TransactableSaasPdpView';\n JsllSaas.SaasTransactable = 'SaaS transactable';\n JsllSaas.SaasNonTransactable = 'SaaS non-transactable';\n JsllSaas.ViewImage = 'ViewImage';\n JsllSaas.ViewImageOfVideo = 'ViewImageOfVideo';\n JsllSaas.WatchVideo = 'WatchVideo';\n JsllSaas.SignIn = 'SignIn';\n JsllSaas.SignInModalShow = 'SignInModalShow';\n })(Constants.JsllSaas || (Constants.JsllSaas = {}));\n (function(JsllCheckout) {\n JsllCheckout.RedirectButton = 'RedirectButton';\n JsllCheckout.NewCustomer = 'NewCustomer';\n })(Constants.JsllCheckout || (Constants.JsllCheckout = {}));\n (function(AzureExpertsMSPApps) {\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"ans_group.glasssaas\"] = 0] = \"ans_group.glasssaas\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"capside.enzime-azure-code-deployments-capside\"] = 1] = \"capside.enzime-azure-code-deployments-capside\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"capside.replica-azure-cloud-governance-capside\"] = 2] = \"capside.replica-azure-cloud-governance-capside\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"elasticbox.elasticbox-enterprise\"] = 3] = \"elasticbox.elasticbox-enterprise\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"comparex.portfolio-management-platform\"] = 4] = \"comparex.portfolio-management-platform\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"comparex.sam2go-nextgen-platform\"] = 5] = \"comparex.sam2go-nextgen-platform\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"comparex.ucm-insights\"] = 6] = \"comparex.ucm-insights\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"coretek.coretekams\"] = 7] = \"coretek.coretekams\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"crayon-group-as-1129016.cloud_iq_saas\"] = 8] = \"crayon-group-as-1129016.cloud_iq_saas\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"hanu.hanu-insight-v2\"] = 9] = \"hanu.hanu-insight-v2\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"hanu.hanu-managed-services\"] = 10] = \"hanu.hanu-managed-services\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"hcl-technologies.hcl17cp1104\"] = 11] = \"hcl-technologies.hcl17cp1104\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"ibm.ibm_security_access_manager\"] = 12] = \"ibm.ibm_security_access_manager\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"ibm.qradar_security_analytics\"] = 13] = \"ibm.qradar_security_analytics\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"infosysltd.infosys-analytics-workbench\"] = 14] = \"infosysltd.infosys-analytics-workbench\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"infront-consulting-group-ltd.beekeeper-patch_maangement\"] = 15] = \"infront-consulting-group-ltd.beekeeper-patch_maangement\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"infront-consulting-group-ltd.hive-self-service-portal\"] = 16] = \"infront-consulting-group-ltd.hive-self-service-portal\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"linkbynet.linkbynet_1\"] = 17] = \"linkbynet.linkbynet_1\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"new-signature.ef2bfc07-9398-483d-b46f-78bccae4cb42\"] = 18] = \"new-signature.ef2bfc07-9398-483d-b46f-78bccae4cb42\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"wipro_india.botwiproapi\"] = 19] = \"wipro_india.botwiproapi\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"wipro_india.facewiproapi\"] = 20] = \"wipro_india.facewiproapi\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"wipro_india.imageclassificationwiproapi\"] = 21] = \"wipro_india.imageclassificationwiproapi\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"wipro_india.wca\"] = 22] = \"wipro_india.wca\";\n AzureExpertsMSPApps[AzureExpertsMSPApps[\"wipro_india.wiprotexact\"] = 23] = \"wipro_india.wiprotexact\";\n })(Constants.AzureExpertsMSPApps || (Constants.AzureExpertsMSPApps = {}));\n (function(ProductBitmaskFieldNames) {\n ProductBitmaskFieldNames[\"backendKey\"] = \"backendKey\";\n ProductBitmaskFieldNames[\"urlKey\"] = \"urlKey\";\n })(Constants.ProductBitmaskFieldNames || (Constants.ProductBitmaskFieldNames = {}));\n (function(SearchFieldNames) {\n SearchFieldNames[\"linkedAddIns\"] = \"linkedAddIns\";\n SearchFieldNames[\"linkedAddInsTypes\"] = \"LinkedAddInsTypes\";\n })(Constants.SearchFieldNames || (Constants.SearchFieldNames = {}));\n (function(SearchSortingOption) {\n SearchSortingOption[\"BestMatch\"] = \"Best Match\";\n SearchSortingOption[\"Popularity\"] = \"Popularity\";\n SearchSortingOption[\"RatingAverage\"] = \"Rating Average\";\n SearchSortingOption[\"RecentlyUpdated\"] = \"Recently Updated\";\n })(Constants.SearchSortingOption || (Constants.SearchSortingOption = {}));\n (function(LicenseManagementType) {\n LicenseManagementType[\"MicrosoftManaged\"] = \"MicrosoftManaged\";\n LicenseManagementType[\"ISVManaged\"] = \"ISVManaged\";\n })(Constants.LicenseManagementType || (Constants.LicenseManagementType = {}));\n (function(LicenseModel) {\n LicenseModel[\"Freemium\"] = \"Freemium\";\n })(Constants.LicenseModel || (Constants.LicenseModel = {}));\n (function(UiRole) {\n UiRole[UiRole[\"Admin\"] = 1] = \"Admin\";\n UiRole[UiRole[\"Other\"] = 2] = \"Other\";\n })(Constants.UiRole || (Constants.UiRole = {}));\n (function(TermPeriod) {\n TermPeriod[\"Month\"] = \"month\";\n TermPeriod[\"Year\"] = \"year\";\n })(Constants.TermPeriod || (Constants.TermPeriod = {}));\n (function(TermId) {\n // Entitlement renew monthly\n TermId[\"Monthly\"] = \"hjdtn7tfnxcy\";\n // Entitlement renew yearly\n TermId[\"Yearly\"] = \"nm5o4wf9fbfy\";\n // Entitlement first month free then renew monthly\n TermId[\"TrialMonthly\"] = \"ccdjsqgba7zo\";\n // Entitlement first month free then renew yearly\n TermId[\"TrialYearly\"] = \"o6p5ue5yng9o\";\n })(Constants.TermId || (Constants.TermId = {}));\n})(Constants || (Constants = {}));\nexport var OfferType = /*#__PURE__*/ function(OfferType) {\n OfferType[OfferType[\"Other\"] = 0] = \"Other\";\n OfferType[OfferType[\"VirtualMachine\"] = 1] = \"VirtualMachine\";\n OfferType[OfferType[\"DevService\"] = 2] = \"DevService\";\n OfferType[OfferType[\"SolutionTemplate\"] = 3] = \"SolutionTemplate\";\n OfferType[OfferType[\"ManagedApp\"] = 4] = \"ManagedApp\";\n OfferType[OfferType[\"SaaSApp\"] = 5] = \"SaaSApp\";\n OfferType[OfferType[\"Container\"] = 6] = \"Container\";\n OfferType[OfferType[\"ContainerApp\"] = 7] = \"ContainerApp\";\n OfferType[OfferType[\"CrossChargedManagedApp\"] = 8] = \"CrossChargedManagedApp\";\n OfferType[OfferType[\"AAD\"] = 9] = \"AAD\";\n OfferType[OfferType[\"IoTEdgeModule\"] = 10] = \"IoTEdgeModule\";\n OfferType[OfferType[\"PowerBICustomVisual\"] = 11] = \"PowerBICustomVisual\";\n // 'Mixed' should be the last value and is special\n // It implies multiple offer types\n // If we ever used this as a flag (bitwise operation),\n // remember that 'Mixed' is a special case\n // Add new offer types above\n OfferType[OfferType[\"Mixed\"] = 2147483647] = \"Mixed\";\n return OfferType;\n}({});\nexport var PlanPricingType = /*#__PURE__*/ function(PlanPricingType) {\n PlanPricingType[PlanPricingType[\"None\"] = 1] = \"None\";\n PlanPricingType[PlanPricingType[\"VM\"] = 2] = \"VM\";\n PlanPricingType[PlanPricingType[\"SimplePlanPricing\"] = 3] = \"SimplePlanPricing\";\n PlanPricingType[PlanPricingType[\"SolutionTemplate\"] = 4] = \"SolutionTemplate\";\n return PlanPricingType;\n}({});\n(function(Plan) {\n Plan.displayRank = 'displayRank';\n})(Plan || (Plan = {}));\nexport const supportedCountries = [\n {\n countryCode: 'AF',\n name: 'Afghanistan',\n currencyCode: 'USD',\n consentRequired: \"unknown\"\n },\n {\n countryCode: 'AL',\n name: 'Albania',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'DZ',\n name: 'Algeria',\n currencyCode: 'USD',\n consentRequired: \"optout\"\n },\n {\n countryCode: 'AD',\n name: 'Andorra',\n currencyCode: 'EUR',\n consentRequired: \"unknown\"\n },\n {\n countryCode: 'AO',\n name: 'Angola',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'AR',\n name: 'Argentina',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'AM',\n name: 'Armenia',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'AU',\n name: 'Australia',\n currencyCode: 'AUD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'AT',\n name: 'Austria',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'AZ',\n name: 'Azerbaijan',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'BH',\n name: 'Bahrain',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'BD',\n name: 'Bangladesh',\n currencyCode: 'USD',\n consentRequired: \"unknown\"\n },\n {\n countryCode: 'BB',\n name: 'Barbados',\n currencyCode: 'USD',\n consentRequired: \"unknown\"\n },\n {\n countryCode: 'BY',\n name: 'Belarus',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'BE',\n name: 'Belgium',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'BZ',\n name: 'Belize',\n currencyCode: 'USD',\n consentRequired: \"unknown\"\n },\n {\n countryCode: 'BM',\n name: 'Bermuda',\n currencyCode: 'USD',\n consentRequired: \"unknown\"\n },\n {\n countryCode: 'BO',\n name: 'Bolivia',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'BA',\n name: 'Bosnia and Herzegovina',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'BW',\n name: 'Botswana',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'BR',\n name: 'Brazil',\n currencyCode: 'BRL',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'BN',\n name: 'Brunei',\n currencyCode: 'USD',\n consentRequired: \"unknown\"\n },\n {\n countryCode: 'BG',\n name: 'Bulgaria',\n currencyCode: 'EUR',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'CM',\n name: 'Cameroon',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'CA',\n name: 'Canada',\n currencyCode: 'CAD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'CV',\n name: 'Cabo Verde',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'KY',\n name: 'Cayman Islands',\n currencyCode: 'USD',\n consentRequired: \"unknown\"\n },\n {\n countryCode: 'CL',\n name: 'Chile',\n currencyCode: 'USD',\n consentRequired: \"optout\"\n },\n {\n countryCode: 'CO',\n name: 'Colombia',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'CR',\n name: 'Costa Rica',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'CI',\n name: 'Côte d\"Ivoire',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'HR',\n name: 'Croatia',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'CW',\n name: 'Curaçao',\n currencyCode: 'USD',\n consentRequired: \"unknown\"\n },\n {\n countryCode: 'CY',\n name: 'Cyprus',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'CZ',\n name: 'Czech Republic',\n currencyCode: 'CZK',\n consentRequired: \"optout\"\n },\n {\n countryCode: 'DK',\n name: 'Denmark',\n currencyCode: 'DKK',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'DO',\n name: 'Dominican Republic',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'EC',\n name: 'Ecuador',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'EG',\n name: 'Egypt',\n currencyCode: 'EGP',\n consentRequired: \"optout\"\n },\n {\n countryCode: 'SV',\n name: 'El Salvador',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'EE',\n name: 'Estonia',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'ET',\n name: 'Ethiopia',\n currencyCode: 'USD',\n consentRequired: \"optout\"\n },\n {\n countryCode: 'FO',\n name: 'Faroe Islands',\n currencyCode: 'DKK',\n consentRequired: \"unknown\"\n },\n {\n countryCode: 'FJ',\n name: 'Fiji',\n currencyCode: 'AUD',\n consentRequired: \"unknown\"\n },\n {\n countryCode: 'FI',\n name: 'Finland',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'FR',\n name: 'France',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'GE',\n name: 'Georgia',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'DE',\n name: 'Germany',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'GH',\n name: 'Ghana',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'GR',\n name: 'Greece',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'GT',\n name: 'Guatemala',\n currencyCode: 'USD',\n consentRequired: \"optout\"\n },\n {\n countryCode: 'HN',\n name: 'Honduras',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'HK',\n name: 'Hong Kong SAR',\n currencyCode: 'USD',\n consentRequired: \"optout\"\n },\n {\n countryCode: 'HU',\n name: 'Hungary',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'IS',\n name: 'Iceland',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'IN',\n name: 'India',\n currencyCode: 'INR',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'ID',\n name: 'Indonesia',\n currencyCode: 'USD',\n consentRequired: \"optout\"\n },\n {\n countryCode: 'IQ',\n name: 'Iraq',\n currencyCode: 'USD',\n consentRequired: \"optout\"\n },\n {\n countryCode: 'IE',\n name: 'Ireland',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'IL',\n name: 'Israel',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'IT',\n name: 'Italy',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'JM',\n name: 'Jamaica',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'JP',\n name: 'Japan',\n currencyCode: 'JPY',\n consentRequired: \"optout\"\n },\n {\n countryCode: 'JO',\n name: 'Jordan',\n currencyCode: 'USD',\n consentRequired: \"optout\"\n },\n {\n countryCode: 'KZ',\n name: 'Kazakhstan',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'KE',\n name: 'Kenya',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'KR',\n name: 'Korea (South)',\n currencyCode: 'KRW',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'KW',\n name: 'Kuwait',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'KG',\n name: 'Kyrgyzstan',\n currencyCode: 'USD',\n consentRequired: \"exclude\"\n },\n {\n countryCode: 'LV',\n name: 'Latvia',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'LB',\n name: 'Lebanon',\n currencyCode: 'USD',\n consentRequired: \"optout\"\n },\n {\n countryCode: 'LY',\n name: 'Libya',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'LI',\n name: 'Liechtenstein',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'LT',\n name: 'Lithuania',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'LU',\n name: 'Luxembourg',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'MO',\n name: 'Macao SAR',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'MK',\n name: 'North Macedonia',\n currencyCode: 'USD',\n consentRequired: \"optout\"\n },\n {\n countryCode: 'MY',\n name: 'Malaysia',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'MT',\n name: 'Malta',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'MU',\n name: 'Mauritius',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'MX',\n name: 'Mexico',\n currencyCode: 'USD',\n consentRequired: \"optout\"\n },\n {\n countryCode: 'MD',\n name: 'Moldova',\n currencyCode: 'USD',\n consentRequired: \"unknown\"\n },\n {\n countryCode: 'MC',\n name: 'Monaco',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'MN',\n name: 'Mongolia',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'ME',\n name: 'Montenegro',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'MA',\n name: 'Morocco',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'NA',\n name: 'Namibia',\n currencyCode: 'USD',\n consentRequired: \"optout\"\n },\n {\n countryCode: 'NP',\n name: 'Nepal',\n currencyCode: 'USD',\n consentRequired: \"unknown\"\n },\n {\n countryCode: 'NL',\n name: 'Netherlands',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'NI',\n name: 'Nicaragua',\n currencyCode: 'USD',\n consentRequired: \"unknown\"\n },\n {\n countryCode: 'NZ',\n name: 'New Zealand',\n currencyCode: 'NZD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'NG',\n name: 'Nigeria',\n currencyCode: 'USD',\n consentRequired: \"optout\"\n },\n {\n countryCode: 'NO',\n name: 'Norway',\n currencyCode: 'NOK',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'OM',\n name: 'Oman',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'PK',\n name: 'Pakistan',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'PS',\n name: 'Palestinian Authority',\n currencyCode: 'USD',\n consentRequired: \"unknown\"\n },\n {\n countryCode: 'PA',\n name: 'Panama',\n currencyCode: 'USD',\n consentRequired: \"optout\"\n },\n {\n countryCode: 'PY',\n name: 'Paraguay',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'PE',\n name: 'Peru',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'PH',\n name: 'Philippines',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'PL',\n name: 'Poland',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'PT',\n name: 'Portugal',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'PR',\n name: 'Puerto Rico',\n currencyCode: 'USD',\n consentRequired: \"unknown\"\n },\n {\n countryCode: 'QA',\n name: 'Qatar',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'RO',\n name: 'Romania',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'RU',\n name: 'Russia',\n currencyCode: 'RUB',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'RW',\n name: 'Rwanda',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'KN',\n name: 'Saint Kitts and Nevis',\n currencyCode: 'USD',\n consentRequired: \"unknown\"\n },\n {\n countryCode: 'SA',\n name: 'Saudi Arabia',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'SN',\n name: 'Senegal',\n currencyCode: 'USD',\n consentRequired: \"optout\"\n },\n {\n countryCode: 'RS',\n name: 'Serbia',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'SG',\n name: 'Singapore',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'SK',\n name: 'Slovakia',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'SI',\n name: 'Slovenia',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'ZA',\n name: 'South Africa',\n currencyCode: 'USD',\n consentRequired: \"optout\"\n },\n {\n countryCode: 'ES',\n name: 'Spain',\n currencyCode: 'EUR',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'LK',\n name: 'Sri Lanka',\n currencyCode: 'USD',\n consentRequired: \"unknown\"\n },\n {\n countryCode: 'SE',\n name: 'Sweden',\n currencyCode: 'SEK',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'CH',\n name: 'Switzerland',\n currencyCode: 'CHF',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'TW',\n name: 'Taiwan',\n currencyCode: 'TWD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'TJ',\n name: 'Tajikistan',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'TZ',\n name: 'Tanzania',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'TH',\n name: 'Thailand',\n currencyCode: 'USD',\n consentRequired: \"optout\"\n },\n {\n countryCode: 'TT',\n name: 'Trinidad and Tobago',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'TN',\n name: 'Tunisia',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'TR',\n name: 'Turkey',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'TM',\n name: 'Turkmenistan',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'VA',\n name: 'Vatican City (Holy See)',\n currencyCode: 'EUR',\n consentRequired: \"unknown\"\n },\n {\n countryCode: 'VI',\n name: 'Virgin Islands of the United States',\n currencyCode: 'USD',\n consentRequired: \"unknown\"\n },\n {\n countryCode: 'UG',\n name: 'Uganda',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'UA',\n name: 'Ukraine',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'AE',\n name: 'United Arab Emirates',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'GB',\n name: 'United Kingdom',\n currencyCode: 'GB',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'US',\n name: 'United States',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'UY',\n name: 'Uruguay',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'UZ',\n name: 'Uzbekistan',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'VE',\n name: 'Venezuela',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'VN',\n name: 'Vietnam',\n currencyCode: 'USD',\n consentRequired: \"optin\"\n },\n {\n countryCode: 'YE',\n name: 'Yemen',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'ZM',\n name: 'Zambia',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n },\n {\n countryCode: 'ZW',\n name: 'Zimbabwe',\n currencyCode: 'USD',\n consentRequired: \"notice\"\n }\n];\nexport var Environment = /*#__PURE__*/ function(Environment) {\n Environment[\"Development\"] = \"development\";\n Environment[\"Dogfood\"] = \"df\";\n Environment[\"Canary\"] = \"canary\";\n Environment[\"Test\"] = \"test\";\n Environment[\"Production\"] = \"prod\";\n return Environment;\n}({});\nexport const UNAUTHENTICATED_ROUTES = {\n '/api/log': false,\n '/api/logOutRequests': false,\n '/view': false,\n '/api': false,\n '/api/userreview': true\n};\nexport var OneDSEnvs = /*#__PURE__*/ function(OneDSEnvs) {\n OneDSEnvs[\"Production\"] = \"production\";\n OneDSEnvs[\"Canary\"] = \"preprod\";\n OneDSEnvs[\"Dogfood\"] = \"ppe\";\n OneDSEnvs[\"Internal\"] = \"dev\";\n OneDSEnvs[\"Test\"] = \"test\";\n return OneDSEnvs;\n}({});\nexport const LocalizationSettings = {\n defaultLng: 'en-US',\n defaultNS: 'header'\n};\nexport const ResourcesFiles = {\n resources: 'resources',\n resourcesMac: 'resourcesMac',\n resourcesAppSource: 'resourcesAppSource',\n header: 'header',\n search: 'search',\n home: 'home',\n taxonomy: 'taxonomy'\n};\nexport var AwaMetaTags = /*#__PURE__*/ function(AwaMetaTags) {\n AwaMetaTags[\"correlationId\"] = \"awa-correlationId\";\n AwaMetaTags[\"locale\"] = \"awa-locale\";\n AwaMetaTags[\"signedIn\"] = \"awa-signedIn\";\n AwaMetaTags[\"version\"] = \"awa-version\";\n AwaMetaTags[\"region\"] = \"awa-region\";\n return AwaMetaTags;\n}({});\nexport var LocaleStringStyles = /*#__PURE__*/ function(LocaleStringStyles) {\n LocaleStringStyles[\"Currency\"] = \"currency\";\n return LocaleStringStyles;\n}({});\nexport const allBillingCountries = [\n {\n name: 'United States',\n transactable: true,\n countryCode: 'US',\n currency: 'USD'\n },\n {\n name: 'Afghanistan',\n transactable: true,\n countryCode: 'AF',\n currency: 'USD'\n },\n {\n name: 'Ã…land Islands',\n currency: 'USD',\n countryCode: 'AX'\n },\n {\n name: 'Albania',\n transactable: true,\n countryCode: 'AL',\n currency: 'USD'\n },\n {\n name: 'Algeria',\n transactable: true,\n countryCode: 'DZ',\n currency: 'USD'\n },\n {\n name: 'American Samoa',\n countryCode: 'AS',\n currency: 'USD'\n },\n {\n name: 'Andorra',\n transactable: true,\n countryCode: 'AD',\n currency: 'EUR'\n },\n {\n name: 'Angola',\n transactable: true,\n countryCode: 'AO',\n currency: 'USD'\n },\n {\n name: 'Anguilla',\n countryCode: 'AI',\n currency: 'USD'\n },\n {\n name: 'Antarctica',\n countryCode: 'AQ',\n currency: 'USD'\n },\n {\n name: 'Antigua and Barbuda',\n countryCode: 'AG',\n currency: 'USD'\n },\n {\n name: 'Argentina',\n transactable: true,\n countryCode: 'AR',\n currency: 'USD'\n },\n {\n name: 'Armenia',\n transactable: true,\n countryCode: 'AM',\n currency: 'USD'\n },\n {\n name: 'Aruba',\n countryCode: 'AW',\n currency: 'USD'\n },\n {\n name: 'Australia',\n transactable: true,\n countryCode: 'AU',\n currency: 'AUD'\n },\n {\n name: 'Austria',\n transactable: true,\n countryCode: 'AT',\n currency: 'EUR'\n },\n {\n name: 'Azerbaijan',\n transactable: true,\n countryCode: 'AZ',\n currency: 'USD'\n },\n {\n name: 'Bahamas',\n countryCode: 'BS',\n currency: 'USD'\n },\n {\n name: 'Bahrain',\n transactable: true,\n countryCode: 'BH',\n currency: 'USD'\n },\n {\n name: 'Bangladesh',\n transactable: true,\n countryCode: 'BD',\n currency: 'USD'\n },\n {\n name: 'Barbados',\n transactable: true,\n countryCode: 'BB',\n currency: 'USD'\n },\n {\n name: 'Belarus',\n transactable: true,\n countryCode: 'BY',\n currency: 'USD'\n },\n {\n name: 'Belgium',\n transactable: true,\n countryCode: 'BE',\n currency: 'EUR'\n },\n {\n name: 'Belize',\n transactable: true,\n countryCode: 'BZ',\n currency: 'USD'\n },\n {\n name: 'Benin',\n countryCode: 'BJ',\n currency: 'USD'\n },\n {\n name: 'Bermuda',\n transactable: true,\n countryCode: 'BM',\n currency: 'USD'\n },\n {\n name: 'Bhutan',\n countryCode: 'BT',\n currency: 'USD'\n },\n {\n name: 'Bolivia',\n transactable: true,\n countryCode: 'BO',\n currency: 'USD'\n },\n {\n name: 'Bonaire, Saint Eustatius and Saba',\n countryCode: 'BQ',\n currency: 'USD'\n },\n {\n name: 'Bosnia and Herzegovina',\n transactable: true,\n countryCode: 'BA',\n currency: 'USD'\n },\n {\n name: 'Botswana',\n transactable: true,\n countryCode: 'BW',\n currency: 'USD'\n },\n {\n name: 'Bouvet Island',\n countryCode: 'BV',\n currency: 'USD'\n },\n {\n name: 'Brazil',\n transactable: true,\n countryCode: 'BR',\n currency: 'BRL'\n },\n {\n name: 'British Indian Ocean Territory',\n countryCode: 'IO',\n currency: 'USD'\n },\n {\n name: 'British Virgin Islands',\n countryCode: 'VG',\n currency: 'USD'\n },\n {\n name: 'Brunei',\n transactable: true,\n countryCode: 'BN',\n currency: 'USD'\n },\n {\n name: 'Bulgaria',\n transactable: true,\n countryCode: 'BG',\n currency: 'EUR'\n },\n {\n name: 'Burkina Faso',\n countryCode: 'BF',\n currency: 'USD'\n },\n {\n name: 'Burundi',\n countryCode: 'BI',\n currency: 'USD'\n },\n {\n name: 'Cabo Verde',\n transactable: true,\n countryCode: 'CV',\n currency: 'USD'\n },\n {\n name: 'Cambodia',\n countryCode: 'KH',\n currency: 'KHR'\n },\n {\n name: 'Cameroon',\n transactable: true,\n countryCode: 'CM',\n currency: 'USD'\n },\n {\n name: 'Canada',\n transactable: true,\n countryCode: 'CA',\n currency: 'CAD'\n },\n {\n name: 'Cayman Islands',\n transactable: true,\n countryCode: 'KY',\n currency: 'USD'\n },\n {\n name: 'Central African Republic',\n countryCode: 'CF',\n currency: 'USD'\n },\n {\n name: 'Chad',\n countryCode: 'TD',\n currency: 'USD'\n },\n {\n name: 'Chile',\n transactable: true,\n countryCode: 'CL',\n currency: 'USD'\n },\n {\n name: 'China',\n countryCode: 'CN',\n currency: 'CNY'\n },\n {\n name: 'Christmas Island',\n countryCode: 'CX',\n currency: 'USD'\n },\n {\n name: 'Cocos (Keeling) Islands',\n countryCode: 'CC',\n currency: 'USD'\n },\n {\n name: 'Colombia',\n transactable: true,\n countryCode: 'CO',\n currency: 'USD'\n },\n {\n name: 'Comoros',\n countryCode: 'KM',\n currency: 'USD'\n },\n {\n name: 'Congo',\n countryCode: 'CG',\n currency: 'USD'\n },\n {\n name: 'Congo (DRC)',\n countryCode: 'CD',\n currency: 'USD'\n },\n {\n name: 'Cook Islands',\n countryCode: 'CK',\n currency: 'USD'\n },\n {\n name: 'Costa Rica',\n transactable: true,\n countryCode: 'CR',\n currency: 'USD'\n },\n {\n name: \"Côte d'Ivoire\",\n transactable: true,\n countryCode: 'CI',\n currency: 'USD'\n },\n {\n name: 'Croatia',\n transactable: true,\n countryCode: 'HR',\n currency: 'EUR'\n },\n {\n name: 'Curaçao',\n transactable: true,\n countryCode: 'CW',\n currency: 'USD'\n },\n {\n name: 'Cyprus',\n transactable: true,\n countryCode: 'CY',\n currency: 'EUR'\n },\n {\n name: 'Czechia',\n transactable: true,\n countryCode: 'CZ',\n currency: 'EUR'\n },\n {\n name: 'Denmark',\n transactable: true,\n countryCode: 'DK',\n currency: 'DKK'\n },\n {\n name: 'Djibouti',\n countryCode: 'DJ',\n currency: 'USD'\n },\n {\n name: 'Dominica',\n countryCode: 'DM',\n currency: 'USD'\n },\n {\n name: 'Dominican Republic',\n transactable: true,\n countryCode: 'DO',\n currency: 'USD'\n },\n {\n name: 'Ecuador',\n transactable: true,\n countryCode: 'EC',\n currency: 'USD'\n },\n {\n name: 'Egypt',\n transactable: true,\n countryCode: 'EG',\n currency: 'USD'\n },\n {\n name: 'El Salvador',\n transactable: true,\n countryCode: 'SV',\n currency: 'USD'\n },\n {\n name: 'Equatorial Guinea',\n countryCode: 'GQ',\n currency: 'USD'\n },\n {\n name: 'Eritrea',\n countryCode: 'ER',\n currency: 'USD'\n },\n {\n name: 'Estonia',\n transactable: true,\n countryCode: 'EE',\n currency: 'EUR'\n },\n {\n name: 'Ethiopia',\n transactable: true,\n countryCode: 'ET',\n currency: 'USD'\n },\n {\n name: 'Falkland Islands',\n countryCode: 'FK',\n currency: 'USD'\n },\n {\n name: 'Faroe Islands',\n transactable: true,\n countryCode: 'FO',\n currency: 'DKK'\n },\n {\n name: 'Fiji',\n transactable: true,\n countryCode: 'FJ',\n currency: 'AUD'\n },\n {\n name: 'Finland',\n transactable: true,\n countryCode: 'FI',\n currency: 'EUR'\n },\n {\n name: 'France',\n transactable: true,\n countryCode: 'FR',\n currency: 'EUR'\n },\n {\n name: 'French Guiana',\n countryCode: 'GF',\n currency: 'USD'\n },\n {\n name: 'French Polynesia',\n countryCode: 'PF',\n currency: 'USD'\n },\n {\n name: 'French Southern Territories',\n countryCode: 'TF',\n currency: 'USD'\n },\n {\n name: 'Gabon',\n countryCode: 'GA',\n currency: 'USD'\n },\n {\n name: 'Gambia',\n countryCode: 'GM',\n currency: 'USD'\n },\n {\n name: 'Georgia',\n transactable: true,\n countryCode: 'GE',\n currency: 'USD'\n },\n {\n name: 'Germany',\n transactable: true,\n countryCode: 'DE',\n currency: 'EUR'\n },\n {\n name: 'Ghana',\n transactable: true,\n countryCode: 'GH',\n currency: 'USD'\n },\n {\n name: 'Gibraltar',\n countryCode: 'GI',\n currency: 'EUR'\n },\n {\n name: 'Greece',\n transactable: true,\n countryCode: 'GR',\n currency: 'EUR'\n },\n {\n name: 'Greenland',\n countryCode: 'GL',\n currency: 'USD'\n },\n {\n name: 'Grenada',\n countryCode: 'GD',\n currency: 'USD'\n },\n {\n name: 'Guadeloupe',\n countryCode: 'GP',\n currency: 'USD'\n },\n {\n name: 'Guam',\n countryCode: 'GU',\n currency: 'USD'\n },\n {\n name: 'Guatemala',\n transactable: true,\n countryCode: 'GT',\n currency: 'USD'\n },\n {\n name: 'Guernsey',\n countryCode: 'GG',\n currency: 'EUR'\n },\n {\n name: 'Guinea',\n countryCode: 'GN',\n currency: 'USD'\n },\n {\n name: 'Guinea-Bissau',\n countryCode: 'GW',\n currency: 'USD'\n },\n {\n name: 'Guyana',\n countryCode: 'GY',\n currency: 'USD'\n },\n {\n name: 'Haiti',\n countryCode: 'HT',\n currency: 'USD'\n },\n {\n name: 'Heard Island and McDonald Islands',\n countryCode: 'HM',\n currency: 'USD'\n },\n {\n name: 'Honduras',\n transactable: true,\n countryCode: 'HN',\n currency: 'USD'\n },\n {\n name: 'Hong Kong SAR',\n transactable: true,\n countryCode: 'HK',\n currency: 'USD'\n },\n {\n name: 'Hungary',\n transactable: true,\n countryCode: 'HU',\n currency: 'EUR'\n },\n {\n name: 'Iceland',\n transactable: true,\n countryCode: 'IS',\n currency: 'EUR'\n },\n {\n name: 'India',\n transactable: true,\n countryCode: 'IN',\n currency: 'INR'\n },\n {\n name: 'Indonesia',\n transactable: true,\n countryCode: 'ID',\n currency: 'USD'\n },\n {\n name: 'Iraq',\n transactable: true,\n countryCode: 'IQ',\n currency: 'USD'\n },\n {\n name: 'Ireland',\n transactable: true,\n countryCode: 'IE',\n currency: 'EUR'\n },\n {\n name: 'Isle of Man',\n countryCode: 'IM',\n currency: 'USD'\n },\n {\n name: 'Israel',\n transactable: true,\n countryCode: 'IL',\n currency: 'USD'\n },\n {\n name: 'Italy',\n transactable: true,\n countryCode: 'IT',\n currency: 'EUR'\n },\n {\n name: 'Jamaica',\n transactable: true,\n countryCode: 'JM',\n currency: 'USD'\n },\n {\n name: 'Japan',\n transactable: true,\n countryCode: 'JP',\n currency: 'JPY'\n },\n {\n name: 'Jersey',\n countryCode: 'JE',\n currency: 'EUR'\n },\n {\n name: 'Jordan',\n transactable: true,\n countryCode: 'JO',\n currency: 'USD'\n },\n {\n name: 'Kazakhstan',\n transactable: true,\n countryCode: 'KZ',\n currency: 'USD'\n },\n {\n name: 'Kenya',\n transactable: true,\n countryCode: 'KE',\n currency: 'USD'\n },\n {\n name: 'Kiribati',\n countryCode: 'KI',\n currency: 'USD'\n },\n {\n name: 'Korea (South)',\n transactable: true,\n countryCode: 'KR',\n currency: 'KRW'\n },\n {\n name: 'Kosovo',\n countryCode: 'XK',\n currency: 'USD'\n },\n {\n name: 'Kuwait',\n transactable: true,\n countryCode: 'KW',\n currency: 'USD'\n },\n {\n name: 'Kyrgyzstan',\n transactable: true,\n countryCode: 'KG',\n currency: 'USD'\n },\n {\n name: 'Laos',\n countryCode: 'LA',\n currency: 'USD'\n },\n {\n name: 'Latvia',\n transactable: true,\n countryCode: 'LV',\n currency: 'EUR'\n },\n {\n name: 'Lebanon',\n transactable: true,\n countryCode: 'LB',\n currency: 'USD'\n },\n {\n name: 'Lesotho',\n countryCode: 'LS',\n currency: 'USD'\n },\n {\n name: 'Liberia',\n countryCode: 'LR',\n currency: 'USD'\n },\n {\n name: 'Libya',\n transactable: true,\n countryCode: 'LY',\n currency: 'USD'\n },\n {\n name: 'Liechtenstein',\n transactable: true,\n countryCode: 'LI',\n currency: 'EUR'\n },\n {\n name: 'Lithuania',\n transactable: true,\n countryCode: 'LT',\n currency: 'EUR'\n },\n {\n name: 'Luxembourg',\n transactable: true,\n countryCode: 'LU',\n currency: 'EUR'\n },\n {\n name: 'Macao SAR',\n transactable: true,\n countryCode: 'MO',\n currency: 'USD'\n },\n {\n name: 'Madagascar',\n countryCode: 'MG',\n currency: 'USD'\n },\n {\n name: 'Malawi',\n countryCode: 'MW',\n currency: 'USD'\n },\n {\n name: 'Malaysia',\n transactable: true,\n countryCode: 'MY',\n currency: 'USD'\n },\n {\n name: 'Maldives',\n countryCode: 'MV',\n currency: 'USD'\n },\n {\n name: 'Mali',\n countryCode: 'ML',\n currency: 'USD'\n },\n {\n name: 'Malta',\n transactable: true,\n countryCode: 'MT',\n currency: 'EUR'\n },\n {\n name: 'Marshall Islands',\n countryCode: 'MH',\n currency: 'USD'\n },\n {\n name: 'Martinique',\n countryCode: 'MQ',\n currency: 'EUR'\n },\n {\n name: 'Mauritania',\n countryCode: 'MR',\n currency: 'MRO'\n },\n {\n name: 'Mauritius',\n transactable: true,\n countryCode: 'MU',\n currency: 'USD'\n },\n {\n name: 'Mayotte',\n countryCode: 'YT',\n currency: 'EUR'\n },\n {\n name: 'Mexico',\n transactable: true,\n countryCode: 'MX',\n currency: 'USD'\n },\n {\n name: 'Micronesia',\n countryCode: 'FM',\n currency: 'USD'\n },\n {\n name: 'Moldova',\n transactable: true,\n countryCode: 'MD',\n currency: 'USD'\n },\n {\n name: 'Monaco',\n transactable: true,\n countryCode: 'MC',\n currency: 'EUR'\n },\n {\n name: 'Mongolia',\n transactable: true,\n countryCode: 'MN',\n currency: 'USD'\n },\n {\n name: 'Montenegro',\n transactable: true,\n countryCode: 'ME',\n currency: 'USD'\n },\n {\n name: 'Montserrat',\n countryCode: 'MS',\n currency: 'USD'\n },\n {\n name: 'Morocco',\n transactable: true,\n countryCode: 'MA',\n currency: 'USD'\n },\n {\n name: 'Mozambique',\n countryCode: 'MZ',\n currency: 'USD'\n },\n {\n name: 'Myanmar',\n countryCode: 'MM',\n currency: 'USD'\n },\n {\n name: 'Namibia',\n transactable: true,\n countryCode: 'NA',\n currency: 'USD'\n },\n {\n name: 'Nauru',\n countryCode: 'NR',\n currency: 'USD'\n },\n {\n name: 'Nepal',\n transactable: true,\n countryCode: 'NP',\n currency: 'USD'\n },\n {\n name: 'Netherlands',\n transactable: true,\n countryCode: 'NL',\n currency: 'EUR'\n },\n {\n name: 'New Caledonia',\n countryCode: 'NC',\n currency: 'USD'\n },\n {\n name: 'New Zealand',\n transactable: true,\n countryCode: 'NZ',\n currency: 'NZD'\n },\n {\n name: 'Nicaragua',\n transactable: true,\n countryCode: 'NI',\n currency: 'USD'\n },\n {\n name: 'Niger',\n countryCode: 'NE',\n currency: 'USD'\n },\n {\n name: 'Nigeria',\n transactable: true,\n countryCode: 'NG',\n currency: 'USD'\n },\n {\n name: 'Niue',\n countryCode: 'NU',\n currency: 'USD'\n },\n {\n name: 'Norfolk Island',\n countryCode: 'NF',\n currency: 'USD'\n },\n {\n name: 'North Macedonia',\n transactable: true,\n countryCode: 'MK',\n currency: 'USD'\n },\n {\n name: 'Northern Mariana Islands',\n countryCode: 'MP',\n currency: 'USD'\n },\n {\n name: 'Norway',\n transactable: true,\n countryCode: 'NO',\n currency: 'NOK'\n },\n {\n name: 'Oman',\n transactable: true,\n countryCode: 'OM',\n currency: 'USD'\n },\n {\n name: 'Pakistan',\n transactable: true,\n countryCode: 'PK',\n currency: 'USD'\n },\n {\n name: 'Palau',\n countryCode: 'PW',\n currency: 'USD'\n },\n {\n name: 'Palestinian Authority',\n transactable: true,\n countryCode: 'PS',\n currency: 'USD'\n },\n {\n name: 'Panama',\n transactable: true,\n countryCode: 'PA',\n currency: 'USD'\n },\n {\n name: 'Papua New Guinea',\n countryCode: 'PG',\n currency: 'USD'\n },\n {\n name: 'Paraguay',\n transactable: true,\n countryCode: 'PY',\n currency: 'USD'\n },\n {\n name: 'Peru',\n transactable: true,\n countryCode: 'PE',\n currency: 'USD'\n },\n {\n name: 'Philippines',\n transactable: true,\n countryCode: 'PH',\n currency: 'USD'\n },\n {\n name: 'Pitcairn Islands',\n countryCode: 'PN',\n currency: 'USD'\n },\n {\n name: 'Poland',\n transactable: true,\n countryCode: 'PL',\n currency: 'EUR'\n },\n {\n name: 'Portugal',\n transactable: true,\n countryCode: 'PT',\n currency: 'EUR'\n },\n {\n name: 'Puerto Rico',\n transactable: true,\n countryCode: 'PR',\n currency: 'USD'\n },\n {\n name: 'Qatar',\n transactable: true,\n countryCode: 'QA',\n currency: 'USD'\n },\n {\n name: 'Réunion',\n countryCode: 'RE',\n currency: 'EUR'\n },\n {\n name: 'Romania',\n transactable: true,\n countryCode: 'RO',\n currency: 'EUR'\n },\n {\n name: 'Russia',\n transactable: true,\n countryCode: 'RU',\n currency: 'RUB'\n },\n {\n name: 'Rwanda',\n transactable: true,\n countryCode: 'RW',\n currency: 'USD'\n },\n {\n name: 'Saint Barthélemy',\n countryCode: 'BL',\n currency: 'EUR'\n },\n {\n name: 'Saint Helena, Ascension, Tristan da Cunha',\n countryCode: 'SH',\n currency: 'EUR'\n },\n {\n name: 'Saint Kitts and Nevis',\n transactable: true,\n countryCode: 'KN',\n currency: 'USD'\n },\n {\n name: 'Saint Lucia',\n countryCode: 'LC',\n currency: 'USD'\n },\n {\n name: 'Saint Martin',\n countryCode: 'MF',\n currency: 'USD'\n },\n {\n name: 'Saint Pierre and Miquelon',\n countryCode: 'PM',\n currency: 'USD'\n },\n {\n name: 'Saint Vincent and the Grenadines',\n countryCode: 'VC',\n currency: 'USD'\n },\n {\n name: 'Samoa',\n countryCode: 'WS',\n currency: 'USD'\n },\n {\n name: 'San Marino',\n countryCode: 'SM',\n currency: 'EUR'\n },\n {\n name: 'São Tomé and PrÃncipe',\n countryCode: 'ST',\n currency: 'USD'\n },\n {\n name: 'Saudi Arabia',\n transactable: true,\n countryCode: 'SA',\n currency: 'USD'\n },\n {\n name: 'Senegal',\n transactable: true,\n countryCode: 'SN',\n currency: 'USD'\n },\n {\n name: 'Serbia',\n transactable: true,\n countryCode: 'RS',\n currency: 'USD'\n },\n {\n name: 'Seychelles',\n countryCode: 'SC',\n currency: 'USD'\n },\n {\n name: 'Sierra Leone',\n countryCode: 'SL',\n currency: 'USD'\n },\n {\n name: 'Singapore',\n transactable: true,\n countryCode: 'SG',\n currency: 'USD'\n },\n {\n name: 'Sint Maarten',\n countryCode: 'SX',\n currency: 'USD'\n },\n {\n name: 'Slovakia',\n transactable: true,\n countryCode: 'SK',\n currency: 'EUR'\n },\n {\n name: 'Slovenia',\n transactable: true,\n countryCode: 'SI',\n currency: 'EUR'\n },\n {\n name: 'Solomon Islands',\n countryCode: 'SB',\n currency: 'USD'\n },\n {\n name: 'Somalia',\n countryCode: 'SO',\n currency: 'USD'\n },\n {\n name: 'South Africa',\n transactable: true,\n countryCode: 'ZA',\n currency: 'USD'\n },\n {\n name: 'South Georgia and South Sandwich Islands',\n countryCode: 'GS',\n currency: 'USD'\n },\n {\n name: 'South Sudan',\n countryCode: 'SS',\n currency: 'USD'\n },\n {\n name: 'Spain',\n transactable: true,\n countryCode: 'ES',\n currency: 'EUR'\n },\n {\n name: 'Sri Lanka',\n transactable: true,\n countryCode: 'LK',\n currency: 'USD'\n },\n {\n name: 'Suriname',\n countryCode: 'SR',\n currency: 'USD'\n },\n {\n name: 'Svalbard and Jan Mayen',\n countryCode: 'SJ',\n currency: 'USD'\n },\n {\n name: 'Swaziland',\n countryCode: 'SZ',\n currency: 'USD'\n },\n {\n name: 'Sweden',\n transactable: true,\n countryCode: 'SE',\n currency: 'SEK'\n },\n {\n name: 'Switzerland',\n transactable: true,\n countryCode: 'CH',\n currency: 'CHF'\n },\n {\n name: 'Taiwan',\n transactable: true,\n countryCode: 'TW',\n currency: 'TWD'\n },\n {\n name: 'Tajikistan',\n transactable: true,\n countryCode: 'TJ',\n currency: 'USD'\n },\n {\n name: 'Tanzania',\n transactable: true,\n countryCode: 'TZ',\n currency: 'USD'\n },\n {\n name: 'Thailand',\n transactable: true,\n countryCode: 'TH',\n currency: 'USD'\n },\n {\n name: 'Timor-Leste',\n countryCode: 'TL',\n currency: 'USD'\n },\n {\n name: 'Togo',\n countryCode: 'TG',\n currency: 'USD'\n },\n {\n name: 'Tokelau',\n countryCode: 'TK',\n currency: 'USD'\n },\n {\n name: 'Tonga',\n countryCode: 'TO',\n currency: 'USD'\n },\n {\n name: 'Trinidad and Tobago',\n transactable: true,\n countryCode: 'TT',\n currency: 'USD'\n },\n {\n name: 'Tunisia',\n transactable: true,\n countryCode: 'TN',\n currency: 'USD'\n },\n {\n name: 'Turkey',\n transactable: true,\n countryCode: 'TR',\n currency: 'USD'\n },\n {\n name: 'Turkmenistan',\n transactable: true,\n countryCode: 'TM',\n currency: 'USD'\n },\n {\n name: 'Turks and Caicos Islands',\n countryCode: 'TC',\n currency: 'USD'\n },\n {\n name: 'Tuvalu',\n countryCode: 'TV',\n currency: 'USD'\n },\n {\n name: 'U.S. Outlying Islands',\n countryCode: 'UM',\n currency: 'USD'\n },\n {\n name: 'U.S. Virgin Islands',\n transactable: true,\n countryCode: 'VI',\n currency: 'USD'\n },\n {\n name: 'Uganda',\n transactable: true,\n countryCode: 'UG',\n currency: 'USD'\n },\n {\n name: 'Ukraine',\n transactable: true,\n countryCode: 'UA',\n currency: 'USD'\n },\n {\n name: 'United Arab Emirates',\n transactable: true,\n countryCode: 'AE',\n currency: 'USD'\n },\n {\n name: 'United Kingdom',\n transactable: true,\n countryCode: 'GB',\n currency: 'GBP'\n },\n {\n name: 'Uruguay',\n transactable: true,\n countryCode: 'UY',\n currency: 'USD'\n },\n {\n name: 'Uzbekistan',\n transactable: true,\n countryCode: 'UZ',\n currency: 'USD'\n },\n {\n name: 'Vanuatu',\n countryCode: 'VU',\n currency: 'USD'\n },\n {\n name: 'Vatican City (Holy See)',\n transactable: true,\n countryCode: 'VA',\n currency: 'EUR'\n },\n {\n name: 'Venezuela',\n transactable: true,\n countryCode: 'VE',\n currency: 'USD'\n },\n {\n name: 'Vietnam',\n transactable: true,\n countryCode: 'VN',\n currency: 'USD'\n },\n {\n name: 'Wallis and Futuna',\n countryCode: 'WF',\n currency: 'USD'\n },\n {\n name: 'Yemen',\n transactable: true,\n countryCode: 'YE',\n currency: 'USD'\n },\n {\n name: 'Zambia',\n transactable: true,\n countryCode: 'ZM',\n currency: 'USD'\n },\n {\n name: 'Zimbabwe',\n transactable: true,\n countryCode: 'ZW',\n currency: 'USD'\n }\n];\nexport var SearchType = /*#__PURE__*/ function(SearchType) {\n SearchType[\"App\"] = \"App\";\n SearchType[\"ConsultingService\"] = \"ConsultingService\";\n SearchType[\"CloudIndustry\"] = \"CloudIndustry\";\n return SearchType;\n}({});\nexport var Constants, Plan;\n","/* istanbul ignore file */ export const catalogToStorefrontsProducts = {\n 'dynamics-365-for-business-central': 'Dynamics 365 for Business Central',\n 'cortana-intelligence': 'Azure for Cortana Intelligence',\n 'dynamics-365-for-customer-services': 'Dynamics 365 for Customer Services',\n 'dynamics-365-for-field-services': 'Dynamics 365 for Field Services',\n 'dynamics-365-for-operations': 'Dynamics 365 for Financials',\n 'dynamics-365-for-financials': 'Dynamics 365 for Business Central',\n 'dynamics-365-for-project-services-automation': 'Dynamics 365 for Project Services Automation',\n 'dynamics-365-for-sales': 'Dynamics 365 for Sales',\n 'dynamics-365-customer-voice': 'Dynamics 365 Customer Voice',\n 'dynamics-365-human-resources': 'Dynamics 365 Human Resources',\n 'dynamics-365-marketing': 'Dynamics 365 Marketing',\n 'dynamics-365-commerce': 'Dynamics 365 Commerce',\n 'dynamics-365-supply-chain-management': 'Dynamics 365 Supply Chain Management',\n 'dynamics-365-mixed-reality': 'Dynamics 365 Mixed Reality',\n 'dynamics-365-customer-insights': 'Dynamics 365 Customer Insights',\n Office365: 'Office365',\n powerapps: 'PowerApps',\n 'power-bi': 'Power BI',\n 'power-automate': 'Power Automate',\n 'power-virtual-agents': 'Power Virtual Agents',\n 'microsoft-365': 'Office365',\n 'dynamics-365-project-operations': 'Dynamics 365 Project Operations',\n 'dynamics-365-project-services': 'Dynamics 365 Project Services',\n 'm365-sa-adoption-and-change-management': 'M365 Sa Adoption And Change Management',\n 'm365-sa-calling-for-microsoft-teams': 'M365 Sa Calling For Microsoft Teams',\n 'm365-sa-cloud-security': 'M365 Sa Cloud Security',\n 'm365-sa-compliance-advisory-services': 'M365 Sa Compliance Advisory Services',\n 'm365-sa-device-deployment-and-management': 'M365 Sa Device Deployment And Management',\n 'm365-sa-firstline-workers': 'M365 Sa Firstline Workers',\n 'm365-sa-identity-and-access-management': 'M365 Sa Identity And Access Management',\n 'm365-sa-information-protection-and-governance': 'M365 Sa Information Protection And Governance',\n 'm365-sa-insider-risk': 'M365 Sa Insider Risk',\n 'm365-sa-knowledge-and-insights': 'M365 Sa Knowledge And Insights',\n 'm365-sa-meeting-rooms-for-microsoft-teams': 'M365 Sa Meeting Rooms For Microsoft Teams',\n 'm365-sa-meetings-for-microsoft-teams': 'M365 Sa Meetings For Microsoft Teams',\n 'm365-sa-microsoft-365-live-events': 'M365 Sa Microsoft 365 Live Events',\n 'm365-sa-mobile-device-management': 'M365 Sa Mobile Device Management',\n 'm365-sa-power-platform-for-teams': 'M365 Sa Power Platform For Teams',\n 'm365-sa-teams-custom-solutions': 'M365 Sa Teams Custom Solutions',\n 'm365-sa-teamwork-deployment': 'M365 Sa Teamwork Deployment',\n 'm365-sa-threat-protection': 'M365 Sa Threat Protection',\n 'm365-sa-workplace-analytics': 'M365 Sa Workplace Analytics',\n PowerPages: 'Power Pages'\n};\nexport const BackendKeyToURLKey = {\n home: 'apps',\n featured: 'featured',\n trending: 'trending',\n featuredtestdrives: 'top-test-drives',\n operatingsystems: 'operating-systems',\n devops: 'devops',\n inframigration: 'onprem-to-cloud-migration',\n Analytics_MP: 'analytics',\n dataInsights: 'data-insights',\n analytics: 'data-analytics',\n bigData: 'big-data',\n predictiveAnalytics: 'predictive-analytics',\n realTimeStreamingAnalytics: 'real-time-streaming-analytics',\n All_Analytics_MP: 'all',\n CognitiveServices_MP: 'ai-plus-machine-learning',\n AutomatedML: 'automated-ml',\n BotService: 'bot-service',\n BusinessRoboticAutomation: 'business-robotic-process-automation',\n CognitiveService: 'cognitive-service',\n DataLabelling: 'data-labelling',\n DataPreparation: 'data-preparation',\n KnowledgeMining: 'knowledge-mining',\n MlOperations: 'ml-operations',\n MachineLearning: 'ml-service',\n All_CognitiveServices_MP: 'all',\n AADapps: 'azure-active-directory-apps',\n Featured: 'featured',\n BusinessManagement: 'business-management',\n Collaboration: 'collaboration',\n Construction: 'construction',\n Consumer: 'consumer',\n ContentManagement: 'content-management',\n CRM: 'crm',\n DataServices: 'data-services',\n DeveloperServices: 'developer-services',\n ECommerce: 'ecommerce',\n Education: 'education',\n ERP: 'erp',\n Finance: 'finance',\n Health: 'health',\n HR: 'human-resources',\n ITInfra: 'it-infrastructure',\n Mail: 'mail',\n Marketing: 'marketing',\n Media: 'media',\n Productivity: 'productivity',\n ProjectMgmt: 'project-management',\n Security: 'security',\n Social: 'social',\n SupplyMgmt: 'supply-management',\n Telecommunications: 'telecommunications',\n tools: 'tools',\n Travel: 'travel',\n WebDesign: 'web-design-hosting',\n 'media-and-communications': 'media-and-communications',\n 'architecture-and-construction': 'architecture-and-construction',\n 'hospitality-and-travel': 'hospitality-and-travel',\n 'real-estate': 'real-estate',\n 'other-public-sector-industries': 'other-public-sector-industries',\n Blockchain_MP: 'blockchain',\n BlockChainAppAccelerators_MP: 'app-accelerators',\n BlockChainSingleNodeLedgers_MP: 'single-node-ledger',\n BlockChainMultiNodeLedgers_MP: 'multi-node-ledger',\n BlockchainTools_MP: 'tools',\n All_Blockchain_MP: 'all',\n Compute_MP: 'compute',\n recommended: 'featured',\n applicationInfrastructure: 'application-infrastructure',\n operatingSystems: 'operating-systems',\n cache: 'cache',\n All_Compute_MP: 'all',\n Containers_MP: 'containers',\n WebDH: 'featured',\n ContainerApps_MP: 'container-apps',\n All_Containers_MP: 'all',\n Databases_MP: 'databases',\n noSql: 'nosql-databases',\n relationalDatabases: 'relational-databases',\n ledgerBlockchainDatabases: 'ledger-blockchain-databases',\n dataLakes: 'data-lakes',\n dataWarehouse: 'data-warehouse',\n All_Databases_MP: 'all',\n DeveloperTools_MP: 'developer-tools',\n toolsDeveloperTools: 'tools',\n scripts: 'scripts',\n devService: 'devService',\n All_DeveloperTools_MP: 'all',\n Devops_MP: 'devops',\n All_Devops_MP: 'all',\n Identity_MP: 'identity',\n Identity: 'identity-access-mgmt',\n All_Identity_MP: 'all',\n Integration_MP: 'integration',\n messaging: 'messaging',\n All_Integration_MP: 'all',\n InternetOfThings_MP: 'internet-of-things',\n IoTConnectivity: 'iot-connectivity',\n IoTSolutions: 'iot-solutions',\n IOTVisualizations: 'data-analytics-visualizations',\n IoTSecurity: 'iot-security',\n IoTAndIIoTPlatforms: 'iot-iiot-platforms',\n IoTCoreServices: 'iot-core-services',\n IoTEdgeModules: 'iot-edge-modules',\n All_InternetOfThings_MP: 'all',\n MonitoringAndManagement_MP: 'management-tools',\n managementSolutions: 'management-solutions',\n bizApps: 'business-applications',\n All_MonitoringAndManagement_MP: 'all',\n MonitoringAndDiagnostics_MP: 'monitoring-and-diagnostics',\n All_MonitoringAndDiagnostics_MP: 'all',\n Media_MP: 'media',\n mediaServices: 'media-services',\n contentProtection: 'content-protection',\n liveOnDemandStreaming: 'live-and-on-demand-streaming',\n All_Media_MP: 'all',\n Migration_MP: 'migration',\n dataMigration: 'data-migration',\n All_Migration_MP: 'all',\n MixedReality_MP: 'mixed-reality',\n gaming: 'gaming',\n All_MixedReality_MP: 'all',\n Networking_MP: 'networking',\n applianceManagers: 'appliance-managers',\n connectivity: 'connectivity',\n firewalls: 'firewalls',\n loadBalancers: 'load-balancers',\n All_Networking_MP: 'all',\n Security_MP: 'security',\n identityAccessManagement: 'identity-and-access-management',\n SecurityProtection: 'threat-protection',\n informationProtection: 'information-protection',\n All_Security_MP: 'all',\n Storage_MP: 'storage',\n backupAndRecovery: 'backup-and-recovery',\n hybridStorageAndGlobalDataAccess: 'enterprise-hybrid-storage',\n fileSharing: 'file-sharing',\n dataLifecycleManagement: 'data-lifecycle-management',\n All_Storage_MP: 'all',\n WebAndMobile_MP: 'web',\n blogsCMS: 'blogs-cmss',\n starterSites: 'starter-web-apps',\n eCommerce: 'ecommerce',\n appFrameworks: 'web-app-frameworks',\n web_recommended: 'web-apps',\n All_WebAndMobile_MP: 'all',\n trials: 'trials',\n freeTrial: 'free-trial',\n testDrive: 'test-drive',\n operatingSystem: 'operating-system',\n linux: 'linux',\n windows: 'windows',\n publisher: 'publisher',\n microsoft: 'microsoft',\n partners: 'partners',\n pricingModel: 'pricing-model',\n byol: 'byol',\n free: 'pricing-free',\n payAsYouGo: 'pay-as-you-go',\n paid: 'pricing-paid',\n virtualMachineImages: 'virtual-machine-images',\n solutionTemplates: 'solution-templates',\n SaaS: 'product-type',\n Assessment: 'assessment',\n Briefing: 'briefing',\n Implementation: 'implementation',\n ProofofConcept: 'proof-of-concept',\n Training: 'training',\n Workshop: 'workshop',\n getStarted: 'consulting-services',\n appModernization: 'app-modernization',\n archive: 'archive',\n artificialIntelligence: 'ai-plus-machine-learning',\n backup: 'backup',\n bigdata: 'big-data',\n dataPlatform: 'data-platform',\n datacenterManagemenet: 'datacenter-managemenet',\n disasterRecovery: 'disaster-recovery',\n identity: 'identity',\n internetOfThings: 'internet-of-things',\n migration: 'migration',\n networking: 'networking',\n security: 'security',\n storage: 'storage',\n Automotive_CS: 'automotive',\n Agriculture: 'agriculture',\n ArchitectureConstruction_CS: 'architecture-construction',\n Distribution: 'distribution',\n FinancialServices: 'finance',\n Government: 'government',\n HealthCareandLifeSciences: 'healthcare',\n HospitalityTravel_CS: 'hospitality-travel',\n Manufacturing: 'manufacturing',\n MediaCommunications_CS: 'Media-communications',\n ProfessionalServices: 'professional-services',\n RealEstate_CS: 'real-estate',\n RetailandConsumerGoods: 'retail',\n Sustainability_AS: 'sustainability',\n OtherPublicSectorIndustries_CS: 'other-public-sector-industries',\n country: 'country',\n AF: 'country-afghanistan',\n AL: 'country-albania',\n DZA: 'country-algeria',\n AD: 'country-andorra',\n AO: 'country-angola',\n AR: 'country-argentina',\n AM: 'country-armenia',\n AU: 'country-australia',\n AT: 'country-austria',\n AZ: 'country-azerbaijan',\n BH: 'country-bahrain',\n BD: 'country-bangladesh',\n BB: 'country-barbados',\n BY: 'country-belarus',\n BE: 'country-belgium',\n BZ: 'country-belize',\n BM: 'country-bermuda',\n BO: 'country-bolivia',\n BA: 'country-bosnia and herzegovina',\n BW: 'country-botswana',\n BR: 'country-brazil',\n BN: 'country-brunei',\n BG: 'country-bulgaria',\n CM: 'country-cameroon',\n CA: 'country-canada',\n CV: 'country-cabo-verde',\n KY: 'country-cayman-islands',\n CL: 'country-chile',\n CO: 'country-colombia',\n CR: 'country-costa-rica',\n CI: 'country-côte-divoire',\n CW: 'country-curaçao',\n CY: 'country-cyprus',\n CZ: 'country-czech-republic',\n DK: 'country-denmark',\n DO: 'country-dominican-republic',\n EC: 'country-ecuador',\n EG: 'country-egypt',\n SV: 'country-el-salvador',\n EE: 'country-estonia',\n ET: 'country-ethiopia',\n FO: 'country-faroe-islands',\n FJ: 'country-fiji',\n FI: 'country-finland',\n FR: 'country-france',\n GE: 'country-georgia',\n DE: 'country-germany',\n GH: 'country-ghana',\n GR: 'country-greece',\n GT: 'country-guatemala',\n HN: 'country-honduras',\n HK: 'country-hong-kong',\n HU: 'country-hungary',\n IS: 'country-iceland',\n IN: 'country-india',\n ID: 'country-indonesia',\n IQ: 'country-iraq',\n IE: 'country-ireland',\n IL: 'country-israel',\n IT: 'country-italy',\n JM: 'country-jamaica',\n JP: 'country-japan',\n JO: 'country-jordan',\n KZ: 'country-kazakhstan',\n KE: 'country-kenya',\n KR: 'country-korea',\n KW: 'country-kuwait',\n KG: 'country-kyrgyzstan',\n LV: 'country-latvia',\n LB: 'country-lebanon',\n LY: 'country-libya',\n LI: 'country-liechtenstein',\n LT: 'country-lithuania',\n LU: 'country-luxembourg',\n MO: 'country-macao-sar',\n MK: 'country-macedonia',\n MY: 'country-malaysia',\n MT: 'country-malta',\n MX: 'country-mexico',\n MD: 'country-moldova',\n MC: 'country-monaco',\n MN: 'country-mongolia',\n ME: 'country-montenegro',\n MA: 'country-morocco',\n NA: 'country-namibia',\n NP: 'country-nepal',\n NL: 'country-netherlands',\n NI: 'country-nicaragua',\n NZ: 'country-newzealand',\n NG: 'country-nigeria',\n NO: 'country-norway',\n OM: 'country-oman',\n PK: 'country-pakistan',\n PS: 'country-palestinian-authority',\n PA: 'country-panama',\n PY: 'country-paraguay',\n PE: 'country-peru',\n PH: 'country-philippines',\n PL: 'country-poland',\n PT: 'country-portugal',\n PR: 'country-puerto-rico',\n QA: 'country-qatar',\n RO: 'country-romania',\n RU: 'country-russia',\n RW: 'country-rwanda',\n KN: 'country-saint-kitts-and-nevis',\n SA: 'country-saudi-arabia',\n SN: 'country-Senegal',\n RS: 'country-serbia',\n SG: 'country-singapore',\n SK: 'country-slovakia',\n SI: 'country-slovenia',\n ZA: 'country-southafrica',\n ES: 'country-spain',\n LK: 'country-sri-lanka',\n SE: 'country-sweden',\n CH: 'country-switzerland',\n TW: 'country-taiwan',\n TJ: 'country-tajikistan',\n TZ: 'country-tanzania',\n TH: 'country-thailand',\n TT: 'country-trinidad-and-tobago',\n TN: 'country-tunisia',\n TR: 'country-turkey',\n TM: 'country-turkmenistan',\n VA: 'country-vatican-city',\n VI: 'country-virgin-islands-of-the-united-states',\n UG: 'country-uganda',\n UA: 'country-ukraine',\n AE: 'country-united-arab-emirates',\n GB: 'country-unitedkingdom',\n US: 'country-unitedstates',\n UY: 'country-uruguay',\n UZ: 'country-uzbekistan',\n VE: 'country-venezuela',\n VN: 'country-vietnam',\n YE: 'country-yemen',\n ZM: 'country-zambia',\n ZW: 'country-zimbabwe'\n};\n","import { DataMap } from '@shared/utils/dataMapping';\nimport { BackendKeyToURLKey } from '@shared/utils/dataMappingConstants';\nimport { Constants } from '@shared/utils/constants';\nimport { bitMasksMatchFilter } from '@shared/utils/datamappingHelpers';\nexport function getProductTitleForTile(serviceProducts) {\n let products = '';\n // eslint-disable-next-line array-callback-return\n Object.keys(DataMap.products).map((value)=>{\n if (serviceProducts && bitMasksMatchFilter(serviceProducts, DataMap.products[`${value}`])) {\n // If the product is a d365 sub prod just insert d365 once for all the sub products, else insert the product\n if (DataMap.products.Dynamics365.ShortcutFilters.indexOf(value) > -1 && products.indexOf(DataMap.products.Dynamics365.LongTitle) < 0) {\n products += DataMap.products.Dynamics365.LongTitle + ' | ';\n } else if (DataMap.products.Dynamics365.ShortcutFilters.indexOf(value) < 0) {\n // !!! Temporary HACK: If the product is 'Power BI apps' we want to display it as 'Power BI'\n // in Consulting services tab alone.\n let longTitle = DataMap.products[`${value}`].LongTitle;\n if (longTitle === 'Power BI apps') {\n longTitle = 'Power BI';\n }\n products += longTitle + ' | ';\n }\n }\n });\n return products.substring(0, products.lastIndexOf('|'));\n}\nfunction getServicePricingByCountry(multiGeoCountryPricings, country) {\n var _multiGeoCountryPricings_find;\n return multiGeoCountryPricings === null || multiGeoCountryPricings === void 0 ? void 0 : (_multiGeoCountryPricings_find = multiGeoCountryPricings.find((multiGeoCountryPricing)=>{\n var _multiGeoCountryPricing_countryRegion;\n return ((_multiGeoCountryPricing_countryRegion = multiGeoCountryPricing.countryRegion) === null || _multiGeoCountryPricing_countryRegion === void 0 ? void 0 : _multiGeoCountryPricing_countryRegion.toLowerCase()) === (country === null || country === void 0 ? void 0 : country.toLowerCase());\n })) === null || _multiGeoCountryPricings_find === void 0 ? void 0 : _multiGeoCountryPricings_find.pricing;\n}\nexport function getServicePricingByCountryWithFallback(multiGeoCountryPricings, country) {\n var _multiGeoCountryPricings_;\n return getServicePricingByCountry(multiGeoCountryPricings, country) || getServicePricingByCountry(multiGeoCountryPricings, Constants.usCountryCode) || (multiGeoCountryPricings === null || multiGeoCountryPricings === void 0 ? void 0 : (_multiGeoCountryPricings_ = multiGeoCountryPricings[0]) === null || _multiGeoCountryPricings_ === void 0 ? void 0 : _multiGeoCountryPricings_.pricing);\n}\nexport function getCountryRegionByCountry(detailInformation, country) {\n if (country && detailInformation && detailInformation.MultiCountryRegions && detailInformation.MultiCountryRegions.length > 0) {\n for(let i = 0; i < detailInformation.MultiCountryRegions.length; i++){\n if (detailInformation.MultiCountryRegions[`${i}`].countryRegion && detailInformation.MultiCountryRegions[`${i}`].countryRegion.toLowerCase() === country.toLowerCase()) {\n return detailInformation.MultiCountryRegions[`${i}`];\n }\n }\n } else if (detailInformation && detailInformation.countryRegion) {\n return {\n countryRegion: detailInformation.countryRegion,\n regions: detailInformation.regions\n };\n }\n return null;\n}\nexport function findBestMatchCountryCode(multiCountryServicePricing, country) {\n if (country && multiCountryServicePricing && multiCountryServicePricing.length > 0) {\n for(let i = 0; i < multiCountryServicePricing.length; i++){\n if (multiCountryServicePricing[`${i}`].countryRegion && multiCountryServicePricing[`${i}`].countryRegion.toLowerCase() === country.toLowerCase()) {\n return multiCountryServicePricing[`${i}`].countryRegion;\n }\n }\n // Input country not found - return the first country we can find.\n return multiCountryServicePricing[0].countryRegion;\n }\n return null;\n}\nexport function extractCountryCodeFromFilterQueryParam(query) {\n // Try to get (AMP) filter-country query param.\n if (typeof (query === null || query === void 0 ? void 0 : query.filters) === 'string') {\n const subFilters = query.filters.split(';');\n if (subFilters && subFilters.length > 0) {\n for(let i = 0; i < subFilters.length; i++){\n if (subFilters[`${i}`] && subFilters[`${i}`].toLowerCase().indexOf('country-') !== -1) {\n for(const key in BackendKeyToURLKey){\n if (BackendKeyToURLKey[`${key}`].toLowerCase() === subFilters[`${i}`].toLowerCase()) {\n return key;\n }\n }\n }\n }\n }\n }\n return null;\n}\nexport function extractCountryCodeFromCountryQueryParam(query) {\n return query && query.country ? query.country : null;\n}\nexport function extractCountryCodeFromQueryParam(query) {\n // Try to get country code from country(AppSource) query param.\n let countryCode = extractCountryCodeFromCountryQueryParam(query);\n if (countryCode) {\n return countryCode;\n }\n // Try to get country code from filter-country(AMP) query param. }\n countryCode = extractCountryCodeFromFilterQueryParam(query);\n if (countryCode) {\n return countryCode;\n }\n return null;\n}\nexport function createCountryFilterQueryParam(countryCode, isAppSource) {\n if (isAppSource) {\n return {\n [Constants.countryCodeQueryParam]: countryCode\n };\n } else {\n return {\n [Constants.FilterQuery.filters]: BackendKeyToURLKey[`${countryCode}`]\n };\n }\n}\nexport function getReplacedCountryQueryParam(query, newCountryCode) {\n if (!query || !newCountryCode) {\n return null;\n }\n // AppSource\n if (query.country) {\n return {\n [Constants.countryCodeQueryParam]: newCountryCode\n };\n }\n // AMP\n if (query.filters) {\n const countryCodeToReplace = extractCountryCodeFromFilterQueryParam(query);\n // No country code to replace.\n let newFilter;\n if (!countryCodeToReplace) {\n if (query.filters.length > 0) {\n newFilter = query.filters += ';' + BackendKeyToURLKey[`${newCountryCode}`];\n } else {\n newFilter = BackendKeyToURLKey[`${newCountryCode}`];\n }\n } else {\n newFilter = query.filters.toLowerCase().replace(BackendKeyToURLKey[`${countryCodeToReplace}`], BackendKeyToURLKey[`${newCountryCode}`]);\n }\n return {\n [Constants.FilterQuery.filters]: newFilter\n };\n }\n return null;\n}\nexport function getStartingPriceCurrency(multiCountryPricing, country) {\n const pricing = getServicePricingByCountryWithFallback(multiCountryPricing, country);\n return (pricing === null || pricing === void 0 ? void 0 : pricing.currencyCode) || Constants.usdCurrency;\n}\nexport function getStartingPriceHeader(multiCountryPricing, country, locale, context) {\n var _pricing_planPrices;\n const pricing = getServicePricingByCountryWithFallback(multiCountryPricing, country);\n const currency = pricing === null || pricing === void 0 ? void 0 : pricing.currencyCode;\n const planPrice = pricing === null || pricing === void 0 ? void 0 : (_pricing_planPrices = pricing.planPrices) === null || _pricing_planPrices === void 0 ? void 0 : _pricing_planPrices[0];\n const header = (planPrice === null || planPrice === void 0 ? void 0 : planPrice.price) ? planPrice.price.toLocaleString(locale, {\n style: 'currency',\n currency,\n maximumFractionDigits: 0,\n minimumFractionDigits: 0\n }) : context.loc('Pricing_Free');\n return header;\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _object_without_properties(source, excluded) {\n if (source == null) return {};\n var target = _object_without_properties_loose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for(i = 0; i < sourceSymbolKeys.length; i++){\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\nfunction _object_without_properties_loose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for(i = 0; i < sourceKeys.length; i++){\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nimport { Constants } from './constants';\nimport datamapJson from '@appsource/datamapping/datamappingTaxonomy.json';\nimport oneTaxonomyDatamapJson from '@src/shared/oneTaxonomy/oneTaxonomyDatamapping.json';\nimport { isOneTaxonomyEnabled } from '@shared/oneTaxonomy/utils';\nconst MAX_BITMASK_INDEX = Math.pow(2, 30);\nconst CATEGORY_WITH_SUB_PREFIX = 'sub';\nconst URLGROUP_SEPERATOR_NAME = '_mask_';\nconst getDatamappingJsonFile = ()=>{\n return isOneTaxonomyEnabled() ? oneTaxonomyDatamapJson.dataMappings : datamapJson.dataMappings;\n};\nvar FilterType = /*#__PURE__*/ function(FilterType) {\n FilterType[\"product\"] = \"product\";\n FilterType[\"category\"] = \"category\";\n FilterType[\"industry\"] = \"industry\";\n FilterType[\"cloudIndustries\"] = \"cloudIndustries\";\n FilterType[\"serviceType\"] = \"serviceType\";\n FilterType[\"filters\"] = \"filters\";\n return FilterType;\n}(FilterType || {});\nconst filterTypeToFilterGroup = {\n [\"product\"]: \"product\",\n [\"category\"]: \"category\",\n [\"industry\"]: \"industry\",\n [\"cloudIndustries\"]: Constants.CloudsIndustry.bitmaskPrefix + \"industry\",\n [\"serviceType\"]: \"serviceType\",\n [\"filters\"]: \"filters\"\n};\nconst categoryFilterGroup = {\n products: \"product\",\n categories: \"category\",\n industries: \"industry\",\n cloudIndustries: \"cloudIndustries\",\n serviceTypes: \"serviceType\",\n pricingModel: \"filters\",\n ratings: \"filters\",\n trials: \"filters\",\n appCompliance: \"filters\",\n AzureBenefitEligible: \"filters\",\n productType: \"filters\",\n CopilotExtension: \"filters\"\n};\nconst categoryUrlGroup = _object_spread_props(_object_spread({}, categoryFilterGroup), {\n cloudIndustries: \"industry\"\n});\nconst subCategoryUrlGroup = _object_spread_props(_object_spread({}, Object.fromEntries(Object.keys(categoryFilterGroup).map((key)=>[\n key,\n key\n ]))), {\n cloudIndustries: Constants.DataMapCollectionKeys.industries\n});\nconst productsToCategoriesReferences = {\n [Constants.CategoriesDataMapCollectionKeys.addIns]: [\n 'analytics',\n 'ai-plus-machine-learning',\n 'collaboration',\n 'Commerce',\n 'compliance-and-legal',\n 'customer-service',\n 'finance',\n 'geolocation',\n 'human-resources',\n 'internet-of-things',\n 'it-and-management-tools',\n 'marketing',\n 'operations-and-supply-chain',\n 'productivity',\n 'task-and-project-management',\n 'Sales'\n ],\n [Constants.CategoriesDataMapCollectionKeys.powerBiVisuals]: [\n 'pbiv-comparison',\n 'pbiv-correlation',\n 'pbiv-distribution',\n 'pbiv-flow',\n 'Filters',\n 'Infographics',\n 'KPI',\n 'pbiv-narratives',\n 'Maps',\n 'pbiv-other',\n 'pbiv-part-to-whole',\n 'pbiv-r-visuals',\n 'Time'\n ],\n [Constants.CategoriesDataMapCollectionKeys.office]: [\n 'analytics',\n 'collaboration',\n 'task-and-project-management',\n 'Connectors',\n 'customer-service',\n 'finance',\n 'human-resources',\n 'it-and-management-tools',\n 'marketing',\n 'operations-and-supply-chain',\n 'productivity',\n 'Sales',\n 'Utilities',\n 'ContentManagement',\n 'FileManagers',\n 'CRM',\n 'NewsWeather',\n 'Reference',\n 'SiteDesign',\n 'Social',\n 'TrainingAndTutorial'\n ]\n};\nconst _getDatamappingJsonFile = getDatamappingJsonFile(), { categories: categoriesMapping } = _getDatamappingJsonFile, restMappings = _object_without_properties(_getDatamappingJsonFile, [\n \"categories\"\n]);\nexport const DataMap = getDatamappingJsonFile();\nconst maskCounters = {};\nconst increaseMaskIndex = (currentMask)=>{\n currentMask.index *= 2;\n if (currentMask.index > MAX_BITMASK_INDEX) {\n currentMask.mask++;\n currentMask.index = 1;\n }\n};\nconst calculateShortcutUrlKey = ({ ShortcutFilters, UrlKey })=>{\n if (ShortcutFilters) {\n return ShortcutFilters.map((currentShortcutUrl)=>{\n var _DataMap_products_;\n return (_DataMap_products_ = DataMap.products[`${currentShortcutUrl}`]) === null || _DataMap_products_ === void 0 ? void 0 : _DataMap_products_.UrlKey;\n }).join(';');\n }\n return UrlKey;\n};\nconst getBaseFilterGroup = ({ mask, filterType })=>{\n return `${filterTypeToFilterGroup[filterType]}${URLGROUP_SEPERATOR_NAME}${mask}`;\n};\nconst getFilterGroup = ({ dataCollectionKey, mask, filterType, isBaseFilterGroup })=>{\n const filterGroup = getBaseFilterGroup({\n mask,\n filterType\n });\n return isBaseFilterGroup ? filterGroup : categoryFilterGroup[`${dataCollectionKey}`];\n};\nconst getDataValueBitMask = ({ dataCollectionKey, isBaseFilterGroup })=>{\n const currentMask = maskCounters[`${dataCollectionKey}`];\n const filterGroup = getFilterGroup({\n dataCollectionKey,\n filterType: categoryFilterGroup[`${dataCollectionKey}`],\n mask: currentMask.mask,\n isBaseFilterGroup\n });\n const filterInfo = {\n FilterGroup: filterGroup,\n FilterID: currentMask.index\n };\n return filterInfo;\n};\nconst initDataValue = ({ dataValueKey, dataCollectionKey, dataValue, isBaseFilterGroup, isSubDataValue })=>{\n const currentMask = maskCounters[`${dataCollectionKey}`];\n const filterInfo = getDataValueBitMask({\n dataCollectionKey,\n isBaseFilterGroup\n });\n const { IsReference, SubCategoryDataMapping, IsChildFilter } = dataValue;\n if (!SubCategoryDataMapping && !IsReference) {\n increaseMaskIndex(currentMask);\n }\n Object.assign(dataValue, _object_spread_props(_object_spread({}, filterInfo), {\n UrlGroup: isSubDataValue ? `${CATEGORY_WITH_SUB_PREFIX}${subCategoryUrlGroup[dataCollectionKey]}` : categoryUrlGroup[`${dataCollectionKey}`],\n ShortcutUrlKey: calculateShortcutUrlKey(dataValue),\n IsChildFilter: IsChildFilter || isSubDataValue\n }));\n};\nconst initMaskCounters = (dataCollectionKey)=>{\n if (!maskCounters[`${dataCollectionKey}`]) {\n maskCounters[`${dataCollectionKey}`] = {\n mask: 1,\n index: 1\n };\n }\n};\nconst initCollection = ({ dataCollectionKey, dataCollection })=>{\n initMaskCounters(dataCollectionKey);\n Object.entries(dataCollection).forEach(([dataValueKey, dataValue])=>{\n initDataValue({\n dataValueKey,\n dataCollectionKey,\n dataValue,\n isBaseFilterGroup: dataCollectionKey === Constants.DataMapCollectionKeys.products,\n isSubDataValue: false\n });\n Object.values(dataValue.SubCategoryDataMapping || {}).forEach((subCategoryCollectionValue)=>{\n initDataValue({\n dataValueKey,\n dataCollectionKey,\n dataValue: subCategoryCollectionValue,\n isBaseFilterGroup: true,\n isSubDataValue: true\n });\n });\n });\n};\nconst createCategoryReference = (id)=>{\n return {\n [`${id}`]: {\n IsReference: true,\n HideReferenceSubCategories: true\n }\n };\n};\nconst updateCategoriesReferences = ()=>{\n const categoriesReference = Object.fromEntries(Object.entries(productsToCategoriesReferences).map(([productCategoryReference, productCategoryTaxonomy])=>{\n return [\n productCategoryReference,\n productCategoryTaxonomy.filter((uniqueFilter)=>DataMap.categories.default[`${uniqueFilter}`]).reduce((acc, productCategoryTaxonomy)=>_object_spread({}, acc, createCategoryReference(productCategoryTaxonomy)), {})\n ];\n }));\n DataMap.categories = _object_spread({}, DataMap.categories, categoriesReference);\n};\nconst initDataMap = ()=>{\n const { categories } = DataMap, collections = _object_without_properties(DataMap, [\n \"categories\"\n ]);\n [\n ...Object.entries(collections),\n ...Object.values(categories).map((categoryCollection)=>[\n Constants.DataMapCollectionKeys.categories,\n categoryCollection\n ])\n ].forEach(([dataCollectionKey, dataCollection])=>{\n initCollection({\n dataCollectionKey,\n dataCollection\n });\n });\n if (isOneTaxonomyEnabled()) {\n updateCategoriesReferences();\n }\n};\ninitDataMap();\n","import { Constants } from './constants';\nimport { DataMap } from './dataMapping';\nfunction dataValuesSubCategoryToMap(dataValues) {\n const dataMapArray = [];\n Object.keys(dataValues.SubCategoryDataMapping).forEach((dataValueKey)=>{\n const subDataValues = dataValues.SubCategoryDataMapping[`${dataValueKey}`];\n if (!subDataValues.IsReference) {\n dataMapArray.push(subDataValues);\n }\n });\n return dataMapArray;\n}\nfunction dataCollectionToMap(dataCollection) {\n const dataMapArray = [];\n Object.keys(dataCollection).forEach((categoryKey)=>{\n const dataValues = dataCollection[`${categoryKey}`];\n if (!dataValues.IsReference) {\n dataMapArray.push(dataValues);\n }\n if (dataValues.SubCategoryDataMapping) {\n dataMapArray.push(...dataValuesSubCategoryToMap(dataValues));\n }\n });\n return dataMapArray;\n}\nexport function dataMapToArray(dataMap) {\n const dataMapArray = [];\n Object.keys(dataMap).forEach((dataCollectionKey)=>{\n if (dataCollectionKey === Constants.DataMapCollectionKeys.categories) {\n Object.keys(dataMap.categories).forEach((categoryDataKey)=>{\n const categoryDataMap = dataCollectionToMap(dataMap.categories[`${categoryDataKey}`]);\n dataMapArray.push(...categoryDataMap);\n });\n } else {\n const dataCollectionMap = dataCollectionToMap(dataMap[`${dataCollectionKey}`]);\n dataMapArray.push(...dataCollectionMap);\n }\n });\n return dataMapArray;\n}\nfunction getDataCollectionDataValuesFromUrlKey(dataCollection, curatedUrlValue) {\n let dataValues;\n Object.keys(dataCollection).forEach((dataKey)=>{\n if (dataCollection[`${dataKey}`].UrlKey === curatedUrlValue) {\n dataValues = dataCollection[`${dataKey}`];\n }\n });\n return dataValues;\n}\nexport function getDataValuesFromUrlKey(curatedUrlKey, curatedUrlValue) {\n const dataCollectionKey = Constants.CuratedQueryParamsToDataMapCollectionKeyMap[`${curatedUrlKey}`];\n if (!DataMap[`${dataCollectionKey}`]) {\n return null;\n }\n let dataValues;\n if (dataCollectionKey === Constants.DataMapCollectionKeys.categories) {\n Object.keys(DataMap.categories).forEach((categoryDataKey)=>{\n if (!dataValues) {\n dataValues = getDataCollectionDataValuesFromUrlKey(DataMap.categories[`${categoryDataKey}`], curatedUrlValue);\n }\n });\n } else {\n dataValues = getDataCollectionDataValuesFromUrlKey(DataMap[`${dataCollectionKey}`], curatedUrlValue);\n }\n return dataValues;\n}\nexport function isRequiredPricings() {\n return false;\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _object_without_properties(source, excluded) {\n if (source == null) return {};\n var target = _object_without_properties_loose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for(i = 0; i < sourceSymbolKeys.length; i++){\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}\nfunction _object_without_properties_loose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for(i = 0; i < sourceKeys.length; i++){\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nimport { DataMap } from './dataMapping';\nimport { getTrimmedWords } from './../utils/stringUtils';\nimport { Constants } from './constants';\nconst getAllCategoriesReferences = ()=>{\n return Object.values(DataMap.categories).map((category)=>Object.values(category)).flat();\n};\nconst createBackendKeysFromSubCategories = (subCategories)=>{\n return Object.values(subCategories).reduce((acc, curr)=>_object_spread_props(_object_spread({}, acc), {\n [curr.BackendKey]: curr\n }), {});\n};\nconst getAllChildKeys = ({ SubCategoryDataMapping, BackendKey })=>{\n return SubCategoryDataMapping ? Object.values(SubCategoryDataMapping).filter(({ UrlKey })=>UrlKey !== 'all' && BackendKey && SubCategoryDataMapping.all).reduce((acc, { BackendKey: currentBackendKey })=>_object_spread_props(_object_spread({}, acc), {\n [currentBackendKey]: SubCategoryDataMapping.all.BackendKey\n }), {}) : {};\n};\nconst createAllChildMap = (categories)=>{\n return categories.filter(({ BackendKey, SubCategoryDataMapping })=>BackendKey && SubCategoryDataMapping.all).reduce((acc, { BackendKey, SubCategoryDataMapping })=>_object_spread_props(_object_spread({}, acc), {\n [BackendKey]: SubCategoryDataMapping.all.BackendKey\n }), {});\n};\nexport const categoryKeyByBackendKey = Object.assign({}, ...getAllCategoriesReferences().map(({ SubCategoryDataMapping })=>{\n return SubCategoryDataMapping ? createBackendKeysFromSubCategories(SubCategoryDataMapping) : {};\n}));\nexport const industryKeyByBackendKey = Object.assign({}, ...Object.values(DataMap.industries).map(({ SubCategoryDataMapping })=>createBackendKeysFromSubCategories(SubCategoryDataMapping)));\nexport const cloudIndustryKeyByBackendKey = Object.assign({}, ...Object.values(DataMap.cloudIndustries).map(({ SubCategoryDataMapping })=>createBackendKeysFromSubCategories(SubCategoryDataMapping)));\nexport const productKeyByUrlKey = Object.keys(DataMap.products).reduce((acc, curr)=>_object_spread_props(_object_spread({}, acc), {\n [DataMap.products[`${curr}`].UrlKey]: curr\n }), {});\nexport const productKeyByBackendKey = Object.keys(DataMap.products).reduce((acc, curr)=>_object_spread_props(_object_spread({}, acc), {\n [DataMap.products[`${curr}`].BackendKey]: curr\n }), {});\nconst productKeyByBitmaskFilter = Object.keys(DataMap.products).reduce((acc, curr)=>{\n const { FilterGroup, FilterID } = DataMap.products[`${curr}`];\n return _object_spread_props(_object_spread({}, acc), {\n [`${FilterGroup}_${FilterID}`]: curr\n });\n}, {});\nconst calculateShortCutBitmask = (productInfo)=>{\n const { ShortcutFilters, FilterGroup, FilterID } = productInfo || {};\n return (ShortcutFilters === null || ShortcutFilters === void 0 ? void 0 : ShortcutFilters.length) ? ShortcutFilters.map((productKey)=>DataMap.products[`${productKey}`]).reduce((currMask, shortcutProductInfo)=>{\n const { FilterGroup: currentFilterGroup, FilterID } = shortcutProductInfo;\n return _object_spread_props(_object_spread({}, currMask), {\n [currentFilterGroup]: currMask[`${currentFilterGroup}`] ? currMask[`${currentFilterGroup}`] | FilterID : FilterID\n });\n }, {\n [FilterGroup]: FilterID\n }) : {\n [FilterGroup]: FilterID\n };\n};\nconst productShortcutBitmask = Object.keys(DataMap.products).reduce((acc, curr)=>_object_spread_props(_object_spread({}, acc), {\n [DataMap.products[`${curr}`].UrlKey]: calculateShortCutBitmask(DataMap.products[`${curr}`])\n }), {});\nexport const categoryAllChildMap = Object.assign({}, ...getAllCategoriesReferences().map((category)=>getAllChildKeys(category)).concat(createAllChildMap(getAllCategoriesReferences())));\nexport const industryAllChildMap = Object.assign({}, ...Object.values(DataMap.industries).map((industry)=>getAllChildKeys(industry)).concat(createAllChildMap(Object.values(DataMap.industries))));\nexport const cloudIndustryAllChildMap = Object.assign({}, ...Object.values(DataMap.cloudIndustries).map((cloudIndustry)=>getAllChildKeys(cloudIndustry)).concat(createAllChildMap(Object.values(DataMap.cloudIndustries))));\nexport const allChildMaps = {\n [Constants.DataMapCollectionKeys.categories]: categoryAllChildMap,\n [Constants.DataMapCollectionKeys.products]: {},\n [Constants.DataMapCollectionKeys.industries]: industryAllChildMap,\n [Constants.DataMapCollectionKeys.cloudIndustries]: cloudIndustryAllChildMap,\n [Constants.DataMapCollectionKeys.serviceTypes]: {},\n [Constants.DataMapCollectionKeys.trials]: {},\n [Constants.DataMapCollectionKeys.pricingModel]: {},\n [Constants.DataMapCollectionKeys.ratings]: {},\n [Constants.DataMapCollectionKeys.appCompliance]: {},\n [Constants.DataMapCollectionKeys.azureBenefitEligible]: {},\n [Constants.DataMapCollectionKeys.copilotExtension]: {},\n [Constants.DataMapCollectionKeys.productType]: {}\n};\nexport const addAllIdToChildCategory = ({ ids, collection })=>{\n return ids === null || ids === void 0 ? void 0 : ids.concat(ids.filter((id)=>allChildMaps[`${collection}`][`${id}`]).map((id)=>allChildMaps[`${collection}`][`${id}`]));\n};\nexport const getShortCutBitmask = (productInfo)=>{\n return productShortcutBitmask[`${productInfo.UrlKey}`];\n};\nconst getUrlKeys = ({ collection })=>{\n return Object.keys(collection).reduce((urlKeys, currentDataValue)=>{\n return _object_spread_props(_object_spread({}, urlKeys), {\n [collection[`${currentDataValue}`].UrlKey]: true\n });\n }, {});\n};\nconst getCategoryUrlKeys = ()=>{\n return _object_spread({}, getUrlKeys({\n collection: DataMap.categories.default\n }), getUrlKeys({\n collection: DataMap.categories.office\n }), getUrlKeys({\n collection: DataMap.categories.addIns\n }), getUrlKeys({\n collection: DataMap.categories.powerBiVisuals\n }));\n};\nexport const urlKeys = {\n [Constants.DataMapCollectionKeys.categories]: getCategoryUrlKeys(),\n [Constants.DataMapCollectionKeys.products]: getUrlKeys({\n collection: DataMap.products\n }),\n [Constants.DataMapCollectionKeys.industries]: getUrlKeys({\n collection: DataMap.industries\n }),\n [Constants.DataMapCollectionKeys.serviceTypes]: getUrlKeys({\n collection: DataMap.serviceTypes\n }),\n [Constants.DataMapCollectionKeys.trials]: getUrlKeys({\n collection: DataMap.trials\n }),\n [Constants.DataMapCollectionKeys.pricingModel]: getUrlKeys({\n collection: DataMap.pricingModel\n }),\n [Constants.DataMapCollectionKeys.ratings]: getUrlKeys({\n collection: DataMap.ratings\n }),\n [Constants.DataMapCollectionKeys.appCompliance]: getUrlKeys({\n collection: DataMap.appCompliance\n }),\n [Constants.DataMapCollectionKeys.azureBenefitEligible]: getUrlKeys({\n collection: DataMap.AzureBenefitEligible\n }),\n [Constants.DataMapCollectionKeys.copilotExtension]: getUrlKeys({\n collection: DataMap.CopilotExtension\n }),\n [Constants.DataMapCollectionKeys.productType]: getUrlKeys({\n collection: DataMap.productType\n }),\n [Constants.DataMapCollectionKeys.cloudIndustries]: getUrlKeys({\n collection: DataMap.cloudIndustries\n })\n};\nconst getSubUrlKeys = ({ collection })=>{\n return Object.values(collection).filter((collection)=>collection.SubCategoryDataMapping).reduce((urlKeys, { SubCategoryDataMapping: currentSubCategoryKey })=>{\n const subUrlKeys = Object.fromEntries(Object.keys(currentSubCategoryKey).map((subCategoryKey)=>[\n currentSubCategoryKey[`${subCategoryKey}`].UrlKey,\n true\n ]));\n return _object_spread({}, urlKeys, subUrlKeys);\n }, {});\n};\nconst getSubCategoryUrlKeys = ()=>{\n return Object.values(DataMap.categories).reduce((acc, collection)=>{\n return _object_spread({}, acc, getSubUrlKeys({\n collection\n }));\n }, {});\n};\nexport const subUrlKeys = {\n [Constants.DataMapCollectionKeys.categories]: getSubCategoryUrlKeys(),\n [Constants.DataMapCollectionKeys.products]: getSubUrlKeys({\n collection: DataMap.products\n }),\n [Constants.DataMapCollectionKeys.industries]: getSubUrlKeys({\n collection: DataMap.industries\n }),\n [Constants.DataMapCollectionKeys.serviceTypes]: getSubUrlKeys({\n collection: DataMap.serviceTypes\n }),\n [Constants.DataMapCollectionKeys.trials]: getSubUrlKeys({\n collection: DataMap.trials\n }),\n [Constants.DataMapCollectionKeys.pricingModel]: getSubUrlKeys({\n collection: DataMap.pricingModel\n }),\n [Constants.DataMapCollectionKeys.ratings]: getSubUrlKeys({\n collection: DataMap.ratings\n }),\n [Constants.DataMapCollectionKeys.appCompliance]: getSubUrlKeys({\n collection: DataMap.appCompliance\n }),\n [Constants.DataMapCollectionKeys.azureBenefitEligible]: getSubUrlKeys({\n collection: DataMap.AzureBenefitEligible\n }),\n [Constants.DataMapCollectionKeys.copilotExtension]: getSubUrlKeys({\n collection: DataMap.CopilotExtension\n }),\n [Constants.DataMapCollectionKeys.productType]: getSubUrlKeys({\n collection: DataMap.productType\n })\n};\nexport function bitMasksMatch(bitMasks, property, mask) {\n return !!(bitMasks && bitMasks[`${property}`] && (bitMasks[`${property}`] & mask) > 0);\n}\nexport function bitMasksMatchBitMask(bitMasksA, bitMasksB) {\n return bitMasksMatch(bitMasksA, bitMasksB.property, bitMasksB.mask);\n}\nexport function bitMasksMatchFilter(bitMasksA, filter) {\n return bitMasksMatch(bitMasksA, filter.FilterGroup, filter.FilterID);\n}\nexport function bitMasksContainSomeBitMask(bitMasksA, bitMasksB) {\n for (const key of Object.keys(bitMasksA)){\n if (bitMasksB[`${key}`] && (bitMasksB[`${key}`] & bitMasksA[`${key}`]) > 0) {\n return true;\n }\n }\n return false;\n}\nexport function getPrimaryProductUrl(primaryProduct) {\n if (primaryProduct) {\n var _DataMap_products_;\n const property = Object.keys(primaryProduct)[0];\n const mask = primaryProduct[`${property}`];\n const maskKey = `${property}_${mask}`;\n const productKey = productKeyByBitmaskFilter[`${maskKey}`];\n return (_DataMap_products_ = DataMap.products[`${productKey}`]) === null || _DataMap_products_ === void 0 ? void 0 : _DataMap_products_.UrlKey;\n }\n}\nexport function getProductFilter(primaryProduct) {\n for (const key of Object.keys(primaryProduct)){\n for(const product in DataMap.products){\n if (DataMap.products[`${product}`].FilterID === primaryProduct[`${key}`] && DataMap.products[`${product}`].FilterGroup === key) {\n return DataMap.products[`${product}`];\n }\n }\n }\n return null;\n}\nexport function getCategoryListByProductId(productBitMaskFilter, datamap) {\n if (!productBitMaskFilter || Object.keys(productBitMaskFilter).length === 0) {\n return DataMap.categories.default;\n }\n const productFilter = getProductFilter(productBitMaskFilter);\n if (productFilter !== null) {\n if (datamap) {\n return datamap.categories[productFilter.categoryList];\n }\n return DataMap.categories[productFilter.categoryList];\n }\n return null;\n}\nexport function getCategoryListByListName(name, datamap) {\n if (datamap) {\n return datamap.categories[`${name}`];\n }\n return DataMap.categories[`${name}`];\n}\nconst _DataMap_categories = DataMap.categories, { default: defaultCateogires } = _DataMap_categories, specificCategories = _object_without_properties(_DataMap_categories, [\n \"default\"\n]);\nexport const overidedCategories = _object_spread({}, Object.values(specificCategories).reduce((acc, curr)=>_object_spread({}, curr, acc), {}), defaultCateogires);\nexport function removeUnmatchedCategories(query, newProductUrlKey, newProductFilterData) {\n const newQuery = {\n product: newProductUrlKey\n };\n if (!query) {\n return newQuery;\n }\n const L1Product = newProductFilterData;\n const categoryListL1Product = getCategoryListByProductId(L1Product);\n const categories = query.category ? getTrimmedWords(query.category, ';') : [];\n let newCategory = '';\n for(const key in query){\n if (key === 'product') {\n continue;\n }\n if (key !== 'category') {\n newQuery[`${key}`] = query[`${key}`];\n } else {\n for(const queryCategory in categories){\n for(const category in categoryListL1Product){\n if (category === categories[`${queryCategory}`]) {\n newCategory += category + ';';\n break;\n }\n }\n }\n }\n }\n newCategory = newCategory !== '' ? newCategory.slice(0, -1) : newCategory;\n newQuery.category = newCategory !== '' ? newCategory : null;\n return newQuery;\n}\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { Constants } from '@shared/utils/constants';\nimport { getWindow } from '@shared/services/window';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { DataMap } from '@shared/utils/dataMapping';\nimport { bitMasksContainSomeBitMask, getShortCutBitmask } from '@shared/utils/datamappingHelpers';\nimport { logger } from '@src/logger';\nimport { isAzureApp, isTransactApp } from '@shared/utils/appUtils';\nexport var OwnerType = /*#__PURE__*/ function(OwnerType) {\n OwnerType[OwnerType[\"App\"] = 0] = \"App\";\n OwnerType[OwnerType[\"Service\"] = 1] = \"Service\";\n return OwnerType;\n}({});\n// temp method to hide badge certificates.\nexport function hideCertificateBadges() {\n return false;\n}\nexport function getDetailInformation(item, id) {\n if (item.detailInformation && item.detailInformation[`${id}`]) {\n return item.detailInformation[`${id}`];\n } else {\n return '';\n }\n}\n// Use this method only for the Array items in the details fields\nexport function getDetailArrayItem(item, id) {\n if (item.detailInformation && item.detailInformation[`${id}`] && item.detailInformation[`${id}`].length > 0) {\n return item.detailInformation[`${id}`];\n } else {\n return '';\n }\n}\nexport function getDetailInformationAsDivElement(item, id) {\n const information = this.getDetailInformation(item, id);\n if (information) {\n return /*#__PURE__*/ _jsx(\"div\", {\n children: information\n });\n } else {\n return null;\n }\n}\nexport function getListElements(list, maxItems = -1) {\n const listRender = [];\n if (list) {\n for(let i = 0; i < list.length; i++){\n if (i === maxItems) {\n break;\n }\n listRender.push(/*#__PURE__*/ _jsx(\"div\", {\n className: \"leftSideItem\",\n children: list[`${i}`]\n }));\n }\n }\n return listRender;\n}\nexport function generateClickPayloadAndLogTelemetry(ownerType, ownerId, actionModifier, detailsObject) {\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier,\n details: JSON.stringify(detailsObject)\n };\n if (ownerType === 0) {\n payload.appName = ownerId;\n }\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n}\nexport function generateLinkPayloadAndLogTelemetry(ownerType, ownerId, linkType, link, tabOwner) {\n const detailsObject = {\n linkType,\n link,\n tab: tabOwner || ''\n };\n generateClickPayloadAndLogTelemetry(ownerType, ownerId, Constants.Telemetry.ActionModifier.Link, detailsObject);\n}\nexport function generateFilterClickPayloadAndLogTelemetry(ownerType, ownerId, actionModifier, detailsObject) {\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.FilterClick,\n actionModifier,\n details: JSON.stringify(detailsObject)\n };\n if (ownerType === 0) {\n payload.appName = ownerId;\n }\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n}\nexport function generateTileClickPayloadAndLogTelemetry(actionModifier, detailsObject) {\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier,\n details: JSON.stringify(detailsObject),\n appName: detailsObject.appName\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n appName: payload.appName\n });\n}\nexport function generateBreadcrumbPayloadAndLogTelemetry(linkType) {\n const detailsObject = {\n linkType,\n link: getWindow().location.href\n };\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.ActionModifier.Breadcrumb,\n details: JSON.stringify(detailsObject)\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n}\n// Each version of appDetails.tsx (SMP/AMP/Mobile) seem to have a copy of this method\n// They should try and use this common method. It could be marked export at that point\nfunction getDetailHyperlinkElement(ownerId, information, id, locString, parentLocString) {\n if (!information) {\n return null;\n } else {\n return /*#__PURE__*/ _jsx(\"a\", {\n className: \"c-hyperlink\",\n rel: \"noreferrer\",\n target: \"_blank\",\n href: information,\n onClick: ()=>{\n generateLinkPayloadAndLogTelemetry(0, ownerId, id, information, 'Default');\n },\n \"aria-label\": `${parentLocString} ${locString}`,\n children: locString\n });\n }\n}\n/**\n * Gets the elements of the Support section\n * on the App Details page for AMP/Mobile\n * @export\n * @param {*} item (this.props.App passed down from any of the appDetails.tsx)\n * @param {*} context (this.context passed down from any of the appDetails.tsx)\n * @returns Div containing Support link and/or Help Link if available\n */ export function getSupportElements(item, context) {\n // Both SupportLink and HelpLink are optional and could be null\n // If both are null, don't show 'Support' section. Otherwise, do\n if (!getDetailInformation(item, 'SupportLink') && !getDetailInformation(item, 'HelpLink')) {\n return null;\n } else {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"cell\",\n children: [\n /*#__PURE__*/ _jsx(\"header\", {\n children: context.loc('App_Support')\n }),\n getDetailHyperlinkElement(item.entityId, getDetailInformation(item, 'SupportLink'), 'SupportLink', context.loc('App_Support'), context.loc('App_Support')),\n getDetailHyperlinkElement(item.entityId, getDetailInformation(item, 'HelpLink'), 'HelpLink', context.loc('App_Help'), context.loc('App_Support'))\n ]\n });\n }\n}\nexport function addSaaSBundleProperties(payloadDetails, app) {\n if (payloadDetails && app.linkedAddIns && app.linkedAddIns.length > 0) {\n payloadDetails.isSaaSBundle = true;\n }\n return payloadDetails;\n}\nexport function getProductsList(products) {\n const filterDatamapBlocks = DataMap[`${Constants.filterMaps.products}`];\n const filteritems = [];\n Object.keys(filterDatamapBlocks).map((value)=>{\n const currentDatamapBlock = filterDatamapBlocks[`${value}`];\n if (products && !currentDatamapBlock.ShortcutFilters && bitMasksContainSomeBitMask(getShortCutBitmask(currentDatamapBlock), products)) {\n const filter = currentDatamapBlock;\n if (!filter) {\n return null;\n }\n filteritems.push({\n title: filter.Title,\n urlKey: filter.UrlKey\n });\n }\n return null;\n });\n return filteritems;\n}\nexport const shouldShowUserTerms = ({ app, billingCountryCode })=>{\n const { ctaTypes } = app;\n const CtaRequiringTerms = [\n Constants.CTAType.Contact,\n Constants.CTAType.RequestTrial\n ];\n return !isAzureApp(app) && !isTransactApp({\n isEmbedded: false,\n ctaTypes,\n appData: app,\n billingRegion: billingCountryCode\n }) && !CtaRequiringTerms.includes(ctaTypes[0]);\n};\n","import { routes } from 'routerHistory';\nimport { AppTile } from '@shared/containers/appTile';\nimport { Constants } from '@shared/utils/constants';\nimport { ServiceTile } from '@shared/containers/serviceTile';\nimport CommonTile from '@shared/components/commonTile';\nconst registration = {\n // The following keys map to the enum values of Constants.EntityType\n App: {\n route: routes.marketplace,\n tileType: AppTile,\n identifier: 'ApplicationId',\n statePropertyName: 'apps'\n },\n Service: {\n route: routes.marketplaceServices,\n tileType: ServiceTile,\n identifier: 'ServiceId',\n statePropertyName: 'services'\n },\n CloudsIndustry: {\n route: routes.marketplaceCloudsIndustry,\n tileType: CommonTile,\n identifier: 'ApplicationId',\n statePropertyName: 'cloudsIndustry'\n }\n};\nexport function getEntityRegistration(entityType) {\n return registration[Constants.EntityType[`${entityType}`]];\n}\nexport function getEntityRegistrationByView(viewName) {\n let result = null;\n for(const entityType in registration){\n if (registration[`${entityType}`].route && registration[`${entityType}`].route.name === viewName) {\n result = Constants.EntityType[`${entityType}`];\n break;\n }\n }\n return result;\n}\nexport function getEntityDataState({ state, entityType }) {\n return state[registration[Constants.EntityType[`${entityType}`]].statePropertyName];\n}\nexport function getAllEntityTypes() {\n const keys = Object.keys(Constants.EntityType);\n const result = [];\n keys.forEach((key)=>{\n if (typeof Constants.EntityType[`${key}`] === 'number') {\n result.push(Constants.EntityType[`${key}`]);\n }\n });\n return result;\n}\n","import { inspect } from 'util';\nimport { pick } from 'lodash-es';\nexport function parseError(error) {\n if (error instanceof Error) {\n return pick(error, Object.getOwnPropertyNames(error));\n } else {\n return {\n message: inspect(error)\n };\n }\n}\nexport function stringifyError(error) {\n return JSON.stringify(parseError(error));\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { match } from './filterModule';\nimport { DataMap as constantDataMap } from './dataMapping';\nimport { removeUnmatchedCategories, bitMasksContainSomeBitMask, bitMasksMatch, getShortCutBitmask } from './datamappingHelpers';\nimport { Constants, supportedCountries } from './constants';\nimport { getEntityRegistration } from '../utils/entityRegistration';\nimport { urlPush } from './../routerHistory';\nimport { getWindow } from '../services/window';\nimport { SpzaInstrumentService } from '../services/telemetry/spza/spzaInstrument';\nimport { isPureObject } from './objectUtils';\nimport * as embedHostUtils from '../../embed/embedHostUtils';\nimport { logger } from '@src/logger';\nimport { getProductByUrlKey } from '@shared/utils/appUtils';\nimport { isOneTaxonomyEnabled } from '@shared/oneTaxonomy/utils';\nconst FilterQuery = Constants.FilterQuery;\n// To do: Improvement in DataMapping.tsx\n// could we add query to a filter collection in DataMapping.tsx\n// instead of hard coding filter collection queries\nconst filterCollectionNameToFilterQuery = {\n products: FilterQuery.product,\n industries: FilterQuery.industry,\n categories: FilterQuery.category,\n serviceTypes: FilterQuery.serviceType,\n trials: FilterQuery.trials,\n pricingModel: FilterQuery.pricingModel,\n ratings: FilterQuery.ratings,\n appCompliance: FilterQuery.appCompliance,\n AzureBenefitEligible: FilterQuery.azureBenefitEligible,\n productType: FilterQuery.productType,\n CopilotExtension: FilterQuery.copilotExtension\n};\n// TODO: merge with the generic function\nfunction getProductsFilterData(filterQueries, filterCollection, filterData, shouldResetCounts) {\n const bitmask = {};\n filterQueries.forEach((activeQuery)=>{\n const activeFilter = getProductByUrlKey({\n urlKey: activeQuery\n });\n if (activeFilter) {\n if (bitmask[activeFilter.FilterGroup]) {\n bitmask[activeFilter.FilterGroup] |= activeFilter.FilterID;\n } else {\n bitmask[activeFilter.FilterGroup] = activeFilter.FilterID;\n }\n } else {\n filterData.ignore = false;\n }\n });\n filterData.ignore = filterData.ignore && Object.keys(bitmask).length === 0;\n // push each filter under one filter collection into filterData.filters\n // and determine values of two properties, isActive and checkFilter\n Object.keys(filterCollection).forEach((filterKey)=>{\n const filter = filterCollection[`${filterKey}`];\n if (shouldResetCounts) {\n filter.count = 0;\n }\n const filterBitmaskMatch = bitMasksContainSomeBitMask(bitmask, getShortCutBitmask(filter));\n // isActive will determine if the checkbox should be toggled\n filter.isActive = filterBitmaskMatch;\n // checkFilter will determine if apps will be filtered against this filter\n filter.checkFilter = filter.isActive;\n const parentFilterQuery = getProductByUrlKey({\n urlKey: filterQueries[0]\n });\n const selectedParentFilter = filterCollection[`${parentFilterQuery}`];\n const shouldExpandChildFilters = !!selectedParentFilter && selectedParentFilter.ShouldExpandChildFilters;\n // deactivating if current filter is a child filter of an active parent filter (selectedParentFilter, about to expand)\n if (filter !== selectedParentFilter && shouldExpandChildFilters) {\n filter.isActive = false;\n filter.checkFilter = false;\n }\n filterData.filters.push(filter);\n });\n}\nfunction isGlobalFilter(filterQueryName) {\n return filterQueryName === 'trials' || filterQueryName === 'pricingModel' || filterQueryName === 'ratings' || filterQueryName === 'appCompliance' || filterQueryName === 'azureBenefitEligible' || filterQueryName === 'productType' || filterQueryName === 'copilotExtension';\n}\n/**\n * get filter data based on filterQueryName for a filter collection <=> a DataMap (DataMapping.tsx) property, and\n * update filter properties of both isActive and checkFilter in each filter, (updated in both returned filter data and in runtime DataMap)\n *\n * helper function\n * to get filter data\n * from filterQueryName and,\n * from filter collection processed in its wrapper function getFilterDataForQuery, and\n * to process filter data and determine two properties of each filter, namely isActive, and checkFilter\n *\n * @param query: url queries in browser url\n * @param filterQueryName:\n * name of url filter query, which corresponds to a DataMap property <=> a filter collection\n * namely: product, industry, category, serviceType\n *\n * hence, the value of filter query should be query[filterQueryName],\n * a string which joins the actual should-be-active filter name under one filter collection with ';'\n * @param filterCollection:\n * a DataMap property (DataMapping.tsx), except for 'categories' properties, whose each sub filter collection is the input value instead\n * namely: products, industries, categories, serviceTypes\n * @param shouldResetCounts:\n * optionally to reset counts of app which applied to each filter,\n * the purpose of optional is for accumulate counts for different offers (app, and consulting service) in sequence\n *\n * @return:\n * return filter data for one filter collection\n * filters: an array of all filters under one filter collection, where its two properties are modified\n * isActive: determines if the filter should be active based on\n * filter url query values: namely query[filterQueryName] <=> filter names under one filter collection joined by ';'\n * mask: Bit-OR result of mask values for all active filters, indicated by filter url query values\n * checkFilter: a shorcut boolean to notify performFilter function (filterModule) to ignore this filter\n * ignore:\n * same concept with checkFilter, a shortcut boolean to notify performFilter function (filterModule) to\n * completely ignore perform filter against offers (apps and consulting sevices) with this filter data\n */ function getFilterDataForQueryHelper(query, filterQueryName, filterCollection, shouldResetCounts) {\n const filterData = {\n filters: [],\n ignore: true\n };\n if (!filterCollection) {\n return filterData;\n }\n const hasGlobalFilter = isGlobalFilter(filterQueryName);\n let filterQuery = null;\n if (query) {\n filterQuery = hasGlobalFilter ? query.filters : query[`${filterQueryName}`];\n }\n let filterQueries = [];\n if (hasGlobalFilter) {\n const rawFilterQueries = typeof filterQuery === 'string' ? filterQuery.split(';') : [];\n for(let i = 0; i < rawFilterQueries.length; i++){\n var _constantDataMap_trials_rawFilterQueries_, _constantDataMap_pricingModel_rawFilterQueries_, _constantDataMap_ratings_rawFilterQueries_, _constantDataMap_appCompliance_rawFilterQueries_, _constantDataMap_AzureBenefitEligible_rawFilterQueries_, _constantDataMap_CopilotExtension_rawFilterQueries_, _constantDataMap_productType_rawFilterQueries_;\n if (filterQueryName === 'trials' && ((_constantDataMap_trials_rawFilterQueries_ = constantDataMap.trials[rawFilterQueries[`${i}`]]) === null || _constantDataMap_trials_rawFilterQueries_ === void 0 ? void 0 : _constantDataMap_trials_rawFilterQueries_.FilterID)) {\n filterQueries.push(rawFilterQueries[`${i}`]);\n }\n if (filterQueryName === 'pricingModel' && ((_constantDataMap_pricingModel_rawFilterQueries_ = constantDataMap.pricingModel[rawFilterQueries[`${i}`]]) === null || _constantDataMap_pricingModel_rawFilterQueries_ === void 0 ? void 0 : _constantDataMap_pricingModel_rawFilterQueries_.FilterID)) {\n filterQueries.push(rawFilterQueries[`${i}`]);\n }\n if (filterQueryName === 'ratings' && ((_constantDataMap_ratings_rawFilterQueries_ = constantDataMap.ratings[rawFilterQueries[`${i}`]]) === null || _constantDataMap_ratings_rawFilterQueries_ === void 0 ? void 0 : _constantDataMap_ratings_rawFilterQueries_.FilterID)) {\n filterQueries.push(rawFilterQueries[`${i}`]);\n }\n if (filterQueryName === 'appCompliance' && ((_constantDataMap_appCompliance_rawFilterQueries_ = constantDataMap.appCompliance[rawFilterQueries[`${i}`]]) === null || _constantDataMap_appCompliance_rawFilterQueries_ === void 0 ? void 0 : _constantDataMap_appCompliance_rawFilterQueries_.FilterID)) {\n filterQueries.push(rawFilterQueries[`${i}`]);\n }\n if (filterQueryName === Constants.FilterQuery.azureBenefitEligible && ((_constantDataMap_AzureBenefitEligible_rawFilterQueries_ = constantDataMap.AzureBenefitEligible[rawFilterQueries[`${i}`]]) === null || _constantDataMap_AzureBenefitEligible_rawFilterQueries_ === void 0 ? void 0 : _constantDataMap_AzureBenefitEligible_rawFilterQueries_.FilterID)) {\n filterQueries.push(rawFilterQueries[`${i}`]);\n }\n if (filterQueryName === Constants.FilterQuery.copilotExtension && ((_constantDataMap_CopilotExtension_rawFilterQueries_ = constantDataMap.CopilotExtension[rawFilterQueries[`${i}`]]) === null || _constantDataMap_CopilotExtension_rawFilterQueries_ === void 0 ? void 0 : _constantDataMap_CopilotExtension_rawFilterQueries_.FilterID)) {\n filterQueries.push(rawFilterQueries[`${i}`]);\n }\n if (filterQueryName === Constants.FilterQuery.productType && ((_constantDataMap_productType_rawFilterQueries_ = constantDataMap.productType[rawFilterQueries[`${i}`]]) === null || _constantDataMap_productType_rawFilterQueries_ === void 0 ? void 0 : _constantDataMap_productType_rawFilterQueries_.FilterID)) {\n filterQueries.push(rawFilterQueries[`${i}`]);\n }\n }\n } else {\n filterQueries = typeof filterQuery === 'string' ? filterQuery.split(';') : [];\n }\n // to set which filter should be active <=> bold in UI, tags in gallery header, and also query in browser\n // use only FilterId property of active filters to check against filters' bitmask (FilterID | ShortcutBitmask)\n // this is to avoid child filter checkboxes being checked automatically,\n // when user clicked on a parent filter consists of checkbox-style child filters\n // Since the FilterIDs of those parent filters doesn't include bitmasks of its childfilters'\n // so when use only FilterIDs, the child filters will stay unchecked when parent filter has just been clicked\n //\n // the reason why we want to disable selecting child filters, is because\n // we want to show curated gallery page, instead of filtered result page when user click on a parent filter\n //\n // the gallery page will show with\n // curated data (swim lanes), when parent filter and only parent filter is selected\n // fitlered result data, when parent filter along with its child filters selected\n //\n // TO DO:\n // We should do the same with expandable parent filter whose children is not checkbox-style\n if (filterQueryName === 'product') {\n getProductsFilterData(filterQueries, filterCollection, filterData, shouldResetCounts);\n } else {\n let bitmask = 0;\n filterQueries.forEach((activeQuery)=>{\n const activeFilter = filterCollection[`${activeQuery}`];\n if (activeFilter) {\n bitmask = bitmask | activeFilter.FilterID;\n } else {\n filterData.ignore = false;\n }\n });\n filterData.ignore = filterData.ignore && bitmask === 0;\n // push each filter under one filter collection into filterData.filters\n // and determine values of two properties, isActive and checkFilter\n Object.keys(filterCollection).forEach((filterKey)=>{\n const filter = filterCollection[`${filterKey}`];\n if (shouldResetCounts) {\n filter.count = 0;\n }\n const filterBitmaskMatch = filter.FilterID & bitmask;\n // isActive will determine if the checkbox should be toggled\n filter.isActive = filterBitmaskMatch > 0;\n // checkFilter will determine if apps will be filtered against this filter\n filter.checkFilter = filter.isActive;\n // to show curated page when parent filter is clicked upon\n // that is, as mention aboved in setting bitmask\n // we should keep child filter inactive\n // we took care of parent filter whose children is checkbox-style filters\n //\n // here, we still need to take care of parent filter whose children is not checkbox-style filters\n // since bitmask which sums up from FilterID, deosn't take care of such case\n //\n // to get the parent filter, we use first element of filterQueries (of current filter collection filterQueryName), query[filterQueryName] seperated by ';',\n // this is kind of hack, but current rule of building href when filters are clicked is that\n // only one (most nested active) parent filter will be shown in filterQueries, for each filter collection, i.e. products, industries, categories, serviceTypes\n //\n // e.g. product filter add-ins has a child filter dynamics-365, which has many child filters, business central, etc.\n // a. when user clicked filter add-ins, filterQueries will show add-ins (product=add-ins)\n // b.\n // when user clicked filter dynmamics-365,\n // although active filters (when performFilter funtion calls) have both add-ins and dynamics-365,\n // filterQueries will only show dynamics-365(product=dynamics-365)\n // which is the only one and also most nested parent active filter for the product filter collection\n //\n // to determine whether first filter is a parent, and whether this parent filter is about to expand (currently callapsed)\n // we could simply check whether it has ShouldExpandChildFilters property\n //\n // TO DO:\n // getting the parent filter is kind of hack, but you could play around with filters in UI, and notice it's only currently happening for\n // product root filters, i.e. web-apps, and add-ins\n // to improve, instead of only taking first one in filterQueries,\n // we should check each of filterQueries (i.e. selectedParentFilters) against current filter (filter)\n // we should set filter as inactive, if below are all met\n // 1) selectedParentFilter has children (ShortcutFilters)\n // 2) selectedParentFilter is about to expand\n // 3) filter is one of its children\n // 4) filter is not in filterQueries (not active)\n const selectedParentFilter = filterCollection[filterQueries[0]];\n const shouldExpandChildFilters = !!selectedParentFilter && selectedParentFilter.ShouldExpandChildFilters;\n // deactivating if current filter is a child filter of an active parent filter (selectedParentFilter, about to expand)\n if (filter !== selectedParentFilter && shouldExpandChildFilters) {\n filter.isActive = false;\n filter.checkFilter = false;\n }\n filterData.filters.push(filter);\n });\n }\n // clear each active parent filter's checkFilter if any of its children is active,\n // this is to avoid duplicate checking entities (app and consulting service) against filters, (see performFilter function in filterModule.tsx)\n // if entities are checked against more specific filters, i.e. child filters, there's no need to check its parent\n filterData.filters.forEach((filter)=>{\n const childFilterNames = filter.ShortcutFilters;\n if (!childFilterNames) {\n return;\n }\n // unlike Azure Marketplace, the child filters are on the same level with its parent filter, in DataMap (DataMapping.tsx)\n // to indicate relation with parent and child in appsource is through parent filter ShortcutFilters property\n //\n // TO INVESTIGATE:\n // filter ShortcutFilters property, after several initial renders, will change from string[], to {[index: number]: string}\n // someone may have misuse object.keys, or wrongly implemented deep copy, results in turning array into object\n Object.keys(childFilterNames)// return immediately if active child filter is found, and clear checkFilter of parent filter property\n .some((key)=>{\n const childFilterName = childFilterNames[`${key}`];\n const childFilter = filterCollection[`${childFilterName}`];\n const childFilterIsActive = !!childFilter && childFilter.isActive;\n if (childFilterIsActive) {\n filter.checkFilter = false;\n }\n return childFilterIsActive;\n });\n });\n return filterData;\n}\nfunction getFilterDataForQueryHelperV2(query, filterQueryName, subgFilterQueryName, filterCollection, shouldResetCounts) {\n const filterData = {\n filters: [],\n ignore: true\n };\n if (!filterCollection) {\n return filterData;\n }\n const selectedFilter = query && query[`${filterQueryName}`];\n Object.keys(filterCollection).forEach((filterKey)=>{\n const filter = filterCollection[`${filterKey}`];\n if (filter) {\n if (shouldResetCounts) {\n filter.count = 0;\n }\n const primaryFilter = filterQueryName === FilterQuery.category && filter.IsReference ? constantDataMap.categories.default[`${filterKey}`] : filter;\n const isActive = primaryFilter.UrlKey === selectedFilter;\n let isContainsSubActive = false;\n if (isActive) {\n filterData.ignore = false;\n }\n if (primaryFilter.SubCategoryDataMapping) {\n Object.keys(primaryFilter.SubCategoryDataMapping).forEach((subKey)=>{\n const subFilter = primaryFilter.SubCategoryDataMapping[`${subKey}`];\n const selectedSubFilters = query[`${subgFilterQueryName}`];\n const isSubActive = !!(selectedSubFilters && selectedSubFilters.indexOf(subFilter.UrlKey) > -1);\n subFilter.isActive = isSubActive;\n subFilter.checkFilter = isSubActive;\n if (isSubActive) {\n isContainsSubActive = true;\n if (!filter.IsReference) {\n filterData.filters.push(subFilter);\n }\n }\n });\n }\n filter.isActive = isActive;\n filter.checkFilter = isActive && !isContainsSubActive;\n filterData.filters.push(filter);\n }\n });\n return filterData;\n}\n/**\n * get filter data based on filterQueryName for a filter collection <=> a DataMap (DataMapping.tsx) property, and\n * update filter properties of both isActive and checkFilter in each filter, (updated in both returned filter data and in runtime DataMap)\n *\n * a wrapper function to determine how to process DataMap (DataMapping) to get the actual filter collection\n * and with the actual filter collection, call getFilterDataForQueryHelper function to get filter data\n *\n * @param query: url queries in browser url\n * @param filterQueryName:\n * name of url filter query, which corresponds to a DataMap property <=> a filter collection\n * namely: product, industry, category, serviceType\n *\n * hence, the value of filter query should be query[filterQueryName],\n * a string which joins the actual should-be-active filter name under one filter collection with ';'\n * @param filterCollection:\n * a DataMap property (DataMapping.tsx)\n * namely: products, industries, categories, serviceTypes\n * @param shouldResetCounts:\n * optionally to reset counts of app which applied to each filter,\n * the purpose of optional is for accumulate counts for different offers (app, and consulting service) in sequence\n *\n * @return: one filter collection\n * filters: an array of all filters under one filter collection, where its two properties are modified\n * isActive: determines if the filter should be active based on\n * filter url query values: namely query[filterQueryName] <=> filter names under one filter collection joined by ';'\n * mask: Bit-OR result of mask values for all active filters, indicated by filter url query values\n * checkFilter: a shorcut boolean to notify performFilter function (filterModule) to ignore this filter\n * ignore:\n * same concept with checkFilter, a shortcut boolean to notify performFilter function (filterModule) to\n * completely ignore perform filter against offers (apps and consulting sevices) with this filter data\n */ function getFilterDataForQuery(query, filterQueryName, filterCollection, shouldResetCounts) {\n // Special Case:\n // To get filter data in 'categories' filter collection of DataMap (DataMapping.tsx)\n // need to go one level deeper from its wrapper filter group\n if (filterQueryName === FilterQuery.category) {\n const filterData = {\n filters: [],\n ignore: true\n };\n if (!filterCollection) {\n return filterData;\n }\n const categoryFilterCollection = filterCollection;\n // access each sub collection to get its actual filter data\n Object.keys(categoryFilterCollection).forEach((subCollectionKey)=>{\n // sub collection is the actual filter collection which contains filter in 'categories' filter collection\n const categoryFilterSubCollection = categoryFilterCollection[`${subCollectionKey}`];\n // get actual filter sub collection data\n const filterSubCollectionData = getFilterDataForQueryHelperV2(query, filterQueryName, FilterQuery.subcategories, categoryFilterSubCollection, shouldResetCounts);\n filterData.filters = filterData.filters.concat(filterSubCollectionData.filters);\n filterData.ignore = filterData.ignore && filterSubCollectionData.ignore;\n });\n return filterData;\n } else if (filterQueryName === FilterQuery.industry) {\n return getFilterDataForQueryHelperV2(query, filterQueryName, FilterQuery.subindustries, filterCollection, shouldResetCounts);\n }\n return getFilterDataForQueryHelper(query, filterQueryName, filterCollection, shouldResetCounts);\n}\n/**\n * get all filter data based on query for a filter collection <=> a DataMap (DataMapping.tsx) property, and\n * update filter properties of both isActive and checkFilter in each filter, (updated in both returned filter data and in runtime DataMap)\n *\n * a wrapper function to determine how to process DataMap (DataMapping) to get the actual filter collection\n * and with the actual filter collection, call getFilterDataForQueryHelper function to get filter data\n *\n * @param query: url queries in browser url\n * @param DataMap:\n * could be DataMap (DataMapping.tsx) or runtime dataMap,\n * runtime dataMap same as DataMap (DataMapping.tsx),\n * which is a collection of all filter collections, namely products, industries, categories, serviceTypes\n * but where each filter in each filter collection is a valid filter which applies to at least one offer (app and consulting service),\n * this is one of the differences from DataMap (DataMapping.tsx), other differences are that additional properties are added in runtime dataMap\n * @param shouldResetCounts:\n * optionally to reset counts of app which applied to each filter,\n * the purpose of optional is for accumulate counts for different offers (app, and consulting service) in sequence\n *\n * @return:\n * return filter data for one filter collection\n * filters: an array of all filters under one filter collection, where its two properties are modified\n * isActive: determines if the filter should be active based on\n * filter url query values: namely query[filterQueryName] <=> filter names under one filter collection joined by ';'\n * mask: Bit-OR result of mask values for all active filters, indicated by filter url query values\n * checkFilter: a shorcut boolean to notify performFilter function (filterModule) to ignore this filter\n * ignore:\n * same concept with checkFilter, a shortcut boolean to notify performFilter function (filterModule) to\n * completely ignore perform filter against offers (apps and consulting sevices) with this filter data\n */ export function getFilterData(params, query, DataMap, shouldResetCounts) {\n // get filter data by checking each filter collection in DataMap (DataMapping.tsx, here constantDataMap) against input paremeter DataMap,\n // which could be either runtime dataMap or constantDataMap\n return Object.keys(constantDataMap).map((filterCollectionName)=>{\n const filterCollection = DataMap ? DataMap[`${filterCollectionName}`] : {};\n // this is one of possible properties in query, which is a filter query key,\n // namely product, industry, category, serviceType\n const filterCollectionQueryName = filterCollectionNameToFilterQuery[`${filterCollectionName}`];\n return getFilterDataForQuery(query, filterCollectionQueryName, filterCollection, shouldResetCounts);\n });\n}\n/**\n * add match function in each filter under each filter collection <=> a DataMap (DataMapping.tsx) property\n *\n * @param DataMap:\n * could be DataMap (DataMapping.tsx) or runtime dataMap,\n * runtime dataMap same as DataMap (DataMapping.tsx),\n * which is a collection of all filter collections, namely products, industries, categories, serviceTypes\n * but where each filter in each filter collection is a valid filter which applies to at least one offer (app and consulting service),\n * this is one of the differences from DataMap (DataMapping.tsx), other differences are that additional properties are added in runtime dataMap\n *\n * @return:\n * return modified DataMap with updated match function in each filter\n */ export function updateMatchFunctions(DataMap) {\n // add match function in each filter\n // by checking each filter collection in DataMap (DataMapping.tsx, here constantDataMap) against input paremeter DataMap,\n // which could be either runtime dataMap or constantDataMap\n Object.keys(constantDataMap)// update each filter in each filter collection\n .forEach((filterCollectionName)=>{\n const filterCollection = DataMap[`${filterCollectionName}`];\n if (filterCollection) {\n // if filter collection is 'categories', need to go one level deeper to get the actual filter\n if (filterCollectionName === Constants.DataMapCollectionKeys.categories) {\n const categoryFilterCollection = filterCollection;\n // access each sub collection to get its actual filter data\n Object.keys(categoryFilterCollection).forEach((subCategoryCollectionKey)=>{\n // sub collection is the actual filter collection which contains filter in 'categories' filter collection\n const subCategoryFilterCollection = categoryFilterCollection[`${subCategoryCollectionKey}`];\n // access each filter in a sub collection\n Object.keys(subCategoryFilterCollection)// update each filter match function in a sub collection\n .forEach((filterKey)=>{\n const category = subCategoryFilterCollection[`${filterKey}`];\n if (!isPureObject(category)) {\n return;\n }\n const subCategoryKeys = category.SubCategoryDataMapping ? Object.keys(category.SubCategoryDataMapping) : [];\n const childMatchFns = [];\n for (const subCategoryKey of subCategoryKeys){\n const subCategory = category.SubCategoryDataMapping[`${subCategoryKey}`];\n const matchFn = (app)=>{\n return app ? (app[subCategory.FilterGroup] & subCategory.FilterID) > 0 : false;\n };\n childMatchFns.push(matchFn);\n subCategory[`${match}`] = matchFn;\n }\n category[`${match}`] = (app)=>{\n if (!app) {\n return false;\n }\n let primaryProductKey = '';\n const productFilterCollection = DataMap.products || {};\n // find app primary product name\n Object.keys(productFilterCollection)// return immediately after primary product name found\n .some((productFilterKey)=>{\n const productFilter = productFilterCollection[`${productFilterKey}`];\n const isPrimaryProduct = app.primaryProduct ? bitMasksMatch(app.primaryProduct, productFilter.FilterGroup, productFilter.FilterID) : null;\n if (isPrimaryProduct) {\n primaryProductKey = productFilterKey;\n }\n return isPrimaryProduct;\n });\n if (!primaryProductKey) {\n return false;\n }\n // const primaryProduct: IDataValues = productFilterCollection[primaryProductKey];\n // TODO is matchCollection good solution?\n // if (matchCollection && primaryProduct.categoryList !== subCategoryCollectionKey) {\n // return false;\n // }\n if (category.IsReference) {\n const primaryFilter = categoryFilterCollection.default[`${filterKey}`];\n return primaryFilter.match(app);\n }\n const matchCategories = (app)=>{\n return app && (app[category.FilterGroup] & category.FilterID) > 0;\n };\n const matchSubCategories = (app)=>{\n for(let i = 0; i < childMatchFns.length; i++){\n if (childMatchFns[`${i}`](app)) {\n return true;\n }\n }\n return false;\n };\n // TODO: Why did we used ShortcutBitmask?\n return childMatchFns.length > 0 ? matchSubCategories(app) : matchCategories(app);\n };\n });\n });\n } else if (filterCollectionName === Constants.DataMapCollectionKeys.industries || isOneTaxonomyEnabled() && filterCollectionName === Constants.DataMapCollectionKeys.cloudIndustries) {\n Object.keys(filterCollection)// update each filter with match function\n .forEach((filterKey)=>{\n const filter = filterCollection[`${filterKey}`];\n const subFilterKeys = filter.SubCategoryDataMapping ? Object.keys(filter.SubCategoryDataMapping) : [];\n const childMatchFns = [];\n for (const subFilterKey of subFilterKeys){\n const subFilter = filter.SubCategoryDataMapping[`${subFilterKey}`];\n const matchFn = (app)=>{\n return app ? (app[subFilter.FilterGroup] & subFilter.FilterID) > 0 : false;\n };\n childMatchFns.push(matchFn);\n subFilter[`${match}`] = matchFn;\n }\n filter[`${match}`] = (app)=>{\n if (!app) {\n return false;\n }\n const matchCategories = (app)=>{\n return app && (app[filter.FilterGroup] & filter.FilterID) > 0;\n };\n const matchSubCategories = (app)=>{\n for(let i = 0; i < childMatchFns.length; i++){\n if (childMatchFns[`${i}`](app)) {\n return true;\n }\n }\n return false;\n };\n // TODO: Why did we used ShortcutBitmask?\n return childMatchFns.length > 0 ? matchSubCategories(app) : matchCategories(app);\n };\n });\n } else if (filterCollectionName === Constants.DataMapCollectionKeys.products) {\n Object.keys(filterCollection)// update each filter with match function\n .forEach((filterKey)=>{\n const filter = filterCollection[`${filterKey}`];\n filter[`${match}`] = (app)=>{\n if (!app) {\n return false;\n }\n return bitMasksContainSomeBitMask(getShortCutBitmask(filter), app[`${filterCollectionName}`]);\n };\n });\n } else {\n Object.keys(filterCollection)// update each filter with match function\n .forEach((filterKey)=>{\n const filter = filterCollection[`${filterKey}`];\n filter[`${match}`] = (app)=>{\n if (!app) {\n return false;\n }\n return (app[`${filterCollectionName}`] & filter.FilterID) > 0;\n };\n });\n }\n }\n });\n return DataMap;\n}\n// TODO Support L2 categories\nexport function getFilterLink(context, filter, entityType, embedHost, allowShortcutFilter, isTreatmentNewFilterAMPEnabled, urlQuery) {\n let query = filter.FilterGroup;\n const isProduct = filter.UrlGroup === FilterQuery.product;\n const isCategory = filter.UrlGroup === FilterQuery.category;\n const isIndustry = filter.UrlGroup === FilterQuery.industry;\n const isSubFilter = (isCategory || isIndustry) && filter.IsChildFilter;\n if (filter.UrlGroup) {\n query = filter.UrlGroup;\n }\n if (isSubFilter) {\n if (isCategory) {\n query = FilterQuery.subcategories;\n }\n if (isIndustry) {\n query = FilterQuery.subindustries;\n }\n }\n // Use the ShortctUrlKey if it exists and is allowed - the home page sets that argument to true\n // because it wants to apply all the child filters instead of a parent filter\n let filterValue = allowShortcutFilter ? filter.ShortcutUrlKey : filter.UrlKey;\n const flattedEmbedHost = embedHost && embedHostUtils.shouldFlatProducts(embedHost);\n // For top level product or category filters, only allow one to be selected at a time, except specific embed host\n if (isProduct && !filter.IsChildFilter && !flattedEmbedHost || (isCategory || isIndustry) && !isSubFilter) {\n if (filter.isActive) {\n filterValue = null;\n }\n } else {\n // For all other filters, append or remove the specific value\n filterValue = (filter.isActive ? '!' : ';') + filterValue;\n }\n const route = getEntityRegistration(entityType).route;\n const newProps = {\n [query]: filterValue,\n page: '1'\n };\n // Don't preseve sub filters for top level filter\n if (!isSubFilter) {\n if (isCategory) {\n newProps[FilterQuery.subcategories] = null;\n }\n if (isIndustry) {\n newProps[FilterQuery.subindustries] = null;\n }\n }\n if (urlQuery && isProduct && !filter.IsChildFilter) {\n if (!filter.isActive) {\n // render link when the L1 product filter is not active\n // link is used when it's being checked next time\n const productMask = {\n [filter.FilterGroup]: filter.FilterID\n };\n const newQuery = removeUnmatchedCategories(urlQuery, filter.UrlKey, productMask);\n return context.buildHref(route, null, newQuery);\n } else {\n // render link when the L1 product filter is active\n // link is used when it's being unchecked next time\n const newQuery = removeUnmatchedCategories(urlQuery, null, null);\n return context.buildHref(route, null, newQuery);\n }\n }\n return context.buildHref(route, null, newProps);\n}\nexport function getCountryRegionfilterLink(context, countryCode, regionCode) {\n const route = getEntityRegistration(Constants.EntityType.Service).route;\n const newProps = {\n country: countryCode,\n region: regionCode,\n page: '1'\n };\n const url = context.buildHref(route, null, newProps);\n urlPush(url);\n}\nexport function getActiveFiltersByFilterGroup(activeFilters) {\n const filtersByFilterGroup = activeFilters.reduce((grouped, item)=>{\n grouped[item.UrlGroup] = grouped[item.UrlGroup] || [];\n grouped[item.UrlGroup].push(item);\n return grouped;\n }, {});\n return filtersByFilterGroup;\n}\n// Checks to see if the active filter has a curated section with more than one swim lane\nexport function shouldShowCurationForFilter(activeFilter, curatedData) {\n const curatedSection = activeFilter.BackendKey && ((curatedData === null || curatedData === void 0 ? void 0 : curatedData[activeFilter.BackendKey]) || (curatedData === null || curatedData === void 0 ? void 0 : curatedData[activeFilter.BackendKey.toLowerCase()]));\n return !!curatedSection && curatedSection.length > 1;\n}\nexport function shouldShowCurationForProductFilters(activeProductsFilters, curatedData) {\n const L3ProdFilters = activeProductsFilters.filter((filter)=>!filter.ShortcutFilters);\n const activeProdFilters = activeProductsFilters.filter((filter)=>!!filter.ShortcutFilters);\n if (L3ProdFilters.length === 1) {\n return shouldShowCurationForFilter(L3ProdFilters[0], curatedData);\n }\n if (L3ProdFilters.length === 0 && activeProdFilters.length === 1) {\n return shouldShowCurationForFilter(activeProdFilters[0], curatedData);\n }\n return false;\n}\n/**\n * check should provide curated data, based on active filters\n *\n * @param activeFilters: active filters, which are chosen left pane filters, and also shows in gallery header tags\n * @param curatedData: response from the featured api\n * @return\n * return true, if below conditions are met\n * 1) active filters consists none or only of parent product filters, which have children filters\n * 2) only one industry or category filter is selected and it has curated data.\n * return false, otherwise\n */ export function shouldShowCuratedDataForActiveFilters(activeFilters, curatedData) {\n // no filters selected show curation\n if (activeFilters.length === 0) {\n return false;\n }\n const filtersByGroup = getActiveFiltersByFilterGroup(activeFilters);\n // filters from more than one group is selected dont show curated view\n if (Object.keys(filtersByGroup).length > 1) {\n return false;\n }\n // only product filters selected show curation if the product has it\n if (filtersByGroup[FilterQuery.product] && filtersByGroup[FilterQuery.product].length > 0 && shouldShowCurationForProductFilters(filtersByGroup[FilterQuery.product], curatedData)) {\n return true;\n }\n // only category filters selected show curation if the category has it\n if (filtersByGroup[FilterQuery.category] && filtersByGroup[FilterQuery.category].length === 1 && shouldShowCurationForFilter(filtersByGroup[FilterQuery.category][0], curatedData)) {\n return true;\n }\n // only industry filters selected show curation if the industry has it\n if (filtersByGroup[FilterQuery.industry] && filtersByGroup[FilterQuery.industry].length === 1 && shouldShowCurationForFilter(filtersByGroup[FilterQuery.industry][0], curatedData)) {\n return true;\n }\n return false;\n}\nexport function getFilterType(filter) {\n return filter.FilterGroup ? filter.FilterGroup : '';\n}\nexport function shouldShowFilterForView(currentView, supportedViews) {\n return supportedViews && Object.values(supportedViews).some((supportedView)=>supportedView === Constants.everywhereFilterView || supportedView === currentView);\n}\nexport function shouldShowSubFilter(filter) {\n if (filter.count) {\n return true;\n }\n return false;\n}\nexport function sort(textA, textB) {\n textA = textA.toUpperCase();\n textB = textB.toUpperCase();\n if (textA < textB) {\n return -1;\n } else {\n return 1;\n }\n}\nexport function sortFilters(filterA, filterB) {\n if (filterA && filterB && filterA.Title && filterB.Title) {\n return sort(filterA.Title, filterB.Title);\n }\n return 0;\n}\nexport function sortFiltersKeys(filterKeyA, filterKeyB, filters) {\n if (filters) {\n return sortFilters(filters[`${filterKeyA}`], filters[`${filterKeyB}`]);\n }\n return 0;\n}\nexport function onClickTrackHitCountsForTreatmentNewFilter(filterUrlKey) {\n const eventDetails = {\n urlKey: filterUrlKey || ''\n };\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.Click,\n actionModifier: Constants.Telemetry.Action.FilterClick,\n details: JSON.stringify(eventDetails)\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n}\nexport const isFilterChosen = (currentView, appsActiveFilters, servicesActiveFilters, cloudsIndustryActiveFilters)=>{\n if (currentView === Constants.Views.appGallery && appsActiveFilters.length > 0) {\n return true;\n }\n if (currentView === Constants.Views.serviceGallery && servicesActiveFilters.length > 0) {\n return true;\n }\n if (currentView === Constants.Views.cloudsIndustryGallery && cloudsIndustryActiveFilters.length > 0) {\n return true;\n }\n return false;\n};\nexport const getResetFiltersHref = (context, entityType)=>{\n const route = getEntityRegistration(entityType).route;\n return context.buildHref(route, null, {\n [Constants.FilterQuery.page]: '1',\n [Constants.FilterQuery.sortBy]: null,\n [Constants.FilterQuery.filters]: null,\n [Constants.FilterQuery.category]: null,\n [Constants.FilterQuery.industry]: null,\n [Constants.FilterQuery.subcategories]: null,\n [Constants.FilterQuery.subindustries]: null,\n [Constants.FilterQuery.product]: null,\n [Constants.FilterQuery.serviceType]: null\n });\n};\nexport const getResetFiltersAndSearchHref = (context, entityType)=>{\n const route = getEntityRegistration(entityType).route;\n return context.buildHref(route, null, {\n [Constants.FilterQuery.page]: '1',\n [Constants.FilterQuery.sortBy]: null,\n [Constants.FilterQuery.filters]: null,\n [Constants.FilterQuery.category]: null,\n [Constants.FilterQuery.industry]: null,\n [Constants.FilterQuery.subcategories]: null,\n [Constants.FilterQuery.subindustries]: null,\n [Constants.FilterQuery.product]: null,\n [Constants.FilterQuery.serviceType]: null,\n [Constants.FilterQuery.search]: null\n });\n};\nexport function increaseCountOfReferenceCategoryInDefaultCategoryList(filterData, filter) {\n for(let i = 0; i < filterData.length; i++){\n const category = filterData[`${i}`];\n if (category.IsReference) {\n continue;\n }\n if (category.FilterID === filter.FilterID) {\n category.count++;\n return;\n }\n }\n}\nexport function getTopCuratedLane(filterKey, curatedData) {\n if (filterKey && curatedData) {\n const curatedSection = curatedData[`${filterKey}`] || curatedData[filterKey.toLowerCase()];\n if (curatedSection && curatedSection.length === 1) {\n return curatedSection[0].items;\n }\n }\n return [];\n}\nexport function getPopularItems({ allItems, featuredItems = [], maxLength = 5 }) {\n return allItems.slice().filter((item)=>featuredItems.every((featuredItem)=>featuredItem.entityId !== item.entityId)).sort((a, b)=>b.popularity - a.popularity).slice(0, maxLength);\n}\nexport function getFeaturedItemsFilter(activeFilters) {\n const filters = activeFilters === null || activeFilters === void 0 ? void 0 : activeFilters.filter((filter)=>filter === null || filter === void 0 ? void 0 : filter.BackendKey);\n if (filters.length !== 1) {\n return null;\n }\n const filter = filters[0];\n if (filter.FilterGroup !== Constants.filterTileTypes.industry && filter.FilterGroup !== Constants.filterTileTypes.category) {\n return null;\n }\n return filter;\n}\nexport function getFeaturedItemsByFilter(activeFilters, curatedData, itemsHashMap, allItems) {\n const filter = getFeaturedItemsFilter(activeFilters);\n if (!filter) {\n return [];\n }\n const topCuratedLane = getTopCuratedLane(filter.BackendKey, curatedData);\n const itemsIndexes = topCuratedLane.map((curatedItem)=>{\n var _curatedItem_id;\n return itemsHashMap[curatedItem === null || curatedItem === void 0 ? void 0 : (_curatedItem_id = curatedItem.id) === null || _curatedItem_id === void 0 ? void 0 : _curatedItem_id.toLowerCase()];\n }).filter((appIndex)=>appIndex >= 0);\n return itemsIndexes.map((appIndex)=>allItems[`${appIndex}`]);\n}\nexport function windowScrollToTop() {\n const window = getWindow();\n if (window) {\n getWindow().scrollTo(0, 0);\n }\n}\nexport function getInternetOfThingsLink(category) {\n if (category === Constants.InternetOfThings.urlKey) {\n return [\n {\n className: [\n 'secondary_link',\n 'secondary_link_left'\n ],\n href: 'https://aka.ms/devicecatalog',\n accessibilityEnabled: true,\n locKey: 'IoT_Devices_Catalog'\n }\n ];\n }\n return [];\n}\nexport const serviceOffersSupportedCountries = [\n {\n countryCode: Constants.allCountriesCode,\n code: Constants.allCountriesCode,\n name: 'All Countries'\n },\n ...supportedCountries\n];\nexport const serviceOffersSupportedCountriesMap = serviceOffersSupportedCountries.reduce((acc, curr)=>_object_spread_props(_object_spread({}, acc), {\n [curr.countryCode]: curr\n }), {});\nexport function findServiceSupportedCountry(countryCode) {\n const foundCountries = serviceOffersSupportedCountries.filter((item)=>{\n return item.countryCode === countryCode;\n });\n if (!foundCountries || foundCountries.length === 0) {\n return undefined;\n }\n return foundCountries[0];\n}\nexport function isPricingFilter() {\n return false;\n}\n","import { getFilterData, increaseCountOfReferenceCategoryInDefaultCategoryList } from 'utils/filterHelpers';\nexport const match = 'match';\n// Helper method to increase the counts for all Filters in a FilterList where the item matches.\nfunction increaseCounts(filterData, item) {\n for(let i = 0, len = filterData.length; i < len; i++){\n let f = filterData[i];\n if (f.match && f.match(item)) {\n f.count++;\n if (f.IsReference) {\n increaseCountOfReferenceCategoryInDefaultCategoryList(filterData, f);\n } else if (f.SubCategoryDataMapping) {\n // TODO: need to think of a way to count the categories per all the active filters\n // if I selected power bi then re count again and show only the relevant categories and industries\n let subFilters = f.SubCategoryDataMapping || [];\n Object.keys(subFilters).forEach((subFilterKey)=>{\n let subFilter = subFilters[subFilterKey];\n if (subFilter.match(item)) {\n subFilter.count ? subFilter.count++ : subFilter.count = 1;\n }\n });\n }\n }\n }\n return;\n}\n/*\n Calls into a platform specific 'getFilterData' function to get the list of filters to\n iterate over. Then adds matching apps to an array and does counting.\n Parameters:\n 'params': React-router params object. It will contain pieces of the URL that might be\n needed by an app specific module to determine which filters are active.\n 'query': React-router query object. Contains key-value pairs of URL query params\n 'items': this is an array of either apps or partners\n 'data': TODO: Rename + typing? -- this is a reference to a DataMapping object\n TODO: Should counting be optional? It adds extra CPU time and is only used by Home right now\n TODO: 'isMac' parameter should be removed\n*/ export function performFilter(params, query, items, data, performCounting, resetCounts = true) {\n // this block of code builds up an array of 'active' filters. This is used to\n // determine if a 'curated' page should be shown\n const activeFilters = [];\n const filterData = getFilterData(params, query, data, resetCounts);\n filterData.forEach((filterList)=>{\n filterList.filters.forEach((filter)=>{\n if (filter.isActive) {\n activeFilters.push(filter);\n }\n });\n });\n // TODO: Ideally we could skip the filtering/counting if no filters are applied\n // but for cloning the DataMap for a specific collection, it requires doing a count\n // with no filters applied to decide which items to drop. Maybe a parameter to indicate\n // if counting should be done? We also technically don't need to count on the GalleryPage\n // Loop over all items\n let matchingItems = [];\n for(let a = 0, itemLength = items.length; a < itemLength; a++){\n let item = items[a];\n let itemMatches = true;\n // An array to store for each 'Group' returned as part of 'filterData' if the item\n // matches that specific 'Group'\n let matchesGroup = [];\n // match top level filter (category, industry, product) - AND\n // can't short circuit if we want to do 'counting' later\n for(let i = 0, len = filterData.length; i < len; i++){\n let topFilter = filterData[i].filters;\n let matchesCategory = filterData[i].ignore;\n // match sub filters - OR\n // could short-circuit this as soon as matchesCategory becomes true\n if (!matchesCategory) {\n for(let j = 0, len2 = topFilter.length; j < len2; j++){\n let f = topFilter[j];\n if (f.checkFilter) {\n matchesCategory = matchesCategory || f.match(item);\n }\n }\n }\n matchesGroup[i] = matchesCategory;\n itemMatches = itemMatches && matchesCategory;\n }\n if (performCounting) {\n // Perform counting. Algorithm is as follows:\n // Loop over each top level group in the filterData array. If the item matches every\n // filter group except that one, increment the counts of the filters in the current group\n for(let i = 0, len = matchesGroup.length; i < len; i++){\n let passesGroup = true;\n for(let j = 0, len2 = matchesGroup.length; j < len2; j++){\n if (i !== j) {\n passesGroup = passesGroup && matchesGroup[j];\n }\n }\n if (passesGroup) {\n increaseCounts(filterData[i].filters, item);\n }\n }\n }\n if (!itemMatches) {\n continue;\n }\n matchingItems.push(item);\n }\n return {\n items: matchingItems,\n activeFilters: activeFilters\n };\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nimport { IAvailabilityActions, TermsStrings } from '@shared/Models';\nimport { cloneDeep } from 'lodash-es';\nimport { logError } from '@shared/utils/httpClientUtil';\nimport { OfferType } from '@shared/utils/constants';\nexport var OS = /*#__PURE__*/ function(OS) {\n OS[OS[\"Windows\"] = 1] = \"Windows\";\n OS[OS[\"Linux\"] = 2] = \"Linux\";\n return OS;\n}({});\nconst MONTH_UNIT = 'Month';\nconst YEAR_UNIT = 'Year';\nconst MONTH_THERM_UNIT = 'P1M';\nconst YEAR_THERM_UNIT = 'P1Y';\nconst isUnitEqual = (term, termPrice, mightContainMultiyearTerms)=>{\n if (mightContainMultiyearTerms) {\n if (!(term === null || term === void 0 ? void 0 : term.termId) || !(termPrice === null || termPrice === void 0 ? void 0 : termPrice.termId)) {\n return false;\n }\n return term.termId === termPrice.termId;\n }\n return term && termPrice && (term.termUnits === MONTH_THERM_UNIT && termPrice.unit === MONTH_UNIT || term.termUnits === YEAR_THERM_UNIT && termPrice.unit === YEAR_UNIT);\n};\nconst filterDecreasePrices = (sku, hasMonthlyPriceIncrease, hasYearlyPriceIncrease, hasMeterPriceIncrease)=>{\n if (!hasMeterPriceIncrease) {\n const increaseTermPrices = sku.termPrices.filter((termPrice)=>termPrice.unit === MONTH_UNIT && hasMonthlyPriceIncrease || termPrice.unit === YEAR_UNIT && hasYearlyPriceIncrease);\n if (increaseTermPrices) {\n sku.termPrices = increaseTermPrices;\n } else {\n sku = null;\n }\n }\n return sku;\n};\nconst updateTermPrices = (futurePlan, sku)=>{\n let hasMonthlyPriceIncrease = false;\n let hasYearlyPriceIncrease = false;\n let hasMeterPriceIncrease = false;\n sku.startDate = futurePlan.availabilities[0].startDate;\n const mightContainMultiyearTerms = sku.offerType === OfferType.SaaSApp;\n const increasedTermIds = [];\n futurePlan.availabilities.forEach((futureAvailability)=>{\n // Update termPrice value\n const { actions } = futureAvailability;\n if (actions.includes(IAvailabilityActions.Purchase) && actions.includes(IAvailabilityActions.Browse)) {\n futureAvailability.terms.forEach((futureTerm)=>{\n var _term_billingPlan, _futureTerm_billingPlan;\n const term = sku.termPrices.find((termPrice)=>isUnitEqual(futureTerm, termPrice, mightContainMultiyearTerms));\n if (!term) {\n return;\n }\n const wasPriceIncreased = futureTerm.price.listPrice > term.value;\n if (wasPriceIncreased) {\n if (mightContainMultiyearTerms) {\n increasedTermIds.push(term.termId);\n } else {\n hasMonthlyPriceIncrease = hasMonthlyPriceIncrease || term.unit === TermsStrings.MonthString;\n hasYearlyPriceIncrease = hasYearlyPriceIncrease || term.unit === TermsStrings.YearString;\n }\n }\n term.value = futureTerm.price.listPrice;\n if (((_term_billingPlan = term.billingPlan) === null || _term_billingPlan === void 0 ? void 0 : _term_billingPlan.price) && ((_futureTerm_billingPlan = futureTerm.billingPlan) === null || _futureTerm_billingPlan === void 0 ? void 0 : _futureTerm_billingPlan.price)) {\n term.billingPlan.price = _object_spread({}, futureTerm.billingPlan.price);\n }\n });\n }\n // Update customMeter price\n if (actions.includes(IAvailabilityActions.Consume) && actions.includes(IAvailabilityActions.Browse)) {\n sku.termPrices.forEach((termPrice)=>{\n const meter = termPrice.customMeter.find((customMeter)=>customMeter.availabilityId === futureAvailability.currentAvailabilityId);\n if (meter) {\n if (futureAvailability.meter.price.listPrice > meter.rate) {\n hasMeterPriceIncrease = true;\n }\n meter.rate = futureAvailability.meter.price.listPrice;\n }\n });\n }\n });\n if (mightContainMultiyearTerms) {\n if (!hasMeterPriceIncrease) {\n sku.termPrices = sku.termPrices.filter((termPrice)=>increasedTermIds.includes(termPrice.termId));\n }\n return sku;\n } else {\n return filterDecreasePrices(sku, hasMonthlyPriceIncrease, hasYearlyPriceIncrease, hasMeterPriceIncrease);\n }\n};\nconst updateThirdPartyPricing = (futurePlan, sku)=>{\n const futurePricePerCore = {};\n sku.startDate = futurePlan.availabilities[0].startDate;\n futurePlan.availabilities.forEach((futureAvailability)=>{\n if (futureAvailability.meter && sku.thirdPartyPricing.pricePerCore) {\n const currentMeter = sku.thirdPartyPricing.pricePerCore[futureAvailability.meter.meterId];\n if (currentMeter && currentMeter.availabilityId === futureAvailability.currentAvailabilityId && futureAvailability.meter.price.listPrice > currentMeter.value) {\n currentMeter.value = futureAvailability.meter.price.listPrice;\n futurePricePerCore[futureAvailability.meter.meterId] = currentMeter;\n }\n }\n });\n sku.thirdPartyPricing.pricePerCore = futurePricePerCore;\n return Object.keys(futurePricePerCore).length ? sku : null;\n};\nconst getFuturePricesSkus = (futurePlans, currentSkus)=>{\n const futureSkus = [];\n if (futurePlans && currentSkus) {\n futurePlans.forEach((futurePlan)=>{\n var _futurePlan_availabilities;\n const currentSku = currentSkus.find((skus)=>skus.id === futurePlan.planId);\n if (!currentSku) {\n logError(`getFuturePricesSkus failed to find current sku: ${futurePlan.planId}`);\n } else if (!((_futurePlan_availabilities = futurePlan.availabilities) === null || _futurePlan_availabilities === void 0 ? void 0 : _futurePlan_availabilities.length)) {\n logError(`getFuturePricesSkus futurePlan: ${futurePlan.planId} - not contains availabilities`);\n } else {\n let futureSku = cloneDeep(currentSku);\n if (futureSku.termPrices) {\n futureSku = updateTermPrices(futurePlan, futureSku);\n }\n if (futureSku.thirdPartyPricing) {\n futureSku = updateThirdPartyPricing(futurePlan, futureSku);\n }\n if (futureSku) {\n futureSkus.push(futureSku);\n }\n }\n });\n }\n return futureSkus;\n};\nexport const getFuturePricesInformation = (futurePrices, currentPrices)=>{\n if (futurePrices && currentPrices) {\n const futureSkus = getFuturePricesSkus(futurePrices.plans, currentPrices.skus);\n if (futureSkus === null || futureSkus === void 0 ? void 0 : futureSkus.length) {\n return {\n billingRegion: currentPrices.billingRegion,\n skus: futureSkus\n };\n }\n }\n return null;\n};\nexport const getUTCDateString = (startDateUtcInMinutes, context)=>{\n return `${context.locDateString(startDateUtcInMinutes * 60000, {\n timeZone: 'UTC'\n })} (UTC)`;\n};\n","// hashmap that maps the passed identifier value to the index in the array\n// i.e. if we pass an array of apps with appid as the identifier\n// the returned map will be h[appid] = index in array\nexport function generateHashMap(data, identifiers) {\n let hash = {};\n const dataLength = data.length;\n const idsLength = identifiers.length;\n for(let i = 0; i < dataLength; i++){\n // data is allowed to be null\n if (data[i]) {\n for(let j = 0; j < idsLength; j++){\n if (data[i][identifiers[j]]) {\n hash[data[i][identifiers[j]].toString().toLowerCase()] = i;\n }\n }\n }\n }\n return hash;\n}\nexport function parseCuratedSections(sections, data, hashMap, dataMapSubCats) {\n let result = [];\n if (sections) {\n sections.forEach((section)=>{\n //dataMapSubCats is only supplied when filling mac app swimlanes\n //when it's given, use it to make sure each subcategory is in datamapping\n //otherwise, continue on without checking\n if (!dataMapSubCats || dataMapSubCats.includes(section.titleId)) {\n let newItems = [];\n let items = section.items;\n if (items) {\n items.forEach((item)=>{\n const id = item.id;\n const index = hashMap[id];\n if (index >= 0) {\n newItems.push(data[index]);\n }\n });\n }\n // if we can't find any data for any item in the curated section\n // let's not show the section at all\n if (newItems.length > 0) {\n let newSection = {\n titleId: section.titleId,\n items: newItems\n };\n if (section.titleLocId) {\n newSection.titleLocId = section.titleLocId;\n }\n result.push(newSection);\n }\n }\n });\n }\n return result;\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { getWindow } from '../services/window';\nimport { Constants } from '../utils/constants';\nimport { SpzaInstrumentService } from '../services/telemetry/spza/spzaInstrument';\nimport { SharedInstrumentService } from '../services/telemetry/shared/sharedInstrument';\nimport { getAppConfig } from '../services/init/appConfig';\nimport { stringifyError } from './errorUtils';\nimport { logger, systemLogger } from '@src/logger';\n// eslint-disable-next-line @typescript-eslint/no-var-requires\nconst jwtDecode = require('jwt-decode');\nexport const headersToRedact = {\n [Constants.Headers.Cookie.toLowerCase()]: true,\n [Constants.Headers.Authorization.toLowerCase()]: true,\n [Constants.Headers.InternalAuthorizationHeader.toLowerCase()]: true,\n [Constants.Headers.XForwardedFor.toLowerCase()]: true,\n [Constants.Headers.XIISNodeRemoteAddr.toLowerCase()]: true,\n [Constants.Headers.ApiKey.toLowerCase()]: true,\n [Constants.Headers.SetCookie.toLowerCase()]: true,\n [Constants.Headers.XMSAuthInternalToken.toLowerCase()]: true,\n [Constants.Headers.XAPIKey.toLowerCase()]: true,\n [Constants.Headers.XProofToken.toLowerCase()]: true,\n [Constants.Headers.ProxyAuthorization.toLowerCase()]: true\n};\nfunction generateTelemetryPayload(error, operationName) {\n const _details = {};\n _details.operation = operationName;\n _details.error = error || '';\n if (typeof error !== 'string') {\n _details.error = stringifyError(error);\n }\n let page = 'server';\n if (getAppConfig('runtimeEnvironment') === 'browser') {\n page = getWindow().location.href;\n }\n return {\n page,\n action: Constants.Telemetry.Action.NetworkCall,\n actionModifier: Constants.Telemetry.ActionModifier.Error,\n details: _details\n };\n}\nfunction parseURL(url) {\n // eslint-disable-next-line security/detect-non-literal-regexp\n const reURLInformation = new RegExp([\n '^(https?:)//',\n '(([^:/?#]*)(?::([0-9]+))?)',\n '(/{0,1}[^?#]*)',\n '(\\\\?[^#]*|)',\n '(#.*|)$'\n ].join(''));\n const match = url.match(reURLInformation);\n if (!match) {\n return {};\n } else {\n return {\n protocol: match[1],\n host: match[2],\n hostname: match[3],\n port: match[4],\n pathname: match[5],\n search: match[6],\n hash: match[7]\n };\n }\n}\n/**\n * This method removes the values of headers which contains PII or sensitive information.\n * The object returned will maintain the keys, but the senstive header values will be replaced with 'SCRUBBED (Length X)'\n * i.e.\n * {Authorization: SCRUBBED (Length 160), x-ms-correlationId: 04056106-cf0c-40cc-8e68-d657442da7ad\\}\n */ export function scrubHeaders(headers) {\n return Object.fromEntries(Object.entries(headers).map(([key, value])=>{\n if (headersToRedact[`${key.toLowerCase()}`]) {\n var _headers_;\n value = `${Constants.scrubbedHeaderValue} (Length ${(_headers_ = headers[`${key}`]) === null || _headers_ === void 0 ? void 0 : _headers_.length})`;\n }\n return [\n key,\n value\n ];\n }));\n}\nfunction logOutRequestEventInfo(telemetry) {\n SharedInstrumentService.getProvider().probe('logOutRequestEventInfo', telemetry);\n}\nexport function logError(operationName, error) {\n var _error_response, _error_response1;\n const instrument = SpzaInstrumentService.getProvider();\n let code = '';\n if (error === null || error === void 0 ? void 0 : (_error_response = error.response) === null || _error_response === void 0 ? void 0 : _error_response.statusCode) {\n code = error.response.statusCode.toString();\n }\n const payload = generateTelemetryPayload(`${error}. Code: ${code}. Error details: ${error === null || error === void 0 ? void 0 : (_error_response1 = error.response) === null || _error_response1 === void 0 ? void 0 : _error_response1.text}`, operationName);\n instrument.probe('logAndFlushTelemetryInfo', payload);\n logger.error(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n page: payload.page\n });\n}\nfunction parseRequest(request, taskName) {\n let operationName;\n if (getAppConfig('runtimeEnvironment') === 'browser') {\n operationName = getWindow().location.href;\n } else {\n operationName = 'server';\n }\n const requestHeaders = request.header;\n const correlationId = requestHeaders && requestHeaders[Constants.Headers.CorrelationId] || '';\n const requestId = requestHeaders && requestHeaders[Constants.Headers.RequestId] || '';\n const parsedUrl = parseURL(request.url);\n const telemetry = {\n taskName,\n correlationId,\n requestId,\n operation: operationName,\n httpMethod: request.method,\n hostName: parsedUrl.host || '',\n targetUri: request.url,\n requestHeaders: JSON.stringify(scrubHeaders(requestHeaders))\n };\n return telemetry;\n}\nexport function logOutRequestStart(request) {\n // Prevent recusrive logs\n if (request.url.indexOf('api/log') === -1 && request) {\n const telemetry = parseRequest(request, Constants.Telemetry.OutRequest.Start);\n logOutRequestEventInfo(telemetry);\n systemLogger.info({\n event: telemetry\n });\n }\n}\n// TODO: Merge commong code with logOutRequestError\nexport function logOutRequestEnd(request, response, durationInMilliseconds) {\n // Prevent recusrive logs\n if (request.url.indexOf('api/log') === -1 && request && response) {\n let taskName;\n let errorMessage;\n if (response.ok) {\n taskName = Constants.Telemetry.OutRequest.EndWithSuccess;\n } else if (response.clientError) {\n taskName = Constants.Telemetry.OutRequest.EndWithClientError;\n errorMessage = response.text;\n } else {\n taskName = Constants.Telemetry.OutRequest.EndWithServerError;\n errorMessage = response.text;\n }\n const requestStart = parseRequest(request, taskName);\n const contentLength = response.header && response.header['content-length'] && Number(response.header['content-length']) || 0;\n const requestEnd = _object_spread_props(_object_spread({}, requestStart), {\n durationInMilliseconds,\n httpStatusCode: response.status,\n errorMessage,\n contentLength,\n responseHeaders: JSON.stringify(scrubHeaders(response.header))\n });\n logOutRequestEventInfo(requestEnd);\n systemLogger.info({\n event: requestEnd\n });\n }\n}\n// TODO: Merge commong code with logOutRequestEnd\nexport function logOutRequestError(request, response, duration, error, parsingError) {\n // Prevent recusrive logs\n if (request.url.indexOf('api/log') === -1 && request && response) {\n const actionModifier = parsingError || response.clientError ? Constants.Telemetry.OutRequest.EndWithClientError : Constants.Telemetry.OutRequest.EndWithServerError;\n const requestStart = parseRequest(request, actionModifier);\n const errorMessage = stringifyError(error);\n const contentLength = response.header && response.header['content-length'] && Number(response.header['content-length']) || 0;\n const requestEnd = _object_spread_props(_object_spread({}, requestStart), {\n durationInMilliseconds: duration,\n httpStatusCode: response.status,\n errorMessage,\n contentLength,\n responseHeaders: JSON.stringify(scrubHeaders(response.header))\n });\n logOutRequestEventInfo(requestEnd);\n systemLogger.error({\n event: requestEnd\n });\n }\n}\nexport function shouldRefreshToken(token) {\n if (__SERVER__) {\n return false;\n }\n const currentTime = Math.round(Date.now() / 1000);\n const tolerance = 5 * 60;\n try {\n const decodedToken = token ? jwtDecode(token) : null;\n if (decodedToken) {\n if (typeof decodedToken.exp === 'number') {\n const expiryTime = decodedToken.exp;\n if (expiryTime - currentTime < tolerance) {\n return true;\n }\n }\n }\n } catch (err) {\n return true;\n }\n return false;\n}\n","import { DataMap } from '@shared/utils/dataMapping';\nimport { Constants } from '@shared/utils/constants';\nimport { bitMasksMatchBitMask } from '@shared/utils/datamappingHelpers';\nimport { getProdcutBitMaskInfo } from '@shared/utils/appUtils';\nexport function shouldShowPopUp() {\n return true;\n}\n/**\n * detemine if app consent modal is a contact form\n *\n * @param appInfo: application info\n * @param ctaType: click-to-action type\n *\n * @return:\n * true, if application click-to-action is Contact Me, and not a test drive\n * false, otherwise\n */ export const isAppContactForm = (appInfo, ctaType)=>{\n if (!appInfo) {\n return false;\n }\n if (appInfo.licenseManagement && appInfo.licenseManagement.isMicrosoftManaged) {\n return ctaType === Constants.CTAType.RequestTrial;\n }\n return appInfo.actionString === Constants.ActionStrings.RequestTrial && ctaType !== Constants.CTAType.TestDrive;\n};\nexport function isLeadgenEnabled() {\n // All apps should be considered as sending leads\n return true;\n}\nexport function getContactSubmitText(context) {\n return context.loc('CTA_ContactMe');\n}\nexport function isETERunning(query) {\n return query && !!query[Constants.QueryStrings.ete];\n}\n// Localization\nexport function getServiceDisclaimerLeadConsentLocalizationName() {\n return 'Service_Disclaimer_LeadConsent';\n}\nexport function getAppDisclaimerLeadConsentLocalizationName(usesEnterpriseContract, productType) {\n if (bitMasksMatchBitMask(productType, getProdcutBitMaskInfo(DataMap.products.Dynamics365)) || bitMasksMatchBitMask(productType, getProdcutBitMaskInfo(DataMap.products.Dynamics365forBusinessCentral))) {\n return 'TRY_Disclaimer_LeadConsent_Dynamics365';\n }\n return 'TRY_Disclaimer_LeadConsent';\n}\nexport function getContactMeConsentTermsLocalizationName() {\n return 'RT_Disclaimer';\n}\nexport function getLegalTermsText(context) {\n return context.loc('RT_Terms');\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nimport { Constants } from './../utils/constants';\nimport { SpzaInstrumentService } from '../services/telemetry/spza/spzaInstrument';\nimport { getWindow } from './../services/window';\nimport { getAppConfig } from './../services/init/appConfig';\nimport { getLocalStorageItem, saveLocalStorageItem } from './../utils/browserStorageUtils';\nimport { isEmptyNullorUndefinedString } from './../utils/stringUtils';\nimport { logger } from '@src/logger';\n(function(NpsModule) {\n let showModal;\n let npsHelper = null;\n let idleCounter = 0;\n let blocked = false;\n let idleTimer = null;\n let isNotSameCorrelationId = false;\n let sessionStartTime = 0;\n function setTimer(callback, interval) {\n // check every 1 second\n idleTimer = window.setInterval(callback, interval || 1000);\n }\n NpsModule.setTimer = setTimer;\n function reset() {\n blocked = false;\n idleTimer = null;\n }\n NpsModule.reset = reset;\n function dLog(debugMsg) {\n const instrument = SpzaInstrumentService.getProvider();\n const data = {\n npsFrom: debugMsg,\n npsStore: npsHelper.getStore()\n };\n const payload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.NPS,\n actionModifier: Constants.Telemetry.ActionModifier.Debug,\n details: JSON.stringify(data)\n };\n instrument.probe('logAndFlushTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier\n });\n }\n function checkForNPS(viewedAppsCount, acquiredAppsCount, interval, debugMsg) {\n if (npsHelper) {\n const waitTime = 30 * 1000; // If all conditions are met, we wait for 30 seconds since the start-up to show the NPS popup.\n const currentTime = Date.now();\n if (sessionStartTime && currentTime - sessionStartTime > waitTime) {\n const oneHourInMS = 1000 * 60 * 60;\n const savedSessionEndTime = npsHelper.getItem('sessionEndTime');\n const viewedApps = viewedAppsCount || npsHelper.getItem('viewedApps');\n const acquiredApps = acquiredAppsCount || npsHelper.getItem('acquiredApps');\n const isAppsCriteriaValid = viewedApps && viewedApps >= npsHelper.viewedAppsTriggerNumber || acquiredApps && acquiredApps >= npsHelper.acquiredAppsTriggerNumber;\n const isTimeCriteriaValid = savedSessionEndTime && sessionStartTime - savedSessionEndTime > oneHourInMS;\n if (isTimeCriteriaValid && isAppsCriteriaValid && isNotSameCorrelationId && npsHelper.due() && idleTimer == null) {\n // turn on the timer\n setTimer(()=>{\n if (!blocked) {\n idleCounter++;\n if (idleCounter >= 3) {\n window.clearInterval(idleTimer);\n idleTimer = null;\n dLog(debugMsg);\n ResetNPSCount();\n showModal();\n }\n }\n }, interval);\n }\n }\n }\n }\n NpsModule.checkForNPS = checkForNPS;\n function IncreaseAppDetail(interval) {\n if (npsHelper) {\n let viewedApps = npsHelper.getItem('viewedApps');\n if (!viewedApps) {\n viewedApps = 1;\n } else {\n viewedApps += 1;\n }\n npsHelper.setItem('viewedApps', viewedApps);\n checkForNPS(viewedApps, npsHelper.getItem('acquiredApps'), interval, 'detailsPage');\n }\n }\n NpsModule.IncreaseAppDetail = IncreaseAppDetail;\n function IncreaseAppAcquisition(interval) {\n if (npsHelper) {\n let acquiredApps = npsHelper.getItem('acquiredApps') || 0;\n acquiredApps++;\n npsHelper.setItem('acquiredApps', acquiredApps);\n checkForNPS(npsHelper.getItem('viewedApps'), acquiredApps, interval, 'detailsPage');\n }\n }\n NpsModule.IncreaseAppAcquisition = IncreaseAppAcquisition;\n function ResetNPSIdle() {\n if (npsHelper) {\n idleCounter = 0;\n }\n }\n NpsModule.ResetNPSIdle = ResetNPSIdle;\n function ResetNPSCount() {\n if (npsHelper) {\n npsHelper.setItem('viewedApps', 0);\n npsHelper.setItem('acquiredApps', 0);\n npsHelper.setItem('sessionEndTime', null);\n }\n }\n NpsModule.ResetNPSCount = ResetNPSCount;\n function SetShortInterval() {\n if (npsHelper) {\n npsHelper.setNext(npsHelper.shortInterval);\n }\n }\n NpsModule.SetShortInterval = SetShortInterval;\n function SetInterval(interval, offset) {\n if (npsHelper) {\n npsHelper.setNext(interval, offset);\n }\n }\n NpsModule.SetInterval = SetInterval;\n function Declined() {\n if (npsHelper) {\n if (npsHelper.getItem('secondTime')) {\n npsHelper.setItem('secondTime', false);\n npsHelper.setNext(npsHelper.longInterval);\n } else {\n npsHelper.setItem('secondTime', true);\n npsHelper.setNext(npsHelper.shortInterval);\n }\n }\n }\n NpsModule.Declined = Declined;\n function Submitted() {\n if (npsHelper) {\n // succeeded\n npsHelper.setItem('secondTime', false);\n npsHelper.setNext(npsHelper.longInterval);\n }\n }\n NpsModule.Submitted = Submitted;\n function BlockShowingNPS() {\n if (npsHelper) {\n blocked = true;\n }\n }\n NpsModule.BlockShowingNPS = BlockShowingNPS;\n function AllowShowingNPS() {\n if (npsHelper) {\n blocked = false;\n ResetNPSIdle();\n }\n }\n NpsModule.AllowShowingNPS = AllowShowingNPS;\n function SaveSessionEndTime() {\n if (npsHelper) {\n const savedSessionEndTime = npsHelper.getItem('sessionEndTime');\n // save if it is set to null or doesn't exist\n // opening the NPS model will set it to null (inside ResetNPS)\n if (!savedSessionEndTime) {\n npsHelper.setItem('sessionEndTime', Date.now());\n }\n }\n }\n NpsModule.SaveSessionEndTime = SaveSessionEndTime;\n function Initialize(showModalFunction, timerInterval) {\n // only init from client\n sessionStartTime = Date.now();\n showModal = showModalFunction;\n npsHelper = new Nps();\n const currentCorrelationId = getAppConfig('correlationId');\n const savedCorrelationId = npsHelper.getItem('correlationId');\n if (savedCorrelationId && currentCorrelationId !== savedCorrelationId) {\n isNotSameCorrelationId = true;\n } else {\n isNotSameCorrelationId = false;\n npsHelper.setItem('correlationId', currentCorrelationId);\n }\n let viewedApps = npsHelper.getItem('viewedApps');\n if (!viewedApps) {\n viewedApps = 0;\n }\n let acquiredApps = npsHelper.getItem('acquiredApps');\n if (!acquiredApps) {\n acquiredApps = 0;\n }\n checkForNPS(viewedApps, acquiredApps, timerInterval, 'landingPage');\n }\n NpsModule.Initialize = Initialize;\n class Nps {\n reset(next) {\n let initNext = next || Date.now();\n initNext += this.timeTriggerInterval; // This is added to find the 'time' at which we need to show the nps for the first time\n const date = new Date(initNext);\n const store = {\n next: initNext,\n nextText: date.toString(),\n secondTime: false,\n viewedApps: 0,\n acquiredApps: 0,\n sessionEndTime: null\n };\n this.setStore(store);\n return store;\n }\n getStore() {\n try {\n const storeString = getLocalStorageItem(this.storeTitle);\n if (!isEmptyNullorUndefinedString(storeString)) {\n return JSON.parse(storeString);\n } else {\n return this.reset();\n }\n } catch (e) {\n return this.reset();\n }\n }\n setStore(store) {\n const storeString = JSON.stringify(store);\n try {\n saveLocalStorageItem(this.storeTitle, storeString);\n } catch (e) {\n // In case of quota exceed exception we dont want to crash rather not let NPS show up.\n }\n }\n getItem(section) {\n const store = this.getStore();\n if (store && section in store) {\n return store[`${section}`];\n } else {\n return null;\n }\n }\n setItem(section, data) {\n const store = this.getStore();\n if (store) {\n store[`${section}`] = data;\n }\n this.setStore(store);\n }\n getNext() {\n const next = this.getItem(Constants.LocalStorage.npsNext);\n if (next) {\n return next;\n } else {\n return 0;\n }\n }\n setNext(next, offset = true) {\n if (offset) {\n next = Date.now() + next;\n }\n const nextText = new Date(next);\n this.setItem(Constants.LocalStorage.npsNext, next);\n this.setItem(Constants.LocalStorage.npsNextText, nextText.toString());\n }\n due(next) {\n const by = next || this.getNext();\n const now = Date.now();\n return now >= by;\n }\n constructor(){\n _define_property(this, \"longInterval\", void 0);\n _define_property(this, \"shortInterval\", void 0);\n _define_property(this, \"timeTriggerInterval\", void 0);\n _define_property(this, \"viewedAppsTriggerNumber\", void 0);\n _define_property(this, \"acquiredAppsTriggerNumber\", void 0);\n _define_property(this, \"storeTitle\", void 0);\n this.storeTitle = Constants.LocalStorage.nps;\n this.longInterval = 1000 * 3600 * 24 * 30 * 3; // delay after accepting\n this.shortInterval = 1000 * 3600 * 24 * 30 * 1; // delay after denying\n this.timeTriggerInterval = 1000 * 3600 * 1; // amount of delay the user needs to wait to see an nps dialog after the first visit\n this.viewedAppsTriggerNumber = 2; // amount of apps viewed has to be greater than this number in order to trigger nps\n this.acquiredAppsTriggerNumber = 1; // amount of apps that need to be acquired before triggering nps\n }\n }\n})(NpsModule || (NpsModule = {}));\nexport var NpsModule;\n","/* eslint-disable no-prototype-builtins */ import { Constants } from './constants';\nexport const isUndefined = (item)=>{\n return item === undefined || typeof item === Constants.TypeOf.undefinedName;\n};\n/**\n * determine item is null or undefined mainly for primitive values\n *\n * primitive values are booleans (e.x. false), numbers (e.x. 0), and strings (e.x. '')\n * otherwise for object, array, function, using `!item` is sufficient\n */ export const isNullorUndefined = (item)=>{\n return isUndefined(item) || item === null;\n};\nexport const isObject = (item)=>{\n return !!item && typeof item === Constants.TypeOf.objectName;\n};\n/**\n * check if an existing object, or array is empty\n */ export const isEmptyObject = (object)=>{\n if (!isObject(object)) {\n return false;\n }\n const isNotEmpty = Object.keys(object).some((key)=>{\n // return as soon as object is not empty\n return object.hasOwnProperty(key);\n });\n return !isNotEmpty;\n};\nexport const isArray = (item)=>{\n return !!item && Array.isArray(item);\n};\n/**\n * check if it is a pure object, not an array\n */ export const isPureObject = (item)=>{\n return isObject(item) && !isArray(item);\n};\nexport const isFunction = (item)=>{\n return !!item && typeof item === Constants.TypeOf.functionName;\n};\nexport const isBoolean = (item)=>{\n return typeof item === Constants.TypeOf.booleanName;\n};\nexport const isString = (item)=>{\n return typeof item === Constants.TypeOf.stringName;\n};\nexport const isNumber = (item)=>{\n return typeof item === Constants.TypeOf.numberName;\n};\n/**\n * deep merge two objects\n */ export const mergeDeep = (target, source)=>{\n let output = Object.assign({}, target);\n if (isObject(target) && isObject(source)) {\n if (Array.isArray(source)) {\n output = source.concat(target.filter((element)=>source.indexOf(element) < 0));\n } else {\n Object.keys(source).forEach((key)=>{\n const sourceKey = source[`${key}`];\n if (isObject(sourceKey)) {\n if (!(key in target)) {\n Object.assign(output, {\n [key]: source[`${key}`]\n });\n } else {\n output[`${key}`] = mergeDeep(target[`${key}`], source[`${key}`]);\n }\n } else {\n Object.assign(output, {\n [key]: source[`${key}`]\n });\n }\n });\n }\n }\n return output;\n};\n/**\n * deep equal between two objects\n *\n * NOTE:\n * EXCEPTION: if two objects have functions they would never be equal\n * reference:\n * chai deep equal\n * https://github.com/chaijs/chai/issues/697\n *\n * Deep equal is designed to compare deeply not loosely, if that makes sense.\n * In other words, it is designed to traverse the keys of an object or array (and soon iterables) and\n * compare the values of those properties with each other.\n * Importantly, when it gets to a value that isn't an iterable, array, or object,\n * it actually uses a stricter-than-strict equality comparison (it uses SameValue).\n * Functions are not iterables, they have no keys which could make a good quality comparison,\n * and as such are given the SameValue treatment.\n */ export const deepEqual = function(x, y, shouldSkipInlineFunctionCheck = false) {\n if (x === y) {\n return true;\n }\n if (isFunction(x) && isFunction(y) && shouldSkipInlineFunctionCheck) {\n return true;\n } else if (isObject(x) && isObject(y)) {\n if (Object.keys(x).length !== Object.keys(y).length) {\n return false;\n }\n for(const prop in x){\n if (y.hasOwnProperty(prop)) {\n if (!deepEqual(x[`${prop}`], y[`${prop}`], shouldSkipInlineFunctionCheck)) {\n return false;\n }\n } else {\n return false;\n }\n }\n return true;\n }\n return false;\n};\n","export const oneTimePaymentOffers = [\n 'microsoft_teams.microsoft_teams_virtual_events_basic',\n 'microsoft_teams.microsoft_teams_virtual_events_professional',\n 'microsoft_teams.microsoft_teams_virtual_events_premium',\n 'isvtestuklegacy.teams_virtual_events_premium',\n 'isvtestuklegacy.teams_virtual_events_premium-preview'\n];\nexport const isOneTimePaymentOffer = (entityId)=>{\n return oneTimePaymentOffers.includes(entityId);\n};\n","import configDf from './partnersManifest_df.json';\nimport configProd from './partnersManifest_prod.json';\nimport { Environment } from '@shared/utils/constants';\nimport { getWindow } from '@shared/services/window';\nconst configsMap = {\n [Environment.Production]: configProd,\n [Environment.Canary]: configProd,\n [Environment.Dogfood]: configDf,\n [Environment.Test]: configDf,\n [Environment.Development]: configDf\n};\nexport const loadPartnerManifest = ()=>{\n var _getWindow___INITIAL_STATE___config, _getWindow___INITIAL_STATE__, _getWindow;\n return configsMap[((_getWindow = getWindow()) === null || _getWindow === void 0 ? void 0 : (_getWindow___INITIAL_STATE__ = _getWindow.__INITIAL_STATE__) === null || _getWindow___INITIAL_STATE__ === void 0 ? void 0 : (_getWindow___INITIAL_STATE___config = _getWindow___INITIAL_STATE__.config) === null || _getWindow___INITIAL_STATE___config === void 0 ? void 0 : _getWindow___INITIAL_STATE___config.siteEnvironment) || process.env.siteEnvironment];\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport { PricingStates, OdataRawObjectAppType, TermsStrings } from '@shared/Models';\nimport { AzureEnvironmentSettings, AzureEnvironment } from '@shared/AzureEnvironmentSettings';\nimport { Constants, OfferType, allBillingCountries, PlanPricingType } from '@shared/utils/constants';\nimport FuturePriceTooltip from '@shared/components/futurePriceTooltip';\nimport { CustomMeterPricingMaxFractionDigits } from '@shared/components/customMeterPricing';\nimport { ButtonLink } from '@shared/components/ButtonLink';\nimport { isD365App, isD365BCApp, isPowerBIVisualsApp, isBagTransactable, isTransactApp, getPDPRoute, getProductByUrlKey } from '@shared/utils/appUtils';\nimport { getPrimaryProductUrl } from '@shared/utils/datamappingHelpers';\nconst fallbackCountryCode = 'US';\nexport function loadAppPricing(rawApp, pricesData) {\n if (!rawApp || rawApp.appType === OdataRawObjectAppType.private) {\n return rawApp;\n }\n const app = _object_spread({}, rawApp);\n const pricingData = pricesData[app.entityId];\n if (pricingData) {\n app.startingPrice = pricingData;\n if (!app.startingPrice.pricingData) {\n app.startingPrice.pricingData = PricingStates.NoPricingData;\n }\n if (pricingData.pricingBitmask) {\n Object.keys(pricingData.pricingBitmask).forEach((key)=>{\n if (!app[`${key}`]) {\n app[`${key}`] = 0;\n }\n app[`${key}`] |= pricingData.pricingBitmask[`${key}`];\n });\n }\n } else {\n app.startingPrice = {\n pricingData: PricingStates.NoPricingData\n };\n }\n return app;\n}\nconst mooncakeBillingCountries = [\n {\n countryCode: 'cn',\n currency: 'CNY',\n name: 'China'\n }\n];\nexport const billingCountries = AzureEnvironmentSettings.environment === AzureEnvironment.Mooncake ? mooncakeBillingCountries : allBillingCountries;\nexport function getBillingCountryByCountryCode(countryCode) {\n return billingCountries.filter((item)=>item.countryCode.toLowerCase() === countryCode.toLowerCase())[0];\n}\nexport function renderNotAvailablePriceUI(context) {\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"noAvailablePrice\",\n children: [\n /*#__PURE__*/ _jsx(\"h6\", {\n className: \"c-heading-6\",\n children: context.loc('Pricing_SoftwarePlanDetail_Title')\n }),\n /*#__PURE__*/ _jsx(\"p\", {\n children: context.loc('Pricing_SoftwarePlanDetail_NotAvailableDescription')\n })\n ]\n });\n}\nexport function getContactPublisherText(context) {\n return `<span class='contactPublisherText'>${context.loc('Pricing_ContactPublisher')}</span>`;\n}\nconst DAYS_IN_MONTH = 30;\nconst DAYS_IN_YEAR = 365;\nexport const TermsStringsToDays = (term)=>{\n switch(term){\n case TermsStrings.Term1MString:\n case TermsStrings.MonthString:\n return DAYS_IN_MONTH;\n case TermsStrings.Term1YString:\n case TermsStrings.YearString:\n return DAYS_IN_YEAR;\n case TermsStrings.Term2YString:\n return DAYS_IN_YEAR * 2; // 365*2 years\n case TermsStrings.Term3YString:\n return DAYS_IN_YEAR * 3; // 365*3 years\n default:\n return DAYS_IN_MONTH;\n }\n};\nfunction getFreeTrialText({ context, asInlineHTML, hasFreeTrial, freeTrialTerm, freeDurationDays }) {\n if (!hasFreeTrial) {\n return '';\n }\n const months = freeDurationDays ? freeDurationDays / DAYS_IN_MONTH : TermsStringsToDays(freeTrialTerm) / DAYS_IN_MONTH;\n const singleMonthText = asInlineHTML ? context.locParams('FreeTrialFirstMonthFree', [\n '<span>',\n '</span>'\n ]) : context.loc('First_Month_Free_Trial', `First month free, then `);\n const multiMonthText = asInlineHTML ? context.locParams('FreeTrialFirstSomeMonthsFree', [\n '<span>',\n months.toString(),\n '</span>'\n ]) : context.locParams('First_Months_Free_Trial', [\n months.toString()\n ], `First ${months.toString()} months free, then`);\n return months === 1 ? singleMonthText : multiMonthText;\n}\nfunction getCustomMeterPricing(context, countryCode, currency, sku, price) {\n var _price_customMeter;\n if (!((_price_customMeter = price.customMeter) === null || _price_customMeter === void 0 ? void 0 : _price_customMeter.length)) {\n return '';\n }\n let customMeterPriceText = '';\n const customMeters = price.customMeter;\n let firstLine = true;\n for(let i = 0; i < customMeters.length; i++){\n if (customMeters[`${i}`].includedQuantity === '0') {\n continue;\n }\n if (firstLine) {\n customMeterPriceText += context.locParams('PricingInclude', [\n \"<span id='includedPrice'>\",\n ':</span><span>',\n customMeters[`${i}`].title + ': ' + customMeters[`${i}`].includedQuantity,\n '</span>'\n ]);\n firstLine = false;\n } else {\n customMeterPriceText += '<span>' + customMeters[`${i}`].title + ': ' + customMeters[`${i}`].includedQuantity + '</span>';\n }\n }\n for(let i = 0; i < customMeters.length; i++){\n const priceString = customMeters[`${i}`].rate.toLocaleString(countryCode, {\n style: 'currency',\n currency: sku.currencyCode || currency,\n maximumFractionDigits: CustomMeterPricingMaxFractionDigits\n });\n if (i === 0) {\n customMeterPriceText += context.locParams('PricingPlus', [\n \"<span id='plusPrice'>\",\n ':</span><span>',\n customMeters[`${i}`].title + ': ' + priceString,\n customMeters[`${i}`].unit.toLowerCase(),\n '</span>'\n ]);\n } else {\n customMeterPriceText += '<span>' + customMeters[`${i}`].title + ': ' + priceString + ' ' + customMeters[`${i}`].unit.toLowerCase() + '</span>';\n }\n }\n return customMeterPriceText;\n}\nfunction getLocaleLanguage({ locale }) {\n const localeLanguage = (locale === null || locale === void 0 ? void 0 : locale.includes('-')) ? locale.split('-')[0] : Constants.DefaultLocale.split('-')[0];\n return localeLanguage;\n}\nfunction getCountryCodeRegion({ countryCode }) {\n const countryCodeRegion = countryCode ? countryCode.includes('-') ? countryCode.split('-')[1] : countryCode : fallbackCountryCode;\n return countryCodeRegion;\n}\nexport function getPricingLocale({ locale, countryCode }) {\n const localeLanguage = getLocaleLanguage({\n locale\n });\n const countryCodeRegion = getCountryCodeRegion({\n countryCode\n });\n const localeString = `${localeLanguage.toLowerCase()}-${countryCodeRegion.toUpperCase()}`;\n return localeString;\n}\nexport function getPriceWithCurrencySymbol(price, countryCode, currency, maximumFractionDigits = 5, locale) {\n const localeString = getPricingLocale({\n locale,\n countryCode\n });\n let priceString = price.toLocaleString(localeString, {\n style: 'currency',\n currency,\n maximumFractionDigits\n });\n // If the currency code is not converted to a symbol, then we want to display a space between the text and number.\n // For ex, PHP11.166 should be PHP 11.166. toLocaleString(..) does not support formatting. So we shd do this manually.\n // We first find out if the currency is present in the resulting priceString. This makes sure we aren't inserting space in a symbol.\n // We find out the position to insert a space (currencyValuePosition). We make sure that we are inserting\n // a space in between the price string - we don't want to insert a space at the end. Also, we don't want to insert a space if we already have one.\n const currencyCodePosition = priceString.indexOf(currency);\n const currencyValuePosition = currencyCodePosition + currency.length;\n const matchWhitespace = /\\s/;\n if (currencyCodePosition >= 0 && currencyValuePosition < priceString.length && !matchWhitespace.test(priceString[`${currencyValuePosition}`])) {\n priceString = priceString.slice(0, currencyValuePosition) + ' ' + priceString.slice(currencyValuePosition, priceString.length);\n }\n return priceString;\n}\nexport function getPriceString({ context, price, countryCode, currency, maximumFractionDigits = 5, formatStringLocalizationKey = '{0}/{1}', isQuantifiable = false, ignoreFreeString = false, isOneTimePaymentOffer = false, locale, offerType }) {\n if (!price || typeof price !== 'object') {\n return '';\n }\n let text = '';\n if (price.value === 0 && !ignoreFreeString) {\n text = context.loc('Pricing_Free');\n } else {\n let unitLocalizationKey = '';\n if (price.unit.toLowerCase() === 'hr' || price.unit.toLowerCase() === 'hour' || price.unit.toLowerCase() === 'hours') {\n unitLocalizationKey = 'Pricing_Hour';\n } else if (price.unit.toLowerCase() === 'month') {\n unitLocalizationKey = 'Pricing_Month';\n } else if (price.unit.toLowerCase() === 'year') {\n unitLocalizationKey = 'Pricing_Year';\n } else if (price.unit.toLowerCase() === 'perpetual') {\n unitLocalizationKey = '';\n } else {\n unitLocalizationKey = price.unit;\n }\n if (isQuantifiable && unitLocalizationKey && offerType !== OfferType.VirtualMachine) {\n unitLocalizationKey = `User_${unitLocalizationKey}`;\n }\n if (countryCode && countryCode.toLowerCase() === 'dk') {\n countryCode = 'CA';\n }\n const priceString = getPriceWithCurrencySymbol(price.value, countryCode, currency, maximumFractionDigits, locale);\n if (isOneTimePaymentOffer) {\n return priceString;\n }\n if (unitLocalizationKey) {\n text = context.locParams(formatStringLocalizationKey, [\n priceString,\n context.loc(unitLocalizationKey)\n ]);\n } else {\n text = priceString;\n }\n }\n return text;\n}\nexport function getVariablePriceString(sku, countryCode, currency, context, isOneTimePaymentOffer, locale) {\n const returnObj = {\n monthlyPrice: '',\n yearlyPrice: '',\n price: ''\n };\n if (sku.priceVaries) {\n if (sku.offerType === OfferType.SolutionTemplate) {\n returnObj.price = context.loc('CostOfDeployedTemplateComponents');\n return returnObj;\n } else {\n returnObj.price = context.loc('PriceVaries');\n return returnObj;\n }\n }\n if (sku.termPrices) {\n sku.termPrices.forEach((termPrice)=>{\n let termPriceString = getPriceString({\n context,\n price: termPrice,\n countryCode,\n currency: sku.currencyCode || currency,\n locale,\n isQuantifiable: sku.isQuantifiable,\n ignoreFreeString: true,\n isOneTimePaymentOffer\n });\n if (sku.azureInfraCostsExtra) {\n if (sku.offerType !== OfferType.ManagedApp) {\n returnObj.price = context.locParams('PriceWithAzureInfraCostsExtra', [\n termPriceString\n ]);\n return returnObj;\n }\n // Managed Apps support custom meters, we should show Azure Infra Costs along with custom meters\n termPriceString = context.locParams('PriceWithAzureInfraCostsExtra', [\n termPriceString\n ]);\n }\n termPriceString = '<span>' + termPriceString + '</span>';\n if (termPrice.customMeter && termPrice.customMeter.length > 0) {\n const customMeterText = getCustomMeterPricing(context, countryCode, currency, sku, termPrice);\n termPriceString += customMeterText;\n }\n const freeTrialText = getFreeTrialText({\n context,\n asInlineHTML: true,\n hasFreeTrial: termPrice.freeDurationDays > 0,\n freeTrialTerm: termPrice.unit,\n freeDurationDays: termPrice.freeDurationDays\n });\n termPriceString = freeTrialText + termPriceString;\n if (termPrice.unit.toLowerCase() === Constants.TermPeriod.Month) {\n returnObj.monthlyPrice = termPriceString;\n } else if (termPrice.unit.toLowerCase() === Constants.TermPeriod.Year) {\n returnObj.yearlyPrice = termPriceString;\n }\n });\n return returnObj;\n }\n const price = getPriceString({\n context,\n price: sku.startingPrice,\n countryCode,\n currency: sku.currencyCode || currency,\n locale,\n isQuantifiable: sku.isQuantifiable,\n ignoreFreeString: true,\n isOneTimePaymentOffer\n });\n if (sku.azureInfraCostsExtra) {\n returnObj.price = context.locParams('PriceWithAzureInfraCostsExtra', [\n price\n ]);\n return returnObj;\n }\n returnObj.price = price;\n return returnObj;\n}\nfunction getDefaultPrice({ loc }) {\n return `<span class='contactPublisherText'>${loc('PriceVaries')}</span>`;\n}\nexport function getFuturePriceVariablePriceString({ countryCode, currency, context, futureSku, isOneTimePaymentOffer, locale }) {\n const futurePriceObj = futureSku && getVariablePriceString(futureSku, countryCode, currency, context, isOneTimePaymentOffer, locale);\n const futureMonthlyPrice = futurePriceObj === null || futurePriceObj === void 0 ? void 0 : futurePriceObj.monthlyPrice;\n const futureYearlyPrice = futurePriceObj === null || futurePriceObj === void 0 ? void 0 : futurePriceObj.yearlyPrice;\n return {\n futurePriceMonthly: futureMonthlyPrice ? {\n price: futureMonthlyPrice,\n startDate: futureSku === null || futureSku === void 0 ? void 0 : futureSku.startDate\n } : null,\n futurePriceYearly: futureYearlyPrice ? {\n price: futureYearlyPrice,\n startDate: futureSku === null || futureSku === void 0 ? void 0 : futureSku.startDate\n } : null\n };\n}\nexport function getVariablePriceStringWithDefault({ sku, showPriceColumn, showYearlyPrice, showMonthlyPrice, isMicrosoftManaged, countryCode, currency, context, futureSku, shouldBlockPrices, isOneTimePaymentOffer, locale }) {\n const priceObj = showPriceColumn && sku ? getVariablePriceString(sku, countryCode, currency, context, isOneTimePaymentOffer, locale) : {};\n const monthlyPrice = priceObj === null || priceObj === void 0 ? void 0 : priceObj.monthlyPrice;\n const yearlyPrice = priceObj === null || priceObj === void 0 ? void 0 : priceObj.yearlyPrice;\n let defaultMonthlyPrice = getDefaultPrice(context);\n let defaultYearlyPrice = getDefaultPrice(context);\n const contactPublisherText = getContactPublisherText(context);\n if (isMicrosoftManaged && !monthlyPrice && !yearlyPrice) {\n if (!showMonthlyPrice && showYearlyPrice) {\n defaultYearlyPrice = contactPublisherText;\n } else {\n defaultMonthlyPrice = contactPublisherText;\n }\n }\n // Block prices for non-transactable offer types\n if (shouldBlockPrices) {\n return {\n monthly: monthlyPrice ? contactPublisherText : defaultMonthlyPrice,\n yearly: yearlyPrice ? contactPublisherText : defaultYearlyPrice,\n price: '',\n futurePriceMonthly: null,\n futurePriceYearly: null\n };\n }\n const { futurePriceMonthly, futurePriceYearly } = getFuturePriceVariablePriceString({\n countryCode,\n currency,\n context,\n futureSku,\n isOneTimePaymentOffer,\n locale\n });\n return {\n monthly: monthlyPrice || (showMonthlyPrice ? defaultMonthlyPrice : ''),\n yearly: yearlyPrice || (showYearlyPrice ? defaultYearlyPrice : ''),\n price: priceObj && priceObj.price ? priceObj.price : '',\n futurePriceMonthly,\n futurePriceYearly\n };\n}\nexport function getBillingFrequencyTranslated(context, term, onetimePaymentTranslation = 'Pricing_Onetime_Payment') {\n if (!term) {\n return context.loc(onetimePaymentTranslation, 'one-time payment');\n }\n switch(term){\n case TermsStrings.Term1MString:\n case TermsStrings.MonthString:\n return context.loc('Pricing_Month', 'month');\n case TermsStrings.Term1YString:\n case TermsStrings.YearString:\n return context.loc('Pricing_Year', 'year');\n default:\n return '';\n }\n}\nexport function getBillingTermTranslated({ context, term, useHyphen = true, isSubscription }) {\n switch(term){\n case TermsStrings.Term1MString:\n case TermsStrings.MonthString:\n return !useHyphen ? context.loc('Pricing_Term_1_Month', '1 month') : context.locParams('Pricing_Term_termUnit_termDuration', [\n '1',\n `${isSubscription ? context.loc('Pricing_Month_Subscription', 'month subscription') : context.loc('Pricing_Month', 'month')}`\n ], '1-month');\n case TermsStrings.Term1YString:\n case TermsStrings.YearString:\n return !useHyphen ? context.loc('Pricing_Term_1_Year', '1 year') : context.locParams('Pricing_Term_termUnit_termDuration', [\n '1',\n `${isSubscription ? context.loc('Pricing_Year_Subscription', 'year subscription') : context.loc('Pricing_Year', 'year')}`\n ], '1-year');\n case TermsStrings.Term2YString:\n return !useHyphen ? context.locParams('Pricing_Term_Years', [\n '2'\n ], '2 years') : context.locParams('Pricing_Term_termUnit_termDuration', [\n '2',\n `${isSubscription ? context.loc('Pricing_Year_Subscription', 'year subscription') : context.loc('Pricing_Year', 'year')}`\n ], '2-year');\n case TermsStrings.Term3YString:\n return !useHyphen ? context.locParams('Pricing_Term_Years', [\n '3'\n ], '3 years') : context.locParams('Pricing_Term_termUnit_termDuration', [\n '3',\n `${isSubscription ? context.loc('Pricing_Year_Subscription', 'year subscription') : context.loc('Pricing_Year', 'year')}`\n ], '3-year');\n default:\n return '';\n }\n}\nexport function getPriceWithFrequencyText({ context, priceObject, isQuantifiable, countryCode, currency, maximumFractionDigits = 5, onetimePaymentTranslation = 'Pricing_Onetime_Payment', locale }) {\n const { unit, billingPlan, value } = priceObject;\n const priceValue = (billingPlan === null || billingPlan === void 0 ? void 0 : billingPlan.price) ? billingPlan.price.listPrice : value;\n const priceText = getPriceWithCurrencySymbol(priceValue, countryCode, currency, maximumFractionDigits, locale);\n const isOnetimePayment = !billingPlan;\n const template = isQuantifiable ? 'Pricing_Per_User_Template' : 'Pricing_Flat_Template';\n if (unit === TermsStrings.Term1MString || unit === TermsStrings.MonthString) {\n const billingFrequency = getBillingTermTranslated({\n context,\n term: unit,\n useHyphen: true,\n isSubscription: false\n });\n return context.locParams(template, [\n priceText,\n billingFrequency\n ]);\n } else if (unit === TermsStrings.Term1YString || unit === TermsStrings.YearString) {\n const billingFrequency = isOnetimePayment ? getBillingTermTranslated({\n context,\n term: unit,\n useHyphen: true,\n isSubscription: false\n }) : context.loc('Pricing_Month', 'month');\n return context.locParams(template, [\n priceText,\n billingFrequency\n ]);\n } else {\n const billingFrequency = getBillingFrequencyTranslated(context, billingPlan === null || billingPlan === void 0 ? void 0 : billingPlan.billingPeriod, onetimePaymentTranslation);\n return context.locParams(template, [\n priceText,\n billingFrequency\n ]);\n }\n}\nexport function getDetailedPriceText(context, countryCode, currency, sku, termPrice, locale) {\n var _termPrice_customMeter;\n const priceWithFrequency = getPriceWithFrequencyText({\n context,\n priceObject: termPrice,\n isQuantifiable: sku.isQuantifiable,\n countryCode,\n currency,\n locale\n });\n let priceText = `<span>${priceWithFrequency}</span>`;\n if ((_termPrice_customMeter = termPrice.customMeter) === null || _termPrice_customMeter === void 0 ? void 0 : _termPrice_customMeter.length) {\n priceText += getCustomMeterPricing(context, countryCode, currency, sku, termPrice);\n }\n const freeTrialText = getFreeTrialText({\n context,\n asInlineHTML: true,\n hasFreeTrial: termPrice.freeDurationDays > 0,\n freeTrialTerm: termPrice.unit,\n freeDurationDays: termPrice.freeDurationDays\n });\n return `${freeTrialText}${priceText}`;\n}\nexport function getFullPriceString({ context, countryCode, currency, priceValue, billingPlan, termDuration, isQuantifiable, hasFreeTrial, locale }) {\n const priceWithFrequency = getPriceWithFrequencyText({\n context,\n priceObject: {\n unit: termDuration,\n billingPlan,\n value: priceValue\n },\n isQuantifiable,\n countryCode,\n currency,\n locale,\n maximumFractionDigits: 5\n });\n // Always sent in 1M free trial as\n const freeTrialText = getFreeTrialText({\n context,\n asInlineHTML: false,\n hasFreeTrial,\n freeTrialTerm: TermsStrings.Term1MString\n });\n return `${freeTrialText}${priceWithFrequency}`;\n}\n/** Returns ascending order, i.e: 0 is first, then 1, then 2 and so on */ export function getTermPriorityForSorting(termsStrings) {\n const lastPriority = 1000;\n switch(termsStrings){\n case TermsStrings.Term1MString:\n case TermsStrings.MonthString:\n return 0;\n case TermsStrings.Term1YString:\n case TermsStrings.YearString:\n return 1;\n case TermsStrings.Term2YString:\n return 2;\n case TermsStrings.Term3YString:\n return 3;\n default:\n return lastPriority;\n }\n}\n/** Returns a new array of ascendingly sorted term prices. First by billing term and if the billing terms are equal then by the billing period frequency */ export function sortTermPrices(termPrices) {\n if (!(termPrices === null || termPrices === void 0 ? void 0 : termPrices.length)) {\n return [];\n }\n // Cloning before calling \".sort\" is a must because \".sort\" sorts the array in-place.\n return [\n ...termPrices\n ].sort((a, b)=>{\n if (a.unit === b.unit) {\n var _a_billingPlan, _b_billingPlan;\n return getTermPriorityForSorting((_a_billingPlan = a.billingPlan) === null || _a_billingPlan === void 0 ? void 0 : _a_billingPlan.billingPeriod) - getTermPriorityForSorting((_b_billingPlan = b.billingPlan) === null || _b_billingPlan === void 0 ? void 0 : _b_billingPlan.billingPeriod);\n }\n return getTermPriorityForSorting(a.unit) - getTermPriorityForSorting(b.unit);\n });\n}\nexport const addFuturePricing = (billingTermPeriod, monthlyFuturePrice, yearlyFuturePrice)=>{\n if ((billingTermPeriod === TermsStrings.Term1MString || billingTermPeriod === TermsStrings.MonthString) && monthlyFuturePrice) {\n return /*#__PURE__*/ _jsx(FuturePriceTooltip, {\n futurePrice: _object_spread_props(_object_spread({}, monthlyFuturePrice), {\n className: 'checkoutCell ms-fontSize-12'\n })\n });\n } else if ((billingTermPeriod === TermsStrings.Term1YString || billingTermPeriod === TermsStrings.YearString) && yearlyFuturePrice) {\n return /*#__PURE__*/ _jsx(FuturePriceTooltip, {\n futurePrice: _object_spread_props(_object_spread({}, yearlyFuturePrice), {\n className: 'checkoutCell ms-fontSize-12'\n })\n });\n }\n return null;\n};\nfunction saasStartsFromPricing({ startingPrice, context, countryCode, maximumFractionDigits = 5, locale, isOneTimePaymentOffer }) {\n const { pricingData, isQuantifiable } = startingPrice;\n if (!pricingData || typeof pricingData !== 'object') {\n return '';\n }\n if (pricingData.value === 0) {\n return context.loc('Pricing_Free');\n }\n const { unit } = pricingData;\n const priceText = getPriceWithFrequencyText({\n context,\n priceObject: pricingData,\n isQuantifiable,\n countryCode,\n currency: pricingData.currency,\n maximumFractionDigits,\n locale\n });\n if (isOneTimePaymentOffer) {\n return priceText;\n }\n const termTranslated = getBillingTermTranslated({\n context,\n term: unit,\n useHyphen: false\n });\n return context.locParams('Pricing_Multiyear_Starts_From_Template', [\n priceText,\n termTranslated\n ]);\n}\nexport function getStartingFromPriceText({ startingPrice, offerType, context, countryCode, startingPriceOptions = {}, isOneTimePaymentOffer, locale }) {\n const { pricingData } = startingPrice;\n const { maximumFractionDigits, formatStringLocalizationKey, ignoreFreeString } = startingPriceOptions;\n if (!pricingData || typeof pricingData !== 'object') {\n return '';\n }\n if (offerType === OfferType.SaaSApp) {\n return saasStartsFromPricing({\n startingPrice,\n context,\n countryCode,\n maximumFractionDigits,\n locale,\n isOneTimePaymentOffer\n });\n } else {\n return getPriceString({\n context,\n price: startingPrice.pricingData,\n countryCode,\n currency: pricingData.currency,\n locale,\n isQuantifiable: startingPrice.isQuantifiable,\n ignoreFreeString,\n isOneTimePaymentOffer,\n formatStringLocalizationKey,\n maximumFractionDigits,\n offerType\n });\n }\n}\nconst canRenderPricing = (app, billingCountryCode)=>{\n const { ctaTypes, licenseManagement, planPricingType } = app;\n // Render plans and pricing only for Transactable Apps and MicrosoftManaged offers\n return planPricingType === PlanPricingType.SimplePlanPricing && (isTransactApp({\n isEmbedded: false,\n ctaTypes,\n appData: app,\n billingRegion: billingCountryCode\n }) || (licenseManagement === null || licenseManagement === void 0 ? void 0 : licenseManagement.isMicrosoftManaged));\n};\nconst getTabHref = (tabTitle, app, context)=>{\n const productString = getPrimaryProductUrl(app.primaryProduct);\n const productData = getProductByUrlKey({\n urlKey: productString\n });\n const product = productData ? productData.UrlKey : productString;\n return context.buildHref(getPDPRoute(app.appType), {\n productId: product,\n entityId: app.entityId\n }, {\n tab: tabTitle\n });\n};\nexport const getStartingPriceElement = ({ app, billingCountryCode, startingPrice, context, locale })=>{\n if (startingPrice && startingPrice.pricingData && startingPrice.pricingData !== PricingStates.NoPricingData && startingPrice.pricingData !== PricingStates.NotAvailableInThisRegion && startingPrice.pricingData !== PricingStates.AlwaysAvailable && startingPrice.pricingData !== PricingStates.Loading) {\n const pricingElement = {\n type: null,\n label: '',\n value: '',\n href: ''\n };\n if (startingPrice.pricingData === PricingStates.FreeApp) {\n pricingElement.type = Constants.ButtonType.Label;\n pricingElement.label = context.loc('Pricing');\n pricingElement.value = context.loc('Pricing_Free');\n } else if (startingPrice.pricingData === PricingStates.AdditionalPurchasesRequired) {\n pricingElement.type = Constants.ButtonType.Label;\n pricingElement.label = context.loc('Pricing');\n pricingElement.value = context.loc('AdditionalPurchaseMayBeRequired');\n } else if (startingPrice.pricingData === PricingStates.StartFromFree) {\n // Freemium offers with pricing plans\n pricingElement.type = Constants.ButtonType.Label;\n pricingElement.label = context.loc('Pricing_StartsAt');\n pricingElement.value = context.loc('Pricing_Free');\n } else if (typeof startingPrice.pricingData === 'object') {\n if (canRenderPricing(app, billingCountryCode)) {\n pricingElement.href = getTabHref('PlansAndPrice', app, context);\n pricingElement.type = Constants.ButtonType.Link;\n pricingElement.label = context.loc('StartingAt');\n pricingElement.value = getStartingFromPriceText({\n startingPrice,\n offerType: app.offerType,\n context,\n countryCode: billingCountryCode,\n locale\n });\n } else {\n pricingElement.type = Constants.ButtonType.Label;\n pricingElement.label = context.loc('Pricing');\n pricingElement.value = getPriceString({\n context,\n price: startingPrice.pricingData,\n countryCode: billingCountryCode,\n currency: startingPrice.pricingData.currency,\n locale\n });\n }\n }\n if (typeof startingPrice.pricingData === 'object' && !canRenderPricing(app, billingCountryCode)) {\n if (pricingElement.value) {\n pricingElement.value = pricingElement.value + ' ' + context.loc('SiteLicenseAlsoAvailable');\n } else {\n pricingElement.type = Constants.ButtonType.Label;\n pricingElement.label = context.loc('Pricing');\n pricingElement.value = context.loc('SiteLicenseAlsoAvailable');\n }\n }\n return pricingElement;\n }\n return null;\n};\nexport const shouldBlockPricing = (app)=>{\n // hasPrices check is necessary to ensure we don't block pricing for valid Dynamics 365 and PBI Visual offers\n return (isD365App(app) || isD365BCApp(app) || isPowerBIVisualsApp(app)) && !isBagTransactable(app) && app.hasPrices;\n};\nexport const bulidStartingPriceElement = ({ app, pricingLinkClassName, billingCountryCode, context, locale })=>{\n const startingPrice = shouldBlockPricing(app) ? null : app.startingPrice;\n const pricingElement = getStartingPriceElement({\n app,\n billingCountryCode,\n startingPrice,\n context,\n locale\n });\n if (pricingElement) {\n return /*#__PURE__*/ _jsx(\"div\", {\n className: \"cell\",\n itemProp: \"offers\",\n itemScope: true,\n itemType: \"https://schema.org/Offer\",\n children: /*#__PURE__*/ _jsxs(\"div\", {\n className: \"pricingText\",\n children: [\n pricingElement && pricingElement.label && pricingElement.type && pricingElement.value ? /*#__PURE__*/ _jsx(ButtonLink, {\n href: pricingElement.href ? pricingElement.href : '',\n className: pricingLinkClassName,\n type: pricingElement.type,\n accEnabled: true,\n label: pricingElement.label,\n value: pricingElement.value\n }) : null,\n startingPrice.pricingData === PricingStates.FreeApp ? /*#__PURE__*/ _jsxs(\"div\", {\n children: [\n /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"price\",\n content: \"0\"\n }),\n /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"priceCurrency\",\n content: \"USD\"\n }),\n /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"category\",\n content: \"free\"\n })\n ]\n }) : typeof startingPrice.pricingData === 'object' ? /*#__PURE__*/ _jsxs(\"div\", {\n children: [\n /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"priceCurrency\",\n content: startingPrice.pricingData.currency\n }),\n /*#__PURE__*/ _jsx(\"meta\", {\n itemProp: \"price\",\n content: getPriceString({\n context,\n price: startingPrice.pricingData,\n countryCode: billingCountryCode,\n currency: startingPrice.pricingData.currency,\n locale\n }).replace(/[^0-9.]/g, '')\n })\n ]\n }) : null\n ]\n })\n });\n }\n return null;\n};\nexport const hidePowerBiVisualPricing = ({ app, isEmbedded })=>{\n return !isEmbedded && isPowerBIVisualsApp(app) && app.hasPrices;\n};\n","import { getCookieItem } from '@shared/utils/browserStorageUtils';\nimport { Constants } from '@shared/utils/constants';\nexport const getGPCValue = ()=>{\n const globalPrivacyControlEnabled = navigator.globalPrivacyControl;\n if (globalPrivacyControlEnabled) {\n return false;\n }\n try {\n const cookieValue = getCookieItem(Constants.Cookies.AMC3PAdsOptOut) || '';\n return String(cookieValue) !== '1';\n } catch (e) {\n return true;\n }\n};\n","/* eslint-disable react/no-find-dom-node */ import { findDOMNode } from 'react-dom';\nimport { getWindow, getDocument } from './../services/window';\nimport { Constants } from './../utils/constants';\n/**\n * get Component Coordinate on current rendered page\n *\n * origin of Coodinate (0, 0) is top left point on current rendered page\n *\n * @param componentRef: reference of tile component\n *\n * @return:\n * The Rank of Component\n * rank: componet ranking, or -1 if tile not found\n * total: total number of components with same class name, or -1 if tile not found\n */ export function getComponentXYCoordinate(componentRef) {\n if (componentRef) {\n const domNode = findDOMNode(componentRef);\n if (domNode) {\n // get relative boundary position, left, right, top, bottom\n const boundingRectangle = domNode.getBoundingClientRect();\n // get relative center position\n // by adding top left point of a tile rectangle with half of width, and height respectively of tile rectangle\n const relativeCenterX = boundingRectangle.left + Math.floor(boundingRectangle.width / 2);\n const relativeCenterY = boundingRectangle.top + Math.floor(boundingRectangle.height / 2);\n // get absolute center position\n // by adding user scroll offset against origin (0, 0)\n return {\n x: relativeCenterX + getWindow().scrollX,\n y: relativeCenterY + getWindow().scrollY\n };\n }\n }\n return {\n x: -1,\n y: -1\n };\n}\n/**\n * get tile Component Rank based on coordinate out of Total Components with same class name\n *\n * ranking is based on Coordinates sorted on x first and then y (zigzag)\n *\n * @param componentRef: reference of tile component\n *\n * @return:\n * The Rank of Component\n * rank: componet ranking, or -1 if tile not found\n * total: total number of components with same class name, or -1 if tile not found\n */ export const getTileComponentRank = (componentRef)=>{\n const coordinateRanking = {\n rank: -1,\n total: -1\n };\n // get collection of tile elements whose css classname is tile\n const elementHTMLCollection = getDocument().getElementsByClassName(Constants.HTMLClassNameStrings.tile);\n // Note: the return value of getElementsByClassName is not an array, so convert it\n const elements = Object.keys(elementHTMLCollection).map((key)=>elementHTMLCollection[`${key}`]);\n if (elements && elements.length) {\n coordinateRanking.total = elements.length;\n }\n if (componentRef) {\n const domNode = findDOMNode(componentRef);\n if (domNode) {\n const attributeAriaLabeledBy = domNode.getAttribute(Constants.HTMLAttribute.ariaLabeledBy);\n // find position of element out of similar elements by matching with attribute 'aria-labelledby'\n // Note: 'aria-labelledby' is unique for each tile, it contains entity ID, see baseTile.tsx\n elements.some((element, elementIndex)=>{\n const match = element.getAttribute(Constants.HTMLAttribute.ariaLabeledBy) === attributeAriaLabeledBy;\n if (match) {\n coordinateRanking.rank = elementIndex;\n }\n // return immediately if found\n return match;\n });\n }\n }\n return coordinateRanking;\n};\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nimport React from 'react';\nimport { ContextualMenu, DialogType } from '@fluentui/react';\nimport { getWindow } from '../services/window';\nimport { SpzaInstrumentService } from '../services/telemetry/spza/spzaInstrument';\nimport { Constants } from '@shared/utils/constants';\nimport g2Logo from '@shared/images/g2-logo.svg';\nimport { camelCase, keyBy, keys, mapKeys } from 'lodash-es';\nexport function launchTelemetry(action, actionModifier, telemetryDetails) {\n const payload = {\n page: getWindow().location.href,\n action,\n actionModifier,\n details: JSON.stringify(telemetryDetails)\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n}\nexport const getProviderNameByReviewSource = (provider, defaultName)=>{\n switch(provider){\n case Constants.StorefrontName.AppSource:\n return Constants.StorefrontName.AppSource;\n case Constants.StorefrontName.Amp:\n return 'Azure Marketplace';\n case Constants.StorefrontName.G2:\n return Constants.StorefrontName.G2;\n default:\n return defaultName;\n }\n};\nexport function getReviewCtaButtonText(context, userReview) {\n if (userReview) {\n return context.loc('AppReviewCollection_Button_Text_Edit', 'Edit your review');\n }\n return context.loc('AppReviewCollection_Button_Text_Write', 'Write a review');\n}\nexport function getAddReviewSectionDescription(context, isPurchased) {\n if (!isPurchased) {\n return context.loc('AppReviewCollection_addReviewDescription_Text', 'To submit your rating and review, first get the \\napp and let us know about your experience');\n }\n return '';\n}\nexport const getReviewModalDialogProps = (title)=>{\n const dragOptions = {\n moveMenuItemText: 'Move',\n closeMenuItemText: 'Close',\n menu: ContextualMenu\n };\n const modalPropsStyles = {\n main: {\n maxWidth: 650\n },\n scrollableContent: {\n width: 560\n }\n };\n return {\n dialogContentProps: {\n type: DialogType.normal,\n title: title\n },\n modalProps: {\n isBlocking: true,\n styles: modalPropsStyles,\n dragOptions: dragOptions\n },\n maxWidth: 560\n };\n};\nexport const getReviewCommentsModalDialogProps = (title)=>{\n const dragOptions = {\n moveMenuItemText: 'Move',\n closeMenuItemText: 'Close',\n menu: ContextualMenu\n };\n const modalPropsStyles = {\n main: {\n maxWidth: 650\n },\n scrollableContent: {\n width: 560\n }\n };\n return {\n dialogContentProps: {\n type: DialogType.normal,\n title: title\n },\n modalProps: {\n isBlocking: true,\n styles: modalPropsStyles,\n dragOptions: dragOptions\n },\n maxWidth: 560\n };\n};\nexport const createDefaultPagination = (reviews)=>{\n const defaultPagination = {\n startIndex: 1,\n endIndex: 1,\n pageIndex: 1\n };\n if (reviews && reviews.length > 0) {\n defaultPagination.endIndex = reviews.length > Constants.MaxItemsPerPageInReviews ? Constants.MaxItemsPerPageInReviews : reviews.length;\n }\n return defaultPagination;\n};\nexport const createDeepLinkPagination = (reviews, reviewId)=>{\n const result = createDefaultPagination(reviews);\n if ((reviews === null || reviews === void 0 ? void 0 : reviews.length) > 0 && reviewId) {\n reviews.some((review, index)=>{\n if (review.id === reviewId) {\n const currentPageIndex = Math.trunc(index / Constants.MaxItemsPerPageInReviews);\n result.startIndex = currentPageIndex * Constants.MaxItemsPerPageInReviews + 1;\n result.pageIndex = currentPageIndex + 1;\n result.endIndex = Math.min(result.startIndex + Constants.MaxItemsPerPageInReviews - 1, reviews.length);\n return true;\n }\n return false;\n });\n }\n return result;\n};\nexport const combineDeletedComments = ({ commentsById, commentIds })=>{\n return commentIds.reduce((acc, currId, currIdx)=>{\n const currentComment = commentsById[`${currId}`];\n // Accumulate deleted comments\n if (currentComment.isDeleted) {\n acc.deletedAccumulator = [\n ...acc.deletedAccumulator,\n currId\n ];\n }\n // At the end of the array, or if encountering a normal comment, add the deleted comments or just one if they surpass the limit\n if (!currentComment.isDeleted || currIdx >= commentIds.length - 1) {\n // If the subsequent deleted comments number reaches the limit, only add one\n acc.result = [\n ...acc.result,\n ...acc.deletedAccumulator.length >= Constants.Reviews.MaxSubsequentDeletedComments ? [\n acc.deletedAccumulator[0]\n ] // Add first one\n : acc.deletedAccumulator\n ];\n // Reset the accumulator\n acc.deletedAccumulator = [];\n }\n if (!currentComment.isDeleted) {\n acc.result = [\n ...acc.result,\n currId\n ];\n }\n return acc;\n }, {\n deletedAccumulator: [],\n result: []\n }).result;\n};\nexport const createInitialReviewCommentsState = ()=>{\n return {\n commentIds: [],\n commentsById: {},\n reducedCommentIds: [],\n isLoading: false,\n newlyAddedComments: [],\n totalComments: 0,\n currentLoadedPage: 0,\n totalPages: 0\n };\n};\nexport const appendReviewCommentsToState = (state, comments)=>{\n const commentsById = keyBy(comments, 'id');\n const newState = _object_spread_props(_object_spread({}, state), {\n commentsById: _object_spread({}, state.commentsById, commentsById),\n commentIds: [\n ...state.commentIds,\n ...keys(commentsById)\n ]\n });\n return _object_spread_props(_object_spread({}, newState), {\n // Merge consequent deleted comments\n reducedCommentIds: combineDeletedComments(newState)\n });\n};\nexport const mapEnrichReviewCommentToIAppReviewComment = (comment)=>{\n const keyMapper = (v, key)=>camelCase(key);\n const { customer_info: customerInfo } = comment;\n return _object_spread_props(_object_spread({}, mapKeys(comment, keyMapper)), {\n customerInfo: mapKeys(customerInfo, keyMapper)\n });\n};\nexport const calculateTotalReviewCommentsPagesCount = (totalComments)=>{\n if (totalComments) {\n return Math.ceil(totalComments / Constants.Reviews.CommentsPerPage);\n }\n return 0;\n};\nexport const getExternalRatingSummaries = (ratingSummaries = [])=>{\n const externalRatingSummaries = [];\n const g2Summary = ratingSummaries.find((summary)=>summary.Source === Constants.StorefrontName.G2);\n if (g2Summary) {\n externalRatingSummaries.push({\n ratingSummary: g2Summary,\n image: g2Logo\n });\n }\n return externalRatingSummaries;\n};\nexport const getRatingTotals = (ratingSummaries)=>{\n return (ratingSummaries || []).filter((externalRatingSummary)=>externalRatingSummary.AverageRating && !isNaN(externalRatingSummary.AverageRating) && externalRatingSummary.TotalRatings && externalRatingSummary.Source === Constants.StorefrontName.G2).reduce((accumulatedRatings, currentRating)=>({\n totalRatingCounts: accumulatedRatings.totalRatingCounts + currentRating.TotalRatings,\n totalAverageRatingsSum: accumulatedRatings.totalAverageRatingsSum + currentRating.AverageRating * currentRating.TotalRatings\n }), {\n totalRatingCounts: 0,\n totalAverageRatingsSum: 0\n });\n};\nexport const getTotalExternalRatingSummariesInfo = (ratingSummaries)=>{\n const { totalRatingCounts, totalAverageRatingsSum } = getRatingTotals(ratingSummaries);\n return {\n totalRatings: totalRatingCounts,\n averageRatings: totalRatingCounts ? totalAverageRatingsSum / totalRatingCounts : 0\n };\n};\nexport const getRatingSummaryByType = (ratingSummaries, source)=>{\n return ratingSummaries === null || ratingSummaries === void 0 ? void 0 : ratingSummaries.find((option)=>option.Source === source);\n};\nexport const findReviewsSources = ({ reviews })=>{\n const { AppSource, Amp, Ibiza } = Constants.StorefrontName;\n const hasInternalReviews = reviews.some((review)=>[\n AppSource,\n Amp,\n Ibiza\n ].includes(review.source));\n const hasExternalReviews = reviews.some((review)=>review.source === Constants.StorefrontName.G2);\n return {\n hasExternalReviews,\n hasInternalReviews\n };\n};\n","import { logger } from '@src/logger';\nimport { Constants } from './constants';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { stringifyError } from './errorUtils';\n// special params which are also campaign ones\nexport const specialParams = [\n 'debug',\n 'preview',\n 'embedHost',\n 'fullScreenMode',\n Constants.QueryStrings.includeTestProducts,\n Constants.QueryStrings.isConverged\n];\nexport const campaignParams = [\n 'mktcmpid',\n 'mktvid',\n 'ref',\n 'src',\n 'campaignCorrelationId',\n 'embedCorrelationId',\n 'mkt_tok',\n 'utm_source',\n 'utm_medium',\n 'utm_term',\n 'utm_content',\n 'utm_campaign',\n 'source',\n 'placement',\n 'ad_id',\n 'adset_id',\n 'campaign_id',\n 'ad_name',\n 'adset_name',\n 'campaign_name',\n 'fb',\n 'ig',\n 'msg',\n 'an',\n 'ocid'\n];\nexport const excludedCampaignsForAcquisition = [\n {\n src: 'office'\n }\n];\nconst logGetCampaignTelemetry = ({ landingView, currentView, shouldSkipGetCampaigns, campaigns, entityId, error })=>{\n let detailText;\n if (error) {\n detailText = 'Failed Generating Campaigns Before Passing To Lead, ' + `LANDING VIEW: ${landingView}, ` + `CURRENT VIEW: ${currentView}, ` + `ERROR: ${stringifyError(error)}`;\n } else if (shouldSkipGetCampaigns) {\n detailText = 'Success Skipping Generating Campaigns Before Passing To Lead, ' + `LANDING VIEW: ${landingView}, ` + `CURRENT VIEW: ${currentView}, ` + `CAMPAIGNS: ${JSON.stringify(campaigns)}`;\n } else {\n detailText = 'Success Generating Campaigns Before Passing To Lead, ' + `LANDING VIEW: ${landingView}, ` + `CURRENT VIEW: ${currentView}, ` + `CAMPAIGNS: ${JSON.stringify(campaigns)}`;\n }\n const payload = {\n page: currentView,\n action: Constants.Telemetry.Action.PublishAcquisitionInfo,\n actionModifier: Constants.Telemetry.ActionModifier.LeadCampaignGeneration,\n appName: entityId,\n details: detailText\n };\n SpzaInstrumentService.getProvider().probe('logTelemetryInfo', payload);\n logger.info(payload.details, {\n action: payload.action,\n actionModifier: payload.actionModifier,\n appName: entityId,\n page: payload.page\n });\n};\n// returns the list of the valid route params for app view.\nexport const getAppViewParams = ()=>{\n return specialParams.concat(campaignParams);\n};\nfunction getParameterByName(param, url) {\n param = param.replace(/[\\\\[\\]]/g, '\\\\$&');\n const regex = new RegExp('[?&]' + param + '(=([^&#]*)|&|#|$)', 'i');\n const results = regex.exec(url);\n if (!results) {\n return null;\n }\n // 2 represents the value of the param.\n if (!results[2]) {\n return '';\n }\n return decodeURIComponent(results[2].replace(/\\+/g, ' '));\n}\n// 1) we should always generate, after user redirects to a non-detail page from a campaign\n// 2) we should generate current and only current, if user redirects to a detail page from a campaign\nexport const shouldGetCampaignsForAcquistion = (landingView, previousPage, routes)=>{\n const isInitiaViewDetailPage = landingView === routes.appDetails.name || landingView === routes.serviceDetail.name;\n const isCurrentViewLandingView = !previousPage;\n return !isInitiaViewDetailPage || isCurrentViewLandingView;\n};\nfunction serializeCampaignObject(obj) {\n const str = [];\n for(const p in obj){\n str.push(encodeURIComponent(p) + '=' + encodeURIComponent(obj[`${p}`]));\n }\n return str.join('&');\n}\nexport const extractCampaignsFromUrl = (url)=>{\n const campaigns = {};\n for(let i = 0; i < campaignParams.length; i++){\n const campaignParam = getParameterByName(campaignParams[`${i}`], url);\n if (campaignParam) {\n campaigns[campaignParams[`${i}`]] = campaignParam;\n }\n }\n return campaigns;\n};\nexport const excludeCampaignsForAcquisition = (campaigns)=>{\n const keys = Object.keys(campaigns);\n keys.forEach((key)=>{\n const value = campaigns[`${key}`];\n const foundToDelete = excludedCampaignsForAcquisition.some((aExludeCampaign)=>{\n const excludeKey = Object.keys(aExludeCampaign)[0];\n const excludeValue = aExludeCampaign[`${key}`];\n return key === excludeKey && value === excludeValue;\n });\n if (foundToDelete) {\n delete campaigns[`${key}`];\n }\n });\n};\nexport const getCampaignsForAcquisitionFromUrl = ({ url, landingView, currentView, previousPage, routes, entityId })=>{\n try {\n if (!shouldGetCampaignsForAcquistion(landingView, previousPage, routes)) {\n logGetCampaignTelemetry({\n landingView,\n currentView,\n shouldSkipGetCampaigns: true,\n campaigns: null,\n error: null,\n entityId\n });\n return null;\n }\n const campaigns = extractCampaignsFromUrl(url);\n excludeCampaignsForAcquisition(campaigns);\n logGetCampaignTelemetry({\n landingView,\n currentView,\n shouldSkipGetCampaigns: false,\n campaigns,\n error: null,\n entityId\n });\n return campaigns;\n } catch (error) {\n logGetCampaignTelemetry({\n landingView,\n currentView,\n shouldSkipGetCampaigns: false,\n campaigns: null,\n error,\n entityId\n });\n return null;\n }\n};\n// This methods returns just the campaign params from the URL\n// for e.g. if the URL is http://localhost:3000/en-us/home?debug=true&mktcmpid=foo&mktvid=bar\n// the output would be mktcmpid=foo&mktvid=bar\nfunction getCampaingQueryParamsFromUrl(url) {\n const campaignObj = extractCampaignsFromUrl(url);\n return serializeCampaignObject(campaignObj);\n}\nexport function updateHandOffUrlWithCampaignParams(handoffUrl, pageUrl) {\n if (!handoffUrl) {\n return;\n }\n const params = getCampaingQueryParamsFromUrl(pageUrl);\n if (params) {\n if (handoffUrl.indexOf('?') >= 0) {\n handoffUrl = handoffUrl.replace('?', `?${params}&`);\n } else {\n handoffUrl = handoffUrl + '?' + params;\n }\n }\n return handoffUrl;\n}\nexport const getEntityIdFromUrl = ({ pathName = '' })=>{\n let offerIdLocation = 0;\n let entityId = '';\n offerIdLocation = pathName.lastIndexOf('/');\n entityId = pathName.substring(offerIdLocation + 1).split('?')[0];\n return entityId;\n};\n","import * as React from 'react';\nimport { Constants } from '../utils/constants';\nimport { getTrimmedWords } from './../utils/stringUtils';\nvar css = /*#__PURE__*/ function(css) {\n css[\"searchInputClassName\"] = \"resizable-input\";\n css[\"searchButtonClassName\"] = \".spza-c-search .react-selectize-control .react-selectize-toggle-button-container .c-glyph\";\n css[\"searchInputIdName\"] = \"marketplace-selectize-search-input\";\n css[\"searchDivInputClassName\"] = \" .spza-header-search-section\";\n css[\"searchFocusInputClassName\"] = \" .spza-header-row-segment-middle\";\n css[\"headerPrefixClassName\"] = \".spza-header-\";\n return css;\n}(css || {});\nexport function getSearchElement(prefix, key) {\n const elements = document.querySelectorAll(prefix + key);\n const searchInput = document.querySelector(prefix + \" .spza-header-search-section\");\n let searchElement = null;\n if (elements) {\n for(let i = 0; i < elements.length; i++){\n if (elements[`${i}`].contains(searchInput)) {\n searchElement = elements[`${i}`];\n break;\n }\n }\n return searchElement;\n }\n}\nexport function onKeyBlurOptionHandle(event, componentKey) {\n const searchInput = getSearchElement(`${\".spza-header-\"}${componentKey.substring(0, componentKey.indexOf('-'))}`, \" .spza-header-row-segment-middle\");\n if (searchInput) {\n searchInput.classList.remove('spza-header-row-segment-middle-focus');\n }\n}\nexport function onKeyFocusOptionHandle(event, componentKey) {\n if (event.keyCode === Constants.SystemKey.Tab) {\n const searchInput = getSearchElement(`${\".spza-header-\"}${componentKey.substring(0, componentKey.indexOf('-'))}`, \" .spza-header-row-segment-middle\");\n if (searchInput) {\n searchInput.classList.add('spza-header-row-segment-middle-focus');\n }\n }\n}\n/**\n * This method is to escape any special characters required on https://aka.ms/azure-search-full-query\n * In that way, the escaped search text could then be used as search queries when calling azure search api\n *\n * @param rawSearchText raw search text from user input\n * @param excludeQuotes true if double quotes are to be excluded from the escape sequence.\n */ export function getEscapedSearchText(rawSearchText, excludeQuotes = false) {\n // characters required to escape, reference: https://aka.ms/azure-search-full-query\n const charactersToEscape = '+ - && || ! ( ) { } [ ] ^ ~ ? : / \\\\ * AND OR NOT' + (excludeQuotes ? '' : ' \"');\n // make an array of characters to escape, each element is a string, which consists of characters,\n // e.g. an array of characters to escape ['+', '&&'], '+' and '&&' are strings\n // and escape every character in each string\n // e.g. ['+', '&&'] => ['\\+', '\\&\\&']\n // the purpose of this array is to use in regex pattern\n const escapedCharactersList = getTrimmedWords(charactersToEscape)// get each string, e.g. +, &&\n .map((stringToEscape)=>stringToEscape// get each character in current string\n .split('')// escape each character, e.g. \\+, \\&\n .map((character)=>`\\\\${character}`)// rejoin each escaped character to form as an escaped string, e.g. \\+, \\&\\&\n .join(''));\n // escape pattern is a regex pattern, by OR-ing each escaped string of escaped array,\n // which means that'd be a match, if an input string include any of escaped string in the escaped array\n const escapePattern = `${escapedCharactersList// wrap parenthesis around each element as a regex group\n .map((escapedString)=>`(${escapedString})`)// make regex to match any of them\n .join('|')}`;\n // use global to match all occurrences of escape pattern\n // eslint-disable-next-line security/detect-non-literal-regexp\n const escapeRegex = new RegExp(escapePattern, Constants.RegExpFlag.Global);\n // escape input string whenever there's a match with escape pattern\n const escapedSearchText = rawSearchText.replace(escapeRegex, (matchedString)=>// escape each character in each matched substring\n `${matchedString.split('').map((character)=>`\\\\${character}`).join('')}`);\n return escapedSearchText;\n}\n/**\n * Perform a search with the following guidelines:\n * 1) Escape special characters.\n * 2) Add a '+' character as a prefix for a search that starts and ends with a '\"'.\n * 3) Add 'And' between the search words.\n * @param rawSearchText Raw search text from user input.\n */ export function getSearchQuery(rawSearchText = '') {\n rawSearchText = typeof rawSearchText === 'string' ? rawSearchText : '';\n if (rawSearchText.length > Constants.Search.maxSearchTextLength) {\n const isCutInTheMiddleOfWord = rawSearchText[Constants.Search.maxSearchTextLength - 1] !== ' ' && rawSearchText[Constants.Search.maxSearchTextLength] !== ' ';\n rawSearchText = rawSearchText.slice(0, Constants.Search.maxSearchTextLength);\n const splittedBySpaces = rawSearchText.split(/\\s+/);\n if (splittedBySpaces.length > 1 && isCutInTheMiddleOfWord) {\n splittedBySpaces.pop();\n }\n rawSearchText = splittedBySpaces.join(' ');\n }\n // catches all phrases surrounded by double quotes.\n const re = /\"(.*?)\"/g;\n const phrases = rawSearchText.match(re);\n const searchPhrases = phrases ? phrases.map((p)=>`+${getEscapedSearchText(p)}`) : [];\n const words = rawSearchText.replace(re, '').split(' ').map((w)=>w.trim()).filter((w)=>!!w).map((w)=>`${getEscapedSearchText(w)}`);\n const searchTerm = [\n ...searchPhrases,\n ...words\n ].join(' ');\n return searchTerm;\n}\nexport function parseSearchAction(request) {\n var _request_headers;\n return ((_request_headers = request.headers) === null || _request_headers === void 0 ? void 0 : _request_headers.searchactiontype) === Constants.Search.ActionType.Suggestions ? Constants.Search.ActionType.Suggestions : Constants.Search.ActionType.Search;\n}\nexport function removeDuplicateAddIns(apps, idField) {\n const linkedAddIns = Constants.SearchFieldNames.linkedAddIns;\n let bundleCount = 0;\n const linkedAddInIds = {};\n for (const currentApp of apps){\n if (currentApp && currentApp[`${linkedAddIns}`] && currentApp[`${linkedAddIns}`].length > 0) {\n bundleCount++;\n for (const currentAddIns of currentApp[`${linkedAddIns}`]){\n if (currentAddIns && currentAddIns[`${idField}`]) {\n linkedAddInIds[currentAddIns[`${idField}`]] = true;\n }\n }\n }\n }\n const uniqueApps = apps.filter((currentApp)=>{\n const currentAppId = currentApp && currentApp[`${idField}`] && currentApp[`${idField}`].toString() || '';\n return !(currentAppId && linkedAddInIds[`${currentAppId}`]);\n });\n const duplicateAddInsCount = apps.length - uniqueApps.length;\n return {\n apps,\n bundleCount,\n duplicateAddInsCount\n };\n}\n","/* eslint-disable @typescript-eslint/no-namespace */ import { AwaMetaTags, Constants } from '@shared/utils/constants';\nimport { routes } from '@shared/routerHistory';\nimport { getDocument } from '@shared/services/window';\n(function(metaTagConstants) {\n metaTagConstants.viewportName = 'viewport';\n metaTagConstants.viewportValue = 'width=device-width, initial-scale=1';\n metaTagConstants.typeName = 'type';\n metaTagConstants.typeValue = 'Website';\n metaTagConstants.keywordsName = 'keywords';\n metaTagConstants.spzaGalleryWordKeywordsValue = 'word plugin, word apps, word add ons, word extension, word add-ins, grammar, grammer, chatgpt word, word cloud, citation';\n metaTagConstants.spzaGalleryExcelKeywordsValue = 'chatgpt excel, excel chatgpt, excel plugins, excel apps, excel add ons, excel add-ins, excel extensions, ai excel, web viewer';\n metaTagConstants.spzaGalleryPptKeywordsValue = 'ppt plugin, ppt add-ins, ppt apps, ppt add ons, ppt extension, powerpoint add-ins, powerpoint apps, powerpoint plugin, powerpoint add ons, powerpoint extension, power bi visual';\n metaTagConstants.spzaGalleryOutlookKeywordsValue = 'outlook plugin, outlook add-ins, outlook apps, outlook add ons, outlook extension, email recovery';\n metaTagConstants.spzaGalleryOfficeKeywordsValue = 'outlook apps, office store, outlook plugin, word plugin, gpt excel, chatgpt excel, excel plugin, microsoft office store, Business apps, microsoft 365 apps, education apps, word apps, excel apps, sharepoint apps, powerpoint apps, grammar, power bi visual';\n metaTagConstants.spzaGalleryKeywordsValue = 'Business apps, 365 apps, office store, dynamics apps, outlook apps, word apps, government apps, education apps, microsoft office store, excel apps, ppt apps, powerpoint apps, office plugin, excel plugin';\n metaTagConstants.spzaHomeKeywordsValue = 'Business apps, 365 apps, office store apps, dynamics apps, outlook apps, word apps, government apps, education apps, consulting services';\n metaTagConstants.csGalleryKeywordsValue = 'PowerBI consulting services, dynamics consulting services, assessment, briefing, consulting services implementation';\n metaTagConstants.desName = 'description';\n metaTagConstants.csGalleryDesValue = 'Find the consulting services for your platforms: PowerBI, Dynamics, Web Apps. Get solutions tailored to your industry: Agriculture, Education, Distribution, Financial services, Government, Healthcare, Manufacturing, Professional services, Retail and consumer goods.';\n metaTagConstants.spzaHomeDesValue = 'Discover the app for your business needs and explore tailored solutions for various industries. Whether you are seeking Microsoft 365 apps for Word, Excel, PowerPoint, or Outlook, or apps for Power Platform, Dynamics 365, SaaS, we have you covered. Enhance your productivity and streamline your work with our diverse range of plugins, including grammar and citation tools, GPT-powered Word and Excel enhancements, word clouds, and more. Find the right tools to excel in your field and make the most of your software experience, right here.';\n metaTagConstants.spzaWordGalleryDesValue = 'Discover the Word app for your business needs. Explore a diverse range of Word plugins. Whether you are in professional writing, content creation, or any other domain, Word apps are designed to enhance your productivity and simplify your tasks. Unleash the full potential of your documents with tools such as GPT-powered enhancements, grammar and citation plugins, and more.';\n metaTagConstants.spzaExcelGalleryDesValue = 'Discover the Excel app for your business needs. Explore a diverse range of Excel plugins. Whether you are in finance, data analysis, project management, or any other field, our Excel apps are designed to boost your productivity and streamline your work. Unlock the potential of your spreadsheets with tools including GPT-powered enhancements, web viewer, data analysis plugins, and more.';\n metaTagConstants.spzaPptGalleryDesValue = 'Discover the PowerPoint app for your business needs. Explore a diverse range of PowerPoint plugins. Whether you are in sales, education, marketing, or any other sector, our PowerPoint apps are designed to boost your creativity and streamline your presentations. Unleash the full potential of your slides with tools like GPT-powered enhancements, interactive plugins, and more.';\n metaTagConstants.spzaOutlookGalleryDesValue = 'Discover the Outlook app for your business needs. Explore a diverse range of Outlook plugins. Whether you are in sales, education, marketing, or any other sector, our PowerPoint apps are designed to boost your creativity and streamline your presentations. Unleash the full potential of your slides with tools like GPT-powered enhancements, interactive plugins, and more.';\n metaTagConstants.spzaOfficeGalleryDesValue = 'Discover the Office app for your business needs. Explore a diverse range of Word , Excel, PowerPoint, Outlook, Teams, and SharePoint plugins. Whether you are in sales, education, marketing, or any other sector, our apps are designed to boost your creativity and enhance your productivity. Unleash the full potential of your Office suite with tools like GPT-powered plugins, grammar checker, interactive add-ins, and more.';\n metaTagConstants.sitenameName = 'site_name';\n metaTagConstants.sitenameValue = 'Appsource – Business Apps';\n metaTagConstants.titleName = 'title';\n metaTagConstants.csTitleValue = 'Appsource – Consulting services';\n metaTagConstants.urlName = 'url';\n metaTagConstants.localeName = 'locale';\n metaTagConstants.imageName = 'image';\n metaTagConstants.videoName = 'video';\n metaTagConstants.spzaEnvironment = 'portal';\n metaTagConstants.spzaUrl = 'https://appsource.microsoft.com';\n metaTagConstants.twitterCard = 'twitter:card';\n metaTagConstants.twitterSite = 'twitter:site';\n metaTagConstants.twitterTitle = 'twitter:title';\n metaTagConstants.twitterDes = 'twitter:description';\n metaTagConstants.twitterImage = 'twitter:image';\n metaTagConstants.twitterCardValue = 'summary';\n metaTagConstants.twitterSiteValue = '@appsource';\n})(metaTagConstants || (metaTagConstants = {}));\nexport function getPreventIndexMetatag(siteEnv) {\n if (siteEnv !== 'prod') {\n const preventIndexMetatag = getDocument().createElement('meta');\n preventIndexMetatag.setAttribute('name', 'robots');\n preventIndexMetatag.setAttribute('content', 'noindex');\n return preventIndexMetatag;\n }\n}\nconst isGallery = (path, galleryType)=>{\n const pathArray = path.split('/');\n return pathArray[pathArray.length - 1].indexOf(galleryType) > -1 || path.indexOf(Constants.category) > -1;\n};\nexport function getMetaTag(key, value) {\n if (value) {\n const metaTag = getDocument().createElement('meta');\n metaTag.setAttribute('name', key);\n metaTag.setAttribute('content', value);\n return metaTag;\n }\n}\nexport function getOGtag(key, value) {\n if (value) {\n const metaTag = getDocument().createElement('meta');\n metaTag.setAttribute('property', `og:${key}`);\n metaTag.setAttribute('content', value);\n return metaTag;\n }\n}\nexport function getViewPortTag() {\n return getMetaTag(metaTagConstants.viewportName, metaTagConstants.viewportValue);\n}\nexport function getWebtypeOGTag() {\n return getOGtag(metaTagConstants.typeName, metaTagConstants.typeValue);\n}\nexport function getAppSourceWordGalleryKeywordsTag() {\n return getMetaTag(metaTagConstants.keywordsName, metaTagConstants.spzaGalleryWordKeywordsValue);\n}\nexport function getAppSourceExcelGalleryKeywordsTag() {\n return getMetaTag(metaTagConstants.keywordsName, metaTagConstants.spzaGalleryExcelKeywordsValue);\n}\nexport function getAppSourcePptGalleryKeywordsTag() {\n return getMetaTag(metaTagConstants.keywordsName, metaTagConstants.spzaGalleryPptKeywordsValue);\n}\nexport function getAppSourceOfficeGalleryKeywordsTag() {\n return getMetaTag(metaTagConstants.keywordsName, metaTagConstants.spzaGalleryOfficeKeywordsValue);\n}\nexport function getAppSourceOutlookGalleryKeywordsTag() {\n return getMetaTag(metaTagConstants.keywordsName, metaTagConstants.spzaGalleryOutlookKeywordsValue);\n}\nexport function getAppSourceGalleryKeywordsTag() {\n return getMetaTag(metaTagConstants.keywordsName, metaTagConstants.spzaGalleryKeywordsValue);\n}\nexport function getAppSourceHomeKeywordsTag() {\n return getMetaTag(metaTagConstants.keywordsName, metaTagConstants.spzaHomeKeywordsValue);\n}\nexport function getAppSourceCSGalleryKeywordsTag() {\n return getMetaTag(metaTagConstants.keywordsName, metaTagConstants.csGalleryKeywordsValue);\n}\nexport function getAppSourceCSGalleryDescriptionTag() {\n return getMetaTag(metaTagConstants.desName, metaTagConstants.csGalleryDesValue);\n}\nexport function getAppSourceWordDescriptionTag() {\n return getMetaTag(metaTagConstants.desName, metaTagConstants.spzaWordGalleryDesValue);\n}\nexport function getAppSourceExcelDescriptionTag() {\n return getMetaTag(metaTagConstants.desName, metaTagConstants.spzaExcelGalleryDesValue);\n}\nexport function getAppSourcePptDescriptionTag() {\n return getMetaTag(metaTagConstants.desName, metaTagConstants.spzaPptGalleryDesValue);\n}\nexport function getAppSourceOutlookDescriptionTag() {\n return getMetaTag(metaTagConstants.desName, metaTagConstants.spzaOutlookGalleryDesValue);\n}\nexport function getAppSourceOfficeDescriptionTag() {\n return getMetaTag(metaTagConstants.desName, metaTagConstants.spzaOfficeGalleryDesValue);\n}\nexport function getAppSourceHomeDescriptionTag() {\n return getMetaTag(metaTagConstants.desName, metaTagConstants.spzaHomeDesValue);\n}\nexport function getAppSourcePageOGSitename() {\n return getOGtag(metaTagConstants.sitenameName, metaTagConstants.sitenameValue);\n}\nexport function getAppSourcePageOGTitleTag() {\n return getOGtag(metaTagConstants.titleName, metaTagConstants.sitenameValue);\n}\nexport function getAppSourceCSGalleryOGTitleTag() {\n return getOGtag(metaTagConstants.titleName, metaTagConstants.csTitleValue);\n}\nexport function getAppSourceGalleryOGDescriptionTag() {\n return getOGtag(metaTagConstants.desName, metaTagConstants.spzaGalleryKeywordsValue);\n}\nexport function getAppSourceWordGalleryOGDescriptionTag() {\n return getOGtag(metaTagConstants.desName, metaTagConstants.spzaWordGalleryDesValue);\n}\nexport function getAppSourcePptGalleryOGDescriptionTag() {\n return getOGtag(metaTagConstants.desName, metaTagConstants.spzaPptGalleryDesValue);\n}\nexport function getAppSourceExcelGalleryOGDescriptionTag() {\n return getOGtag(metaTagConstants.desName, metaTagConstants.spzaExcelGalleryDesValue);\n}\nexport function getAppSourceOutlookGalleryOGDescriptionTag() {\n return getOGtag(metaTagConstants.desName, metaTagConstants.spzaOutlookGalleryDesValue);\n}\nexport function getAppSourceOfficeGalleryOGDescriptionTag() {\n return getOGtag(metaTagConstants.desName, metaTagConstants.spzaOfficeGalleryDesValue);\n}\nexport function getAppSourceHomeOGDescriptionTag() {\n return getOGtag(metaTagConstants.desName, metaTagConstants.spzaHomeKeywordsValue);\n}\nexport function getAppSourceCSGalleryOGDescriptionTag() {\n return getOGtag(metaTagConstants.desName, metaTagConstants.csGalleryKeywordsValue);\n}\nexport function getAwaMetaTags(state) {\n const awaMetaTags = [];\n if (state === null || state === void 0 ? void 0 : state.config) {\n var _state_users;\n awaMetaTags.push(getMetaTag(AwaMetaTags.locale, state.config.locale));\n var _state_users_signedIn;\n awaMetaTags.push(getMetaTag(AwaMetaTags.signedIn, `${(_state_users_signedIn = (_state_users = state.users) === null || _state_users === void 0 ? void 0 : _state_users.signedIn) !== null && _state_users_signedIn !== void 0 ? _state_users_signedIn : false}`));\n }\n return awaMetaTags;\n}\nfunction isCanonicalQueryKey(queryKey) {\n return Constants.KeepInCanonicalFilters.indexOf(queryKey) > -1;\n}\nconst parseFirstFilter = (filterstring)=>{\n return filterstring.split(';')[0].split(Constants.semicolon)[0];\n};\nfunction getGalleryCanonicalSuffix(currentUrl) {\n if (currentUrl.split('?').length < 2) {\n return '';\n }\n const queryParamsString = currentUrl.split('?')[1];\n const queryParamsArray = queryParamsString.split('&');\n for (const queryParam of queryParamsArray){\n const queryTuple = queryParam.split('=');\n if (queryTuple.length > 1 && isCanonicalQueryKey(queryTuple[0])) {\n return '?' + parseFirstFilter(queryParam);\n }\n }\n return '';\n}\nconst parseLocale = (path)=>{\n const match = path.match(Constants.SeoLocaleRegex);\n return match ? match[0].substr(1) : Constants.DefaultLocale;\n};\nexport function getCanonicalLink(currentUrl, isMacEnv) {\n const path = currentUrl && currentUrl.split('?')[0] || '';\n let canonicalLink = path;\n const locale = parseLocale(path);\n if (isMacEnv) {\n if (path.indexOf(Constants.appsGallery) > -1 && !isGallery(path, Constants.GalleryTypes.apps)) {\n canonicalLink = path + Constants.appDetailsCanonicalTabSuffix;\n } else if (path.includes('/sitemap')) {\n canonicalLink = `/${locale}/sitemap`;\n } else if (path.split('/').length <= 3) {\n canonicalLink = `/${locale}/`;\n }\n } else {\n if (path.indexOf(Constants.csGallery) > -1) {\n canonicalLink = isGallery(path, Constants.GalleryTypes.consultingServices) ? path + getGalleryCanonicalSuffix(currentUrl) : path;\n } else if (path.indexOf(Constants.appsGallery) > -1) {\n canonicalLink = path + getGalleryCanonicalSuffix(currentUrl);\n } else if (path.indexOf(Constants.product) > -1) {\n canonicalLink = path + Constants.appDetailsCanonicalTabSuffix;\n } else if (path.includes('/sitemap')) {\n canonicalLink = `/${locale}/sitemap`;\n } else {\n canonicalLink = `/${locale}/`;\n }\n }\n return canonicalLink.toLowerCase();\n}\nexport function getCanonicalLinkTag({ path, protocol, host }) {\n const runningEnv = process.env.webAppName;\n const runningOnMac = runningEnv === Constants.canonicalAMPEnvWebAppName;\n const canonicalLink = `${protocol}://${host}${getCanonicalLink(path, runningOnMac)}`;\n const canonicalLinkTag = getDocument().createElement('link');\n canonicalLinkTag.rel = 'canonical';\n canonicalLinkTag.href = canonicalLink;\n return canonicalLinkTag;\n}\nexport function getPageName(renderProps, env) {\n // get cuurent page from pathname and pass to getComponentHTMLData for meta tag\n let page = Constants.PageToGiveMetaTag.PageNotReady;\n if (env !== metaTagConstants.spzaEnvironment) {\n page = Constants.PageToGiveMetaTag.PageNotReady;\n } else if (renderProps.location.pathname === '/' + renderProps.params.locale + routes.home.getPath(null) || renderProps.location.pathname === '/' + renderProps.params.locale || renderProps.location.pathname === '/' + renderProps.params.locale + '/') {\n page = Constants.PageToGiveMetaTag.SpzaHomePage;\n } else if (renderProps.location.pathname.startsWith('/' + renderProps.params.locale + routes.marketplace.getPath(null))) {\n var _renderProps_query, _renderProps_query1, _renderProps_query2, _renderProps_query3, _renderProps_query4;\n if (((_renderProps_query = renderProps.query) === null || _renderProps_query === void 0 ? void 0 : _renderProps_query.product) === 'word') {\n page = Constants.PageToGiveMetaTag.SpzaWordGalleryPage;\n } else if (((_renderProps_query1 = renderProps.query) === null || _renderProps_query1 === void 0 ? void 0 : _renderProps_query1.product) === 'excel') {\n page = Constants.PageToGiveMetaTag.SpzaExcelGalleryPage;\n } else if (((_renderProps_query2 = renderProps.query) === null || _renderProps_query2 === void 0 ? void 0 : _renderProps_query2.product) === 'powerpoint') {\n page = Constants.PageToGiveMetaTag.SpzaPowerpointGalleryPage;\n } else if (((_renderProps_query3 = renderProps.query) === null || _renderProps_query3 === void 0 ? void 0 : _renderProps_query3.product) === 'outlook') {\n page = Constants.PageToGiveMetaTag.SpzaOutlookGalleryPage;\n } else if (((_renderProps_query4 = renderProps.query) === null || _renderProps_query4 === void 0 ? void 0 : _renderProps_query4.product) === 'office') {\n page = Constants.PageToGiveMetaTag.SpzaOfficeGalleryPage;\n } else {\n page = Constants.PageToGiveMetaTag.SpzaGalleryPage;\n }\n } else if (renderProps.location.pathname === '/' + renderProps.params.locale + routes.marketplaceServices.getPath(null)) {\n page = Constants.PageToGiveMetaTag.SpzaCSGalleryPage;\n } else if (renderProps.params.productId && renderProps.location.pathname.startsWith('/' + renderProps.params.locale + routes.appDetails.getPath({\n productId: renderProps.params.productId,\n entityId: renderProps.params.entityId\n }))) {\n page = Constants.PageToGiveMetaTag.SpzaDetailPage;\n } else if (renderProps.location.pathname.startsWith('/' + renderProps.params.locale + routes.serviceDetail.getPath({\n entityId: renderProps.params.entityId\n }))) {\n page = Constants.PageToGiveMetaTag.SpzaCSDetailPage;\n } else {\n page = Constants.PageToGiveMetaTag.PageNotReady;\n }\n return page;\n}\nexport function formatMetaTags(metaObj) {\n let metaTags = '';\n if (metaObj) {\n for(const key in metaObj){\n if (metaObj[`${key}`] !== '') {\n metaTags += metaObj[`${key}`];\n }\n }\n }\n return metaTags;\n}\nexport function createMetaTags(store, renderProps, page, url) {\n let metaObj;\n if (page === Constants.PageToGiveMetaTag.SpzaHomePage) {\n metaObj = {\n metaDescription: getAppSourceHomeDescriptionTag(),\n metaKeywords: getAppSourceHomeKeywordsTag(),\n metaOGTitle: getAppSourcePageOGTitleTag(),\n metaOGUrl: getOGtag(metaTagConstants.urlName, metaTagConstants.spzaUrl + url),\n metaOGDescription: getAppSourceHomeOGDescriptionTag(),\n metaOGLocale: getOGtag(metaTagConstants.localeName, renderProps.params.locale ? renderProps.params.locale : 'en-us'),\n metaOGSiteName: getAppSourcePageOGSitename()\n };\n } else if (page === Constants.PageToGiveMetaTag.SpzaWordGalleryPage) {\n metaObj = {\n metaDescription: getAppSourceWordDescriptionTag(),\n metaKeywords: getAppSourceWordGalleryKeywordsTag(),\n metaOGTitle: getAppSourcePageOGTitleTag(),\n metaOGUrl: getOGtag(metaTagConstants.urlName, metaTagConstants.spzaUrl + url),\n metaOGDescription: getAppSourceWordGalleryOGDescriptionTag(),\n metaOGLocale: getOGtag(metaTagConstants.localeName, renderProps.params.locale ? renderProps.params.locale : 'en-us'),\n metaOGSiteName: getAppSourcePageOGSitename()\n };\n } else if (page === Constants.PageToGiveMetaTag.SpzaExcelGalleryPage) {\n metaObj = {\n metaDescription: getAppSourceExcelDescriptionTag(),\n metaKeywords: getAppSourceExcelGalleryKeywordsTag(),\n metaOGTitle: getAppSourcePageOGTitleTag(),\n metaOGUrl: getOGtag(metaTagConstants.urlName, metaTagConstants.spzaUrl + url),\n metaOGDescription: getAppSourceExcelGalleryOGDescriptionTag(),\n metaOGLocale: getOGtag(metaTagConstants.localeName, renderProps.params.locale ? renderProps.params.locale : 'en-us'),\n metaOGSiteName: getAppSourcePageOGSitename()\n };\n } else if (page === Constants.PageToGiveMetaTag.SpzaPowerpointGalleryPage) {\n metaObj = {\n metaDescription: getAppSourcePptDescriptionTag(),\n metaKeywords: getAppSourcePptGalleryKeywordsTag(),\n metaOGTitle: getAppSourcePageOGTitleTag(),\n metaOGUrl: getOGtag(metaTagConstants.urlName, metaTagConstants.spzaUrl + url),\n metaOGDescription: getAppSourcePptGalleryOGDescriptionTag(),\n metaOGLocale: getOGtag(metaTagConstants.localeName, renderProps.params.locale ? renderProps.params.locale : 'en-us'),\n metaOGSiteName: getAppSourcePageOGSitename()\n };\n } else if (page === Constants.PageToGiveMetaTag.SpzaOutlookGalleryPage) {\n metaObj = {\n metaDescription: getAppSourceOutlookDescriptionTag(),\n metaKeywords: getAppSourceOutlookGalleryKeywordsTag(),\n metaOGTitle: getAppSourcePageOGTitleTag(),\n metaOGUrl: getOGtag(metaTagConstants.urlName, metaTagConstants.spzaUrl + url),\n metaOGDescription: getAppSourceOutlookGalleryOGDescriptionTag(),\n metaOGLocale: getOGtag(metaTagConstants.localeName, renderProps.params.locale ? renderProps.params.locale : 'en-us'),\n metaOGSiteName: getAppSourcePageOGSitename()\n };\n } else if (page === Constants.PageToGiveMetaTag.SpzaOfficeGalleryPage) {\n metaObj = {\n metaDescription: getAppSourceOfficeDescriptionTag(),\n metaKeywords: getAppSourceOfficeGalleryKeywordsTag(),\n metaOGTitle: getAppSourcePageOGTitleTag(),\n metaOGUrl: getOGtag(metaTagConstants.urlName, metaTagConstants.spzaUrl + url),\n metaOGDescription: getAppSourceOfficeGalleryOGDescriptionTag(),\n metaOGLocale: getOGtag(metaTagConstants.localeName, renderProps.params.locale ? renderProps.params.locale : 'en-us'),\n metaOGSiteName: getAppSourcePageOGSitename()\n };\n } else if (page === Constants.PageToGiveMetaTag.SpzaGalleryPage) {\n metaObj = {\n metaDescription: getAppSourceHomeDescriptionTag(),\n metaKeywords: getAppSourceGalleryKeywordsTag(),\n metaOGTitle: getAppSourcePageOGTitleTag(),\n metaOGUrl: getOGtag(metaTagConstants.urlName, metaTagConstants.spzaUrl + url),\n metaOGDescription: getAppSourceGalleryOGDescriptionTag(),\n metaOGLocale: getOGtag(metaTagConstants.localeName, renderProps.params.locale ? renderProps.params.locale : 'en-us'),\n metaOGSiteName: getAppSourcePageOGSitename()\n };\n } else if (page === Constants.PageToGiveMetaTag.SpzaCSGalleryPage) {\n metaObj = {\n metaDescription: getAppSourceCSGalleryDescriptionTag(),\n metaKeywords: getAppSourceCSGalleryKeywordsTag(),\n metaOGTitle: getAppSourceCSGalleryOGTitleTag(),\n metaOGUrl: getOGtag(metaTagConstants.urlName, metaTagConstants.spzaUrl + url),\n metaOGDescription: getAppSourceCSGalleryOGDescriptionTag(),\n metaOGLocale: getOGtag(metaTagConstants.localeName, renderProps.params.locale ? renderProps.params.locale : 'en-us'),\n metaOGSiteName: getAppSourcePageOGSitename()\n };\n } else if (page === Constants.PageToGiveMetaTag.SpzaDetailPage) {\n const app = store.getState().apps.dataList.find((app)=>{\n var _app_entityId, _renderProps_params_entityId, _renderProps_params;\n return (app === null || app === void 0 ? void 0 : (_app_entityId = app.entityId) === null || _app_entityId === void 0 ? void 0 : _app_entityId.toLowerCase()) === (renderProps === null || renderProps === void 0 ? void 0 : (_renderProps_params = renderProps.params) === null || _renderProps_params === void 0 ? void 0 : (_renderProps_params_entityId = _renderProps_params.entityId) === null || _renderProps_params_entityId === void 0 ? void 0 : _renderProps_params_entityId.toLowerCase());\n });\n if (app) {\n let keywords = '';\n if (app.detailInformation && app.detailInformation.Keywords && app.detailInformation.Keywords.length > 0) {\n for(let i = 0; i < app.detailInformation.Keywords.length; i++){\n if (i !== 0) {\n keywords += ', ';\n }\n keywords += app.detailInformation.Keywords[`${i}`];\n }\n }\n let videoUrl = '';\n if (app.detailInformation && app.detailInformation.DemoVideos && app.detailInformation.DemoVideos.length > 0) {\n videoUrl = app.detailInformation.DemoVideos[0].VideoLink;\n }\n metaObj = {\n metaDescription: getMetaTag(metaTagConstants.desName, app.shortDescription),\n metaKeywords: getMetaTag(metaTagConstants.keywordsName, keywords),\n metaOGTitle: getOGtag(metaTagConstants.titleName, app.title),\n metaOGUrl: getOGtag(metaTagConstants.urlName, metaTagConstants.spzaUrl + url),\n metaOGImage: getOGtag(metaTagConstants.imageName, app.iconURL),\n metaOGDescription: getOGtag(metaTagConstants.desName, app.shortDescription),\n metaOGLocale: getOGtag(metaTagConstants.localeName, renderProps.params.locale ? renderProps.params.locale : 'en-us'),\n metaOGSiteName: getOGtag(metaTagConstants.sitenameName, app.title),\n metaOGVideo: getOGtag(metaTagConstants.videoName, videoUrl),\n metaTwitterCard: getMetaTag(metaTagConstants.twitterCard, metaTagConstants.twitterCardValue),\n metaTwitterSite: getMetaTag(metaTagConstants.twitterSite, metaTagConstants.twitterSiteValue),\n metaTwitterTitle: getMetaTag(metaTagConstants.twitterTitle, app.title),\n metaTwitterDescription: getMetaTag(metaTagConstants.twitterDes, app.shortDescription),\n metaTwitterImage: getMetaTag(metaTagConstants.twitterImage, app.iconURL)\n };\n }\n } else if (page === Constants.PageToGiveMetaTag.SpzaCSDetailPage) {\n const csApp = store.getState().services.dataList.find((app)=>{\n var _app_entityId, _renderProps_params_entityId, _renderProps_params;\n return (app === null || app === void 0 ? void 0 : (_app_entityId = app.entityId) === null || _app_entityId === void 0 ? void 0 : _app_entityId.toLowerCase()) === (renderProps === null || renderProps === void 0 ? void 0 : (_renderProps_params = renderProps.params) === null || _renderProps_params === void 0 ? void 0 : (_renderProps_params_entityId = _renderProps_params.entityId) === null || _renderProps_params_entityId === void 0 ? void 0 : _renderProps_params_entityId.toLowerCase());\n });\n if (csApp) {\n var _csApp_extraData, _csApp_extraData1, _csApp_extraData2;\n let videoUrl = '';\n if (csApp.detailInformation && csApp.detailInformation.DemoVideos && csApp.detailInformation.DemoVideos.length > 0) {\n videoUrl = csApp.detailInformation.DemoVideos[0].VideoLink;\n }\n metaObj = {\n metaDescription: getMetaTag(metaTagConstants.desName, (_csApp_extraData = csApp.extraData) === null || _csApp_extraData === void 0 ? void 0 : _csApp_extraData.shortDescription),\n metaKeywords: getMetaTag(metaTagConstants.keywordsName, csApp.title + ', consulting service'),\n metaOGTitle: getOGtag(metaTagConstants.titleName, csApp.title),\n metaOGUrl: getOGtag(metaTagConstants.urlName, metaTagConstants.spzaUrl + url),\n metaOGImage: getOGtag(metaTagConstants.imageName, csApp.detailInformation.LargeIconUri),\n metaOGDescription: getOGtag(metaTagConstants.desName, (_csApp_extraData1 = csApp.extraData) === null || _csApp_extraData1 === void 0 ? void 0 : _csApp_extraData1.shortDescription),\n metaOGLocale: getOGtag(metaTagConstants.localeName, renderProps.params.locale ? renderProps.params.locale : 'en-us'),\n metaOGSiteName: getOGtag(metaTagConstants.sitenameName, csApp.title),\n metaOGVideo: getOGtag(metaTagConstants.videoName, videoUrl),\n metaTwitterCard: getMetaTag(metaTagConstants.twitterCard, metaTagConstants.twitterCardValue),\n metaTwitterSite: getMetaTag(metaTagConstants.twitterSite, metaTagConstants.twitterSiteValue),\n metaTwitterTitle: getMetaTag(metaTagConstants.twitterTitle, csApp.title),\n metaTwitterDescription: getMetaTag(metaTagConstants.twitterDes, (_csApp_extraData2 = csApp.extraData) === null || _csApp_extraData2 === void 0 ? void 0 : _csApp_extraData2.shortDescription),\n metaTwitterImage: getMetaTag(metaTagConstants.twitterImage, csApp.detailInformation.LargeIconUri)\n };\n }\n }\n return metaObj;\n}\nexport var metaTagConstants;\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _object_spread_props(target, source) {\n source = source != null ? source : {};\n if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nexport const serviceOffersSupportedUSStates = [\n {\n code: 'ALL',\n name: 'All States'\n },\n {\n code: 'AL',\n name: 'Alabama'\n },\n {\n code: 'AK',\n name: 'Alaska'\n },\n {\n code: 'AZ',\n name: 'Arizona'\n },\n {\n code: 'AR',\n name: 'Arkansas'\n },\n {\n code: 'CA',\n name: 'California'\n },\n {\n code: 'CO',\n name: 'Colorado'\n },\n {\n code: 'CT',\n name: 'Connecticut'\n },\n {\n code: 'DC',\n name: 'District of Columbia'\n },\n {\n code: 'DE',\n name: 'Delaware'\n },\n {\n code: 'FL',\n name: 'Florida'\n },\n {\n code: 'GA',\n name: 'Georgia'\n },\n {\n code: 'HI',\n name: 'Hawaii'\n },\n {\n code: 'IA',\n name: 'Iowa'\n },\n {\n code: 'ID',\n name: 'Idaho'\n },\n {\n code: 'IL',\n name: 'Illinois'\n },\n {\n code: 'IN',\n name: 'Indiana'\n },\n {\n code: 'KS',\n name: 'Kansas'\n },\n {\n code: 'KY',\n name: 'Kentucky'\n },\n {\n code: 'LA',\n name: 'Louisiana'\n },\n {\n code: 'ME',\n name: 'Maine'\n },\n {\n code: 'MD',\n name: 'Maryland'\n },\n {\n code: 'MA',\n name: 'Massachusetts'\n },\n {\n code: 'MI',\n name: 'Michigan'\n },\n {\n code: 'MN',\n name: 'Minnesota'\n },\n {\n code: 'MS',\n name: 'Mississippi'\n },\n {\n code: 'MO',\n name: 'Missouri'\n },\n {\n code: 'MT',\n name: 'Montana'\n },\n {\n code: 'NE',\n name: 'Nebraska'\n },\n {\n code: 'NV',\n name: 'Nevada'\n },\n {\n code: 'NH',\n name: 'New Hampshire'\n },\n {\n code: 'NJ',\n name: 'New Jersey'\n },\n {\n code: 'NM',\n name: 'New Mexico'\n },\n {\n code: 'NY',\n name: 'New York'\n },\n {\n code: 'NC',\n name: 'North Carolina'\n },\n {\n code: 'ND',\n name: 'North Dakota'\n },\n {\n code: 'OH',\n name: 'Ohio'\n },\n {\n code: 'OK',\n name: 'Oklahoma'\n },\n {\n code: 'OR',\n name: 'Oregon'\n },\n {\n code: 'PA',\n name: 'Pennsylvania'\n },\n {\n code: 'RI',\n name: 'Rhode Island'\n },\n {\n code: 'SC',\n name: 'South Carolina'\n },\n {\n code: 'SD',\n name: 'South Dakota'\n },\n {\n code: 'TN',\n name: 'Tennessee'\n },\n {\n code: 'TX',\n name: 'Texas'\n },\n {\n code: 'UT',\n name: 'Utah'\n },\n {\n code: 'VT',\n name: 'Vermont'\n },\n {\n code: 'VA',\n name: 'Virginia'\n },\n {\n code: 'WA',\n name: 'Washington'\n },\n {\n code: 'WV',\n name: 'West Virginia'\n },\n {\n code: 'WI',\n name: 'Wisconsin'\n },\n {\n code: 'WY',\n name: 'Wyoming'\n }\n];\nexport const serviceOffersSupportedCAStates = [\n {\n code: 'ALL',\n name: 'All States'\n },\n {\n code: 'AB',\n name: 'Alberta'\n },\n {\n code: 'BC',\n name: 'British Columbia'\n },\n {\n code: 'MB',\n name: 'Manitoba'\n },\n {\n code: 'NB',\n name: 'New Brunswick'\n },\n {\n code: 'NL',\n name: 'Newfoundland and Labrador'\n },\n {\n code: 'NS',\n name: 'Nova Scotia'\n },\n {\n code: 'ON',\n name: 'Ontario'\n },\n {\n code: 'PE',\n name: 'Prince Edward Island'\n },\n {\n code: 'QC',\n name: 'Quebec'\n },\n {\n code: 'SK',\n name: 'Saskatchewan'\n },\n {\n code: 'NT',\n name: 'Northwest Territories'\n },\n {\n code: 'NU',\n name: 'Nunavut'\n },\n {\n code: 'YT',\n name: 'Yukon'\n }\n];\nexport const serviceOffersSupportedStatesCodes = [\n ...serviceOffersSupportedUSStates,\n ...serviceOffersSupportedCAStates\n].reduce((acc, { code })=>_object_spread_props(_object_spread({}, acc), {\n [code.toUpperCase()]: true\n }), {});\n","import { jsx as _jsx } from \"react/jsx-runtime\";\nimport React from 'react';\nimport { TooltipHost } from '@fluentui/react';\nexport function getTooltipSilentLogIn(element, isLoadingUserData) {\n const hostStyles = {\n root: {\n display: 'inline-block'\n }\n };\n const calloutProps = {\n gapSpace: 0,\n hidden: !isLoadingUserData\n };\n return /*#__PURE__*/ _jsx(TooltipHost, {\n styles: hostStyles,\n calloutProps: calloutProps,\n content: \"Just a moment, logging you in...\",\n children: element\n });\n}\n","import { Constants } from './constants';\n/**\n * get trimmed words speparated by delimiter from string\n *\n * @param text input text\n * @param delimiter text delimiter for text split\n */ export function getTrimmedWords(text, delimiter = ' ') {\n if (!text) {\n return [];\n }\n return text// split\n .split(delimiter)// trim words\n .map((word)=>getTrimmedString(word))// filter out empty words\n .filter((word)=>!!word);\n}\n/**\n * check whether the string is empty, or consists of spaces only, or 'null', or 'undefined', or null, or undefined, case insensitive\n *\n * @param text input text\n * @returns true if input string is null, undefined, '', ' ', 'null', 'undefined'\n */ export function isEmptyNullorUndefinedString(text) {\n if (!text) {\n return true;\n }\n const lowerCaseText = text.toLowerCase().trim();\n return lowerCaseText === Constants.TypeOf.undefinedName || lowerCaseText === Constants.TypeOf.nullName || lowerCaseText === '';\n}\n/**\n * process and return the string with word break enabled\n * @param text raw text input\n */ export function getWorkBreakEnabledString(text) {\n if (text) {\n return text.replace(/\\u00a0| |\\s/g, ' ');\n }\n return '';\n}\n/**\n * get trimmed string\n * @param text input text\n */ export function getTrimmedString(text) {\n if (text) {\n return text.trim();\n }\n return '';\n}\nexport function getCapitalizedString(text) {\n const trimmedText = getTrimmedString(text);\n const capitalizedString = trimmedText.charAt(0).toUpperCase() + trimmedText.slice(1);\n return capitalizedString;\n}\nexport function getStringWithoutSpecialCharacters(text, regexToFilterOutSpecialCharacters) {\n const trimmedText = getTrimmedString(text);\n const outputText = trimmedText.split(regexToFilterOutSpecialCharacters).join('');\n return outputText;\n}\n","import { getWindow } from '@shared/services/window';\nimport { Constants } from '@shared/utils/constants';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\n/**\n * log telemetry\n *\n * @param action action on nomination form\n * @param actionModifier action modifier on nomintaion form\n * @param details action details on nomintation form\n */ export const logTelemetry = (action, actionModifier, details = undefined, isFeedback = false)=>{\n const pageUrl = getWindow() && getWindow().location && getWindow().location.href || Constants.TypeOf.undefinedName;\n const payload = {\n page: pageUrl,\n action,\n actionModifier,\n isFeedback,\n details\n };\n SpzaInstrumentService.getProvider().probe(Constants.Telemetry.ProbeName.LogInfo, payload);\n};\n","import { getWindow } from './../services/window';\nimport { getTrimmedString } from './stringUtils';\n/**\n * get query from window.location.search\n *\n * @param search: window.location.search e.g. ?product=dynamics-365%3Bsearch=hmmm\n */ export function getQueryFromWindowLocationSearch(search) {\n if (!search || !search.trim()) {\n return {};\n }\n const queryArray = search.replace(/\\?/g, ' ').replace(/\\&/g, ' ').replace(/%3B/g, ';').split(' ').map((querySegment)=>querySegment.trim()).filter((querySegment)=>!!querySegment);\n const query = {};\n queryArray.forEach((querySegment)=>{\n const querySegmentKeyValuePair = querySegment.split('=');\n if (querySegmentKeyValuePair.length === 2) {\n query[querySegmentKeyValuePair[0]] = querySegmentKeyValuePair[1];\n }\n });\n return query;\n}\nexport function getQueryFromBrowserUrl() {\n const location = getLocationFromBrowserUrl();\n const search = location && location.search || '';\n return getQueryFromWindowLocationSearch(search);\n}\nexport function getPathnameFromBrowserUrl() {\n const location = getLocationFromBrowserUrl();\n return location && location.pathname || '';\n}\nexport function getOriginFromBrowserUrl() {\n const location = getLocationFromBrowserUrl();\n return location && location.origin || '';\n}\nexport function getHostFromBrowserUrl() {\n const location = getLocationFromBrowserUrl();\n return location && location.host || '';\n}\nexport function getProtocolFromBrowserUrl() {\n const location = getLocationFromBrowserUrl();\n return location && location.protocol || '';\n}\nexport function getLocationFromBrowserUrl() {\n return getWindow() && getWindow().location;\n}\nexport function getLocationFromString(href) {\n const regex = new RegExp([\n // protocol\n '^(https?:)//',\n // host (hostname and port)\n '(([^:/?#]*)(?::([0-9]+))?)',\n // pathname\n '(/{0,1}[^?#]*)',\n // search\n '(\\\\?[^#]*|)',\n // hash\n '(#.*|)$'\n ].join(''));\n const match = href.match(regex);\n if (!match) {\n return {\n href: href,\n origin: '',\n protocol: '',\n host: '',\n hostname: '',\n port: '',\n pathname: '',\n search: '',\n hash: '',\n assign: ()=>{},\n reload: ()=>{},\n replace: ()=>{},\n toString: ()=>href,\n ancestorOrigins: null\n };\n }\n return {\n href: href,\n origin: `${match[1]}//${match[2]}`,\n protocol: match[1],\n host: match[2],\n hostname: match[3],\n port: match[4],\n pathname: match[5],\n search: match[6],\n hash: match[7],\n assign: ()=>{},\n reload: ()=>{},\n replace: ()=>{},\n toString: ()=>href,\n ancestorOrigins: null\n };\n}\n/**\n * get pathname from a partial url string\n * @param href well-formed input href could be origin + pathname, host + pathname, pathname\n * Note: when input is pathname only, to conform to well-formed, it must start with character '/'\n */ export function getPathnameFromStringUrl(href) {\n const trimmedHref = getTrimmedString(href);\n const protocolRegExp = new RegExp('^https?://');\n const originRegExp = new RegExp('^https?://([^:/?#]*)(?::([0-9]+))?');\n // complete href origin if not complete\n let completeHref = '';\n // check first if input has complete origin (protocol + host)\n if (!trimmedHref.match(originRegExp)) {\n // preprend with protocol first\n completeHref = `${getProtocolFromBrowserUrl()}//${trimmedHref}`;\n // if match still fails, means input doesn't have origin at all\n // prepend with origin\n if (!completeHref.match(protocolRegExp)) {\n completeHref = `${getOriginFromBrowserUrl()}${trimmedHref}`;\n }\n }\n return getLocationFromString(completeHref).pathname;\n}\n","import { Constants } from '@shared/utils/constants';\n// dedicated utils, one for spza, one for mac\nexport function getUserFavouriteEntityServiceType() {\n return Constants.UserFavourite.ApplicationTypes.ITConsultingServices;\n}\nexport function getUserFavouriteEntityAppType() {\n return Constants.UserFavourite.ApplicationTypes.ITApplications;\n}\n","function _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _object_spread(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n _define_property(target, key, source[key]);\n });\n }\n return target;\n}\nimport { Constants } from '@shared/utils/constants';\nimport { routes } from '@shared/routerHistory';\nimport { getUserFavouriteEntityServiceType, getUserFavouriteEntityAppType } from '@shared/utils/userFavouriteDedicatedUtils';\n// general utils\nexport function isApplication(applicationType) {\n return applicationType === getUserFavouriteEntityAppType();\n}\nexport function isConsultingService(applicationType) {\n return applicationType === getUserFavouriteEntityServiceType();\n}\nexport function getFavouriteEntityState(favourites, applicationType) {\n return favourites.map((favourite)=>{\n return {\n entityGuid: favourite.id,\n applicationId: favourite.applicationId,\n planId: favourite.planId,\n applicationType: applicationType,\n item: favourite.item\n };\n });\n}\n// redux store related\n// upsert, either add, or update, a favourite based on entityId\nexport function upsertsUserFavouriteEntityState(entityList, payload) {\n const newEntity = {\n entityGuid: payload.id,\n applicationId: payload.applicationId,\n planId: payload.planId,\n item: payload.item,\n applicationType: payload.applicationType\n };\n // find update first\n const shouldUpdate = entityList.some((entity, index)=>{\n const foundMatch = entity.entityGuid === payload.id;\n if (foundMatch) {\n entityList[`${index}`] = newEntity;\n }\n return foundMatch;\n });\n if (shouldUpdate) {\n return;\n }\n // if it's not an update, it's an add\n entityList.push(newEntity);\n}\n// delete a favourite based on entityId\nexport function deleteUserFavouriteEntityState(entityList, payload) {\n let indexToDelete = -1;\n entityList.some((entity, index)=>{\n const foundMatch = entity.entityGuid === payload.entityGuid;\n if (foundMatch) {\n indexToDelete = index;\n }\n return foundMatch;\n });\n const numberOfEntityToDelete = indexToDelete === -1 ? 0 : 1;\n entityList.splice(indexToDelete, numberOfEntityToDelete);\n}\n// component related utils\nexport function getAllUserFavouriteCount(userFavourite) {\n const userFavouriteCount = userFavourite.fetchDataStatus === Constants.UserFavourite.FetchDataStatus.Valid ? userFavourite.apps.length + userFavourite.services.length : 0;\n return userFavouriteCount;\n}\nexport function getUserFavouriteAppCount(userFavourite) {\n const userFavouriteCount = userFavourite.fetchDataStatus === Constants.UserFavourite.FetchDataStatus.Valid ? userFavourite.apps.length : 0;\n return userFavouriteCount;\n}\nexport function getUserFavouriteServiceCount(userFavourite) {\n const userFavouriteCount = userFavourite.fetchDataStatus === Constants.UserFavourite.FetchDataStatus.Valid ? userFavourite.services.length : 0;\n return userFavouriteCount;\n}\nexport function getUserFavouriteDetailPageRedirectUrl(buildHref) {\n return buildHref(routes.userFavouriteDetail, null, {\n category: null,\n industry: null,\n product: null,\n search: null,\n serviceType: null\n });\n}\nexport function getUserFavouriteEntity(userFavourite, entityId) {\n let userFavouriteEntity;\n const hasFoundEntity = userFavourite.apps.some((app)=>{\n const hasFound = app.applicationId === entityId;\n if (hasFound) {\n userFavouriteEntity = _object_spread({}, app);\n }\n return hasFound;\n });\n if (hasFoundEntity) {\n return userFavouriteEntity;\n }\n userFavourite.services.some((service)=>{\n const hasFound = service.applicationId === entityId;\n if (hasFound) {\n userFavouriteEntity = _object_spread({}, service);\n }\n return hasFound;\n });\n return userFavouriteEntity;\n}\nexport function getUserFavouriteViewEntityList(userFavouriteEntityList) {\n if (!userFavouriteEntityList) {\n return [];\n }\n return userFavouriteEntityList.map((userFavouriteEntity)=>userFavouriteEntity.item);\n}\n","import { Constants } from '@shared/utils/constants';\nimport { addClassToElement, getElement, removeClassToFirstMatchedElement } from '@shared/utils/appUtils';\nexport function shouldHideUserFavouriteNavBarButton(currentView) {\n return false;\n}\nfunction geQueryByDropdownItemClassName(className, isActive) {\n const activeClassNameSuffix = isActive ? `.${Constants.UserComponent.activeClassName}` : '';\n const queryToPrevActiveItem = `.${Constants.UserComponent.dropdownActiveOptionContainerClassName} ` + `.${className}${activeClassNameSuffix}`;\n return queryToPrevActiveItem;\n}\nexport function getActiveItemIndexOfUserMobileDropdown() {\n let activeIndex = -1;\n Constants.UserComponent.dropdownItemClassNameArray.some((className, arrayIndex)=>{\n const query = geQueryByDropdownItemClassName(className, true);\n const match = !!getElement(Constants.SearchBy.QuerySelector, query);\n if (match) {\n activeIndex = arrayIndex;\n }\n return match;\n });\n return activeIndex;\n}\nexport function addActiveClassNameToMobileUserDropdownItem(dropdownItemName, isMobileDropdown) {\n if (!isMobileDropdown) {\n return;\n }\n const newActiveItemIndexClassName = Constants.UserComponent.dropdownItemNameToClassName[`${dropdownItemName}`];\n const newActiveItemIndex = Constants.UserComponent.dropdownItemClassNameArray.indexOf(newActiveItemIndexClassName);\n const prevActiveItemIndex = getActiveItemIndexOfUserMobileDropdown();\n // if active dropdown item has not changed, simply return\n if (newActiveItemIndex === prevActiveItemIndex) {\n return;\n }\n // remove active classname to previous active dropdown item\n if (prevActiveItemIndex >= 0) {\n const queryToPrevActiveItem = geQueryByDropdownItemClassName(Constants.UserComponent.dropdownItemClassNameArray[`${prevActiveItemIndex}`], true);\n removeClassToFirstMatchedElement(Constants.SearchBy.QuerySelector, queryToPrevActiveItem, Constants.UserComponent.activeClassName);\n }\n // set active classname to new active dropdown item\n const newActiveItemClassName = Constants.UserComponent.dropdownItemClassNameArray[`${newActiveItemIndex}`];\n const queryToNewActiveItem = geQueryByDropdownItemClassName(newActiveItemClassName, false);\n addClassToElement(Constants.SearchBy.QuerySelector, queryToNewActiveItem, Constants.UserComponent.activeClassName);\n}\nexport const isMaccUser = (userInfo)=>{\n const { isMaccTenant, accounts: { isEAAccount } = {} } = userInfo;\n return isMaccTenant || isEAAccount;\n};\n"],"names":["module","deepCopyDataMap","DataMap","newDataMap","k","copy","_define_property","obj","key","value","Object","initialAppReviewsDataState","IFeatureFlags","ff","initialUserFavouriteState","initialDynamicCampaignState","initialSearchState","initialModalState","initialEntityDataState","initialAppDataState","initialCloudsIndustryDataState","initialUserDataState","process","initialConfigState","initialServiceDataState","initialCheckoutState","initialPartnersState","copyState","oldState","newState","contentStyles","HiddenComponentWrapper","className","hide","children","containerClass","RecommendationsRibbon","recommendedItems","title","ribbonKey","selectedCountry","selectedLocale","TileType","item","index","target","source","_object_spread","i","arguments","ownKeys","sym","object","enumerableOnly","keys","symbols","UsefulInfoMetadataCellItemType","_object_spread_props","isUsefulInfoMetadataCellItemFilter","isUsefulInfoMetadataCellItemInternalLink","isUsefulInfoMetadataCellItemLink","isUsefulInfoMetadataCellItemModal","UsefulInfo","filter","e","window","col","cell","Boolean","args","pbTelemetry","GenerateLabelAndTooltip","context","getBillingFrequencyOptions","billingCountryCode","items","futurePriceMonthly","futurePriceYearly","locale","product","id","termDuration","hasFreeTrial","termsByBillingTermDuration","availability","plan","actions","term","termEntity","option","defaultRender","getDefaultOrSelectedBillingFrequency","options","_items_","_items_1","availableTermFrequencies","defaultBillingFrequency","BillingFrequencyChoiceGroup","props","setSelectedTerm","termId","text","_","BillingTermChoiceGroup","setBillingTerm","planId","handleBillingTermChanges","firstTerm","generateBillingOption","getTermMapping","getBillingOptions","listOfTerms","billingOptionsMap","classes","SaasPricingTable","config","app","billingCountry","onGetInNowClicked","shouldBlockPrices","_globalThis_document","isHorizontalScrollbarPresent","setIsHorizontalScrollbarPresent","containerRef","futurePrices","bodyElement","globalThis","isDocumentScrollableVertically","OrderLoadingStyles","OrderLoading","progressMessages","progressMessage","setProgressMessage","percentComplete","setPercentComplete","setInterval","intervalIncrement","Math","clearInterval","spinnerStyles","BusyLoader","MSuserErrorBanner","tenantId","Negative","Positive","getAriaLabel","isFeedbackNull","isFeedbackPositive","feedbackNoun","selectionCondition","feedbackText","sendFeedback","isPositive","requestId","showingResultsFor","didYouMean","previousSearchText","details","JSON","likeIconName","dislikeIconName","ThumbsUpDown","localizedQuestion","feedbackButtons","feedbackButtonsSelected","defaultCursor","pointerCursor","setFeedback","likeAria","dislikeAria","handleFeedbackClick","detectKeyboardClick","positiveIconName","negativeIconName","thumbsUpClass","thumbsDownClass","event","fn","_ref","asyncGeneratorStep","gen","resolve","reject","_next","_throw","arg","info","error","Promise","Checkout","LegacyCheckoutHydration","checkoutDOMRef","contextValue","isHydrated","store","renderCheckout","current","ensureAsyncDataSSR","dispatch","getState","params","entityId","self","err","undefined","PopupType","LongContent","prevState","payload","logger","longContent","ReviewQAContent","QAs","reviewQA","AppReviewItem","authorPersona","appId","reviewItemShown","review","isEmbed","publisher","iconUrl","isSignedIn","isMarkedAsHelpful","onToggleMarkAsHelpful","openSignInModal","fallbackReviewSourceName","dateLabelClassName","_review_review_content","rootDivRef","instrument","showReportAbuseDialog","getFullName","_review_customer_info","result","reviewerName","isThirdPartyReview","rating","max","isReviewEdited","getClassNames","fill","RatingPercentages","numberOfStars","percentagesOfTotal","classNames","fillWidth","chartClasses","getEmptyRatingSummary","renderRatingPercentagesByNumOfStars","numOfStars","timesRated","totalRatings","RatingSummary","ratingSummary","_totalRatingSummary_StarsDistribution","_totalRatingSummary_StarsDistribution1","_totalRatingSummary_StarsDistribution2","_totalRatingSummary_StarsDistribution3","_totalRatingSummary_StarsDistribution4","_totalRatingSummary_StarsDistribution_FiveStars","_totalRatingSummary_StarsDistribution_FourStars","_totalRatingSummary_StarsDistribution_ThreeStars","_totalRatingSummary_StarsDistribution_TwoStars","_totalRatingSummary_StarsDistribution_OneStars","totalRatingSummary","averageRating","isNaN","ratingSummaryAriaText","iconStyles","isUserCommentsExist","userCommentedReviewIds","getFilterBySourceCategories","externalReviewsExist","userReviewExists","internalReviewsExist","userCommentsExist","showMyCommentsFilter","filterBySourceCategories","getSourceFilterOptionByLocaliztionText","allSourceOptions","optionsByText","getSortByCategories","getSortByOptionByLocaliztionText","allSortByOptions","getRatingsFilterNumber","getRatingsFilterOptionByRating","handleDropDowns","sourceFilterOption","ratingFilterOption","sortByOption","updateReviewsState","originalReviewList","curReviewsList","sourceFilter","sortBy","ratingFilter","userReview","updatedRatingsFilter","isDropDownChanged","filteredArray","handleRatingsFilter","telemetryDetails","fliteredAndSortedArray","handleSortBy","updatedReviewsList","updateReviewsSortByState","sortByHelper","getSortByStatus","curSortBy","first","second","Date","handleSourceFilter","reviewsList","filterBySource","updatedCurrentEnd","ReviewsDropDowns","curSourceFilter","curRatingFilter","renderSourceFilterDropDown","sourceFilterCategories","activeFilterOption","renderRatingFilterDropDown","ratingsFilterCategories","curRatingFilterOption","renderSortByDropDown","sortByCategories","getDescriptionText","isOfferPurchased","NoReviewsToShow","openReviewModal","ExternalRatingSummary","image","showImage","productName","ExternalRatingSummaries","externalRatingSummaries","rawRatingSummaries","externalRatingSummary","externalSummariesInfo","state","ownProps","getTermsLink","terms","UsesEnterpriseContract","licenseTermsUrl","generateLink","link","UserTerms","detailInformation","privacyPolicyUrl","termsOfUse","privacyPolicy","termsLink","privacyLink","userTermsFallback","consentDisclaimerTokens","AppReviewCollection","ensureAppReviewsData","userInfo","prevProps","loadReviewIdsMarkedAsHelpful","offerId","loadUserProductReviewMetadata","legacyId","deepLinkMode","reviews","returnedReviews","Array","pagination","scrollToReview","start","end","reviewList","appData","reviewsData","markedAsHelpful","userReviewIdsMarkedAsHelpful","listEnd","appReviewItems","isHelpful","toggleMarkAsHelpful","_this_state_currentStart","_this_state_currentEnd","_this_state_reviewList_length","_event_target","idClicked","pageNumberClicked","startArrayIndex","parseInt","currentPageStart","currentPageEnd","reviewListLength","numberOfPages","pageNumberList","pageNumberStart","pageNumberEnd","isActive","internalSummaries","textButton","_this_props_appData","updateStateByFilters","hasInternalReviews","hasExternalReviews","reviewId","reviewCompRef","offsetPosition","elementPosition","stickyCardHeight","mainMenuHeight","_this_props_location_query","_this_props_location","ctaType","curPageNumber","curStart","currentEnd","updatedReviewList","updatedSourceFilter","updatedSortBy","_state_config_query","forceUpdate","accessKey","callback","MultilineColumn","columnKey","columnValue","shouldUseSetInnerHTML","lines","SortedTableColumn","tableProps","spanColumns","setInnerHTMLColumns","multiLineColumns","columnClassName","shouldAddSpanTag","shouldShowMultiLine","SortedTable","_multiLineRowsConfiguration_multilineColumns","inputArray","propertyName","order","multiLineRowsConfiguration","tbody","defaultSortingDisabled","tableData","a","b","titleA","titleB","arg0","arg1","rowRenderingFunction","hasMultilineConfig","row","columns","shouldIgnore","_this_props_ignore","ignoreKey","columnsClasses","multilineConfig","rowData","_rowData_multilineColumns_","multilineColumns","emptyColumnClassName","lastRowClassName","multilineColumnClass","numberOfMultilineRows","rows","rowIndex","isMultilineColumn","x","SortOrderStyles","SortedTH","nextProps","SimplePriceCell","price","futurePrice","SimplePlanPricing","sortColumnName","skus","unit","sku","termPrice","renderBadges","isOneTimePaymentOffer","showPriceColumn","showYearlyPrice","showMonthlyPrice","formattedSkus","_sku_startingPrice","futureSku","futurePriceSku","monthly","yearly","showGeneralPrice","pricing","hasBadges","MicrosoftManagedIndicatorWrapper","_app_licenseManagement","uiRole","isAvailableInRegion","renderIndicator","userIsAdmin","getLocaleLanguage","getLocale","countryCode","localeLanguage","countryCodeRegion","getCountryCodeRegion","numberToLocaleString","number","localeString","LinkedinProductGroupBarFunction","linkedInProductGroup","location","LinkedinProductGroupBar","LinkedinUpcomingEvent","onExternalLinkClick","startTime","endTime","name","logoUrl","eventType","attendeeCount","detailsUrl","startTimeStr","timeToLocalString","timeUTCSeconds","date","endTimeStr","timeToLocalLocaleString","LinkedinFeaturedCustomer","customer","businessCategory","followersCount","subTextStyles","FeatureFeedbackSubmittedModal","hidden","onDismiss","buttonStyles","scoreValues","scoreValuesMiniLine1","scoreValuesMiniLine2","FeatureFeedbackScoreSection","viewContent","score","onScoreChange","_getWindow","miniMode","ratingValue","FeatureFeedbackTitleSection","onDialogDismissed","FeatureFeedbackChecksSection","checks","setCheckChange","_viewContent_checks","featureCheckDef","element","checked","FeatureFeedbackInputSection","userComment","setUserComment","ev","newValue","FeatureFeedbackEmailSection","email","emailConsent","setEmailConsent","FeatureFeedbackFooterSection","onSubmitClick","submitDisabled","FeatureFeedback","featureName","onFeedbackSubmitted","setScore","setChecks","featureCheck","getEmail","userFeedbackContent","POPUP_DISPLAYED","popups","Map","getTotalDisplayCount","popupType","storageDisplayCount","didPopupExceededMaxCount","displayLogic","FeaturedCustomersList","offerName","_linkedInProductGroup_featuredCustomers","customerElements","UpcomingEventsList","_linkedInProductGroup_upcomingEvents","FeedbackSection","onFeedbackClick","LinkedinProductGroupFunction","userEmail","feedbackScoreRequired","parentTabQuery","feedbackMode","setFeedbackMode","teachingBubbleMode","setTeachingBubbleMode","feedbackSentMode","setFeedbackSentMode","featureFeedbackContent","logTelemetry","action","actionModifier","shouldDisplayPopup","popupDisplayed","updatedTotalDisplayCount","primaryButtonProps","secondaryButtonProps","LinkedinProductGroup","ImageStyles","badgeProps","freeTrial","Badge","handleBadgeClick","contentName","badge","locTitle","pageAction","useTelemetry","BI_AREA","AppDetails","filterItem","filterTileTypes","filteritems","_DataMap_products__match","_DataMap_products_","currentDatamapBlock","pathParams","newPath","property","mask","isPrivate","arm","loadLinkedInProductGroup","_this_props_userInfo","_this_props_app","curWindow","seeAllUrl","noResults","_getWindow_location","appInfo","currentView","doesTenantHasLicenseForApp","nationalCloud","isEmbedded","appName","ctaTypes","linkedAddIns","linkedSaaS","list","res","existAward","v","j","awardKeys","award","hideBreadcrumbUrl","href","locKey","linksList","iconUri","iconBackgroundColor","setCheckoutSourcePDP","linkTitle","indicatorText","indicatorClasses","iconName","iconClasses","indicator","awards","_app_startingPrice","_app_pricingInformation","length","dataBiId","productId","isSaaSRendering","headerString","addIn","information","headerContent","itemPropName","microTaggingItemPropName","locString","tabTitle","productString","productData","startingPrice","isDetailed","pricingElement","isOneTimePayment","pricingLinkClassName","ButtonLink","primaryProduct","products","shouldRenderAADWorkAccountMetaData","filterElements","_this_props_app_pricingInformation_skus","_this_props_app_pricingInformation","suggestedItems","offerType","shortDescription","tags","autoRunLaunchEvents","userSignedIn","tabsChilds","pricingInformation","futurePricesInformation","licenseManagement","oneTimePaymentOffer","usefulInformaionCells","supportCells","moreLinksCells","powerBIVisualCells","metadata","pricingObject","AADWorkAccount","primaryProductFilter","categories","industries","worksWith","supportitems","cells","documents","documentsCells","doc","tabsProps","_this_stickyCardRef_current","_this_stickyCardRef","isPageScrolled","tabChild","offer","filterType","urlKey","longTitle","_state_users_profile","_state_apps_relatedAppsItems_items","_state_apps_relatedAppsItems","_state_apps_relatedAppsItems_items1","_state_apps_relatedAppsItems1","_state_apps_relatedAppsItems_items2","_state_apps_relatedAppsItems2","_state_apps_relatedAppsItems_items_saasLinkingItems","_state_apps_relatedAppsItems_items_linkedAddIns","stateBreadcrumbUrl","correlationId","currentGalleryViewIsCurated","featureFlags","openInNewWindowButton","appList","hashMap","query","appIndex","targetApp","managedLicenses","defaultTab","breadcrumbUrl","Capabilities","AutoRuns","Overview","images","videos","mediaImages","video","mediaRender","isVideo","capabilitiesPane","capability","subCapabilities","subCapabilitiesCount","autorunsPane","autorun","autorunInfo","jsllMediaType","document","selected","_this_props_autoRunLaunchEvents","_this_props_autoRunLaunchEvents1","_crossListings_","crossListings","localizationTexts","ribbonUrl","ribbonSeeAllText","ribbonTitleParam","localizedTitleKey","appDetailContentMaxWidthClasses","tiles","tileType","ctaButtonsClassNames","ServiceDetails","regions","regionLists","columnSize","listValue","region","moreCountries","countriesLists","moreCountryVal","foundCountry","supportedCountry","countryParams","colIndex","closeMoreCountriesModal","moreCountry","serviceDetailHref","countryAndRegion","countryName","regionColumns","columnRegions","regionsAddedToView","regionList","countries","countryCodeLowerCase","country","errorMessage","moreCountriesLists","moreCountriesColumns","columnMoreCountries","countryLists","extraMoreCountries","itemRender","filterTileType","filterValue","filterValueAllowed","routeParams","serviceInfo","isNationalCloud","serviceId","_document_getElementsByTagName","label","_service_extraData","_this_props_service_extraData","_this_props_service","service","isProfessionalService","pricingValue","isLoadingUserData","button","detailUrl","competencyType","_this_props_service_industriesDetails","contextCountryAndRegion","allCountryAndRegions","goldCompetencies","goldCompetency","silverCompetencies","silverCompetency","serviceTypes","serviceType","_service_industriesDetails","industryDetail","mapStateToProps","services","serviceIndex","targetService","offerIsProfessionalService","mapDispatchToProps","prevTileDataRequest","KNOWN_HYDRATION_INTERRUPTION_ERRORS","predefinedPLT","currentSinceRequestStart","_getWindow_performance","_getWindow_performance1","_getWindow1","navigationStart","requestStart","whiteListedAssets","TileDataLoadingAction","createTileDataLoadingAction","TileDataReceivedAction","createTileDataReceivedAction","SetQueryAction","createSetQueryAction","SetRequestFilteredQueryAction","createSetRequestFilteredQueryAction","SetResponseFilteredQueryAction","createSetResponseFilteredQueryAction","SetRequestFilteredEntityTypeAction","createSetRequestFilteredEntityTypeAction","SetRequestFilteredLoadingAction","createSetRequestFilteredLoadingAction","SetRequestFilteredLoadedAction","createSetRequestFilteredLoadedAction","loadTileData","_getProductByUrlKey","_prevTileDataRequest_request","currentEntityType","currentFilteredQuery","prevEntityType","prevFilteredQuery","urlQuery","requestParams","tileData","generateTileDataLog","duration","_tileData_apps_dataList_","styles","withSuspense","Component","appDetails","dynamicCampaign","handleSignUp","_handleSignUp","redirectUrl","encodeURIComponent","getRedirectStartPage","to","redirectStartPage","URL","authClient","SignInModal","modalType","inputEmail","Error","reviewAppId","param","isMultiParam","queryParam","pageURL","_this","signInRedirectUrl","signInModalType","decodeURIComponent","signUpUrl","form","emailField","disableDismissModal","subTitle","disclaimer","accountType","modalContent","ariaLabel","MediaModal","exclude","keysLength","videoUrl","parsedUrl","hostName","pathName","youtubeConfigs","sourceUrl","pathValues","vimeoConfigs","matches","vimeoId","supplier","videoRef","parsedVideo","VideoModal","videoDialogClasses","DriveModal","FieldHubModal","reportName","defaultFieldObj","fieldObj","handOffUrl","reportData","groupId","reportId","embedUrl","token","sectionId","reportContainer","connect","ErrorModal","fallback","translated","AnimationModal","DisclaimerModal","NpsModal","ratingNumber","npsResult","evt","paneContent","arr","emailInputClasses","InstructionsModalStep","step","imageSrc","InstructionsModalBody","stepsMap","cancelIcon","InstructionsModal","isFromDownload","dismissModal","isModalOpen","hideModal","isChecked","setIsChecked","closeModal","_getNpsModule","dialogContentStyles","DownloadSampleModal","buildStore","combinedReducers","initialState","middleware","preserveData","oldEntity","newEntity","dataList","data","isServiceDataState","commonEntityDataReducer","entityType","_state_dataMap","_action_payload_entityDetails_detailInformation","_action_payload_entityDetails","dataMap","results","entity","favouriteItems","favouriteItem","currentEntityDetail","len","indexInOldState","isSelectedCountryValidDataMap","_dataMap_serviceGlobalFilter1_country","_dataMap_serviceGlobalFilter1","countryKey","AzureEnvironmentSettings","prevMarkAsHelpful","newData","newDataList","newCuratedDataLoadedState","buildFullSearchData","ids","sourceData","identifier","tempArray","cutoff","findItem","appIdsToIgnore","parsePBIApp","iconURL","largeIcon","mainIndex","img","industryNumbers","industry","industryMap","friendlyURL","nameStart","productMask","parsePBIApps","appid","pbiCategory","convertPartnerDocument","d","convertPartnerImage","convertPartnerVideo","attemptMap","f","parsePartnerApp","builtFor","productInfo","parsePartnerApps","embedHost","_object_without_properties","excluded","_object_without_properties_loose","sourceKeys","sourceSymbolKeys","_to_property_key","_to_primitive","input","hint","_type_of","prim","Symbol","TypeError","String","Number","newCartActions","isSelectedCountryValid","countriesList","appSearchResults","servicesSearchResults","cloudsIndustrySearchResults","appsCount","servicesCount","cloudsIndustryCount","videoPayload","drivePayload","iframePayload","reviewPayload","instructionsPayload","_action_payload_pricingPayload","_action_payload","newCommonState","_app_entityId","_action_payload_entityId","updatedLinkedAddIns","updatedSaasLinkingItems","updatedSuggestedItems","updatedDataList","pricingData","aTitle","bTitle","currentData","appReviewsData","prevReviewCommentsState","newReviewCommentsState","c","_newState_appReviewsData_reviewComments","_action_payload_reviewId","removedCommentData","isNewlyAddedComment","actionResult","updatedComment","commentId","reviewIdx","r","prevCommentIds","prevCommentsById","totalComments","reviewCommentsState","reviewIds","prevReviewIds","isLoading","prevMarkedAsHelpfulState","prevLoadingIds","_prevMarkedAsHelpfulState_userReviewIdsLoading","removedListing","newUserReviewIdsLoading","count","recommendedSizes","commentReviewIds","offers","userFavourites","userFavourite","favouriteApp","indexToUpdate","cartItem","newCartAction","renderErrorModal","modalBackgroundClasses","modalClasses","finishProcessingAppData","apps","logPageLoadFinished","appDataRequestStart","legacyProductsMap","timeAtTelemetryMethodCall","currentWindow","embedHostUtils","timing","networkLatency","currentTime","pageLoadTime","loadEventEnd","navigationToPageLoad","dataLatency","perfTimings","timePassedSinceNavigationStart","perfPayload","handleError","showErrorModal","hostCorrelationId","UserProfileModalData","user","isEmbedHost","licenseType","userProfileInCookie","newLicenses","localLicenses","licenseInState","licenseNewObj","originalUser","newCurrentLicense","isEmbeddedHost","userProfileModalClassNames","userProfileFieldsContainer","expandedUserProfileTokens","dropDownStyles","UserProfileModal","renderProfile","profileCompleted","userLeadgenProfile","accountInfoUpdate","firstName","lastName","eventKeyCode","shouldHideAccountInfo","currentUserLeadgenProfile","currenttUserSubmittedForm","updateUserProfile","callBackHandler","nextUserLeadgenProfile","nextUserSubmittedForm","currentLicense","nextState","currentCompactUserProfile","currentShowProfile","nextShowProfile","nextCompactUserProfile","defaultCountry","defaultValue","selectedCountryKey","field","placeholder","isRequired","firstCell","secondCell","firstCellId","firstCellDefaultValue","firstCellTitle","firstCellPlaceholder","secondCellId","secondCellDefaultValue","secondCellTitle","secondCellPlaceholder","shouldRenderHeader","isContactForm","getExpandHeaderText","company","phone","getUserProfile","showProfile","compactUserProfile","prevUserLeadgenProfile","profile","newProfile","license","newLicense","successConsentModalClassNames","iconButtonStyles","modalStyles","titleAndContentTokens","descriptionAndIconTokens","descriptionTokens","contentAndBottomTokens","SuccessConsentModal","shouldSkipModal","infoIconStyles","failureConsentModalClassNames","FailureConsentModal","showContactMeError","modalContentItemsTokens","ConsentModalContent","showAnimation","handoffTitle","isTransactApp","withAnimationHeaderText","headerText","URL_PATTERN","containsURLOrEmail","consentModalClassNames","loginUserInfoTokens","desclaimerTokens","animationStackTokens","offerTypesWithoutLeads","ConsentModal","trailId","entityInfo","consentProps","userProfile","modal","isOpenedFromPDP","shouldCTATypeBeSkip","fetchAppDetails","currentUserProfile","currentAppInfo","currentIsLoadingUserProfile","nextUserProfile","nextAppInfo","nextUserInfo","nextIsLoadingUserProfile","nextIsContactForm","nextServiceInfo","_modal_options","updateLicense","localLicenseStore","productShouldntGenerateLead","flightCodes","isService","uniqueProductId","sendLeadInfo","notes","shouldStopFlow","shouldGenerateLead","getUserAuthStatus","openDriveModal","signOutUser","isEmbeddedApp","url","postEmbedAcquisitionMessage","ctaClicked","productTitle","setTimeout","errorString","forceUserProfileCompacted","accountInfo","newAccountInfo","openInstructionsModal","updatePurchaseStatus","shouldGenerateLeadGen","contentId","areaName","hasCheckbox","hasUserProfile","profileFilledOut","isProfileCompleted","showUserSignInError","isNotesInvalid","appPrivacyPolicyUrl","ctaButton","isLoadingUserProfile","isCTADisabled","_this_props_featureFlags","isOpenInNewWindow","isPBIVisualPriceHidden","formSubmitted","displayName","iconSrc","showSuccessDialog","animationImg","appImg","appImgContainer","leadGen","userInfoInCache","accountInfoFromCache","driveUrl","renderOfferInfoSection","appIcon","appTitle","appPublisher","renderRatingSection","IsvReplyExists","curRating","handleRatingChange","renderLinksSection","renderWriteDialogButtonsSection","handleSubmitReview","renderEditDialogButtonsSection","handleDeleteReview","ReviewActionModal","userDisplayName","curReviewTitle","curReviewContent","isAnonymous","handleReviewTitleChange","handleReviewContentChange","handleSendEmailCheckbox","handleDisplayUserNameCheckbox","dialogProps","isEditMode","SubmitReviewResponseModal","content","dialogIcon","shouldRenderLink","RatingModal","_this_props_payload_app_detailInformation","_userReview_customer_info","_userReview_customer_info_is_anonymous","reviewData","isEdit","submitOperation$","_err_response","_err_response1","_err_response_statusCode","_err_response2","_err_response3","errorStatusCode","titleText","contentText","reviewFormData","ReportAbuseModal","abuseCategory","comment","selectedValue","category","storefrontName","postItemReport","submitButton","reportModalClassName","reviewTitle","reviewSource","report","ReviewCommentModalStyles","ReviewCommentModal","onDeleteComment","onEditComment","initialModalMode","modalMode","setModalMode","dismissModalWithTelemetry","innerDialogProps","_payload_actionPayload","_payload_actionPayload1","_payload_actionPayload2","_payload_actionPayload3","_payload_actionPayload4","_payload_actionPayload5","commentContent","ReviewCommentModalConfirmUpdateDialog","ReviewCommentModalConfirmDeleteDialog","ReviewCommentModalUpdateErrorDialog","ReviewCommentModalDeleteErrorDialog","ReviewCommentModalContentViolationDialog","ReviewCommentModalCreateErrorDialog","onUpdate","modalProps","dialogContentProps","maxWidth","onDelete","ReviewMarkAsHelpfulModalStyles","ReviewMarkAsHelpfulModalErrorDialog","ReviewMarkAsHelpfulModal","Modal","currWindow","_this_props_allFavouriteApps_find","_this_props_options","_this_props_options1","_this_props_options2","_this_props_options3","payloadInfo","handleConsentModalCall","isTransactable","signinType","signedIn","loading","shouldShowAnimationModal","shouldShowSignInModal","signinRedirect","serviceTitle","handleRatingModal","getId","_state_users_privateOffers","cookie","isAlternateEmailFromCookie","recommendedServices","entityDetails","hasReview","Footer","toggleContextPanel","hiddenClass","telemetryData","forceAzureHeaderNavStatic","htmlTagName","azureHeaderStaticClassValue","htmlTagDomElement","htmlTagClassValue","htmlTagClassValueList","dialogStyles","NpsPreviewModal","onSubmit","externalUrl","NpsSubmittedModal","stackTokens","dialogTextFieldStyles","checkboxLabelDefaultText","NpsTermsAndPrivacy","NpsDescription","onChange","NpsRatings","selectedRating","NpsSurveyModal","contactCheckboxChecked","toggleContactCheckbox","setSelectedRating","description","setDescription","showPreviewModal","onDismissPreview","onDismissSurvey","onSubmitted","hidePreviewDialog","toggleHidePreviewDialog","hideSurveyDialog","toggleHideSurveyDialog","hideSubmittedDialog","toggleHideSubmittedDialog","answer","Nps","showPreviewModalRef","userTelemetryPayload","userFeedbackPayload","shouldTrack","consent","siteConsent","CookieBannerComponent","cookiesConsent","siteEnvironment","resetCookieManagementModal","updateSiteConsent","updateIsConsentRequired","isManagementModalOpen","allowTracking","setAllowTracking","isComScorePresent","setIsComScorePresent","isMsClarityEnabled","environment","handleNewConsent","newConsent","manageCookies","getConsent","_getWindow_WcpConsent","_siteConsent","wcpConsent","appConfig","wcpConsentCallBack","wcpConsentListener","loadComScoreScript","scriptElement","Loader","EMPTY_ACCESS_TOKEN","isMSAUser","claims","getUserSegment","createGuestUser","createAuthenticatedUser","accessTokens","account","ssoStartTime","_name_split","_name_split1","_name_split2","_name_split3","_name_split4","_ref1","_ref2","_ref3","_ref4","username","homeAccountId","puid","tid","preferredUsername","oid","spza","userClaims","givenName","familyName","hasActiveUser","setHasActiveUser","accounts","instance","inProgress","activeAccount","setActiveUser","stringifiedError","idTokenClaims","RemoteHeader","EmbedHeader","AppView","search","subscetQueryParamChanged","sortingQueryParam","sortingQueryParamChanged","shouldPerformSearchAll","showError","console","_event_","userStore","userIdInfo","userTrailIdInfo","parameterName","modalPartnerId","crossListingAppcontext","textid","regEx","RegExp","currentParam","skuId","hasLicense","payloadDetails","handleCTACallback","_this_headerRef_current","_this_headerRef","closeAzureHeaderNavDropdown","azureHeaderNavDropdownDOMElement","enableNewNps","npsLogicVerified","isMobile","favoritesCount","isInErrorDialog","initLoading","regionDisabled","onMarketChange","onLocaleChange","showModal","locationQuery","regionCode","pcaInstanceInitialized","isConverged","isUserSignedIn","renderNewNps","userFavorites","viewApps","viewServices","route","newQuery","keepAllParams","oldParams","keepCampaignParams","searchSortingOption","searchvalue","verified","pathSegments","Home","GalleryPage","AuthRedirect","SitemapContainer","PartnerContainer","PartnersHostContainer","MyReviews","DynamicCampaign","UserFavouriteDetail","UserPrivateOffersGallery","getRoutes","navigate","setCurrentView","view","featureFlag","URLSearchParams","routes","useClientRoutes","localeRoutes","otherRoutes","ssrEntry","_matchingPath_pattern","_route_path","path","matchingPath","shouldWrapWithSuspense","useLocationChange","useHydration","map","handleLocationChange","_matches__route","_matches_","matchedView","RootHandler","landingView","telemetryPageLoadTime","performanceNow","responseStart","responseEnd","scriptStart","hydrationStart","assets","getAssetsLoadTime","perfEntries","initiatorType","src","slowestAssetDuration","slowestAssetURL","getSlowestAssetDuration","whiteListedAsset","spzaId","hostType","initializeListener","receiveMessage","origin","hostData","msgType","validOrigin","_getProductByUrlKey1","_getProductByUrlKey2","accessToken","privateApps","getAppsEndpoint","workEmail","backendUrlOverride","detailsObject","httpProtocol","pbiApi","logInitListenerFinished","errorInfo","connection","userAgent","navigator","ScrollToTopButton","yOffsetToAppear","_getDocument","isTokenExpiring","minTimeToExpirationSec","decodedToken","timeToExpirationSec","logErrorTelemetry","message","refreshedAccessToken","storedToken","i18nLocales","DEBUG_STATE","language","onError","msg","file","line","handleInterruptedHydration","errorMsg","isKnownIssue","issue","_errorMsg_includes","_getWindow_HYDRATE","appendHeaderTags","awaMetaTags","awaMetaTag","tokenResponse","fallbackRoute","dehydratedState","didInitRouter","hydrateAppSource","_hydrateAppSource","_getWindow_disablePriorityWorkaround","initApp","_store_getState_users","localeFromUrl","initBrowserConfig","embedded","hostname","stylesheet","root","handleRecoverableHydrationError","env","COMSCORE_URL","getComscorePresentedTime","_getWindow_COMSCORE_SiteRecruit_Utils_UserPersistence","_getWindow_COMSCORE_SiteRecruit_Utils","_getWindow_COMSCORE_SiteRecruit","_getWindow_COMSCORE","comscoreCookie","userId","lastPresentedTimeInMs","getGalleryPageTitle","getDetailsPageTitle","getFilterItemRoute","routeArgs","isFilterItemMatch","getFeedbackSubmittedTime","lastSubmittedTime","npsModule","getNpsModule","getEmptyNpsPersistentMetadata","getEmptyNpsMetadata","getNpsFromLocalStorage","npsMetadataTimesString","npsMetadata","comscoreAlreadySubmitted","_lastPresentedTime_getTime","lastPresentedTime","comscoreMaxSubmittedDays","feedbackAlreadySubmitted","_lastSubmittedTime_getTime","feedbackMaxSubmittedDays","otherFeedbacksAlreadySubmitted","storeNpsModule","lastCtaTime","lastDismissedTime","homePageMatch","currentPathname","_lastDismissedTime_getTime","npsMaxDeclinedDays","npsMaxSubmittedDays","_lastCtaTime_getTime","totalActionsCount","_this_onVerified","trigger","checkForOtherFeedbacks","onVerified","initializeNpsModule","onVerify","npsPersistentMetadata","constants","actionTypes","adminPortal","powerBIHost","dynamics365financials","dynamics365","dynamicsCRMLegacy","shouldShowCloseButton","shouldHideFilterPane","shouldHideIndustriesAndProducts","shouldFlatProducts","hasDynamicData","hasPrivateApps","shouldShowCuratedData","shouldShowPowerAppsNoContent","shouldShowLegacyStyle","getPowerAppsTitle","isFullScreenMode","isFullScreen","shouldShowFilter","isAppSource","page","collection","clientLogger","serverLogger","systemLogger","ensureClientLoggerInitialization","_1dsLogger","appDirectory","resolveApp","relativePath","clientDirectory","clientBuild","serverBuild","os","publicStoragePath","hash","paths","apiVersions","RequestHeaders","authorization","req","queryParamKey","queryParamValue","fs","sha256","serverInstanceCorrelationId","MethodTableMap","RequestsLogMethodToTaskName","Logger","getCLRMethod","methodName","LoggerDll","clrLogHttpInboundRequestStart","clrLogHttpInboundRequestEndWithSuccess","clrLogHttpInboundRequestEndWithClientFailure","clrLogHttpInboundRequestEndWithServerFailure","clrLogHttpOutboundRequestStart","clrLogHttpOutboundRequestEndWithSuccess","clrLogHttpOutboundRequestEndWithServerFailure","clrLogHttpOutboundRequestEndWithClientFailure","clrLogAcquisitionInfo","clrLogDbResourceOverUsage","clrLogUserFeedback","logStreamData","correlationIdToWatch","stopWatchingLog","writeToLogStream","operation","now","utc","Exception","operationName","exception","otherInfo","exceptionString","LogFeedback","_LogFeedback","detailsAsJson","callbackFunction","LogHttpInboundRequestStart","httpRequestContext","LogHttpInboundRequestEndWithSuccess","httpRequest","LogHttpInboundRequestEndWithClientFailure","LogHttpInboundRequestEndWithServerFailure","cloneRequest","headers","httpMethod","targetUri","apiVersion","parsedHeaders","LogHttpOutboundRequestEndWithSuccess","striginfyRequest","stringifyError","LogHttpOutboundRequestEndWithServerFailure","LogHttpOutboundRequestEndWithClientFailure","LogTelemetryEvents","telemetrybatch","_telemetrybatch_TelemetryEvents","telemetry","telemetryHelper","clientIP","parsedUserAgent","parseEventDetails","logServerTelemetryEvent","getErrorDetailsWithHash","stringErrorMessage","errorStack","request","requestContext","httpStatus","requestCharge","latency","scrubAcquisitionPayload","_payloadCopy_notes_length","_payloadCopy_notes","payloadCopy","piiField","scrubPiiField","clientIp","logOutRequest","Debug","additionalData","debugMessage","Information","trace","outRequestStartsTelemetryHelper","clientIpAddress","outRequestTelemetryHelper","telemetryEvent","outRequestEndsTelemetryHelper","ServerLogger","winstonLogger","_param","operationModifier","loggerMetadata","AzureEnvironment","settings","PartnerSearchResultType","AppTag","MediaType","CustomerType","PricingStates","UserSegment","CommunityItemType","CheckoutSource","CatalogOfferType","PricingAudience","IAvailabilityActions","TermsStrings","Badges","OdataRawObjectAppType","ratingValues","actionCreator","type","isType","RehydrateClientStateAction","createRehydrateClientStateAction","SearchboxInputChangedAction","createSearchboxInputChangedAction","SuggestedChangeAction","SearchSortingOptionChangedAction","createSearchSortingOptionChangedAction","LiveSearchboxFilterAction","ModalAction","createModalAction","VideoModalAction","createVideoModalAction","MediaModalAction","createMediaModalAction","DriveModalAction","createDriveModalAction","IFieldHubModalAction","IDisclaimerModalAction","InstructionsModalAction","createInstructionsModalAction","RatingAction","createRatingAction","BreadcrumbAction","createBreadcrumbAction","SetCurrentViewAction","createSetCurrentViewAction","UpdateCurrentGalleryViewIsCuratedAction","createUpdateCurrentGalleryViewIsCurated","SetLandingViewAction","EnableNewNpsAction","createEnableNewNpsAction","SetInitializedPCAInstanceAction","createSetInitializedPCAInstanceAction","SetIsNpsLogicVerifiedAction","createSetIsNpsLogicVerifiedAction","ShowingResultsForReceviedAction","createShowingResultsForReceivedAction","FilteredSearchResultsReceivedAction","PartnerSearchResultsReceivedAction","EntityDataReceivedAction","UserProfileLoadingAction","createUserProfileLoadingAction","UserProfileAction","createUserProfileAction","UserTenantsDetailsAction","createUserTenantsDetailsAction","UserTenantsDetailsLoadingAction","createUserTenantsDetailsLoadingAction","UpdateUserProfileAction","createUpdateUserProfileAction","SetAccountAction","createSetAccountAction","SetAccountIsLoadingAction","createSetAccountIsLoadingAction","SetIsMaccTenantAction","UpdateUserProfileLicenseAction","createUpdateUserProfileLicenseAction","ClearUserPropertiesAction","createClearUserPropertiesAction","PowerBIDataReceivedAction","createPowerBIDataReceivedAction","PartnerAppDataReceivedAction","createPartnerAppDataReceivedAction","SetEntityIdLoadingAction","createSetEntityIdLoadingAction","SetEntityIdFailedAction","createSetEntityIdFailedAction","EntityDetailsReceivedAction","createEntityDetailsReceivedAction","EntityFullDataReceivedAction","createEntityFullDataReceivedAction","EntityReviewCommentsReceivedAction","createEntityReviewCommentsReceivedAction","EntityReviewCommentsLoadingAction","createEntityReviewCommentsLoadingAction","EntityReviewCommentsCleanupAction","createEntityReviewCommentsCleanupAction","EntityReviewCommentCreateResult","createEntityReviewCommentCreateResult","EntityReviewCommentDeleteResult","createEntityReviewCommentDeleteResult","EntityReviewCommentUpdateResult","createEntityReviewCommentUpdateResult","EntityReviewCommentModalAction","createEntityReviewCommentModalAction","EntityReviewCommentsUpdateTotalCommentCountAction","createEntityReviewCommentsUpdateTotalCommentCountAction","EntityReviewCommentsUnloadPagesAction","createEntityReviewCommentsUnloadPagesAction","EntityReviewCommentsInitializeStateAction","createEntityReviewCommentsInitializeStateAction","EntityMarkedAsHelpfulReviewUpdateListAction","createEntityMarkedAsHelpfulReviewUpdateListAction","EntityUserCommentedReviewIdsUpdateListAction","createEntityUserCommentedReviewIdsUpdateListAction","EntityLinkedInProductGroupUpdateAction","createEntityLinkedInProductGroupUpdateAction","EntityReviewSetIsHelpfulLoadingAction","createEntityReviewSetIsHelpfulLoadingAction","EntityReviewSetIsHelpfulAction","createEntityReviewSetIsHelpfulAction","EntityReviewMarkAsHelpfulModalAction","createEntityReviewMarkAsHelpfulModalAction","EntityReviewSetMarkAsHelpfulCount","createEntityReviewSetMarkAsHelpfulCount","RelatedAppsItemsLoadingAction","createRelatedAppsItemsLoadingAction","GetAppReviewsAction","createGetAppReviewsAction","SetStorefrontNameAction","createSetStorefrontNameAction","RelatedAppsItemsReceivedAction","createRelatedAppsItemsReceivedAction","RelatedAppsItemsPricingDataReceivedAction","createRelatedAppsItemsPricingDataReceivedAction","RecommendedAppsItemsPricingDataReceivedAction","createRecommendedAppsItemsPricingDataReceivedAction","RecommendedWhatsNewAppsReceivedAction","RecommendedTrendingAppsReceivedAction","RecommendedWhatsNewServiceReceivedAction","RecommendedTrendingServiceReceivedAction","RecommendedMicrosoft365WhatsNewAppsReceivedAction","RecommendedMicrosoft365TrendingAppsReceivedAction","BillingRegionReadFromCookieAction","createBillingRegionReadFromCookieAction","AppDetailPricingReceivedAction","createAppDetailPricingReceivedAction","SearchQueryChangedAction","createSearchQueryChangedAction","SearchDataReceivedAction","createSearchDataReceivedAction","SearchSuggestionsRequestId","setSuggestionsRequestId","CuratedDataReceivedAction","DataMapReceivedAction","UserSignInAction","UserSignInStatusAction","UserSignInFetchStatusAction","UserSignInStatusDataAction","UserAccesstokensAction","UserLoginDetailsAction","createUserSignInFetchStatusAction","createUserLoginDetailsAction","ABTestingEnableAction","EmbedUserSignInAction","createEmbedUserSignInAction","UserReviewUpdateAction","createUserReviewUpdatedAction","EmbeddedAppSettingAction","SetInitLoadingAction","createSetInitLoadingAction","NationalCloudSettingAction","EmbeddedHostAction","LocStringsReceivedAction","I18nextReceivedAction","FlightCodesReceivedAction","IncludeTestProductsReceivedAction","IsConverged","CorrelationIdReceivedAction","RequestIdReceivedAction","TelemetryLoggedAction","createAppViewTelemetryLoggedAction","AppsPricingDataReceivedAction","createAppsPricingDataReceivedAction","AppPricingDataReceivedAction","createAppPricingDataReceivedAction","AppPricingDataRequestedAction","createAppPricingDataRequestedAction","FeatureFlagsReceivedAction","createFeatureFlagsReceivedAction","AddSubscriptionsInTenant","UpdateUserRoleDefinitions","createUpdateUserRoleDefinitions","UserSegmentInitializeAction","UserSignOutAction","createUserSignOutAction","UserFieldHubTypeAction","CountriesDataReceivedAction","SetEntityDataRegionFiltersAction","GlobalSettingsReceivedAction","IsMobileReceivedAction","DynamicCampaignReceivedAction","createDynamicCampaignReceivedAction","CheckoutConfigAction","createSetTenantTypeAction","UserOrdersAction","SetUserOrdersLoadingAction","IsManageModalOpenAction","createIsManageModalOpenAction","SetWCPConsentAction","createSetWCPConsentAction","SetIsConsentRequired","createSetIsConsentRequiredAction","LoadFavouriteDataStateAction","UserPrivateOffersAction","createUserPrivateOffersAction","ToggleShowContextPanel","createToggleShowContextPanel","SetUserPrivateOffersLoadingAction","createSetUserPrivateOffersLoadingAction","SetAccessTokenAction","createSetAccessTokenAction","ChangeLocaleLanguage","createChangeLocaleLanguage","SetIsDisabledBilling","createSetIsDisabledBilling","LoadingRecommenededSizes","SetRecommenededSizes","SetReceiptAction","createSetReceiptAction","SetBillingAddressAction","createSetBillingAddressAction","SetCheckoutId","createSetCheckoutId","SetActiveStep","createSetActiveStep","SetProduct","createProduct","SetBillingTerm","createSetBillingTerm","SetTermId","createSetTermId","SetSeatNumber","createSetSeatNumber","SetRecurringBilling","createSetRecurringBilling","SetItemInCartAction","createSetItemInCartAction","SetCheckoutSource","createSetCheckoutSource","UpdateCustomerAction","createUpdateCustomerAction","SetCustomersAction","createSetCustomersAction","SetActiveCustomerAction","createSetActiveCustomerAction","SetPublisherTokenResponse","createSetPublisherTokenResponse","ClearCheckoutState","createClearCheckoutState","ClearErrorAction","createClearErrorAction","ErrorAction","createErrorAction","FetchingProductAction","createFetchingProductAction","SetFilterLocationAction","createSetFilterLocationAction","SetContactDetailsAction","createSetContactDetailsAction","_async_to_generator","ensurePrivateOffer","billingRegion","_ensurePrivateOffer","privateOffers","getUserPrivateOffers","privateOffersResponse","BillingAccountType","BillingAgreementType","getLeadSourceAndSubSource","leadSubSource","leadSource","hashCode","hashBytes","_sendLead","endpoint","httpOptions","post","_getCustomers","commonHttpOptions","ReviewCommentsQueryStrings","_createReviewComment","reviewsAPI","reviewsAPIVersion","reviewComment","_error_response","_getAppReviewComments","itemsPerPage","comments","paginationInfo","_updateReviewComment","_deleteReviewComment","_setReviewMarkedAsHelpful","_getUserReviewsMarkedAsHelpful","_getReviewsMetadata","_getLinkedInProductgroupInfo","legacyOfferId","linkedinAPI","linkedinAPIVersion","ReportReviewQueryStrings","_createReportReview","itemReport","communityAPI","communityAPIVersion","AppReviewsQueryStrings","_getAppReviews","UserReviewQueryStrings","_get","_update","sendEmailConsent","_remove","Product","tempPlanTerms","unsortedTerms","accumulatedArray","curr","freeTrialTermUnit","freeTrialTermId","freeTrialTerm","uniqueTerms","termsOfAllAvailabilitiesByPlan","avail","bigId","plans","directAvailabilities","_this_termsByPlanId_","targetPlanId","termPrices","_a_billingPlan","_b_billingPlan","billingTermDuration","_this_termsByPlanId__filter","isHiddenPrivateOffer","telemtry","get","reviews$","isPurchased$","userReview$","isPurchased","market","mprpAppData","armRestClient","ex","hideKey","performSearchAll","rawSearchText","getAppPricing","appPricing$","futurePrices$","getAppDetail","entityDetails$","changeBillingRegion","shouldSetCountyCodeCookie","pricingDataLoaded","appsPricings","startingPrices","pricingPayload","userState","customerInfo","campaigns","privateApp","actionCode","createLeadPayload","uniquePlanId","leadPayload","scrubLeadPayload","ReviewsMyCommentsFilter","getReviews","authMethod","authKey","deleteReview","submitReview","updateReview","getReportEmbedToken","body","getFilteredServiceData","ensureAppReviewCommentCollectionData","getAppReviewCommentCollection","ensureAppReviewCommentCollectionStateInitialized","ensureClearAppReviewCommentCollectionData","clearAppReviewCommentCollection","createAppReviewComment","loadUserMarkedAsHelpfulReviews","reportItem","userReviewIdsLoading","prevMarkAsHelpfulCount","telemetryBasePayload","ensureAppDetailsData","promises","_relatedAppsItems_suggestedItems","_relatedAppsItems_saasLinkingItems","_relatedAppsItems_linkedAddIns","relatedAppsItems$","relatedAppsItems","_error_error","ensureServiceDetailsData","serviceDetailData$","serviceDetailData","customers","selectedCustomer","selectedTenant","tenant","getTenantType","updateUser","userDetails","adminMemberships","membershipOptions","billingAccounts","billingEAAccounts","agreementType","dispatchActionAndResolve","campaignData","campaignId","isPreview","campaignHtml","newCustomer","response","address","generatePublisherOffer","subscriptionId","setStorefrontName","ensureCheckoutApp","servicePromises","UpdateUserFavouriteFetchDataStatusAction","createUpdateUserFavouriteFetchDataStatusAction","ReceiveUserFavouriteDataAction","createReceiveUserFavouriteDataAction","DeleteUserFavouriteItemAction","createDeleteUserFavouriteItemAction","UpsertUserFavouriteItemAction","createUpsertUserFavouriteItemAction","FavouriteAppsPricingDataReceivedAction","createFavouriteAppsPricingDataReceivedAction","fetchUserFavourites","favourite","httpGet","rawUserFavourites","fetchDataStatus","upsertUserFavourite","applicationType","httpPost","errorResponse","deleteUserFavourite","entityGuid","httpDelete","ShowingResultsFor","showingResultsForText","leftSpace","italicFont","TitleComponent","localizedTitle","titleAsH1","Popularity","RecentlyUpdated","BestMatch","RatingAverage","nonDefaultSortingOptions","marketplaceServices","marketplace","marketplaceCloudsIndustry","viewToRouteMap","FilteredGalleryHeader","otherGalleriesLinks","numResults","hideSortingDropdown","_searchParams_get","sortByRatingEnabled","allNewSortsEnabled","sortByRecentlyUpdatedEnabled","searchParams","sortByQueryParam","defaultSortValue","baseRoute","container","subTitleClass","handleClearSearch","shouldDisplayClearSearch","tooltipHostStyles","stackContainerTokens","textSize","calloutProps","ItemsTooltip","linkedItemsIds","parentItem","linkedItemsData","setLinkedItemsData","getLinkedAppDataItems","renderAppTileLinkedItem","isTooltipVisible","SuccessStory","tileKey","shortDescriptionFallback","productFamily","descriptionFallback","recommendations","backgroundImage","testimonials","Testimonials","defaultTestimonialTabName","getSuccessStoryTabHref","tabId","changeSuccessStoryTabCallback","story","author","Animation","AppDetailsHeaderRatingBar","allRatingSummaryObj","avgRating","ratingsCount","parseFloat","titleAndTileStackStyle","appDetailsLinkedItemsStyles","horizontalGapStackTokens","getLinkedItemLink","linkedItem","addinOnClick","lastCtaType","renderLinkedItems","linkedItems","AppDetailsLinkedItemsComponent","AppDetailsLinkedItems","AppReviewItemCommentPagination","currentPage","totalPageCount","onSeeMoreClick","onSeeLessClick","AppReviewCommentCollectionPaginationButton","appReviewCommentStyles","AppReviewItemCommentEmptyMessage","AppReviewItemCommentCollectionListSection","onCommentDelete","onCommentEdit","mapCommentsToComponents","reducedCommentIds","commentsById","updatedContent","AppReviewCommentCollection","expanded","loadData","clearData","openModal","createComment","deleteComment","editComment","ensureStateInitialized","unloadPages","isStateInitialized","setCurrentPage","composeText","setComposeText","loadCurrentPageDataIfNeeded","loadNextPage","prev","resetPagination","shouldNewCommentEnterNewlyAddedList","onSubmitComment","onComposerTextChange","newContent","onClick","additionalProps","appReviewCommentItemStyles","commentAuthorInfoBarStackTokenDef","AppReviewCommentItemContent","AppReviewCommentItemEditedLabel","AppReviewCommentItemPostTime","AppReviewCommentItemAuthorName","_comment_customerInfo","AppReviewCommentItem","onEdit","isEditing","setIsEditing","setUpdatedContent","toggleEdit","onDeleteClick","onEditClick","AppReviewCommentItemToolbar","onDeleteToggle","onEditToggle","tooltipCalloutProps","appReviewCommentComposerStyles","BUTTON_SPACING","tokenDef","AppReviewItemCommentComposer","initialContent","editMode","onCloseEdit","isDisabled","setIsDisabled","isShowContentLengthError","setIsShowContentLengthError","isContentValid","AppReviewItemToolbar","onToggleComments","onReportAbuse","onMarkAsHelpful","showMarkAsHelpfulThanks","markAsHelpfulButtonRef","toolbarButtonsContainerRef","initializeItems","iconProps","ReviewIsvReply","isImageLoadingError","setIsImageLoadingError","imageClassName","containerClasses","replyDate","_state_apps_appReviewsData","_state_apps","_ownProps_review","_state_apps_appReviewsData1","_state_apps1","_state_users","commentsState","addToNewlyAdded","modalId","AppReviewSocialContent","onReportClick","publisherName","commentsExpanded","setCommentsExpanded","markAsHelpfulAuthMsgExpanded","setMarkAsHelpfulAuthMsgExpanded","showMarkedAsHelpfulThanks","hideMarkAsHelpfulMessage","showMarkAsHelpfulMessage","triggerMarkAsHelpfulThanksMessage","timeout","clearTimeout","toggleMarkAsHelpfulAuthMsg","prevMarkAsHelpfulAuthMsgExpanded","prevCommentsExpanded","telemetryPayload","CTAInstall","CTABuyLicense","CTAGet","CTARequestTrial","CTATry","CTAPurchase","ActionInstall","ActionBuyLicense","ActionGet","ActionRequestTrial","ActionTry","JsllCTAIdInstall","JsllCTAIdTry","JsllCTAIdBuyLicense","badgesInformation","AzureExpertsMSP","AppTile","closeTile","actionString","AverageRating","NumberOfRatings","activeFilters","searchReqId","setTileCheckoutSource","_this_getCtaMicrosoftManaged","reference","coordinate","tileRank","badgeTypes","tag","builtForList","parentProductTitle","shouldShowLinkedAddIn","textStyles","shouldShowLinkedWebApps","builtForItems","builtForProducts","builtForItemsFirstRow","builtForItemsSecondRow","maxNumberOfLines","style","ratingSummaries","ctaBaseData","area","trials","doesTenantHaveAppLicense","adminCanInstall","productType","appType","badges","filteredBadges","loc","customClassName","idx","appDetailUrl","showPopularity","popularity","containerTokens","itemsTokens","itemsInsideLinkedTokens","titleAndStarsStackToken","parentStackTokens","appTileLinkedItemsStyles","seperatorStyle","tileStyle","getProducts","getRatingsData","ratingsAverage","ratingsNum","logTelemetryInfo","hoveredItem","hoveredTitle","hoveredEntityId","LinkedItem","itemProducts","ratingsData","AppTileLinkedItems","getDataBiView","dataBiView","getDataBiType","BaseCtaButton","CtaComponent","newProp","BreadcrumbUrl","Card","logoURL","subtitle","CommonTile","openInNewWindowButtonStyles","CtaButtons","performance","onCTAClick","openInNewWindowButtonFlag","buttons","baseCtaCompoent","CustomMeterPricingMaxFractionDigits","MetersInclude","customMeter","variant","includedMeters","cm","meter","MetersBreakdown","priceString","CustomMeterPricing","ExternalLink","_this_props","attributes","getAttributes","overrideAttributes","getOverrideAttributes","isEmailLink","detailText","shouldOpenInTab","propName","_this_props_onClickHandle","FuturePriceTooltip","iconId","futurePriceTooltipClass","textClass","startDate","priceComponent","startDateText","FuturePriceWarning","_this_props_futurePrices_skus","_this_props_futurePrices","IconLink","iconClassName","accEnabled","FreeTrialBadge","PrivatePlanBadge","FreeTrialBadgeItem","PrivateBadgeItem","offerHasFreeTrialPlans","offerHasPrivatePlans","SaasPlanNameCell","SaasPricingContent","priceText","freeTrialText","fullPricingText","SaasPricingCell","_futurePriceSku_termPrices","futurePriceTerm","SaasSubtotalCell","subtotalPriceText","subtotalText","planNameWidthsByNumberOfTags","baseColumn","getPlanNameColumn","hasPrivatePlans","planNameWidths","getDescriptionColumn","getPriceAndPaymentOptionsColumn","getBillingTermColumn","subtotalColumnKey","getSubtotalColumn","getNumberOfUsersColumn","minQuantity","maxQuantity","minQuantityText","maxQuantityText","getColumns","planNameColumn","descriptionColumn","priceAndPaymentOptionsColumn","billingTermColumn","subtotalColumn","numberOfUsersColumn","descriptionColumnIndex","SaasPricingRow","rowWidth","sortedPrices","column","numberOfPrices","cellHeightPercentage","getRowsForColumn","getCellStyle","columnIndex","rowsForColumn","stackHeight","renderRow","rowProps","headerStyles","cellStyles","sortRows","defaultRenderHeader","headerProps","SaasPricingTableBase","detailsListPropsOverride","futurePricesSkus","InternalLink","rest","aTagAccEnabled","otherProps","additionalCommand","p","val","scrollToTop","domProps","iconsMap","pixelsPerChar","optionalLeftNumberSize","minTextSize","classStyles","containerClassName","wrap","sizes","iconSize","ItemsContainerIcon","itemType","ItemsContainerDivider","ItemsContainerText","hovered","ItemsContainerLinkText","hrefCallback","logOnClick","ItemsContainerComponent","tooltipTitle","withText","withTooltip","withDivider","linkedWebApps","_ref_current","ref","elementWidth","setElementWidth","onResize","insertEllipsis","itemIndex","productIndex","elements","productsNumber","leftNumber","renderElements","productsCount","additionalLeftNumberSize","shouldAddLeftNumber","Infinity","elementsToRender","currentWidth","icons","lastProduct","lastType","additionalSize","shouldAddDivider","productNameLength","totalMaxWidth","totalProductNameLength","totalTextMargin","verticalItemsTokens","linkedItemStyles","ctaButtonStyle","isInAppDetail","ctaButtonClick","isCardHover","setIsCardHover","SubmittedModal","IClarityFunctionNames","MsClarityEnabledEnvironments","MsClarity","productsItems","PureSpzaComponent","RatingsInfo","starClass","ratingClass","CrouselNextArrow","CrouselPrevArrow","Ribbon","slide","_slide_classList","childrenCount","imgSource","subHeader","getOptionIndex","optionToFind","optionIndex","match","isOptionSelected","highLightOption","RichTextDropDown","searchValue","_this_dropdownElement","isHoverEvent","previousMenu","previousMenuItem","targetIndex","richMenus","currentMenu","currentMenuItem","_this_dropdownElement1","isEventDefaultEnabled","optionLength","prevItemIndex","nextItemIndex","labelPrefix","o","dropdownClass","selectedOption","getContainerAriaLabel","dropdownLabel","getOptionClassName","highlightClassName","SafeHtmlWrapper","html","sanitize","sanitizedHtml","DataBi","$primaryText","$backgroundColor","SortingDropdown","defaultKey","isOpen","setIsOpen","searchByKey","setSearchByKey","isSortingSupported","onSortingChangeHandle","sortingLink","currentOptionsIndex","nextIdx","onDropdownChange","activeSortByOption","sortingDropdownClass","SpzaComponent","StickyCard","appearUnderElementId","elementToAppearAfter","tabsYOffset","TabsTheme","TAB_SELECTED","DEFAULT_TAB","SELECTED_TAB_QUERY","Tab","tabsClass","Tabs","tabsList","tab","currentTabIndex","getTabHref","child","_child_props","textBadge","createHeaderElement","tabClass","tabContainerClass","processedImageLoadedSrcList","processedImageErrorSrcList","TelemetryImage","alt","imgClassName","onImageLoaded","timeTaken","onImageErrored","tooltipHostProps","onTooltipToggle","tooltipId","skipPreviewSaaS","linkedSaas","_ownProps_linkedSaaS","productUrlkey","ShowPopularity","appsActiveFilters","servicesActiveFilters","favoriteStarFilled","favoriteStarAdd","favoriteStarFilledHover","favoriteStarAddHover","UserFavouriteTileButton","userFavouriteEntity","upsertPayload","hasUserSavedFavourite","itemModifyStatus","shouldShowSavedStatus","pricingStyle","contentStyle","TileCTAbutton","ctaData","isCTAHover","setIsCTAHover","disabled","CtaType","TileFooter","onKeyDown","userFavouriteEntityType","tileDataRequestId","tileIndex","componentInstance","onOpenTile","totalTiles","searchSortingBy","tileId","imgUrlError","setImgUrlError","handleTileClick","handleTileKeyDown","preventNavigation","descriptionclassNames","ctaEntity","ServiceTile","_this_props_extraData","extraData","countryContext","firstCountry","replaceCountryParam","foundCountryCode","_this_props_tags","hasIntSolutionBadge","tooltipText","ctaText","_this_props_extraData_shortDescription","replaceCountryParams","serviceDetailUrl","_state_config","_state_config1","_state_config2","_state_config3","favoriteStarHollow","UserFavouriteTileDetailButton","useMsClarityIdentify","useMsClarityTracking","setIsHydrated","withHydration","WrappedComponent","useSpzaInstrumentService","refInstrument","envsMap","getEnvName","_getWindow___INITIAL_STATE___config_siteEnvironment","_getWindow___INITIAL_STATE___config","_getWindow___INITIAL_STATE__","_getWindow___INITIAL_STATE___config_siteEnvironment_toLowerCase","initiate1DS","_getWindow___INITIAL_STATE___config1","_getWindow___INITIAL_STATE__1","_getGPCValue","analytics","authPlugin","propertiesPlugin","cvPlugin","authConfig","_getWindow___INITIAL_STATE___users","_getWindow___INITIAL_STATE___users_signedIn","propertiesPluginConfig","telemetryClient","getTelemetryClient","initBusinessTelemetryClient","pageView","overrideValues","customProperties","isRightClick","flushTelemetryBuffer","ClientLogsCollection","getCommonData","_initialConfiguration_siteEnvironment","_initialConfiguration_query","_getTrailIdAndData","_getWindow_navigator","_getWindow_navigator_connection","_getWindow_navigator1","initialConfiguration","level","loggerPayload","_this_store","_state_modal","_state_checkout_items_","_state_checkout_items","_state_checkout","_getWindow2","_getWindow3","_this__1dsLogger","userSegment","hashedOid","ClientLoggerTelemetry","SystemLoggerTelemetry","_process_env","_process","qosPlugin","webAnalyticsConfig","qosConfig","AuthClient","onSuccess","onFailure","getSilentRedirectUri","getImplicitRedirectUri","getConfig","aadApplicationId","aadLoginUrl","getScopeByAADResource","marketplaceLeadsAudienceId","jarvisCM","mprpAadApplicationId","pifdEndpoint","commerceApi","graphApi","agreementAppId","getExtraScopesToConsent","fetchAccessTokens","resources","scopesByResource","filteredScopesByResource","filteredResources","resource","acc","redirectLoginSuffix","getRedirectLoginUrl","listOfUrlKeysToExcludeInAppsource","filterHideList","isOneTaxonomyEnabled","newKey","oldKey","objCompare","obj1","obj2","v1","v2","recursiveDecode","run","decodedValue","parseQuery","parser","arrayValue","decodeString","xssDecodeString","decodeQuery","xssDecodeQuery","getXssDiff","hasDiff","decodedUrl","xssDecodedUrl","hasUrlDiff","decodedQuery","xssDecodedQuery","hasQueryDiff","getXssDiffString","urlObject","EMBED_PREFIX","appRoutes","previousPage","appHistory","originalUrl","_document_documentElement","canonical","isMac","host","protocol","canonicalLinkPrefix","canonicalLink","documentCanonicalLink","embedURL","isValidRoute","base","initRouterHistory","_args_embedded","previousLocation","refererPathname","refererByCallbackUrl","pathname","_state","decodedFrom","stateHostname","update","onRouteChanged","FilterQuery","buildHref","oldRouteParams","newRouteParams","newParams","validQueryParams","routeKeys","targetParams","op","np","campaignParam","startChar","newParam","splitParams","keyLength","keyIndex","previousCharacter","endCharacter","splitNewParams","splitOldParams","pos","queryString","emptyQuery","tp","appendQueryParams","queryParams","urlPush","embedLocation","scrollTo","urlReplace","nextLocation","urlAssign","shouldOpenInNewTab","removeUserUniqueQueryParams","currentLocation","urlToReplace","withRouter","getQueryParamsObject","storeFeedback","getUserPrivateApps","getUserPrivateApp","entitiyId","getPrivateOrPublicPublicId","getTileData","_request","tileDataOption","data$","_getAppPricing","getFuturePrices","_getFuturePrices","getApp","_getApp","getAppRelatedAppsItems","getAllAppsPricing","_getAllAppsPricing","getServices","flightCode","getServiceRelatedAppsItems","HttpModule","AuthenticationTypes","_err_response_request","_err_response_req","requestUrl","newAccessToken","outerStore","HttpWrapper","entry","retry","authHeaderTitle","header","shouldRefreshAccessToken","setAuthenticationHeaders","authenticationType","setBearerHeader","endRequest","_res_headers_contenttype","_res_headers_contenttype1","isJSON","isRemoteChunk","promise","_HttpModule_getStore","method","patch","del","getRootObject","set","getAppConfig","init","configs","setConfigs","LibAction","aggregratingName","InfoBuffer","entryName","AggregationBuffer","size","Buffer","overflow","ConsumerService","instrumentService","InstrumentService","provider","Provider","probeName","enablings","enabling","StaticProvider","TelemetryActions","buffer","events","serializedEvents","flushLog","record","isClient","SharedTelemetryService","SharedInstrumentService","screenResolution","screen","browser","tem","ua","M","_getWindow_setTimeout","SpzaTelemetryService","SpzaInstrumentService","getWindow","getDocument","ApiVersion","marketplaceApiVersion","enrichReviewCommentsApiVersion","marketplaceLeadsApiVersion","mergeAccessToken","currentAccessToken","previousObject","currentKey","countryCodeToNameMap","paramToDataMapKey","getHttpPrefix","Url","stringifyWithQs","generateGuid","attachClickHandlerToElement","handler","el","getProductByUrlKey","productKey","getProdcutBitMaskInfo","categoryInfo","FilterGroup","FilterID","AppsourceMode","getFormattedString","baseString","getTelemetryResponseUrl","getPaymentRedirectUrl","referredBy","bitmaskMatch","bitmaskValue","isOfficeNonSaasApp","getParentProductTitle","parentProduct","isOfficeSaasApp","productOfficeMask","productWebAppsMask","isOfficeApp","isSaaS","isSaaSApp","isD365","isD365App","isD365BC","isPowerBIVisuals","isPowerBIVisualsApp","isAzureApp","isMigratedPowerBIVisual","shouldDownloadPowerBIVisual","isBagTransactable","primaryProductUrl","isBagEnabledD365BC","isBagEnabledD365","isBagEnabledPowerBIVisual","isBagOfferType","getTransactCTATypes","_targetApp_licenseManagement","_targetApp_licenseManagement1","isAdmin","showInstallFirst","isD365BCApp","showGetCta","getCtaBagTransactable","isFreemium","Install","BuyLicense","getHandoffUrlForProduct","productUrlKey","urlArgs","getOfficeHandoffParams","storeConfig","ui","contentMarket","processHandoffURLAndTitle","handoffURL","notifyURL","isPrivateOffer","isOpenInNewWindowButton","getActionStringForCTAType","isOnMicrosoftEmail","urlList","httpsSubString","checkOriginSource","originStartIndex","firstSlashIndex","removeURLParameter","parameter","urlparts","prefix","getDataMapString","bitmask","dataMapValues","getTelemetryDetailContentConsentDialogInfo","getTag","isCertifiedSoftware","_app_badges","badgesConditions","CertificationState","isSolutionMap","AzureBenefitEligible","getBadgeTypes","condition","getAppTelemetryDetailContentText","consentDialogHasUserProfile","consentDialogHasCheckbox","shouldShowUserTerms","leadGenEnabled","publisherId","appPublisherId","ctaTypeString","productAvailabilityType","isSaasTransactApp","appTelemetryDetailContent","getServiceTelemetryDetailContentText","dataMapField","serviceTelemetryDetailContent","getEmbedHostName","serializeUserProfileEmbedInfo","profileToSave","readUserProfileEmbedCookie","userProfileInfo","pair","colenIndex","logClientError","additionalDetails","isWarning","stringifiedStack","sf","log","isJsonString","str","parsedObj","getSpzaUserIdAndNewUserModifier","spzaUserData","getTrailIdAndData","trailData","isValid","getLocaleDate","parsedDate","getNetworkStats","_navigator","effectiveType","rtt","downlink","getHostType","getCTATypeForActionString","logTenantInfo","users","isAutoSign","spzaUserId","emailParts","tenantPayload","logInitialTelemetryEvents","sharedInstrument","newUserModifier","trailIdData","spzaUserIDPayload","embedHostName","landingDetails","setProfileFeatureFlag","decodeVulnerableDataInInitalState","decodeURI","isMSASupported","matched","AllowMSA","isAppForMSAAccountOnly","getSignInModalTypeHelper","isMSASupportedProduct","shouldForceMSA","getSignInModalType","isServiceEntity","isEmailValid","isValidInput","validateCallBack","inputNoSpaces","getElement","selectorFunc","addClassToElement","removeClassFromElements","elementsClassName","clearElement","focusElement","addAttributes","attribute","postMessageLogTemplate","postMessageToHost","licenseDisplayTextSet","dynamicsLicenseTypeForEmbed","productBitmask","productList","getListOfDynamics365Products","productsBitmask","productsList","dynamicsLicenseType","productsBitMask","setInitialLocalLicenseStore","licenses","setInitialLicenseDisplayText","getTelemetryDetailContentCurrentCuratedViewPrefix","filterQueryName","isAppGallery","filterQueryToFilterCollectionName","isProcessingAppGalleryIndustryFilters","curatedViewPrefix","filterQueryValues","queryValue","filterQueryValue","areMultipleFilterCollectionsActive","queryName","areMultipleIndustryFiltersActive","isSearchMode","querySearch","filterCollection","filterName","filterTitle","word","getTelemetryDetailContentCurrentView","galleryViewPrefix","galleryViews","getTileDataQueryParams","optimizedTileDataQueryParams","optimizeQueryParameters","rawValue","valueUpper","loweredName","dataMappingName","serviceOffersSupportedStatesCodes","getTileDataCuratedQueryParams","tileDataCuratedQueryParams","getTileDataFilteredQueryParams","tileDataFilteredQueryParams","getTileDataAdditionalQueryParams","tileDataAdditionalQueryParams","convertTimeToSeconds","timeStamp","totalTimeInSeconds","hours","minutes","seconds","shouldEnsureAppDetails","shouldEnsureServiceDetails","shouldEnsureAppPricings","_app_pricingInformation_billingRegion","_state_config_billingCountryCode","shouldEnsureAppReviews","shouldEnsureAppRelatedApps","shouldEnsureServiceRelatedApps","isAvailableInThisRegion","windowOnErrorHandler","browsersExtensions","browsersExtension","getXMSClientName","getPDPRoute","getGalleryRoute","getTileDataEntityType","mapping","stripHTML","isSignedInChanged","currentSignedIn","prevSignedIn","getActiveFeaturedFlags","flag","shouldRenderPricing","planPricingType","transactApp","isMicrosoftManaged","canRenderPricing","sortingSKUs","_a_title","_b_title","openInNewWindow","newWindow","getCookieOptionExpires","expiry","hasUserAgreedPrivacyConsent","saveDataToBrowserAfterUserAgreedPrivacyConsent","saveCookieItem","itemName","itemValue","optionText","getCookieItem","shouldDecode","saveLocalStorageItem","getLocalStorageItem","saveSessionStorageItem","getSessionStorageItem","BrowserStorage","cookieUtils","localStorageUtils","browserStorage","BrowserStorage1","cookieData","userAgreedPrivacyConsent","localStorageData","sessionStorageData","cookieName","cookieValue","errorText","localStorageItemName","localStorageItemValue","getCookieItemFromBrowser","cookiePrefix","cookieArray","setCookieItemToBrowser","isValidForUserAgreedPrivacyConsent","isCookieExpired","cookieInitialTime","setCookieItemToBrowserForUserAgreedPrivacyConsentDate","cookieAcceptedDate","localStorage","sessionStorage","TelemetryUtils","BusinessTelemetry","dataBi","Filters","ProductAvailabilityType","updateCart","quantity","isQuantifiable","currency","billingTerm","isRecurring","showAutoRenewMessage","prevCartItem","quantityAsInt","isNewCustomer","activeCustomer","checkoutBillingCountry","defaultBillingCountry","_activeCustomer_address","_activeCustomer_address_country","isDevelopmentEnvironment","getCountries","confirmBillingCountry","_confirmBillingCountry","setBillingCountry","createCustomer","logPayload","logConfirmTelemetry","getConsentState","isContactInfoHiddenInDisclaimer","consentOption","consentsNotContactInfo","convertStepIdToName","stepId","getBillingPlanPricesPerTermDuration","billingDuration","_renewAvailability_terms_filter","_renewAvailability_terms","renewAvailability","prices","convertTermToString","pbOther","getBillingCycle","billingPlan","MultiYearTerms","buildUrlToAppDetails","redirectToAppDetails","pdpUrl","getPurchaseBlendsMessageOverrides","riskRejected","IConsentOption","Constants","Environment","Featured","FilteredSearchType","FilteredSearchPhase","HTMLElements","SigninStatus","PageToGiveMetaTag","RatingShowMode","CookieExpiry","Reviews","ReviewCommentModalMode","Microdata","ReviewsSource","EntityType","Dynamics365LicenseType","Dynamics365LicenseIndex","SearchBy","SystemKey","SystemKeyAsString","SystemKeyString","Recommendations","FieldHubUserType","VaritionKey","TenantType","ReviewsEnrichApiResponse","TermId","OrderConfirmation","StatusError","Cookies","Errors","Catalog","ArtificatsName","LocalStorage","EventsApi","UrlParamCacheKeyWhiteListKey","Search","SuggestionTypes","QueryParams","Endpoints","SelectEntry","ActionType","OrderBy","FilteredGallery","TileDataEntityType","TileDataAdditionalQueryParams","TileDataFilteredQueryParams","TileDataCuratedQueryParams","DataMapCollectionKeys","CategoriesDataMapCollectionKeys","Headers","OperationNames","CacheStatus","BrowserConfigs","ClientNames","HttpMessage","ControllerOperations","QueryStrings","Auth","Curated","AppActionTypes","ActionStrings","NpsActions","BadgeType","ButtonType","CTAType","CertificationType","SignInType","SignInRedirect","ActionCodes","ModalType","dynamicsLicense","PowerBI","filterMaps","embedMessage","TeachingBubblePurchaseConfirmation","RequestsMethods","SearchSources","LeadCategory","Telemetry","Action","ActionModifier","LeadsDropReason","OutRequest","ProbeName","AreaName","Id","ContentType","PurchaseBlendsTelemetry","PurchaseBlends","RoleDefinitions","Flighting","CompetencyBadge","TestDriveType","TestDriveOutputType","EmailCategories","ReservedCorrelationIds","View","TestDriveResponse","VersionNeutralCollection","DocTypes","TestDriveState","StorefrontName","AuthType","ResourceTypes","AcquisitionCategories","GalleryTypes","GalleryOffersTypes","Views","HTMLAttribute","searchItemType","searchTypeString","TokenClaims","AzurePortal","MACSubCategoryStrings","TypeOf","ServiceTypes","RegExpFlag","UserFavourite","ApplicationTypes","NotCriticalFailure","FetchDataStatus","DataItemModifyStatus","ODataError","AccessToken","appSourceUrls","Header","Classname","UserInteractionType","EventType","UserActionComponentType","UserComponent","DropdownItemName","ErrorCodes","JsllCTAId","JsllSaas","JsllCheckout","AzureExpertsMSPApps","ProductBitmaskFieldNames","SearchFieldNames","SearchSortingOption","LicenseManagementType","UiRole","TermPeriod","OfferType","PlanPricingType","OneDSEnvs","AwaMetaTags","Plan","AppName","ReviewCommentActionError","ConsentAnalyticAssets","CategoryId","MeterUnit","MeterType","ApiVersions","SearchMode","AppConfig","InternetOfThings","Avert","FeedbackName","TemplateName","ReservedOperationNames","CloudsIndustry","ReportAbuseDialog","HTMLTag","HTMLClassNameStrings","LicenseModel","supportedCountries","LocalizationSettings","ResourcesFiles","allBillingCountries","BackendKeyToURLKey","getProductTitleForTile","serviceProducts","getServicePricingByCountry","multiGeoCountryPricings","_multiGeoCountryPricings_find","multiGeoCountryPricing","_multiGeoCountryPricing_countryRegion","getServicePricingByCountryWithFallback","_multiGeoCountryPricings_","getCountryRegionByCountry","findBestMatchCountryCode","multiCountryServicePricing","extractCountryCodeFromFilterQueryParam","subFilters","extractCountryCodeFromQueryParam","createCountryFilterQueryParam","getReplacedCountryQueryParam","newCountryCode","newFilter","countryCodeToReplace","getStartingPriceCurrency","multiCountryPricing","getStartingPriceHeader","_pricing_planPrices","planPrice","getDatamappingJsonFile","filterTypeToFilterGroup","categoryFilterGroup","categoryUrlGroup","subCategoryUrlGroup","productsToCategoriesReferences","_getDatamappingJsonFile","categoriesMapping","maskCounters","increaseMaskIndex","currentMask","calculateShortcutUrlKey","ShortcutFilters","UrlKey","currentShortcutUrl","getBaseFilterGroup","getFilterGroup","dataCollectionKey","isBaseFilterGroup","filterGroup","getDataValueBitMask","initDataValue","dataValueKey","dataValue","isSubDataValue","filterInfo","IsReference","SubCategoryDataMapping","IsChildFilter","initMaskCounters","initCollection","dataCollection","subCategoryCollectionValue","createCategoryReference","updateCategoriesReferences","categoriesReference","productCategoryReference","productCategoryTaxonomy","uniqueFilter","initDataMap","categoryCollection","dataCollectionToMap","dataMapArray","categoryKey","dataValues","dataValuesSubCategoryToMap","subDataValues","dataMapToArray","categoryDataKey","categoryDataMap","dataCollectionMap","getAllCategoriesReferences","createBackendKeysFromSubCategories","subCategories","getAllChildKeys","BackendKey","currentBackendKey","createAllChildMap","productKeyByUrlKey","productKeyByBitmaskFilter","calculateShortCutBitmask","currMask","shortcutProductInfo","currentFilterGroup","productShortcutBitmask","cloudIndustry","getShortCutBitmask","getUrlKeys","urlKeys","currentDataValue","getSubUrlKeys","currentSubCategoryKey","subCategoryKey","bitMasksMatch","bitMasks","bitMasksMatchBitMask","bitMasksA","bitMasksB","bitMasksMatchFilter","bitMasksContainSomeBitMask","getPrimaryProductUrl","maskKey","getProductFilter","getCategoryListByProductId","productBitMaskFilter","datamap","productFilter","_DataMap_categories","defaultCateogires","removeUnmatchedCategories","newProductUrlKey","newProductFilterData","categoryListL1Product","newCategory","queryCategory","OwnerType","hideCertificateBadges","getDetailInformation","getDetailArrayItem","generateClickPayloadAndLogTelemetry","ownerType","ownerId","generateLinkPayloadAndLogTelemetry","linkType","tabOwner","generateTileClickPayloadAndLogTelemetry","generateBreadcrumbPayloadAndLogTelemetry","addSaaSBundleProperties","getProductsList","filterDatamapBlocks","CtaRequiringTerms","registration","getEntityRegistration","getEntityRegistrationByView","viewName","getEntityDataState","getAllEntityTypes","filterCollectionNameToFilterQuery","getFilterDataForQueryHelperV2","subgFilterQueryName","shouldResetCounts","filterData","selectedFilter","filterKey","primaryFilter","isContainsSubActive","subKey","subFilter","selectedSubFilters","isSubActive","getFilterData","filterCollectionName","getFilterDataForQuery","subCollectionKey","categoryFilterSubCollection","categoryFilterCollection","filterSubCollectionData","getFilterDataForQueryHelper","_constantDataMap_trials_rawFilterQueries_","_constantDataMap_pricingModel_rawFilterQueries_","_constantDataMap_ratings_rawFilterQueries_","_constantDataMap_appCompliance_rawFilterQueries_","_constantDataMap_AzureBenefitEligible_rawFilterQueries_","_constantDataMap_CopilotExtension_rawFilterQueries_","_constantDataMap_productType_rawFilterQueries_","hasGlobalFilter","filterQuery","filterQueries","rawFilterQueries","getProductsFilterData","activeQuery","activeFilter","filterBitmaskMatch","parentFilterQuery","selectedParentFilter","shouldExpandChildFilters","childFilterNames","childFilterName","childFilter","childFilterIsActive","updateMatchFunctions","subCategoryCollectionKey","subCategoryFilterCollection","subCategoryKeys","childMatchFns","subCategory","matchFn","primaryProductKey","productFilterCollection","productFilterKey","isPrimaryProduct","matchSubCategories","subFilterKeys","subFilterKey","getFilterLink","allowShortcutFilter","isTreatmentNewFilterAMPEnabled","isProduct","isCategory","isIndustry","isSubFilter","flattedEmbedHost","newProps","getCountryRegionfilterLink","shouldShowCurationForFilter","curatedData","curatedSection","shouldShowCuratedDataForActiveFilters","filtersByGroup","grouped","shouldShowCurationForProductFilters","activeProductsFilters","L3ProdFilters","activeProdFilters","getFilterType","shouldShowSubFilter","sort","textA","textB","sortFilters","filterA","filterB","sortFiltersKeys","filterKeyA","filterKeyB","filters","onClickTrackHitCountsForTreatmentNewFilter","filterUrlKey","isFilterChosen","cloudsIndustryActiveFilters","getResetFiltersHref","getResetFiltersAndSearchHref","increaseCountOfReferenceCategoryInDefaultCategoryList","getPopularItems","allItems","featuredItems","maxLength","featuredItem","getFeaturedItemsByFilter","itemsHashMap","getFeaturedItemsFilter","itemsIndexes","topCuratedLane","getTopCuratedLane","curatedItem","_curatedItem_id","windowScrollToTop","getInternetOfThingsLink","serviceOffersSupportedCountries","serviceOffersSupportedCountriesMap","findServiceSupportedCountry","foundCountries","isPricingFilter","performFilter","performCounting","resetCounts","filterList","matchingItems","itemLength","itemMatches","matchesGroup","topFilter","matchesCategory","len2","passesGroup","increaseCounts","MONTH_UNIT","YEAR_UNIT","isUnitEqual","mightContainMultiyearTerms","filterDecreasePrices","hasMonthlyPriceIncrease","hasYearlyPriceIncrease","hasMeterPriceIncrease","increaseTermPrices","updateTermPrices","futurePlan","increasedTermIds","futureAvailability","futureTerm","_term_billingPlan","_futureTerm_billingPlan","updateThirdPartyPricing","futurePricePerCore","currentMeter","getFuturePricesSkus","futurePlans","currentSkus","futureSkus","_futurePlan_availabilities","currentSku","getFuturePricesInformation","currentPrices","getUTCDateString","startDateUtcInMinutes","generateHashMap","identifiers","dataLength","idsLength","parseCuratedSections","sections","dataMapSubCats","section","newItems","newSection","jwtDecode","headersToRedact","scrubHeaders","_headers_","logOutRequestEventInfo","logError","_error_response1","code","generateTelemetryPayload","_details","parseRequest","taskName","requestHeaders","parseURL","reURLInformation","logOutRequestStart","logOutRequestEnd","durationInMilliseconds","contentLength","requestEnd","logOutRequestError","parsingError","shouldRefreshToken","expiryTime","isAppContactForm","isLeadgenEnabled","isETERunning","NpsModule","npsHelper","idleCounter","blocked","idleTimer","isNotSameCorrelationId","sessionStartTime","setTimer","interval","checkForNPS","viewedAppsCount","acquiredAppsCount","debugMsg","savedSessionEndTime","viewedApps","acquiredApps","isAppsCriteriaValid","dLog","ResetNPSCount","ResetNPSIdle","offset","showModalFunction","timerInterval","currentCorrelationId","savedCorrelationId","next","initNext","storeString","nextText","by","isUndefined","isNullorUndefined","isObject","isEmptyObject","isArray","isPureObject","isFunction","deepEqual","y","shouldSkipInlineFunctionCheck","prop","oneTimePaymentOffers","configsMap","loadPartnerManifest","loadAppPricing","rawApp","pricesData","billingCountries","getBillingCountryByCountryCode","renderNotAvailablePriceUI","TermsStringsToDays","DAYS_IN_YEAR","getFreeTrialText","asInlineHTML","freeDurationDays","months","singleMonthText","multiMonthText","getPricingLocale","getPriceWithCurrencySymbol","maximumFractionDigits","currencyCodePosition","currencyValuePosition","matchWhitespace","getPriceString","formatStringLocalizationKey","ignoreFreeString","unitLocalizationKey","getVariablePriceString","returnObj","termPriceString","getCustomMeterPricing","_price_customMeter","customMeterPriceText","customMeters","firstLine","getDefaultPrice","getFuturePriceVariablePriceString","futurePriceObj","futureMonthlyPrice","futureYearlyPrice","getVariablePriceStringWithDefault","priceObj","monthlyPrice","yearlyPrice","defaultMonthlyPrice","defaultYearlyPrice","contactPublisherText","getBillingTermTranslated","useHyphen","isSubscription","getPriceWithFrequencyText","priceObject","onetimePaymentTranslation","isOnetimePayment","template","billingFrequency","getBillingFrequencyTranslated","getFullPriceString","priceValue","priceWithFrequency","getTermPriorityForSorting","termsStrings","sortTermPrices","addFuturePricing","billingTermPeriod","monthlyFuturePrice","yearlyFuturePrice","getStartingFromPriceText","startingPriceOptions","saasStartsFromPricing","termTranslated","getStartingPriceElement","shouldBlockPricing","bulidStartingPriceElement","hidePowerBiVisualPricing","getGPCValue","getComponentXYCoordinate","componentRef","domNode","boundingRectangle","relativeCenterX","relativeCenterY","getTileComponentRank","coordinateRanking","elementHTMLCollection","attributeAriaLabeledBy","elementIndex","launchTelemetry","getProviderNameByReviewSource","defaultName","getReviewCtaButtonText","getAddReviewSectionDescription","getReviewModalDialogProps","dragOptions","getReviewCommentsModalDialogProps","createDefaultPagination","defaultPagination","createDeepLinkPagination","currentPageIndex","combineDeletedComments","commentIds","currId","currIdx","currentComment","createInitialReviewCommentsState","appendReviewCommentsToState","mapEnrichReviewCommentToIAppReviewComment","keyMapper","calculateTotalReviewCommentsPagesCount","getExternalRatingSummaries","g2Summary","summary","getRatingTotals","accumulatedRatings","currentRating","getTotalExternalRatingSummariesInfo","totalRatingCounts","totalAverageRatingsSum","getRatingSummaryByType","findReviewsSources","AppSource","Amp","Ibiza","specialParams","campaignParams","excludedCampaignsForAcquisition","logGetCampaignTelemetry","shouldSkipGetCampaigns","getAppViewParams","shouldGetCampaignsForAcquistion","extractCampaignsFromUrl","getParameterByName","regex","excludeCampaignsForAcquisition","aExludeCampaign","excludeKey","excludeValue","getCampaignsForAcquisitionFromUrl","updateHandOffUrlWithCampaignParams","handoffUrl","pageUrl","serializeCampaignObject","getEntityIdFromUrl","offerIdLocation","removeDuplicateAddIns","idField","bundleCount","linkedAddInIds","currentApp","currentAddIns","uniqueApps","currentAppId","duplicateAddInsCount","metaTagConstants","isGallery","galleryType","pathArray","getMetaTag","metaTag","getAwaMetaTags","_state_users_signedIn","parseFirstFilter","filterstring","getGalleryCanonicalSuffix","currentUrl","queryParamsString","queryKey","queryTuple","parseLocale","getCanonicalLink","isMacEnv","serviceOffersSupportedUSStates","serviceOffersSupportedCAStates","getTooltipSilentLogIn","getTrimmedWords","delimiter","isEmptyNullorUndefinedString","lowerCaseText","getWorkBreakEnabledString","isFeedback","getQueryFromBrowserUrl","getLocationFromBrowserUrl","getQueryFromWindowLocationSearch","queryArray","querySegment","querySegmentKeyValuePair","getHostFromBrowserUrl","getProtocolFromBrowserUrl","getUserFavouriteEntityServiceType","getUserFavouriteEntityAppType","isApplication","isConsultingService","getFavouriteEntityState","favourites","upsertsUserFavouriteEntityState","entityList","foundMatch","deleteUserFavouriteEntityState","indexToDelete","numberOfEntityToDelete","getUserFavouriteEntity","hasFound","getUserFavouriteViewEntityList","userFavouriteEntityList","isMaccUser","isMaccTenant","isEAAccount"],"mappings":"w8jBAAAA,EAAO,OAAO,CAAG,KAAK,C,iLC6af,SAASC,EAAgBC,CAAO,EACnC,IAAMC,EAAa,CAAC,EACpB,GAAID,AAAW,MAAXA,GAAmB,AAAmB,UAAnB,OAAOA,EAC1B,OAAOA,EACJ,GAAIA,AAAkB,IAAlBA,EAAQ,KAAK,CACpB,OAAO,KAEX,IAAI,IAAME,KAAKF,EAAQ,CAEnB,IAAMG,EAAOJ,EADAC,CAAO,CAAC,CAAC,EAAEE,EAAE,CAAC,CAAC,EAExBC,GACAF,CAAAA,CAAU,CAAC,CAAC,EAAEC,EAAE,CAAC,CAAC,CAAGC,CAAG,CAEhC,CACA,OAAOF,CACX,C,mDA5bA,SAASG,EAAiBC,CAAG,CAAEC,CAAG,CAAEC,CAAK,EAWrC,OAVID,KAAOD,EACPG,OAAO,cAAc,CAACH,EAAKC,EAAK,CAC5B,MAAOC,EACP,WAAY,GACZ,aAAc,GACd,SAAU,EACd,GAEAF,CAAG,CAACC,EAAI,CAAGC,EAERF,CACX,CAIA,IAAMI,EAA6B,CAC/B,SAAU,GACV,QAAS,EAAE,CACX,YAAa,GACb,eAAgB,CAAC,EACjB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G,uBAC5DA,EAAa,CAACA,GAAc,WAAc,CAAG,GAAG,CAAG,cACnDA,EAAa,CAACA,GAAc,eAAkB,CAAG,GAAG,CAAG,kBAE3DxG,EAAU,gBAAgB,CAAG,CAEzB,kBAAmB,CACf,oBACH,CACD,cAAe,CACX,gBACH,CACD,eAAgB,CACZ,iBACH,CACD,eAAgB,CACZ,iBACH,CAED,eAAgB,CACZ,kBACA,UACH,CACD,aAAc,CACV,kBACA,QACH,CACD,kBAAmB,CACf,kBACA,aACH,CACD,YAAa,CACT,kBACA,OACH,CACD,cAAe,CACX,kBACA,aACH,CAED,WAAY,CACR,gBACA,QACH,CACD,UAAW,CACP,gBACA,OACH,CACD,gBAAiB,CACb,gBACA,aACH,CAED,WAAY,CACR,eACA,aACH,CACD,YAAa,CACT,eACA,UACH,CAED,eAAgB,CACZ,mBACA,aACH,CACD,gBAAiB,CACb,mBACA,UACH,CAED,4CAA6C,CACzC,aACH,CACD,2CAA4C,CACxC,iBACH,CACD,0CAA2C,CACvC,gBACH,CACD,+CAAgD,CAC5C,kBACA,UACH,CACD,gDAAiD,CAC7C,sBACH,CACD,mDAAoD,CAChD,yBACH,CACD,0CAA2C,CACvC,WACH,CACD,wCAAyC,CACrC,QACH,CACD,wBAAyB,CACrB,sBACH,CACD,oBAAqB,CACjB,kBACH,CACD,OAAQ,CACJ,wBACH,CAED,cAAe,CACX,kCACA,CACI,YACA,MACH,CACJ,CACD,cAAe,CACX,kCACA,CACI,YACA,MACH,CACJ,CACD,eAAgB,CACZ,kCACA,CACI,aACA,MACH,CACJ,CACD,eAAgB,CACZ,kCACA,CACI,aACA,MACH,CACJ,CACD,oBAAqB,CACjB,kCACA,CACI,kBACA,MACH,CACJ,CACD,oBAAqB,CACjB,kCACA,CACI,kBACA,MACH,CACJ,CACD,iBAAkB,CACd,kCACA,CACI,eACA,MACH,CACJ,CACD,iBAAkB,CACd,kCACA,CACI,eACA,MACH,CACJ,CAED,UAAW,CACP,kCACA,CACI,YACA,UACH,CACJ,CACD,cAAe,CACX,kCACA,CACI,gBACA,UACH,CACJ,CACD,UAAW,CACP,kCACA,CACI,YACA,UACH,CACJ,CACD,UAAW,CACP,kCACA,CACI,YACA,UACH,CACJ,CACD,WAAY,CACR,kCACA,CACI,aACA,UACH,CACJ,CACD,eAAgB,CACZ,kCACA,CACI,iBACA,UACH,CACJ,CACD,WAAY,CACR,kCACA,CACI,aACA,UACH,CACJ,CACD,WAAY,CACR,kCACA,CACI,aACA,UACH,CACJ,CACD,gBAAiB,CACb,kCACA,CACI,kBACA,UACH,CACJ,CACD,oBAAqB,CACjB,kCACA,CACI,sBACA,UACH,CACJ,CACD,gBAAiB,CACb,kCACA,CACI,kBACA,UACH,CACJ,CACD,gBAAiB,CACb,kCACA,CACI,kBACA,UACH,CACJ,CACD,aAAc,CACV,kCACA,CACI,eACA,UACH,CACJ,CACD,iBAAkB,CACd,kCACA,CACI,mBACA,UACH,CACJ,CACD,aAAc,CACV,kCACA,CACI,eACA,UACH,CACJ,CACD,aAAc,CACV,kCACA,CACI,eACA,UACH,CACJ,CAED,eAAgB,CACZ,uBACA,CACI,QACA,UACH,CACJ,CACD,eAAgB,CACZ,uBACA,CACI,QACA,MACH,CACJ,CACD,cAAe,CACX,uBACA,CACI,OACA,UACH,CACJ,CACD,cAAe,CACX,uBACA,CACI,OACA,MACH,CACJ,CACD,iBAAkB,CACd,uBACA,CACI,UACA,UACH,CACJ,CACD,iBAAkB,CACd,uBACA,CACI,UACA,MACH,CACJ,CACD,oBAAqB,CACjB,uBACA,CACI,aACA,UACH,CACJ,CACD,oBAAqB,CACjB,uBACA,CACI,aACA,MACH,CACJ,CAED,qCAAsC,CAClC,wBACA,kBACH,CACD,qCAAsC,CAClC,wBACA,kBACH,CACD,gBAAiB,CACb,wBACA,kBACH,CACD,eAAgB,CACZ,wBACA,iBACH,CACD,iBAAkB,CACd,wBACA,mBACH,CACD,iBAAkB,CACd,wBACA,mBACH,CACD,iBAAkB,CACd,wBACA,mBACH,CACD,oBAAqB,CACjB,wBACA,sBACH,CACD,cAAe,CACX,wBACA,gBACH,CACD,gBAAiB,CACb,wBACA,kBACH,CACD,iBAAkB,CACd,wBACA,mBACH,CACD,iBAAkB,CACd,wBACA,mBACH,CACD,YAAa,CACT,wBACA,cACH,CACD,aAAc,CACV,wBACA,eACH,CACD,aAAc,CACV,wBACA,eACH,CACD,YAAa,CACT,wBACA,cACH,CACD,aAAc,CACV,wBACA,eACH,CACD,aAAc,CACV,wBACA,eACH,AACL,EACAA,EAAU,mBAAmB,CAAG,CAE5B,mCAAoC,CAChC,6BACA,qBACA,OACH,CACD,mCAAoC,CAChC,6BACA,qBACA,OACH,CACD,mCAAoC,CAChC,6BACA,oBACA,OACH,CACD,6BAA8B,CAC1B,8BACA,qBACA,OACH,CACD,6BAA8B,CAC1B,8BACA,qBACA,OACH,CACD,6BAA8B,CAC1B,8BACA,oBACA,OACH,CACD,8BAA+B,CAC3B,iCACA,qBACA,OACH,CACD,8BAA+B,CAC3B,iCACA,qBACA,OACH,CACD,8BAA+B,CAC3B,iCACA,oBACA,OACH,CACD,6BAA8B,CAC1B,sBACA,qBACA,OACH,CACD,8BAA+B,CAC3B,sBACA,qBACA,OACH,CACD,8BAA+B,CAC3B,sBACA,qBACA,OACH,CACD,8BAA+B,CAC3B,sBACA,oBACA,OACH,CACD,8BAA+B,CAC3B,wBACA,qBACA,OACH,CAED,mCAAoC,CAChC,6BACA,qBACA,OACH,CACD,mCAAoC,CAChC,6BACA,qBACA,OACH,CACD,mCAAoC,CAChC,6BACA,oBACA,OACH,CACD,6BAA8B,CAC1B,8BACA,qBACA,OACH,CACD,6BAA8B,CAC1B,8BACA,qBACA,OACH,CACD,6BAA8B,CAC1B,8BACA,oBACA,OACH,CACD,8BAA+B,CAC3B,iCACA,qBACA,OACH,CACD,8BAA+B,CAC3B,iCACA,qBACA,OACH,CACD,8BAA+B,CAC3B,iCACA,oBACA,OACH,CACD,8BAA+B,CAC3B,sBACA,qBACA,OACH,CACD,8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,mBACpDA,GAGPG,CACDA,CAAAA,IAASA,CAAAA,GAAO,CAAC,EAAC,EADZ,WAAW,CAAG,cAEhB,IAAMoB,GAAqB,CAC9B,CACI,YAAa,KACb,KAAM,cACN,aAAc,MACd,gBAAiB,SACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,SACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,YACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,YACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,aACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,aACN,aAAc,MACd,gBAAiB,SACrB,EACA,CACI,YAAa,KACb,KAAM,WACN,aAAc,MACd,gBAAiB,SACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,SACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,SACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,yBACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,WACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,SACrB,EACA,CACI,YAAa,KACb,KAAM,WACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,WACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,aACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,iBACN,aAAc,MACd,gBAAiB,SACrB,EACA,CACI,YAAa,KACb,KAAM,QACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,WACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,aACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,mBACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,aACN,aAAc,MACd,gBAAiB,SACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,iBACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,qBACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,QACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,cACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,WACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,gBACN,aAAc,MACd,gBAAiB,SACrB,EACA,CACI,YAAa,KACb,KAAM,OACN,aAAc,MACd,gBAAiB,SACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,QACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,YACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,WACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,gBACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,QACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,YACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,OACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,QACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,QACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,aACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,QACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,gBACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,aACN,aAAc,MACd,gBAAiB,SACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,QACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,gBACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,YACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,aACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,YACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,kBACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,WACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,QACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,YACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,SACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,WACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,aACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,QACN,aAAc,MACd,gBAAiB,SACrB,EACA,CACI,YAAa,KACb,KAAM,cACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,YACN,aAAc,MACd,gBAAiB,SACrB,EACA,CACI,YAAa,KACb,KAAM,cACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,OACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,WACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,wBACN,aAAc,MACd,gBAAiB,SACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,WACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,OACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,cACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,WACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,cACN,aAAc,MACd,gBAAiB,SACrB,EACA,CACI,YAAa,KACb,KAAM,QACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,wBACN,aAAc,MACd,gBAAiB,SACrB,EACA,CACI,YAAa,KACb,KAAM,eACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,YACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,WACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,WACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,eACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,QACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,YACN,aAAc,MACd,gBAAiB,SACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,cACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,aACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,WACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,WACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,sBACN,aAAc,MACd,gBAAiB,QACrB,EACA,CACI,YAAa,KACb,KAAM,UACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,SACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,eACN,aAAc,MACd,gBAAiB,OACrB,EACA,CACI,YAAa,KACb,KAAM,0BACN,aAAc,MACd,gBAAiB,SACrB,EACA,CACI,YAAa,KACb,KAAM,sCACN,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AAC,GANa,aAAgB,CAAG,oBAC/BA,GAAY,MAAS,CAAG,aACxBA,GAAY,QAAW,CAAG,eAC1BA,GAAY,OAAU,CAAG,cACzBA,GAAY,MAAS,CAAG,aACjBA,IAMJ,IAAMwB,GAAsB,CAC/B,CACI,KAAM,gBACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,cACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,mBACN,SAAU,MACV,YAAa,IACjB,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,iBACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,sBACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,YACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,YACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,oCACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,yBACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,gBACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,iCACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,yBACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,eACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,iBACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,2BACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,OACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,mBACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,0BACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,cACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,eACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,mBACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,qBACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,cACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,oBACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,mBACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,gBACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,OACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,gBACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,mBACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,8BACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,YACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,YACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,OACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,YACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,gBACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,oCACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,gBACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,YACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,OACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,cACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,gBACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,OACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,gBACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,YACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,YACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,OACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,mBACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,YACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,cACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,gBACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,cACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,YACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,OACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,iBACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,kBACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,2BACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,OACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,wBACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,mBACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,OACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,cACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,mBACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,cACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,sBACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,4CACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,wBACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,cACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,eACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,4BACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,mCACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,iCACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,eACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,eACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,YACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,eACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,kBACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,eACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,2CACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,cACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,YACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,yBACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,YACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,cACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,cACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,OACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,sBACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,eACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,2BACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,wBACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,sBACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,uBACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,iBACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,aACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,0BACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,YACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,UACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,oBACN,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,QACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,SACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACA,CACI,KAAM,WACN,aAAc,GACd,YAAa,KACb,SAAU,KACd,EACH,A,qICpuJM,IAAMC,EAAqB,CAC9B,KAAM,OACN,SAAU,WACV,SAAU,WACV,mBAAoB,kBACpB,iBAAkB,oBAClB,OAAQ,SACR,eAAgB,4BAChB,aAAc,YACd,aAAc,gBACd,UAAW,iBACX,QAAS,WACT,oBAAqB,uBACrB,2BAA4B,gCAC5B,iBAAkB,MAClB,qBAAsB,2BACtB,YAAa,eACb,WAAY,cACZ,0BAA2B,sCAC3B,iBAAkB,oBAClB,cAAe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I,KAAM,KACN,KAAM,SACV,EACA,CACI,KAAM,KACN,KAAM,QACV,EACA,CACI,KAAM,KACN,KAAM,MACV,EACA,CACI,KAAM,KACN,KAAM,OACV,EACA,CACI,KAAM,KACN,KAAM,UACV,EACA,CACI,KAAM,KACN,KAAM,SACV,EACA,CACI,KAAM,KACN,KAAM,QACV,EACA,CACI,KAAM,KACN,KAAM,UACV,EACA,CACI,KAAM,KACN,KAAM,WACV,EACA,CACI,KAAM,KACN,KAAM,OACV,EACA,CACI,KAAM,KACN,KAAM,UACV,EACA,CACI,KAAM,KACN,KAAM,eACV,EACA,CACI,KAAM,KACN,KAAM,UACV,EACA,CACI,KAAM,KACN,KAAM,WACV,EACA,CACI,KAAM,KACN,KAAM,aACV,EACA,CACI,KAAM,KACN,KAAM,UACV,EACA,CACI,KAAM,KACN,KAAM,SACV,EACA,CACI,KAAM,KACN,KAAM,UACV,EACA,CACI,KAAM,KACN,KAAM,QACV,EACA,CACI,KAAM,KACN,KAAM,eACV,EACA,CACI,KAAM,KACN,KAAM,YACV,EACA,CACI,KAAM,KACN,KAAM,YACV,EACA,CACI,KAAM,KACN,KAAM,UACV,EACA,CACI,KAAM,KACN,KAAM,gBACV,EACA,CACI,KAAM,KACN,KAAM,cACV,EACA,CACI,KAAM,KACN,KAAM,MACV,EACA,CACI,KAAM,KACN,KAAM,UACV,EACA,CACI,KAAM,KACN,KAAM,QACV,EACA,CACI,KAAM,KACN,KAAM,cACV,EACA,CACI,KAAM,KACN,KAAM,cACV,EACA,CACI,KAAM,KACN,KAAM,gBACV,EACA,CACI,KAAM,KACN,KAAM,cACV,EACA,CACI,KAAM,KACN,KAAM,WACV,EACA,CACI,KAAM,KACN,KAAM,OACV,EACA,CACI,KAAM,KACN,KAAM,MACV,EACA,CACI,KAAM,KACN,KAAM,SACV,EACA,CACI,KAAM,KACN,KAAM,UACV,EACA,CACI,KAAM,KACN,KAAM,YACV,EACA,CACI,KAAM,KACN,KAAM,eACV,EACA,CACI,KAAM,K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