PageSourceSearch

https://shop.bonfiglioli.com/chunk-PFVRHZ45.js

js bonfiglioli.com collected 2026-09-25 18:40:44 UTC 3,733 bytes, 1 lines download raw bytes

1import{oa as D}from"./chunk-JCOTUPE5.js";import{Cc as w,Ea as y,Ec as P,Ja as C,O as v,bb as d,da as m,jb as M,pc as R,ub as S,zc as I}from"./chunk-TXT3R3MF.js";import{Ea as n,Fa as a,Ia as h,Ja as i,W as f,fe as g,gc as u,p as c,ua as l}from"./chunk-PWAHSUDZ.js";import"./chunk-2BAXZMGZ.js";var F={opps:{couponcodes:{httpHeaderName:"couponcodes",urlParameter:"couponcodes",localStorageKey:"opps-couponcodes"},loginRequired:{urlParameter:"loginRequired"}}},p=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275prov=n({token:e,factory:function(t){let r=null;return t?r=new(t||e):r=h(y),r},providedIn:"root"})}}return e})(),j=(()=>{class e{constructor(){this.winRef=i(d),this.config=i(p),this.localStorageKey=this.config.opps?.couponcodes?.localStorageKey??""}saveUrlCouponCodes(){let o=this.config.opps?.couponcodes?.urlParameter??"",t=this.winRef.location.href??"",s=new URLSearchParams(t.substring(t.indexOf("?"))).get(o);s&&this.setCouponCodes(s)}setCouponCodes(o){this.localStorageKey&&o&&this.winRef.localStorage?.setItem(this.localStorageKey,o)}getCouponCodes(){if(this.localStorageKey)return this.winRef.localStorage?.getItem(this.localStorageKey)}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),q=(()=>{class e{constructor(){this.config=i(p),this.occEndpoints=i(S),this.winRef=i(d),this.service=i(j),this.initialize()}initialize(){this.oppsCoupon=this.service.getCouponCodes(),this.winRef.isBrowser()&&(this.requestHeader=this.config.opps?.couponcodes?.httpHeaderName?.toLowerCase?.())}intercept(o,t){return this.winRef.isBrowser()&&this.requestHeader&&this.oppsCoupon&&o.url.includes(this.occEndpoints.getBaseUrl())&&(o=o.clone({setHeaders:{[this.requestHeader]:this.oppsCoupon}})),t.handle(o)}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),E=[{provide:v,useExisting:q,multi:!0}];function N(){let e=i(j);return()=>{e.saveUrlCouponCodes()}}var L=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=u({type:e})}static{this.\u0275inj=a({providers:[...E,{provide:R,useFactory:N,multi:!0}]})}}return e})(),A=(()=>{class e{constructor(){this.router=i(m),this.semanticPathService=i(I),this.authRedirectService=i(w),this.authService=i(P),this.logger=i(M),this.config=i(p)}canActivate(o,t){let r=this.router.getCurrentNavigation();return this.authService.isUserLoggedIn().pipe(f(1),l(s=>{if(s)return c(!0);{!this.config.opps?.loginRequired?.urlParameter&&g()&&this.logger.warn("There is no url query parameter configured for OPPS login-required feature");let O=this.config.opps?.loginRequired?.urlParameter??"";if(o.queryParams[O]==="true"&&r?.finalUrl){let U=this.router.serializeUrl(r.finalUrl);return this.authRedirectService.setRedirectUrl(U),c(this.router.parseUrl(this.semanticPathService.get("login")??""))}return c(!0)}}))}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),H=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=u({type:e})}static{this.\u0275inj=a({providers:[{provide:D,useClass:A,multi:!0}]})}}return e})(),Z=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=u({type:e})}static{this.\u0275inj=a({providers:[C(F)],imports:[L,H]})}}return e})();export{q as OccOppsCouponCodesInterceptor,p as OppsConfig,L as OppsCouponCodesModule,A as OppsLoginRequiredGuard,H as OppsLoginRequiredModule,Z as OppsRootModule,F as defaultOppsConfig,E as oppsCouponCodesInterceptors,N as saveCouponCodesFactory};

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.