PageSourceSearch

https://www.costco.com.au/spartacus/assets/chunk-YWNKC6Z2.js

js costco.com.au collected 2026-10-02 06:05:42 UTC 3,726 bytes, 1 lines download raw bytes

1import{a as G}from"./chunk-RJUS6BOZ.js";import{a as L,b as m,e as y}from"./chunk-PX2CFBUF.js";import{fb as F,r as N}from"./chunk-NGFOYMLE.js";import{f as I}from"./chunk-ABACGHJ4.js";import{f as j}from"./chunk-GDB2PFOH.js";import{d as O}from"./chunk-OQ4Y2D57.js";import{a as V}from"./chunk-WXHOXPNQ.js";import{f as P}from"./chunk-QUDZR5CE.js";import{Dg as U,H as f,Me as _,R as p,Rc as C,Xa as k,ee as D,pb as R,sa as b,td as A,v as E,va as r,w as S}from"./chunk-ZIECK5QA.js";import{a as n,b as s}from"./chunk-3JMZ37NM.js";var ut=(()=>{let u=class u extends y{constructor(t,e,i,o,a,c,d,l,M,K,H,g,v,T){super(t,e,o,a,c,d,l,H,g,v,T),this.currencyService=t,this.cookieService=e,this.localStorageService=i,this.windowRef=o,this.router=a,this.http=c,this.siteService=d,this.siteConfigService=l,this.sipPageMetaService=M,this.sipUserService=K,this.docRef=g,this.platformId=v,this.request=T,this.recommendationTrackingKey="googleRetailRecommendationTracking",this.DEFAULT_EVENT={event:L.RETAIL_EVENT,_clear:!0}}getProductRecommendationTracking(){return JSON.parse(this.localStorageService.retrieve(this.recommendationTrackingKey)??"{}")}trackProduct(t){if(!t.attributionToken)return;let e=this.getProductRecommendationTracking();e[t.code]={attributionToken:t.attributionToken},this.localStorageService.store(this.recommendationTrackingKey,JSON.stringify(e))}getRecommendationTracking(t){return this.getProductRecommendationTracking()[t.code]}removeRecommendationTracking(){this.localStorageService.clear(this.recommendationTrackingKey)}pushAddToCartEvent(t,e){let i=this.getRecommendationTracking(t);return this.getCloudRetailEvent(m.ADD_TO_CART).subscribe(o=>{this.pushEvent(s(n({},this.DEFAULT_EVENT),{cloud_retail:s(n({},o),{attributionToken:i?.attributionToken,productDetails:[{product:{id:t.code},quantity:e}]})}))}),super.pushAddToCartEvent(t,e)}pushProductDetailsEvent(t,e){let i=super.pushProductDetailsEvent(t,e),o=this.getRecommendationTracking(t);return this.getCloudRetailEvent(m.PRODUCT_DETAILS).subscribe(a=>{this.pushEvent(s(n({},i),{cloud_retail:s(n({},a),{attributionToken:o?.attributionToken,productDetails:i.ecommerce.detail.products.map(c=>({product:{id:c.id}}))})}))}),i}pushRetailSearchEvent(t,e,i){let o=super.pushGA4SearchResultEvent(e);return this.getCloudRetailEvent(m.SEARCH).subscribe(a=>{this.pushGA4Event(s(n({},o),{cloud_retail:s(n({},a),{attributionToken:i,searchQuery:e,productDetails:t.map(c=>({product:{id:c.code}}))})}))}),o}pushHomePageEvent(){return this.getCloudRetailEvent(m.HOME_PAGE).subscribe(t=>{this.pushEvent(s(n({},this.DEFAULT_EVENT),{cloud_retail:t}))}),this.DEFAULT_EVENT}pushCategoryPageEvent(){let t=this.sipPageMetaService.getMeta().pipe(f(Boolean),E(e=>e.breadcrumbs.map(i=>i.label)));return S([this.getCloudRetailEvent(m.CATEGORY_PAGE),t]).pipe(p(1)).subscribe(([e,i])=>{let o=[i.join(" > ")],a=s(n({},this.DEFAULT_EVENT),{cloud_retail:s(n({},e),{pageCategories:o})});this.pushEvent(a)}),this.DEFAULT_EVENT}pushCartPageEvent(t,e){return this.getCloudRetailEvent(m.CART_PAGE).pipe(p(1)).subscribe(i=>{let o=s(n({},this.DEFAULT_EVENT),{cloud_retail:s(n({},i),{productDetails:t.cartGroupEntries?.flatMap(a=>a.entries.map(c=>({product:{id:c.product.code}})))})});super.pushGA4ViewCartEvent(t,e,o)}),this.DEFAULT_EVENT}getCloudRetailEvent(t){return this.getUser().pipe(E(e=>({eventType:t,userInfo:{userId:e.recommendationsUserId},visitorId:this.getVisitorId()})))}getUser(){return this.sipUserService.get().pipe(p(1))}getVisitorId(){return this.cookieService.get(j)}};u.\u0275fac=function(e){return new(e||u)(r(U),r(N),r(F),r(_),r(D),r(A),r(P),r(I),r(G),r(O),r(R),r(C),r(k),r(V,8))},u.\u0275prov=b({token:u,factory:u.\u0275fac,providedIn:"root"});let h=u;return h})();export{ut as a};

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.