PageSourceSearch

https://justlease.nl/aanbod/_next/static/chunks/pages/[...slug]-373214535a6f5528.js

js justlease.nl collected 2026-10-02 07:05:03 UTC 69,152 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[203],{27565:(e,n,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/[...slug]",function(){return t(52258)}])},52258:(e,n,t)=>{"use strict";t.r(n),t.d(n,{__N_SSP:()=>nH,default:()=>n_});var r=t(50702),i=t(54606),a=t(45154),o=t(92482),c=t.n(o),s=t(55729),l=t(81278),u=t(44925),d=t(27511),p=t(59890),f=t(66771),g=t(38768),m=t(77840),h=function(e){return e===d.CarCategory.newcar?[m.c.TrimLevel,m.c.Motor,m.c.Appearance,m.c.Options,m.c.Subscription,m.c.Form]:[m.c.Subscription,m.c.Form]},v=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(n!==m.c.SelectStockCar){var r=e.findIndex(function(e){return e===n});if(r<-1)throw Error("Unknown current step ".concat(n));return e[r+t]}};let x=function(e){var n=e.category,t=e.currentStep,r=e.hasNonAppearanceOptions,i=(0,s.useMemo)(function(){return h(n)},[n]),a=(0,s.useMemo)(function(){var e=v(i,t,Math.abs(1));return e!==m.c.Options||r||(e=v(i,t,Math.abs(2))),e},[n,t,r]),o=(0,s.useMemo)(function(){var e=v(i,t,-Math.abs(1));return e!==m.c.Options||r||(e=v(i,t,-Math.abs(2))),e},[n,t,r]);return{steps:i,nextStep:a,previousStep:o,isNextStepVisible:![m.c.Category,m.c.SelectStockCar,m.c.Form,m.c.Confirmation].includes(t)}};var b=t(17728),y=t(8138),j=t(72165),w=t(52348),O=t(52589);function k(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function S(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach(function(n){(0,r.A)(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}let C=function(e){var n,t,r,a,o,h,v=e.make,k=e.model,C=e.queryTrimLevel,A=e.queryCategory,P=e.ssrOptions,L=e.id,V=e.duration,T=e.mileage,I=e.step,E=e.ssrVersions,D=e.fuelTypes,N=e.transmissionTypes,M=e.ssrImage,R=e.setOptionLabels,B=(0,j.qE)(),F=B.configuration,q=B.translations,z=B.parameterSet,H=(0,l.useRouter)(),_=(0,s.useContext)(f.A),Y=(0,y.Pj)(),W=Y.selectCategory,J=Y.setVehicleValues,U=Y.getAvailableCampaign,Z=Y.getLeaseDurationSettings,G=(0,g.B)(),K=(0,s.useState)(E),$=K[0],X=K[1],Q=(0,s.useState)(M),ee=Q[0],en=Q[1],et=(0,s.useState)(C),er=et[0],ei=et[1],ea=(0,s.useState)(L?$.find(function(e){return e.id===L}):null),eo=ea[0],ec=ea[1],es=(0,s.useState)(I||m.c.Category),el=es[0],eu=es[1],ed=(0,s.useState)(!1),ep=ed[0],ef=ed[1],eg=(0,s.useState)(!1),em=eg[0],eh=eg[1],ev=(0,s.useState)(0),ex=ev[0],eb=ev[1],ey=(0,s.useState)(0),ej=ey[0],ew=ey[1],eO=(0,s.useState)(P),ek=eO[0],eS=eO[1],eC=(0,s.use
1State)(V),eA=eC[0],eP=eC[1],eL=(0,s.useState)(T),eV=eL[0],eT=eL[1],eI=(0,s.useState)(null),eE=eI[0],eD=eI[1],eN=(0,s.useState)(!0),eM=eN[0],eR=eN[1],eB=(0,s.useState)([]),eF=eB[0],eq=eB[1],ez=(0,s.useState)([]),eH=ez[0],e_=ez[1],eY=(0,s.useState)(null),eW=eY[0],eJ=eY[1],eU=(0,s.useState)(null),eZ=eU[0],eG=eU[1],eK=(0,s.useState)(!1),e$=eK[0],eX=eK[1],eQ=(0,s.useState)(null),e0=eQ[0],e1=eQ[1],e2=(0,s.useState)(null),e6=e2[0],e3=e2[1],e4=(0,s.useRef)(null),e8=(0,s.useRef)(null),e7=(0,s.useRef)(null),e5=(0,s.useRef)(0),e9=x({category:A,currentStep:el,hasNonAppearanceOptions:eM}).previousStep,ne=H.query,nn=(n=(0,i.A)(c().mark(function e(n){var t,r,i,a,o,s,l;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.mA)(H.locale,{selectCategory:W,query:S(S({},ne),{},{duration:F.leaseDuration.empty?void 0:ne.duration||(null==(t=Z({}))?void 0:t.max),mileage:ne.mileage||F.kmranges.min}),defaultStepWhenNull:el});case 2:r=e.sent,a=(i=(0,b.pr)(H.locale,S(S(S({},r),n),{},{base:ne.base}))).pathname,o=i.query,s=S({},ne),delete s.slug,delete s.base,l=S(S({},s),(0,b.uH)(o)),H.push({pathname:H.pathname,query:l},{pathname:a,query:l},{shallow:!0});case 9:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)}),nt=(0,s.useCallback)(function(e){eu(e),nn({trimLevel:er,id:null==eo?void 0:eo.id,version:eo,step:e,category:A})},[v,er,eo,A]);(0,s.useEffect)(function(){return H.beforePopState(function(e){var n=e.url,t=e.as,r=e.options,i=H.query.slug[H.query.slug.length-1];if(-1===n.indexOf("/[...slug]"))return!0;var a=new URLSearchParams(new URL(n,window.location).search).getAll("slug").join("/");0===a.length&&(a=t),r.locale&&a.startsWith(r.locale)&&(a=a.substring(r.locale.length)),r.locale&&a.startsWith("/".concat(r.locale))&&(a=a.substring(r.locale.length+1)),H.basePath&&H.basePath.length>0&&a.startsWith(H.basePath)&&(a=a.substring(H.basePath.length)),n.startsWith("/[base]")&&H.query.base&&(a=a.replace("/"+H.query.base,"")),a.startsWith("/")&&(a=a.substring(1));var o=(0,b.WF)(H.locale,W,a.split("/"),{make:v,model:k,trimLevel:er,id:null==eo?void 0:eo.id,category:A,previousStep:el,hasNonAppearanceOptions:eM});if(o.step===m.c.SelectStockCar||o.step===m.c.Category||void 0===o.step)return!0;if(o.step&&el!==o.step)(o.step===m.c.SelectStockCar||o.step===m.c.TrimLevel)&&ec(null),eu(o.step);else if(i===el||"TrimLevel"===el){if("TrimLevel"===el&&H.asPath.endsWith("/".concat(H.query.slug[H.query.slug.length-1]))){var c=H.asPath.slice(0,H.asPath.lastIndexOf("/"));H.push(c)}return!0}else if(i===el||"version"===i){if("version"===i){var s=H.asPath.replace("/version","");H.push(s)}return!0}else nt(e9);return!1}),function(){H.beforePopState(function(){return!0})}},[el,e9,H.query,H.asPath,H.push,nt]);var nr=(0,s.useCallback)(function(){if(H.query.slug[H.query.slug.length-1]===el)H.back();else if("TrimLevel"===el){if(H.asPath.endsWith("/".concat(H.query.slug[H.query.slug.length-1]))){var e=H.asPath.slice(0,H.asPath.lastIndexOf("/"));H.push(e)}}else nt(e9)},[el,e9,H.query,H.asPath,H.back,H.push,nt]);(0,s.useEffect)(function(){if(eu(I),L){var e,n=$.find(function(e){return e.id===L});ec(n),no(null==(e=Z(n))?void 0:e.max)}},[I,L]),(0,s.useEffect)(function(){e8.current=null,e7.current=null,eJ(null)},[H.locale]),(0,s.useEffect)(function(){J({make:v,model:k,carCategory:A,trimLevel:er,step:el,version:eo})},[v,er,eo,el,A]),(0,s.useEffect)(function(){en((0,p.A)({make:v,model:k,trimLevel:er},{}))},[v,k,er]),(0,s.useEffect)(function(){eo&&en((0,p.A)(eo,{}))},[eo]),(0,s.useEffect)(function(){if(eo){var e=U(eo);if(e){if(e.conditions.retailPrice&&e.conditions.retailPrice.max){var n=null==eo?void 0:eo.retailPrice;if(null!=(t=e7.current)&&t.catalogPrice){var t,r,i=null==(r=e7.current)?void 0:r.catalogPrice;n=i.total.net+i.total.bpm+i.total.vat}n>e.conditions.retailPrice.max&&(e.notApplicableAfterChange=!0)}e3(e)}}},[eo,e7.current]),(0,s.useEffect)(function(){eW&&en((0,p.A)(eW.leaseObject,{}))},[eW]),(0,s.useEffect)(function(){var e;(e=(0,i.A)(c().mark(function e(){var n,t;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=new d.VersionHitRepository,e.next=3,n.findAllByMakeAndModel(v,k,new d.CarFilterValues({parameterSet:z,leaseDuration:F.leaseDuration.empty?void 0:eA,mileagePerYear:eV,fuelTypes:D,transmissionTypes:N}),d.CarSortOption.PRICE_ASC);
1case 3:(t=e.sent.versions).forEach(function(e){(0,w.RE)(q,e)}),X(t);case 7:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})(),ec(function(e){return(0,w.RE)(q,e)})},[q]),(0,s.useEffect)(function(){if(eW){var e,n,t=null;if(eE){var r=null==eE?void 0:eE.selectedOptions.filter(function(e){return"C"===e.optionType&&e.categories.some(function(e){return"string"==typeof e?"Lak"===e:"Paint"===e.defaultName})});r.length&&(t={code:r[0].optionCode,name:r[0].name})}if(null==t&&eo){var a=eo.stockOptions.find(function(e){return"COLOR"===e.optionType});a&&(t={name:a.name,code:a.optionCode})}var o=(e=(0,i.A)(c().mark(function e(){var n;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:eG([(n=(0,p.b)(eW.leaseObject,{width:480,paintColor:t})).find(function(e){return e.angle===d.ImageAngle.FRONT_LEFT}),n.find(function(e){return e.angle===d.ImageAngle.FRONT}),n.find(function(e){return e.angle===d.ImageAngle.FRONT_RIGHT}),n.find(function(e){return e.angle===d.ImageAngle.RIGHT}),n.find(function(e){return e.angle===d.ImageAngle.REAR_RIGHT}),n.find(function(e){return e.angle===d.ImageAngle.REAR}),n.find(function(e){return e.angle===d.ImageAngle.REAR_LEFT}),n.find(function(e){return e.angle===d.ImageAngle.LEFT})].filter(function(e){return void 0!==e}));case 2:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)}),s=(n=(0,i.A)(c().mark(function e(){var n,t;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return eh(!0),e.next=3,new d.PublicCalculationRepository().create(eW);case 3:ew(null==(n=(t=e.sent).leasePrice[null==_?void 0:_.priceKey])?void 0:n.total),e7.current=t,eh(!1);case 7:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)});o(),s()}},[eW,null==eE?void 0:eE.selectedOptions]);var ni=(t=(0,i.A)(c().mark(function e(){return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new d.PublicCalculationRepository().create(eW,!0);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)});(0,s.useEffect)(function(){var e;(e=(0,i.A)(c().mark(function e(){var n,t,r,a,o,s,l,u;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(G.authToken&&!eo&&null==e0&&e1(!0),eo){e.next=3;break}return e.abrupt("return");case 3:if(n=[m.c.Category,m.c.SelectStockCar,m.c.TrimLevel,m.c.Motor],!(!eo||n.includes(el)&&!G.authToken||eW&&eW.leaseObject.id===eo.id)){e.next=6;break}return e.abrupt("return");case 6:return e1(!1),eD(null),ew(0),e5.current++,1===e5.current?t=ek||null:(eS(null),t=null),ef(!0),r=S({mileagePerYear:eV,leaseDuration:eA,incomeTaxPercentage:.4085,leaseObjectId:eo.id,leaseObjectExternalId:eo.externalId,leaseObjectSource:eo.source},eo),o=[d.ConfiguratorMiddleware,d.TireMiddleware,d.JatoWltpMiddleware,d.ImaginMiddleware,d.PaintColorSwatchMiddleware],e.prev=14,e.next=17,d.PublicConfigurator.create(o,r,{initConfiguratorOptions:t,wltpRequestDebounce:500});case 17:case 27:a=e.sent,e.next=34;break;case 20:return e.prev=20,e.t0=e.catch(14),eu(m.c.Category),ef(!1),e.prev=24,e.next=27,d.PublicConfigurator.create(o,r);case 30:return e.prev=30,e.t1=e.catch(24),console.log("still returning an error",e.t1),e.abrupt("return");case 34:if(a){e.next=36;break}return e.abrupt("return");case 36:return l=(s=a).configurator,u=s.request,e8.current=l,e8.current.setOnError(function(e){console.log(e)}),e8.current.setOnRequestUpdate(function(e){eJ(function(n){return e(n)})}),e8.current.setOnStateChange((0,i.A)(c().mark(function e(){return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,e8.current.getState(u);case 2:eD(e.sent),eX(!0);case 5:case"end":return e.stop()}},e)}))),eJ(u),e.next=44,e8.current.getState(u);case 44:eD(e.sent),eo&&el==m.c.Category&&(eo.carCategory===d.CarCategory.newcar?eu(m.c.TrimLevel):eu(m.c.SelectStockCar)),ef(!1);case 48:case"end":return e.stop()}},e,null,[[14,20],[24,30]])})),function(){return e.apply(this,arguments)})()},[eo,el,G.authToken]);var na=(0,s.useCallback)((r=(0,i.A)(c().mark(function e(n){return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(eT(n),e8.current){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,e8.current.setMileagePerYear(eW,n);case 5:eJ(e.sent);case 7:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)}),[eW]),no=(0,s.useCallback)((a=(0,i.A)(c().mark(function e(n){var t,r,i;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(eP(n),(r=eV>(t=(0,O.A)(F,eo,n)).max)&&eT(t.max),e8.current){e.next=6;break}return e.abrupt("return");
1case 6:return e.next=8,e8.current.setLeaseDuration(eW,n);case 8:if(i=e.sent,!r){e.next=13;break}return e.next=12,e8.current.setMileagePerYear(i,t.max);case 12:i=e.sent;case 13:eJ(i);case 14:case"end":return e.stop()}},e)})),function(e){return a.apply(this,arguments)}),[eW,eo,eV]),nc=(o=(0,i.A)(c().mark(function e(){var n,t,r,i=arguments;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>0&&void 0!==i[0]?i[0]:null,t=i.length>1&&void 0!==i[1]?i[1]:null,ef(!0),e.next=5,e8.current.applyChange(n||e4.current,t||eH);case 5:if(r=e.sent,e_([]),eq([]),!r.hasChanges){e.next=11;break}return r.optionsToBeDecided.length?(e4.current=r,eq(r.optionsToBeDecided)):nc(r,[]),e.abrupt("return");case 11:eJ(r.request),eD(r.nextState),ef(!1);case 15:case"end":return e.stop()}},e)})),function(){return o.apply(this,arguments)});(0,s.useEffect)(function(){eE&&(eR(eE.allOptions.filter(function(e){return"Lak"!==e.terbergCategories.configuratorGroup}).length>0),R(function(e){return[].concat((0,u.A)(e),(0,u.A)(eE.allOptions.filter(function(n){return!e.find(function(e){return e.id===n.id})})))}))},[eE]);var ns=(h=(0,i.A)(c().mark(function e(n){var t,r;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=eE.allOptions.find(function(e){return n===e.id}),!eE.selectedOptions.find(function(e){return e.id===n})){e.next=7;break}return e.next=4,e8.current.removeOption(eW,t);case 4:r=e.sent,e.next=10;break;case 7:return e.next=9,e8.current.addOption(eW,t);case 9:r=e.sent;case 10:e4.current=r,r.optionsToBeDecided.length?eq(r.optionsToBeDecided):nc();case 12:case"end":return e.stop()}},e)})),function(e){return h.apply(this,arguments)}),nl=(0,s.useMemo)(function(){return er?(0,p.b)({make:v,model:k,trimLevel:er},{}):(0,p.b)({make:v,model:k},{})},[er,eo]),nu=(0,s.useMemo)(function(){return $?$.reduce(function(e,n){var t=n.carCategory;return e.includes(t)||e.push(t),e},[]):null},[$]);return{currentStep:el,setCurrentStep:eu,versions:$,loading:ep,setLoading:ef,trimLevel:er,calculating:em,setTrimLevel:ei,selectedVersion:eo,setSelectedVersion:(0,s.useCallback)(function(e){var n=Z(e);eA>(null==n?void 0:n.max)&&no(null==n?void 0:n.max),G.authToken||no(null==n?void 0:n.max),ec(e)},[G]),receiptTotal:ex,setReceiptTotal:eb,calculationTotal:ej,configuratorState:eE,hasNonAppearanceOptions:eM,configuratorImages:eZ,optionsToBeDecided:eF,optionDecisions:eH,toggleOption:ns,toggleDecideOption:function(e,n){if(eH.find(function(e){return e.id===n}))return void e_(function(e){return e.filter(function(e){return e.id!==n})});e_([eF[e].options.find(function(e){return e.id===n})])},setConfiguratorRequest:eJ,configuratorUpdated:e$,requestChangeRef:e4,applyChange:nc,calculationRef:e7,saveCalculation:ni,configuratorRequest:eW,configuratorRef:e8,leaseDuration:eA,setLeaseDuration:no,mileagePerYear:eV,setMileagePerYear:na,image:ee,carImages:nl,carCategory:A,carCategories:nu,vehicleUnavailable:(0,s.useMemo)(function(){return null!=e0&&e0},[e0]),setVehicleUnavailable:e1,campaignConfiguration:e6,navigateToState:nt,goToPreviousStep:nr}};var A=t(82756),P=t(82281),L=t.n(P),V=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=e;return t&&(i=t,r.find(function(e){return e.id.toLocaleLowerCase()==="allseasonTires".toLocaleLowerCase()&&e.value})&&(i="".concat(i,"-4S"))),!1===n&&(i="".concat(e,"-NI")),i};let T=function(e,n,t,r,a,o){var l=(0,j.qE)().parameterSet,d=(0,y.Pj)().insurance,p=r?JSON.parse(r):null,f=(0,s.useRef)(!1),m=(0,s.useRef)(!1),h=(0,s.useRef)(!1),v=(0,s.useState)(p?p.damageFreeYears:null),x=v[0],b=v[1],w=(0,s.useState)(!0),O=w[0],k=w[1],S=(0,s.useState)(p?p.insurancePackage:null),C=S[0],P=S[1],L=(0,s.useState)(null==p?void 0:p.cascoInsurance),T=L[0],I=L[1],E=(0,s.useState)(null==p?void 0:p.waInsurance),D=E[0],N=E[1],M=(0,s.useState)((null==p?void 0:p.additionalServices)||[]),R=M[0],B=M[1],F=(0,s.useState)(null==p?void 0:p.roadService),q=F[0],z=F[1],H=(0,s.useState)((null==p?void 0:p.additionalInsurances)||[]),_=H[0],Y=H[1],W=(0,s.useState)(null==p?void 0:p.replacementVehicle),J=W[0],U=W[1],Z=(0,s.use
1State)((null==p?void 0:p.tireArrangement)||"P"),G=Z[0],K=Z[1],$=(0,g.B)(),X=(0,s.useMemo)(function(){return null===x?2:x},[x]),Q=(0,s.useMemo)(function(){return null===C?0:C},[C]),ee=(0,s.useMemo)(function(){var e,n,t,r=d.packages[Q].config,i=d.defaults,a=null!=(e=null==(n=r.insuranceCodes)?void 0:n[X])?e:null;return[].concat((0,u.A)((null==i?void 0:i.additionalServices)||[]),(0,u.A)(null!=(t=r.additionalServices)?t:[]),(0,u.A)((null==a?void 0:a.additionalServices)||[]))},[d,Q,X]),en=(0,s.useMemo)(function(){var e,n,t,r=d.packages[Q].config,i=d.defaults,a=null!=(e=null==(n=r.insuranceCodes)?void 0:n[X])?e:null;return[].concat((0,u.A)(i.additionalInsurances||[]),(0,u.A)(null!=(t=r.additionalInsurances)?t:[]),(0,u.A)((null==a?void 0:a.additionalInsurances)||[]))},[d,Q,X]);(0,s.useEffect)(function(){if(!m.current&&p){m.current=!0;return}},[Q]),(0,s.useEffect)(function(){et(0,null)},[]),(0,s.useEffect)(function(){if(!h.current&&p){h.current=!0;return}var e,n,t,r,i=d.packages[Q].config;I(null!=(e=null==(n=i.insuranceCodes)||null==(n=n[X])?void 0:n.cascoInsurance)?e:""),N(null!=(t=null==(r=i.insuranceCodes)||null==(r=r[X])?void 0:r.waInsurance)?t:"")},[Q,x]),(0,s.useEffect)(function(){ei.filter(function(e){return e.value}).forEach(function(e){var n=e.config;Object.prototype.hasOwnProperty.call(n,"insuranceCodes")&&I(n.insuranceCodes[x].cascoInsurance)})},[x]),(0,s.useEffect)(function(){if(n.current){var e=setTimeout(ea,300);return function(){return clearTimeout(e)}}},[T,D,O,J,R,_,G,q,n.current,C]),(0,s.useEffect)(function(){!f.current&&n.current&&(ea(),f.current=!0)},[n.current]);var et=function(e,n){if(P(e),null!=d&&d.packages&&d.packages[e]){var t=d.packages[e].config;Object.keys(t).forEach(function(e){switch(e){case"replacementVehicle":U(t[e]);return;case"roadService":z(t[e]);return;case"tireArrangement":K(function(n){return"A"===n?n:t[e]});return}})}},er=(0,s.useCallback)(function(){k(function(e){return!e})},[]),ei=(0,s.useMemo)(function(){if(!o.current)return[];var e=d.options,n=d.packages[Q].config;return e.map(function(t){var r,i,c,s,l,u,d,p,f,g,m,h,v,x,b,y,j,w,O=t.key,k=t.category,S=t.config,C=t.id,P=t.conditions;if(0===O&&o.current){var L=o.current.leaseObject.value.total;if(L&&L.gross-L.vat>A.WW)return null}if("allseasonTires"===C&&a&&!a.tires.allWeatherAvailable)return null;var V=!1,I=!1,E=null;return Object.prototype.hasOwnProperty.call(S,"insuranceCodes")&&(V=T===(null!=(r=null==(i=S.insuranceCodes)||null==(i=i[X])?void 0:i.cascoInsurance)?r:null),I=(null!=(c=null==(s=S.insuranceCodes)||null==(s=s[X])?void 0:s.cascoInsurance)?c:null)===(null==(l=n.insuranceCodes)?void 0:l[X].cascoInsurance)||(null==(u=n.disableInsuranceCodes)?void 0:u.includes(null!=(d=null==(p=S.insuranceCodes)||null==(p=p[X])?void 0:p.cascoInsurance)?d:null)),E=(null==(f=S.insuranceCodes[null==$||null==(g=$.originalInsurance)?void 0:g.damageFreeYears])?void 0:f.cascoInsurance)===(null==$||null==(m=$.originalInsurance)?void 0:m.cascoInsurance),1===O&&e[2].config.insuranceCodes&&(null==(h=e[2].config.insuranceCodes)||null==(h=h[X])?void 0:h.cascoInsurance)===T&&(I=!0)),Object.prototype.hasOwnProperty.call(S,"additionalInsurances")&&(V=null==_?void 0:_.includes(S.additionalInsurances),E=null==$||null==(v=$.originalInsurance)||null==(v=v.additionalInsurances)?void 0:v.includes(S.additionalInsurances),I=n.additionalInsurances.includes(S.additionalInsurances)),Object.prototype.hasOwnProperty.call(S,"additionalServices")&&(V=null==(x=ee.concat(R))?void 0:x.includes(S.additionalServices),E=null==$||null==(b=$.originalInsurance)||null==(b=b.additionalServices)?void 0:b.includes(S.additionalServices),I=ee.includes(S.additionalServices)),Object.prototype.hasOwnProperty.call(S,"replacementVehicle")&&(V=JSON.stringify(J)===JSON.stringify(S.replacementVehicle),I=JSON.stringify(S.replacementVehicle)===JSON.stringify(n.replacementVehicle),E=JSON.stringify(null==$||null==(y=$.originalInsurance)?void 0:y.replacementVehicle)===JSON.stringify(S.replacementVehicle)),Object.prototype.hasOwnProperty.call(S,"tireArrangement")&&(V=JSON.stringify(G)===JSON.stringify(S.tireArrangement),I=JSON.stringify(S.tireArrangement)===JSON.stringify(n.tireArrangement),E=S.tireArrangement===(null==$||null==(j=$.originalInsurance)?void 0:j.tireArrangement)),Object.prototype.hasOwnProperty.call(S,"roadService")&&(V=JSON.stringify(q)===JSON.stringify(S.roadService),I=JSON.stringify(S.roadService)===JSON.stringify(n.roadService),E=S.roadService===(null==$||null==(w=$.originalInsurance)?void 0:w.roadService)),{value:V,disabled:I,category:k,
1current:E,key:O,id:C,config:S,conditions:P}}).filter(function(e){return!!e})},[T,D,R,J,G,q,o.current,$]),ea=(0,s.useCallback)((0,i.A)(c().mark(function r(){var i,a,o,s;return c().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return i=d.packages[C].config,r.next=3,n.current.setParameterSet(e,V(l,O,null==i?void 0:i.parameterSet,ei));case 3:if(a=r.sent,""===T){r.next=8;break}return r.next=7,n.current.setCascoInsurance(a,T);case 7:a=r.sent;case 8:if(""===D){r.next=12;break}return r.next=11,n.current.setWaInsurance(a,D);case 11:a=r.sent;case 12:if(o=ee.concat(R),q&&""!==q&&(o=o.concat(null!=q?q:[])),!d.has.additionalServices){r.next=18;break}return r.next=17,n.current.setAdditionalServices(a,o);case 17:a=r.sent;case 18:if(s=en.concat(_),!d.has.additionalInsurances){r.next=23;break}return r.next=22,n.current.setAdditionalInsurances(a,s);case 22:a=r.sent;case 23:if(!(J&&J.segmentLevel)){r.next=27;break}return r.next=26,n.current.setReplacementVehicle(a,J);case 26:a=r.sent;case 27:if(!(G&&""!==G)){r.next=31;break}return r.next=30,n.current.setTireArrangement(a,G);case 30:a=r.sent;case 31:t(a);case 32:case"end":return r.stop()}},r)})),[ei,T,e,D,O,J,ee,R,_,G,q,C]);return{damageFreeYears:x,updateDamageFreeYears:function(e){b(e)},insurancePackage:C,updateInsurancePackage:function(e){var n=e;e===C&&(n=0),et(n,C)},insuranceOptions:ei,toggleInsuranceOption:function(e){var n=d.options,t=d.packages,r=n.find(function(n){return n.key===e}).config,i=t[Q].config;if(Object.prototype.hasOwnProperty.call(r,"insuranceCodes")){var a,o,c,s,l=(null!=(a=null==(o=r.insuranceCodes)?void 0:o[X])?a:null).cascoInsurance;T!==l?I(l):I(null!=(c=null==(s=i.insuranceCodes)||null==(s=s[X])?void 0:s.cascoInsurance)?c:null)}Object.prototype.hasOwnProperty.call(r,"additionalInsurances")&&(_.includes(r.additionalInsurances)?Y(function(e){return e.filter(function(e){return e!==r.additionalInsurances})}):Y(function(e){return[].concat((0,u.A)(e),[r.additionalInsurances])})),Object.prototype.hasOwnProperty.call(r,"additionalServices")&&(R.includes(r.additionalServices)?B(function(e){return e.filter(function(e){return e!==r.additionalServices})}):B(function(e){return[].concat((0,u.A)(e),[r.additionalServices])})),Object.prototype.hasOwnProperty.call(r,"replacementVehicle")&&(JSON.stringify(J)!==JSON.stringify(r.replacementVehicle)?U(r.replacementVehicle):U(i.replacementVehicle)),Object.prototype.hasOwnProperty.call(r,"roadService")&&(JSON.stringify(q)!==JSON.stringify(r.roadService)?z(r.roadService):z(i.roadService)),Object.prototype.hasOwnProperty.call(r,"tireArrangement")&&(JSON.stringify(G)!==JSON.stringify(r.tireArrangement)?K(r.tireArrangement):K(i.tireArrangement))},insuranceEnabled:O,toggleInsuranceEnabled:er}},I=function(e){var n=(0,s.useState)(e),t=n[0],r=n[1];return[t,(0,s.useCallback)(function(){return r(function(e){return!e})},[r])]};var E=t(31158),D=t(15962),N=t(31489),M=t(54808),R=t(82203),B=t.n(R),F=t(32188),q=t(48583),z=t(5114),H=t(26194),_=t(81978),Y=t(34056),W=t(45529),J=t(16298),U=t(27891),Z=(0,z.A)(H.A,{target:"e14ocak312"})(function(){return{".MuiDialog-paper":{paddingTop:24,maxWidth:760,maxHeight:480}}},""),G=(0,z.A)("span",{target:"e14ocak311"})(function(e){var n=e.theme;return(0,r.A)({display:"inline-block",paddingLeft:20},n.breakpoints.up("md"),{marginBottom:-12})},""),K=(0,z.A)("span",{target:"e14ocak310"})(function(e){var n=e.isNew;return{borderRadius:4,display:"inline-flex",alignItems:"center",backgroundColor:n?"#4ba82e":"#d4d8df",color:n?"#ffffff":"#6e8cb4",textDecoration:e.removed?"line-through":"none",margin:4,marginBottom:12,padding:"0 8px",fontSize:12,height:32}},""),$=(0,z.A)(_.A,{target:"e14ocak39"})(function(e){var n=e.theme;return(0,r.A)({position:"absolute",right:0,top:0},n.breakpoints.up("md"),{right:-16,top:-16})},""),X=(0,z.A)(F.A,{target:"e14ocak38"})(function(e){var n=e.theme;return(0,r.A)({marginRight:18},n.breakpoints.down("sm"),{fontSize:18})},""),Q=(0,z.A)(Y.A,{target:"e14ocak37"})(function(e){var n=e.theme;return(0,r.A)({padding:"24px 0",justifyContent:"center",flexWrap:"wrap","&>*":{margin:"0 12px"}},n.breakpoints.down("xs"),{flexDirection:"column",padding:"12px 12px 0 12px",marginLeft:0,"&>*":{width:"100%",margin:0,marginBottom:12}})},""),ee=(0,z.A)(W.A,{target:"e14ocak36"})(function(e){var n=e.theme;return(0,r.A)({marginTop:-12},n.breakpoints.down("sm"),{marginTop:-42,padding:"24px 0 0 0 !important"})},""),en=(0,z.A)("div",{target:"e14ocak35"})(function(e){var n=e.theme;return(0,r.A)({display:"flex",marginRight:-18},n.breakpoints.down("sm"),{padding:0})},""),et=(0,z.A)(J.Ay,{target:"e14ocak34"})(function(e){var n=e.theme;return(0,r.A)({minHeight:64,padding:"0 !important",display:"flex",justifyItems:"center",backgroundImage:"linear-gradient(to top, rgba(0,0,0,0), rgb(209 219 230) 179%)",minWidth:"100%"},n.breakpoints.down("sm"),{height:"auto",flexDirection:"column"})},""),er=(0,z.A)("span",{target:"e14ocak33"})(function(e){var n=e.theme;return(0,r.A)((0,r.A)({color:n.other.title.main,fontWeight:600,fontSize:12,paddingLeft:32,margin:"12px 0 8px 0",display:"flex",alignItems:"center"},n.breakpoints.up("md"),{minWidth:140}),n.breakpoints.down("sm"),{paddingLeft:24,fontSize:14})},""),ei=(0,z.A)(J.Ay,{target:"e14ocak32"})(function(e){var n=e.theme;return(0,r.A)({display:"flex",justifyContent:"center",flexDirection:"column"},n.breakpoints.up("md"),{paddingTop:12,flexDirection:"row",justifyContent:"left",alignItems:"center",flexWrap:"wrap",minHeight:64})},""),ea=(0,z.A)(U.A,{target:"e14ocak31"})(function(e){var n=e.theme;return(0,r.A)((0,r.A)({position:"relative"},n.breakpoints.up("md"),{paddingLeft:76}),n.breakpoints.down("sm"),{padding:"32px 24px 0 24px"})},""),eo=(0,z.A)(U.A,{target:"e14ocak30"})(function(e){var n=e.theme;return(0,r.A)({margin:0,marginTop:-12},n.breakpoints.up("md"),{marginTop:12,margin:"0px 42px"})}
1,""),ec=t(83004),es=t(13778),el=t(95795);function eu(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function ed(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?eu(Object(t),!0).forEach(function(n){(0,r.A)(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):eu(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var ep=(0,ec.Y)(el.A,{fontSize:"small"}),ef=(0,s.forwardRef)(function(e,n){var t=ed(ed({},e),{},{lowercase:void 0,ref:n});return(0,ec.Y)(es.A,ed({endIcon:ep,color:"secondary",variant:"contained"},t))}),eg=(0,z.A)(ef,{target:"e1vvz9wx0"})(function(e){return{textTransform:e.lowercase?"none":void 0,color:"outlined"!==e.variant?"white":void 0}},""),em=t(6029);let eh=function(e){var n=e.category,t=e.children;return(0,em.jsx)(em.Fragment,{children:(0,em.jsxs)(et,{item:!0,xs:4,children:[(0,em.jsx)(er,{children:n}),(0,em.jsx)(ei,{children:t})]})})};var ev=t(56675);let ex=function(e){var n=e.configuratorState,t=e.editMode,r=e.leaseDuration,i=e.mileagePerYear,a=e.insurancePackage,o=(e.insuranceOptions,e.trimLevel),c=e.open,l=e.onClose,u=e.onSave,d=e.leaveEditModal,p=L()().publicRuntimeConfig,f=(0,ev.Bd)("configurator").t,g=(0,s.useState)(!1),m=g[0],h=g[1],v=(0,y.Pj)().insurance,x=(0,s.useMemo)(function(){if(!t.originalOptions||!t.optionLabels||!t.optionLabels.length||!n)return{};var e=function(e,n){var t=v[e].find(function(e){return e.key===n});return t?t.label:f("editMode.leaveConfirmation.optionIsEmpty")},c=[{category:f("common.trimLevel.label"),oldValue:t.originalTrimLevel,newValue:o},{category:f("common.leaseDuration.label"),oldValue:t.originalDuration,newValue:r},{category:f("common.mileagePerYear.label"),oldValue:t.originalMileage,newValue:i},{category:f("common.insurancePackages.label"),oldValue:e("packages",t.originalInsurance.insurancePackage),newValue:e("packages",a)}].reduce(function(e,n){var t=n.oldValue!==n.newValue&&n.oldValue.toString()!==n.newValue.toString();return t&&(e[n.category]||(e[n.category]=[]),e[n.category].push({id:"original-".concat(n.category),name:n.oldValue,removed:t,new:!1}),e[n.category].push({id:"new-".concat(n.category),name:n.newValue,removed:!1,new:!0})),e},{}),s=t.originalOptions.map(function(e){var r=t.optionLabels.find(function(n){return e===n.id}),i=r.id,a=r.name,o=r.originalType,c=r.categories,s=!n.selectedOptions.find(function(e){return e.id===i});return{id:i,name:a,originalType:o,category:c[0],removed:s,new:!1}}),l=n.selectedOptions.filter(function(e){var n=e.id;return!t.originalOptions.includes(n)}).map(function(e){return{id:e.id,name:e.name,originalType:e.originalType,category:e.categories[0],new:!0,removed:!1}});return s.concat(l).filter(function(e){var n=e.new,t=e.removed;return n||t}).reduce(function(e,n){return e[n.category]||(e[n.category]=[]),e[n.category].push(n),e},c)},[t,n]),b=p.MY_JUSTLEASE_URL;return(0,s.useEffect)(function(){d&&!Object.keys(x).length&&b?(h(!1),window.location.href=b):d&&h(!0)},[d]),(0,em.jsxs)(Z,{open:c||m,onClose:function(){h(!1),l()},children:[(0,em.jsxs)(ee,{children:[(0,em.jsxs)(ea,{children:[(0,em.jsxs)(en,{children:[(0,em.jsx)(X,{variant:"h4",children:d?f("editMode.leaveConfirmation.titleWarning"):f("editMode.leaveConfirmation.title")}),(0,em.jsx)($,{onClick:function(){h(!1),l()},children:(0,em.jsx)(q.A,{})})]}),(0,em.jsxs)(F.A,{style:{color:"black",fontSize:12,padding:"12px 0 24px 0"},children:[d&&(0,em.jsxs)(em.Fragment,{children:[f("editMode.leaveConfirmation.descriptionWarning"),
1(0,em.jsx)("br",{})]}),f("editMode.leaveConfirmation.description")]})]}),(0,em.jsx)(eo,{children:Object.keys(x).map(function(e){return(0,em.jsx)(eh,{category:e,children:x[e].map(function(e){return(0,em.jsx)(G,{children:(0,em.jsx)(K,{removed:e.removed,isNew:e.new,children:e.name||f("editMode.leaveConfirmation.optionIsEmpty")})},e.id)})},e)})})]}),(0,em.jsxs)(Q,{children:[(0,em.jsx)(eg,{disableElevation:!0,variant:"outlined",lowercase:!0,endIcon:void 0,onClick:function(){d&&h(!1),l()},children:f("editMode.leaveConfirmation.cancelButton")}),!d&&(0,em.jsx)(eg,{disableElevation:!0,lowercase:!0,onClick:function(){u(),l(),h(!1)},children:f("editMode.leaveConfirmation.confirmButton")}),d&&(0,em.jsx)(B(),{href:b||"/",as:b?void 0:"/",legacyBehavior:!0,children:(0,em.jsx)(eg,{disableElevation:!0,lowercase:!0,children:f("editMode.leaveConfirmation.backToMyAccountButton")})})]})]})};var eb=t(97814),ey=t(63291),ej=t(74854),ew=t(16106);let eO=function(e){var n=e.optionsToBeDecided,t=e.optionDecisions,r=e.toggleDecideOption,i=e.applyChange,a=(0,E.A)(),o=(0,D.A)(a.breakpoints.up("md"),{noSsr:!1}),c=(0,ev.Bd)("configurator",{keyPrefix:"common"}).t,s=function(e,r){var i=!1,a=!1;return n[e].options.forEach(function(e){var n=e.id;t.find(function(e){return e.id===n})&&(a=!0)}),t.find(function(e){return e.id===r})&&(i=!0,a=!1),{active:i,disabled:a}};return(0,em.jsxs)(ej.aF,{portalSelector:"#portals",open:n.length>0,onClose:function(){},scrollable:!0,centered:o,children:[(0,em.jsx)(ew.wt,{children:c("optionDecisionDialog.title")}),(0,em.jsx)(ej.aF.Body,{children:n.map(function(e,n){return(0,em.jsxs)(em.Fragment,{children:[e.title&&(0,em.jsx)(ej.DZ,{level:3,color:"brand-blue-1",children:e.title}),(0,em.jsx)(eb.A,{children:e.options.map(function(e){var t=s(n,e.id),i=t.active,a=t.disabled;return(0,em.jsx)(ey.A,{id:e.id,onClick:function(){r(n,e.id)},onShowMore:null,name:e.name,excluded:a,required:!1,included:!1,selected:i,features:null},e.id)})},n)]})})}),(0,em.jsx)(ej.aF.Footer,{children:(0,em.jsx)(ej.$n,{variant:"primary",onClick:function(){return i()},disabled:n.length!==t.length,style:{textTransform:"none"},children:c("optionDecisionDialog.confirmButton")})})]})};var ek=t(22822),eS=t(94202);function eC(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function eA(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?eC(Object(t),!0).forEach(function(n){(0,r.A)(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):eC(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var eP=(0,z.A)("header",{target:"evy6t426"})(function(e){var n=e.theme;return(0,r.A)((0,r.A)({top:"40px"},n.breakpoints.up("lg"),{top:"64px"}),"boxShadow","0px 20px 32px 0 #00000024")},""),eL={cursor:"pointer"};(0,z.A)(ek.A,{target:"evy6t424"})(eA({},eL),""),(0,z.A)(eS.A,{target:"evy6t423"})(eA({},eL),"");let eV=function(e){var n=e.children;e.onBack,e.vehicleImage;var t=(0,s.useRef)(null);return(0,ev.Bd)("common").t,(0,em.jsx)(em.Fragment,{children:(0,em.jsx)(eP,{ref:t,className:"bg-white sticky z-50 transition-all after:duration-500 ",children:(0,em.jsxs)(ej.mc,{children:[(0,em.jsx)("div",{className:"lg:flex bg-white h-24 px-16 lg:flex-nowrap lg:flex-1 lg:items-center lg:px-0"}),(0,em.jsx)("div",{style:{marginTop:"-24px"},children:n})]})})})};var eT=t(66903);(0,z.A)(J.Ay,{target:"e1lj9t2d15"})({name:"0",styles:""});var eI=(0,z.A)("span",{target:"e1lj9t2d2"})(function(e){return{color:e.theme.palette.text.primary,fontSize:12,marginLeft:4,fontWeight:300}},"");(0,z.A)("div",{target:"e1lj9t2d0"})({name:"hj7g9k",styles:"text-align:center;max-width:600px;margin:0 auto;color:#000;font-style:italic;font-size:12px"});let eE=function(e){var n=e.receiptOnClick,t=e.nextStepOnClick,r=e.receiptTotal,i=e.editMode,a=e.loading,o=e.calculating,c=e.step,l=(0,E.A)(),u=(0,ev.Bd)("common").t,d=(0,ev.Bd)("configurator").t,p=(0,D.A)(l.breakpoints.up("md"),{noSsr:!1}),g=(0,s.useContext)(f.A);return(0,em.jsx)(ej.wn,{spacingVariant:"none",className:"sticky z-10 bg-white p-16 px-0",style:{to
1p:"auto",bottom:0},children:(0,em.jsxs)("div",{className:"flex lg:justify-end gap-80",children:[(0,em.jsx)("div",{className:"hidden lg:flex items-center",children:(0,em.jsx)("ul",{className:"flex justify-evenly items-start gap-16",children:u("valuePropositions",{returnObjects:!0}).map(function(e,n){return(0,em.jsx)(ej.ck,{icon:"pros",children:e.title},n)})})}),(0,em.jsxs)("div",{className:"flex gap-24 justify-between w-full lg:w-auto",children:[(0,em.jsxs)(ej.$n,{type:"button",variant:"action",className:"receiptButtonClass",id:"receiptButton",onClick:n,endIcon:"chevronDown",children:[(0,em.jsx)(em.Fragment,{children:o?(0,em.jsx)(eT.A,{size:"1rem",color:"inherit"}):(0,em.jsx)(ej.DZ,{level:p?3:4,color:"brand-blue-1",className:"inline",children:"".concat(r,",-")})}),"\xa0",(0,em.jsxs)("span",{className:"text-grey",children:[d("common.leasePriceFrom"),g.priceLabelPostfix&&(0,em.jsx)(eI,{children:g.priceLabelPostfix})]})]}),(0,em.jsx)(ej.$n,{type:"button",variant:"primary",endIcon:a||i?null:"arrowRight",large:!0,onClick:t,disabled:a,children:a?(0,em.jsx)(eT.A,{size:"1rem",color:"inherit"}):d(i&&c===m.c.Subscription?"common.submitButton":"common.nextButton")})]})]})})};var eD=t(14047),eN=t(7605);function eM(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}var eR=function(e){return(0,ec.Y)(eD.Ay,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?eM(Object(t),!0).forEach(function(n){(0,r.A)(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):eM(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}({style:{zIndex:1301}},e))},eB=(0,z.A)(U.A,{target:"eyg4va918"})("width:635px;padding:64px 70px 64px 70px;",function(e){return e.theme.breakpoints.down("md")},"{min-height:400px;max-height:700px;border-radius:5px;}/* using @media rule for singleton design specific override to combat horizontal scrolling*/@media only screen and (max-width: 635px){width:100%;}",function(e){return e.theme.breakpoints.down("sm")},"{padding:0px 20px 30px 20px;}");(0,z.A)(eN.A,{target:"eyg4va911"})({name:"2yg56j",styles:"margin-bottom:37px"}),(0,z.A)(eN.A,{target:"eyg4va95"})({name:"4lbtkx",styles:"margin-top:30px;margin-bottom:200px"});var eF=(0,z.A)(q.A,{target:"eyg4va91"})("color:",function(e){return e.theme.other.title.main},";position:absolute;top:0;right:0;cursor:pointer;width:23px;height:23px;margin:28px;",function(e){return e.theme.breakpoints.down("md")},"{margin:18px 18px 0 0;}");let eq=function(e){var n=e.anchor,t=e.open,r=e.onClose,i=e.closeReceipt,a=e.children;return(0,em.jsx)(eR,{anchor:n,open:t,onClose:r,children:(0,em.jsxs)(eB,{children:[(0,em.jsx)(eF,{onClick:i}),a]})})};var ez=t(31884),eH=t(77848),e_=t.n(eH),eY=t(52814),eW=t(99227),eJ=t(50744),eU=t(52471),eZ=t(54671),eG=t(76194),eK=(0,z.A)("div",{target:"e1izepvh12"})({name:"uozmzf",styles:"height:100%;display:flex;flex-direction:column;justify-content:space-between;max-width:600px"}),e$=(0,z.A)("div",{target:"e1izepvh11"})(function(e){var n=e.theme;return(0,r.A)({padding:"0 24px",display:"flex",flexDirection:"column",justifyContent:"flex-start",flexGrow:1},n.breakpoints.up("md"),{padding:"0 96px"})},""),eX=(0,z.A)("div",{target:"e1izepvh10"})({name:"d4gbss",styles:"padding:0 24px;display:flex;justify-content:flex-end"}),eQ=(0,z.A)("img",{target:"e1izepvh9"})({name:"dc8ic4",styles:"max-width:100%;margin:0 auto 24px;display:block"}),e0=(0,z.A)(_.A,{target:"e1izepvh8"})(function(e){return{backgroundColor:"#cfe8f5",color:e.theme.other.title.main,width:36,height:36,marginRight:12}},""),e1=(0,z.A)("ul",{target:"e1izepvh7"})({name:"1xclg2i",styles:"margin:0;padding:0"}),e2=(0,z.A)("li",{target:"e1izepvh6"})({name:"1d3zmp8",styles:"list-style:none;margin:12px 0"}),e6=(0,z.A)("a",{target:"e1izepvh5"})(function(e){return{marginRight:12,color:e.theme.palette.primary.main,textDecoration:"none"}},""),e3=(0,z.A)("div",{target:"e1izepvh4"})({name:"br9efl",styles:"padding:12px;background-color:#f3f6f9;display:flex;align-items:center"}),e4=(0,z.A)(eZ.A,{target:"e1izepvh3"})({name:"1j97xhc",styles:"margin-right:12px"}),e8=(0,z.A)("span",{target:"e1izepvh2"})({name:"sqm42b",styles:"text-overflow:ellipsis;white-space:nowrap;overflow:hidden"}),e7=(0,z.A)(es.A,{target:"e1izepvh1"})({name:"3njd51",styles:"flex:0 0 140px"});(0,z.A)(eG.A,{target:"e1izepvh0"})({name:"0",styles:""});let e5=function(e){var n=e.image,t=e.make,r=e.model,i=e.link,a=(0,s.use
1State)(!1),o=a[0],c=a[1],l=(0,E.A)(),u=(0,D.A)(l.breakpoints.up("md"),{noSsr:!0}),d=(0,ev.Bd)("common",{keyPrefix:"sharing"}).t,p=(0,s.useMemo)(function(){return encodeURIComponent(i)},[i]);return(0,em.jsxs)(eK,{children:[(0,em.jsx)(e$,{children:(0,em.jsxs)(U.A,{children:[n&&(0,em.jsx)(eQ,{src:n,alt:"".concat(t,"/").concat(r)}),(0,em.jsx)(U.A,{mb:2,children:(0,em.jsx)(F.A,{variant:"h5",children:d("configurationLabel",{make:t,model:r})})}),(0,em.jsx)(U.A,{mb:2,children:(0,em.jsx)(F.A,{variant:"body2",children:(0,em.jsx)(ev.x6,{i18nKey:"configurationDescription",t:d})})}),(0,em.jsx)(U.A,{mb:2,children:(0,em.jsxs)(e1,{children:[(0,em.jsx)(e2,{children:u?null:(0,em.jsx)(e6,{href:"whatsapp://send?text=".concat(p),target:"_blank",children:(0,em.jsxs)(em.Fragment,{children:[(0,em.jsx)(e0,{color:"primary",children:(0,em.jsx)(eY.A,{})}),d("whatsAppButton")]})})}),(0,em.jsx)(e2,{children:(0,em.jsx)(e6,{href:"http://twitter.com/share?url=".concat(p),target:"_blank",children:(0,em.jsxs)(em.Fragment,{children:[(0,em.jsx)(e0,{color:"primary",children:(0,em.jsx)(eW.A,{})}),d("twitterButton")]})})}),(0,em.jsx)(e2,{children:(0,em.jsx)(e6,{href:"mailto:[email protected]?subject=Justlease%20Carculator%20".concat(t,"%20").concat(r,"&body=").concat(p),children:(0,em.jsxs)(em.Fragment,{children:[(0,em.jsx)(e0,{color:"primary",children:(0,em.jsx)(eU.A,{})}),d("emailButton")]})})})]})}),(0,em.jsx)(U.A,{mb:2,children:(0,em.jsxs)(e3,{children:[(0,em.jsx)(e4,{}),(0,em.jsx)(e8,{children:i}),(0,em.jsx)(e7,{onClick:function(){e_()(i),c(!0),setTimeout(function(){c(!1)},3e3)},variant:"outlined",color:"primary",children:d("copyLinkButton")})]})})]})}),(0,em.jsx)(eX,{children:(0,em.jsx)(U.A,{children:(0,em.jsx)(ez.A,{in:o,children:(0,em.jsxs)(es.A,{variant:"outlined",color:"primary",children:[(0,em.jsx)(eJ.A,{})," ",d("copiedLabel")]})})})})]})};var e9=function(e,n){if(e){var t={event:"checkout",ecommerce:{checkout:{actionField:{step:n+1},products:[{id:"".concat(e.make,"/").concat(e.model),name:"".concat(e.make,"/").concat(e.model),category:e.carCategory,variant:e.versionName,brand:e.make,quantity:1,price:e.leasePrice.in.total}]}}};window&&window.dataLayer&&window.dataLayer.push(t)}},ne=t(86895),nn=(0,z.A)("div",{target:"e119mx7e1"})({name:"bjn8wh",styles:"position:relative"}),nt=(0,z.A)("div",{target:"e119mx7e0"})(function(e){var n=e.theme;return(0,r.A)((0,r.A)({position:"relative",width:"100%",paddingBottom:50,minHeight:"84vh"},n.breakpoints.up("sm"),{minHeight:"63vh"}),"top",0)},""),nr=t(59941),ni=t(42058),na=t(43660),no=t(61604),nc=t.n(no);let ns=function(e,n,t){var r=0,i=nc()();return e.availableAt&&i<e.availableAt&&(r=e.availableAt.diff(i,"weeks")),"occasion"===n&&(r+=t.delivery.preperationTimeInWeeks.occasion),"stock"===n&&(r+=t.delivery.preperationTimeInWeeks.stock),r};var nl=t(7696),nu=(0,z.A)("div",{target:"e1xwdz1g5"})(function(e){var n=e.theme;return(0,r.A)((0,r.A)({display:"flex",flexDirection:"column",alignSelf:"center",alignItems:"center",gap:"0.5rem",textAlign:"center"},n.breakpoints.down("md"),{width:"117px",gap:"0.0rem"}),n.breakpoints.up("md"),{gap:"0.5rem"})},""),nd=(0,z.A)("ul",{target:"e1xwdz1g1"})({name:"1mm5hm8",styles:"margin:0;padding-left:1.5rem;list-style-type:disc"}),np=(0,z.A)("li",{target:"e1xwdz1g0"})({name:"0",styles:""}),nf=(0,z.A)("div",{target:"eoh2usx0"})(function(){return{marginTop:"4px"}},""),ng=function(){return(0,em.jsx)(nf,{children:(0,em.jsxs)("svg",{width:"80",height:"16",viewBox:"0 0 80 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,em.jsx)("rect",{width:"70",height:"16",fill:"#009136"}),(0,em.jsx)("path",{d:"M13.376 13L12.6514 10.6211H9.00781L8.2832 13H6L9.52734 2.96484H12.1182L15.6592 13H13.376ZM12.1455 8.84375C11.4756 6.68815 11.0973 5.46908 11.0107 5.18652C10.9287 4.90397 10.8695 4.68066 10.833 4.5166C10.6826 5.09993 10.252 6.54232 9.54102 8.84375H12.1455Z",fill:"white"}),(0,em.jsx)("path",{d:"M80 7.87166L70 0V16L80 7.87166Z",fill:"#009136"})]})})},nm=function(){return(0,em.jsx)(nf,{children:(0,em.jsxs)("svg",{width:"80",height:"16",viewBox:"0 0 80 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,em.jsx)("rect",{width:"70",height:"16",fill:"#55AB26"}),(0,em.jsx)("path",{d:"M7.25781 3.00586H10.3682C11.7855 3.00586 12.8132 3.20866 13.4512 3.61426C14.0938 4.0153 
114.415 4.6556 14.415 5.53516C14.415 6.13216 14.2738 6.62207 13.9912 7.00488C13.7132 7.3877 13.3418 7.61784 12.877 7.69531V7.76367C13.5104 7.90495 13.9661 8.16927 14.2441 8.55664C14.5267 8.94401 14.668 9.45898 14.668 10.1016C14.668 11.013 14.3376 11.724 13.6768 12.2344C13.0205 12.7448 12.1273 13 10.9971 13H7.25781V3.00586ZM9.37695 6.96387H10.6074C11.1816 6.96387 11.5964 6.875 11.8516 6.69727C12.1113 6.51953 12.2412 6.22559 12.2412 5.81543C12.2412 5.43262 12.0999 5.15918 11.8174 4.99512C11.5394 4.8265 11.0973 4.74219 10.4912 4.74219H9.37695V6.96387ZM9.37695 8.64551V11.25H10.7578C11.3411 11.25 11.7718 11.1383 12.0498 10.915C12.3278 10.6917 12.4668 10.3499 12.4668 9.88965C12.4668 9.06022 11.8743 8.64551 10.6895 8.64551H9.37695Z",fill:"white"}),(0,em.jsx)("path",{d:"M80 7.87166L70 0V16L80 7.87166Z",fill:"#55AB26"})]})})},nh=function(){return(0,em.jsx)(nf,{children:(0,em.jsxs)("svg",{width:"80",height:"16",viewBox:"0 0 80 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,em.jsx)("rect",{width:"70",height:"16",fill:"#C8D200"}),(0,em.jsx)("path",{d:"M11.5029 4.62598C10.7054 4.62598 10.0879 4.92676 9.65039 5.52832C9.21289 6.12533 8.99414 6.95931 8.99414 8.03027C8.99414 10.2588 9.8304 11.373 11.5029 11.373C12.2048 11.373 13.0547 11.1976 14.0527 10.8467V12.624C13.2324 12.9658 12.3164 13.1367 11.3047 13.1367C9.85091 13.1367 8.73893 12.6969 7.96875 11.8174C7.19857 10.9333 6.81348 9.66634 6.81348 8.0166C6.81348 6.97754 7.0026 6.06836 7.38086 5.28906C7.75911 4.50521 8.30143 3.90592 9.00781 3.49121C9.71875 3.07194 10.5505 2.8623 11.5029 2.8623C12.4736 2.8623 13.4489 3.09701 14.4287 3.56641L13.7451 5.28906C13.3714 5.11133 12.9954 4.95638 12.6172 4.82422C12.2389 4.69206 11.8675 4.62598 11.5029 4.62598Z",fill:"white"}),(0,em.jsx)("path",{d:"M80 7.87166L70 0V16L80 7.87166Z",fill:"#C8D200"})]})})},nv=function(){return(0,em.jsx)(nf,{children:(0,em.jsxs)("svg",{width:"80",height:"16",viewBox:"0 0 80 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,em.jsx)("rect",{width:"70",height:"16",fill:"#FEED01"}),(0,em.jsx)("path",{d:"M15.5498 7.90723C15.5498 9.55241 15.0804 10.8125 14.1416 11.6875C13.2074 12.5625 11.8561 13 10.0879 13H7.25781V3.00586H10.3955C12.027 3.00586 13.2939 3.43652 14.1963 4.29785C15.0986 5.15918 15.5498 6.3623 15.5498 7.90723ZM13.3486 7.96191C13.3486 5.81543 12.4007 4.74219 10.5049 4.74219H9.37695V11.25H10.2861C12.3278 11.25 13.3486 10.154 13.3486 7.96191Z",fill:"white"}),(0,em.jsx)("path",{d:"M80 7.87166L70 0V16L80 7.87166Z",fill:"#FEED01"})]})})},nx=function(){return(0,em.jsx)(nf,{children:(0,em.jsxs)("svg",{width:"80",height:"16",viewBox:"0 0 80 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,em.jsx)("rect",{width:"70",height:"16",fill:"#FBBA00"}),(0,em.jsx)("path",{d:"M13.0137 13H7.25781V3.00586H13.0137V4.74219H9.37695V6.93652H12.7607V8.67285H9.37695V11.25H13.0137V13Z",fill:"white"}),(0,em.jsx)("path",{d:"M80 7.87166L70 0V16L80 7.87166Z",fill:"#FBBA00"})]})})},nb=function(){return(0,em.jsx)(nf,{children:(0,em.jsxs)("svg",{width:"80",height:"16",viewBox:"0 0 80 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,em.jsx)("rect",{width:"70",height:"16",fill:"#EB6909"}),(0,em.jsx)("path",{d:"M9.34277 13H7.25781V3.00586H12.9863V4.74219H9.34277V7.31934H12.7334V9.04883H9.34277V13Z",fill:"white"}),(0,em.jsx)("path",{d:"M80 7.87166L70 0V16L80 7.87166Z",fill:"#EB6909"})]})})},ny=function(){return(0,em.jsx)(nf,{children:(0,em.jsxs)("svg",{width:"80",height:"16",viewBox:"0 0 80 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,em.jsx)("rect",{width:"70",height:"16",fill:"#E3001B"}),(0,em.jsx)("path",{d:"M11.0518 7.3877H15.0166V12.5693C14.374 12.779 13.7679 12.9248 13.1982 13.0068C12.6331 13.0934 12.0544 13.1367 11.4619 13.1367C9.95345 13.1367 8.80046 12.6947 8.00293 11.8105C7.20996 10.9219 6.81348 9.64811 6.81348 7.98926C6.81348 6.37598 7.27376 5.11816 8.19434 4.21582C9.11947 3.31348 10.4001 2.8623 12.0361 2.8623C13.0615 2.8623 14.0505 3.06738 15.0029 3.47754L14.2988 5.17285C13.5697 4.80827 12.8109 4.62598 12.0225 4.62598C11.1064 4.62598 10.3727 4.93359 9.82129 5.54883C9.26986 6.16406 8.99414 6.99121 8.99414 8.03027C8.99414 9.11491 9.21517 9.94434 9.65723 10.5186C10.1038 11.
10882 10.751 11.373 11.5986 11.373C12.0407 11.373 12.4896 11.3275 12.9453 11.2363V9.15137H11.0518V7.3877Z",fill:"white"}),(0,em.jsx)("path",{d:"M80 7.87166L70 0V16L80 7.87166Z",fill:"#E3001B"})]})})},nj=function(e){switch(e){case"A":return(0,em.jsx)(ng,{});case"B":return(0,em.jsx)(nm,{});case"C":return(0,em.jsx)(nh,{});case"D":return(0,em.jsx)(nv,{});case"E":return(0,em.jsx)(nx,{});case"F":return(0,em.jsx)(nb,{});case"G":return(0,em.jsx)(ny,{});default:return null}},nw=t(92854);function nO(e,n){return(0,em.jsxs)("div",{className:"flex flex-col",children:[(0,em.jsx)(ej.fz,{className:"text-p lg:text-p-lg whitespace-nowrap",children:e}),(0,em.jsx)(ej.fz,{className:"text-p lg:text-p-lg font-bold",children:n})]})}let nk=function(e){var n,t,r,a,o,u,d,p,f=e.items,g=e.calculating,m=e.selectedOptions,h=e.defaultOptions,v=(0,j.qE)().container,x=(0,s.useState)(null),b=x[0],y=x[1];(0,s.useEffect)(function(){var e;(e=(0,i.A)(c().mark(function e(){return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!A.uN.includes(f.carCategory)){e.next=5;break}return e.next=3,(0,nw.h)(f.id,v);case 3:y(e.sent);case 5:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})()},[f,v]);var w=(0,j.qE)().configuration,O=(0,ev.Bd)("configurator",{keyPrefix:"subscription"}).t,k=(0,ev.Bd)("configurator",{keyPrefix:"receipt"}).t,S=f.carCategory,C=(0,l.useRouter)(),P=(0,s.useMemo)(function(){return f.stockOptions.find(function(e){return"COLOR"===e.optionType})||null},[f]),L=(0,s.useState)(!1),V=L[0],T=L[1],I=(0,s.useState)(!1),E=I[0],D=I[1],N=(0,s.useState)(!1),M=N[0],R=N[1],B=null==m?void 0:m.concat("newcar"===S?h:b),F=(null==m||null==(n=m.find(function(e){return"COLOR"===e.originalType}))?void 0:n.name)||"",q=(null==m||null==(t=m.find(function(e){return"PAINT"===e.originalType}))?void 0:t.name)||"",z=(null==m||null==(r=m.find(function(e){return"INTERIOR"===e.originalType}))?void 0:r.name)||"",H=null==P?void 0:P.name,_=ns(f,S,w),Y=(0,s.useMemo)(function(){return(0,nl.A)(f)},[f]);return(0,em.jsxs)("div",{className:"flex flex-col gap-32 xl:min-w-[640px]",children:["newcar"!==S&&(0,em.jsx)("div",{className:"flex flex-row gap-8",children:(0,em.jsx)(ej.Ex,{type:"info",children:O("specsVehicle.label_moreWeeks",{countInWeeks:_})})}),(0,em.jsxs)("div",{className:"flex gap-18 lg:gap-36",children:[(0,em.jsxs)(nu,{children:[(0,em.jsx)(ej.fz,{className:"text-p lg:text-p-lg ",children:O("specsVehicle.priceLabel")}),(0,em.jsxs)(ej.fz,{className:"font-sans text-[48px] leading-[56px] text-brand-primary-1 font-bold whitespace-nowrap",children:["€",g,",-"]})]}),(0,em.jsx)(ej.cG,{direction:"vertical",color:"bg-grey"}),"newcar"===S?(0,em.jsx)(em.Fragment,{children:(0,em.jsxs)("div",{className:"gap-16 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-1 xl:grid-cols-2 lg:gap-x-32",children:[nO(O("specsVehicle.modelLabel"),f.trimLevel||f.model),nO(O("specsVehicle.colorLabel"),F),nO(O("specsVehicle.versionLabel"),f.versionName),nO(k("transmissionLabel"),f.transmission)]})}):(0,em.jsx)(em.Fragment,{children:(0,em.jsxs)("div",{className:"gap-16 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-2 xl:grid-cols-2 lg:gap-x-32",children:[nO(O("specsVehicle.firstRegistrationDate"),Y),f.licensePlate?nO(k("licensePlate"),f.licensePlate):nO(O("specsVehicle.versionLabel"),f.versionName),f.mileage?nO(O("specsVehicle.mileagePerYear.title"),O("specsVehicle.mileagePerYear.subtitle",{mileage:new Intl.NumberFormat(C.locale).format(f.mileage)})):nO(k("transmissionLabel"),f.transmission),nO(O("specsVehicle.colorLabel"),H)]})})]}),(0,em.jsx)(ej.$n,{variant:"secondary",endIcon:V?"chevronUp":"chevronDown",className:"w-fit btn-specifications",onClick:function(){V?T(!1):T(!0),R(!1),D(!1)},children:O(V?"specsVehicle.buttonLabelClose":"specsVehicle.buttonLabelOpen")}),V&&(0,em.jsxs)(em.Fragment,{children:[(0,em.jsxs)("div",{className:"flex flex-col gap-16 lg:gap-32 lg:w-[200%] items-start mt-32",children:[(0,em.jsx)(ej.fz,{className:"text-brand-primary-1 text-h3 lg:text-h2-lg font-bold uppercase",children:O("specsVehicle.specifications.title")}),(0,em.jsxs)("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-16 lg:gap-32",children:[nO(O("specsVehicle.
1specifications.motorLabel"),f.versionName),nO(O("specsVehicle.specifications.fuelLabel"),f.fuelType),nO(k("transmissionLabel"),f.transmission),nO(O("specsVehicle.specifications.energyLabel"),nj(f.energyLabel)),nO(O("specsVehicle.specifications.assetsLabel"),f.horsePower+" "+O("specsVehicle.specifications.assetsPrefix")),nO(O("specsVehicle.specifications.cylinderLabel"),f.numberOfCylinders),nO(O("specsVehicle.specifications.coupleLabel"),f.maxTorque+" "+O("specsVehicle.specifications.couplePrefix")),nO(O("specsVehicle.specifications.accelerationLabel"),f.accelerateZeroToHundredKmHour+" "+O("specsVehicle.specifications.accelerationPrefix")),E&&(0,em.jsxs)(em.Fragment,{children:[nO(O("specsVehicle.specifications.averageUsageLabel"),(null==(a=f.fuelConsumption)?void 0:a.toString())+" "+O("specsVehicle.specifications.averageUsagePrefix")),nO(O("specsVehicle.specifications.driveLabel"),f.drivenWheels),nO(O("specsVehicle.specifications.engineCapacityLabel"),(null==(o=f.engineVolume)?void 0:o.toString())+" "+O("specsVehicle.specifications.engineCapacityPrefix")),nO(O("specsVehicle.specifications.weightLabel"),f.grossTrailerWeightBraked+" "+O("specsVehicle.specifications.weightPrefix")),nO(O("specsVehicle.specifications.emissionLabel"),(null==(u=f.co2)?void 0:u.toString())+" "+O("specsVehicle.specifications.emissionPrefix")),nO(O("specsVehicle.specifications.colorLabel"),F||H),nO(O("specsVehicle.specifications.laxTypeLabel"),q),nO(O("specsVehicle.specifications.upholsteryLabel"),z),nO(O("specsVehicle.specifications.bodyLabel"),f.bodyType),nO(O("specsVehicle.specifications.trunkSpaceLabel"),
1(null==(d=f.tankCapacity)?void 0:d.toString())+" "+O("specsVehicle.specifications.trunkSpacePrefix")),nO(O("specsVehicle.specifications.segmentLabel"),f.segment),nO(O("specsVehicle.specifications.doorslabel"),null==(p=f.numberOfDoors)?void 0:p.toString())]})]}),(0,em.jsx)(ej.$n,{variant:"buttonlink",onClick:function(){return D(!E)},children:O(E?"specsVehicle.specifications.buttonLabelClose":"specsVehicle.specifications.buttonLabelOpen")})]}),(0,em.jsxs)("div",{className:"flex flex-col gap-16 lg:gap-32 lg:w-[200%] items-start mt-32",children:[(0,em.jsx)(ej.fz,{className:"text-brand-primary-1 text-h3 lg:text-h2-lg font-bold uppercase",children:O("specsVehicle.options.title")}),(0,em.jsx)(nd,{className:"grid lg:grid-cols-3 lg:gap-x-[128px]",children:null==B?void 0:B.sort().map(function(e,n){return(0,em.jsx)(np,{className:"w-[240px] ".concat(n>8&&!M?"hidden":""," text-p lg:text-p-lg "),children:e.name||e.optionName},e.id)})}),(0,em.jsx)(ej.$n,{variant:"buttonlink",onClick:function(){return R(!M)},children:O(M?"specsVehicle.options.buttonLabelClose":"specsVehicle.options.buttonLabelOpen")})]})]})]})};var nS=(0,z.A)("div",{target:"ew1sr8h0"})(function(e){var n=e.theme;return(0,r.A)({flexGrow:1,padding:"0 24px",textAlign:"center",fontSize:"0.875rem",textTransform:"uppercase",color:n.palette.grey[500]},n.breakpoints.up("md"),{display:"none"})},""),nC=t(30471),nA=(0,z.A)(nC.Ay,{target:"e1njv7180"})({name:"s4yqxt",styles:"padding:6px 0;.MuiSlider-rail{color:#fff;height:6px;border-radius:30px;}.MuiSlider-track{color:#0938a1;height:6px;border-radius:30px;}.MuiSlider-thumb{display:none;height:6px;border-radius:30px;}.MuiSlider-mark{width:6px;height:6px;border-radius:30px;background-color:rgba(0, 69, 125, 0.1);}.MuiSlider-markActive{display:none;}"});let nP=function(e){var n=e.value,t=e.marks,r=e.max,i=e.defaultValue,a=e.step,o=e.onChange,c=e.disabled;return(0,em.jsx)(nA,{value:n,marks:t,max:r,defaultValue:i,step:a,onChange:o,disabled:c})},nL=function(e){var n=e.value,t=e.max,r=void 0===t?Math.max(1,n):t,i=e.carStepModel,a=e.mobile,o=e.currentStep,c=(0,ev.Bd)("configurator",{keyPrefix:"common.steps"}).t;return(0,em.jsxs)("div",{className:"flex flex-row justify-around",children:[!a&&(0,em.jsxs)(nS,{children:[c("".concat(o,".label"))," ",n,"/",r,(0,em.jsx)(nP,{step:1,value:n,defaultValue:n,marks:!0,max:r,disabled:!0})]}),a&&(0,u.A)(Array(r)).map(function(e,t){var r=t+1,a=r<=n;return(0,em.jsxs)("span",{className:a?"text-brand-blue-1 font-bold":"text-grey font-bold",children:[r," ",(0,em.jsxs)("span",{className:"sm-hidden",children:["newcar"===i&&"".concat(1===r?c("TrimLevel.label"):2===r?c("Motor.label"):3===r?c("Appearance.label"):4===r?c("Options.label"):5===r?c("Subscription.label"):c("Form.label")),"occasion"===i&&"".concat(1===r?c("Options.label"):2===r?c("Subscription.label"):c("Form.label")),"stock"===i&&"".concat(1===r?c("Options.label"):2===r?c("Subscription.label"):c("Form.label"))]})]},t)})]})};function nV(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function nT(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?nV(Object(t),!0).forEach(function(n){(0,r.A)(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nV(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var nI=[m.c.Category,m.c.SelectStockCar,m.c.TrimLevel,m.c.Motor],nE=[m.c.Category,m.c.SelectStockCar,m.c.Confirmation],nD=L()().publicRuntimeConfig,nN=function(e){var n,t,r=e.images,i=e.title,a=e.text,o=e.children,c=e.fixedBox,l=void 0!==c&&c,u=(e.onBack,e.overrideMobile),p=e.currentStep,f=(0,s.useState)(0),g=f[0],m=f[1],h=(0,ev.Bd)("common").t,v=(0,E.A)(),x=(0,D.A)(v.breakpoints.up("md"),{noSsr:!1}),b=(0,s.useMemo)(function(){var e=[d.ImageAngle.FRONT_LEFT,d.ImageAngle.FRONT,d.ImageAngle.FRONT_RIGHT];return r.filter(function(n){return e.includes(n.angle)}).map(function(e,n){return nT(nT({},e),{},{thumbnail:e.url,active:n===g})})},[g,r]);if(!x&&!u&&!l)return(0,em.jsxs)(ej.wn,{background:"Form"===p?"trasparent":"",className:"Form"===p?"relative z-1":"",children:[(0,em.jsx)(ej.DZ,{level:1,color:"brand-blue-1",children:i}),a&&(0,em.jsx)(ej.fz,{className:"text-brand-blue-1 text-intro",content:a}),o]});var y=(0,em.jsx)(ej.gf,{images:b.map(function(e){var n;return nT(nT({},e),{},{title:null==(n=e.angle)?void 0:n.toString()})}),onChange:function(e,n){return m(n)},showButtons:!0});return"Form"===p?(0,em.jsx)(ej.lq,{title:i,text:a,imageUrl:null==(t=b[g])?void 0:t.url,type:"boxed",className:"-mb-64",children:o}):(0,em.jsx)(ej.ng,{banner:(0,em.jsx)("div",{className:"".concat(l?"":"lg:p-40")}),carousel:y,align:"right",fixedBox:l,imageUrl:null==(n=b[g])?void 0:n.url,title:i,text:a,disclaimerText:h("disclaimer"),children:o})};let nM=function(e){e.pageData;var n,t,o,u,p,h=e.ssrVersions,v=e.make,b=e.model,y=e.duration,w=e.id,O=e.queryTrimLevel,k=e.queryCategory,S=e.trimLevelEquipment,A=e.ssrOptions,P=e.ssrInsurance,L=e.mileage,V=e.ssrImage,R=e.step,B=e.fuelTypes,F=e.transmissionTypes,q=e.forceStartConfigureVersion;e.carFilterState,e.initialFilter;
1var z=(0,j.qE)().configuration,H=(0,s.useState)({}),_=H[0],Y=H[1],W=(0,s.useState)(!1),J=W[0],U=W[1],Z=(0,s.useState)(null),G=Z[0],K=Z[1],$=I(!1),X=(0,a.A)($,2),Q=X[0],ee=X[1],en=(0,s.useState)(!1),et=en[0],er=en[1],ei=(0,s.useState)(!1),ea=ei[0],eo=ei[1],ec=(0,s.useState)(!1),es=ec[0],el=ec[1],eu=(0,ev.Bd)("configurator").t,ed=(0,na.gK)(),ep=ed.setShowHeader,ef=ed.setShowFooter,eg=function(e,n){Y(nT(nT({},_),{},(0,r.A)({},e,n)))},eh=function(e){return!0===_[e]},eb=(0,g.B)(),ey=(0,s.useContext)(f.A),ek=(0,E.A)(),eS=(0,D.A)(ek.breakpoints.up("md"),{noSsr:!1}),eC=(0,l.useRouter)(),eA=C({make:v,model:b,duration:y,queryTrimLevel:O,queryCategory:k,ssrOptions:A,mileage:L,step:R,id:w,ssrVersions:h,fuelTypes:B,transmissionTypes:F,ssrImage:V,setOptionLabels:eb.setOptionLabels}),eP=eA.currentStep,eL=eA.setCurrentStep,eT=eA.loading,eI=eA.versions,eD=eA.trimLevel,eN=eA.setTrimLevel,eM=eA.calculating,eR=eA.selectedVersion,eB=eA.setSelectedVersion,eF=eA.receiptTotal,ez=eA.setReceiptTotal,eH=eA.calculationTotal,e_=eA.configuratorState,eY=eA.configuratorImages,eW=eA.optionsToBeDecided,eJ=eA.optionDecisions,eU=eA.toggleOption,eZ=eA.toggleDecideOption,eG=eA.requestChangeRef,eK=eA.applyChange,e$=eA.mileagePerYear,eX=eA.setMileagePerYear,eQ=eA.leaseDuration,e0=eA.setLeaseDuration,e1=eA.configuratorRequest,e2=eA.configuratorRef,e6=eA.configuratorUpdated,e3=eA.calculationRef,e4=eA.saveCalculation,e8=eA.setConfiguratorRequest,e7=eA.image,no=eA.carImages,nc=eA.carCategory,ns=eA.carCategories,nl=eA.hasNonAppearanceOptions,nu=eA.vehicleUnavailable,nd=eA.setVehicleUnavailable,np=eA.campaignConfiguration,nf=eA.navigateToState,ng=x({category:nc,currentStep:eP,hasNonAppearanceOptions:nl}),nm=ng.steps,nh=ng.nextStep,nv=ng.previousStep,nx=ng.isNextStepVisible,nb=T(e1,e2,e8,P,eR,e3),ny=nb.insurancePackage,nj=nb.updateInsurancePackage,nw=nb.insuranceOptions,nO=nb.toggleInsuranceOption,nS=nb.insuranceEnabled,nC=nb.toggleInsuranceEnabled;(0,s.useEffect)(function(){if(q){if(nc===d.CarCategory.newcar)return void eL(m.c.Appearance);eL(m.c.Subscription)}},[q,nl]);var nA=function(){var e=eC.pathname,n=eC.query,t=e.replace("[...slug]",
1n.slug.join("/")),r=new URLSearchParams({trimLevel:eD||"",id:eR?eR.id:"",duration:eQ,mileage:e$||z.kmranges.max,options:e1&&e1.options.length>0?JSON.stringify(e1.options.map(function(e){return e.id})):""});return"".concat(window.location.origin).concat(ey.basePath||"").concat(t,"?").concat(r)};(0,s.useEffect)(function(){0!==window.scrollY&&window.scrollTo(0,0),ep(!0),ef(!0)},[eP]),(0,s.useEffect)(function(){eD&&(!eR||e3.current)&&(eR?e9(nT(nT({},eR),{},{leasePrice:e3.current.leasePrice}),eP):e9(eI.find(function(e){return e.trimLevel===eD}),eP))},[eR,eP,eD]);var nP=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e||eh(eP)?(U(!1),K(null),nf(nh)):(U(!0),G&&Object.keys(G).length>0&&G[Object.keys(G)[0]].scroll())},nV=(0,s.useCallback)(function(){nf(m.c.Confirmation)},[nf]),nM=(0,s.useCallback)(function(){eC.back()},[nv,eC.query,eP]);(0,s.useCallback)(function(e){eb.authToken&&eL(e)},[eb.authToken]),(0,s.useEffect)(function(){(0,ne.kN)(eI[0],eC.asPath)},[]);var nR=(0,s.useCallback)((0,i.A)(c().mark(function e(){var n,t,r;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=nD.LOA_API_KEY,t={order:{calculation_id:e3.current.id,share_link:window.location.href,authToken:eb.authToken},meta:[],session_id:"dummydata",origin:"desktop",referer:"none"},e.next=4,fetch(nD.LOA_FORM_POST_URL,{method:"POST",body:JSON.stringify(t),headers:{"LOA-Api-Key":n,"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}});case 4:return r=e.sent,nD.MY_JUSTLEASE_URL&&(window.location.href=nD.MY_JUSTLEASE_URL),el(!1),e.abrupt("return",r);case 8:case"end":return e.stop()}},e)})),[e3.current,eb.authToken]),nB=(n=(0,i.A)(c().mark(function e(){return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:eb.authToken&&eP===m.c.Subscription?eo(function(e){return!e}):nP();case 1:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)}),nF=nI.includes(eP)?eF:eH,nq=!nE.includes(eP),nz=(0,s.useCallback)(function(){nd(!1)},[]),nH=(0,s.useMemo)(function(){return eI.filter(function(e){return nc===e.carCategory})},[eI,nc]),n_=(0,em.jsx)(nL,{mobile:eS,max:nm.length,value:nm.indexOf(eP)+1,currentStep:eP,carStepModel:nc});return(0,em.jsxs)(em.Fragment,{children:[(0,em.jsx)(N.A,{open:et,onClose:function(){er(!1)},children:et&&(0,em.jsx)(e5,{image:e7,make:v,model:b,link:nA()})}),nu&&(0,em.jsxs)(nr.A,{portalSelector:"#portals",open:!0,onClose:nz,children:[(0,em.jsx)(ew.wt,{children:eu("vehicleUnavailable.title")}),(0,em.jsx)(nr.A.Body,{children:eu("vehicleUnavailable.description")}),(0,em.jsx)(ew.NS,{onConfirm:nz})]}),eb.authToken&&(0,em.jsx)(ex,{leaseDuration:eQ,mileagePerYear:e$,insurancePackage:ny,insuranceOptions:nw,trimLevel:eD,open:ea,onClose:function(){eo(!1),el(!1)},onSave:nR,editMode:eb,leaveEditModal:es,configuratorState:e_}),(0,em.jsx)(eO,{optionDecisions:eJ,optionsToBeDecided:eW,toggleDecideOption:eZ,applyChange:eK}),(0,em.jsx)(eq,{anchor:eS?"right":"bottom",open:Q,onClose:ee,closeReceipt:ee,children:(0,em.jsx)(ni.A,{make:v,model:b,image:(null==eY||null==(t=eY[0])?void 0:t.url)||e7,totalLeasePrice:nF,trimLevel:eD,calculationRef:e3,selectedVersion:eR,configuratorState:e_,total:nF,insuranceEnabled:nS,insurancePackage:ny,insuranceOptions:nw,leaseDuration:eQ,mileagePerYear:e$,navigateToState:nf})}),nq&&(0,em.jsx)(eV,{onBack:nM,vehicleImage:eY?null==(o=eY[0])?void 0:o.url:null==(u=no[0])?void 0:u.url,children:(0,em.jsx)(ej.js,{max:nm.length,value:nm.indexOf(eP)+1,icon:"coupe",menu:eS,menuComp:n_,iconToRight:!0})}),nq&&(0,em.jsxs)(em.Fragment,{children:[eP===m.c.Form&&!eS&&(0,em.jsx)(ni.A,{make:v,model:b,image:(null==eY||null==(p=eY[0])?void 0:p.url)||e7,totalLeasePrice:nF,trimLevel:eD,calculationRef:e3,selectedVersion:eR,configuratorState:e_,total:nF,insuranceEnabled:nS,insurancePackage:ny,insuranceOptions:nw,leaseDuration:eQ,mileagePerYear:e$,navigateToState:nf,mobile:!0}),(0,em.jsx)(nN,{images:eP===m.c.Form?[]:eY||no,onBack:nM,title:eu("".concat((0,m.t)(eP),".title"),{make:v,model:b,context:nc}),text:eu("".concat(null==eP?void 0:eP.toLowerCase(),".description"),{context:nc,make:v,model:b,defaultValue:""}),fixedBox:eP===m.c.Subscription,overrideMobile:[m.c.TrimLevel].includes(eP),currentStep:eP,children:eP===m.c.Subscription&&(0,em.jsx)(nk,{items:eR,calculating:nF,selectedOptions:null==e_?void 0:e_.selectedOptions,defaultOptions:"occasion"===eR.car
1Category?null==e_?void 0:e_.stockOptions:S[eD]})})]}),(0,em.jsx)(nn,{children:(0,em.jsxs)(nt,{children:[eP===m.c.Category&&(0,em.jsx)(M.Wh,{make:v,model:b,versions:eI,carImages:no,carCategories:ns}),eP===m.c.TrimLevel&&(0,em.jsx)(M.YN,{trimLevel:eD,trimLevelEquipment:S,make:v,model:b,setTrimLevel:eN,image:e7,versions:nH,setReceiptTotal:ez,selectedVersion:eR,carImages:eY||no,setSelectedVersion:eB,updateStepValid:eg}),eP===m.c.Motor&&(0,em.jsx)(M.lJ,{versions:nH,carImages:eY||no,image:e7,trimLevel:eD,setReceiptTotal:ez,selectedVersion:eR,setSelectedVersion:eB,updateStepValid:eg}),eP===m.c.Appearance&&(0,em.jsx)(M.gv,{selectedVersion:eR,configuratorState:e_,configuratorImages:eY,configuratorRequest:e1,requestChangeRef:eG,optionsToBeDecided:eW,optionDecisions:eJ,toggleOption:eU,toggleDecideOption:eZ,applyChange:eK,make:v,model:b,configuratorUpdated:e6,updateStepValid:eg,isStepValid:eh,setValidationErrors:K,validationErrors:G,stepDirty:J}),eP===m.c.Options&&(0,em.jsx)(M.We,{selectedVersion:eR,campaignConfiguration:np,configuratorState:e_,trimLevelEquipment:S,toggleOption:eU,applyChange:eK,updateStepValid:eg,stepValid:_}),eP===m.c.Subscription&&(0,em.jsx)(M.p5,{selectedVersion:eR,make:v,mileagePerYear:e$,setMileagePerYear:eX,leaseDuration:eQ,setLeaseDuration:e0,insuranceEnabled:nS,toggleInsuranceEnabled:nC,insurancePackage:ny,updateInsurancePackage:nj,insuranceOptions:nw,toggleInsuranceOption:nO,updateStepValid:eg,isStepValid:eh,setValidationErrors:K,validationErrors:G,stepDirty:J,calculationRef:e3}),eP===m.c.Form&&(0,em.jsx)(M.Az,{make:v,model:b,trimLevel:eD,selectedVersion:eR,leaseDuration:eQ,insurancePackage:ny,insuranceEnabled:nS,insuranceOptions:nw,mileagePerYear:e$,configuratorState:e_,configuratorImages:eY,calculationTotal:eH,calculationRef:e3,saveCalculation:e4,campaignConfiguration:np,getUrlParams:nA,navigateToState:nf,submitSucceeded:nV})]})}),nx&&(0,em.jsx)(eE,{loading:eT,step:eP,calculating:eM,nextStepOnClick:nB,editMode:!!eb.authToken,receiptOnClick:ee,receiptTotal:nF})]})};var nR=t(96027),nB=t(70434),nF=t(10494);function nq(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,r)}return t}function nz(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?nq(Object(t),!0).forEach(function(n){(0,r.A)(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nq(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var nH=!0;let n_=function(e){var n=e.make,t=e.model,r=e.ssrImage,i=e.queryTrimLevel,a=e.queryCategory,o=e.step,c=e.id,s=e.mileage,l=e.duration,u=e.ssrVersions,d=e.pageData,p=e.confirmationPageData,f=u.find(function(e){return e.carCategory===a});!f&&u.length>0&&(f=u[0]);var h=(0,ev.Bd)("configurator"),v=h.t,x=h.i18n,b=nz({},(0,nF.t)(d));return b.make=n,b.model=t,(0,em.jsx)(ej.xH,{tokens:b,locale:"nl",children:(0,em.jsx)(na.UY,{layout:d,children:(0,em.jsx)(g.L,{children:(0,em.jsx)(y.fJ,{make:n,model:t,trimLevel:i,carCategory:a,step:o,version:c&&u.find(function(e){return e.id===c}),defaultVersion:f,insurance:nB.c.insurance,selectCategory:nB.c.selectCategory,campaigns:nB.c.campaigns,actions:nB.c.actions,children:(0,em.jsx)(y.Ay.Consumer,{children:function(i){var a,o,f=i.pageTitle,g=i.step;return(0,em.jsxs)(em.Fragment,{children:[(0,em.jsx)(nR.A,{pageTitle:f,description:v(["description.".concat("".concat(n," ").concat(t)),"description.regular_model"],{model:t,mileagePerYear:null==s?void 0:s.toLocaleString(x.language),duration:l}),version:c&&u.find(function(e){return e.id===c})||u[0],image:r}),[m.c.Category,m.c.SelectStockCar].includes(g)&&(0,em.jsx)(ej._g,{blocks:(null==(a=d.page.blocks)?void 0:a.map(function(e){return nz(nz({},e),{},{page:"[...slug]"})}))||[]}),[m.c.Confirmation].includes(g)&&(0,em.jsx)(ej._g,{blocks:(null==(o=p.page.blocks)?void 0:o.map(function(e){return nz(nz({},e),{},{page:"[...slug]"})}))||[]}),![m.c.Confirmation].includes(g)&&(0,em.jsx)(nM,nz({},e))]})}})})})})})}}},e=>{e.O(0,[486,610,791,636,593,792],()=>e(e.s=27565)),_N_E=e.O()}]);

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.