PageSourceSearch

https://www.costco.com.tw/spartacus/assets/chunk-LKBS5PQQ.js

js costco.com.tw collected 2026-09-24 22:21:14 UTC 5,239 bytes, 1 lines download raw bytes

1import{Da as l,Fc as D,H as g,He as L,Lg as x,Oe as v,R as h,Sc as F,Ze as A,he as R,ka as E,kh as O,mb as b,me as k,ob as M,oe as y,sa as a,ta as p,td as T,th as w,uh as C,va as s,wa as P,xh as N}from"./chunk-ADQO3XXX.js";var j=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=a({token:e,factory:function(i){let o=null;return i?o=new(i||e):o=s(R),o},providedIn:"root"});let r=e;return r})(),z="smartEdit",B=(()=>{let e=class e{get cmsTicketId(){return this._cmsTicketId}constructor(t,i,o){this.config=t,this.location=i,this.scriptLoader=o,this.featureModulesService=P(N)}load(){this.isLaunchedInSmartEdit()&&(this.featureModulesService.resolveFeature(z).subscribe(),this.scriptLoader?.embedScript({src:"assets/webApplicationInjector.js",params:void 0,attributes:{id:"text/smartedit-injector","data-smartedit-allow-origin":this.config.smartEdit?.allowOrigin}}))}isLaunchedInSmartEdit(){let t=this.location.path().split("?")[0],o=this.location.path().split("?")[1]?.split("&").find(n=>n.startsWith("cmsTicketId="));return this._cmsTicketId=o?.split("=")[1],t.split("/").pop()===this.config.smartEdit?.storefrontPreviewRoute&&!!this._cmsTicketId}};e.\u0275fac=function(i){return new(i||e)(s(j),s(F),s(O))},e.\u0275prov=a({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})(),U={smartEdit:{storefrontPreviewRoute:"cx-preview",allowOrigin:"localhost:9002"}},H=(()=>{let e=class e{constructor(t){this.service=t,this.routingService=P(v)}intercept(t,i){let o=this.service.cmsTicketId;return o?t.url.includes("/productList")?this.setRequestForProductListPage(t,i,o):((t.url.includes("/cms/")||t.url.includes("/products/"))&&(t=t.clone({setParams:{cmsTicketId:o}})),i.handle(t)):i.handle(t)}setRequestForProductListPage(t,i,o){return this.routingService.getPageContext().pipe(h(1),E(n=>(t=t.clone(n.id?{setParams:{cmsTicketId:o,categoryCode:n.id}}:{setParams:{cmsTicketId:o}}),i.handle(t))))}};e.\u0275fac=function(i){return new(i||e)(s(B))},e.\u0275prov=a({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})(),V=[{provide:T,useExisting:H,multi:!0}];function Y(r){return()=>{r.load()}}var oe=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=l({type:e}),e.\u0275inj=p({providers:[...V,k(U),{provide:D,useFactory:Y,deps:[B],multi:!0}]});let r=e;return r})();var I=(()=>{let e=class e{constructor(t,i,o,n,c,u,f){if(this.cmsService=t,this.routingService=i,this.baseSiteService=o,this.zone=n,this.winRef=c,this.rendererFactory=u,this.config=f,this.isPreviewPage=!1,c.nativeWindow){let d=c.nativeWindow;d.smartedit=d.smartedit||{},d.smartedit.renderComponent=(S,m,W)=>this.renderComponent(S,m,W),d.smartedit.reprocessPage=this.reprocessPage}}processCmsPage(){this.baseSiteService.get().pipe(g(t=>!!t),h(1)).subscribe(t=>{this.defaultPreviewCategoryCode=t.defaultPreviewCategoryCode,this.defaultPreviewProductCode=t.defaultPreviewProductCode,this.cmsService.getCurrentPage().pipe(g(Boolean)).subscribe(i=>{this._currentPageId=i.pageId,this.goToPreviewPage(i),this.addPageContract(i)})})}addPageContract(t){let i=this.rendererFactory.createRenderer("body",null),o=this.winRef.document.body,n=[];Array.from(o.classList).forEach(c=>n.push(c)),n.forEach(c=>i.removeClass(o,c)),this.addSmartEditContract(o,i,t.properties)}goToPreviewPage(t){this.isPreviewPage||(this.isPreviewPage=!0,t.type===y.PRODUCT_PAGE&&this.defaultPreviewProductCode?this.routingService.go({cxRoute:"product",params:{code:this.defaultPreviewProductCode,name:""}}):t.type===y.CATEGORY_PAGE&&this.defaultPreviewCategoryCode&&this.routingService.go({cxRoute:"category",params:{code:this.defaultPreviewCategoryCode}}))}renderComponent(t,i,o){return t&&this.zone.run(()=>{o?i&&this.cmsService.refreshComponent(t):this._currentPageId?this.cmsService.refreshPageById(this._currentPageId):this.cmsService.refreshLatestPage()}),!0}reprocessPage(){}addSmartEditContract(t,i,o){o&&Object.keys(o).forEach(n=>{let c="data-"+n+"-",u=o[n];Object.keys(u).forEach(f=>{let d=u[f];f==="classes"?d.split(" ").forEach(m=>{i.addClass(t,m)}):i.setAttribute(t,c+f.split(/(?=[A-Z])/).join("-").toLowerCase(),d)})})}};e.\u0275fac=function(i){return new(i||e)(s(x),s(v),s(A),s(M),s(L),s(b),s(j))},e.\u0275prov=a({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})(),K=(()=>{let e=class e extends w{constructor(t){super(),this.smartEditService=t}decorate(t,i,o){o&&this.smartEditService.addSmartEditContract(t,i,o.properties)}};e.\u0275fac=function(i){return new(i||e)(s(I))},e.\u0275prov=a({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})(),Q=(()=>{let e=class e extends C{constructor(t){super(),this.smartEditService=t}decorate(t,i,o){o&&this.smartEditService.addSmartEditContract(t,i,o.properties)}};e.\u0275fac=function(i){return new(i||e)(s(I))},e.\u0275prov=a({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})(),X=[{provide:w,useExisting:K,multi:!0},{provide:C,useExisting:Q,multi:!0}],ce=(()=>{let e=class e{constructor(t){this.smartEditService=t,this.smartEditService.processCmsPage()}};e.\u0275fac=function(i){return new(i||e)(s(I))},e.\u0275mod=l({type:e}),e.\u0275inj=p({providers:[...X]});let r=e;return r})();export{j as a,z as b,B as c,oe as d,I as e,ce as f};

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.