PageSourceSearch

https://www.diesel.co.jp/on/demandware.static/Sites-DieselJP-Site/…/js/component-CompleteProfile.chunks.js

js diesel.co.jp collected 2026-10-02 07:50:05 UTC 3,481 bytes, 1 lines download raw bytes

1(self.webpackChunkapp_project=self.webpackChunkapp_project||[]).push([[6125],{85329:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});const i=s(68023).Z;class n extends i{}},68023:(t,e,s)=>{"use strict";s.d(e,{Z:()=>c});var i=s(96750),n=s.n(i),o=s(6258),a=s(38302);const r="choice--active";class c extends a.Z{get SELECTORS(){return{actions:"[data-action]",submit:'[data-action="submit"]',container:".js-complete-profile-container",choices:".js-complete-profile-choices button",sidebar_trigger:".js-complete-profile-from-sidebar"}}constructor(t){super(t);const e=$(this.element).parent();this.customerNo=$("[data-customer-number]").first().data("customer-number")||"1",this.isUserInRegistrationPage=!!document.querySelector('[data-action="Account-Create"]'),this.urls={},["profilings","question","answer","account"].forEach((t=>{this.urls[t]=this.element.dataset["url".concat(t.charAt(0).toUpperCase()+t.slice(1))]})),e.on("click",this.SELECTORS.actions,this.handleAction.bind(this)),e.on("click",this.SELECTORS.choices,this.handleChoice.bind(this)),$(document).on("click",this.SELECTORS.sidebar_trigger,this.handleSidebarCTA.bind(this)),this.init()}
1async init(){var t;await this.loadProfilings()?this.loadQuestion():this.isUserInRegistrationPage&&null!==(t=this.urls)&&void 0!==t&&t.account&&(window.location=this.urls.account)}loadProfilings(){return new Promise((async t=>{try{const e=await fetch(this.urls.profilings),s=await e.json(),[i]=s.profilings;this.profiling=i,"active"===i.status?t(!0):t(!1)}catch(e){console.warn(e.message),t(!1)}}))}async loadQuestion(){try{var t,e;const s=new URL(this.urls.question,window.location.origin);s.searchParams.set("profilingID",this.profiling.id);const i=await fetch(s.toString()),n=await i.json();this.action=null===(t=n.question)||void 0===t||null===(e=t.actions)||void 0===e?void 0:e.answer,this.renderQuestion(n.question)}catch(t){console.warn(t.message)}}renderQuestion(t){const e=n().compile(this.element.innerHTML),s=$(e(t));$(this.element).after(s).parent().show(0),$(document).trigger("loyalty.profiling:questionrendered",{el:this.element})}async handleAction(t){var e;const s=$(t.currentTarget),i=s.data("action"),n=$(this.element).parent();switch(i){case"begin":this.goTo(1,n),$(this.SELECTORS.container).prev().show();break;case"close":this.isUserInRegistrationPage&&null!==(e=this.urls)&&void 0!==e&&e.account?window.location=this.urls.account:n.slide
1Up();break;case"submit":const t=$(this.SELECTORS.choices).filter(".".concat(r)).data("answer");if(t){s.attr("disabled",!0),n.attr("disabled",!0);const{answerResult:e}=await this.submit(t);n.attr("disabled",!1),e&&(this.goTo(2,n),o.Z.remove("loyalty-cache-"+this.customerNo))}}t.preventDefault()}handleSidebarCTA(t){const e=$(this.element).parent().show();this.goTo(1,e),$(this.SELECTORS.container).prev().show().get(0).scrollIntoView(),t.preventDefault()}goTo(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;(arguments.length>1&&void 0!==arguments[1]?arguments[1]:$()).find(this.SELECTORS.container).attr("data-step",t)}handleChoice(t){const e=$(this.SELECTORS.choices),s=$(this.SELECTORS.submit);e.removeClass(r).filter(t.currentTarget).addClass(r),s.attr("disabled",!1),t.preventDefault()}async submit(t){const{url:e,method:s}=this.action;if(e&&s&&t){const i=new URL(this.urls.answer,window.location.origin),n=i.searchParams;return n.set("url",e),n.set("method",s),n.set("answerID",t),(await fetch(i.toString())).json()}return Promise.reject()}}}}]);

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.