{"version":3,"sources":["node_modules/ng-lazyload-image/fesm2020/ng-lazyload-image.mjs","src/@omnial/_models/navigation/site-map.model.ts","src/@omnial/_animations/fade-in-left.animation.ts","src/@omnial/_animations/fade-in-right.animation.ts","src/@omnial/_animations/scale-in.animation.ts","src/@omnial/navigation/breadcrumbs/breadcrumb.component.ts","src/app/navigation/breadcrumbs/breadcrumb.component.html","src/@omnial/navigation/breadcrumbs/breadcrumb.module.ts","src/@omnial/product-controls/controls-list/controls-list.component.ts","src/app/product-controls/controls-list/controls-list.component.html","src/@omnial/product-controls/controls-list/controls-list.module.ts","src/@omnial/shared/rating/rating.component.ts","src/app/shared/rating/rating.component.html","src/@omnial/shared/rating/rating.module.ts","src/@omnial/_models/catalog/banner.model.ts","src/@omnial/_services/catalog/seven.spikes.service.ts","node_modules/@videogular/ngx-videogular/fesm2022/videogular-ngx-videogular-core.mjs","node_modules/@videogular/ngx-videogular/fesm2022/videogular-ngx-videogular-controls.mjs","node_modules/@videogular/ngx-videogular/fesm2022/videogular-ngx-videogular-overlay-play.mjs","node_modules/@videogular/ngx-videogular/fesm2022/videogular-ngx-videogular-buffering.mjs","src/@omnial/shared/banners/banners.module.ts","src/@omnial/_models/customer/review.model.ts","src/@omnial/_services/customer/review.service.ts","src/@omnial/shared/product-review-submit-dialog/product-review-submit-dialog.component.ts","src/app/shared/product-review-submit-dialog/product-review-submit-dialog.component.html","src/@omnial/shared/product-review/product-review.component.ts","src/app/shared/product-review/product-review.component.html","src/@omnial/shared/product-review/product-review.module.ts","node_modules/@angular/google-maps/fesm2022/google-maps.mjs","src/@omnial/shared/afterpay-dialog/afterpay-dialog.component.ts","src/app/shared/afterpay-dialog/afterpay-dialog.component.html","src/@omnial/_models/catalog/products.paged.model.ts","src/@omnial/_services/catalog/product-category.service.ts","src/@omnial/_services/catalog/product-manufacturer.service.ts","src/@omnial/_services/catalog/catalog.service.ts","src/@omnial/_services/catalog/theme.service.ts","src/@omnial/product-controls/controls-detail/controls-detail.component.ts","src/app/product-controls/controls-detail/controls-detail.component.html","src/@omnial/product-controls/controls-mini/controls-mini.component.ts","src/app/product-controls/controls-mini/controls-mini.component.html","src/@omnial/_models/catalog/manufacturer.model.ts","src/@omnial/_models/dealer-locator/marker.model.ts","src/@omnial/_services/dealers/dealer.service.ts","src/@omnial/_services/catalog/manufacturer.service.ts","src/@omnial/shared/dealer-locator/dealer-locator-map/dealer-locator-map.component.ts","src/app/shared/dealer-locator/dealer-locator-map/dealer-locator-map.component.html","src/@omnial/shared/dealer-locator/dealer-locator.component.ts","src/app/shared/dealer-locator/dealer-locator.component.html","src/@omnial/pages/product/product-zoom/product-zoom.component.ts","src/app/pages/product/product-zoom/product-zoom.component.html","node_modules/@angular/youtube-player/fesm2022/youtube-player.mjs","src/@omnial/pages/product/product-swiper/product-swiper.component.ts","src/app/pages/product/product-swiper/product-swiper.component.html","src/@omnial/pages/product/product-detail/product-detail.component.ts","src/app/pages/product/product-detail/product-detail.component.html","src/@omnial/shared/product-dialog/product-dialog.component.ts","src/app/shared/product-dialog/product-dialog.component.html","src/@omnial/shared/products-carousel/products-carousel.component.ts","src/app/shared/products-carousel/products-carousel.component.html","src/@omnial/shared/dealer-locator/dealer-locator.module.ts","src/@omnial/shared/banners-static/banners-static.component.ts","src/app/shared/banners-static/banners-static.component.html","src/@omnial/shared/banners-static/banners-static.module.ts","src/@omnial/shared/product-review-submit/product-review-submit.module.ts","src/@omnial/shared/product-review-submit-dialog/product-review-submit-dialog.module.ts","src/@omnial/product-controls/controls-detail/controls-detail.module.ts","src/@omnial/product-controls/controls-mini/controls-mini.module.ts","src/@omnial/pages/product/product-zoom/product-zoom.module.ts","src/@omnial/pages/product/product-swiper/product-swiper.module.ts","src/@omnial/pages/product/product-detail/product-detail.module.ts","src/@omnial/product-controls/controls-quickview/controls-quickview.module.ts","src/@omnial/shared/product-dialog/product-dialog.module.ts","src/@omnial/shared/products-carousel/products-carousel.module.ts"],"sourcesContent":["import { Subject, of, Observable, ReplaySubject, never, empty } from 'rxjs';\nimport { filter, tap, take, mergeMap, map, catchError, switchMap, startWith, sampleTime, share } from 'rxjs/operators';\nimport { isPlatformServer } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, EventEmitter, PLATFORM_ID, Directive, Inject, Input, Output, NgModule } from '@angular/core';\nfunction getNavigator() {\n return typeof window !== 'undefined' ? window.navigator : undefined;\n}\nfunction isChildOfPicture(element) {\n return Boolean(element.parentElement && element.parentElement.nodeName.toLowerCase() === 'picture');\n}\nfunction isImageElement(element) {\n return element.nodeName.toLowerCase() === 'img';\n}\nfunction setImage(element, imagePath, useSrcset) {\n if (isImageElement(element)) {\n if (useSrcset && 'srcset' in element) {\n element.srcset = imagePath;\n } else {\n element.src = imagePath;\n }\n } else {\n element.style.backgroundImage = `url('${imagePath}')`;\n }\n return element;\n}\nfunction setSources(attrName) {\n return image => {\n const sources = image.parentElement.getElementsByTagName('source');\n for (let i = 0; i < sources.length; i++) {\n const attrValue = sources[i].getAttribute(attrName);\n if (attrValue) {\n // Check if `srcset` is supported by the current browser\n if ('srcset' in sources[i]) {\n sources[i].srcset = attrValue;\n } else {\n sources[i].src = attrValue;\n }\n }\n }\n };\n}\nconst setSourcesToDefault = setSources('defaultImage');\nconst setSourcesToLazy = setSources('lazyLoad');\nconst setSourcesToError = setSources('errorImage');\nfunction setImageAndSources(setSourcesFn) {\n return (element, imagePath, useSrcset) => {\n if (isImageElement(element) && isChildOfPicture(element)) {\n setSourcesFn(element);\n }\n if (imagePath) {\n setImage(element, imagePath, useSrcset);\n }\n };\n}\nconst setImageAndSourcesToDefault = setImageAndSources(setSourcesToDefault);\nconst setImageAndSourcesToLazy = setImageAndSources(setSourcesToLazy);\nconst setImageAndSourcesToError = setImageAndSources(setSourcesToError);\nclass Hooks {\n constructor() {\n this.navigator = getNavigator();\n }\n setPlatformId(platformId) {\n this.platformId = platformId;\n }\n onDestroy(attributes) {}\n onAttributeChange(newAttributes) {}\n}\nconst cssClassNames = {\n loaded: 'ng-lazyloaded',\n loading: 'ng-lazyloading',\n failed: 'ng-failed-lazyloaded'\n};\nfunction removeCssClassName(element, cssClassName) {\n element.className = element.className.replace(cssClassName, '');\n}\nfunction addCssClassName(element, cssClassName) {\n if (!element.className.includes(cssClassName)) {\n element.className += ` ${cssClassName}`;\n }\n}\nfunction hasCssClassName(element, cssClassName) {\n return element.className && element.className.includes(cssClassName);\n}\nclass SharedHooks extends Hooks {\n setup(attributes) {\n setImageAndSourcesToDefault(attributes.element, attributes.defaultImagePath, attributes.useSrcset);\n if (attributes.imagePath) {\n addCssClassName(attributes.element, cssClassNames.loading);\n }\n if (hasCssClassName(attributes.element, cssClassNames.loaded)) {\n removeCssClassName(attributes.element, cssClassNames.loaded);\n }\n }\n finally(attributes) {\n addCssClassName(attributes.element, cssClassNames.loaded);\n removeCssClassName(attributes.element, cssClassNames.loading);\n }\n loadImage(attributes) {\n if (this.skipLazyLoading(attributes)) {\n // Set the image right away for bots for better SEO\n return [attributes.imagePath];\n }\n const {\n element,\n useSrcset,\n imagePath,\n decode\n } = attributes;\n let img;\n if (isImageElement(element) && isChildOfPicture(element)) {\n const parentClone = element.parentNode.cloneNode(true);\n img = parentClone.getElementsByTagName('img')[0];\n setSourcesToLazy(img);\n setImage(img, imagePath, useSrcset);\n } else {\n img = new Image();\n if (isImageElement(element) && element.referrerPolicy) {\n img.referrerPolicy = element.referrerPolicy;\n }\n if (isImageElement(element) && element.sizes) {\n img.sizes = element.sizes;\n }\n if (useSrcset && 'srcset' in img) {\n img.srcset = imagePath;\n } else {\n img.src = imagePath;\n }\n }\n if (decode && img.decode) {\n return img.decode().then(() => imagePath);\n }\n return new Promise((resolve, reject) => {\n img.onload = () => resolve(imagePath);\n img.onerror = () => reject(null);\n });\n }\n setErrorImage(error, attributes) {\n const {\n element,\n useSrcset,\n errorImagePath\n } = attributes;\n setImageAndSourcesToError(element, errorImagePath, useSrcset);\n addCssClassName(element, cssClassNames.failed);\n }\n setLoadedImage(imagePath, attributes) {\n const {\n element,\n useSrcset\n } = attributes;\n setImageAndSourcesToLazy(element, imagePath, useSrcset);\n }\n isDisabled() {\n // Disable if SSR and the user isn't a bot\n return isPlatformServer(this.platformId) && !this.isBot();\n }\n skipLazyLoading(attributes) {\n return this.isBot(attributes);\n }\n isBot(attributes) {\n if (this.navigator?.userAgent) {\n return /googlebot|bingbot|yandex|baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora\\ link\\ preview|showyoubot|outbrain|pinterest\\/0\\.|pinterestbot|slackbot|vkShare|W3C_Validator|whatsapp|duckduckbot|prerender/i.test(this.navigator.userAgent);\n }\n return false;\n }\n}\nclass IntersectionObserverHooks extends SharedHooks {\n constructor() {\n super(...arguments);\n this.observers = new WeakMap();\n this.intersectionSubject = new Subject();\n this.uniqKey = {};\n }\n getObservable(attributes) {\n if (this.skipLazyLoading(attributes)) {\n return of({\n isIntersecting: true\n });\n }\n if (attributes.customObservable) {\n return attributes.customObservable;\n }\n const scrollContainerKey = attributes.scrollContainer || this.uniqKey;\n const options = {\n root: attributes.scrollContainer || null\n };\n if (attributes.offset) {\n options.rootMargin = `${attributes.offset}px`;\n }\n let observer = this.observers.get(scrollContainerKey);\n if (!observer) {\n observer = new IntersectionObserver(entrys => this.loadingCallback(entrys), options);\n this.observers.set(scrollContainerKey, observer);\n }\n observer.observe(attributes.element);\n return Observable.create(obs => {\n const subscription = this.intersectionSubject.pipe(filter(entry => entry.target === attributes.element)).subscribe(obs);\n return () => {\n subscription.unsubscribe();\n observer.unobserve(attributes.element);\n };\n });\n }\n isVisible(event) {\n return event.isIntersecting;\n }\n loadingCallback(entrys) {\n entrys.forEach(entry => this.intersectionSubject.next(entry));\n }\n}\nfunction lazyLoadImage(hooks, attributes) {\n return evntObservable => {\n return evntObservable.pipe(tap(data => attributes.onStateChange.emit({\n reason: 'observer-emit',\n data\n })), filter(event => hooks.isVisible(event, attributes)), take(1), tap(() => attributes.onStateChange.emit({\n reason: 'start-loading'\n })), mergeMap(() => hooks.loadImage(attributes)), tap(() => attributes.onStateChange.emit({\n reason: 'mount-image'\n })), tap(imagePath => hooks.setLoadedImage(imagePath, attributes)), tap(() => attributes.onStateChange.emit({\n reason: 'loading-succeeded'\n })), map(() => true), catchError(error => {\n attributes.onStateChange.emit({\n reason: 'loading-failed',\n data: error\n });\n hooks.setErrorImage(error, attributes);\n return of(false);\n }), tap(() => {\n attributes.onStateChange.emit({\n reason: 'finally'\n });\n hooks.finally(attributes);\n }));\n };\n}\nconst LAZYLOAD_IMAGE_HOOKS = new InjectionToken('LazyLoadImageHooks');\nlet LazyLoadImageDirective = /*#__PURE__*/(() => {\n class LazyLoadImageDirective {\n constructor(el, ngZone, platformId, hooks) {\n this.onStateChange = new EventEmitter(); // Emits an event on every state change\n this.elementRef = el;\n this.ngZone = ngZone;\n this.propertyChanges$ = new ReplaySubject();\n this.hooks = hooks;\n this.hooks.setPlatformId(platformId);\n this.uid = Math.random().toString(36).substr(2, 9);\n }\n ngOnChanges() {\n if (this.debug === true && !this.debugSubscription) {\n this.debugSubscription = this.onStateChange.subscribe(e => console.log(e));\n }\n this.propertyChanges$.next({\n element: this.elementRef.nativeElement,\n imagePath: this.lazyImage,\n defaultImagePath: this.defaultImage,\n errorImagePath: this.errorImage,\n useSrcset: this.useSrcset,\n offset: this.offset ? this.offset | 0 : 0,\n scrollContainer: this.scrollTarget,\n customObservable: this.customObservable,\n decode: this.decode,\n onStateChange: this.onStateChange,\n id: this.uid\n });\n }\n ngAfterContentInit() {\n if (this.hooks.isDisabled()) {\n return null;\n }\n this.ngZone.runOutsideAngular(() => {\n this.loadSubscription = this.propertyChanges$.pipe(tap(attributes => this.hooks.onAttributeChange(attributes)), tap(attributes => attributes.onStateChange.emit({\n reason: 'setup'\n })), tap(attributes => this.hooks.setup(attributes)), switchMap(attributes => {\n if (!attributes.imagePath) {\n return never();\n }\n return this.hooks.getObservable(attributes).pipe(lazyLoadImage(this.hooks, attributes));\n })).subscribe({\n next: () => null\n });\n });\n }\n ngOnDestroy() {\n this.propertyChanges$.pipe(take(1)).subscribe({\n next: attributes => this.hooks.onDestroy(attributes)\n }).unsubscribe();\n this.loadSubscription?.unsubscribe();\n this.debugSubscription?.unsubscribe();\n }\n }\n LazyLoadImageDirective.ɵfac = function LazyLoadImageDirective_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || LazyLoadImageDirective)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(PLATFORM_ID), i0.ɵɵdirectiveInject(LAZYLOAD_IMAGE_HOOKS));\n };\n LazyLoadImageDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: LazyLoadImageDirective,\n selectors: [[\"\", \"lazyLoad\", \"\"]],\n inputs: {\n lazyImage: [0, \"lazyLoad\", \"lazyImage\"],\n defaultImage: \"defaultImage\",\n errorImage: \"errorImage\",\n scrollTarget: \"scrollTarget\",\n customObservable: \"customObservable\",\n offset: \"offset\",\n useSrcset: \"useSrcset\",\n decode: \"decode\",\n debug: \"debug\"\n },\n outputs: {\n onStateChange: \"onStateChange\"\n },\n standalone: false,\n features: [i0.ɵɵNgOnChangesFeature]\n });\n return LazyLoadImageDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet LazyLoadImageModule = /*#__PURE__*/(() => {\n class LazyLoadImageModule {}\n LazyLoadImageModule.ɵfac = function LazyLoadImageModule_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || LazyLoadImageModule)();\n };\n LazyLoadImageModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: LazyLoadImageModule\n });\n LazyLoadImageModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [{\n provide: LAZYLOAD_IMAGE_HOOKS,\n useClass: IntersectionObserverHooks\n }]\n });\n return LazyLoadImageModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass Rect {\n constructor(left, top, right, bottom) {\n this.left = left;\n this.top = top;\n this.right = right;\n this.bottom = bottom;\n }\n static fromElement(element) {\n const {\n left,\n top,\n right,\n bottom\n } = element.getBoundingClientRect();\n if (left === 0 && top === 0 && right === 0 && bottom === 0) {\n return Rect.empty;\n } else {\n return new Rect(left, top, right, bottom);\n }\n }\n static fromWindow(_window) {\n return new Rect(0, 0, _window.innerWidth, _window.innerHeight);\n }\n inflate(inflateBy) {\n this.left -= inflateBy;\n this.top -= inflateBy;\n this.right += inflateBy;\n this.bottom += inflateBy;\n }\n intersectsWith(rect) {\n return rect.left < this.right && this.left < rect.right && rect.top < this.bottom && this.top < rect.bottom;\n }\n getIntersectionWith(rect) {\n const left = Math.max(this.left, rect.left);\n const top = Math.max(this.top, rect.top);\n const right = Math.min(this.right, rect.right);\n const bottom = Math.min(this.bottom, rect.bottom);\n if (right >= left && bottom >= top) {\n return new Rect(left, top, right, bottom);\n } else {\n return Rect.empty;\n }\n }\n}\nRect.empty = new Rect(0, 0, 0, 0);\nclass ScrollHooks extends SharedHooks {\n constructor() {\n super(...arguments);\n this.getWindow = () => window;\n this.scrollListeners = new WeakMap();\n // Only create one scroll listener per target and share the observable.\n // Typical, there will only be one observable per application\n this.getScrollListener = scrollTarget => {\n if (!scrollTarget || typeof scrollTarget.addEventListener !== 'function') {\n console.warn('`addEventListener` on ' + scrollTarget + ' (scrollTarget) is not a function. Skipping this target');\n return empty();\n }\n const scrollListener = this.scrollListeners.get(scrollTarget);\n if (scrollListener) {\n return scrollListener;\n }\n const srollEvent = Observable.create(observer => {\n const eventName = 'scroll';\n const handler = event => observer.next(event);\n const options = {\n passive: true,\n capture: false\n };\n scrollTarget.addEventListener(eventName, handler, options);\n return () => scrollTarget.removeEventListener(eventName, handler, options);\n });\n const listener = this.sampleObservable(srollEvent);\n this.scrollListeners.set(scrollTarget, listener);\n return listener;\n };\n }\n getObservable(attributes) {\n if (this.skipLazyLoading(attributes)) {\n return of('load');\n } else if (attributes.customObservable) {\n return attributes.customObservable.pipe(startWith(''));\n } else if (attributes.scrollContainer) {\n return this.getScrollListener(attributes.scrollContainer);\n }\n return this.getScrollListener(this.getWindow());\n }\n isVisible(event, attributes) {\n const elementBounds = Rect.fromElement(attributes.element);\n if (elementBounds === Rect.empty) {\n return false;\n }\n const windowBounds = Rect.fromWindow(this.getWindow());\n elementBounds.inflate(attributes.offset);\n if (attributes.scrollContainer) {\n const scrollContainerBounds = Rect.fromElement(attributes.scrollContainer);\n const intersection = scrollContainerBounds.getIntersectionWith(windowBounds);\n return elementBounds.intersectsWith(intersection);\n } else {\n return elementBounds.intersectsWith(windowBounds);\n }\n }\n sampleObservable(obs, scheduler) {\n return obs.pipe(sampleTime(100, scheduler), share(), startWith(''));\n }\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { Hooks, IntersectionObserverHooks, LAZYLOAD_IMAGE_HOOKS, LazyLoadImageDirective, LazyLoadImageModule, ScrollHooks, SharedHooks };\n","export class SiteMap {\r\n public items: SiteMapItem[];\r\n}\r\nexport class SiteMapItem {\r\n public categoryId: number;\r\n public parentCategoryId: number;\r\n public id: string;\r\n public slug: string;\r\n public title: string;\r\n public routerLink: string;\r\n public link: string;\r\n public href: string;\r\n public target: string;\r\n public hasSubMenu: boolean;\r\n public parentId: string;\r\n public templateId: number;\r\n public level: number;\r\n public footerOne :boolean;\r\n public footerTwo :boolean;\r\n public footerThree :boolean;\r\n}\r\n","import { animate, style, transition, trigger } from '@angular/animations';\r\n\r\nexport const fadeInLeftAnimation = trigger('fadeInLeft', [\r\n transition(':enter', [\r\n style({\r\n transform: 'translateX(2vw)',\r\n opacity: 0\r\n }),\r\n animate('0.4s cubic-bezier(0, 0.35, 1, 0.25)', style({\r\n transform: 'translateX(0)',\r\n opacity: 1\r\n }))\r\n ])\r\n]);\r\n","import { animate, style, transition, trigger } from '@angular/animations';\r\n\r\nexport const fadeInRightAnimation = trigger('fadeInRight', [\r\n transition(':enter', [\r\n style({\r\n transform: 'translateX(-4vw)',\r\n opacity: 0\r\n }),\r\n animate('0.8s cubic-bezier(0.35, 0, 0.25, 1)', style({\r\n transform: 'translateX(0)',\r\n opacity: 1\r\n }))\r\n ])\r\n]);\r\n","import { animate, style, transition, trigger } from '@angular/animations';\r\n\r\nexport const scaleInAnimation = trigger('scaleIn', [\r\n transition(':enter', [\r\n style({\r\n transform: 'scale(0)'\r\n }),\r\n animate('400ms cubic-bezier(0.35, 0, 0.25, 1)', style({\r\n transform: 'scale(1)'\r\n }))\r\n ])\r\n]);\r\n","import { Component, Input, OnDestroy, OnInit } from '@angular/core';\r\nimport { Location } from '@angular/common';\r\nimport { Router, NavigationEnd } from '@angular/router';\r\nimport { SiteMapItem } from 'src/@omnial/_models/navigation/site-map.model';\r\nimport { BreadCrumbService } from 'src/@omnial/_services/navigation/breadcrumb.service';\r\nimport { SiteMapService } from 'src/@omnial/_services/navigation/sitemap.service';\r\nimport { Subscription } from 'rxjs';\r\nimport { fadeInLeftAnimation } from 'src/@omnial/_animations/fade-in-left.animation';\r\nimport { fadeInRightAnimation } from 'src/@omnial/_animations/fade-in-right.animation';\r\nimport { fadeInUpAnimation } from 'src/@omnial/_animations/fade-in-up.animation';\r\nimport { scaleInAnimation } from 'src/@omnial/_animations/scale-in.animation';\r\nimport { AppSettings } from 'src/app/app.settings';\r\n\r\n\r\n@Component({\n selector: 'app-breadcrumb',\n templateUrl: './../../../app/navigation/breadcrumbs/breadcrumb.component.html',\n styleUrls: ['./../../../app/navigation/breadcrumbs/breadcrumb.component.scss'],\n providers: [SiteMapService],\n animations: [fadeInUpAnimation, fadeInLeftAnimation, fadeInRightAnimation, scaleInAnimation],\n standalone: false\n})\r\nexport class BreadCrumbComponent implements OnInit, OnDestroy {\r\n @Input() breadcrumbItems: SiteMapItem[];\r\n public localEndNode: string = null;\r\n public breadcrumbs: SiteMapItem[] = [];\r\n public subscriptions: Subscription[] = [];\r\n\r\n constructor(\r\n public router: Router,\r\n public location: Location,\r\n public sitemapService: SiteMapService,\r\n public breadCrumbService: BreadCrumbService,\r\n public settings: AppSettings) {\r\n this.subscriptions.push(this.breadCrumbService.currentEndNode.subscribe(endNode => this.localEndNode = endNode));\r\n this.subscriptions.push(this.router.events.subscribe(\r\n event => {\r\n if (event instanceof NavigationEnd) {\r\n this.getCrumbs(event.url);\r\n }\r\n }));\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this.subscriptions && this.subscriptions.length > 0) {\r\n this.subscriptions.forEach((sub) => { sub.unsubscribe(); });\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n this.getCrumbs(this.router.url);\r\n }\r\n\r\n getCrumbs(url: string): void {\r\n if (url?.indexOf(\"sign-in\") != -1) {\r\n this.accountCrumbs(url);\r\n } else if (url?.indexOf(\"account\") != -1) {\r\n this.accountCrumbs(url);\r\n } else if (url?.indexOf(\"passwordrecovery\") != -1) {\r\n this.accountCrumbs(url);\r\n } else {\r\n this.breadcrumbs = [];\r\n this.doCrumbs();\r\n }\r\n }\r\n\r\n doCrumbs(): void {\r\n if (this.breadcrumbItems) {\r\n let navItem = this.breadcrumbItems.find(i => i.link === this.location.path() || i.routerLink === this.location.path());\r\n if (!navItem && this.location.path()) { // Could be a product so check the parent\r\n const parentArray = this.location.path().split('/');\r\n parentArray.pop();\r\n const parentPath = parentArray.join('/');\r\n navItem = this.breadcrumbItems.find(i => (i.link && i.link.endsWith(parentPath) || (i.routerLink && i.routerLink.endsWith(parentPath))));\r\n if (navItem) {\r\n this.breadcrumbs.unshift(navItem);\r\n }\r\n }\r\n if (navItem) {\r\n this.findParent(navItem);\r\n }\r\n }\r\n }\r\n\r\n findParent(navItem: SiteMapItem): void {\r\n const parent = this.breadcrumbItems.find(i => i.id === navItem.parentId);\r\n if (parent) {\r\n this.breadcrumbs.unshift(parent);\r\n this.findParent(parent);\r\n }\r\n }\r\n\r\n accountCrumbs(url: string) {\r\n this.breadcrumbs = [];\r\n this.localEndNode = null;\r\n const accountCrumbs = new SiteMapItem();\r\n accountCrumbs.link = '/account';\r\n accountCrumbs.href = '/account';\r\n accountCrumbs.slug = 'account';\r\n accountCrumbs.title = this.settings.accountTitle;\r\n this.breadcrumbs.push(accountCrumbs);\r\n this.settings.accountLinks.forEach((section => {\r\n if (section?.children) {\r\n section.children.forEach((link => {\r\n if (url === link.routerLink) {\r\n this.localEndNode = link.name;\r\n }\r\n }));\r\n }\r\n }));\r\n }\r\n\r\n public closeSubMenus(): void {\r\n if (window.innerWidth < 960) {\r\n this.sitemapService.closeAllSubMenus();\r\n }\r\n }\r\n}\r\n","
\r\n