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B9B,KAAKuP,yBAAyB5J,EAEtC,CAEO6J,eAAe7J,GAElB3F,KAAKuP,0BADgB5J,GAAO7D,OAAS,EAAI,GAAG6D,OAAa,IAAvC,gBAEtB,CAEO4J,yBAAyB5J,GAC5B,GAAI3F,KAAKoP,gBAAgBrL,YAAa,CAClC,MAAM0L,EAAOzP,KAAKmP,SAASM,KACrBC,EAAiBD,EAAKE,cAAc,0BAEpCC,EAAuBH,EAAKE,cAAc,SAC5CC,GACA5P,KAAKqP,SAASQ,YAAYJ,EAAMG,GAGpC,MAAME,EAAe9P,KAAKqP,SAASU,cAAc,SAC3CC,EAAOhQ,KAAKqP,SAASY,WAAWtK,GAEtC3F,KAAKqP,SAASa,YAAYJ,EAAcE,GAEpCN,EACA1P,KAAKqP,SAASc,aAAaV,EAAMK,EAAcJ,GAE/C1P,KAAKqP,SAASa,YAAYT,EAAMK,EAExC,CACJ,CAACnP,SAAAX,KAAA,mBAAAY,iBA3CQyN,GAAgBxN,mBAKbuP,MAAQvP,MAAAC,KAAA,EAAAH,SAAAX,KAAA,WAAAqQ,EAAApP,IAAA,OALXoN,EAAgBnN,QAAhBmN,EAAgBlN,mBAAhBkN,CAAgB,qBCHvB,SAAUnG,EAAWoI,GACvB,IAAKA,EACD,OAAOA,EAEX,MAAMC,EAAgBD,EAAEE,MAAM,KAE9B,QAASC,EAAI,EAAGA,EAAIF,EAAIzO,OAAQ2O,IAC5BF,EAAIE,GAAKF,EAAIE,GAAGC,OAAO,GAAGC,cAAgBJ,EAAIE,GAAGG,MAAM,GAG3D,OAAOL,EAAIvH,KAAK,IACpB","names":["isNoindexCategory","attachments","some","obj","name","SetHead","createAction","SEO_SET_HEAD","props","SetHeadSuccess","HomeRouteChange","SetDefaultSeo","SetHomeSeo","SEO_SET_HOME","SetCategorySeo","SEO_SET_CATEGORY","SetLookbookSeo","SEO_SET_LOOKBOOK","SetProductSeo","SEO_SET_PRODUCT","SetStoreLocatorSeo","SetMyAccountSeo","SetCheckoutSeo","SetShopCartSeo","SetGiftCardSeo","SetErrorPageSeo","SetOrderStatus","SetLastSectionTranslated","SEO_SET_LAST_SECTION_TRANSLATED","SetNoindex","SetCategoryNoindex","SEO_SET_CATEGORY_NOINDEX","SetNoIndexSuccess","SetWorldwideSeo","selectSeoState","createFeatureSelector","getHomeUrls","createSelector","state","homeUrls","getLastSectionTranslated","lastSectionTranslated","SeoApiRepository","constructor","http","requestService","this","getCategoryTranslations","categoryId","storeId","get","requestUrl","undefined","withCredentials","pipe","catchError","of","static","t","i0","i1","i2","core","jDH","factory","ɵfac","checkNoindex","seoConfig","countryCode","languageCode","defaultLanguageCode","category","hasNoIndexCountryLang","Object","hasOwn","noindexCountryLangs","length","lang","langShouldHaveNoindex","noindexExcludedCountries","country","hasNoIndexAttachment","indexHomeTemplates","template","SeoEffects","actions$","pageTitleService","seoService","storageService","store","route","translateService","platform","seoApiRepository","window","isFirstLoad","noindexTemplates","getMenuCategories$","select","CategoriesSelectors","getMenuCategories","getCategoriesNavigation$","getCategoriesNavigation","loadHomeSuccessEffect$","createEffect","ofType","ConfigureHomeLinkSuccess","LoadLastSection","filter","isBrowser","switchMap","routerPublicQueries","getDataFromRouter","params","take","map","lastSectionSaved","getValue","page","pageName","checkMatch","applicationHomePagesMap","sectionQueryParam","snapshot","queryParamMap","SetLastSection","section","navigation","ApplicationSections","WOMEN","MEN","BG","applicationCategoryPagesMap","NoOpAction","setHead$","seoData","setTitle","title","url","location","href","urlParsed","isHome","endsWith","addHeadData","metaDescription","imgSrc","setSeoOnDefaultRouteChange$","SetPage","seoPage","index","setDefaultSeo$","setHomeSeo$","concatMap","action","categories","mergeMap","menuCategory","translations","seoCategory","setCategorySeo$","concatLatestFrom","getCountryCode","seoCat","categorySeo","firstProductImagePath","setLandingSeo$","LoadLandingPage","landing","setLookbookSeo$","seoTitle","seoDesc","seoProductRouteChange$","getProductTitle","product","productFamily","capitalize","detail","familyInfo","familyName","toLowerCase","productName","replace","trim","productColors","colors","forEach","color","titleParts","Boolean","join","attributes","attr","type","value","imgPath","setStoreLocatorSeo$","setMyAccountSeo$","data","header_my_account","setCheckoutSeo$","setShopcartSeo$","setGiftCardSeo$","setOrderStatus$","setErrorPageSeo$","setLastSectionTranslated$","find","cat","sectionPathEn","sectionPath","setWWSeo$","setNoindexOnRouteChange$","includes","setNoIndexMeta","setNoindex$","combineLatest","getLanguageCode","getDefaultLanguage","getCmsConfigValue","defaultLang","removeNoIndexMeta","code","setCategoryHreflangs$","getStoreList","getStoreId","storeList","indexConfs","removeHreflangs","id","regenerateHreflangs","categoryUrlTranslations","isCategory","categoryAttachments","setProductHreflangs$","productUrlTranslations","setHreflangsOnRouteChange$","getUrlFromRouter","getStoreAndLanguage","storeLang","sanitizedUrl","removeCountryAndLanguageFromUrl","urlObject","URL","regex","RegExp","sanitizedPath","pathname","startsWith","toString","urlPath","i3","i4","i5","i6","i7","i8","i9","WINDOW","seoReducers","createReducer","seoInitialState","on","homeConfs","homeConfig","locationPath","SeoSelectors","SeoActionTypes","SeoPublicModule","SeoModule","$C","G2t","provideState","reducer","provideEffects","ConfigService","PageTitleService","imports","CommonModule","TranslateModule","forChild","InitialSeoInfo","metaTitle","seoProductH1","mainHeader","longDescription","secondaryTitle","secondaryDescription","productId","rendererFactory","document","platformService","renderer","createRenderer","addTitleBeforePreconnect","setCustomTitle","head","preconnectLink","querySelector","existingTitleElement","removeChild","titleElement","createElement","text","createText","appendChild","insertBefore","DOCUMENT","_angular_core__WEBPACK_IMPORTED_MODULE_0__","s","arr","split","i","charAt","toUpperCase","slice"],"ignoreList":[],"sourceRoot":"webpack:///","sources":["./code/apps/frontend/src/app/core/application/use-cases/seo/is-no-index-category.use-case.ts","./code/apps/frontend/src/app/features/seo/infraestructure/state/seo.actions.ts","./code/apps/frontend/src/app/features/seo/infraestructure/state/seo.selectors.ts","./code/apps/frontend/src/app/features/seo/infraestructure/api/seo.api.repository.ts","./code/apps/frontend/src/app/core/application/use-cases/seo/check-no-index.use-case.ts","./code/apps/frontend/src/app/features/seo/application/use-cases/index-home-templates.use-case.ts","./code/apps/frontend/src/app/features/seo/infraestructure/state/seo.effects.ts","./code/apps/frontend/src/app/features/seo/application/use-cases/get-product-title.use-case.ts","./code/apps/frontend/src/app/core/application/use-cases/url/remove-country-lang.use-case.ts","./code/apps/frontend/src/app/features/seo/infraestructure/state/seo.reducers.ts","./code/apps/frontend/src/app/features/seo/pubic_api.ts","./code/apps/frontend/src/app/features/seo/seo.module.ts","./code/apps/frontend/src/app/features/seo/infraestructure/state/seo.state.ts","./code/apps/frontend/src/app/layout/ui/services/page-title.service.ts","./code/libs/frontend/common/utils/src/use-cases/capitalize.ts"],"sourcesContent":["import { CategoryAttachments } from '../../../domain/models/category.models';\n\n/**\n * Check if category should have noindex\n *\n * @param attachments Category attachments\n *\n * @returns True if category should have noindex\n */\nexport function isNoindexCategory(attachments: CategoryAttachments[]): boolean {\n return attachments?.some(obj => obj.name === 'NOINDEX');\n}\n","import { createAction, props } from '@ngrx/store';\n\nimport { Category, CoreMenuCategory } from '@core/domain/models/category.models';\nimport { SeoInfo } from '@core/domain/models/seo.models';\nimport { ProductPublicModels } from '@features/products/product';\n\n// SEO Action types\nexport const SeoActionTypes = {\n SEO_SET_HEAD: '[SEO] SEO_SET_METAS',\n SEO_SET_HEAD_SUCCESS: '[SEO] SEO_SET_METAS_SUCCESS',\n SEO_HOME_ROUTE_CHANGE: '[SEO] SEO_HOME_ROUTE_CHANGE',\n SEO_SET_LAST_SECTION_TRANSLATED: '[SEO] SEO_SET_LAST_SECTION_TRANSLATED',\n\n // SEO For Templates:\n SEO_SET_DEFAULT_SEO: '[SEO] SET_DEFAULT_SEO',\n SEO_SET_HOME: '[SEO] SET_HOME',\n SEO_SET_CATEGORY: '[SEO] SET_CATEGORY',\n SEO_SET_LOOKBOOK: '[SEO] SET_LOOKBOOK',\n SEO_SET_PRODUCT: '[SEO] SET_PRODUCT',\n SEO_SET_STORE_LOCATOR: '[SEO] SET_STORE_LOCATOR',\n SEO_SET_MY_ACCOUNT: '[SEO] SET_MY_ACCOUNT',\n SEO_SET_CHECKOUT: '[SEO] SET_CHECKOUT',\n SEO_SET_SHOP_CART: '[SEO] SET_SHOP_CART',\n SEO_SET_GIFT_CARD: '[SEO] SET_GIFT_CARD',\n SEO_SET_ERROR_PAGE: '[SEO] SET_ERROR_PAGE',\n SEO_SET_ORDER_STATUS: '[SEO] SEO_SET_ORDER_STATUS',\n SEO_SET_WW: '[SEO] SET_WW',\n\n // NOINDEX\n SEO_SET_NOINDEX: '[SEO] SEO_SET_NOINDEX',\n SEO_SET_CATEGORY_NOINDEX: '[SEO] SEO_SET_NOINDEX',\n SEO_SET_NOINDEX_SUCCESS: '[SEO] SEO_SET_NOINDEX_SUCCESS',\n};\n\nexport const SetHead = createAction(\n SeoActionTypes.SEO_SET_HEAD,\n props<{ title: string; metaDescription?: string; imgSrc?: string; isHome?: boolean }>()\n);\n\nexport const SetHeadSuccess = createAction(\n SeoActionTypes.SEO_SET_HEAD_SUCCESS\n);\n\nexport const HomeRouteChange = createAction(\n SeoActionTypes.SEO_HOME_ROUTE_CHANGE\n);\n\n// SEO Templates\nexport const SetDefaultSeo = createAction(SeoActionTypes.SEO_SET_DEFAULT_SEO);\n\nexport const SetHomeSeo = createAction(SeoActionTypes.SEO_SET_HOME, props<{ index: number }>());\n\nexport const SetCategorySeo = createAction(\n SeoActionTypes.SEO_SET_CATEGORY,\n props<{ categorySeo: SeoInfo; category: Category }>()\n);\n\nexport const SetLookbookSeo = createAction(\n SeoActionTypes.SEO_SET_LOOKBOOK,\n props<{ category: CoreMenuCategory }>()\n);\n\nexport const SetProductSeo = createAction(\n SeoActionTypes.SEO_SET_PRODUCT,\n props<{\n product: ProductPublicModels.PublicProduct;\n imgPath: string;\n }>()\n);\n\nexport const SetStoreLocatorSeo = createAction(SeoActionTypes.SEO_SET_STORE_LOCATOR);\n\nexport const SetMyAccountSeo = createAction(\n SeoActionTypes.SEO_SET_MY_ACCOUNT\n);\n\nexport const SetCheckoutSeo = createAction(\n SeoActionTypes.SEO_SET_CHECKOUT\n);\n\nexport const SetShopCartSeo = createAction(\n SeoActionTypes.SEO_SET_SHOP_CART\n);\n\nexport const SetGiftCardSeo = createAction(\n SeoActionTypes.SEO_SET_GIFT_CARD\n);\n\nexport const SetErrorPageSeo = createAction(\n SeoActionTypes.SEO_SET_ERROR_PAGE\n);\n\nexport const SetOrderStatus = createAction(\n SeoActionTypes.SEO_SET_ORDER_STATUS\n);\n\nexport const SetLastSectionTranslated = createAction(\n SeoActionTypes.SEO_SET_LAST_SECTION_TRANSLATED,\n props<{ lastSectionTranslated: string }>()\n);\n\n// NOINDEX\nexport const SetNoindex = createAction(\n SeoActionTypes.SEO_SET_NOINDEX\n);\n\nexport const SetCategoryNoindex = createAction(\n SeoActionTypes.SEO_SET_CATEGORY_NOINDEX,\n props<{ category: Category }>()\n);\n\nexport const SetNoIndexSuccess = createAction(\n SeoActionTypes.SEO_SET_NOINDEX_SUCCESS\n);\n\nexport const SetWorldwideSeo = createAction(\n SeoActionTypes.SEO_SET_WW\n);\n","import { createFeatureSelector, createSelector } from '@ngrx/store';\n\nimport { SeoState } from './seo.state';\n\nconst selectSeoState = createFeatureSelector('seo');\n\nexport const getHomeUrls = createSelector(selectSeoState, (state: SeoState) =>\n state?.homeUrls);\n\nexport const getLastSectionTranslated = createSelector(selectSeoState, (state: SeoState) =>\n state?.lastSectionTranslated);\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { catchError, Observable, of } from 'rxjs';\n\nimport { HttpRequestsService } from '@core/infrastructure/http-requests/http-requests.service';\n\n@Injectable()\nexport class SeoApiRepository {\n constructor(\n private readonly http: HttpClient,\n private readonly requestService: HttpRequestsService,\n ) {}\n\n public getCategoryTranslations(\n categoryId: string | number,\n storeId: string,\n ): Observable {\n return this.http.get(\n this.requestService.requestUrl(\n `catalog/store/${storeId}/category/${categoryId}/seolang`,\n undefined,\n [\n ],\n true,\n '1'\n ),\n { withCredentials: true }\n ).pipe(\n catchError(() => of(null))\n );\n }\n}\n","import { Category } from '../../../domain/models/category.models';\n\nimport { isNoindexCategory } from './is-no-index-category.use-case';\n\nimport { NoIndexConfiguration } from '@core/domain/models/seo.models';\n\n/**\n * Check if country/lang or category should have noindex\n *\n * @param countryCode Country code\n * @param languageCode Language code\n * @param defaultLanguageCode Default language code\n * @param category Category\n *\n * @returns True if country/lang or category should have noindex\n */\nexport function checkNoindex(\n seoConfig: NoIndexConfiguration,\n countryCode: string,\n languageCode: string,\n defaultLanguageCode: string,\n category?: Category\n): boolean {\n const hasNoIndexCountryLang = Object.hasOwn(seoConfig.noindexCountryLangs, countryCode)\n && (seoConfig.noindexCountryLangs[countryCode].length === 0\n || seoConfig.noindexCountryLangs[countryCode].some(\n lang => lang === languageCode\n ));\n\n // Case 2: Secndary languages without exceptions\n const langShouldHaveNoindex = defaultLanguageCode !== languageCode\n && !seoConfig.noindexExcludedCountries?.some(\n country => country === countryCode\n );\n\n // Case 3: If it's category and has attachment noindex\n const hasNoIndexAttachment = isNoindexCategory(category?.attachments);\n\n return langShouldHaveNoindex || hasNoIndexAttachment || hasNoIndexCountryLang;\n}\n","/**\n * Set templates order from MenuCategories\n *\n * @param template Template name\n *\n * @returns Template order\n */\nexport function indexHomeTemplates(template: string): number {\n switch (template) {\n case 'ItxHomeMenPage':\n return 1;\n case 'ItxHomeBgPage':\n return 2;\n default:\n return 0;\n }\n}\n","/* eslint-disable no-secrets/no-secrets */\nimport { Inject, Injectable } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { WINDOW } from '@ng-web-apis/common';\nimport { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { concatLatestFrom } from '@ngrx/operators';\nimport { Store } from '@ngrx/store';\nimport { TranslateService } from '@ngx-translate/core';\nimport { combineLatest, mergeMap, of } from 'rxjs';\nimport { concatMap, filter, map, switchMap, take } from 'rxjs/operators';\n\nimport { SeoApiRepository } from '../api/seo.api.repository';\n\nimport {\n SetHead,\n SetHeadSuccess,\n SetCategorySeo,\n SetCheckoutSeo,\n SetDefaultSeo,\n SetErrorPageSeo,\n SetNoindex,\n SetGiftCardSeo,\n SetHomeSeo,\n SetLastSectionTranslated,\n SetMyAccountSeo,\n SetNoIndexSuccess,\n SetOrderStatus,\n SetProductSeo,\n SetShopCartSeo,\n SetStoreLocatorSeo,\n SetWorldwideSeo,\n SetLookbookSeo,\n SetCategoryNoindex,\n} from './seo.actions';\n\nimport { checkNoindex } from '@core/application/use-cases/seo/check-no-index.use-case';\nimport { removeCountryAndLanguageFromUrl } from '@core/application/use-cases/url/remove-country-lang.use-case';\nimport { applicationCategoryPagesMap, applicationHomePagesMap } from '@core/domain/constants/application-pages.const';\nimport { ApplicationSections } from '@core/domain/models/application-section.model';\nimport { CoreMenuCategory } from '@core/domain/models/category.models';\nimport { CommonWindow } from '@core/domain/models/common-window.model';\nimport { NoIndexConfiguration } from '@core/domain/models/seo.models';\nimport { StoreLanguage } from '@core/domain/models/store.models';\nimport { CorePlatformService } from '@core/infrastructure/platform/platform.service';\nimport { SetPage } from '@core/infrastructure/state/core-commands.actions';\nimport { ConfigureHomeLinkSuccess } from '@core/infrastructure/state/core-events.actions';\nimport { getCmsConfigValue, getCountryCode, getDefaultLanguage, getLanguageCode, getStoreAndLanguage, getStoreId, getStoreList } from '@core/infrastructure/state/core.selectors';\nimport { CoreStorageService } from '@core/infrastructure/storage/storage.service';\nimport { SeoService } from '@core/ui/services/seo.service';\nimport { CategoriesSelectors } from '@features/category';\nimport { getProductTitle } from '@features/seo/application/use-cases/get-product-title.use-case';\nimport { indexHomeTemplates } from '@features/seo/application/use-cases/index-home-templates.use-case';\nimport { capitalize, checkMatch } from '@frontend/common/utils';\nimport { routerPublicQueries } from '@frontend/libs/duttirouter';\nimport { PageTitleService } from '@layout/ui/services/page-title.service';\nimport { LoadLandingPage } from '@pages/category/store/category-page.actions';\nimport { LoadLastSection, NoOpAction, SetLastSection } from '@shared/menu-categories/store/menu-categories.actions';\n\n/**\n * SEO Effects\n */\n@Injectable()\nexport class SeoEffects {\n public isFirstLoad = true;\n\n private readonly noindexTemplates = ['ItxBagCollectionSliderCreatorsPage', 'ItxRunwayPage', 'ItxStoriesPage'];\n\n private readonly getMenuCategories$ = this.store.select(CategoriesSelectors.getMenuCategories);\n\n private readonly getCategoriesNavigation$ = this.store.select(CategoriesSelectors.getCategoriesNavigation);\n\n constructor(\n private readonly actions$: Actions,\n private readonly pageTitleService: PageTitleService,\n private readonly seoService: SeoService,\n private readonly storageService: CoreStorageService,\n private readonly store: Store,\n private readonly route: ActivatedRoute,\n private readonly translateService: TranslateService,\n private readonly platform: CorePlatformService,\n private readonly seoApiRepository: SeoApiRepository,\n @Inject(WINDOW) private readonly window: CommonWindow,\n ) {}\n\n public loadHomeSuccessEffect$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(ConfigureHomeLinkSuccess, LoadLastSection),\n filter(() => this.platform.isBrowser()),\n switchMap(() => this.store.select(routerPublicQueries.getDataFromRouter)),\n filter(params => !!params),\n // eslint-disable-next-line rxjs/no-unsafe-first\n take(1),\n // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: \n map((params) => {\n const lastSectionSaved: string | undefined = this.storageService.getValue('LAST_SECTION');\n const page = params?.pageName;\n if (checkMatch(page, applicationHomePagesMap)) {\n const sectionQueryParam = this.route.snapshot?.queryParamMap?.get('section');\n if (sectionQueryParam) {\n return SetLastSection({ section: sectionQueryParam, navigation: false });\n }\n\n // biome-ignore lint/suspicious/noImplicitAnyLet: \n let section;\n\n if (page === 'ItxHomePage' || page === 'ItxHomeWomenPage') {\n section = ApplicationSections.WOMEN;\n }\n if (page === 'ItxHomeMenPage') {\n section = ApplicationSections.MEN;\n }\n if (page === 'ItxHomeBgPage') {\n section = ApplicationSections.BG;\n }\n\n return SetLastSection({ section, navigation: false });\n }\n if (checkMatch(page, applicationCategoryPagesMap)) {\n return NoOpAction();\n }\n return SetLastSection({ section: lastSectionSaved || ApplicationSections.WOMEN, navigation: false });\n })\n );\n });\n\n public setHead$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetHead),\n filter(() => this.platform.isBrowser()),\n map((seoData) => {\n this.pageTitleService.setTitle(seoData.title);\n const url: string = this.window.location.href;\n const urlParsed: string = seoData.isHome && !url.endsWith('/') ? `${url}/` : url; // Workaround to add end slash on homes\n this.seoService.addHeadData(\n seoData.title,\n seoData.metaDescription,\n urlParsed,\n seoData.imgSrc,\n );\n }),\n map(() => SetHeadSuccess()),\n );\n });\n\n // Default route changes\n public setSeoOnDefaultRouteChange$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetPage),\n map((seoPage: { page: string }) => {\n switch (seoPage.page) {\n case 'ItxCategoryPage':\n case 'ItxAngularLookbookPage':\n case 'ItxProductPage':\n return NoOpAction(); // Handled in own modules\n case 'ItxHomePage':\n case 'ItxHomeMenPage':\n case 'ItxHomeWomenPage':\n case 'ItxHomeBgPage':\n return SetHomeSeo({ index: indexHomeTemplates(seoPage.page) });\n case 'ItxStoreLocatorPage':\n case 'ItxAngularStoreLocatorPage':\n return SetStoreLocatorSeo();\n case 'ItxMyAccountPage':\n case 'ItxAngularUserPage':\n case 'ItxAngularMyAccountPage':\n return SetMyAccountSeo();\n case 'ItxCheckoutPage':\n case 'ItxAngularCheckoutNodePage':\n case 'ItxAngularCheckoutPage':\n return SetCheckoutSeo();\n case 'ItxShopCartPage':\n case 'ItxAngularShopcartPage':\n return SetShopCartSeo();\n case 'ItxGiftCardPage':\n case 'ItxAngularGiftCardPage':\n return SetGiftCardSeo();\n case 'Itx410ErrorPage':\n return SetErrorPageSeo();\n case 'ItxAngularOrderStatus':\n return SetOrderStatus();\n default:\n // 'ItxAngularCmsRenderPage'\n // 'ItxCompanyPage'\n // 'ItxNewsletterPage'\n // 'ItxHelpPage'\n // 'ItxMassimoDuttiFeelPage'\n // 'ItxChatPage'\n // and others...\n return SetDefaultSeo();\n }\n }),\n );\n });\n\n // Default route changes\n public setDefaultSeo$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetDefaultSeo),\n map(() => {\n const seoTitle = 'Massimo Dutti';\n return SetHead({ title: seoTitle, metaDescription: undefined });\n }),\n );\n });\n\n public setHomeSeo$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetHomeSeo),\n concatMap((action) =>\n this.getMenuCategories$.pipe(\n filter(categories => categories?.length > 0),\n take(1),\n mergeMap((categories) => {\n const menuCategory: CoreMenuCategory = categories[action.index];\n\n if (action.index === 0) {\n return this.translateService.get(['dev.titleseohome']).pipe(\n take(1),\n map((translations: Record) => SetHead({\n title: `${translations['dev.titleseohome'] || 'Massimo Dutti' }`,\n metaDescription: menuCategory.seoCategory.metaDescription,\n isHome: true,\n }))\n );\n }\n\n return of(SetHead({\n title: menuCategory.seoCategory.title,\n metaDescription: menuCategory.seoCategory.metaDescription,\n isHome: true,\n }));\n })\n ))\n );\n });\n\n public setCategorySeo$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetCategorySeo),\n concatLatestFrom(() => this.store.select(getCountryCode)),\n map(([action, countryCode]) => {\n const seoCat = action.categorySeo;\n return SetHead({\n title: `${seoCat.title} - Massimo Dutti - ${countryCode}`,\n metaDescription: seoCat.metaDescription,\n imgSrc: seoCat.firstProductImagePath || null,\n });\n }),\n );\n });\n\n public setLandingSeo$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(LoadLandingPage),\n map((action) => {\n const seoCat = action.landing.seoCategory;\n\n if (!(seoCat?.title && seoCat.metaDescription)) {\n return NoOpAction();\n }\n\n return SetHead({\n title: seoCat.title,\n metaDescription: seoCat.metaDescription,\n });\n }),\n );\n });\n\n public setLookbookSeo$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetLookbookSeo),\n map((action) => {\n const title = action.category?.seoCategory?.title;\n const seoTitle = title ? `${title} · Editorial | Massimo Dutti` : 'Massimo Dutti';\n const seoDesc = action.category?.seoCategory?.metaDescription;\n return SetHead({ title: seoTitle, metaDescription: seoDesc });\n }),\n );\n });\n\n // Product route changes\n public seoProductRouteChange$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetProductSeo),\n map((action) => {\n const seoTitle = getProductTitle(action.product);\n let seoDesc = capitalize(action.product?.name?.toLowerCase());\n // biome-ignore lint/complexity/noForEach: \n action.product.attributes?.forEach((attr) => {\n // Concat description attributes to build metadescription\n if (attr.type === 'DESCRIPTION') { seoDesc += `, ${attr.value}`; }\n });\n return SetHead({ title: seoTitle, metaDescription: seoDesc, imgSrc: action.imgPath });\n }),\n );\n });\n\n public setStoreLocatorSeo$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetStoreLocatorSeo),\n map(() => {\n const seoTitle = 'Store Locator - Massimo Dutti';\n return SetHead({ title: seoTitle, metaDescription: undefined });\n }),\n );\n });\n\n public setMyAccountSeo$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetMyAccountSeo),\n // eslint-disable-next-line rxjs/no-unsafe-switchmap\n switchMap(() => {\n return this.translateService.get(['header_my_account']).pipe(\n filter((data) => !!data && data?.length > 0),\n take(1),\n map(([translations]: [any]) => {\n const seoTitle = `${translations.header_my_account} - Massimo Dutti`;\n return SetHead({ title: seoTitle, metaDescription: undefined });\n })\n );\n }),\n );\n });\n\n public setCheckoutSeo$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetCheckoutSeo),\n map(() => {\n const seoTitle = 'Checkout - Massimo Dutti';\n return SetHead({ title: seoTitle, metaDescription: undefined });\n }),\n );\n });\n\n public setShopcartSeo$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetShopCartSeo),\n map(() => {\n const seoTitle = 'Shopcart - Massimo Dutti';\n return SetHead({ title: seoTitle, metaDescription: undefined });\n }),\n );\n });\n\n public setGiftCardSeo$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetGiftCardSeo),\n // eslint-disable-next-line rxjs/no-unsafe-switchmap\n switchMap(() => {\n return this.translateService.get(['gift-card-activation.seo.title', 'gift-card-activation.seo.metaDescription'])\n .pipe(take(1), map((translations: string) => {\n const seoTitle = `${translations['gift-card-activation.seo.title']} - Massimo Dutti`;\n const seoDesc = translations['gift-card-activation.seo.metaDescription'];\n return SetHead({ title: seoTitle, metaDescription: seoDesc });\n }));\n }),\n );\n });\n\n public setOrderStatus$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetOrderStatus),\n // eslint-disable-next-line rxjs/no-unsafe-switchmap\n switchMap(() => {\n return this.translateService.get('dev.orderStatus.title1')\n .pipe(take(1), map((translations: string) => {\n const seoTitle = `${translations} - Massimo Dutti`;\n return SetHead({ title: seoTitle, metaDescription: null });\n }));\n }),\n );\n });\n\n public setErrorPageSeo$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetErrorPageSeo),\n map(() => {\n const seoTitle = 'Error Page - Massimo Dutti';\n return SetHead({ title: seoTitle, metaDescription: undefined });\n }),\n );\n });\n\n public setLastSectionTranslated$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetLastSection),\n // eslint-disable-next-line rxjs/no-unsafe-switchmap\n switchMap((action) => this.getCategoriesNavigation$\n .pipe(\n filter(categories => categories?.length > 0),\n take(1),\n map((categories) => {\n return { action, categories };\n })\n )),\n filter(({ action, categories }) => action !== null && categories.length > 0),\n map(({ action, categories }) => {\n const category = categories.find(cat => cat?.sectionPathEn.toLowerCase() === action?.section?.toLowerCase());\n return SetLastSectionTranslated({ lastSectionTranslated: capitalize(category?.sectionPath) || '' });\n })\n );\n });\n\n // Set WW Seo\n public setWWSeo$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetWorldwideSeo),\n map(() => {\n const seoTitle = 'Massimo Dutti - Official Website';\n const desc = 'Select your market and language and find the latest trends for women, men & kids on the Massimo Dutti official website. Discover elegant & exclusive styles.';\n return SetHead({ title: seoTitle, metaDescription: desc });\n }),\n );\n });\n\n // NOINDEX\n public setNoindexOnRouteChange$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetPage),\n filter(() => this.platform.isBrowser()),\n filter((action) => action.page !== 'ItxCategoryPage'),\n map((action) => {\n if (this.noindexTemplates.some((route) => action.page?.includes(route))) {\n this.seoService.setNoIndexMeta();\n return SetNoIndexSuccess();\n }\n\n return SetNoindex();\n }),\n );\n });\n\n public setNoindex$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetNoindex, SetCategoryNoindex),\n filter(() => this.platform.isBrowser()),\n mergeMap((action: any) => {\n return combineLatest([\n this.store.select(getCountryCode),\n this.store.select(getLanguageCode),\n this.store.select(getDefaultLanguage),\n this.store.select(getCmsConfigValue('seo_noindex')),\n ]).pipe(\n map(([\n countryCode,\n languageCode,\n defaultLang,\n seoConfig,\n ]: [string, string, StoreLanguage, NoIndexConfiguration]) => {\n this.seoService.removeNoIndexMeta();\n\n // biome-ignore lint/complexity/useSimplifiedLogicExpression: \n if (!countryCode || !languageCode || !defaultLang || !seoConfig) {\n return SetNoIndexSuccess();\n }\n\n if (checkNoindex(seoConfig, countryCode, languageCode, defaultLang.code, action?.category)) {\n this.seoService.setNoIndexMeta();\n }\n\n return SetNoIndexSuccess();\n })\n );\n })\n );\n });\n\n // HREFLANGS\n public setCategoryHreflangs$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetCategorySeo),\n filter(() => this.platform.isBrowser()),\n filter(() => {\n if (this.isFirstLoad) {\n this.isFirstLoad = false;\n return false;\n }\n return true;\n }),\n mergeMap((cat) =>\n combineLatest([\n this.store.select(getStoreList),\n this.store.select(getStoreId),\n this.store.select(getCmsConfigValue('seo_noindex')),\n this.store.select(getCountryCode),\n this.store.select(getLanguageCode),\n this.store.select(getDefaultLanguage),\n ]).pipe(\n mergeMap(([storeList, storeId, indexConfs, countryCode, languageCode, defaultLang]) => {\n if (checkNoindex(indexConfs, countryCode, languageCode, defaultLang.code, cat?.category)) {\n this.seoService.removeHreflangs();\n return of(NoOpAction());\n }\n\n const categoryId = cat?.category?.id;\n if (!(categoryId && storeList?.length && storeId)) {\n return of(NoOpAction());\n }\n\n return this.seoApiRepository.getCategoryTranslations(categoryId, storeId).pipe(\n map((translations) => {\n this.seoService.regenerateHreflangs(storeList, indexConfs, {\n translations: translations?.categoryUrlTranslations,\n isCategory: true,\n categoryAttachments: cat.category?.attachments,\n });\n return NoOpAction();\n }),\n );\n })\n ))\n );\n });\n\n public setProductHreflangs$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetProductSeo),\n filter(() => this.platform.isBrowser()),\n filter(() => {\n if (this.isFirstLoad) {\n this.isFirstLoad = false;\n return false;\n }\n return true;\n }),\n mergeMap((action) =>\n combineLatest([\n this.store.select(getStoreList),\n this.store.select(getCmsConfigValue('seo_noindex')),\n this.store.select(getCountryCode),\n this.store.select(getLanguageCode),\n this.store.select(getDefaultLanguage),\n ]).pipe(\n map(([storeList, indexConfs, countryCode, languageCode, defaultLang]) => {\n if (checkNoindex(indexConfs, countryCode, languageCode, defaultLang.code)) {\n this.seoService.removeHreflangs();\n return NoOpAction();\n }\n\n const productTranslations = action.product.productUrlTranslations;\n this.seoService.regenerateHreflangs(storeList, indexConfs, {\n translations: productTranslations,\n });\n return NoOpAction();\n })\n ))\n );\n });\n\n public setHreflangsOnRouteChange$ = createEffect(() => {\n return this.actions$.pipe(\n ofType(SetPage),\n filter((action) => action.page !== 'ItxCategoryPage' && action.page !== 'ItxProductPage'),\n filter(() => {\n if (this.isFirstLoad) {\n this.isFirstLoad = false;\n return false;\n }\n return true;\n }),\n mergeMap((action) =>\n combineLatest([\n this.store.select(getStoreList),\n this.store.select(getCmsConfigValue('seo_noindex')),\n this.store.select(routerPublicQueries.getUrlFromRouter),\n this.store.select(getStoreAndLanguage),\n this.store.select(getCountryCode),\n this.store.select(getLanguageCode),\n this.store.select(getDefaultLanguage),\n ]).pipe(\n map(([storeList, indexConfs, url, storeLang, countryCode, languageCode, defaultLang]) => {\n const isNoindex = this.noindexTemplates.some((route) => action.page?.includes(route))\n || checkNoindex(indexConfs, countryCode, languageCode, defaultLang.code);\n if (isNoindex) {\n this.seoService.removeHreflangs();\n return NoOpAction();\n }\n\n const sanitizedUrl = removeCountryAndLanguageFromUrl(\n url,\n storeLang.countryCode.toLowerCase(),\n storeLang.languageCode.toLowerCase()\n );\n this.seoService.regenerateHreflangs(storeList, indexConfs, {\n urlPath: sanitizedUrl,\n });\n return NoOpAction();\n })\n ))\n );\n });\n}\n","import { ProductPublicModels } from '@features/products/product';\nimport { capitalize } from '@frontend/common/utils';\n\n/**\n * Build product SEO title from product\n *\n * @param product ProductPublicModels.PublicProduct\n *\n * @returns The product SEO title\n */\nexport function getProductTitle(product: ProductPublicModels.PublicProduct): string {\n const productFamily = capitalize(product.detail?.familyInfo?.familyName?.toLowerCase());\n const productName = product.name?.replace(/-Studio|-Limited Edition/g, '').trim();\n let productColors = '';\n product.colors?.forEach((color, index) => {\n productColors += capitalize(color.name?.toLowerCase());\n if (index !== product.colors.length - 1) {\n productColors += ', ';\n }\n });\n\n const titleParts = [productName, productColors, productFamily].filter(Boolean);\n\n if (titleParts.length > 1) {\n return `${titleParts.join(' · ')} | Massimo Dutti`;\n }\n\n return `${titleParts[0]} | Massimo Dutti` || 'Massimo Dutti';\n}\n","/**\n * Removes the country or country / language from the url\n *\n * @param url string\n * @param countryCode string\n * @param languageCode string\n *\n * @returns url without country or without country / lang if exists\n */\nexport function removeCountryAndLanguageFromUrl(url: string, countryCode: string, languageCode?: string): string {\n try {\n const urlObject = new URL(url);\n const regex = new RegExp(`^/(?:${countryCode}(?:/${languageCode})?|${countryCode}|${languageCode})`, 'i');\n const sanitizedPath = urlObject.pathname.replace(regex, '');\n urlObject.pathname = sanitizedPath.startsWith('/') ? sanitizedPath : `/${sanitizedPath}`;\n return urlObject.toString();\n } catch {\n // Relative URL\n const regex = new RegExp(`^/(?:${countryCode}(?:/${languageCode})?|${countryCode}|${languageCode})`, 'i');\n const sanitizedUrl = url.replace(regex, '');\n return sanitizedUrl.startsWith('/') ? sanitizedUrl : `/${sanitizedUrl}`;\n }\n}\n","import { createReducer, on } from '@ngrx/store';\n\nimport { SetLastSectionTranslated } from './seo.actions';\nimport { seoInitialState } from './seo.state';\n\nimport { HomeConfig } from '@core/domain/state/core.state';\nimport { ConfigureHomeLinkSuccess } from '@core/infrastructure/state/core-events.actions';\n\nexport const seoReducers = createReducer(\n seoInitialState,\n on(ConfigureHomeLinkSuccess, (state, { homeConfs }) => {\n return {\n ...state,\n homeUrls: homeConfs.map((homeConfig: HomeConfig) => {\n return homeConfig.locationPath;\n }),\n };\n }),\n on(SetLastSectionTranslated, (state, { lastSectionTranslated }) => {\n return {\n ...state,\n lastSectionTranslated,\n };\n }),\n);\n","import {\n SetHead, HomeRouteChange, SetDefaultSeo, SetHomeSeo, SetProductSeo, SetCategorySeo, SetLookbookSeo, SetCategoryNoindex,\n} from './infraestructure/state/seo.actions';\nimport { getHomeUrls, getLastSectionTranslated } from './infraestructure/state/seo.selectors';\nimport { SeoModule } from './seo.module';\n\nexport const SeoSelectors = {\n getHomeUrls,\n getLastSectionTranslated,\n};\n\nexport const SeoActionTypes = {\n SetHead,\n HomeRouteChange,\n SetDefaultSeo,\n SetHomeSeo,\n SetProductSeo,\n SetLookbookSeo,\n SetCategorySeo,\n SetCategoryNoindex,\n};\n\nexport const SeoPublicModule = SeoModule;\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { provideEffects } from '@ngrx/effects';\nimport { provideState } from '@ngrx/store';\nimport { TranslateModule } from '@ngx-translate/core';\n\nimport { SeoApiRepository } from './infraestructure/api/seo.api.repository';\nimport { SeoEffects } from './infraestructure/state/seo.effects';\nimport { seoReducers } from './infraestructure/state/seo.reducers';\n\nimport { ConfigService } from '@core/infrastructure/config/config.service';\nimport { PageTitleService } from '@layout/ui/services/page-title.service';\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n TranslateModule.forChild(),\n ],\n providers: [\n provideState({ name: 'seo', reducer: seoReducers }),\n provideEffects(SeoEffects),\n ConfigService,\n PageTitleService,\n SeoApiRepository,\n ],\n exports: [],\n})\nexport class SeoModule {}\n","import { SeoInfo } from '@core/domain/models/seo.models';\n\n/**\n * SEO State Model\n */\nexport interface SeoState {\n homeUrls?: string[];\n lastSectionTranslated?: string;\n}\n\n/**\n * SEO State initializer\n */\nexport const seoInitialState: SeoState = { };\n\nexport const InitialSeoInfo: SeoInfo = {\n title: null,\n metaTitle: null,\n metaDescription: null,\n seoProductH1: null,\n mainHeader: null,\n longDescription: null,\n secondaryTitle: null,\n secondaryDescription: null,\n productId: null,\n categoryId: null,\n};\n","import { DOCUMENT } from '@angular/common';\nimport { Inject, Injectable, Renderer2, RendererFactory2 } from '@angular/core';\n\nimport { CorePlatformService } from '@core/infrastructure/platform/platform.service';\n\n@Injectable()\n\n/**\n * Page title service\n */\nexport class PageTitleService {\n private readonly renderer: Renderer2;\n\n constructor(\n private readonly rendererFactory: RendererFactory2,\n @Inject(DOCUMENT) private readonly document: Document,\n private readonly platformService: CorePlatformService\n ) {\n this.renderer = this.rendererFactory.createRenderer(null, null);\n }\n\n public setTitle(title: string): void {\n if (title?.length > 0) {\n this.addTitleBeforePreconnect(title);\n }\n }\n\n public setCustomTitle(title: string): void {\n const fullTitle = `${title?.length > 0 ? `${title} - ` : ''}Massimo Dutti`;\n this.addTitleBeforePreconnect(fullTitle);\n }\n\n public addTitleBeforePreconnect(title: string): void {\n if (this.platformService.isBrowser()) {\n const head = this.document.head;\n const preconnectLink = head.querySelector('link[rel=\"preconnect\"]');\n\n const existingTitleElement = head.querySelector('title');\n if (existingTitleElement) {\n this.renderer.removeChild(head, existingTitleElement);\n }\n\n const titleElement = this.renderer.createElement('title');\n const text = this.renderer.createText(title);\n\n this.renderer.appendChild(titleElement, text);\n\n if (preconnectLink) {\n this.renderer.insertBefore(head, titleElement, preconnectLink);\n } else {\n this.renderer.appendChild(head, titleElement);\n }\n }\n }\n}\n","/**\n * Capitalize strings\n *\n * @param s Value to capitalize\n *\n * @returns Converted value with first capitalized letter\n */\nexport function capitalize(s: string): string {\n if (!s) {\n return s;\n }\n const arr: string[] = s.split(' ');\n\n for (let i = 0; i < arr.length; i++) {\n arr[i] = arr[i].charAt(0).toUpperCase() + arr[i].slice(1);\n }\n\n return arr.join(' ');\n}\n"],"x_google_ignoreList":[]}