PageSourceSearch

https://www.progold.eu/chunk-NR6F6SLH.js

js progold.eu collected 2026-10-09 21:52:40 UTC 56,575 bytes, 1 lines download raw bytes

1import{a as ue,b as $e,d as eo,f as Y}from"./chunk-YU5IEYKE.js";import{c as Xt,d as Jt}from"./chunk-ILIGNJRC.js";import{a as jt,b as Wt}from"./chunk-KJ2DTZTE.js";import"./chunk-BYUXZABT.js";import{Kb as Yt,bb as Zt,cb as Qt,db as qt,r as Ut,s as je}from"./chunk-CSKO464Y.js";import{B as $t,C as zt,b as pe,m as We}from"./chunk-RFZ65DFT.js";import"./chunk-ZAELU3GP.js";import"./chunk-KCBWTIVH.js";import"./chunk-Q7LOV5U2.js";import"./chunk-ZS7OWNSY.js";import"./chunk-DIZWDXBB.js";import{$ as Ht,E as Vt,F as Nt,P as Kt,Q as k,R as E,_ as Gt}from"./chunk-Q4MTVQC2.js";import{b as F,c as Ue}from"./chunk-RRAYDVNW.js";import{Cb as It,Ea as I,Ga as oe,Ia as wt,Ka as Rt,Lb as At,Na as S,Qa as Et,Zb as Ft,a as ee,b as Dt,c as te,cc as q,ic as de,kc as kt,lc as Ge,nc as Pt,va as me,ve as He,wa as Ne,xe as Bt,zb as Ke}from"./chunk-WGWIBZ2L.js";import{$b as _,$c as u,Ad as xt,Bd as yt,Cc as ke,Ce as Ot,D as w,Ec as Ct,Fa as b,Fc as vt,Ga as x,Ha as Je,Ia as dt,Ib as s,Id as Lt,Jb as ft,Kb as ae,La as ne,N as pt,Oa as z,Ob as C,Oe as Ve,Pa as we,Pb as _t,Pe as Tt,Qa as v,Qb as Ae,Ra as xe,Rb as Z,Sb as Q,T as V,Ta as D,Tb as r,Tc as X,Ub as a,Va as se,Vb as d,Wb as G,Xb as H,Yb as R,Yc as ye,Z as mt,Zb as O,ac as m,ad as Pe,bc as ht,cc as St,d as Ye,db as ut,dd as Be,hb as n,ib as Re,ic as ot,jc as it,kc as rt,l as Xe,lc as nt,ld as le,ma as Te,mc as ce,nb as Ee,nc as Fe,ob as et,oc as M,pc as L,qa as re,qb as tt,qc as N,rb as gt,rc as U,tb as y,ua as B,ud as J,vb as Ie,w as A,wc as st,wd as bt,xc as at,ya as p,yc as ct,ye as Mt,zb as f}from"./chunk-6LP6WHZQ.js";import{a as Me,k as Oe}from"./chunk-5KTCK5IS.js";var ge=(()=>{class t{constructor(){this.mapStoreToDistributorLocatorStore=e=>({id:e.storeGuid,name:e.displayName||"",addressLine1:e.street1||"",addressLine2:e.street2||"",city:e.city||"",region:e.region||"",country:e.country||"",zipCode:e.zipCode||"",phone:e.phone1||void 0,latitude:e.latitude,longitude:e.longitude,storeFeatures:e.storeFeatures?.map(o=>o.id)??[],storeTypes:e.storeTypes?.map(o=>o.id)??[]}),this.mapClosestStoresToDistributorLocatorClosestStores=e=>({store:this.mapStoreToDistributorLocatorStore(e.store),nextClosestStore:this.mapStoreToDistributorLocatorStore(e.nextClosestStore)})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=B({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var fe=(()=>{class t{constructor(){this.http=p(Lt),this.environmentService=p(de),this.loggerService=p(q),this.currentSiteState=p(Ge)}get distributorApiUrl(){return`${this.environmentService.getEnvironmentVariable(oe.APIM_STORE_LOCATOR_API_BASE_URL)}`}get subscriptionKey(){return`${this.environmentService.getEnvironmentVariable(oe.APIM_STORE_LOCATOR_SUBSCRIPTION_KEY)}`}get httpHeaders(){return new xt().set(Ft,this.subscriptionKey)}get brandFilter(){let e=this.currentSiteState.getSiteSettingValueByKey(I.StoreLocatorBrandFilter);return e||this.loggerService.warn("Warning: StoreLocatorBrandFilter setting does not exist on the CM level."),e||""}getHttpParams(e){return new yt({fromObject:e})}getStoresByCoordinates(e,o){return this.http.get(`${this.distributorApiUrl}api/Store/Coordinates`,{headers:this.httpHeaders,params:this.getHttpParams(Me(Me({brandFilter:this.brandFilter},e&&{latitude:e}),o&&{longitude:o}))}).pipe(w(i=>i??[]),V(i=>(this.loggerService.error(`[DistributorLocatorService][getStoresByCoordinatesAsync] Error occurred while fetching store: ${i.message}.`),A([]))))}getStoresByAddress(e){return this.http.get(`${this.distributorApiUrl}api/Store/Address`,{headers:this.httpHeaders,params:this.getHttpParams(Me({brandFilter:this.brandFilter},e&&{address:e}))}).pipe(w(o=>o??[]),V(o=>(this.loggerService.error(`[DistributorLocatorService][getStoresByAddressAsync] Error occurred while fetching store: ${o.message}.`),A([]))))}getStoreByKey(e){return this.http.get(`${this.distributorApiUrl}api/Store/${e}`,{headers:this.httpHeaders}).pipe(V(o=>(this.loggerService.error(`[DistributorLocatorService][getStoreByKey] Error occurred while fetching store: ${o.message}.`),A(null))))}getClosestStores(e){return this.http.get(`${this.distributorApiUrl}
1api/Store/ClosestStores/${e}`,{headers:this.httpHeaders,params:this.getHttpParams({brandFilter:this.brandFilter})}).pipe(w(o=>o??null),V(o=>(this.loggerService.error(`[DistributorLocatorService][getClosestStores] Error occurred while fetching store: ${o.message}.`),A(null))))}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=B({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var to={id:"",name:"",addressLine1:"",addressLine2:"",city:"",country:"",region:"",zipCode:"",latitude:0,longitude:0,storeTypes:[],storeFeatures:[]},ze=(()=>{class t{constructor(){this.distributorLocatorService=p(fe),this.distributorLocatorMapperService=p(ge),this.destroyRef=p(ne),this.#e=D(to),this.#t=D(to),this.store=this.#e.asReadonly(),this.nextClosestStore=this.#t.asReadonly()}#e;#t;loadDetails(e){return this.distributorLocatorService.getClosestStores(e).pipe(w(o=>{if(o){let i=this.distributorLocatorMapperService.mapClosestStoresToDistributorLocatorClosestStores(o);return this.#e.set(i.store),this.#t.set(i.nextClosestStore),!0}return!1}),ee(this.destroyRef))}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=B({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var he=(()=>{class t{constructor(){this.window=p(It),this.resourceService=p(F),this.textResources=u(()=>
1({directions:this.resourceService.getResourceByKey(S.STORE_LOCATOR_DIRECTION_BUTTON)})),this.store=v.required(),this.directionURL=u(()=>`${At}?daddr=${this.directionAddress()}`),this.directionAddress=u(()=>{let{addressLine1:e,addressLine2:o,city:i,country:c,zipCode:g}=this.store();return[e,o,i,c,g].reduce((h,P)=>(P&&h.push(P),h),[]).join(", ")})}directionsClick(){this.window.open(this.directionURL(),Et.BLANK)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=y({type:t,selectors:[["ppg-directions-button"]],inputs:{store:[1,"store"]},decls:1,vars:2,consts:[["styleClass","font-bold text-sm","icon","pi pi-arrow-up-right text-sm","iconPos","right",3,"onClick","outlined","label"]],template:function(o,i){o&1&&(r(0,"p-button",0),_("onClick",function(){return i.directionsClick()}),a()),o&2&&s("outlined",!0)("label",i.textResources().directions)},dependencies:[E,k],encapsulation:2,changeDetection:0})}}return t})();var Se=(()=>{class t{constructor(){this.resourceService=p(F),this.storeSetAsFavorite=we(),this.textResources=u(()=>
1({myFavorite:this.resourceService.getResourceByKey(S.STORE_LOCATOR_MY_FAVORITE_TAG),setAsFavorite:this.resourceService.getResourceByKey(S.STORE_LOCATOR_SET_AS_FAVORITE_BUTTON)})),this.store=v.required(),this.favoriteStoreId=v(null),this.isFavorite=u(()=>this.store().id===this.favoriteStoreId()),this.icon=u(()=>this.isFavorite()?"pi pi-star-fill text-sm":""),this.label=u(()=>this.isFavorite()?this.textResources().myFavorite:this.textResources().setAsFavorite)}setStoreAsFavorite(){this.storeSetAsFavorite.emit(this.store())}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=y({type:t,selectors:[["ppg-favorite-button"]],inputs:{store:[1,"store"],favoriteStoreId:[1,"favoriteStoreId"]},outputs:{storeSetAsFavorite:"storeSetAsFavorite"},decls:1,vars:3,consts:[["styleClass","font-bold text-sm",3,"onClick","icon","label","disabled"]],template:function(o,i){o&1&&(r(0,"p-button",0),_("onClick",function(){return i.setStoreAsFavorite()}),a()),o&2&&s("icon",i.icon())("label",i.label())("disabled",i.isFavorite())},dependencies:[E,k],encapsulation:2,changeDetection:0})}}return t})();var Ce=(()=>{class t{constructor(){this.textResources=u(()=>
1({moreInfo:this.resourceService.getResourceByKey(S.STORE_LOCATOR_MORE_INFO_BUTTON)})),this.router=p(Ve),this.activatedRoute=p(Mt),this.resourceService=p(F),this.store=v.required(),this.storeDetailsPageRelativePath=v("")}goStoreToDetails(){let e=this.store().id;this.router.navigate([`${this.storeDetailsPageRelativePath()}${Rt.ITEM}`,e],{relativeTo:this.activatedRoute})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=y({type:t,selectors:[["ppg-more-info-button"]],inputs:{store:[1,"store"],storeDetailsPageRelativePath:[1,"storeDetailsPageRelativePath"]},decls:1,vars:2,consts:[["styleClass","font-bold text-sm",3,"onClick","outlined","label"]],template:function(o,i){o&1&&(r(0,"p-button",0),_("onClick",function(){return i.goStoreToDetails()}),a()),o&2&&s("outlined",!0)("label",i.textResources().moreInfo)},dependencies:[E,k],encapsulation:2,changeDetection:0})}}return t})();var ve=(()=>{class t{constructor(){this.resourceItem=S,this.compact=v(!1,{transform:ye})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=y({type:t,selectors:[["ppg-my-favorite-indicator"]],inputs:{compact:[1,"compact"]},decls:3,vars:5,consts:[[1,"flex","align-items-center","gap-2","text-sm"],[1,"pi","pi-star-fill","text-lg"],[3,"resourceKey"]],template:function(o,i){o&1&&(r(0,"span",0),d(1,"i",1)(2,"ppg-resource-item",2),a()),o&2&&(ft("color","var(--color-green-700)"),n(2),ae("hidden",i.compact()),s("resourceKey",i.resourceItem.STORE_LOCATOR_MY_FAVORITE_TAG))},dependencies:[Ue],encapsulation:2,changeDetection:0})}}return t})();var j=(()=>{class t{constructor(){this.templateRef=p(Re,{optional:!0})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275dir=Ie({type:t,selectors:[["","ppgStoreCardButton",""]]})}}return t})();var W=(()=>{class t{constructor(){this.templateRef=p(Re,{optional:!0}),this.ppgStoreCardHeaderAction=v.required()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275dir=Ie({type:t,selectors:[["","ppgStoreCardHeaderAction",""]],inputs:{ppgStoreCardHeaderAction:[1,"ppgStoreCardHeaderAction"]}})}}return t})();var _o=["*"];function ho(t,l){if(t&1&&R(0,7),t&2){let e=l.$implicit;s("ngTemplateOutlet",e.templateRef)}}function So(t,l){if(t&1&&R(0,7),t&2){let e=l.$implicit;s("ngTemplateOutlet",e.templateRef)}}function Co(t,l){if(t&1&&(r(0,"div",8),Z(1,So,1,1,"ng-container",7,Ae),a()),t&2){let e=m(2);n(),Q(e.afterHeaderActions())}}function vo(t,l){if(t&1&&(r(0,"div",1)(1,"div"),Z(2,ho,1,1,"ng-container",7,Ae),L(4),a(),f(5,Co,3,0,"div",8),a()),t&2){let e=m();n(2),Q(e.beforeHeaderActions()),n(2),U(" ",e.store().name," "),n(),C(e.afterHeaderActions().length>0?5:-1)}}function bo(t,l){if(t&1&&(r(0,"a",5),L(1),a()),t&2){let e=m();s("href",e.phoneLink(),ut),n(),N(e.store().phone)}}function xo(t,l){if(t&1&&R(0,7),t&2){let e=l.$implicit;s("ngTemplateOutlet",e.templateRef)}}function yo(t,l){if(t&1&&(r(0,"div",6),Z(1,xo,1,1,"ng-container",7,Ae),a()),t&2){let e=m();n(),Q(e.actionButtons())}}var be=(()=>{class t{constructor(){this.store=v.required(),this.hideStoreImage=v(!1,{transform:ye}),this.hideCardHeader=v(!1,{transform:ye}),this.phoneLink=u(()=>this.store().phone?`tel:${this.store().phone}`:null),this.fullAddress=u(()=>{let{city:e,region:o,country:i,zipCode:c}=this.store();return[e,o,i,c].reduce((g,h)=>(h&&g.push(h),g),[]).join(", ")}),this.actionButtons=tt(j),this.headerActions=tt(W),this.afterHeaderActions=u(()=>this.headerActions().filter(e=>e.ppgStoreCardHeaderAction()==="after")),this.beforeHeaderActions=u(()=>this.headerActions().filter(e=>e.ppgStoreCardHeaderAction()==="before"))}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=y({type:t,selectors:[["ppg-distributor-locator-store-card"]],contentQueries:function(o,i,c){o&1&&(nt(c,i.actionButtons,j,4),nt(c,i.headerActions,W,4)),o&2&&Fe(2)},hostAttrs:[1,"font-normal","text-base"],inputs:{store:[1,"store"],hideStoreImage:[1,"hideStoreImage"],hideCardHeader:[1,"hideCardHeader"]},ngContentSelectors:_o,decls:11,vars:5,consts:[[1,"flex","flex-column","gap-3"],[1,"card-header","flex","align-items-center","gap-2","text-sm"],[1,"cart-content","flex","gap-3"],[1,"flex","flex-column","gap-2"],[1,"address-lines","m-0","text-sm"],[1,"ph
1one-link","font-bold","no-underline",3,"href"],[1,"card-buttons","flex","gap-2"],[3,"ngTemplateOutlet"],[1,"flex","flex-1","justify-content-end"]],template:function(o,i){o&1&&(ht(),r(0,"article",0),f(1,vo,6,2,"div",1),r(2,"div",2)(3,"div",3)(4,"p",4),L(5),d(6,"br"),L(7),a(),f(8,bo,2,2,"a",5),a()(),f(9,yo,3,0,"div",6),a(),St(10)),o&2&&(n(),C(i.hideCardHeader()?-1:1),n(4),N(i.store().addressLine1),n(2),N(i.fullAddress()),n(),C(i.phoneLink()?8:-1),n(),C(i.actionButtons().length>0?9:-1))},dependencies:[E,le],styles:["[_nghost-%COMP%]{color:var(--global-text-color)}[_nghost-%COMP%]     .card-buttons{flex-wrap:wrap}@media all and (min-width:768px){[_nghost-%COMP%]     .card-buttons{flex-wrap:nowrap}}[_nghost-%COMP%]     .card-buttons>*:first-child{width:100%}[_nghost-%COMP%]     .card-buttons>*:not(:first-child){width:calc(50% - .25rem)}@media all and (min-width:768px){[_nghost-%COMP%]     .card-buttons>*:not(:first-child){width:100%}}[_nghost-%COMP%]     .card-buttons .p-button{width:100%;justify-content:center}[_nghost-%COMP%]     .card-buttons .p-button .p-button-label{flex:none}.phone-link[_ngcontent-%COMP%]{color:var(--color-link-color)}.cart-content[_ngcontent-%COMP%]{min-width:470px}"],changeDetection:0})}}return t})();var oo=["mapMarker"];function Lo(t,l){if(t&1){let e=O();r(0,"map-advanced-marker",7,0),_("mapClick",function(){let i=b(e),c=M(1),g=m();return x(g.openInfoWindow(c,i))}),a(),r(2,"div",8)(3,"div",9,1),d(5,"img",10),a()()}if(t&2){let e=l,o=M(4);
1s("id",e.store.id)("position",e.position)("content",o)}}function Do(t,l){if(t&1&&(r(0,"div",12),L(1),a()),t&2){let e=m().$implicit;n(),U(" ",e.index," ")}}function Mo(t,l){if(t&1){let e=O();r(0,"map-advanced-marker",7,0),_("mapClick",function(){let i=b(e).$implicit,c=M(1),g=m();return x(g.openInfoWindow(c,i))}),a(),r(2,"div",8)(3,"div",9,2),d(5,"img",11),f(6,Do,2,1,"div",12),a()()}if(t&2){let e=l.$implicit,o=M(4),i=m();s("id",e.store.id)("position",e.position)("content",o),n(6),C(i.disableMarkerIndexes()?-1:6)}}function Oo(t,l){t&1&&(d(0,"ppg-my-favorite-indicator"),r(1,"span"),L(2,"|"),a())}function To(t,l){if(t&1&&L(0),t&2){let e=m(2);U(" ",e.index,". ")}}function wo(t,l){if(t&1&&(G(0),f(1,Oo,3,0)(2,To,1,1),H()),t&2){let e=m(),o=m();n(),C(e.index===o.FAVORITE_STORE_INDEX?1:2)}}function Ro(t,l){if(t&1){let e=O();G(0),r(1,"p-button",16),_("click",function(){b(e);let i=m(2);return x(i.closeInfoWindow())}),a(),H()}t&2&&(n(),s("text",!0))}function Eo(t,l){if(t&1){let e=O();r(0,"ppg-favorite-button",17),_("storeSetAsFavorite",function(i){b(e);let c=m(2);return x(c.onStoreSetFavorite(i))}),a()}if(t&2){let e,o=m(),i=m();s("store",o.store)("favoriteStoreId",(e=(e=i.favoriteStore())==null?null:e.id)!==null&&e!==void 0?e:null)}}function Io(t,l){if(t&1&&d(0,"ppg-directions-button",18),t&2){let e=m();s("store",e.store)}}function Ao(t,l){if(t&1&&d(0,"ppg-more-info-button",18),t&2){let e=m();s("store",e.store)}}function Fo(t,l){t&1&&(r(0,"ppg-distributor-locator-store-card",6),f(1,wo,3,1,"ng-container",13)(2,Ro,2,1,"ng-container",13)(3,Eo,1,2,"ppg-favorite-button",14)(4,Io,1,1,"ppg-directions-button",15)(5,Ao,1,1,"ppg-more-info-button",15),a()),t&2&&(s("store",l.store),n(),s("ppgStoreCardHeaderAction","before"),n(),s("ppgStoreCardHeaderAction","after"))}var ko=500,Le=(()=>{class t{#e;#t;#o;#i;#r;constructor(){this.document=p(Be),this.ngZone=p(z),this.FAVORITE_STORE_INDEX=-1,this.destroyRef=p(ne),this.breakpointObserver=p(pe),this.#e=p(We),this.favoriteStore=v(null),this.stores=v([]),this.disableOpenInfoWindow=v(!1),this.disableMarkerIndexes=v(!1),this.googleMap=Ee.required(ue),this.mapRef=Ee.required(ue,{read:xe}),this.infoWindow=Ee.required($e),this.mapMarkers=et("mapMarker"),this.mapMarkersElements=et("mapMarker",{read:xe}),this.isMobile=te(this.breakpointObserver.observe("(max-width: 767.98px)").pipe(w(({matches:e})=>e))),this.markers=u(()=>this.stores().reduce((e,o,i)=>(o.latitude&&o.longitude&&e.push(this.createMarker(o,i+1)),e),[])),this.favoriteMarker=u(()=>{let e=this.favoriteStore();return e?this.createMarker(e,-1):null}),this.markerStoreData=D(null),this.#t=this.#e.getSiteSettingValueByKey(I.StoreLocatorDefaultMapFocus),this.#o=this.#e.getSiteSettingValueByKey(I.StoreLocatorDefaultZoomLevel),this.#i={lat:38.030786,lng:-96.635742},this.#r=4,this.center=this.getParsedCoordinates(this.#t)||this.#i,this.defaultZoomLvl=isNaN(parseInt(this.#o))?this.#r:parseInt(this.#o),this.mapId="DEMO_MAP_ID",this.mapOptions={},this.infoWindowOptions={headerDisabled:!0},this.storeSetAsFavorite=we(),this.mapOptions=this.ngZone.runOutsideAngular(()=>({fullscreenControl:!1,streetViewControl:!1,mapTypeControl:!1,zoomControl:!0,disableDefaultUI:!0,scrollwheel:!1,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_TOP}})),Pe(()=>{let e=[...this.markers()],o=[...this.stores()];e.length>0&&pt(ko).pipe(ee(this.destroyRef)).subscribe(()=>{this.setBounds(o)}),!(e.length<=1)&&this.ngZone.runOutsideAngular(()=>{let i=new google.maps.LatLngBounds;e.forEach(c=>i.extend(new google.maps.LatLng(c.store.latitude,c.store.longitude))),google.maps.event.trigger(this.mapRef,"resize"),this.googleMap().googleMap?.fitBounds(i)})})}openInfoWindow(e,o){this.disableOpenInfoWindow()||(this.markerStoreData.set(o),this.ngZone.runOutsideAngular(()=>{if(this.isMobile()){this.googleMap().googleMap?.setCenter(o.position);return}this.infoWindow().open({getAnchor:()=>e.advancedMarker}),this.infoWindow().domready.pipe(mt(1)).subscribe(()=>{let i=this.document.querySelector(".gm-style-iw.gm-style-iw-c");i&&(i.classList.add("p-0"),i.parentElement?.querySelector("div > .gm-style-iw-d")?.classList.add("overflow-hidden"),i.parentElement?.querySelector("div > button")?.classList.add("hidden"))})}))}closeInfoWindow(){this.ngZone.runOutsideAngular(()=>this.infoWindow().close())}
1showOnMap(e){let o=this.mapMarkers(),c=this.mapMarkersElements().findIndex(K=>K.nativeElement.id===e.id),h=e.id===this.favoriteMarker()?.store.id?this.favoriteMarker():this.markers().find(K=>K.store.id===e.id);if(c===-1||!h)return;let P=o[c];this.openInfoWindow(P,h)}onStoreSetFavorite(e){this.closeInfoWindow(),this.storeSetAsFavorite.emit(e)}createMarker(e,o){return{position:{lat:e.latitude,lng:e.longitude},store:e,index:o}}setBounds(e){let o=this.ngZone.runOutsideAngular(()=>new google.maps.LatLngBounds);if(e)for(let i of e){let c={lat:i.latitude,lng:i.longitude};this.ngZone.runOutsideAngular(()=>o.extend(c))}this.ngZone.runOutsideAngular(()=>{this.googleMap().googleMap?.setCenter(o.getCenter()),this.googleMap().googleMap?.setOptions({zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_TOP}})}),this.setBoundsZoomLevel(o)}setBoundsZoomLevel(e){let o={height:256,width:256},i=18,c=this.mapRef().nativeElement.children[0],g={height:c.clientHeight,width:c.clientWidth};function h(Qe){let De=Math.sin(Qe*Math.PI/180),qe=Math.log((1+De)/(1-De))/2;return Math.max(Math.min(qe,Math.PI),-Math.PI)/2}function P(Qe,De,qe){return Math.floor(Math.log(Qe/De/qe)/Math.LN2)}
1let K=e.getNorthEast(),ie=e.getSouthWest(),mo=(h(K.lat())-h(ie.lat()))/Math.PI,Ze=K.lng()-ie.lng(),uo=(Ze<0?Ze+360:Ze)/360,go=P(g.height,o.height,mo),fo=P(g.width,o.width,uo);this.ngZone.runOutsideAngular(()=>{this.googleMap().googleMap?.setZoom(Math.min(go,fo,i))})}getParsedCoordinates(e){if(!e)return null;let[o,i]=e.split(",").map(parseFloat);return isNaN(o)||isNaN(i)?null:{lat:o,lng:i}}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=y({type:t,selectors:[["ppg-google-maps"]],viewQuery:function(o,i){o&1&&(ce(i.googleMap,ue,5),ce(i.mapRef,ue,5,xe),ce(i.infoWindow,$e,5),ce(i.mapMarkers,oo,5),ce(i.mapMarkersElements,oo,5,xe)),o&2&&Fe(5)},inputs:{favoriteStore:[1,"favoriteStore"],stores:[1,"stores"],disableOpenInfoWindow:[1,"disableOpenInfoWindow"],disableMarkerIndexes:[1,"disableMarkerIndexes"]},outputs:{storeSetAsFavorite:"storeSetAsFavorite"},decls:7,vars:7,consts:[["mapMarker","mapAdvancedMarker"],["favoriteMarkerEl",""],["numericMarkerEl",""],[1,"w-full","h-full"],["width","100%","height","100%",3,"center","zoom","mapId","options"],[1,"overflow-hidden",3,"options"],[1,"block","border-round-sm","p-3",3,"store"],[3,"mapClick","id","position","content"],[1,"hidden"],[1,"relative"],["ngSrc","/assets/img/map-marker-star.svg","width","40","height","40","alt","Favorite store marker"],["ngSrc","/assets/img/map-marker.png","width","40","height","40","alt","Store marker"],[1,"absolute","left-0","text-center",2,"top","8px","width","40px","color","white"],[4,"ppgStoreCardHeaderAction"],[3,"store","favoriteStoreId","storeSetAsFavorite",4,"ppgStoreCardButton"],[3,"store",4,"ppgStoreCardButton"],["styleClass","text-sm","severity","secondary","icon","pi pi-times text-sm",3,"click","text"],[3,"storeSetAsFavorite","store","favoriteStoreId"],[3,"store"]],template:function(o,i){if(o&1&&(r(0,"div",3)(1,"google-map",4),f(2,Lo,6,3),Z(3,Mo,7,4,null,null,_t),r(5,"map-info-window",5),f(6,Fo,6,3,"ppg-distributor-locator-store-card",6),a()()()),o&2){let c,g;n(),s("center",i.center)("zoom",i.defaultZoomLvl)("mapId",i.mapId)("options",i.mapOptions),n(),C((c=i.favoriteMarker())?2:-1,c),n(),Q(i.markers()),n(2),s("options",i.infoWindowOptions),n(),C((g=i.markerStoreData())?6:-1,g)}},dependencies:[E,k,ue,$e,eo,be,j,W,Se,he,Ce,ve,bt],encapsulation:2,changeDetection:0})}}return t})();var io=(()=>{class t{constructor(){this.document=p(Be),this.resourceService=p(F),this.textResources=u(()=>
1({callLocation:this.resourceService.getResourceByKey(S.STORE_LOCATOR_CALL_LOCATION_BUTTON)})),this.phone=v.required()}callLocation(){this.document.location.href=`tel:${this.phone()}`}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=y({type:t,selectors:[["ppg-call-location-button"]],inputs:{phone:[1,"phone"]},decls:1,vars:2,consts:[["styleClass","font-bold text-sm","icon","pi pi-phone text-sm","iconPos","right",3,"onClick","outlined","label"]],template:function(o,i){o&1&&(r(0,"p-button",0),_("onClick",function(){return i.callLocation()}),a()),o&2&&s("outlined",!0)("label",i.textResources().callLocation)},dependencies:[E,k],encapsulation:2,changeDetection:0})}}return t})();var Po=()=>["../.."],Bo=t=>[t];function Vo(t,l){t&1&&R(0)}function No(t,l){t&1&&R(0)}function Ko(t,l){t&1&&R(0)}function Go(t,l){t&1&&R(0)}function Ho(t,l){t&1&&R(0)}function Uo(t,l){t&1&&R(0)}function jo(t,l){t&1&&R(0)}function Wo(t,l){t&1&&R(0)}function $o(t,l){if(t&1){let e=O();r(0,"ppg-favorite-button",19),_("storeSetAsFavorite",function(i){b(e);let c=m(2);return x(c.onStoreSetFavorite(i))}),a()}if(t&2){let e=m(2);s("store",e.detailsService.store())("favoriteStoreId",e.favoriteStoreId())}}function zo(t,l){if(t&1&&d(0,"ppg-directions-button",20),t&2){let e=m(2);s("store",e.detailsService.store())}}function Zo(t,l){if(t&1&&d(0,"ppg-call-location-button",18),t&2){let e=m();s("phone",e)}}function Qo(t,l){t&1&&f(0,Zo,1,1,"ppg-call-location-button",21)}function qo(t,l){if(t&1&&(r(0,"div",14)(1,"ppg-distributor-locator-store-card",15),f(2,$o,1,2,"ppg-favorite-button",16)(3,zo,1,1,"ppg-directions-button",17)(4,Qo,1,0,"ppg-call-location-button",18),a()()),t&2){let e,o=m();n(),s("store",o.detailsService.store()),n(3),C((e=o.detailsService.store().phone)?4:-1,e)}}function Yo(t,l){if(t&1&&d(0,"ppg-google-maps",23,4),t&2){let e=m(2);s("stores",vt(3,Bo,e.detailsService.store()))("disableOpenInfoWindow",!0)("disableMarkerIndexes",!0)}}function Xo(t,l){if(t&1&&(r(0,"section",22),f(1,Yo,2,5,"ppg-google-maps",23),a()),t&2){let e=m();n(),C(e.isMapsLibraryInitialized()?1:-1)}}function Jo(t,l){t&1&&d(0,"section",24)}function ei(t,l){if(t&1&&(r(0,"div",32),d(1,"ppg-my-favorite-indicator",33),r(2,"span"),L(3,"|"),a()()),t&2){let e=m(3);n(),s("compact",e.isMobile()),n(),ae("hidden",e.isMobile())}}function ti(t,l){if(t&1&&(G(0),f(1,ei,4,3,"div",32),H()),t&2){let e=m(2);n(),C(e.detailsService.nextClosestStore().id===e.favoriteStoreId()?1:-1)}}function oi(t,l){if(t&1){let e=O();r(0,"ppg-favorite-button",34),_("storeSetAsFavorite",function(i){b(e);let c=m(2);return x(c.onStoreSetFavorite(i))}),a()}if(t&2){let e=m(2);s("store",e.detailsService.nextClosestStore())("favoriteStoreId",e.favoriteStoreId())}}function ii(t,l){if(t&1&&d(0,"ppg-directions-button",35),t&2){let e=m(2);s("store",e.detailsService.nextClosestStore())}}function ri(t,l){if(t&1&&d(0,"ppg-more-info-button",36),t&2){let e=m(2);s("storeDetailsPageRelativePath","../../")("store",e.detailsService.nextClosestStore())}}function ni(t,l){if(t&1&&(d(0,"p-divider"),r(1,"section",25)(2,"h2",26),L(3),a(),r(4,"ppg-distributor-locator-store-card",27),f(5,ti,2,1,"ng-container",28)(6,oi,1,2,"ppg-favorite-button",29)(7,ii,1,1,"ppg-directions-button",30)(8,ri,1,2,"ppg-more-info-button",31),a()()),t&2){let e=m();n(3),U(" ",e.textResources().nextClosesStore," "),n(),s("hideStoreImage",e.isMobile())("store",e.detailsService.nextClosestStore()),n(),s("ppgStoreCardHeaderAction","before")}}var ro=(()=>{class t{constructor(){this.textResources=u(()=>({backToStoreLocator:this.resourceService.getResourceByKey(S.STORE_
1LOCATOR_MORE_INFO_BACK_BUTTON),nextClosesStore:this.resourceService.getResourceByKey(S.STORE_LOCATOR_NEXT_CLOSEST_STORE)})),this.ngZone=p(z),this.loader=p(Y),this.breakpointObserver=p(pe),this.cookieService=p(He),this.resourceService=p(F),this.detailsService=p(ze),this.favoriteStoreId=D(this.cookieService.get(me)),this.isMobile=te(this.breakpointObserver.observe("(max-width: 767.98px)").pipe(w(({matches:e})=>e))),this.isMapsLibraryInitialized=D(!1),this.platform=p(se)}ngOnInit(){return Oe(this,null,function*(){J(this.platform)&&(yield this.ngZone.runOutsideAngular(()=>this.loader.importLibrary("places")),this.isMapsLibraryInitialized.set(!0))})}onStoreSetFavorite(e){this.cookieService.set(me,e.id,Ne),this.favoriteStoreId.set(e.id)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=y({type:t,selectors:[["ppg-distributor-locator-details"]],features:[ke([{provide:Y,useFactory:e=>new Y({apiKey:e.getEnvironmentVariable(oe.GOOGLE_API_KEY)||"",libraries:["places"]}),deps:[de]}])],decls:25,vars:13,consts:[["storeDetailsSectionRef",""],["mapSectionRef",""],["imageSectionRef",""],["nextClosestStoreSectionRef",""],["ppgGoogleMap",""],[1,"section-container","flex","flex-column","gap-4"],["id","store-details-back-button","styleClass","font-bold text-sm","icon","pi pi-arrow-left text-sm",1,"mb-3","white-space-nowrap",3,"text","label","routerLink"],[1,"page-title","font-bold","m-0","title-color"],[1,"desktop-layout"],[1,"flex","flex-column","flex-1","gap-4"],[4,"ngTemplateOutlet"],[1,"flex","flex-column","flex-1","gap-3"],[1,"mobile-tablet-layout","flex-column","gap-4"],[1,"map-image-container","flex","gap-3"],[1,"store-details"],["hideCardHeader","","hideStoreImage","",1,"store-details-card",3,"store"],["class","w-full",3,"store","favoriteStoreId","storeSetAsFavorite",4,"ppgStoreCardButton"],["class","w-full",3,"store",4,"ppgStoreCardButton"],[1,"w-full",3,"phone"],[1,"w-full",3,"storeSetAsFavorite","store","favoriteStoreId"],[1,"w-full",3,"store"],["class","w-full",3,"phone",4,"ppgStoreCardButton"],[1,"map-section","border-round-sm","flex-1"],[3,"stores","disableOpenInfoWindow","disableMarkerIndexes"],[1,"image-section","flex-1"],[1,"next-closest-store","flex","flex-column","gap-3"],[1,"title-color","text-3xl","m-0"],[1,"next-closest-store-card","block","border-round-sm","p-3",3,"hideStoreImage","store"],[4,"ppgStoreCardHeaderAction"],[3,"store","favoriteStoreId","storeSetAsFavorite",4,"ppgStoreCardButton"],[3,"store",4,"ppgStoreCardButton"],[3,"storeDetailsPageRelativePath","store",4,"ppgStoreCardButton"],[1,"inline-flex","gap-2"],[3,"compact"],[3,"storeSetAsFavorite","store","favoriteStoreId"],[3,"store"],[3,"storeDetailsPageRelativePath","store"]],template:function(o,i){if(o&1&&(r(0,"section",5),d(1,"p-button",6),r(2,"h1",7),L(3),a(),r(4,"div",8)(5,"div",9),f(6,Vo,1,0,"ng-container",10)(7,No,1,0,"ng-container",10),a(),r(8,"div",11),f(9,Ko,1,0,"ng-container",10)(10,Go,1,0,"ng-container",10),a()(),r(11,"div",12),f(12,Ho,1,0,"ng-container",10),r(13,"div",13),f(14,Uo,1,0,"ng-container",10)(15,jo,1,0,"ng-container",10),a(),f(16,Wo,1,0,"ng-container",10),a()(),f(17,qo,5,2,"ng-template",null,0,X)(19,Xo,2,1,"ng-template",null,1,X)(21,Jo,1,0,"ng-template",null,2,X)(23,ni,9,4,"ng-template",null,3,X)),o&2){let c=M(18),g=M(20),h=M(22),P=M(24);n(),s("text",!0)("label",i.textResources().backToStoreLocator)("routerLink",Ct(12,Po)),n(2),N(i.detailsService.store().name),n(3),s("ngTemplateOutlet",c),n(),s("ngTemplateOutlet",P),n(2),s("ngTemplateOutlet",g),n(),s("ngTemplateOutlet",h),n(2),s("ngTemplateOutlet",c),n(2),s("ngTemplateOutlet",g),n(),s("ngTemplateOutlet",h),n(),s("ngTemplateOutlet",P)}},dependencies:[be,W,Se,he,io,j,Ce,le,ve,je,Ut,E,k,Tt,Le],styles:[".page-title[_ngcontent-%COMP%]{font-size:35px}.title-color[_ngcontent-%COMP%]{color:var(--color-bluegray-900)}.store-details[_ngcontent-%COMP%]   ppg-distributor-locator-store-card[_ngcontent-%COMP%]     .address-lines{color:var(--global-text-color);font-weight:700;line-height:1.5}.next-closest-store[_ngcontent-%COMP%]   ppg-distributor-locator-store-card[_ngcontent-%COMP%]{border:1px solid var(--root-surface-border)}.map-section[_ngcontent-%COMP%]{width:100%;height:100%}.image-section[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;background:#f0f0f0}.map-section[_ngcontent-%COMP%], .image-section[_ngcontent-%COMP%], .image-section[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{aspect-ratio:16/9}.desktop-layout[_ngcontent-%COMP%]{display:none;gap:2.5rem}@media all and (min-width:1280px){.desktop-layout[_ngcontent-%COMP%]{display:flex}}.mobile-tablet-layout[_ngcontent-%COMP%]{display:none}@media all and (max-width:1279px){.mobile-tablet-layout[_ngcontent-%COMP%]{display:flex}}.map-image-container[_ngcontent-%COMP%]{flex-direction:row}@media all and (max-width:767px){.map-image-container[_ngcontent-%COMP%]{flex-direction:column}}"],changeDetection:0})}}return t})();var no=(()=>{class t{constructor(){this.currentSiteState=p(Ge),this.resourceService=p(F),this.appliedFilters=gt([]),this.filterPopoverResources=u(()=>
1({open:this.resourceService.getResourceByKey(S.STORE_LOCATOR_FILTERS),clear:this.resourceService.getResourceByKey(S.STORE_LOCATOR_CLEAR_FILTERS)})),this.showAppliedFiltersIndicator=u(()=>this.appliedFilters().length>0),this.filterGroups=u(()=>{let e=this.filters(),o=this.appliedFilters();return e.map(i=>({label:i.label,value:i.label,filters:i.filters.map(({filter:c,label:g})=>({label:g,value:c,checked:o.includes(c)}))}))}),this.filters=u(()=>{let e=this.currentSiteState.currentSite();return e?e.distributorLocatorFilters.map(o=>({label:this.resourceService.getResourceByKey(o.name),filters:o.filters.map(i=>({label:this.resourceService.getResourceByKey(i.labelKey),filter:i}))})):[]})}toggleSelection({checked:e,filter:o}){this.appliedFilters.update(i=>e?[...i,o]:[...i.filter(c=>o!==c)])}clearFilters(){this.appliedFilters.set([])}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=y({type:t,selectors:[["ppg-distributor-locator-filters"]],inputs:{appliedFilters:[1,"appliedFilters"]},outputs:{appliedFilters:"appliedFiltersChange"},decls:1,vars:4,consts:[[3,"selectionChanged","clearSelection","withPopoverClose","showAppliedFiltersIndicator","resources","filterGroups"]],template:function(o,i){o&1&&(r(0,"ppg-filter-popover",0),_("selectionChanged",function(g){return i.toggleSelection(g)})("clearSelection",function(){return i.clearFilters()}),a()),o&2&&s("withPopoverClose",!1)("showAppliedFiltersIndicator",i.showAppliedFiltersIndicator())("resources",i.filterPopoverResources())("filterGroups",i.filterGroups())},dependencies:[qt],encapsulation:2,changeDetection:0})}}return t})();var $=(function(t){return t[t.Coordinates=0]="Coordinates",t[t.Address=1]="Address",t[t.None=2]="None",t})($||{});var so=(()=>{class t{constructor(){this.distributorLocatorService=p(fe),this.loggerService=p(q),this.platform=p(se),this.distributorLocatorMapper=p(ge)}loadSearchState(){if(!J(this.platform))return A(null);let e=this.getSearchStateData();return e?e.type===$.Coordinates?this.getDistributorLocatorStoresByCoordinatesSearchData(e):e.type===$.Address?this.getDistributorLocatorStoresByAddressSearchData(e):(this.loggerService.error(`[SessionStorageService][loadSearchState] Received unknown state type: ${JSON.stringify(e)}.`),A(null)):A(null)}saveCoordinatesState(e,o){let i={type:$.Coordinates,data:{latitude:e,longitude:o}};sessionStorage.setItem(Ke,JSON.stringify(i))}saveAddressState(e){let o={type:$.Address,data:{address:e}};sessionStorage.setItem(Ke,JSON.stringify(o))}getDistributorLocatorStoresByAddressSearchData(e){return this.distributorLocatorService.getStoresByAddress(e.data.address).pipe(w(o=>({sessionData:e,stores:o.map(this.distributorLocatorMapper.mapStoreToDistributorLocatorStore)})),V(()=>A(null)))}getDistributorLocatorStoresByCoordinatesSearchData(e){return this.distributorLocatorService.getStoresByCoordinates(e.data.latitude,e.data.longitude).pipe(w(o=>({sessionData:e,stores:o.map(this.distributorLocatorMapper.mapStoreToDistributorLocatorStore)})),V(()=>A(null)))}getSearchStateData(){let e=sessionStorage.getItem(Ke);try{return JSON.parse(e??"")}catch{return this.loggerService.error(`[SessionStorageService][loadSearchState] Invalid save state json for:${e}.`),null}}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=B({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var lt=(()=>{class t{constructor(){this.ngZone=p(z)}getUserLocation(){return new Ye(e=>{if(!navigator.geolocation){e.error("Browser does not support geolocation.");return}navigator.geolocation.getCurrentPosition(o=>{this.ngZone.run(()=>{e.next({latitude:o.coords.latitude,longitude:o.coords.longitude}),e.complete()})},o=>{this.ngZone.run(()=>{e.error("Issue with geolocation: "+o.message)})})})}parseAddress(e){return new Ye(o=>{let i=new google.maps.Geocoder;if(!i.geocode){o.error("Browser does not support geolocation.");return}i.geocode({address:e},(c,g)=>{this.ngZone.run(()=>{g===google.maps.GeocoderStatus.OK?(o.next(e),o.complete()):o.error("Address not found!")})})})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=B({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ao=(()=>{class t{constructor(){this.loggerService=p(q),this.combinedFilters=u(()=>this.appliedFilters().reduce((e,o)=>(e[o.group]??=new Set,o.filterIds.forEach(i=>
1e[o.group].add(i)),e),{})),this.appliedFilters=D([])}applyStoreFilters(e){let o=this.combinedFilters();return Object.keys(o).length>0?e.filter(c=>Object.entries(o).some(([g,h])=>{if(!(ie=>ie in c)(g)||!c[g])return this.loggerService.error(`[DistributorLocatorListService][currentPageStores] store with id ${c.id} does not contain filters for group ${g}`),!1;let K=c[g];return Array.isArray(K)?K.some(ie=>h.has(ie)):(this.loggerService.error(`[DistributorLocatorListService][currentPageStores] store with id ${c.id} contain invalid filters for group ${g}, received: ${K}, expected array.`),!1)})):e}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275prov=B({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var si=["searchInput"],ai=(t,l)=>l.id;function ci(t,l){if(t&1){let e=O();r(0,"p-message",9)(1,"div",37),d(2,"i",38),r(3,"div",39)(4,"div",40),L(5),a(),r(6,"div",36)(7,"span",41),L(8),a(),r(9,"p-button",42),_("click",function(){b(e);let i=m();return x(i.sidebarVisible.set(!0))}),a()()(),r(10,"p-button",43),_("onClick",function(){b(e);let i=m();return x(i.closeUnauthorizedSellerDisclaimer())}),a()()()}if(t&2){let e=m();n(5),N(e.textResources().warning),n(3),N(e.textResources().disclaimerTitle),n(),s("label",e.textResources().storeLocatorDisclaimerViewButton)("text",!0),n(),s("rounded",!0)("text",!0)("label","")("ariaLabel",e.textResources().closeLabel)}}function li(t,l){if(t&1){let e=O();r(0,"p-message",10)(1,"div",37),d(2,"i",44),r(3,"div",39)(4,"div",40),L(5),a(),r(6,"div",36),L(7),a()(),r(8,"p-button",45),_("onClick",function(){b(e);let i=m();return x(i.closeGeolocationServiceError())}),a()()()}if(t&2){let e=m();n(5),N(e.textResources().error),n(2),N(e.textResources().geoLocationServiceError),n(),s("rounded",!0)("text",!0)("label","")("ariaLabel",e.textResources().closeLabel)}}function pi(t,l){if(t&1){let e=O();r(0,"button",46),_("click",function(){b(e),m();let i=M(14);return x(i.value="")}),r(1,"i",47),Je(),r(2,"svg",20),d(3,"use",48),a()()()}}function mi(t,l){t&1&&R(0)}function di(t,l){if(t&1&&f(0,mi,1,0,"ng-container",49),t&2){m();let e=M(35);s("ngTemplateOutlet",e)}}function ui(t,l){if(t&1&&(G(0),r(1,"div",53),d(2,"ppg-my-favorite-indicator",54),r(3,"span"),L(4,"|"),a()(),H()),t&2){let e=m(2);n(2),s("compact",e.isMobile()),n(),ae("hidden",e.isMobile())}}function gi(t,l){if(t&1){let e=O();G(0),r(1,"p-button",55),_("onClick",function(){b(e);let i=m(2);return x(i.showOnMap(i.favoriteStore()))}),a(),H()}if(t&2){let e=m(2);n(),s("text",!0)("label",e.textResources().showOnMap)}}function fi(t,l){if(t&1&&d(0,"ppg-favorite-button",56),t&2){let e=m(2);s("store",e.favoriteStore())("favoriteStoreId",e.favoriteStore().id)}}function _i(t,l){if(t&1&&d(0,"ppg-directions-button",57),t&2){let e=m(2);s("store",e.favoriteStore())}}function hi(t,l){if(t&1&&d(0,"ppg-more-info-button",57),t&2){let e=m(2);s("store",e.favoriteStore())}}function Si(t,l){if(t&1&&(r(0,"ppg-distributor-locator-store-card",27),f(1,ui,5,3,"ng-container",50)(2,gi,2,2,"ng-container",50)(3,fi,1,2,"ppg-favorite-button",51)(4,_i,1,1,"ppg-directions-button",52)(5,hi,1,1,"ppg-more-info-button",52),a()),t&2){let e=m();s("hideStoreImage",e.isMobile())("store",e.favoriteStore()),n(),s("ppgStoreCardHeaderAction","before"),n(),s("ppgStoreCardHeaderAction","after")}}function Ci(t,l){if(t&1&&(G(0),L(1),H()),t&2){let e=m().$index,o=m();n(),U(" ",e%o.storeRows+1,".")}}function vi(t,l){if(t&1){let e=O();G(0),r(1,"p-button",55),_("onClick",function(){b(e);let i=m().$implicit,c=m();return x(c.showOnMap(i))}),a(),H()}if(t&2){let e=m(2);n(),s("text",!0)("label",e.textResources().showOnMap)}}function bi(t,l){if(t&1){let e=O();r(0,"ppg-favorite-button",59),_("storeSetAsFavorite",function(i){b(e);let c=m(2);return x(c.onStoreSetFavorite(i))}),a()}if(t&2){let e=m().$implicit;s("store",e)}}function xi(t,l){if(t&1&&d(0,"ppg-directions-button",57),t&2){let e=m().$implicit;s("store",e)}}function yi(t,l){if(t&1&&d(0,"ppg-more-info-button",57),t&2){let e=m().$implicit;s("store",e)}}function Li(t,l){if(t&1&&(r(0,"ppg-distributor-locator-store-card",28),f(1,Ci,2,1,"ng-container",50)(2,vi,2,2,"ng-container",50)(3,bi,1,1,"ppg-favorite-button",58)(4,xi,1,1,"ppg-directions-button",52)(5,yi,1,1,"ppg-more-info-button",52),a()),t&2){let e=l.$implicit,o=m();s("hideStoreImage",o.isMobile())("store",e),n(),s("ppgStoreCardHeaderAction","before"),n(),s("ppgStoreCardHeaderAction","after")}}function Di(t,l){t&1&&(r(0,"div",29),d(1,"i",60),a())}function Mi(t,l){if(t&1){let e=O();r(0,"div",30)(1,"p-paginator",61),_("onPageChange",function(i){b(e);let c=m(),g=M(27);return c.onPageChange(i),x(g.scrollTo({top:0}))}),a()()}if(t&2){let e=m(),o=M(2),i=M(10);n(),s("first",e.firstStorePage())("rows",e.storeRows)("pageLinkSize",e.pageLinksSize())("totalRecords",e.totalStores())("ppgScrollOnPageChange",e.isMobile()?i:o)}}function Oi(t,l){t&1&&R(0)}function Ti(t,l){if(t&1&&(r(0,"div",31),f(1,Oi,1,0,"ng-container",49),a()),t&2){m();let e=M(35);n(),s("ngTemplateOutlet",e)}}function wi(t,l){if(t&1){let e=O();r(0,"ppg-google-maps",63),_("storeSetAsFavorite",function(i){b(e);let c=m(2);return x(c.onStoreSetFavorite(i))}),a()}if(t&2){let e=m(2);s("stores",e.currentPageStores())("favoriteStore",e.favoriteStore(
1))}}function Ri(t,l){if(t&1&&f(0,wi,1,2,"ppg-google-maps",62),t&2){let e=m();C(e.isMapsLibraryInitialized()?0:-1)}}var Ei=20,co=(()=>{class t{constructor(){this.loggerService=p(q),this.ngZone=p(z),this.platform=p(se),this.resourceService=p(F),this.distributorLocatorMapper=p(ge),this.geolocationService=p(lt),this.destroyRef=p(ne),this.loader=p(Y),this.cookieService=p(He),this.distributorLocatorService=p(fe),this.sessionStorageService=p(so),this.currentPage=D(1),this.breakpointObserver=p(pe),this.siteSettingsService=p(We),this.favoriteStoreFromAllStores=u(()=>this.allLoadedStores().find(e=>e.id===this.favoriteStoreId())),this.firstStorePage=u(()=>(this.currentPage()-1)*this.storeRows),this.listService=p(ao),this.isMapsLibraryInitialized=D(!1),this.sidebarVisible=D(!1),this.isMobile=te(this.breakpointObserver.observe("(max-width: 767.98px)").pipe(w(({matches:e})=>e))),this.isUnauthorizedSellerDisclaimerVisible=D(!0),this.isGeolocationServiceErrorMessageVisible=D(!1),this.allLoadedStores=D([]),this.favoriteStoreId=D(this.cookieService.get(me)),this.resourceItem=S,this.storeRows=Ei,this.favoriteStorePullingParams=u(()=>({favoriteStoreId:this.favoriteStoreId(),favoriteStoreFromAllStores:this.favoriteStoreFromAllStores()})),this.pageLabelKey=u(()=>this.siteSettingsService.getSiteSettingValueByKey(I.StoreLocatorKontentAICodeNameMainTitle)),this.disclaimerCMCodeNames=u(()=>({warning:this.siteSettingsService.getSiteSettingValueByKey(I.StoreLocatorKontentAICodeNameDisclaimerWarning),title:this.siteSettingsService.getSiteSettingValueByKey(I.StoreLocatorKontentAICodeNameDisclaimerTitle),viewButton:this.siteSettingsService.getSiteSettingValueByKey(I.StoreLocatorKontentAICodeNameDisclaimerViewButton),list1Title:this.siteSettingsService.getSiteSettingValueByKey(I.StoreLocatorKontentAICodeNameDisclaimerList1Title),list1:this.siteSettingsService.getSiteSettingValueByKey(I.StoreLocatorKontentAICodeNameDisclaimerList1),list2Title:this.siteSettingsService.getSiteSettingValueByKey(I.StoreLocatorKontentAICodeNameDisclaimerList2Title),list2:this.siteSettingsService.getSiteSettingValueByKey(I.StoreLocatorKontentAICodeNameDisclaimerList2)})),this.isDisclaimerVisible=u(()=>!!(this.isUnauthorizedSellerDisclaimerVisible()&&this.textResources().warning&&this.textResources().disclaimerTitle&&this.textResources().storeLocatorDisclaimerViewButton)),this.textResources=u(()=>({warning:this.resourceService.getResourceByKey(this.disclaimerCMCodeNames().warning),disclaimerTitle:this.resourceService.getResourceByKey(this.disclaimerCMCodeNames().title),useMyLocation:this.resourceService.getResourceByKey(S.STORE_
1LOCATOR_USE_MY_LOCATION_BUTTON),storeLocatorDisclaimerViewButton:this.resourceService.getResourceByKey(this.disclaimerCMCodeNames().viewButton),resultsLocatedNear:this.resourceService.getResourceByKey(S.STORE_LOCATOR_RESULTS_TITLE),filters:this.resourceService.getResourceByKey(S.STORE_LOCATOR_FILTERS),searchForLocation:this.resourceService.getResourceByKey(S.STORE_LOCATOR_SEARCH_PLACEHOLDER),searchToViewResults:this.resourceService.getResourceByKey(S.STORE_LOCATOR_ENTER_LOCATION),showOnMap:this.resourceService.getResourceByKey(S.STORE_LOCATOR_SHOW_ON_MAP_BUTTON),geoLocationServiceError:this.resourceService.getResourceByKey(S.STORE_LOCATOR_GEO_LOCATION_SERVICE_ERROR),error:this.resourceService.getResourceByKey(S.STORE_LOCATOR_ERROR),closeLabel:this.resourceService.getResourceByKey(S.A11Y_CLOSE)})),this.favoriteStore=te(Dt(this.favoriteStorePullingParams).pipe(Te(({favoriteStoreFromAllStores:e,favoriteStoreId:o})=>e?A(e):o?this.distributorLocatorService.getStoreByKey(o).pipe(w(i=>i?this.distributorLocatorMapper.mapStoreToDistributorLocatorStore(i):null)):A(null))),{initialValue:null}),this.storesToDisplay=u(()=>{let e=this.allLoadedStores().filter(o=>o.id!==this.favoriteStore()?.id);return e=this.listService.applyStoreFilters(e),e}),this.currentPageStores=u(()=>{let e=this.currentPage();return this.storesToDisplay().slice(this.firstStorePage(),e*this.storeRows)}),this.searchAddress=D(""),this.userCoordinates=D(null),this.searchLabel=u(()=>{if(this.searchAddress())return`${this.textResources().resultsLocatedNear} ${this.searchAddress()}`;if(!this.userCoordinates())return this.textResources().searchToViewResults}),this.totalStores=u(()=>this.storesToDisplay().length),this.pageLinksSize=u(()=>this.isMobile()?2:5),this.countryCode=this.siteSettingsService.getSiteSettingValueByKey(I.StoreLocatorCountryCode)||null,Pe(()=>{let e=this.storesToDisplay();this.firstStorePage()>e.length&&this.currentPage.set(1)},{allowSignalWrites:!0})}ngOnInit(){return Oe(this,null,function*(){J(this.platform)&&(yield this.ngZone.runOutsideAngular(()=>this.loader.importLibrary("places")),this.ngZone.runOutsideAngular(()=>new google.maps.places.Autocomplete(this.autocompleteInput.nativeElement,{componentRestrictions:{country:this.countryCode}})),this.isMapsLibraryInitialized.set(!0),this.loadSearchState())})}loadSearchState(){J(this.platform)&&this.sessionStorageService.loadSearchState().pipe(re(e=>{let o=e?.sessionData;o&&(o.type===$.Address&&(this.searchAddress.set(o.data.address),this.autocompleteInput.nativeElement.value=o.data.address),o.type===$.Coordinates&&(this.userCoordinates.set(o.data),this.autocompleteInput.nativeElement.value=""),this.setStores(e?.stores??[]))}),ee(this.destroyRef)).subscribe()}closeUnauthorizedSellerDisclaimer(){this.isUnauthorizedSellerDisclaimerVisible.set(!1)}closeGeolocationServiceError(){this.isGeolocationServiceErrorMessageVisible.set(!1)}onPageChange(e){e.page!==void 0&&this.currentPage.set(e.page+1)}getStoresByUserLocation(){this.geolocationService.getUserLocation().pipe(Te(e=>this.distributorLocatorService.getStoresByCoordinates(e.latitude,e.longitude).pipe(re(o=>{this.googleMap.closeInfoWindow(),this.searchAddress.set(""),this.userCoordinates.set(e),this.autocompleteInput.nativeElement.value="",this.sessionStorageService.saveCoordinatesState(e.latitude,e.longitude),this.setStores(o.map(i=>this.distributorLocatorMapper.mapStoreToDistributorLocatorStore(i)))}))),V(e=>(this.googleMap.closeInfoWindow(),this.isGeolocationServiceErrorMessageVisible.set(!0),this.loggerService.error(`[DistributorLocatorListComponent][getStoresByLocation] Error occurred while fetching store: ${e.message}.`),Xe)),ee(this.destroyRef)).subscribe()}getStoresByAddress(e){if(!e){this.googleMap.closeInfoWindow(),this.clearSearch();return}this.geolocationService.parseAddress(e).pipe(Te(o=>this.distributorLocatorService.getStoresByAddress(o).pipe(re(i=>{this.googleMap.closeInfoWindow(),this.searchAddress.set(o),this.userCoordinates.set(null),this.sessionStorageService.saveAddressState(o),this.setStores(i.map(c=>this.distributorLocatorMapper.mapStoreToDistributorLocatorStore(c)))}))),V(o=>(this.googleMap.closeInfoWindow(),this.clearSearch(),this.loggerService.error(`[DistributorLocatorListComponent][getStoresByAddress] Error occurred while fetching store: ${o.message}.`),this.setStores([]),Xe))).subscribe()}clearSearch(){this.searchAddress.set(""),this.userCoordinates.set(null),this.allLoadedStores.set([]),this.currentPage.set(1)}showOnMap(e){this.googleMap.showOnMap(e)}setStores(e){this.allLoadedStores.set(e)}onStoreSetFavorite(e){this.cookieService.set(me,e.id,Ne),this.favoriteStoreId.set(e.id)}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=y({type:t,selectors:[["ppg-distributor-locator-list"]],viewQuery:function(o,i){if(o&1&&(ot(si,7),ot(Le,5)),o&2){let c;it(c=rt())&&(i.autocompleteInput=c.first),it(c=rt())&&(i.googleMap=c.first)}},hostAttrs:[1,"flex","flex-column","gap-3","md:gap-4"],features:[
1ke([{provide:Y,useFactory:e=>new Y({apiKey:e.getEnvironmentVariable(oe.GOOGLE_API_KEY)||"",libraries:["places"]}),deps:[de]},lt])],decls:50,vars:21,consts:[["desktopScrollTarget",""],["mobileScrollTarget",""],["searchInput",""],["storeList",""],["googleMapRef",""],[1,"section-container","heading-container"],[1,"page-title","font-bold","m-0"],[3,"resourceKey"],[1,"messages","flex-1"],["severity","warn","ngSkipHydration",""],["severity","error","ngSkipHydration",""],[1,"section-container","results-container","flex","flex-row","gap-3"],[1,"locator-body","flex","flex-column","flex-1"],[1,"flex","flex-column","gap-3","md:gap-4","md:overflow-auto"],[1,"search-container","flex","align-items-center","gap-3","flex-column","md:flex-row"],["styleClass","relative",1,"search-input-group"],["id","store-location-input","type","text","pInputText","",3,"placeholder"],["id","clear-store-location-input-button","type","button",1,"clear-search-button","absolute","cursor-pointer","text-sm","line-height-1","p-0"],["type","button","pButton","",1,"h-full",3,"click"],[1,"search-icon"],[1,"pds-icon"],["href","assets/pds-icons.svg#magnify"],["styleClass","font-bold text-sm","icon","pi pi-map-marker text-sm",1,"white-space-nowrap",3,"onClick","text","label"],[1,"search-filters","flex","align-items-start","md:align-items-center","flex-column","md:flex-row","gap-3"],[1,"text-3xl","m-0","flex-1"],[3,"appliedFiltersChange","appliedFilters"],[1,"stores-list","flex","flex-column","h-full","overflow-auto","md:gap-3"],["id","favorite-store-card",1,"block","border-top-1","md:border-1","md:border-round-sm","p-3",3,"hideStoreImage","store"],[1,"block","border-top-1","md:border-1","md:border-round-sm","p-3",3,"hideStoreImage","store"],["id","empty-list-card",1,"no-results-container","border-y-1","md:border-1","md:border-round-sm","flex","flex-column","align-items-center","justify-content-center","md:h-screen","w-full","gap-1"],[1,"paginator-container","flex","justify-content-center"],[1,"map","flex-1","border-round-sm"],["styleClass","sidebar-container w-auto","aria-labelledby","distributor-disclaimer-title",3,"visibleChange","blockScroll","visible"],[1,"sidebar-content"],["id","distributor-disclaimer-title",1,"disclamer-header-title","text-3xl","font-bold"],[1,"m-0","text-sm"],[1,"text-sm"],[1,"flex","flex-1","md:align-items-center","gap-3"],[1,"pi","pi-exclamation-triangle"],[1,"flex","flex-1","flex-column","md:flex-row","md:align-items-center","gap-2"],[1,"font-bold","text-sm"],[1,"mr-2"],["styleClass","p-0 h-1rem line-height-1 relative top-0 right-0",1,"inline-flex",3,"click","label","text"],["icon","pi pi-times text-sm","severity","warning",3,"onClick","rounded","text","label","ariaLabel"],[1,"pi","pi-times-circle"],["icon","pi pi-times text-sm","severity","danger",3,"onClick","rounded","text","label","ariaLabel"],["id","clear-store-location-input-button","type","button",1,"clear-search-button","absolute","cursor-pointer","text-sm","line-height-1","p-0",3,"click"],[1,"clear-icon"],["href","assets/pds-icons.svg#close-circle-outline"],[4,"ngTemplateOutlet"],[4,"ppgStoreCardHeaderAction"],[3,"store","favoriteStoreId",4,"ppgStoreCardButton"],[3,"store",4,"ppgStoreCardButton"],[1,"inline-flex","gap-2"],[3,"compact"],["styleClass","font-bold text-sm white-space-nowrap","icon","pi pi-eye text-sm",3,"onClick","text","label"],[3,"store","favoriteStoreId"],[3,"store"],[3,"store","storeSetAsFavorite",4,"ppgStoreCardButton"],[3,"storeSetAsFavorite","store"],[1,"pi","pi-map-marker","text-6xl"],[3,"onPageChange","first","rows","pageLinkSize","totalRecords","ppgScrollOnPageChange"],[1,"border-bottom-1","md:border-bottom-none","w-screen","md:w-full",3,"stores","favoriteStore"],[1,"border-bottom-1","md:border-bottom-none","w-screen","md:w-full",3,"storeSetAsFavorite","stores","favoriteStore"]],template:function(o,i){if(o&1){let c=O();r(0,"section",5)(1,"h1",6,0),d(3,"ppg-resource-item",7),a(),r(4,"div",8),f(5,ci,11,8,"p-message",9)(6,li,9,6,"p-message",10),a()(),r(7,"section",11)(8,"div",12)(9,"div",13,1)(11,"div",14)(12,"p-inputGroup",15),d(13,"input",16,2),f(15,pi,4,0,"button",17),r(16,"button",18),_("click",function(){b(c);let h=M(14);return x(i.getStoresByAddress(h.value))}),r(17,"i",19),Je(),r(18,"svg",20),d(19,"use",21),a()()()(),dt(),r(20,"p-button",22),_("onClick",function(){return b(c),x(i.getStoresByUserLocation())}),a(),f(21,di,1,1,"ng-container"),a(),r(22,"div",23)(23,"h2",24),L(24),a(),r(25,"ppg-distributor-locator-filters",25),ct("appliedFiltersChange",function(h){return b(c),at(i.listService.appliedFilters,h)||(i.listService.appliedFilters=h),x(h)}),a()(),r(26,"div",26,3),f(28,Si,6,4,"ppg-distributor-locator-store-card",27),Z(29,Li,6,4,"ppg-distributor-locator-store-card",28,ai),f(31,Di,2,0,"div",29),a()(),f(32,Mi,2,5,"div",30),a(),f(33,Ti,2,1,"div",31),a(),f(34,Ri,1,1,"ng-template",null,4,X),r(36,"p-drawer",32),ct("visibleChange",function(h){return b(c),at(i.sidebarVisible,h)||(i.sidebarVisible=h),x(h)}),r(37,"div",33)(38,"h3",34),d(39,"ppg-resource-item",7),a(),r(40,"p",35),d(41,"ppg-resource-item",7),a(),d(42,"br"),r(43,"div",36),d(44,"ppg-resource-item",7),a(),d(45,"br"),r(46,"p",35),d(47,"ppg-resource-item",7),a(),r(48,"div",36),d(49,"ppg-resource-item",7),a()()()}if(o&2){let c=M(14);n(3),s("resourceKey",i.pageLabelKey()),n(2),C(i.isDisclaimerVisible()?5:-1),n(),C(i.isGeolocationServiceErrorMessageVisible()?6:-1),n(7),s("placeholder",i.textResources().searchForLocation),n(2),C(c.value?15:-1),n(5),s("text",!0)("label",i.textResources().useMyLocation),n(),C(i.isMobile()?21:-1),n(3),U(" ",i.searchLabel()," "),n(),st("appliedFilters",i.listService.appliedFilters),n(3),C(i.favoriteStore(
1)?28:-1),n(),Q(i.currentPageStores()),n(2),C(!i.currentPageStores().length&&!i.favoriteStore()?31:-1),n(),C(i.currentPageStores().length>0&&i.totalStores()>i.storeRows?32:-1),n(),C(i.isMobile()?-1:33),n(3),s("blockScroll",!0),st("visible",i.sidebarVisible),n(3),s("resourceKey",i.disclaimerCMCodeNames().title),n(2),s("resourceKey",i.disclaimerCMCodeNames().list1Title),n(3),s("resourceKey",i.disclaimerCMCodeNames().list1),n(3),s("resourceKey",i.disclaimerCMCodeNames().list2Title),n(2),s("resourceKey",i.disclaimerCMCodeNames().list2)}},dependencies:[Wt,jt,E,Kt,k,Ht,Gt,be,j,W,Se,he,Ce,ve,Nt,Vt,zt,$t,je,Qt,Zt,Jt,Xt,Le,no,le,Yt,Ue],styles:[".search-icon[_ngcontent-%COMP%]{height:1.5rem;fill:var(--color-neutral-00)}@media all and (min-width:768px){.results-container[_ngcontent-%COMP%]{height:calc(100vh - 180px)}}.disclamer-header-title[_ngcontent-%COMP%]{margin:2.5rem 0}[_nghost-%COMP%]     .sidebar-container{color:var(--color-bluegray-900);min-width:320px;max-width:400px}[_nghost-%COMP%]     ppg-resource-item p{margin:0}[_nghost-%COMP%]     ppg-google-maps google-map{display:block;height:25vh}@media all and (min-width:768px){[_nghost-%COMP%]     ppg-google-maps google-map{display:unset;height:100%}}[_nghost-%COMP%]     p-button{margin-right:4px}[_nghost-%COMP%]     button{height:32px}[_nghost-%COMP%]     .heading-container button{align-items:baseline}[_nghost-%COMP%]     .stores-list, [_nghost-%COMP%]     .paginator-container, [_nghost-%COMP%]     .search-container{margin:0 calc(-1 * var(--padding-3))}@media all and (min-width:768px){[_nghost-%COMP%]     .stores-list, [_nghost-%COMP%]     .paginator-container, [_nghost-%COMP%]     .search-container{margin:0}}.search-container[_ngcontent-%COMP%]{position:sticky;top:0;z-index:500;background-color:var(--color-white);justify-content:space-between;padding-top:var(--padding-3);margin-top:calc(-1 * var(--margin-3))}.search-container[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(ppg-google-maps){padding:0 var(--padding-3)}@media all and (min-width:768px){.search-container[_ngcontent-%COMP%]{position:initial;z-index:initial;padding-top:0;margin-top:0}.search-container[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:not(ppg-google-maps){padding:0}}.sidebar-content[_ngcontent-%COMP%]{border-top:1px solid var(--root-surface-border)}.clear-search-button[_ngcontent-%COMP%]{right:67px;top:12px;fill:var(--color-neutral-50);background:none;border:none;z-index:var(--z-index-1);height:1rem}.clear-search-button[_ngcontent-%COMP%]   .clear-icon[_ngcontent-%COMP%], .clear-search-button[_ngcontent-%COMP%]   .pds-icon[_ngcontent-%COMP%]{height:1rem;width:1rem}ppg-google-maps[_ngcontent-%COMP%], .stores-list[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{border-color:var(--root-surface-border)}.page-title[_ngcontent-%COMP%]{font-size:35px}.no-results-title[_ngcontent-%COMP%]{font-size:17.5px}.no-results-container[_ngcontent-%COMP%]{color:var(--color-bluegray-200);min-height:282px}#store-location-input[_ngcontent-%COMP%]{padding-right:33px}.p-inputgroup[_ngcontent-%COMP%]{height:2.5rem}"],changeDetection:0})}}return t})();var lo=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=y({type:t,selectors:[["ppg-distributor-locator"]],decls:1,vars:0,template:function(o,i){o&1&&d(0,"router-outlet")},dependencies:[Ot],encapsulation:2,changeDetection:0})}}return t})();var po=(t,l)=>{let e=p(Ve),o=p(ze),i=p(kt),c=p(Pt),g=p(Bt),h=i.getLanguage(l.url);return o.loadDetails(t.params.id).pipe(re(P=>{P||e.navigateByUrl(c.buildPagePath(h||g.language(),wt.NOT_FOUND),{skipLocationChange:!0})}))};var Da=[{path:"",pathMatch:"prefix",component:lo,children:[{path:"",pathMatch:"full",component:co},{path:"item/:id",component:ro,canActivate:[po]}]}];export{Da as DistributorLocatorRoutes};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.