PageSourceSearch

https://dz.diesel.com/on/demandware.static/Sites-DieselWW-Site/-/e…/js/component-WishlistRecommender.chunks.js

js diesel.com collected 2026-09-24 08:41:06 UTC 4,553 bytes, 1 lines download raw bytes

1(self.webpackChunkapp_project=self.webpackChunkapp_project||[]).push([[1745,6494],{65658:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var s=i(96156),n=i(38302);function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,s)}return i}function o(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach((function(t){(0,s.Z)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class a extends n.default{get DEFAULT_CONFIGS(){return{root:null,rootMargin:"300px",threshold:.5}}constructor(e){super(e)}observe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=o(o({},this.DEFAULT_CONFIGS),t);let s=new IntersectionObserver((t=>{t.forEach((t=>{let{isIntersecting:i,target:n}=t;i&&(e(),s.unobserve(n))}))}),i);s.observe(this.element)}}},10889:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>l});var s=i(65658),n=i(14863),r=i(12737),o=i(82503),a=i(46378);class l extends s.default{constructor(e){var t;super(e),this.wishlistnum=parseInt(this.element.dataset.wishlistnum),this.loadProductsURL=this.element.dataset.url.split(","),this.swiper,this.alternativeRecommendations,this.einsteinUtils=(t=window.CQuotient)&&"function"==typeof t.getCQUserId&&"function"==typeof t.getCQCookieId?t:null,r.Z.on("wishlist:empty",this.initRecommendations.bind(this,0)),r.Z.on("product:afterAddToWishlist",(e=>{"products-popular"==this.alternativeRecommendations&&this.initRecommendations(1)})),r.Z.on("wishlist:removed",(e=>{let{pid:t}=e;this.removeHeartFromCarousel(t),this.swiper&&this.swiper.update()})),this.initRecommendations(this.wishlistnum)}initRecommendations(e){e?(this.loadRecommendations("viewed-recently"),this.alternativeRecommendations="adobe"):(this.loadRecommendations("viewed-recently"),this.alternativeRecommendations="products-popular")}loadRecommendations(e){return this.processRecommendationsTile(e)}processRecommendationsTile(e){const t={userId:this.einsteinUtils.getCQUserId(),cookieId:this.einsteinUtils.getCQCookieId(),ccver:"1.01"};var i=async t=>{if(!t[e].recs.length)return this.loadRecommendations(this.alternativeRecommendations),!1;{var i=t[e].recs,s=[];i.forEach((e=>{s.push(e.id)}));let o=new URL(this.loadProductsURL[0]);o.searchParams.append("title",e),o.searchParams.append("recommender",s),r.Z.emit("loader:start",{element:this.element});const a=await(0,n.ZP)(o),l=await a.text();this.element.innerHTML=l,this.initSlider(),r.Z.emit("loader:end",{element:this.element})}};"adobe"!=e?this.einsteinUtils.getRecs?this.einsteinUtils.getRecs(this.einsteinUtils.clientId,e,t,i):(this.einsteinUtils.widgets=this.einsteinUtils.widgets||[],this.einsteinUtils.widgets.push({recommenderName:e,parameters:t,callback:i})):(i=async()=>{let e=new URL(this.loadProductsURL[1]);r.Z.emit("loader:start",{element:this.element});const t=await(0,n.ZP)(e),i=await t.text();return this.element.innerHTML=i,this.initSlider(),r.Z.emit("loader:end",{element:this.element}),!0})()}initSlider(){const e=this.element.querySelector(".js-pd-c-container");if(!e)return;const t=this.element.querySelector(".pd-carousel__products-area").dataset.items,i={loop:this.element.querySelector(".pd-carousel__products-area").dataset.items>4,autoplay:{},centeredSlides:!1,modules:[a.W_,a.s5],navigation:{nextEl:".js-swiper-button--next-adobe",prevEl:".js-swiper-button--prev-adobe"},breakpoints:{0:{slidesPerView:2,autoplay:!1},576:{slidesPerView:t>=4?4:t},992:{slidesPerView:t>=4?4:t,autoplay:{delay:5e3,disableOnInteraction:!1,pauseOnMouseEnter:!0}}},on:{beforeInit:this.adjustWrapperWidth.bind(this,!0),resize:this.adjustWrapperWidth.bind(this,!1)}};this.swiper&&this.swiper.destroy(!0,!0),this.swiper=new o.Z(e,i),this.swiper.on("init",(()=>{console.log("swiper--after init ")}))}adjustWrapperWidth(e,t){t.el.parentNode.removeAttribute("style");const i=this.element.querySelector(".pd-carousel__products-area").dataset.items;if(i<4&&window.matchMedia("(min-width: 576px)").matches){const e=document.querySelector(".product-carou
1sel-container").clientWidth/4*i;t.el.parentNode.style.width=e+"px"}setTimeout((()=>t.update()))}removeHeartFromCarousel(e){const t='.js_add-to-wish-list[data-pid="'.concat(e,'"]'),i=this.element.querySelector(t);i&&i.classList.remove("is-full")}}}}]);

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.