1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5599],{15599:(e,a,t)=>{t.d(a,{A:()=>S});var r=t(6029),s=t(79002),i=t.n(s),l=t(55729),d=t(93521),n=t(21927),c=t(22526),o=t(24694),x=t(98137),h=t(62563);let f=e=>{let{children:a,content:t,isLight:s=!1,zIndex:l,...d}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.Ay,{zIndex:l||x.fo.popover,content:t,...d,theme:s?"light":"dark",children:a}),(0,r.jsx)(i(),{id:"92627cc19f2dec96",children:'.tippy-box[data-theme~="light"]{background-color:var(--white);color:var(--black);border:var(--border);box-shadow:0 1px 4px 0 rgba(0,0,0,.08)}.tippy-box[data-theme~="light"] .tippy-arrow{color:var(--white)}.tippy-box[data-theme~="dark"]{background-color:var(--clr-tertiary-2);color:var(--black);border:none;box-shadow:none}.tippy-box[data-theme~="dark"] .tippy-arrow{color:var(--clr-tertiary-2)}'})]})};t(94882);var p=t(70817);let m=e=>{let{style:a,handleRef:t,...s}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{ref:t,...s,style:{...a},className:"jsx-90a78133c7427ec9 "+(s&&null!=s.className&&s.className||"container")}),(0,r.jsx)(i(),{id:"90a78133c7427ec9",children:".container.jsx-90a78133c7427ec9{width:25px;height:25px;top:-5px;z-index:var(--zindex-sticky);background:var(--white);border:1.5px solid var(--black);border-radius:var(--rd-round);cursor:pointer}"})]})},j=()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"jsx-c0b75fa754d0b28 container"}),(0,r.jsx)(i(),{id:"c0b75fa754d0b28",children:".container.jsx-c0b75fa754d0b28{background-color:var(--white);height:8px;border:1px solid var(--clr-tertiary-1);border-radius:var(--rd-6);width:calc(100% + 22px)}"})]}),u=e=>{let{style:a}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{style:{...a},className:"jsx-7fc769e86fe973eb container"}),(0,r.jsx)(i(),{id:"7fc769e86fe973eb",children:".container.jsx-7fc769e86fe973eb{position:absolute;height:5px;top:20px;width:1px;background:#a2a2a2}"})]})},g=e=>{let{min:a,max:t,pitPoints:s,values:l,onChange:d,onValuesUpdated:n,snap:c,snapPoints:o,pitComponent:x,customBg:h,customHandle:f}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.A,{min:a,max:t,background:h||j,handle:f||m,pitComponent:x||u,pitPoints:s,values:l,onChange:d,onValuesUpdated:n,snap:c,snapPoints:o}),(0,r.jsx)(i(),{id:"9d3ae8d0b67e0301",children:".DefaultProgressBar__vertical{width:24px;height:100%}.DefaultProgressBar_progressBar{background-color:var(--clr-tertiary-1);position:absolute}.DefaultProgressBar_progressBar__vertical{height:100%;width:24px}.DefaultProgressBar_background__vertical{height:100%;top:0px;width:15px}.DefaultProgressBar_background__horizontal{height:13px;top:0px}.rheostat{position:relative;overflow:visible}@media(min-width:1600px){.autoAdjustVerticalPosition{top:12px}}.rheostat__vertical{height:100%}.handleContainer{height:15px;top:-2px;left:-2px;bottom:4px;width:100%;position:absolute}"})]})},v=e=>{let{min:a,max:t,legend:s,items:d,position:n,setPosition:c,setHasAtLeastOneValueChanged:o}=e,[x,h]=(0,l.useState)(n);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"jsx-25a27a32a4312f6d container",children:[(0,r.jsx)("div",{className:"jsx-25a27a32a4312f6d legend-container",children:(0,r.jsx)("p",{className:"jsx-25a27a32a4312f6d",children:s})}),(0,r.jsx)("div",{className:"jsx-25a27a32a4312f6d slider-and-positions-container",children:(0,r.jsx)("div",{className:"jsx-25a27a32a4312f6d slider-container",children:(0,r.jsx)(g,{min:a,max:t,values:[n],snap:!0,onChange:e=>{let{values:a}=e;return(e=>{null==o||o(!0),c(e),h(e)})(a[0])},onValuesUpdated:e=>{let{values:a}=e;return(e=>{x!==e&&h(e)})(a[0])},customBg:()=>(0,r.jsx)("div",{className:"jsx-25a27a32a4312f6d bg"}),customHandle:e=>{let{handleRef:a,...t}=e;return(0,r.jsx)("div",{ref:a,...t,className:"jsx-25a27a32a4312f6d "+(t&&null!=t.className&&t.className||"handle")})},pitPoints:d.map((e,a)=>a),pitComponent:e=>{let{style:a,children:t}=e;return(0,r.jsx)("div",{style:{...a},className:"jsx-25a27a32a4312f6d "+"pit ".concat(t>x?"pit-unreached":""),children:(0,r.jsx)("p",{className:"jsx-25a27a32a4312f6d pit-legend",children:d[t]})})}})})})]}),(0,r.jsx)(i(),{id:"25a27a32a4312f6d",children:'.container.jsx-25a27a32a4312f6d{--multislider-outline:8px;--multislider-bar-height:14px;--multislider-handle-width:24px;--multislider-pit-width:8px}.legend-container.jsx-25a27a32a4312f6d{text-align:left;margin-bottom:var(--space-4)}.slider-container.jsx-25a27a32a4312f6d{margin:0 var(--multislider-outline)}.bg.jsx-25a27a32a4312f6d{height:var(--multislider-bar-height);border-radius:var(--rd-2);background:var(--white);margin:0 calc(-1*var(--multislider-outline))}.slider-container.jsx-25a27a32a4312f6d .handleContainer{top:0;left:0;height:var(--multislider-bar-height)}.handle.jsx-25a27a32a4312f6d{width:var(--multislider-handle-width);height:var(--multislider-handle-width);margin-top:calc((var(--multislider-bar-height)/2) - (var(--multislider-handle-width)/2));margin-left:calc(-1*(var(--multislider-handle-width)/2));z-index:1;background:var(--clr-tertiary-1);border:3px solid var(--white);border-radius:var(--rd-round);cursor:pointer}.slider-container.jsx-25a27a32a4312f6d .DefaultProgressBar_background__horizontal{margin:0 calc(-1*var(--multislider-outline));height:var(--multislider-bar-height);border-top-left-radius:var(--rd-2);border-bottom-left-radius:var(--rd-2)}.pit.jsx-25a27a32a4312f6d{min-width:0;max-width:none}.pit.jsx-25a27a32a4312f6d:before{content:"";position:absolute;top:calc(-1*(var(--multislider-bar-height)/2 + var(--multislider-pit-width)/2));left:calc(-1*(var(--multislider-pit-width)/2));display:block;height:var(--multislider-pit-width);width:var(--multislider-pit-width);border-radius:var(--rd-round);background:var(--white)}.pit-unreached.jsx-25a27a32a4312f6d:before{background:var(--clr-tertiary-1)}.pit-legend.jsx-25a27a32a4312f6d{--multislider-legend-width:80px;margin-top:var(--space-3);display:block;margin-left:calc(-1*(var(--multislider-legend-width)/2));width:var(--multislider-legend-width);text-align:center}@media(max-width:800px){.pit-legend.jsx-25a27a32a4312f6d{--multislider-legend-width:60px;font-size:var(--font-size-1)}}'})]})};var b=t(32986),w=t(35127),N=t(92275);let y=e=>{let{image:a,value:t,resultLegend:s="",numberLegend:l,description:n,ctaLabel:o,ctaLink:x,ctaText:h,context:f=c.L5.SHOP}=e,p=(e,a,t)=>"span"===e?t.replace("%LEGEND%",s):null;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"jsx-36d3f75a66356360 container",children:[(0,r.jsxs)("div",{className:"jsx-36d3f75a66356360 savings",children:[(0,r.jsxs)("div",{className:"jsx-36d3f75a66356360 savings-amount",children:[(0,r.jsx)(d.RichText,{render:l,htmlSerializer:p}),(0,r.jsxs)("div",{className:"jsx-36d3f75a66356360 savings-text",children:[(0,r.jsx)("div",{className:"jsx-36d3f75a66356360 illu-text",children:(0,r.jsx)(N.A,{src:"/images/text-mvnt.svg",height:45,width:25})}),(0,r.jsx)("span",{className:"jsx-36d3f75a66356360 amount",children:t}),(0,r.jsx)("div",{className:"jsx-36d3f75a66356360 illu-text",children:(0,r.jsx)(N.A,{src:"/images/heart-text.svg",height:45,width:25})})]})]}),(0,r.jsx)("div",{className:"jsx-36d3f75a66356360 img",children:(0,r.jsx)(N.A,{src:a.url,alt:a.alt,height:150,width:150,objectFit:"contain"})})]}),(0,r.jsx)("div",{className:"jsx-36d3f75a66356360 savings-legend",children:(0,r.jsx)(d.RichText,{render:n,htmlSerializer:p})}),(0,r.jsxs)("div",{className:"jsx-36d3f75a66356360 cta",children:[(0,r.jsx)(b.s,{context:f,link:x,children:(0,r.jsx)(w.A,{children:o})}),h&&(0,r.jsx)("div",{className:"jsx-36d3f75a66356360 cta-text",children:(0,r.jsx)("p",{className:"jsx-36d3f75a66356360",children:h})})]})]}),(0,r.jsx)(i(),{id:"36d3f75a66356360",children:".container.jsx-36d3f75a66356360{display:flex;align-items:center;flex-direction:column}.savings.jsx-36d3f75a66356360{display:flex;align-items:end;margin-bottom:var(--space-4)}.savings-amount.jsx-36d3f75a66356360{display:flex;flex-direction:column;max-width:210px}.amount.jsx-36d3f75a66356360{font-family:var(--font-family-1);font-size:var(--font-size-6);margin:0 var(--space-2)}.savings-text.jsx-36d3f75a66356360{display:flex;justify-content:center;align-items:center;margin-top:var(--space-3)}.savings-legend.jsx-36d3f75a66356360{max-width:360px}.illu-text.jsx-36d3f75a66356360{width:20px}.img.jsx-36d3f75a66356360{max-width:120px}.cta.jsx-36d3f75a66356360{margin-top:var(--space-4)}.cta-text.jsx-36d3f75a66356360>*{margin-top:var(--space-1);font-size:var(--font-size-1)}"})]})},k=e=>{let{calculatorValues:a,legendValues:t,secondSliderText:s,firstSliderText:l,firstSliderValues:d,secondSliderValues:n}=e;return a?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"jsx-dc19cbf696c6135d calculator-cheatsheet",children:(0,r.jsxs)("table",{className:"jsx-dc19cbf696c6135d",children:[(0,r.jsxs)("tr",{className:"jsx-dc19cbf696c6135d",children:[(0,r.jsxs)("th",{className:"jsx-dc19cbf696c6135d",children:[s," â¡ï¸",(0,r.jsx)("br",{className:"jsx-dc19cbf696c6135d"}),l," â¬ï¸"]}),null==n?void 0:n.map((e,a)=>(0,r.jsx)("th",{className:"jsx-dc19cbf696c6135d",children:e},a))]}),a.map((e,a)=>(0,r.jsxs)("tr",{className:"jsx-dc19cbf696c6135d",children:[(0,r.jsx)("th",{className:"jsx-dc19cbf696c6135d",children:(null==d?void 0:d.length)&&d[a]}),e.map((e,s)=>(0,r.jsxs)("td",{className:"jsx-dc19cbf696c6135d",children:[e," /"," ",t&&t[a][s]]},s))]},a))]})}),(0,r.jsx)(i(),{id:"dc19cbf696c6135d",children:".calculator-cheatsheet.jsx-dc19cbf696c6135d{margin-bottom:var(--space-6)}.calculator-cheatsheet.jsx-dc19cbf696c6135d table.jsx-dc19cbf696c6135d{border-collapse:collapse}.calculator-cheatsheet.jsx-dc19cbf696c6135d table.jsx-dc19cbf696c6135d th.jsx-dc19cbf696c6135d,.calculator-cheatsheet.jsx-dc19cbf696c6135d table.jsx-dc19cbf696c6135d td.jsx-dc19cbf696c6135d{border:1px solid black;padding:var(--space-1)}"})]}):null},S=e=>{var a;let{primary:t,withCheatSheet:s=!1,context:x=c.L5.SHOP,isFrequencyVisible:h}=e,[p,m]=(0,l.useState)(s),[j,u]=(0,l.useState)(""),[g,b]=(0,l.useState)(""),[w,N]=(0,l.useState)(t.firstSliderSelectedOption),[S,_]=(0,l.useState)(t.secondSliderSelectedOption),z=null,T=null,P=null,A=null;(0,l.useEffect)(()=>{window.sessionStorage.getItem("LF_CALCULATOR_CHEATSHEET")&&m(!0)},[]),(0,l.useEffect)(()=>{let e=null==z?void 0:z[w][S],a=null==T?void 0:T[w][S];e&&u(e),a&&b(a)},[w,S]);try{if(z=JSON.parse(t.calculatorValues),T=t.legendValues&&JSON.parse(t.legendValues),P=t.firstSliderValues.split("|"),A=t.secondSliderValues.split("|"),!z||!z.length)throw Error("No values found");if(!P||!P.length||P.length!==z.length)throw Error("The first slider should have the same number of entries as the number of line in the calculatorValues array.");if(!z.every(e=>e.length===(null==A?void 0:A.length)))throw Error("The second slider should have the same number of entries as the number of options for each line of the calculatorValues array.")}catch(e){return console.error("Cannot build the calculator:",e),(0,r.jsxs)("p",{children:["Cannot build the calculator. Please check your data.",(0,r.jsx)("br",{}),(0,r.jsx)("i",{children:e.message})]})}let V=e=>[0,e.length-1],[C,E]=V(P),[L,F]=V(A);return(0,r.jsxs)("div",{className:"jsx-69ef86390aabaa5e root",children:[p&&(0,r.jsx)(k,{calculatorValues:z,legendValues:T,firstSliderText:t.firstSliderText,secondSliderText:t.secondSliderText,firstSliderValues:P,secondSliderValues:A}),(0,r.jsxs)("div",{className:"jsx-69ef86390aabaa5e title-container",children:[(0,r.jsx)(d.RichText,{render:t.title}),(null==(a=t.tooltipText)?void 0:a.length)>0&&(0,r.jsx)(f,{content:(0,r.jsx)("div",{className:"jsx-69ef86390aabaa5e popover",children:(0,r.jsx)(d.RichText,{render:t.tooltipText,serializeHyperlink:(0,o.A)(x)})}),children:(0,r.jsx)("div",{className:"jsx-69ef86390aabaa5e tooltip-icon",children:(0,r.jsx)(n.A,{width:22,height:22})})})]}),(0,r.jsxs)("div",{className:"jsx-69ef86390aabaa5e row tw-items-center",children:[(0,r.jsxs)("div",{className:"jsx-69ef86390aabaa5e range tw-h-1/2",children:[(0,r.jsx)(v,{min:C,max:E,legend:t.firstSliderText,items:P,position:w,setPosition:N}),h&&(0,r.jsx)(v,{min:L,max:F,legend:t.secondSliderText,items:A,position:S,setPosition:_})]}),(0,r.jsx)("div",{className:"jsx-69ef86390aabaa5e result",children:(0,r.jsx)(y,{image:t.image,value:j,resultLegend:g,numberLegend:t.initialText,de
1scription:t.totalPriceDescription,ctaLabel:t.ctaLabel,ctaLink:t.ctaLink,ctaText:t.ctaText,context:x})})]}),(0,r.jsx)(i(),{id:"69ef86390aabaa5e",children:".root.jsx-69ef86390aabaa5e{margin-bottom:var(--space-8)}.root.jsx-69ef86390aabaa5e strong{color:var(--clr-secondary-1)}.popover.jsx-69ef86390aabaa5e>p{text-align:center;color:var(--white)}.title-container.jsx-69ef86390aabaa5e{display:flex;flex-direction:row;margin-bottom:var(--space-5)}.popover.jsx-69ef86390aabaa5e p{text-align:center;color:var(--white);font-size:var(--font-size-sm)}.row.jsx-69ef86390aabaa5e{display:flex}.range.jsx-69ef86390aabaa5e{padding:var(--space-6)var(--space-8);background-color:var(--clr-tertiary-2);display:flex;flex-direction:column;justify-content:center;flex:1.5;border-radius:var(--rd-4)}.range.jsx-69ef86390aabaa5e>div:first-child{margin-bottom:80px}.range.jsx-69ef86390aabaa5e>div:last-child{margin-bottom:var(--space-8)}.result.jsx-69ef86390aabaa5e{flex:2;display:flex;flex-direction:column;justify-content:center;text-align:center;padding:var(--space-5)var(--padding-layout-horizontal-base);background-color:var(--white)}.popover.jsx-69ef86390aabaa5e p{color:var(--clr-black);text-align:left}.tooltip-icon.jsx-69ef86390aabaa5e{margin-left:var(--space-1);margin-top:var(--negative-space-1)}@media(max-width:800px){.row.jsx-69ef86390aabaa5e{flex-direction:column}.result.jsx-69ef86390aabaa5e{align-items:center;flex-direction:row}.range.jsx-69ef86390aabaa5e{padding:var(--space-4)var(--space-5)}.range.jsx-69ef86390aabaa5e>div:first-child{margin-bottom:var(--space-8)}.title-container.jsx-69ef86390aabaa5e h2{all:unset;font-size:var(--font-size-2-5);font-weight:var(--font-weight-bold);font-family:var(--font-family-1)}}"})]})}},24694:(e,a,t)=>{t.d(a,{A:()=>r.A});var r=t(38798)}}]); 2//# sourceMappingURL=5599.cf1dfac2ec1f489a.js.map
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.