{"version":3,"file":"8519.2058d1f5887b49d1.js","sources":["webpack://storefronts/./src/shared/components/home.tsx","webpack://storefronts/./src/shared/containers/home.tsx"],"sourcesContent":["/* 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, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport * as React from 'react';\nimport * as PropTypes from 'prop-types';\nimport { mergeStyles } from '@fluentui/react';\nimport SpzaComponent from './spzaComponent';\nimport { routes } from '@shared/routerHistory';\nimport { Constants } from '@shared/utils/constants';\nimport { SpzaInstrumentService } from '@shared/services/telemetry/spza/spzaInstrument';\nimport { getWindow } from '@shared/services/window';\nimport { NpsModule } from '@shared/utils/npsUtils';\nimport { addClassToElement, removeClassFromElements } from '@shared/utils/appUtils';\nimport { ExternalLink } from '@shared/components/externalLink';\nimport { logger } from '@src/logger';\nimport { Testimonials } from './Testimonials';\nimport classNames from 'classnames';\nconst RemoteHome = /*#__PURE__*/ React.lazy(()=>import('./FederatedModules/RemoteHome'));\nclass Home extends SpzaComponent {\n telemetryComponentDidMount() {\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.loadTimeHomeFilters = performance.now() - (requestStart - navigationStart);\n }\n }\n componentDidMount() {\n this.telemetryComponentDidMount();\n const perfPayload = {\n page: getWindow().location.href,\n action: Constants.Telemetry.Action.PageLoad,\n actionModifier: Constants.Telemetry.ActionModifier.End\n };\n this.instrument.probe('logTelemetryInfo', perfPayload);\n logger.info('', {\n action: perfPayload.action,\n actionModifier: perfPayload.actionModifier\n });\n NpsModule.checkForNPS();\n if (document.getElementsByTagName('title')[0]) {\n document.getElementsByTagName('title')[0].innerHTML = this.context.loc('home_pageTitle');\n }\n removeClassFromElements('spza-accessibility-selected');\n addClassToElement(Constants.SearchBy.Id, 'uhfCatLogo', 'spza-accessibility-selected');\n }\n /// /////////////////////////////// Customer success story Tabs ///////////////////////////////////////\n viewMoreRecommendations() {\n const marginClass = mergeStyles({\n marginTop: '32px'\n });\n const linkClass = classNames({\n actionBannerButton: true,\n [marginClass]: true\n });\n return /*#__PURE__*/ _jsx(_Fragment, {\n children: /*#__PURE__*/ _jsx(ExternalLink, {\n href: \"https://aka.ms/appsourcecustomerrecommendations\",\n className: linkClass,\n accessibilityEnabled: true,\n target: \"_blank\",\n rel: \"noreferrer\",\n children: this.context.loc('Testimonials_View_More', 'View more recommendations >')\n })\n });\n }\n renderImpl() {\n const context = this.context;\n // home page needs both curated data and app data to exist, if it doesn't let's render a progress bar\n if (!this.props.allApps) {\n return null;\n }\n const { defaultSuccessStoryTab } = this.props;\n return /*#__PURE__*/ _jsxs(\"div\", {\n className: \"spza_homePage\",\n role: \"main\",\n children: [\n /*#__PURE__*/ _jsx(RemoteHome, {}),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"section homeSuccessStory\",\n children: [\n /*#__PURE__*/ _jsx(\"h3\", {\n className: \"successStoryHeader\",\n children: context.loc('Home_SuccessStory_Title', 'Recommendations from customers')\n }),\n /*#__PURE__*/ _jsx(Testimonials, {\n defaultTestimonialTabName: defaultSuccessStoryTab\n }),\n this.viewMoreRecommendations()\n ]\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"section homeMarketing\",\n children: [\n /*#__PURE__*/ _jsx(\"span\", {\n className: \"helpSectionTitle\",\n children: this.context.loc('Help_Section_Title')\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"marketContent\",\n children: [\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"cardContent\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"marketIcon icon-shop-50\"\n }),\n /*#__PURE__*/ _jsx(\"h5\", {\n className: \"marketHeader\",\n children: context.loc('Home_Marketing1Header')\n }),\n /*#__PURE__*/ _jsx(\"p\", {\n className: \"marketParagraph\",\n children: context.loc('Home_Marketing1Content')\n }),\n /*#__PURE__*/ _jsx(ExternalLink, {\n href: \"https://aka.ms/AppSourceDocOverview\",\n className: \"c-hyperlink supportLink\",\n accessibilityEnabled: true,\n children: this.context.loc('App_LearnMore')\n })\n ]\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"cardContent\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"marketIcon icon-shopping-cart-50\"\n }),\n /*#__PURE__*/ _jsx(\"h5\", {\n className: \"marketHeader\",\n children: context.loc('Home_Marketing2Header')\n }),\n /*#__PURE__*/ _jsx(\"p\", {\n className: \"marketParagraph\",\n children: context.loc('Home_Marketing2Content')\n }),\n /*#__PURE__*/ _jsx(ExternalLink, {\n className: 'c-hyperlink supportLink',\n href: this.context.buildHref(routes.partners, {}, {}),\n accessibilityEnabled: true,\n children: this.context.loc('Sell_With_Us')\n })\n ]\n }),\n /*#__PURE__*/ _jsxs(\"div\", {\n className: \"cardContent\",\n children: [\n /*#__PURE__*/ _jsx(\"div\", {\n className: \"marketIcon icon-what-this-50\"\n }),\n /*#__PURE__*/ _jsx(\"h5\", {\n className: \"marketHeader\",\n children: context.loc('Home_Marketing3Header')\n }),\n /*#__PURE__*/ _jsx(\"p\", {\n className: \"marketParagraph\",\n children: context.loc('Home_Marketing3Content')\n }),\n /*#__PURE__*/ _jsx(ExternalLink, {\n href: \"https://aka.ms/AppSourceContactUs\",\n className: \"c-hyperlink supportLink\",\n accessibilityEnabled: true,\n children: this.context.loc('ContactUs')\n })\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, \"instrument\", void 0);\n this.instrument = SpzaInstrumentService.getProvider();\n this.state = {\n resultSearchID: 0\n };\n }\n}\nHome.contextTypes = {\n loc: PropTypes.func,\n locParams: PropTypes.func,\n buildHref: PropTypes.func,\n renderErrorModal: PropTypes.func\n};\nexport default Home;\n","import HomeComponent from '@shared/components/home';\nimport { Constants } from '@shared/utils/constants';\nimport { parseCuratedSections } from '@shared/utils/hashMapUtils';\nimport { getTelemetryDetailContentCurrentView } from '@shared/utils/appUtils';\nimport { connect } from 'react-redux';\nimport { isOneTimePaymentOffer } from '@shared/utils/onetimepaymentoffers';\nimport { withRouter } from '@shared/routerHistory';\nexport const mapStateToProps = (state, ownProps)=>{\n const query = ownProps.location.query;\n const filterTab = query && query.filterTab ? query.filterTab : null;\n const successStoryTab = query === null || query === void 0 ? void 0 : query.successStoryTab;\n const dataList = state.apps.dataList.filter(({ entityId })=>!isOneTimePaymentOffer(entityId));\n return {\n appList: dataList,\n hashMap: state.apps.idMap,\n featuredApps: parseCuratedSections(state.apps.curatedData[Constants.Curated.top], dataList, state.apps.idMap)[0],\n searchID: state.search.searchIdCurrentlyOngoing,\n appSearchResults: state.apps.subsetData,\n servicesSeachResults: state.services.subsetData,\n allApps: dataList,\n allServices: state.services.dataList,\n searchQuery: state.apps.subsetSearchQuery,\n urlQuery: query,\n selectedLocale: state.config.locale,\n currentView: getTelemetryDetailContentCurrentView(state.config.currentView, state.config.currentGalleryViewIsCurated),\n appsCuratedData: state.apps.curatedData,\n dataMap: state.apps.dataMap,\n appsActiveFilters: state.apps.activeFilters,\n servicesActiveFilters: state.services.activeFilters,\n appsCount: state.apps.count,\n servicesCount: state.services.count,\n showPopularity: state.config.featureFlags.ShowPopularity === 'true',\n defaultTab: filterTab,\n defaultSuccessStoryTab: successStoryTab\n };\n};\nconst Home = withRouter(connect(mapStateToProps)(HomeComponent));\nexport default Home;\n"],"names":["_define_property","obj","key","value","Object","RemoteHome","Home","_getWindow_performance","_getWindow","window","navigationStart","requestStart","performance","perfPayload","logger","document","marginClass","linkClass","context","defaultSuccessStoryTab","Testimonials","props","mapStateToPro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