1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,6371,471964,207221,212626,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(424534),n=e.i(287671);let s=(0,r.lazy)(()=>e.A(993747).then(e=>({default:e.InputWrapper}))),o=(0,r.lazy)(()=>e.A(534259).then(e=>({default:e.TextAreaWrapper}))),a=(0,r.lazy)(()=>e.A(751043).then(e=>({default:e.CheckboxWrapper}))),l=(0,r.lazy)(()=>e.A(408607).then(e=>({default:e.RadioWrapper}))),c=(0,r.lazy)(()=>e.A(481382).then(e=>({default:e.RadioTilesWrapper}))),u=(0,r.lazy)(()=>e.A(330007).then(e=>({default:e.SelectWrapper}))),d=(0,r.lazy)(()=>e.A(562529).then(e=>({default:e.SubmitWrapper}))),p=(0,r.lazy)(()=>e.A(656933).then(e=>({default:e.AutoCompleteWrapper}))),{useAppForm:m}=(0,i.createFormHook)({fieldComponents:{AutoComplete:p,Checkbox:a,Input:s,Radio:l,RadioTiles:c,Select:u,TextArea:o},formComponents:{Submit:d},fieldContext:n.fieldContext,formContext:n.formContext});function h(){return document.querySelector('[data-has-error="true"]')}function g(){let e=h();e&&(e.scrollIntoView({behavior:"smooth",block:"center"}),e.focus())}e.s(["useTrilogyForm",0,m],471964),e.s([],207221),e.s(["getFirstErrorField",0,h,"scrollToFirstError",0,g],212626);let x=(0,r.createContext)(null);e.s(["SubmitContext",0,x,"SubmitContextProvider",0,function({children:e}){let i=(0,r.useRef)(null),n=(0,r.useRef)(new Map),s=(0,r.useRef)(new Set),[o,a]=(0,r.useState)(!1),[l,c]=(0,r.useState)("Continuer"),[u,d]=(0,r.useState)(0),p=(0,r.useCallback)((e,t)=>{n.current.set(e,t)},[]),m=(0,r.useCallback)(e=>{n.current.delete(e)},[]),f=(0,r.useCallback)(e=>{s.current.add(e),d(s.current.size)},[]),y=(0,r.useCallback)(e=>{s.current.delete(e),d(s.current.size)},[]),T=(0,r.useCallback)(e=>{e?f("manual"):y("manual")},[f,y]),v=u>0,b=(0,r.useCallback)(async()=>{for(let[e,t]of Array.from(n.current.entries()))try{await t()}catch(t){throw console.error(`Error executing queued function ${e}:`,t),t}if(h())throw Error("Validation error")},[]),E=(0,r.useMemo)(()=>({onSubmit:async()=>i.current?(a(!0),await b().then(i.current).catch(()=>{g()}).finally(()=>a(!1))):(console.error("No submit function in context"),Promise.resolve()),get submitHandler(){return i.current},set submitHandler(handler){i.current=handler},isLoading:o,label:l,setLabel:c,addToQueue:p,removeFromQueue:m,isDisabled:v,setIsDisabled:T,addDisableLock:f,removeDisableLock:y}),[o,l,p,m,b,v,T,f,y]);return(0,t.jsx)(x.Provider,{value:E,children:e})},"useSubmitContext",0,function(){return(0,r.useContext)(x)},"useSubmitHandler",0,function(e){let t=(0,r.useContext)(x);return(0,r.useEffect)(()=>(e&&t&&(t.submitHandler=e),()=>{t&&(t.submitHandler=null)}),[e,t]),t},"useSubmitQueue",0,function(e,t){let i=(0,r.useContext)(x);return(0,r.useEffect)(()=>(t&&i&&i.addToQueue(e,t),()=>{i&&i.removeFromQueue(e)}),[e,t,i]),i}],6371)},513110,e=>{"use strict";var t=e.i(271645),r=e.i(314319);e.s(["useErrorModal",0,function(){let e=(0,t.useContext)(r.ErrorModalContext);if(!e)throw Error("useErrorModal must be used within ErrorModalProvider");return e}])},683455,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(285899),n=e.i(858480),s=e.i(513110);e.s(["NoFundingGuard",0,function({children:e}){return!function(){let{addProductsToCartMutation:e,removeProductFromCartMutation:t,setFundingModeMutation:o,addCouponToCartMutation:a,removeCouponFromCartMutation:l}=(0,r.useContext)(n.CartContext),{showErrorModal:c}=(0,s.useErrorModal)(),u=[e,t,o,a,l].find(e=>e.error instanceof i.SwappyFundingUnavailableError)?.error;(0,r.useEffect)(()=>{u&&c("no-funding")},[u,c])}(),(0,t.jsx)(t.Fragment,{children:e})}],683455)},579403,e=>{"use strict";var t=e.i(843476),r=e.i(858480),i=e.i(499329),n=e.i(683455);e.s(["RealCartProvider",0,function({children:e}){return(0,t.jsx)(r.CartProvider,{cartService:i.realCartService,cartType:"real",children:(0,t.jsx)(n.NoFundingGuard,{children:e})})}])},544273,141613,691716,735866,53528,401556,842687,66675,313727,805697,191575,e=>{"use strict";e.s(["Appointment",()=>oL],544273);var t,r,i,n,s,o,a,l,c,u,d,p,m,h,g,x,f,y=e.i(843476),T=e.i(271645),v=e.i(285899),b=e.i(858480);e.i(940804);var E=e.i(110528),C=e.i(556987),j=e.i(729421),I=e.i(935745),_=e.i(741857),S=e.i(901769),A=e.i(455024),L=e.i(281092),F=e.i(935343);function k(e,t){let r=(0,L.toDate)(e,t?.in);if(isNaN(+r))throw RangeError("Invalid time value");let i=t?.format??"extended",n=t?.representation??"complete",s="",o="",a="extended"===i?"-":"";if("time"!==n){let e=(0,F.addLeadingZeros)(r.getDate(),2),t=(0,F.addLeadingZeros)(r.getMonth()+1,2),i=(0,F.addLeadingZeros)(r.getFullYear(),4);s=`${i}${a}${t}${a}${e}`}if("date"!==n){let e=r.getTimezoneOffset();if(0!==e){let t=Math.abs(e),r=(0,F.addLeadingZeros)(Math.trunc(t/60),2),i=(0,F.addLeadingZeros)(t%60,2);o=`${e<0?"+":"-"}${r}:${i}`}else o="Z";let t=(0,F.addLeadingZeros)(r.getHours(),2),n=(0,F.addLeadingZeros)(r.getMinutes(),2),a=(0,F.addLeadingZeros)(r.getSeconds(),2),l=""===s?"":"T",c=[t,n,a].join("extended"===i?":":"");s=`${s}${l}${c}${o}`}return s}var N=e.i(649471),M=e.i(950567);class O{static pickupPointsMapper(e){return e.map(O.pickupPointMapper)}static appointmentsMapper(e){let t=e.map(O.appointmentMapper);return O.groupAppointmentsByWeekAndDay(t)}static groupAppointmentsByWeekAndDay(e){return Array.from(e.reduce((e,t)=>
1{var r;let i,n,s,o,a=new Date(t.slotStart),l=k((0,M.startOfISOWeek)(a),{representation:"date"}),c=k(a,{representation:"date"});e.has(l)||e.set(l,{weekNumber:(0,N.getISOWeek)(a),weekStart:l,weekEnd:k((r={...void 0,weekStartsOn:1},i=(0,A.getDefaultOptions)(),n=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,o=(s=(0,L.toDate)(a,r?.in)).getDay(),s.setDate(s.getDate()+((o<n?-7:0)+6-(o-n))),s.setHours(23,59,59,999),s),{representation:"date"}),days:new Map});let u=e.get(l);return u.days.has(c)||u.days.set(c,{date:c,slots:[]}),u.days.get(c).slots.push(t),e},new Map).values()).map(e=>({...e,days:Array.from(e.days.values()).sort((e,t)=>e.date.localeCompare(t.date))})).sort((e,t)=>e.weekStart.localeCompare(t.weekStart)).map(e=>({...e,days:e.days.map(e=>({...e,slots:e.slots.toSorted((e,t)=>e.slotStart.localeCompare(t.slotStart))}))}))}static pickupPointMapper(e){let t=e.caracteristiques;return{id:O.getSimpleValue(t,"IDENTIFIANT_POINT_DE_RETRAIT")??"",label:O.getSimpleValue(t,"LIBELLE")??"",distance:O.getSimpleValue(t,"DISTANCE")??"0",isDepot:"true"===O.getSimpleValue(t,"EST_UN_DEPOT"),distributionNetwork:O.getSimpleValue(t,"RESEAU_DISTRIBUTION")??"",deliverySectorCode:O.getSimpleValue(t,"CODE_SECTEUR_LIVRAISON")??"",address:O.parseAddress(O.getComposed(t,"ADRESSE")),schedule:O.parseSchedules(O.getComposed(t,"HORAIRES_OUVERTURE")),resourceType:e.typeRessource}}static isSimple(e){return"CARACTERISTIQUE_SIMPLE"===e.type}static isComposed(e){return"CARACTERISTIQUE_COMPOSEE"===e.type}static getSimpleValue(e,t){let r=e.find(e=>O.isSimple(e)&&e.typeCaracteristique===t);return r?.valeur}static getComposed(e,t){return e.find(e=>O.isComposed(e)&&e.typeCaracteristique===t)}static getAllComposed(e,t){return e.filter(e=>O.isComposed(e)&&e.typeCaracteristique===t)}static parseAddress(e){let t=e?.composants??[];return{latitude:O.getSimpleValue(t,"LATITUDE")??"",longitude:O.getSimpleValue(t,"LONGITUDE")??"",zipCode:O.getSimpleValue(t,"CODE_POSTAL")??"",city:O.getSimpleValue(t,"VILLE")??"",streetNumber:O.getSimpleValue(t,"NUMERO_RUE")??"",streetName:O.getSimpleValue(t,"NOM_RUE")??""}}static parseSchedules(e){return e?O.getAllComposed(e.composants,"HORAIRE").map(O.parseDaySchedule):[]}static parseScheduleSlot(e){let t=e.composants;return{openingTime:O.getSimpleValue(t,"HORAIRE_OUVERTURE")??"",closingTime:O.getSimpleValue(t,"HORAIRE_FERMETURE")??""}}static parseDaySchedule(e){let t=e.composants,r=O.getSimpleValue(t,"JOUR")?.toLowerCase()??"",i=O.getComposed(t,"CRENEAUX");return{day:r,slots:i?O.getAllComposed(i.composants,"CRENEAU").map(O.parseScheduleSlot):[]}}static appointmentMapper(e){let t=e.caracteristiques;return{id:O.getSimpleValue(t,"ID_CRENEAU")??"",slotStart:O.getSimpleValue(t,"DEBUT_CRENEAU")??"",slotEnd:O.getSimpleValue(t,"FIN_CRENEAU")??""}}}let R=(0,_.getAppConfig)(),D=new class{url;constructor(e){this.url=e}async getAppointments(e,t){let{identifiantElementPanier:r,identifiantPanier:i}=e,n=await S.apiHttpService.get(`${this.url}/ressources`,{identifiantPanier:i,identifiantElementPanier:r,typeRessource:"RENDEZ_VOUS"},{user:t});return O.appointmentsMapper(n.ressourcesEligibles??[])}}(R.bytelApi.url),w=new class{async getAppointments(e,t){let r=(await D.getAppointments(e,t)).flatMap(e=>e.days).sort((e,t)=>e.date.localeCompare(t.date));if(0===r.length)return[];let i=[];for(let e=0;e<r.length;e+=6){let t=r.slice(e,e+6),n=t[0],s=t[t.length-1];i.push({weekNumber:i.length+1,weekStart:n.date,weekEnd:s.date,days:t})}return i}};var P=e.i(898917),B=e.i(92786),z=e.i(147067);function V(){let{addProductsToCartMutation:e,removeProductFromCartMutation:t,setShippingMutation:r,setFu
1ndingModeMutation:i,setTradeInMutation:n}=(0,T.useContext)(b.CartContext);return e.isPending||t.isPending||r.isPending||i.isPending||n.isPending}var W=e.i(6371);function U({testId:e,className:t,iconName:r,iconOnly:i}){let n=(0,W.useSubmitContext)(),s=V(),o=function(){let{cart:e}=(0,T.useContext)(b.CartContext);return(0,T.useMemo)(()=>e?.hasProductOutOfStock()??!1,[e])}();return n?(0,y.jsx)(B.Button,{testId:e,className:t,variant:z.ButtonVariant.CONVERSION,iconName:r,onClick:()=>n?.onSubmit?.(),loading:n.isLoading||s,disabled:n.isDisabled||o,children:i?void 0:n.label}):null}e.i(207221);var H=e.i(471964),G=e.i(63715),q=e.i(513110);function $({isError:e,refetch:t,enabled:r=!0}){let i=(0,T.useId)(),{showErrorModal:n}=(0,q.useErrorModal)(),s=(0,W.useSubmitContext)();(0,T.useEffect)(()=>{r&&(e?(s?.addDisableLock(i),n("technical-error",{onRetry:t})):s?.removeDisableLock(i))},[e,r,i,t,n,s]),(0,T.useEffect)(()=>()=>{s?.removeDisableLock(i)},[i,s?.removeDisableLock])}var J=e.i(654479),X=e.i(779629);e.s(["ModuleLayout",()=>tT],691716);var Y=e.i(292414),Z=e.i(441432),Q=e.i(163516),K=e.i(586907),ee=e.i(288161),et=((t=et||{}).DEFAULT="DEFAULT",t.FAI="FAI",t.MOBILE="MOBILE",t);let er={DEFAULT:"/partials/checkout/reassurancevide",FAI:"/partials/fai/reassurance",MOBILE:"/partials/mobiles/reassurance"};function ei(){let{cart:e}=(0,T.useContext)(b.CartContext),t="DEFAULT";return e?.getJourneyOfType(v.JourneyType.FAI_ACQUISITION)?t="FAI":(e?.getJourneyOfType(v.JourneyType.MOBILE_ACQUISITION)||e?.getJourneyOfType(v.JourneyType.RENEWAL))&&(t="MOBILE"),(0,y.jsx)(ee.SSIBlock,{container:"div",containerProps:{className:"cart-reinsurance"},url:er[t]})}var en=e.i(233244),en=en,es=e.i(301587),es=es,eo=e.i(848005),eo=eo,ea=e.i(282052),ea=ea,el=e.i(305555),ec=e.i(651508),eu=e.i(943918),ed=e.i(436006);function ep({funding:e}){let t;return e.isType(v.FundingType.YOUNITED)||e.isType(v.FundingType.SWAPPY)?(t=v.FundingType.YOUNITED,(0,y.jsx)(en.default,{children:(0,y.jsxs)(ea.default,{id:"product-detail-funding-legals","data-cy":"funding-legals",children:[(0,y.jsx)(eo.default,{children:(0,y.jsx)(el.Title,{markup:ec.TitleMarkup.H2,level:ec.TitleLevels.SIX,children:"Mentions légales du financement"})}),(0,y.jsxs)(es.default,{children:[(0,y.jsx)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,level:K.TextLevels.ONE,children:"Attention, un crédit coûte de l'argent et doit être remboursé."}),(0,y.jsxs)(Q.Text,{level:K.TextLevels.TWO,children:[(0,y.jsxs)("b",{children:[e.installments??1," mensualités de "]}),(0,y.jsx)(ed.InlinePrice,{amount:e.monthlyAmount,period:"mois",level:K.TextLevels.TWO}),"."," ",(0,y.jsxs)("b",{children:["Montant total dû ",(0,y.jsx)(ed.InlinePrice,{amount:e.totalFinancingCost,level:K.TextLevels.TWO})]})," ","(hors assurance facultative). ",(0,y.jsxs)("b",{children:["TAEG fixe : ",e.APR?.toLocaleString(),"%"]}),". Taux débiteur fixe de ",e.fixedInterestRate?.toLocaleString(),"%."]}),t===v.FundingType.YOUNITED&&(0,y.jsx)(em,{})]})]})})):null}function em(){return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"Younited est agréé en tant qu'établissement de crédit - Prestataire de Services d'Investissement par l'Autorité de Contrôle Prudentiel et de Résolution (ACPR, n° d'agrément : 16488). "}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"Le financement est accordé sous réserve d'acceptation définitive après l'étude de votre dossier. Vous disposez d'un droit de rétractation de 14 jours calendaires révolus à compter de la signature de l'offre de contrat de crédit."}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"Younited : SA à Directoire et Conseil de Surveillance au capital de 2 000 785⬠- Siège social : 21 rue de Châteaudun - 75009 PARIS - RCS de Paris 517 586 376 - Numéro ORIAS 11061269"})]})}let eh="/partials/v3/header/light/needsupport",eg="/partials/v3/footer/light";function ex({className:e="",children:t}){return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(ee.SSIBlock,{url:eh}),(0,y.jsx)("main",{className:`query-container ${e}`,children:t}),(0,y.jsx)(ee.SSIBlock,{url:eg})]})}e.s(["PageHeader",()=>eb],141613);var ef=e.i(64416),ef=ef,ey=e.i(796141),ey=ey,eT=e.i(879252),ef=ef,ey=ey;function ev(){return(0,y.jsxs)(ey.default,{className:"skeleton-stepper",children:[(0,y.jsx)(ef.default,{label:"Chargement..."}),(0,y.jsx)(ef.default,{label:"Chargement..."}),(0,y.jsx)(ef.default,{label:"Chargement..."}),(0,y.jsx)(ef.default,{label:"Chargement..."})]})}function eb({currentModule:e,isLoading:t=!1}){let{cart:r}=(0,T.useContext)(b.CartContext),{effectiveCurrentKey:i,modulesWithStatus:n}=(0,T.useMemo)(()=>{let t=e=>!0!==e.isHidden&&!e.shouldDisableModule?.(r),i=oy.findIndex(t=>t.key===e),n=oy[i]&&t(oy[i])?e:void 0,s=!1,o=oy.map(e=>{if(!t(e))return;let r=e.key===n;return r&&(s=!0),{key:e.path.join("/"),done:!s,label:e.label,current:r}}).filter(e=>void 0!==e);return{effectiveCurrentKey:n,modulesWithStatus:o}},[r,e]);return(0,y.jsx)(Z.Section,{backgroundColor:eT.TrilogyColor.BACKGROUND,children:t||void 0===i?(0,y.jsx)(ev,{}):(0,y.jsx)(ey.default,{children:n.map(({key:e,...t})=>(0,y.jsx)(ef.default,{...t},e))})})}e.i(590279);
1var eE=e.i(508491),eC=e.i(416487),ej=e.i(467955),eI=e.i(618566),e_=e.i(662794),eS=e.i(548233),eA=e.i(41908),eL=e.i(299242),eF=e.i(921046),ek=e.i(522999),eN=e.i(669762),eM=e.i(42),eO=e.i(319359),eR=e.i(496691),eD=e.i(524826),ew=((r={}).ALL="cacheAll",r.PRODUCTS="cacheProducts",r.PRODUCTS_STOCK="cacheProductsStock",r.CMS="cacheCms",r.PRODUCT_DETAIL="cacheProductDetail",r.NUMERIQUES="cacheNumeriques",r.FAI="cacheFai",r),eP=e.i(455205);class eB{static mapResponse(e){return e?(e?.cart_messages?.items??[]).toSorted((e,t)=>null==e.order&&null==t.order?0:null==e.order?1:null==t.order?-1:e.order-t.order).reduce((e,t)=>{var r,i;let n,s,o;return t.title??t.internal_name?(r=t.start_date,i=t.end_date,n=new Date,s=r?new Date(r):void 0,o=i?new Date(i):void 0,s&&Number.isNaN(s.getTime())||o&&Number.isNaN(o.getTime())||s&&n<s||o&&n>o||0||e.push({id:t.id??`${e.length}-${t.title??t.internal_name??"offer"}`,order:t.order??null,iconTrilogy:t.icon_trilogy??null,title:t.title??t.internal_name??"",backgroundColor:t.background_color??null,startDate:t.start_date??null,endD
1ate:t.end_date??null,description:(0,eP.markdownTrilogy)(t.description??""),paymentTiming:t.payment_timing??null,displayMode:t.display_mode??"accordion"}),e):e},[]):[]}}let ez=(0,_.getAppConfig)(),eV=new class{url;constructor(e){this.url=e}async getTicketMessagesByRangeNgAndCommercialSeries(e,t){let r=(0,_.getAppConfig)();return await S.httpService.get(`${this.url}/fai_roc_products`,{},{ttl:Number.parseInt(r.cache.ttl.cms,10),tags:[ew.CMS]}).then(r=>{let i=r.items.find(r=>r.range_ng===e&&r.commercial_series===t);return eB.mapResponse(i)}).catch(()=>[])}}(ez.assets.palpatine.fai??""),eW={[v.PriceTypeEnum.IMMEDIATE]:[],[v.PriceTypeEnum.MONTHLY]:[],[v.PriceTypeEnum.DEFERRED]:[],[v.PriceTypeEnum.OTHER]:[]},eU=new class{mapByPriceType(e){return e.reduce((e,t)=>{switch(t.paymentTiming){case"immediat":e[v.PriceTypeEnum.IMMEDIATE].push(t);break;case"monthly":e[v.PriceTypeEnum.MONTHLY].push(t);break;case"deferred":e[v.PriceTypeEnum.DEFERRED].push(t);break;default:e[v.PriceTypeEnum.OTHER].push(t)}return e},{[v.PriceTypeEnum.IMMEDIATE]:[],[v.PriceTypeEnum.MONTHLY]:[],[v.PriceTypeEnum.DEFERRED]:[],[v.PriceTypeEnum.OTHER]:[]})}async getTicketMessages(e,t){return e&&t?await eV.getTicketMessagesByRangeNgAndCommercialSeries(e,t):[]}async getTicketMessagesByPriceType(e,t){let r=await this.getTicketMessages(e,t);return r.length?this.mapByPriceType(r):eW}};var eH=e.i(329145),eH=eH,eG=e.i(815132),eq=e.i(321170),eq=eq,e$=e.i(886743);function eJ(e){return[...e?.appliedDiscounts??[],...e?.journeys?.flatMap(e=>e.products.flatMap(e=>e.appliedDiscounts))??[]].filter(e=>e.isType(v.DiscountType.COUPON))[0]}function eX({skeleton:e=!1}){let{cart:t,addCouponToCartMutation:r,removeCouponFromCartMutation:i}=(0,T.useContext)(b.CartContext),n=!!t?.getJourneyOfType(v.JourneyType.RENEWAL),s=(0,T.useMemo)(()=>eJ(t),[t]),[o,a]=(0,T.useState)(!!s),l=(0,H.useTrilogyForm)({formId:"coupon",defaultValues:{coupon:s?.code??""},onSubmit:async({value:e,formApi:t})=>{await r.mutateAsync({code:e.coupon}).then(()=>{(0,e$.sendTracking)(n,{action:"Clic_affichage",category:"Code_promo",name:`Code_promo_ajoute_${e.coupon}`})}).catch(()=>{t.setFieldMeta("coupon",e=>({...e,errorMap:{onSubmit:"Ce code promo est incorrect. Merci de le vérifier et d'essayer à nouveau."}}))})}}),c=e=>{i.mutate({code:e}),l.resetField("coupon")},u=(0,T.useMemo)(()=>e||r.isPending||i.isPending,[e,r.isPending,i.isPending]);return(0,y.jsxs)(j.FlexItem,{children:[(0,y.jsx)(eq.default,{fullWidth:!0,className:"is-marginless",label:"Vous avez un code promo ?",checked:o,onClick:e=>{a(e.switchState),!e.switchState&&s&&c(s.code)}}),o&&(0,y.jsx)("form",{onSubmit:e=>{e.preventDefault(),l.handleSubmit()},children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:3,children:[(0,y.jsx)(l.AppField,{name:"coupon",validators:{onSubmit:({value:e})=>e.length>0?void 0:"Veuillez entrer un code promo"},children:e=>{var t;return(0,y.jsx)(e.Input,{label:"Renseignez votre code promo",help:(t=e.state.value,s?`F\xe9licitations ! Votre code promo a \xe9t\xe9 appliqu\xe9 avec une remise de ${"%"===s.unit?s.percentage:s.amount}${s.unit}.`:t.length>0?"Merci de cliquer sur 'Appliquer' pour utiliser votre code promo.":void 0),status:s?eG.InputStatus.SUCCESS:void 0,disabled:u||!!s})}}),s?(0,y.jsx)(B.Button,{testId:"remove-button",type:"button",variant:z.ButtonVariant.SECONDARY,loading:u,fullwidth:!0,onClick:()=>c(s.code),children:"Supprimer le code promo"}):(0,y.jsx)(B.Button,{testId:"apply-button",variant:z.ButtonVariant.SECONDARY,type:"submit",loading:u,fullwidth:!0,children:"Appliquer le code promo"})]})}),(0,y.jsx)(eL.Divider,{})]})}function eY(){let{cart:e}=(0,T.useContext)(b.CartContext),t=(0,T.useMemo)(()=>eJ(e),[e]);return t?(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(eH.default,{description:(0,y.jsxs)(Q.Text,{children:["Félicitations ! Votre code promo a été appliqué avec succès."," ",(0,y.jsxs)(Q.Text,{markup:K.TextMarkup.SPAN,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:["Remise ","%"===t.unit?t.percentage:t.amount,t.unit]})]})})}):null}var eZ=e.i(207313);function eQ({label:e,priceType:t,totals:r,period:i,children:n,mustDisplay:s=!1,isPriceLoading:o=!1}){let a=Array.isArray(r)?r.find(e=>e.isType(t)):r;if(!(a||s))return null;let l="number"==typeof a?a:a?.priceWithPromotions??0;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:{mobile:I.GapSize.THREE},children:[(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.SPACE_BETWEEN,children:[(0,y.jsx)(el.Title,{level:ec.TitleLevels.SIX,markup:"h3",children:e}),(0,y.jsx)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,level:K.TextLevels.ONE,children:(0,y.jsx)(ed.InlinePrice,{amount:l,period:i,isLoading:o})})]}),(0,y.jsx)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:{mobile:I.GapSize.TWO},children:n})]}),(0,y.jsx)(eL.Divider,{})]})}function eK(){return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:{mobile:I.GapSize.THREE},children:[(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.SPACE_BETWEEN,children:[(0,y.jsx)(el.Title,{level:ec.TitleLevels.SIX,markup:"h3",className:"skeleton",children:"à augmenter :"}),(0,y.jsx)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,level:K.TextLevels.ONE,children:(0,y.jsx)(ed.InlinePrice,{amount:100,isLoading:!0})})]}),(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:{mobile:I.GapSize.TWO},children:[(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.SPACE_BETWEEN,direction:E.DirectionEnum.ROW,children:[(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,marginless:!0,className:"skeleton",children:"Félix Legrelle"})}),(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,marginless:!0,children:(0,y.jsx)(ed.InlinePrice,{amount:100,isLoading:!0})})})]}),(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.SPACE_BETWEEN,direction:E.DirectionEnum.ROW,children:[(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,marginless:!0,className:"skeleton",children:"Lucas Stoebner"})}),(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,marginless:!0,children:(0,y.jsx)(ed.InlinePrice,{amount:100,isLoading:!0})})})]})]})]}),(0,y.jsx)(eL.Divider,{})]})}var e0=e.i(959248),e1=e.i(555790),e2=e.i(679599);function e3(){let[e,t]=(0,T.useState)(!1);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eS.Box,{children:(0,y.jsx)(eA.BoxContent,{children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,marginless:!0,children:"Chez nous, la transparence est primordiale"}),(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:I.GapSize.FOUR,children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,marginless:!0,children:"Le prix de votre box ne fera l'objet dâaucune indexation les 15 premiers mois, mais pourrait être révisé chaque année par la suite."}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(B.Button,{className:"button-clear link is-size-6",onClick:()=>t(!0),children:"Vous voulez en savoir plus ?"})})]})]})})}),e&&(0,y.jsx)(e5,{onClose:()=>t(!1)})]})}function e5({onClose:e}){return(0,y.jsxs)(e0.Modal,{active:!0,title:"On vous dit tout sur cette révision de prix",onClose:e,children:[(0,y.jsx)(e1.ModalBody,{children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:I.GapSize.FIVE,children:[(0,y.jsx)(e9,{title:"Comment le prix de votre box pourrait-il être révisé ?",content:(0,y.jsxs)(Q.Text,{level:K.TextLevels.TWO,children:["Il pourrait être révisé une fois par an en fonction de l'évolution de l'indice du « coût horaire du travail révisé"," ",(0,y.jsx)(Q.Text,{markup:K.TextMarkup.SPAN,accessibilityLabel:"moins",children:"-"})," ","Tous salariés du secteur Information-Communication » publié par l'Insee."]})}),(0,y.jsx)(e9,{title:"Quand cette révision pourrait-elle intervenir ?",content:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"Le tarif affiché ne changera pas pendant les 15 premiers mois suivant votre souscription. Une révision pourrait ensuite intervenir annuellement si lâindice évolue."}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"Bien sûr, vous serez informé un mois avant l'application de tout nouveau tarif."})]})}),(0,y.jsx)(e9,{title:"Exemple :",content:(0,y.jsxs)(Q.Text,{level:K.TextLevels.TWO,children:["Pour une offre à "," ",(0,y.jsx)(ed.InlinePrice,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_NORMAL,amount:28.99,period:"mois"})," ","pendant 12 mois puis"," ",(0,y.jsx)(ed.InlinePrice,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_NORMAL,amount:35.99,period:"mois"})," :",(0,y.jsx)("br",{}),"si l'indice augmente de 3,3% sur un an, cela correspond à une hausse de"," ",(0,y.jsx)(ed.InlinePrice,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_NORMAL,amount:1.18,period:"mois"}),"appliquée sur le prix de"," ",(0,y.jsx)(ed.InlinePrice,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_NORMAL,amount:35.99,period:"mois"}),"."]})})]})}),(0,y.jsx)(e2.ModalFooter,{children:(0,y.jsx)(B.Button,{variant:z.ButtonVariant.PRIMARY,onClick:e,children:"Fermer"})})]})}function e9({title:e,content:t}){return(0,y.jsxs)("div",{children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:e}),"string"==typeof t?(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:t}):t]})}var e4=e.i(378734),en=en,es=es,eo=eo,ea=ea,eH=eH,e6=e.i(357023);function e8({content:e="",as:t="div",...r}){return(0,y.jsx)(t,{dangerouslySetInnerHTML:{__html:e},...r})}function e7({messages:e}){let t=e.filter(e=>"visible"===e.displayMode),r=e.filter(e=>"visible"!==e.displayMode);return e.length?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.ONE}),(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:I.GapSize.THREE,children:[t.map(e=>(0,y.jsx)(eH.default,{status:function(e){switch(e){case"warning":case"has-background-accent-fade":return e6.StatusState.WARNING;
1case"error":return e6.StatusState.ERROR;case"success":return e6.StatusState.SUCCESS;default:return e6.StatusState.INFO}}(e.backgroundColor),iconName:e.iconTrilogy??ek.IconName.INFOS_CIRCLE,title:e.title,description:e.description&&(0,y.jsx)(e8,{className:"text is-level-2",content:e.description})},e.id)),r.length>0&&(0,y.jsx)(en.default,{children:(0,y.jsx)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:I.GapSize.FOUR,children:r.map(e=>(0,y.jsxs)(ea.default,{id:String(e.id),className:`${e.backgroundColor??"has-background-main-fade"}`,children:[(0,y.jsx)(eo.default,{children:(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,gap:I.GapSize.TWO,direction:E.DirectionEnum.ROW,children:[e.iconTrilogy&&(0,y.jsx)(eF.Icon,{name:e.iconTrilogy,size:eN.IconSize.SMALL,color:eT.TrilogyColor.ACCENT}),(0,y.jsx)(Q.Text,{marginless:!0,level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:e.title})]})}),(0,y.jsx)(es.default,{children:(0,y.jsx)(C.FlexBox,{direction:E.DirectionEnum.ROW,gap:I.GapSize.THREE,children:e.description&&(0,y.jsx)(e8,{className:"text is-level-2",content:e.description})})})]},e.id))})})]})]}):null}var te=e.i(100989),tt=e.i(708594);function tr({isLoading:e,mobileJourney:t,isReadonly:r=!1}){let{setTradeInMutation:i}=(0,T.useContext)(b.CartContext),n=t.tradeIn,s=t.getProductsByType(v.ProductType.TERMINAL)?.[0],o=s?.metadata?.urlKey;if(!(n&&o))return null;let a=n?.bonus,l=Math.abs(n?.price?.basePrice)||0,c=`${tt.paths.phoneDetail(o,t.isType(v.JourneyType.RENEWAL))}?tradeIn=true`;return(0,y.jsx)(eS.Box,{backgroundColor:eT.TrilogyColor.NEUTRAL_FADE,shadowless:!0,children:(0,y.jsx)(eA.BoxContent,{children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:{mobile:I.GapSize.TWO},children:[(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.SPACE_BETWEEN,children:[(0,y.jsx)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,level:K.TextLevels.THREE,marginless:!0,children:"REPRISE MOBILE *"}),(0,y.jsx)(ed.InlinePrice,{amount:-(l+a),isLoading:e,level:K.TextLevels.TWO})]}),(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.SPACE_BETWEEN,children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,marginless:!0,children:"Valeur estimée"}),(0,y.jsx)(ed.InlinePrice,{amount:l,isLoading:e,level:K.TextLevels.TWO,typo:[eu.TypographyBold.TEXT_WEIGHT_NORMAL]})]}),a>0&&(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.SPACE_BETWEEN,children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,marginless:!0,children:"Bonus reprise"}),(0,y.jsx)(ed.InlinePrice,{amount:a,isLoading:e,level:K.TextLevels.TWO,typo:[eu.TypographyBold.TEXT_WEIGHT_NORMAL]})]}),r&&(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.SPACE_BETWEEN,children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:(0,y.jsx)(Y.Link,{href:c,children:"Modifier"})}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:(0,y.jsx)(te.ButtonClear,{onClick:()=>{i.mutate({journey:t.type,partnerId:null})},children:"Supprimer"})})]})]})})})}let ti=new Set([v.FundingType.SWAPPY,v.FundingType.YOUNITED,v.FundingType.EDP]);function tn(){let{cart:e}=(0,T.useContext)(b.CartContext),t=e?.journeys.flatMap(e=>e.products),r=t?.filter(e=>!e.isType(v.ProductType.FAI_EQUIPMENT))??[],i=ti.has(e?.funding?.type),n=e?.funding?.type===v.FundingType.EDP,s=r.filter(e=>e.price.isType(v.PriceTypeEnum.MONTHLY)),o=s.some(e=>e.isType(v.ProductType.MAIN_MOBILE_OFFER));return{cart:e,cartProducts:r,hasFunding:i,payMonthlyProducts:s,isEdp:n,monthlyPriceWithoutFunding:t?.filter(e=>e.price.isType(v.PriceTypeEnum.MONTHLY)).reduce((e,t)=>e+t.price.priceWithPromotions,0)??0,hasPlanInCart:o}}var ts=e.i(223664),to=((i={}).DEFAULT="default",i.PREMIUM="plan_premium",i.PREMIUM_SELECTION="plan_premium_selection",i.PREMIUM_PRO="plan_pro_premium",i.PREMIUM_RENEWAL="plan_premium_renew",i.PREMIUM_ENTRY="plan_premium_entry",i.PREMIUM_MULTILIGNE="plan_premium_multiligne",i.SIMO="plan_simo",i.SIMO_SELECTION="plan_simo_selection",i.SIMO_ENTRY="plan_simo_entry",i.SIMO_MULTILIGNE="plan_simo_multiligne",i.SIMO_PRO="plan_pro_simo",i.SOWO="plan_sowo",i.SOWO_PRO="plan_pro_sowo",i.SOWO_RENEWAL="plan_sowo_renew",i.SOWO_SPECIALS="plan_sowo_specials",i.IDEO="plan_ideo",i.IDEO_PRO="plan_ideo_pro",i.FAIM="faim",i.FAIM_PREMIUM="faim_premium",i.PREMIUM_PRO_SELECTION="plan_pro_premium_selection",i.SIMO_PRO_SELECTION="plan_pro_simo_selection",i.FAI="fai",i.FAIM_UNLIMITED="faim_unlimited",i.FAI_26="fai-26",i.FAI_ELIGIBILITE="fai-eligibilite",i.FAI_ESSENTIEL="fai-essentiel",i.FAI_PRO="fai-pro",i.FAI_SERVICE="fai_service",i.OFFRES_AUTRES="offres_autres",i.FAI_BANQUE_WEB="FAI-BANQUE-WEB",i.FAI_SIMO="FAI-SIMO",i.FAI_SIMO_ELIGIBILITE="fai-simo-eligibilite",i.BELOW_THE_LINE_WEB="below_the_line_web",i.FAI_TABLET="fai-tablette",i.FAMILY_WEB="family-web",i.FAI_CONVERGENCE="fai-convergence",i.FAI_PREMIUM="fai-premium",i.FAI_SMART_TV="fai-smart-tv",i.FAI_VIDEOPROJECTOR="fai-videoprojecteur",i.FAI_SMART_MONITOR="fai-smart-monitor",i.FAI_GAMING="fai-gaming",i.FAI_BYOU="fai-byou",i.SS_PREMIUM="FAI-SS-PREMIUM",i.FAI_PUREBYO
1U="fai-purebyou",i.FAI_5GBOX="fai-5gbox",i.FAI_BOX_INTERNET="fai-box-internet",i.FAI_BIG="fai-big",i),ta=((n={}).CLASSIC="classique",n.SMART_CHANGE="swappy",n),tl=((s={}).MULTILINE="MULTILIGNES",s.PORTABILITY="PORTABILITE",s.ZIP_CODE_FIXED_ELIGIBILITY="CODE_POSTAL_ELIGIBILITE_FIXE",s.SALES="SOLDES",s.HOME="FOYER",s.MOBILE="MOBILE",s),tc=((o={}).DEFAULT="",o.WITH_MOBILE="forfait_avec_mobile",o.WITHOUT_MOBILE="forfait_sans_mobile",o.B_YOU="b_you",o);let tu="12782";var td=e.i(266027);function tp({label:e,funding:t,children:r,isPriceLoading:i=!1}){return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:{mobile:I.GapSize.THREE},children:[(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.SPACE_BETWEEN,children:[(0,y.jsx)(el.Title,{level:ec.TitleLevels.SIX,markup:"h3",children:e}),(0,y.jsx)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,level:K.TextLevels.ONE,children:(0,y.jsx)(ed.InlinePrice,{amount:t.monthlyAmount,period:"mois",isLoading:i})})]}),(0,y.jsx)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:{mobile:I.GapSize.TWO},children:r})]}),(0,y.jsx)(eL.Divider,{})]})}function tm({currentModule:e,className:t}){let{cart:r}=(0,T.useContext)(b.CartContext),{cartProducts:i,hasFunding:n,payMonthlyProducts:s,isEdp:o,monthlyPriceWithoutFunding:a,hasPlanInCart:l}=tn(),c=(0,W.useSubmitContext)(),u=V(),d=!r||r?.journeys.flatMap(e=>e.products).length===0,p=i.filter(e=>n&&!o?e.price.isType(v.PriceTypeEnum.IMMEDIATE)&&e.isType(v.ProductType.TERMINAL):e.price.isType(v.PriceTypeEnum.IMMEDIATE)),m=p.filter(e=>!e.isType(v.ProductType.ACCESSORY)),h=p.filter(e=>e.isType(v.ProductType.ACCESSORY)),g=s.filter(e=>!(e.isType(v.ProductType.OPTION)||e.isType(v.ProductType.PARTNER_OPTION))),x=i.filter(e=>e.getCoupons().length>0),f=r?.journeys.filter(e=>!e.isType(v.JourneyType.FAI_ACQUISITION))?.flatMap(e=>e.products)?.filter(e=>e.isType(v.ProductType.OPTION)||e.isType(v.ProductType.PARTNER_OPTION))??[],_=r?.getJourneyOfType(v.JourneyType.FAI_ACQUISITION)?.products.filter(e=>e.isType(v.ProductType.OPTION)||e.isType(v.ProductType.PARTNER_OPTION))??[],S=i.filter(e=>e.price.isType(v.PriceTypeEnum.DEFERRED)),A=r?.getJourneyOfType(v.JourneyType.FAI_ACQUISITION)?.products.find(e=>e.isType(v.ProductType.FAI_EQUIPMENT)),L=r?.getJourneyOfType(v.JourneyType.FAI_ACQUISITION)?.getPrincipalProduct(),{data:F={[v.PriceTypeEnum.IMMEDIATE]:[],[v.PriceTypeEnum.MONTHLY]:[],[v.PriceTypeEnum.DEFERRED]:[],[v.PriceTypeEnum.OTHER]:[]}}=(0,td.useQuery)({queryKey:["ticket-offers",L?.gencode],queryFn:()=>eU.getTicketMessagesByPriceType(L?.metadata?.rangeNg,L?.metadata?.commercialSeries),enabled:!!L?.gencode}),k=r?.journeys.filter(e=>e.isType(v.JourneyType.MOBILE_ACQUISITION)||e.isType(v.JourneyType.RENEWAL)).some(e=>e.isPreorder())??!1;(0,T.useEffect)(()=>{k&&c?.setLabel("Pré-commander")},[k,c]);let N=r?.journeys.flatMap(e=>e.shipping)??[],M=N.filter(e=>e?.price.isType(v.PriceTypeEnum.IMMEDIATE)),O=N.filter(e=>e?.price.isType(v.PriceTypeEnum.DEFERRED)),R=i?.filter(e=>(e.isFunded||e.price.type===v.PriceTypeEnum.IMMEDIATE)&&!e.isType(v.ProductType.TERMINAL)&&!e.isType(v.ProductType.ACCESSORY)),D=i?.filter(e=>(e.isFunded||e.price.type===v.PriceTypeEnum.IMMEDIATE)&&e.isType(v.ProductType.ACCESSORY)),w=r?.getJourneyOfType(v.JourneyType.MOBILE_ACQUISITION)??r?.getJourneyOfType(v.JourneyType.RENEWAL);return(0,y.jsxs)("div",{className:(0,ts.classNames)("cart-ticket",t??""),children:[(0,y.jsx)(eS.Box,{testId:"ticket-box",children:(0,y.jsx)(eA.BoxContent,{children:d?(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,align:e_.Align.CENTER,children:[(0,y.jsx)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:"Votre panier est vide"}),(0,y.jsx)(eF.Icon,{name:ek.IconName.SHOPPING_BAG,size:eN.IconSize.LARGE})]}):(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:I.GapSize.ZERO,children:[(0,y.jsxs)(j.FlexItem,{children:[(0,y.jsx)(el.Title,{level:ec.TitleLevels.THREE,markup:ec.TitleMarkup.H2,children:"Mes achats"}),(0,y.jsx)(eL.Divider,{})]}),(0,y.jsxs)(eQ,{priceType:v.PriceTypeEnum.IMMEDIATE,label:"à payer aujourd'hui",totals:n&&!o?r.funding?.initialDeposit:r?.prices,isPriceLoading:u,children:[m.map(e=>(0,y.jsx)(e4.TicketLine,{label:e.label,price:n&&!o?void 0:e.price.priceWithPromotions,isLoading:u},e.id)),h?.length>0&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.ONE}),(0,y.jsx)(Q.Text,{marginless:!0,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,level:K.TextLevels.TWO,children:"Mes accessoires"}),h.map(e=>(0,y.jsx)(e4.TicketLine,{label:e.label,isLoading:u,price:e.price.priceWithPromotions},e.id)),(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.ONE})]}),x.map(e=>(0,y.jsx)(e4.TicketLine,{label:`Remise sur ${e.label}`,isIncluded:!0,price:-e.getCoupons().reduce((e,t)=>
1e+(t.amount??0),0),isLoading:u},e.id)),(!n||n&&o)&&M.map(e=>(0,y.jsx)(e4.TicketLine,{label:e?.label,price:e?.price.priceWithPromotions??0,isLoading:u},e?.gencode)),w&&(0,y.jsx)(tr,{isLoading:u,mobileJourney:w,isReadonly:"Summary"===e||"CrossSell"===e}),(0,y.jsx)(e7,{messages:F[v.PriceTypeEnum.IMMEDIATE]})]}),(0,y.jsxs)(eQ,{priceType:v.PriceTypeEnum.MONTHLY,label:"à payer par mois",totals:n?a:r?.prices,period:"mois",isPriceLoading:u,mustDisplay:l,children:[g.length>0&&(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,marginless:!0,children:g.length>1?"Mes offres":"Mon offre"}),g.map(e=>{let t=e.price.priceWithPromotions,r=e.price.foreverPrice,i=e.appliedDiscounts.find(e=>e.marketingType===tl.HOME);return A&&e.isType(v.ProductType.MAIN_FAI_OFFER)&&(t+=A.price.priceWithPromotions,r+=A.price.foreverPrice),(0,y.jsxs)(T.Fragment,{children:[(0,y.jsx)(e4.TicketLine,{label:e.isType(v.ProductType.MAIN_MOBILE_OFFER)?`Forfait ${e.label}`:e.label,price:t,period:"mois",isLoading:u}),e.price.discountDuration&&e.price.discountDuration!==1/0&&(0,y.jsxs)(Q.Text,{level:K.TextLevels.THREE,children:["Pendant ",e.price.discountDuration," mois puis"," ",(0,y.jsx)(ed.InlinePrice,{amount:r,period:"mois",typo:eu.TypographyBold.TEXT_WEIGHT_NORMAL,level:K.TextLevels.THREE,isLoading:u})]}),i?.amount&&(0,y.jsx)(e4.TicketLine,{label:i.characteristics.banner,price:-i?.amount,period:"mois",isLoading:u,isSmall:!0})]},e.id)}),f.length>0&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,marginless:!0,children:"Mes options mobiles"}),f.map(e=>(0,y.jsxs)(T.Fragment,{children:[(0,y.jsx)(e4.TicketLine,{label:e.label,price:e.price.priceWithPromotions,period:"mois",isLoading:u}),e.isType(v.ProductType.INSURANCE)&&(0,y.jsx)(Q.Text,{level:K.TextLevels.THREE,children:"Prélevée par SPB"}),e.metadata?.wordingPromo&&(0,y.jsxs)(Q.Text,{level:K.TextLevels.THREE,children:[" ",e.metadata?.wordingPromo]})]},e.id))]}),_.length>0&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,marginless:!0,children:"Mes options box"}),_.map(e=>(0,y.jsx)(e4.TicketLine,{label:e.label,price:e.price.priceWithPromotions,period:"mois",isLoading:u},e.id))]}),(0,y.jsx)(e7,{messages:F[v.PriceTypeEnum.MONTHLY]})]}),n&&r.funding&&(0,y.jsxs)(tp,{label:"Financement par mois",funding:r.funding,isPriceLoading:u,children:[!o&&(0,y.jsxs)(y.Fragment,{children:[R?.map(e=>(0,y.jsx)(e4.TicketLine,{label:e.label,isLoading:u,price:e?.price.foreverPrice===0?0:void 0,isIncluded:e?.price.foreverPrice!==0},e.id)),M.map(e=>(0,y.jsx)(e4.TicketLine,{label:e?.label,price:e?.price.foreverPrice===0?0:void 0,isLoading:u,isIncluded:e?.price.foreverPrice!==0},e?.gencode))]}),r.funding?.installments&&r.funding?.installments>0&&(0,y.jsx)(e4.TicketLine,{label:o?"Facilité de paiement du téléphone":`Financement x${r.funding?.installments} mois`,price:r.funding?.monthlyAmount,period:"mois",isLoading:u},"funding-label"),!o&&D?.length>0&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.ONE}),(0,y.jsx)(Q.Text,{marginless:!0,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,level:K.TextLevels.THREE,children:"Mes accessoires"}),D.map(e=>(0,y.jsx)(e4.TicketLine,{label:e.label,isLoading:u,isIncluded:!0},e.id)),(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.ONE})]})]}),(0,y.jsxs)(eQ,{label:"à payer sur la première facture",priceType:v.PriceTypeEnum.DEFERRED,totals:r?.prices,isPriceLoading:u,children:[S?.map(e=>{let t=e.metadata?.sku==="service-cost-fai";return(0,y.jsx)(e4.TicketLine,{label:(0,y.jsxs)(y.Fragment,{children:[e.label,t&&(0,y.jsx)(eM.Popover,{trigger:(0,y.jsx)(eF.Icon,{name:ek.IconName.INFOS_CIRCLE}),children:"Ces frais permettent de couvrir le traitement de votre dossier, ainsi que divers frais administratifs et de gestion."})]}),price:e.price.priceWithPromotions,isLoading:u},e.id)}),O.map(e=>(0,y.jsx)(e4.TicketLine,{label:e?.label,price:e?.price.priceWithPromotions??0,isLoading:u},e?.gencode)),(0,y.jsx)(e7,{messages:F[v.PriceTypeEnum.DEFERRED]})]}),"Summary"===e||"CrossSell"===e?(0,y.jsx)(eX,{}):(0,y.jsx)(eY,{}),(0,y.jsx)(U,{testId:"continue-button"}),w?.tradeIn&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eL.Divider,{}),(0,y.jsx)(Q.Text,{level:K.TextLevels.THREE,typo:eD.TypographyAlign.TEXT_CENTERED,children:"* Sous réserve de validation"})]})]})})}),["fit","must","ultym"].includes(L?.metadata?.rangeNg??"")&&(0,y.jsx)(e3,{})]})}function th({className:e}){return(0,y.jsx)(eS.Box,{testId:"ticket-box",className:(0,ts.classNames)("cart-ticket is-marginless is-sticky-top-desktop is-sticky-top-padding-desktop",e??""),children:(0,y.jsx)(eA.BoxContent,{children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:I.GapSize.ZERO,children:[(0,y.jsxs)(j.FlexItem,{children:[(0,y.jsx)(el.Title,{level:ec.TitleLevels.THREE,markup:ec.TitleMarkup.H2,children:"Mes achats"}),(0,y.jsx)(eL.Divider,{})]}),(0,y.jsx)(eK,{}),(0,y.jsx)(B.Button,{variant:z.ButtonVariant.CONVERSION,loading:!0,children:"Continuer"})]})})})}function tg({label:e,priceType:t,totals:r,period:i,mustDisplay:n=!1}
1){let s=Array.isArray(r)?r.find(e=>e.isType(t)):r;if(!(s||n))return null;let o="number"==typeof s?s:s?.priceWithPromotions??0;return(0,y.jsxs)(j.FlexItem,{className:"has-text-centered",children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,marginless:!0,children:e}),(0,y.jsx)(Q.Text,{children:(0,y.jsx)(ed.InlinePrice,{amount:o,period:i,typo:eu.TypographyBold.TEXT_WEIGHT_NORMAL,level:K.TextLevels.TWO})})]})}function tx({isVisible:e}){let{cart:t,hasFunding:r,monthlyPriceWithoutFunding:i,hasPlanInCart:n}=tn(),{addProductsToCartMutation:s,removeProductFromCartMutation:o}=(0,T.useContext)(b.CartContext),a=(0,W.useSubmitContext)();return s.isPending||o.isPending?(0,y.jsx)(tf,{isVisible:e}):(0,y.jsx)(eS.Box,{testId:"sticky-box",className:(0,ts.classNames)("sticky-box is-marginless is-hidden-desktop",e?"":"hidden"),children:(0,y.jsx)(eA.BoxContent,{children:(0,y.jsxs)(C.FlexBox,{gap:4,align:e_.Align.CENTER,direction:E.DirectionEnum.ROW,children:[(0,y.jsx)(tg,{label:"Aujourd'hui",priceType:v.PriceTypeEnum.IMMEDIATE,totals:t?.prices}),r&&(0,y.jsx)(tg,{label:"Financement",priceType:v.PriceTypeEnum.MONTHLY,totals:t?.funding?.monthlyAmount,period:"mois"}),(0,y.jsx)(tg,{label:"Offre",priceType:v.PriceTypeEnum.MONTHLY,totals:r?i:t?.prices,period:"mois",mustDisplay:n}),a&&(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(U,{testId:"continue-button",iconName:ek.IconName.ARROW_FORWARD,iconOnly:!0})})]})})})}function tf({isVisible:e}){return(0,y.jsx)(eS.Box,{className:(0,ts.classNames)("sticky-box is-marginless is-hidden-desktop",e?"":"hidden"),children:(0,y.jsx)(eA.BoxContent,{children:(0,y.jsxs)(C.FlexBox,{gap:4,align:e_.Align.CENTER,direction:E.DirectionEnum.ROW,children:[(0,y.jsxs)(j.FlexItem,{className:"justify-items-center",children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,className:"skeleton w-fit",marginless:!0,children:"Joyeux anniversaire"}),(0,y.jsx)(Q.Text,{className:"skeleton w-fit",children:"Les BG"})]}),(0,y.jsxs)(j.FlexItem,{className:"justify-items-center",children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,className:"skeleton w-fit",marginless:!0,children:"Lucas stbnr"}),(0,y.jsx)(Q.Text,{className:"skeleton w-fit",children:"04/07/2000"})]}),(0,y.jsxs)(j.FlexItem,{className:"justify-items-center",children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,className:"skeleton w-fit",marginless:!0,children:"Félix Legrelle le BG"}),(0,y.jsx)(Q.Text,{className:"skeleton w-fit",children:"10/03/2000"})]}),(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(B.Button,{variant:z.ButtonVariant.CONVERSION,iconName:ek.IconName.ARROW_FORWARD,disabled:!0})})]})})})}function ty({isHidden:e,showSkeleton:t}){let{ref:r,isVisible:i}=function(e=!1){let[t,r]=(0,T.useState)(e),[i,n]=(0,T.useState)(null),s=(0,T.useCallback)(e=>{null!==e&&n(e)},[]);return(0,T.useEffect)(()=>{if(i){let e=new IntersectionObserver(([e])=>r(e?.isIntersecting===!0));return e.observe(i),()=>{e.disconnect()}}},[i]),{isVisible:t,ref:s}}(!1);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("div",{ref:r}),!e&&(t?(0,y.jsx)(tf,{isVisible:!i}):(0,y.jsx)(tx,{isVisible:!i}))]})}function tT({currentModule:e,shouldHideTicket:t=!1,hideTicketOnMobile:r=!1,children:i}){let n=oy[0],s=oy.find(t=>t.key===e),o=(0,eI.useRouter)(),{cart:a,isLoading:l,userConnect:c,cartType:u,user:d}=(0,T.useContext)(b.CartContext),{user:p}=(0,X.useStableSession)(),[m,h]=(0,T.useState)(!1),g=l||m,x=s?.shouldDisableModule?.(a)??!1,f=(0,T.useMemo)(()=>{if(g)return null;let t=oy.findIndex(t=>t.key===e),r=oy.slice(0,t);for(let e=r.length-1;e>=0;e--){let t=r[e];if(!t.shouldDisableModule?.(a)&&!(t.isValid?.(a)??!0))return t}return null},[a,e,g]),v=(0,T.useMemo)(()=>null===f,[f]),E=(0,T.useMemo)(()=>!g&&(!v||x),[v,x,g]),C=(0,T.useMemo)(()=>x?`/${n.path}`:f?`/${f.path.join("/")}`:null,[x,n.path,f]);(0,T.useEffect)(()=>{E&&C&&o.push(C)},[E,C,o]),(0,T.useEffect)(()=>{void 0===p&&("real"===u||a?.buyer?.id!==void 0)?(0,eC.signIn)().catch(ej.noop):(a?.buyer?.id===void 0||void 0===d)&&void 0!==p&&(h(!0),c(p).finally(()=>{h(!1)}))},[p,a?.buyer,c,d,u]);let j=g||E,I=!a?.journeys?.[0]?.products?.[0];return(0,y.jsxs)(ex,{children:[(0,y.jsx)(ty,{isHidden:I||t,showSkeleton:j}),(0,y.jsx)(eb,{currentModule:e,isLoading:j}),(0,y.jsxs)(Z.Section,{children:[e!==n.key&&(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:(0,y.jsx)(Y.Link,{href:`/${n.path}`,children:"Retour au panier"})}),(0,y.jsxs)("div",{className:t?"":"cart-page-layout",children:[(0,y.jsx)("div",{className:"cart-content",children:j||!
1d&&"real"===u?(0,y.jsx)(eE.ModuleLoader,{}):i}),!t&&(j?(0,y.jsx)(th,{className:r?"is-hidden-mobile":""}):(0,y.jsx)(tm,{currentModule:e,className:r?"is-hidden-mobile":""})),(0,y.jsx)(ei,{}),a?.funding&&(0,y.jsx)(ep,{funding:a.funding})]})]})]})}function tv({cartProvider:e,layout:t=tT,children:r,...i}){return(0,y.jsx)(e,{children:(0,y.jsx)(W.SubmitContextProvider,{children:(0,y.jsx)(t,{...i,children:r})})})}var tb=e.i(579403),tE=e.i(170682);e.s(["Billing",()=>tk],735866);var eH=eH;e.i(150300);var tC=e.i(62309);function tj(e){return null!=e&&(null!=e.startDate||null!=e.endDate||null!=e.effectiveEndDate)}function tI(){let{cart:e,setBillingContextMutation:t}=(0,T.useContext)(b.CartContext),{user:r}=(0,X.useStableSession)(),i=e?.billingContext,n=i?.routingAddress,s=e?.buyer?.legalEntity?.routingAddresses??[],o=(0,T.useMemo)(()=>(function(e){let t={sirets:{},suffixes:{}};for(let n of e){var r,i;if(!n.addressingLineCode)continue;let e={addressingLineCode:n.addressingLineCode,...tj(n.periodEffect)&&{periodEffect:n.periodEffect},...n.suffix&&{suffix:n.suffix}};n.noSiret?function(e,t,r,i){e.sirets[t]||(e.sirets[t]={});let n=e.sirets[t];if(r.routingCode)n.routingCodes??={},n.routingCodes[r.routingCode]=i;else{let{routingCodes:e}=n;Object.assign(n,i,...e?[{routingCodes:e}]:[])}}(t,n.noSiret,n,e):Object.assign(t,e),n.suffix&&(r=n.suffix,i=n.addressingLineCode,t.suffixes[r]={...n.noSiret&&{siret:n.noSiret},...n.routingCode&&{routingCode:n.routingCode},addressingLineCode:i,...tj(n.periodEffect)&&{periodEffect:n.periodEffect}})}return t})(s),[s]),a=1===s.length,l=Object.keys(o.sirets),c=Object.keys(o.suffixes),u=n?.noSiret,d=n?.suffix,p=n?.routingCode,m=n?.addressingLineCode,h=a?l[0]:void 0,g=h?o.sirets[h]:void 0,x=a?c[0]:void 0,f=g?.routingCodes?Object.keys(g.routingCodes)[0]:void 0,v=f?g?.routingCodes?.[f]:g??o,E=n?.periodEffect??v?.periodEffect,C=(0,H.useTrilogyForm)({formId:"facturation-form",defaultValues:{siret:u??h??"",suffix:d??x??"",routingCode:p??f??"",addressingLineCode:m??v?.addressingLineCode??"",buyerExternalReference:i?.buyerExternalReference??"",orderExternalReference:i?.orderExternalReference??"",startDate:E?.startDate??"",endDate:E?.endDate??"",effectiveEndDate:E?.effectiveEndDate??""},onSubmit:async({value:i})=>{if(!(e?.buyer?.legalEntity?.siren&&r))throw Error("Missing required information to submit billing context");let n={startDate:i.startDate,endDate:i.endDate,effectiveEndDate:i.effectiveEndDate};await t.mutateAsync({routingAddress:{noSiren:e.buyer.legalEntity.siren,noSiret:i.siret,suffix:i.suffix,routingCode:i.routingCode,addressingLineCode:i.addressingLineCode,periodEffect:n},orderExternalReference:i.orderExternalReference,buyerExternalReference:i.buyerExternalReference})}});(0,W.useSubmitQueue)("facturation",C.handleSubmit);let j=(e,t,r)=>{let i=r.map(e=>({label:e,value:e,id:e}));return a?i:[{label:e,value:"",id:t},...i]},I=j("Sélectionnez un suffixe","__empty_suffixe__",c),_=j("Sélectionnez un Siret","__empty_siret__",l),S=()=>{C.resetField("routingCode"),C.resetField("addressingLineCode"),C.resetField("startDate"),C.resetField("endDate"),C.resetField("effectiveEndDate")};return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eS.Box,{testId:"billing-form-box",children:(0,y.jsxs)(eA.BoxContent,{children:[(0,y.jsxs)(Q.Text,{level:K.TextLevels.TWO,children:["Champs obligatoires ",(0,y.jsx)("span",{className:"text has-text-error",children:"*"})]}),(0,y.jsx)(el.Title,{level:ec.TitleLevels.THREE,children:"Facturation de l'établissement"}),(0,y.jsx)(Q.Text,{children:"Les informations renseignées seront utilisées uniquement pour cette commande."}),(0,y.jsx)(eH.default,{status:e6.StatusState.INFO,title:"Comment trouver ces informations ?",description:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{children:"Ces références sont disponibles sur le site officiel de l'Annuaire des Entreprises."}),(0,y.jsx)(Y.Link,{blank:!0,href:tt.paths.enterpriseDirectory,children:"Accéder à l'Annuaire des Entreprises"})]})}),(0,y.jsxs)("form",{onSubmit:e=>{e.preventDefault(),C.handleSubmit()},children:[c.length>0&&(0,y.jsx)(C.AppField,{name:"suffix",listeners:{onChange:({value:e})=>
1{if(e){let t=o.suffixes[e],{siret:r,routingCode:i}=t??{},n=r?o.sirets[r]:void 0,s=i?n?.routingCodes?.[i]:n;C.setFieldValue("siret",r??""),C.setFieldValue("routingCode",i??""),C.setFieldValue("addressingLineCode",s?.addressingLineCode??t?.addressingLineCode??"");let a=s?.periodEffect??t?.periodEffect;C.setFieldValue("startDate",a?.startDate??""),C.setFieldValue("endDate",a?.endDate??""),C.setFieldValue("effectiveEndDate",a?.effectiveEndDate??"")}else C.setFieldValue("siret",""),S()}},children:e=>(0,y.jsx)(e.Select,{label:"Suffixe",help:"Le suffixe est le complément que vous utilisez pour organiser vos factures.",elements:I})}),(0,y.jsx)(C.Subscribe,{selector:e=>({suffixe:e.values.suffix,siret:e.values.siret}),children:({suffixe:e,siret:t})=>{let r=!!e,i=Object.keys(o.sirets[t]?.routingCodes??{});return(0,y.jsxs)(y.Fragment,{children:[l.length>0&&(0,y.jsx)(C.AppField,{name:"siret",listeners:{onChange:({value:e})=>{if(e){let t=o.sirets[e],r=t?.routingCodes?Object.keys(t.routingCodes):[],i=1===r.length?r[0]:void 0,n=i?t?.routingCodes?.[i]:void 0;C.setFieldValue("routingCode",i??"");let s=n?.periodEffect??t?.periodEffect;C.setFieldValue("addressingLineCode",t?.addressingLineCode??n?.addressingLineCode??""),C.setFieldValue("startDate",s?.startDate??""),C.setFieldValue("endDate",s?.endDate??""),C.setFieldValue("effectiveEndDate",s?.effectiveEndDate??"")}else S()}},children:e=>(0,y.jsx)(e.Select,{label:"Numéro de Siret",help:"Votre numéro de Siret est composé de 14 chiffres. Il est constitué du numéro de Siren et du NIC.",disabled:r,elements:_})}),i.length>0&&(0,y.jsx)(C.AppField,{name:"routingCode",listeners:{onChange:({value:e})=>{let t=C.state.values.siret;if(e){let r=o.sirets[t]?.routingCodes?.[e];C.setFieldValue("addressingLineCode",r?.addressingLineCode??""),C.setFieldValue("startDate",r?.periodEffect?.startDate??""),C.setFieldValue("endDate",r?.periodEffect?.endDate??""),C.setFieldValue("effectiveEndDate",r?.periodEffect?.effectiveEndDate??"")}else{let e=o.sirets[t];C.setFieldValue("addressingLineCode",e?.addressingLineCode??""),C.setFieldValue("startDate",e?.periodEffect?.startDate??""),C.setFieldValue("endDate",e?.periodEffect?.endDate??""),C.setFieldValue("effectiveEndDate",e?.periodEffect?.effectiveEndDate??"")}}},children:e=>(0,y.jsx)(e.Select,{label:"Code routage",help:"Votre code routage permet de diriger la facture vers le bon service interne.",disabled:r,elements:j("Sélectionnez un code routage","__empty_routage__",i)})})]})}}),(0,y.jsx)(C.AppField,{name:"addressingLineCode",children:e=>(0,y.jsx)(e.Input,{required:!0,help:"Ce champ est complété grâce aux informations précédentes.",label:"Code ligne d'adressage",readOnly:!0})}),(0,y.jsx)(C.AppField,{name:"buyerExternalReference",children:e=>(0,y.jsx)(e.Input,{label:"Référence acheteur",placeholder:"Saisissez votre référence acheteur",help:"Renseignez le nom ou l'identifiant de la personne à l'origine de la commande.",maxLength:100})}),(0,y.jsx)(C.AppField,{name:"orderExternalReference",children:e=>(0,y.jsx)(e.Input,{label:"Référence bon de commande",help:"Renseignez le numéro unique associé à cette commande.",placeholder:"Saisissez votre bon de commande",maxLength:50})})]})]})}),(0,y.jsx)(tC.ForceLogin,{})]})}function t_(e){if(e)return`${e.streetNumber??""} ${e.street}, ${e.complement??""} ${e.zipCode} ${e.city}`.replaceAll(/ {2,}/g," ").trim()}function tS(e,t){let r=new Date(e).toLocaleDateString("fr-FR",{weekday:t?.withDayWeek?"long":void 0,day:"2-digit",month:t?.withMonth?"long":"2-digit",year:t?.withYear?"numeric":void 0});return r[0]?.toUpperCase()+r.slice(1)}function tA(e){return new Date(e).toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit"})}function tL(){let{cart:e}=(0,T.useContext)(b.CartContext),t=e?.buyer?.legalEntity,r=t?.creationDate?tS(t.creationDate,{withYear:!0}):void 0;return(0,y.jsx)(eS.Box,{testId:"company-info-box",children:(0,y.jsxs)(eA.BoxContent,{children:[(0,y.jsx)(el.Title,{level:ec.TitleLevels.THREE,children:"Votre société"}),(0,y.jsx)(Q.Text,{children:"Informations collectées par nos partenaires Infolégale et Annuaire des Entreprises."}),(0,y.jsxs)(C.FlexBox,{mobile:!0,wrap:!0,direction:E.DirectionEnum.ROW,children:[(0,y.jsx)(tF,{label:"Raison Sociale",value:t?.companyName}),(0,y.jsx)(tF,{label:"Création",value:r}),(0,y.jsx)(tF,{label:"NAF",value:t?.naf}),(0,y.jsx)(tF,{label:"Effectif",value:t?.staffNumber}),(0,y.jsx)(tF,{label:"Numéro de Siren",value:t?.siren}),(0,y.jsx)(tF,{label:"Forme Juridique",value:t?.legalForm}),(0,y.jsx)(tF,{label:"Assujetti à la TVA",value:"Oui"}),(0,y.jsx)(tF,{label:"TVA Intracommunautaire",value:t?.vatNumber})]})]})})}function tF({label:e,value:t}){return t?(0,y.jsxs)(j.FlexItem,{size:{desktop:3,mobile:6},children:[(0,y.jsx)(Q.Text,{marginless:!0,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:e}),(0,y.jsx)(Q.Text,{className:"is-break-word",children:t})]}):null}function tk({currentModule:e}){let{cart:t}=(0,T.useContext)(b.CartContext),r=(0,T.useMemo)(()=>oT(e,t),[e,t]),i=(0,eI.useRouter)();return(0,W.useSubmitHandler)(()=>(i.push(r),Promise.resolve())),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(tL,{}),(0,y.jsx)(tI,{})]})}let tN=(0,_.getAppConfig)();var tM=e.i(129003);e.s(["CartCreation",()=>tz],53528);var tO=e.i(499329);
1class tR extends Error{invalidOptions;redirectPath;constructor(e){super("invalid-option"),this.name="InvalidOptionError",this.invalidOptions=e.map(({product:e,journeyType:t})=>({gencode:e.gencode,journeyType:t})),this.redirectPath=tt.paths.cart}}var tD=e.i(954616),tw=e.i(912598),tP=e.i(749222);class tB{cartRepository;_user;checkoutSessionService;constructor(e){this._user=e,this.cartRepository=(0,tO.createRealCartRepository)(),this.checkoutSessionService=new v.CheckoutSessionService}get user(){return this._user}async create(e){let t=e.buyer?.id,r=this.checkoutSessionService.get(this.user.sub)??{buyerId:t??this.user.sub};await this.getCart().catch(()=>void 0)&&await this.reset();let i=[];e.referrer&&i.push(v.ReferrerFactory.toRequestBody());let n=await this.createCart(i);for(let t of(await this.addBuyer(n,e.buyer),e.journeys))await this.createJourney(n,t,r);await this.setFunding(n,e)}async reset(){return await this.cartRepository.reset(this.user).catch(()=>void 0)}async getCart(e=!1){return await this.cartRepository.getCart(this.user,e)}async createCart(e=[]){return await this.cartRepository.createCart(this.user,e)}
1async setFunding(e,t){let r=t.funding?.key??v.FundingKey.COMPTANT,{fundings:i,paymentMethodsByFundingKey:n,edpParcours:s}=await tP.fundingService.getCartFundingModes(e,this.user);if(0===i.length)throw new v.SwappyFundingUnavailableError;let o=new Set(i.map(e=>e.key)).has(r)?r:i.find(e=>e.isType(v.FundingType.COMPTANT))?.key??i[0].key,a=n[o]??[],l=t.paymentMethod,c=l&&a.includes(l)?l:a[0]??v.PaymentMethod.WITHOUT_PAYMENT;await this.cartRepository.setFundingModeApi(e,t.buyer.id,{fundingKey:o,callbackUrl:tt.paths.fundingRedirect(e),paymentMethod:c,...o===v.FundingKey.EDP&&{edpParcours:s}},this.user)}async addBuyer(e,t){if(!t)return;let r={type:t.type,noPersonne:t.id,email:t.email};await this.cartRepository.setBuyerApi(e,r,this.user)}async createJourney(e,t,r){let i=t.characteristics.map(e=>v.journeyCharacteristicFactory.toRequestBody(e))??[],n=await this.cartRepository.createJourney(e,t.type,i,this.user,t.contractId);for(let r of t.products)await this.addProductToJourney(e,n,r);let s=t.tradeIn;for(let i of(s&&await this.addProductToJourney(e,n,s),await this.addBillingContext(e,n,r),t.getCoupons().map(({code:e})=>e).filter(e=>void 0!==e)))await this.addCouponToJourney(e,i)}async addProductToJourney(e,t,r){let i=r.allocatedResources;if(r.missingResources.find(e=>e.isType(v.ResourceType.STOCK)&&e.characteristics.find(e=>"IDENTIFIANT"===e.key))){let e=new v.AllocatedResourceModel(void 0,v.ResourceType.STOCK);e.setCharacteristics([new v.ResourceCharacteristicModel(v.ResourceCharacteristicType.IDENTIFIANT,r.gencode)]),i.push(e)}await this.cartRepository.addProductToCartApi(e,t,r.gencode,r.characteristics,i.map(e=>v.AllocatedRessourceFactory.toRequestBody(e)),this.user)}async addBillingContext(e,t,r){if(!r.billingAddressId)return Promise.resolve();await this.cartRepository.setJourneyBillingContext(e,t,{billingAddressId:r.billingAddressId},this.user)}async addCouponToJourney(e,t){await this.cartRepository.addCouponToCartApi(e,t,this.user)}static findInvalidOptionsInCart(e){return e.journeys.flatMap(e=>e.products.filter(e=>(e.isType(v.ProductType.OPTION)||e.isType(v.ProductType.PARTNER_OPTION))&&void 0!==e.status&&!e.status.isValid()).map(t=>({product:t,journeyType:e.type})))}}function tz(){let e=(0,eI.useRouter)(),t=(0,T.useRef)(!1),r=(0,tw.useQueryClient)(),{cart:i,isLoading:n,removeProductFromCartMutation:s}=(0,T.useContext)(b.CartContext),{user:o}=(0,X.useStableSession)(),{showErrorModal:a}=(0,q.useErrorModal)(),l=(0,tD.useMutation)({retry:(e,t)=>!(t instanceof tR||t instanceof v.SwappyFundingUnavailableError)&&e<1,mutationFn:async e=>{if(!o)throw Error("User is not authenticated");return await new tB(o).create(e).then(()=>tO.realCartService.connectUser(o).catch(()=>void 0)).then(e=>{if(!e)throw r.resetQueries({queryKey:["cart"],exact:!0}),Error("Failed to create cart");return r.setQueryData(["cart"],e),e}).then(e=>{let t=tB.findInvalidOptionsInCart(e);if(t.length>0)throw new tR(t);return e})},onSuccess:t=>{let r=oT("CartCreation",t);if(!r)throw Error("Redirect URL is not defined");console.info("Cart created successfully"),e.replace(r)},onError:async e=>{if(e instanceof v.SwappyFundingUnavailableError)return void a("no-funding");if(e instanceof tR){for(let{journeyType:t,gencode:r}of e.invalidOptions)await s.mutateAsync({journey:t,gencode:r});a("invalid-option",{onClose:()=>{window.location.href=e.redirectPath}});return}console.error("Cart creation failed",e.message),a("cart-creation-error")}});return(0,T.useEffect)(()=>{!n&&i&&o&&!t.current&&(t.current=!0,l.mutate(i))},[n,i,o,l]),(0,y.jsxs)(y.Fragment,{children:[!l.isError&&(0,y.jsx)(eE.ModuleLoader,{}),(0,y.jsx)(tC.ForceLogin,{})]})}e.s(["Contact",()=>rT],401556);var tV=e.i(970202);(a={}).GP="INDIVIDU",a.PRO="ENTREPRISE";var tW=((l={}).M="M",l.MME="Mme",l);(c={}).CDC="CDC",c.CDV="CDV";let tU=["CDC","CDV"];class tH{static installAddressMapper(e){return{zipCode:e.codePostal,city:e.ville??"",street:e.rue,streetNumber:e.numero,complement:e.adresse2,building:e.batiment,stair:e.escalier,floor:e.etage,rivoliCode:e.codeRivoli,inseeCode:e.codeInsee,hexacle:e.hexacle,isChecked:!1}}}
1let tG=new class{url;constructor(e){this.url=e}async getLines(e,t){return await S.apiHttpService.get(`${this.url}/personnes/${e}/lignes`,void 0,{user:t}).then(e=>e.items.map(e=>({id:e._links.self.href.split("/").pop()??"",status:e.statut,technology:e.technologieAcces,type:e.type}))).catch(()=>[])}async getInstallAddressOfLine(e,t){return await S.apiHttpService.get(`${this.url}/lignes/${e}/adresse-installation`,void 0,{user:t}).then(({adresseInstallation:e})=>tH.installAddressMapper(e))}async getContactDetails(e,t){return await S.apiHttpService.get(`${this.url}/personnes/${e}/coordonnees`,void 0,{user:t}).then(e=>({phoneNumber:e.telephones?.find(e=>"PORTABLE"===e.typeTelephone)?.numero,email:e.emails?.[0]?.email})).catch(()=>void 0)}async getPersonDetails(e,t){return await Promise.all([S.apiHttpService.get(`${this.url}/personnes/${e}`,void 0,{user:t}),this.getContactDetails(e,t)]).then(([e,t])=>{let r=e?.type==="INDIVIDU"?e:e?.representantLegal;if(r)return{id:e.id,type:e.type,civility:"M"===r.civilite?tW.M:tW.MME,birthRegion:r.codeDepartementNaissance,birthDate:r.dateNaissance,firstName:r.prenom,lastName:r.nom,phoneNumber:t?.phoneNumber,email:t?.email,isEditable:!!e?._actions?.modifierprospect}}).catch(()=>void 0)}async getIdPuFromContract(e,t){let r=e.user_type;return tU.includes(r)?t?await tV.contractsRepository.getPersonneFromContract(t,e):void 0:e.sub}async createPerson(e){return await S.apiHttpService.post(`${this.url}/ventes/prospectWEB`,{typeClient:"GP",creerSession:!0,login:e.email,civilite:this.userCreationCivilitySanitizer(e.civility),nom:this.textSanitizer(e.lastName),prenom:this.textSanitizer(e.firstName),departementNaissance:e.birthRegion,dateNaissance:this.birthdaySanitizer(e.birthDate),numeroTel:this.phoneSanitizer(e.phoneNumber),motDePasse:e.password},{headers:{"x-version":"4"}}).then(e=>{if(!e.tgtId)throw Error("Erreur lors de la création de l'utilisateur");return e.tgtId})}async updateProspect(e,t,r){return await S.apiHttpService.put(`${this.url}/personnes/${e}`,{...t.email&&{login:t.email},...t.civility&&{civilite:this.userUpdateCivilitySanitizer(t.civility)},...t.lastName&&{nom:this.textSanitizer(t.lastName)},...t.firstName&&{prenom:this.textSanitizer(t.firstName)},...t.birthRegion&&{departementNaissance:t.birthRegion},...t.birthDate&&{dateNaissance:t.birthDate},...t.phoneNumber&&{numeroTel:this.phoneSanitizer(t.phoneNumber)},type:"INDIVIDU"},{user:r})}textSanitizer(e=""){return e.replace(/[ââ]/g,"'")}birthdaySanitizer(e){return e?e.split("-").join(""):""}phoneSanitizer(e="",t=!0){return t&&(e=e.replace(/^(0)/gim,"+33")),e=e.replace(/ /g,"")}userCreationCivilitySanitizer(e){switch(e){case tW.M:return"M.";case tW.MME:return"MME";default:throw Error(`${e} is not a civilite`)}}userUpdateCivilitySanitizer(e){switch(e){case tW.M:return"M";case tW.MME:return"MME";default:throw Error(`${e} is not a civilite`)}}}((0,_.getAppConfig)().bytelApi.url);class tq extends Error{constructor(e){super(e),this.name="ProductNotFound"}}var t$=e.i(990136);let tJ=(0,_.getAppConfig)(),tX=new class{url;constructor(e){this.url=e}buildQueryParams(e){let t=new URLSearchParams;for(let[r,i]of Object.entries(e))Array.isArray(i)?t.set(r,i.join(",")):"boolean"==typeof i?t.set(r,i?"true":"false"):t.set(r,i);return t.toString()}async getProductsByGencodes(e,t){if(0===e.length)throw Error("No gencodes provided");let r=this.buildQueryParams({listGencode:e});return await this.getProducts(`?${r}`,t)}async getProducts(e,t){return await S.apiHttpService.get(`${this.url}/ventes/produits${e}`,{},{ttl:parseInt(tJ.cache.ttl.products,10),tags:[ew.PRODUCT_DETAIL],user:t}).catch(t=>{if(t?.response?.status===t$.HttpStatus.NOT_FOUND)throw new tq(`Product not found ${e}`);throw t})}async getCategoriesDetails(e,t){return await S.apiHttpService.get(`${this.url}/ventes/categories`,{withDetails:"false",voirProduits:"false",codes:e.join(",")},{ttl:parseInt(tJ.cache.ttl.products,10),tags:[ew.PRODUCT_DETAIL],user:t}).then(e=>e.categories.reduce((e,t)=>(e[t.code]={name:t.name,products:t.products},e),{}))}async getProductsByUrlKeys(e){let t=await Promise.allSettled(e.map(e=>this.getProductByAttribute(e,"url_key")));for(let[r,i]of t.entries())"rejected"===i.status&&console.error(`Failed to fetch product with urlKey "${e[r]}":`,i.reason);return t.filter(e=>"fulfilled"===e.status).map(e=>e.value)}async getProductByAttribute(e,t){if(!e)throw Error("No value provided");return await S.apiHttpService.get(`${this.url}/ventes/produits/${e}`,t?{attribute:t}:{})}async getCategoryProducts(e){let t=e.join(",");return await S.apiHttpService.get(`${this.url}/ventes/categories`,{withDetails:"false",voirProduits:"true",codes:t},{ttl:parseInt(tJ.cache.ttl.products,10),tags:[ew.PRODUCT_DETAIL
1]}).then(e=>e.categories?.flatMap(e=>e.products)??[])}}(tJ.bytelApi.url),tY=new class{async getIdPuFromContract(e,t){return await tG.getIdPuFromContract(e,t)}async getPersonDetails(e,t){return await tG.getPersonDetails(e,t)}async createPerson(e){return await tG.createPerson(e)}async updateProspect(e,t,r){return await tG.updateProspect(e,t,r)}async canSubscribeToFai(e,t,r){try{let i=await this.getFaiActiveLines(e,t);if(!i.length)return!0;let n=i.map(e=>tG.getInstallAddressOfLine(e.id,t));return!(await Promise.all(n)).some(e=>r.inseeCode===e.inseeCode&&r.hexacle===e.hexacle&&r.zipCode===e.zipCode&&r.rivoliCode===e.rivoliCode)}catch(e){return console.error("Error checking FAI subscription eligibility:",e),!0}}async canSubscribeToFaiOffer(e,t){try{let r=t.getJourneyOfType(v.JourneyType.FAI_ACQUISITION)?.getPrincipalProduct();if(!t.buyer||r?.metadata?.commercialSeries!=="serie_client_bandyou")return!0;let i=await tV.contractsRepository.getSignedContracts(t.buyer,e);if(!i.length)return!0;let n=i.map(e=>e.subscription.offerId),s=await tX.getProductsByGencodes(n,e),o=new Set([to.SOWO,to.SOWO_RENEWAL]);return!Object.values(s?.produits??{}).some(e=>o.has(e.type_id))}catch(e){return console.error("Error checking FAI offer subscription eligibility:",e),!0}}async getFaiActiveLines(e,t){return await tG.getLines(e,t).then(e=>e.filter(e=>"LIGNE_FIXE"===e.type&&"ACTIVE"===e.status&&"MOBILE"!==e.technology))}};var tZ=e.i(800975);let tQ=(0,_.getAppConfig)(),tK=new class{url;constructor(e){this.url=e}async validateEmail(e,t){return await S.apiHttpService.get(`${this.url}/adresses/validation-email`,{mail:e}).then(e=>e.emailContact?"L'adresse e-mail est déjà associée à un utilisateur":t&&e?.domaine?.domaineBbox===!0?"Il n'est pas possible de créer un compte en @bbox.fr":e?.domaine?.domaineExistant===!1||e?.emailTemporaire||!e?.syntaxeEmailCorrecte||e?.utilisateurGenerique||!e?.emailValide?"L'adresse e-mail renseignée n'existe pas, veuillez saisir une nouvelle adresse e-mail":void 0)}}(tQ.bytelApi.url);var t0=e.i(212626);let t1=new RegExp(/^(06|07)(\d{8})$/),t2=RegExp(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,"i"),t3=RegExp(/^[A-ZÃ-Ã][A-ZÃ-à -]*[A-ZÃ-Ã]$/,"i"),t5=new RegExp(/\d/),t9=new RegExp(/[A-Z]/),t4=new RegExp(/[a-z]/),t6="!\"#$%&'()+,\\-./:;<=>?@^_`{}|~*\\[\\]\\\\",t8=RegExp(`[${t6}]`),t7=RegExp(`[^\\w${t6}]`),re=/\b(\d+)(?:Mo|Go)\b/,rt=/^\d$/,rr=/bbox\.fr$/i;var ri=e.i(826970),rn=e.i(585489);function rs({redirectUrl:e,isLoading:t=!1}){return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.CENTER,align:e_.Align.CENTER,children:[(0,y.jsx)(eF.Icon,{name:ek.IconName.USER,size:eN.IconSize.SMALL}),(0,y.jsx)(el.Title,{level:ec.TitleLevels.FIVE,className:t?"skeleton":"",marginless:!0,children:"Déjà un compte ?"})]}),(0,y.jsx)(B.Button,{variant:z.ButtonVariant.PRIMARY,className:t?"skeleton":"",onClick:()=>{(0,rn.serverSignIn)(e)},children:"Me connecter"})]})}function ro({value:e}){return["M","Mme"].includes(e)?void 0:"Merci de renseigner votre civilité."}function ra({value:e}){return e.length<2?"Merci de renseigner votre nom.":t3.test(e)?void 0:"Ce nom est incorrect. Merci de réessayer avec le bon format (2 à 32 caractères alphabétiques - accents, tirets, espace et apostrophes autorisés)."}function rl({value:e}){return e.length<2?"Merci de renseigner votre prénom.":t3.test(e)?void 0:"Ce prénom est incorrect. Merci de réessayer avec le bon format (2 à 32 caractères alphabétiques - accents, tirets, espace et apostrophes autorisés)."}function rc({value:e}){let t,r,i=new Date(e),n=new Date;return!e||Number.isNaN(i.getTime())?"Merci de renseigner votre date de naissance.":i>=n||1900>i.getFullYear()?"Cette date de naissance est incorrecte. Merci de réessayer avec le bon format. Ex : 17/10/1990":(t=n.getFullYear()-i.getFullYear(),((r=n.getMonth()-i.getMonth())<0||0===r&&n.getDate()<i.getDate())&&
1(t-=1),t<18)?"Vous devez être majeur pour souscrire une ligne.":void 0}function ru({value:e}){return"default"===e?"Merci de renseigner votre département de naissance.":void 0}function rd({value:e}){return t1.test(e)?void 0:"Merci de renseigner un N° de téléphone mobile."}function rp(e,t,r,i){let n=e.toLowerCase(),s=1;for(let e=1;e<n.length;e++){let o=n.charCodeAt(e-1),a=n.charCodeAt(e),l=a>=48&&a<=57,c=a>=97&&a<=122;if(a===(r?o+1:o-1)&&(l&&!i||c&&i)){if(++s>=t)return!0}else s=1}return!1}let rm={mobile:12,desktop:6},rh=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Tab","Enter","Home","End"]),rg=[...[{region_id:182,country_id:"FR",code:"01",label:"Ain"},{region_id:183,country_id:"FR",code:"02",label:"Aisne"},{region_id:184,country_id:"FR",code:"03",label:"Allier"},{region_id:185,country_id:"FR",code:"04",label:"Alpes-de-Haute-Provence"},{region_id:186,country_id:"FR",code:"05",label:"Hautes-Alpes"},{region_id:187,country_id:"FR",code:"06",label:"Alpes-Maritimes"},{region_id:188,country_id:"FR",code:"07",label:"Ardèche"},{region_id:189,country_id:"FR",code:"08",label:"Ardennes"},{region_id:190,country_id:"FR",code:"09",label:"Ariège"},{region_id:201,country_id:"FR",code:"2A",label:"Corse-du-Sud"},{region_id:202,country_id:"FR",code:"2B",label:"Haute-Corse"},{region_id:191,country_id:"FR",code:"10",label:"Aube"},{region_id:192,country_id:"FR",code:"11",label:"Aude"},{region_id:193,country_id:"FR",code:"12",label:"Aveyron"},{region_id:194,country_id:"FR",code:"13",label:"Bouches-du-Rhône"},{region_id:195,country_id:"FR",code:"14",label:"Calvados"},{region_id:196,country_id:"FR",code:"15",label:"Cantal"},{region_id:197,country_id:"FR",code:"16",label:"Charente"},{region_id:198,country_id:"FR",code:"17",label:"Charente-Maritime"},{region_id:199,country_id:"FR",code:"18",label:"Cher"},{region_id:200,country_id:"FR",code:"19",label:"Corrèze"},{region_id:203,country_id:"FR",code:"21",label:"Côte-d'Or"},{region_id:204,country_id:"FR",code:"22",label:"Côtes-d'Armor"},{region_id:205,country_id:"FR",code:"23",label:"Creuse"},{region_id:206,country_id:"FR",code:"24",label:"Dordogne"},{region_id:207,country_id:"FR",code:"25",label:"Doubs"},{region_id:208,country_id:"FR",code:"26",label:"Drôme"},{region_id:209,country_id:"FR",code:"27",label:"Eure"},{region_id:210,country_id:"FR",code:"28",label:"Eure-et-Loir"},{region_id:211,country_id:"FR",code:"29",label:"Finistère"},{region_id:212,country_id:"FR",code:"30",label:"Gard"},{region_id:213,country_id:"FR",code:"31",label:"Haute-Garonne"},{region_id:214,country_id:"FR",code:"32",label:"Gers"},{region_id:215,country_id:"FR",code:"33",label:"Gironde"},{region_id:216,country_id:"FR",code:"34",label:"Hérault"},{region_id:217,country_id:"FR",code:"35",label:"Ille-et-Vilaine"},{region_id:218,country_id:"FR",code:"36",label:"Indre"},{region_id:219,country_id:"FR",code:"37",label:"Indre-et-Loire"},{region_id:220,country_id:"FR",code:"38",label:"Isère"},{region_id:221,country_id:"FR",code:"39",label:"Jura"},{region_id:222,country_id:"FR",code:"40",label:"Landes"},{region_id:223,country_id:"FR",code:"41",label:"Loir-et-Cher"},{region_id:224,country_id:"FR",code:"42",label:"Loire"},{region_id:225,country_id:"FR",code:"43",label:"Haute-Loire"},{region_id:226,country_id:"FR",code:"44",label:"Loire-Atlantique"},{region_id:227,country_id:"FR",code:"45",label:"Loiret"},{region_id:228,country_id:"FR",code:"46",label:"Lot"},{region_id:229,country_id:"FR",code:"47",label:"Lot-et-Garonne"},{region_id:230,country_id:"FR",code:"48",label:"Lozère"},{region_id:231,country_id:"FR",code:"49",label:"Maine-et-Loire"},{region_id:232,country_id:"FR",code:"50",label:"Manche"},{region_id:233,country_id:"FR",code:"51",label:"Marne"},{region_id:234,country_id:"FR",code:"52",label:"Haute-Marne"},{region_id:235,country_id:"FR",code:"53",label:"Mayenne"},{region_id:236,country_id:"FR",code:"54",label:"Meurthe-et-Moselle"},{region_id:237,country_id:"FR",code:"55",label:"Meuse"},{region_id:238,country_id:"FR",code:"56",label:"Morbihan"},{region_id:239,country_id:"FR",code:"57",label:"Moselle"},{region_id:240,country_id:"FR",code:"58",label:"Nièvre"},{region_id:241,country_id:"FR",code:"59",label:"Nord"}
1,{region_id:242,country_id:"FR",code:"60",label:"Oise"},{region_id:243,country_id:"FR",code:"61",label:"Orne"},{region_id:244,country_id:"FR",code:"62",label:"Pas-de-Calais"},{region_id:245,country_id:"FR",code:"63",label:"Puy-de-Dôme"},{region_id:246,country_id:"FR",code:"64",label:"Pyrénées-Atlantiques"},{region_id:247,country_id:"FR",code:"65",label:"Hautes-Pyrénées"},{region_id:248,country_id:"FR",code:"66",label:"Pyrénées-Orientales"},{region_id:249,country_id:"FR",code:"67",label:"Bas-Rhin"},{region_id:250,country_id:"FR",code:"68",label:"Haut-Rhin"},{region_id:251,country_id:"FR",code:"69",label:"Rhône"},{region_id:252,country_id:"FR",code:"70",label:"Haute-Saône"},{region_id:253,country_id:"FR",code:"71",label:"Saône-et-Loire"},{region_id:254,country_id:"FR",code:"72",label:"Sarthe"},{region_id:255,country_id:"FR",code:"73",label:"Savoie"},{region_id:256,country_id:"FR",code:"74",label:"Haute-Savoie"},{region_id:257,country_id:"FR",code:"75",label:"Paris"},{region_id:258,country_id:"FR",code:"76",label:"Seine-Maritime"},{region_id:259,country_id:"FR",code:"77",label:"Seine-et-Marne"},{region_id:260,country_id:"FR",code:"78",label:"Yvelines"},{region_id:261,country_id:"FR",code:"79",label:"Deux-Sèvres"},{region_id:262,country_id:"FR",code:"80",label:"Somme"},{region_id:263,country_id:"FR",code:"81",label:"Tarn"},{region_id:264,country_id:"FR",code:"82",label:"Tarn-et-Garonne"},{region_id:265,country_id:"FR",code:"83",label:"Var"},{region_id:266,country_id:"FR",code:"84",label:"Vaucluse"},{region_id:267,country_id:"FR",code:"85",label:"Vendée"},{region_id:268,country_id:"FR",code:"86",label:"Vienne"},{region_id:269,country_id:"FR",code:"87",label:"Haute-Vienne"},{region_id:270,country_id:"FR",code:"88",label:"Vosges"},{region_id:271,country_id:"FR",code:"89",label:"Yonne"},{region_id:272,country_id:"FR",code:"90",label:"Territoire-de-Belfort"},{region_id:273,country_id:"FR",code:"91",label:"Essonne"},{region_id:274,country_id:"FR",code:"92",label:"Hauts-de-Seine"},{region_id:275,country_id:"FR",code:"93",label:"Seine-Saint-Denis"},{region_id:276,country_id:"FR",code:"94",label:"Val-de-Marne"},{region_id:277,country_id:"FR",code:"95",label:"Val-d'Oise"},{region_id:489,country_id:"FR",code:"971",label:"Guadeloupe"},{region_id:490,country_id:"FR",code:"972",label:"Martinique"},{region_id:491,country_id:"FR",code:"973",label:"Guyane"},{region_id:492,country_id:"FR",code:"974",label:"La Réunion"},{region_id:494,country_id:"FR",code:"975",label:"Saint Pierre et Miquelon"},{region_id:493,country_id:"FR",code:"976",label:"Mayotte"},{region_id:495,country_id:"FR",code:"977",label:"Saint Barthélemy"},{region_id:496,country_id:"FR",code:"978",label:"Saint Martin"},{region_id:497,country_id:"FR",code:"986",label:"Wallis et Futuna"},{region_id:498,country_id:"FR",code:"987",label:"Polynésie Française"},{region_id:499,country_id:"FR",code:"988",label:"Nouvelle Calédonie"}].map(e=>({id:e.code,label:`${e.code} - ${e.label}`,value:e.code})),{id:"born_abroad",label:"Né(e) à l'étranger",value:"99"}],rx={length:{min:8,max:20},number:!0,uppercase:!0,lowercase:!0,specialChars:!0},rf={[tW.M]:v.Civility.M,[tW.MME]:v.Civility.MME};function ry({person:e=null,user:t,isLoading:r=!1,redirectUrl:i}){let n=(0,eI.useRouter)(),{cart:s,addBuyerMutation:o}=(0,T.useContext)(b.CartContext),a=s?.buyer?.email,l=(0,tD.useMutation)({mutationFn:tY.createPerson,onError:e=>{console.error("Error creating person:",e)}}),c=(0,tD.useMutation)({mutationFn:r=>{if(!(e&&t))throw Error("Impossible de mettre à jour le compte");return tY.updateProspect(e?.id,r,t)}}),u=(0,tD.useMutation)({mutationFn:async e=>{}}),d=(0,H.useTrilogyForm)({formId:"prospect-form",defaultValues:{civility:"",lastName:"",firstName:"",birthDate:"",phoneNumber:"",password:"",prospectOptOut:!1,abandonedCartOptOut:!1,...e??{},birthRegion:e?.birthRegion??"default",email:a??e?.email??""},onSubmit:async({value:t})=>{if(e)e.isEditable&&await c.mutateAsync(t);else{let[e]=await Promise.all([l.mutateAsync(t),u.mutateAsync(t)]);(0,eC.signInWithTgtId)(e,i);return}let r=t.civility||void 0;await o.mutateAsync({email:t.email,civility:r?rf[r]:void 0,firstName:t.firstName,lastName:t.lastName,birthDate:t.birthDate,birthRegion:t.birthRegion,phoneNumber:t.phoneNumber}),i&&n.push(i)}});(0,W.useSubmitHandler)(d.handleSubmit);let p=(0,T.useMemo)(()=>r||d.state.isSubmitting,[r,d.state.isSubmitting]),m=(0,ri.useStore)(d.store,e=>e.isTouched);return(0,T.useEffect)(()=>{e&&!m&&d.validateAllFields("change").then(()=>{(0,t0.scrollToFirstError)()})},[e,m,d.validateAllFields]),(0,y.jsx)("form",{onSubmit:e=>{e.preventDefault(),d.handleSubmit()},children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,align:e_.Align.CENTER,gap:I.GapSize.FIVE,children:[!e&&(0,y.jsx)(eS.Box,{className:"is-fullwidth",children:(0,y.jsx)(eA.BoxContent,{className:"has-text-centered",children:(0,y.jsx)(j.FlexItem,{size:rm,children:(0,y.jsx)(rs,{isLoading:r,redirectUrl:i})})})}),(0,y.jsx)(eS.Box,{className:"is-fullwidth",children:(0,y.jsx)(eA.BoxContent,{children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,align:e_.Align.CENTER,gap:I.GapSize.FIVE,children:[(0,y.jsxs)(j.FlexItem,{size:rm,children:[(0,y.jsx)(el.Title,{level:ec.TitleLevels.FIVE,typo:eD.TypographyAlign.TEXT_CENTERED,className:p?"skeleton":"",children:e?"Mettre à jour vos informations personnelles":"Vous n'avez pas encore de compte ?"}),!e&&(0,y.jsx)(Q.Text,{typo:eD.TypographyAlign.TEXT_CENTERED,className:p?"skeleton":"",level:K.TextLevels.TWO,children:"Créez votre compte client pour continuer."})]}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:I.GapSize.FOUR,align:e_.Align.CENTER,children:[(0,y.jsx)(j.FlexItem,{size:rm,children:(0,y.jsx)(G.MandatoryField,{})}),(0,y.jsx)(j.FlexItem,{size:rm,children:(0,y.jsx)(d.AppField,{name:"civility",validators:{onChange:ro},children:t=>(0,y.jsx)(t.Radio,{horizontalMobile:!0,elements:[{id:"civility_mme",label:"Madame",value:tW.MME,dataCy:"radio_mme",required:!0,autoComplete:"sex",disabled:!!e?.civility||p},{id:"civility_m",label:"Monsieur",value:tW.M,dataCy:"radio_m",required:!0,autoComplete:"sex",disabled:!!e?.civility||p}]})})}),(0,y.jsx)(j.FlexItem,{size:rm,children:(0,y.jsx)(d.AppField,{name:"lastName",validators:{onChange:ra},children:t=>(0,y.jsx)(t.Input,{label:"Nom",required:!0,minLength:2,maxLength:32,"data-cy":"contact_lastName",autoCompleteType:"family-name",disabled:!!e?.lastName||p})})}),(0,y.jsx)(j.FlexItem,{size:rm,children:(0,y.jsx)(d.AppField,{name:"firstName",validators:{onChange:rl},children:t=>(0,y.jsx)(t.Input,{label:"Prénom",required:!0,minLength:2,maxLength:32,"data-cy":"contact_firstName",autoCompleteType:"given-name",disabled:!!e?.firstName||p})})}),(0,y.jsx)(j.FlexItem,{size:rm,children:(0,y.jsx)(d.AppField,{name:"birthDate",validators:{onChange:rc},children:t=>(0,y.jsx)(t.Input,{label:"Date de naissance",type:"date",required:!0,"data-cy":"contact_birthDate",autoCompleteType:"bday",disabled:!!e?.birthDate||p,min:"1900-01-01",max:new Date().toISOString().split("T")[0]})})}),(0,y.jsx)(j.FlexItem,{size:rm,children:(0,y.jsx)(d.AppField,{name:"birthRegion",validators:{onChange:ru},children:t=>(0,y.jsx)(t.Select,{label:"Département de naissance",required:!0,disabled:!!e?.birthRegion||p,"data-cy":"contact_dptBirth",elements:[{id:"default",label:"Choisir un département",disabled:!0,value:"default"},...rg]})})}),(0,y.jsx)(j.FlexItem,{size:rm,children:(0,y.jsx)(d.AppField,{name:"phoneNumber",validators:{onChange:rd},children:t=>(0,y.jsx)(t.Input,{label:"Numéro de téléphone mobile",sample:"Obligatoire pour l'envoi de votre suivi de commande par SMS",type:"tel",required:!0,"data-cy":"contact_phone",autoCompleteType:"tel",inputMode:"numeric",minLength:10,maxLength:10,disabled:!!e?.phoneNumber||p,onKeyDown:e=>{rh.has(e.key)||rt.test(e.key)||e.preventDefault()}})})}),(0,y.jsx)(j.FlexItem,{size:rm,children:(0,y.jsx)(d.AppField,{name:"email",validators:{onChange:({value:t})=>(function({value:e=""},t){if(0===e.length)return"Merci de renseigner votre adresse e-mail.";let r=e.split("@")[1]??"";return t&&rr.test(r)?"Il n'est pas possible de créer un compte en @bbox.fr":t2.test(e)?void 0:"Cette adresse email semble incorrecte. Merci de la vérifier et d'essayer à nouveau."})({value:t},!e),onSubmitAsync:({value:t})=>e?.email===t||a===t?Promise.resolve():tK.validateEmail(t,!e)},children:t=>(0,y.jsx)(t.Input,{label:"E-mail",type:"email",required:!0,maxLength:100,"data-cy":"contact_email",autoCompleteType:"email",disabled:p,help:e?'La modification de votre adresse email sera prise en compte uniquement dans le cadre de cette c
1ommande. Si vous souhaitez la modifier de façon permanente, rendez-vous dans "Mes infos Personnelles" de votre Espace Client, dès votre commande finalisée.':void 0})})}),!e&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(j.FlexItem,{size:rm,children:(0,y.jsx)(d.AppField,{name:"password",validators:{onChange:({value:e,fieldApi:t})=>{let r=t.form.getFieldValue("email");return e&&r&&e===r?"Ce mot de passe est incorrect : il ne doit pas être identique à l'email.":function({value:e},t){if(0===e.length)return"Merci de renseigner votre mot de passe.";if(t7.test(e))return"Ce mot de passe est incorrect : il contient des caractères non autorisés";if(rp(e,6,!0,!1)||rp(e,6,!1,!1))return"Ce mot de passe est incorrect : une suite de 6 chiffres n'est pas autorisée";if(rp(e,6,!0,!0)||rp(e,6,!1,!0))return"Ce mot de passe est incorrect : une suite de 6 lettres n'est pas autorisée";let r=t?.length?.min??0,i=t?.length?.max??1/0;if(!(RegExp(`^.{${r},${i}}$`).test(e)&&(!t.number||t5.test(e))&&(!t.uppercase||t9.test(e))&&(!t.lowercase||t4.test(e))&&(!t.specialChars||t8.test(e))))return"Toutes les exigences requises ne sont pas remplies"}({value:e},rx)}},children:e=>(0,y.jsx)(e.Input,{label:"Mot de passe",type:"password",required:!0,"data-cy":"contact_pwd",autoCompleteType:"new-password",spellCheck:!1,autoCapitalize:"none",disabled:p,securityGauge:!1,validationRules:rx})})}),(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.ONE}),(0,y.jsx)(j.FlexItem,{size:rm,children:(0,y.jsx)(d.AppField,{name:"prospectOptOut",children:e=>(0,y.jsx)(e.Checkbox,{disabled:p,label:"Je ne suis pas encore client et je m'oppose à ce que mes coordonnées postales et /ou mon numéro de téléphone soient utilisés pour recevoir des offres de Bouygues Telecom"})})}),(0,y.jsx)(j.FlexItem,{size:rm,children:(0,y.jsx)(d.AppField,{name:"abandonedCartOptOut",children:e=>(0,y.jsx)(e.Checkbox,{disabled:p,label:"Si je ne finalise pas ma commande, je m'oppose à recevoir mon panier par mail ou SMS"})})})]}),(0,y.jsx)(U,{className:"is-hidden-desktop is-hidden-tablet",testId:"continue-button"}),(0,y.jsxs)(j.FlexItem,{size:rm,children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.THREE,children:"Les informations recueillies sur ce formulaire sont enregistrées dans un fichier informatisé et traitées par Bouygues Telecom pour créer votre compte. Ces informations sont indispensables à la création de compte."}),(0,y.jsxs)(Q.Text,{level:K.TextLevels.THREE,marginless:!0,children:["Pour voir les détails sur la gestion de vos données personnelles et exercer vos droits, nous vous invitons à consulter notre"," ",(0,y.jsx)(Y.Link,{href:tt.paths.privacyPolicy,blank:!0,rel:"noopener noreferrer",children:"politique de confidentialité"}),"."]})]})]})})]})})})]})})}function rT(){let{user:e}=(0,X.useStableSession)(),{cart:t}=(0,T.useContext)(b.CartContext),r=t?.getJourneyOfType(v.JourneyType.FAI_ACQUISITION)?.getPrincipalProduct(),i=!!(r&&(0,P.isFtth3Clics)(r)),n=(0,T.useMemo)(()=>oT("Contact",t),[t]);(0,T.useEffect)(()=>{i&&!e&&(0,eC.signIn)(n)},[i,n,e]);let s=tU.includes(e?.user_type)?t?.buyer?.id:e?.sub,{data:o,isPending:a}=(0,td.useQuery)({queryKey:["person",s],queryFn:async()=>
1s?await tY.getPersonDetails(s,e)??null:null}),l=t?.buyer?.type===v.BuyerTypeEnum.PROSPECT_PRO;return((0,J.usePageViewTracking)({page:"Coordonnees",pageCategory:"Commande",eCommerceStep:"Checkout",variant:{...l?{siren:!0}:{}}}),i&&!e)?(0,y.jsx)(tZ.Loader,{}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(ry,{redirectUrl:n,person:o,user:e,isLoading:a}),(0,y.jsx)(tC.TriggerLogin,{callBackURL:n})]})}e.s(["CrossSell",()=>it],842687);var rv=e.i(915379);class rb extends Error{status;constructor(e,t){super(e,{cause:t?.cause}),this.name="SapicError",this.status=t?.status}}let rE=(0,_.getAppConfig)(),rC=new class{url;defaultGetProductsOptions={limit:12,fundingMode:"auto",withDetails:!1};constructor(e){this.url=e}async getProductsByGencodes(e,t,r,i={},n){try{let s=await this.contextualisedProducts({panier:t,referenceExterneParcoursCible:r},{limit:50,fundingMode:"tous",...i,gencodes:e},n);return{products:s.produits,count:s.nombreTotalProduits}}catch(e){if(i.throwOnError)throw e;return console.error("Error in getProductsByGencodes:",e),{products:[],count:0}}}async getProductsByCategory(e,t,r,i={},n){try{let s=await this.contextualisedProducts({panier:t,referenceExterneParcoursCible:r},{fundingMode:"tous",...i,category:e},n);return{products:s.produits,count:s.nombreTotalProduits}}catch(e){if(i.throwOnError)throw e;return console.error("Error in getProductsByCategory:",e),{products:[],count:0}}}async contextualisedProducts(e,t,r){let i={"x-version":rv.SAPIC_X_VERSION.V5},n=e.panier.acheteur,s=n&&"noPersonne"in n?n.noPersonne:void 0;!s&&r&&(s=await tY.getIdPuFromContract(r,t.contract));try{let n=this.generateSearchParam(t,s);return await S.apiHttpService.post(`${this.url}/catalogue/produits-contextualises?${n}`,e,{headers:i,user:s?r:void 0,ttl:parseInt(rE.cache.ttl.products,10),tags:[ew.PRODUCTS]})}catch(t){let e=t?.response?.status;throw console.error("Error fetching sapic products:",t),new rb("Could not fetch sapic products",{status:e,cause:t})}}generateSearchParam(e,t){let r=this.generateSearchParamBase(e,t),i="";if(e.filterByTypes&&(i=this.createFilter(e.filterByTypes)),e.play&&(i=i?`${i} and play = "${e.play}"`:`play = "${e.play}"`),e.filterByGencodes){let t=e.filterByGencodes.map(e=>`"${e}"`).join(",");i=`gencode in (${t})`}e.excludeCategoryType&&(i=i?`${i} and typeCategorieFai != "${e.excludeCategoryType}"`:`typeCategorieFai != "${e.excludeCategoryType}"`);let n={...r,...e.gencodes?.length&&{gencodes:e.gencodes.join(",")}};i&&(n.filtre=i),e.inStock&&(n.stock="enStock");let s={};for(let[e,t]of Object.entries(n))void 0!==t&&(s[e]=t.toString());return new URLSearchParams(s)}createFilter(e){let t=`type = "${e[0]}"`;if(e.length>0){let r=e.map(e=>`"${e}"`).join(",");t=`type in (${r})`}return t}generateSearchParamBase(e,t){let r={...this.defaultGetProductsOptions,...e};return{modePourFinancement:r.fundingMode,...r.priceFilter&&{prixReferencePourFiltre:r.priceFilter},...r.sort&&{tri:r.sort},detail:r?.withDetails?"1":void 0,limite:r.limit,...r.offset&&{decalage:r.offset},...r.priceSort&&{prixReferencePourTri:r.priceSort},...r.category&&{categorie:r.category},...r.categories&&{categorie:r.categories.join(",")},...r.gencodes?.length&&{gencodes:r.gencodes.join(",")},...t?{idPu:t}:{clientCategorie:"GP"},...e.searchParams}}}(rE.bytelApi.url);var rj=e.i(130557),rI=e.i(434496),r_=((u={}).UNLOCK="0",u.LOCK_OPTIONAL="1",u.LOCK_FORCED="2",u);(d={}).DEFAULT="default",d.CART="cart",d.OWNED="owned",d.URL="url";var rS=((p={}).MONTHLY_12="monthly12",p.MONTHLY_24="monthly24",p.NONE="none",p);(m={}).ODR="ODR",m.FIX="FIX",m.PERCENT="PERCENT";var rA=((h={}).STANDARD="PROMOTION_STANDARD",h.VARIABLE_AMOUNT="MONTANT_VARIABLE",h.COUPON="PROMOTION_COUPON",h);class rL{static discountMapper(e){return{type:rL.discountTypeMapper(e.type),label:e.identifiant,value:e.remiseCalculee.montant,discount:e.remiseCalculee.montant,duration:e.remiseCalculee.remise.duree}}static discountTypeMapper(e){switch(e){case"MONTANT_VARIABLE":return rA.VARIABLE_AMOUNT;case"PROMOTION_COUPON":return rA.COUPON;default:return rA.STANDARD}}}class rF{static productMapper(e,t=!1){let r=e?.modesDeFinancement?.map(rF.fundingMapper)??[],i=r?.[0],n=i?.initialDeposit??0,s=e.simulation;return{id:e.url??"",gencode:e.gencode,urlKey:e.url??"",url:tt.paths.productDetail(e.type,e.url??"",t),inStock:e.estEnStock??!1,brand:e.marque,name:e.nom??"",image:e.image??"",thumbnail:e.miniature,categories:e.categories??[],categoryOption:e.categorieOption??"",description:e.descriptionCourte??"",discountLabel:e.libellePromo,isHighlighted:e.misEnAvant??!1,stickers:e.etiquetteAnimCo?[{label:e.etiquetteAnimCo,color:"INFO"}]:void 0,price:n,recommended:e.recommande??!1,details:{price:{initial:e.prix?.initial??0,subsidized:e.prix?.subventionne??0,forever:e.prix?.pourToujours??0,final:e.prix?.final??0},discounts:e.promotions?.map(rF.discountMapper)??[],fundings:r},colors:e?.couleurs??[],subscribedOptions:e.optionsSouscrites,simulatedCart:rF.simulatedCartMapper(s),neededElements:e?.necessiteElements?.flatMap(e=>e.alternatives?.flatMap(e=>"ProduitCommercial"===e._type?[{gencode:e.identifiant,label:e.libelle}
1]:[]))}}static mobilePlanMapper(e,t,r=!1,i){let n=e.libelleEnveloppeVoix&&"Appels illimités"!==e.libelleEnveloppeVoix?`${e.libelleEnveloppeVoix} ${e.libelleEnveloppeData}`:e.libelleEnveloppeData;return{...rF.productMapper(e,r),gencode:e.gencode,price:e.prix?.initial??0,fundings:[],typeId:rF.sapicTypeToPlanType(e.type),obligation:e?.dureeEngagement??rS.NONE,obligationLabel:rF.obligationLabelMapper(e?.dureeEngagement),name:e.nom?.replace("Avantages Smartphone","")??"",dataEnvelope:e.libelleEnveloppeData??"",dataSize:parseInt(e.libelleEnveloppeData?.match(re)?.[1]??"0",10)??void 0,subTypeId:e.sousType??ta.CLASSIC,isDarwin:!1,hasLowPrice:!1,isExcluPro:e.excluPro??!1,renewalLabelDataEnvelope:n??"",commercialRange:rF.sapicRangeToCommercialRangeMapper(e.gammeCommerciale),position:t?.position?parseInt(t.position,10):0,catchyDescription:t?.catchy_description??"",fromAbroad:t?.from_abroad??"",hasDoubleSim:t?.double_sim??!1,internationalCall:t?.international_call??"",smsMms:t?.sms_mms??"",unlimitedCalls:t?.unlimited_call??"",shortDescription:t?.short_description??"",maxConnections:t?.max_connection??"",wordingBtv:t?.wording_btv??"",cmsContent:i?rF.mapCmsPlan(i):void 0}}static simMapper(e){return{...rF.productMapper(e,!1),preferred:e.prefere??!1,isCompatibleWithDevice:e.terminalCompatible??!1,isCurrentSimCompatible:e.simCompatible??!1,type:e.type??""}}static optionsMapper(e,t){return{url:"",...rF.productMapper(e,!1),...t}}static fundingMapper(e){let t=e.propositionsCommerciales[0];if(!t)throw Error("No funding data available");let{type:r,key:i}=v.FundingFactory.splitKey(e.type);return"EDP"===e.type&&(i=v.FundingKey.EDP,r=v.FundingType.EDP),new v.FundingModel({type:r,key:i,installments:t.nbrEcheances,label:e.libelle,initialDeposit:t.apportInitial,amountToFinance:t.montantAFinancer,totalFinancingCost:t.coutTotalFinancement,APR:t.tAEG,interestAmount:t.montantInterets,fixedInterestRate:t.tauxDebiteurFixe,monthlyAmount:t.montantMensualite})}static discountMapper(e){return{type:e.type,value:e.valeur,label:e.identifiant,discount:e.reduction,isIncitation:e.estIncitation,isDiffered:e.estDifferee,duration:e.duree??1/0,marketingTypes:e.proprietesSupplementaires?.typesMarketing??[],pennant:e.proprietesSupplementaires?.fanion}}static simulatedCartMapper(e){if(!e?.panier.parcours)return;let t=e.financements.parcours.reduce((e,t)=>{for(let r of t.elementsPanier)e[r.composantCommercial.identifiant]=r;return e},{});return{quotes:e.panier.parcours.map(e=>rF.simulatedQuoteMapper(e,t)),fundings:e.financements.modesFinancement.map(rF.fundingMapper)}}static simulatedQuoteMapper(e,t){return{products:e.elements.map(e=>rF.simulatedProductsMapper(e,t[e.composantCommercial.identifiant])),type:e.typeParcours,current:"VALIDE"===e.statut}}static sapicTypeToPlanType(e){return Object.values(to).find(t=>t===e)??to.DEFAULT}static obligationLabelMapper(e){switch(e){case rS.MONTHLY_24:return"engagement 24 mois";case rS.MONTHLY_12:return"engagement 12 mois";default:return"sans engagement"}}static sapicRangeToCommercialRangeMapper(e){switch(e){case"forfait_sans_mobile":return tc.WITHOUT_MOBILE;case"forfait_avec_mobile":return tc.WITH_MOBILE;case"b_you":return tc.B_YOU;default:return tc.DEFAULT}}static simulatedProductsMapper(e,t){return{gencode:e.composantCommercial.identifiant,details:{price:{initial:e.prixAffiche?.prixCatalogue??0,final:e.prixAffiche?.prixAvecPromotions??0,forever:e.prixAffiche?.prixPourToujours??0,subsidized:e.prixAffiche?.prixPourToujours,type:e.prixAffiche?.type},discounts:e.promotionsCalculees?.promotionsAppliquees.map(rL.discountMapper)??[],fundings:t?.modesFinancementsElementPanier?.map(rF.fundingMapper)??[]}}}static mapCmsPlan(e){if(e)return{addedPepites:e.add_pepites?.map(e=>({pepite:e.pepite??"",icon:e.icon_trilogy??""})),bigBenefit:e.big_benefit_text??"",modalCustomDestinationPartial:e.modal_destination_custom_partial??""}}}let rk=new class{async getContextualizedProductsByGencodes(e,t,r=[],i){let n=v.CartFactory.toRequestBody(e);return(await rC.getProductsByGencodes(r,n,t,{inStock:!0,filterByTypes:[rj.ProductType.ACCESSORY,rj.ProductType.OFFER_PARTNER,rj.ProductType.OPTION_DEFAULT,rj.ProductType.OPTION_SALABLE]},i)).products.map(e=>rF.productMapper(e,t===v.JourneyType.RENEWAL))}async getProductsByGencode(e){return(await tX.getProductsByGencodes(e)).produits}async getCrossSellProductsByGencodes(e,t,r,i=[],n){let[s,o,a]=await Promise.all([this.getContextualizedProductsByGencodes("options"===e?this.getCartWithoutOptions(t):t,r,i,n),"options"===e?this.getContextualizedProductsByGencodes(t,r,i,n):void 0,tX.getProductsByGencodes(i)]),l=o?.map(e=>e.gencode);return s.reduce((e,t)=>
1{if(t.categories?.includes(rI.SapicCategoryId.PARENTAL_CONTROL))return e;let r=a.produits[t.gencode];return e.push({...t,isPartner:r?.type_id==="offer_partner",promoLabel:r?.wording_promo??"",packContent:r?.pack_content??"",features:r?.features??"",label:r?.label,ecoTax:r?.ecotax?Number(r.ecotax):void 0,description:r?.description,shortDescription:r?.short_description,isCompatible:!l||l.includes(t.gencode)}),e},[]).sort((e,t)=>e.isHighlighted!==t.isHighlighted?e.isHighlighted?-1:1:i.indexOf(e.gencode)-i.indexOf(t.gencode))}getCartWithoutOptions(e){let t=(0,tO.cloneCart)(e);for(let e of t?.journeys??[])e.setProducts(e.products.filter(e=>!e.isType(v.ProductType.OPTION)));return t}};function rN(e){let t=e?.journeys?.some(e=>e.getMissingPortabilityProducts()?.length>0);return!!e&&!t}var rM=e.i(619273),rO=e.i(332632),rO=rO,rR=e.i(751531),rR=rR,rD=e.i(102605),rw=e.i(976670),rP=e.i(657688);let rB=(0,_.getAppConfig)();function rz({src:e}){return rB.thumbor.active?`${rB.thumbor.url}/full${e}`:`${rB.assets.images.url}${e}`}function rV({position:e=99,alt:t,fill:r,...i}){return(0,y.jsx)("div",{className:"image is-flex is-centered",children:(0,y.jsx)(rP.default,{priority:e<6,loader:rz,alt:t,...i,fill:r})})}function rW({position:e=99,alt:t,fill:r,className:i="",...n}){return(0,y.jsx)("div",{className:"card-image is-3 is-flex",children:(0,y.jsx)(rP.default,{priority:e<6,loader:rz,alt:t,fill:r,className:(0,ts.classNames)(i,"is-fullwidth is-vcentered"),...n})})}var rU=e.i(298600);function rH({crossSellItem:e,isInCart:t,onAddProduct:r,onRemoveProduct:i,isLoading:n,onClickShowDetails:s,isOption:o}){let a=e.thumbnail??e.image??"";return(0,y.jsxs)(eS.Box,{fullheight:!0,headerOffset:!e.label,"data-gencode":e.gencode,testId:"cross-sell-btn",children:[e.label&&(0,y.jsx)(rO.default,{align:e_.Align.CENTER,variant:eT.TrilogyColor.INFO,children:e.label}),(0,y.jsx)(eA.BoxContent,{children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,justify:eZ.Justify.SPACE_BETWEEN,gap:I.GapSize.FOUR,fullheight:!0,children:[(0,y.jsx)(j.FlexItem,{children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:I.GapSize.FOUR,children:[!!a&&(0,y.jsx)("div",{className:`card-image-wrapper ${o?"is-option":""}`,children:(0,y.jsx)(rV,{src:`/${a}`,alt:"",fill:!0})}),(0,y.jsx)(el.Title,{markup:ec.TitleMarkup.H4,level:ec.TitleLevels.FIVE,typo:eD.TypographyAlign.TEXT_CENTERED,className:"cross-sell-title",children:e.name})]})}),(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:I.GapSize.FOUR,justify:eZ.Justify.END,children:[(0,y.jsx)(Q.Text,{marginless:!0,className:"promo-label",typo:[rw.TypographyColor.TEXT_INFO,eD.TypographyAlign.TEXT_CENTERED,eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD],children:e.promoLabel}),(0,y.jsxs)(j.FlexItem,{children:[(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,justify:eZ.Justify.CENTER,className:"is-marginless",children:[!!e.promoLabel&&!e.isPartner&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{markup:K.TextMarkup.SPAN,children:"puis"})," "]}),(0,y.jsx)(Q.Text,{markup:K.TextMarkup.SPAN,children:(0,y.jsx)(rR.default,{level:rD.PriceLevel.SIX,amount:e.details.price.forever,align:e_.Align.CENTER,period:o?"mois":void 0})})]}),(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.TWO}),(0,y.jsx)(Q.Text,{level:K.TextLevels.FOUR,typo:eD.TypographyAlign.TEXT_CENTERED,children:!!e.ecoTax&&(0,y.jsxs)(y.Fragment,{children:["dont ",(0,rU.formatPrice)(e.ecoTax)," d'éco-participation"]})})]}),!!e.shortDescription&&(0,y.jsx)(e8,{className:"has-text-centered",content:e.shortDescription}),(0,y.jsx)(B.Button,{variant:t?z.ButtonVariant.SECONDARY:z.ButtonVariant.CONVERSION,loading:n,disabled:n||!e.isCompatible,testId:"card-btn",onClick:t?()=>i(e.gencode):()=>r(e.gencode),children:t?"Supprimer":"Ajouter"}),(0,y.jsx)(te.ButtonClear,{onClick:()=>s?.(e),children:"En savoir plus"})]})})]})})]})}var rG=e.i(493288),rq=e.i(248562),rR=rR;function r$({crossSellItem:e,isInCart:t,isReversed:r,onAddProduct:i,onRemoveProduct:n,isLoading:s,onClickShowDetails:o}){let a=e.shortDescription,l=e.thumbnail??e.image??"";return(0,y.jsxs)(rG.Card,{horizontal:!0,className:r?"is-reversed-tablet":"","data-gencode":e.gencode,testId:"highlighted-card",children:[!!l&&(0,y.jsx)(rW,{src:l,alt:"",className:"is-object-fit-contain",width:600,height:200}),(0,y.jsx)(rq.CardContent,{className:"has-text-centered",children:(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.END,direction:E.DirectionEnum.COLUMN,gap:I.GapSize.THREE,fullheight:!0,children:[(0,y.jsx)(el.Title,{level:ec.TitleLevels.THREE,markup:ec.TitleMarkup.H4,children:e.name}),a&&(0,y.jsx)("p",{dangerouslySetInnerHTML:{__html:a}}),(0,y.jsxs)(j.FlexItem,{children:[(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,direction:E.DirectionEnum.COLUMN,children:[!!e.promoLabel&&(0,y.jsx)(Q.Text,{typo:[rw.TypographyColor.TEXT_INFO,eD.TypographyAlign.TEXT_CENTERED,eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD],children:e.promoLabel}),(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,justify:eZ.Justify.CENTER,className:"is-marginless",children:[!!e.promoLabel&&!e.isPartner&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{markup:K.TextMarkup.SPAN,children:"puis"})," "]}),(0,y.jsx)(Q.Text,{markup:K.TextMarkup.SPAN,children:(0,y.jsx)(rR.default,{level:rD.PriceLevel.FIVE,amount:e.details.price.forever,align:e_.Align.CENTER,period:"mois"})})]})]}),(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.TWO})]}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(B.Button,{variant:t?z.ButtonVariant.SECONDARY:z.ButtonVariant.CONVERSION,loading:s,disabled:s||!e.isCompatible,testId:"highlighted-btn",onClick:t?()=>n(e.gencode):()=>i(e.gencode),children:t?"Supprimer":"Ajouter"})}),(0,y.jsx)(te.ButtonClear,{onClick:()=>o?.(e),children:"En savoir plus"})]})})]})}function rJ({isReversed:e}){return(0,y.jsx)(rG.Card,{horizontal:!0,reversed:e,children:(0,y.jsx)(rq.CardContent,{className:"has-text-centered",children:(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.END,direction:E.DirectionEnum.COLUMN,align:e_.Align.CENTER,gap:I.GapSize.THREE,fullheight:!0,children:[(0,y.jsx)(el.Title,{className:"skeleton w-fit",level:ec.TitleLevels.THREE,markup:ec.TitleMarkup.H4,children:"Lorem ipsum dolor sit"}),(0,y.jsx)(Q.Text,{typo:eD.TypographyAlign.TEXT_CENTERED,className:"skeleton w-fit",level:K.TextLevels.ONE,marginless:!0,children:"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy ut labore et dolore magna aliq"}),(0,y.jsxs)(j.FlexItem,{children:[(0,y.jsx)(rR.default,{className:"skeleton",level:rD.PriceLevel.THREE,amount:100,period:"mois",align:e_.Align.CENTER}),(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.TWO})]}),(0,y.jsx)(B.Button,{disabled:!0,children:"Ajouter"})]})})})}var rX=e.i(57438),rY=e.i(344e3),rZ=e.i(756496),rZ=rZ,rQ=e.i(284757),rQ=rQ,rK=e.i(620607);e.i(625532),e.i(68564),e.i(743742),e.i(729045),e.i(25849),e.i(510811),e.i(933863),e.i(670703),e.i(910973),e.i(621080),e.
1i(876267),e.i(542788),e.i(871615),e.i(630076),e.i(821390),e.i(451004),e.i(298606),e.i(348788),e.i(973309),e.i(942893),e.i(195277),e.i(447748),e.i(807043),e.i(720018),e.i(389722),e.i(674579),e.i(576740),e.i(797923),e.i(659538),e.i(634954),e.i(2550),e.i(872788),e.i(289054),e.i(53097),e.i(307307),e.i(8201),e.i(218289),e.i(622328),e.i(757826),e.i(687507),e.i(254070),e.i(2054),e.i(787135),e.i(524589),e.i(368515),e.i(345173),e.i(701184),e.i(628027),e.i(563614),e.i(809487),e.i(253281),e.i(675447),e.i(28283),e.i(548303),e.i(672213).default,e.i(708796),e.i(229410),e.i(310251),e.i(679950),e.i(292421),e.i(262958),e.i(998603),e.i(864638),e.i(923248),e.i(397728),e.i(958250);var r0=e.i(173993);e.i(269829),e.i(318849),e.i(305236),e.i(948999),e.i(412659).default,e.i(125027),e.i(988689),e.i(806692),e.i(953386),e.i(693538),e.i(290571),e.i(85864),e.i(42746),e.i(69932),e.i(577395);var r1=e.i(652088);function r2({size:e="medium",color:t,isFocus:r=!1,shadowless:i}){let n=(0,ts.classNames)("color",(0,r1.is)(e),r?(0,r1.is)("focus"):"","#FFFFFF"===t?"has-border-solid-grey":"",i?(0,r1.is)("shadowless"):"");return(0,y.jsx)("div",{className:n,style:{backgroundColor:t}})}function r3({color:e,colorCode:t}){return(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,justify:eZ.Justify.CENTER,children:[(0,y.jsx)(Q.Text,{typo:[eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,rK.TypographyTransform.TEXT_UPPERCASE],marginless:!0,children:e}),t&&(0,y.jsx)(r2,{color:t,shadowless:!0})]})}(g={}).SMALLER="smaller",g.SMALL="small",g.MEDIUM="medium",g.LARGE="large",g.HUGE="huge";var rR=rR;function r5({crossSellItem:e,isCentered:t=!0}){return e.isPartner?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(rR.default,{level:rD.PriceLevel.SIX,amount:e.details.price.forever,period:"mois",align:e_.Align.CENTER}),(0,y.jsx)(Q.Text,{marginless:!0,typo:[rw.TypographyColor.TEXT_INFO,t?eD.TypographyAlign.TEXT_CENTERED:eD.TypographyAlign.TEXT_LEFT,eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD],children:e.promoLabel})]}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{marginless:!0,typo:[rw.TypographyColor.TEXT_INFO,t?eD.TypographyAlign.TEXT_CENTERED:eD.TypographyAlign.TEXT_LEFT,eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD],children:e.promoLabel}),(0,y.jsxs)(Q.Text,{className:"is-inline-flex is-aligned-center is-centered ",children:[!!e.promoLabel&&(0,y.jsx)(Q.Text,{markup:K.TextMarkup.SPAN,level:K.TextLevels.ONE,typo:eD.TypographyAlign.TEXT_CENTERED,marginless:!0,children:"puis"})," ",(0,y.jsxs)(Q.Text,{markup:K.TextMarkup.SPAN,children:[(0,y.jsx)(rR.default,{level:rD.PriceLevel.SIX,amount:e.details.price.forever,period:"mois",align:e_.Align.CENTER}),!!e.ecoTax&&(0,y.jsxs)(Q.Text,{level:K.TextLevels.FOUR,marginless:!0,children:["dont ",(0,rU.formatPrice)(e.ecoTax),"d'éco-participation"]})]})]})]})}function r9({onClose:e,item:t,isOption:r,isAdded:i,onAdd:n,onRemove:s,isLoading:o}){let{data:a,isLoading:l}=(0,td.useQuery)({queryKey:["product-detail",t?.gencode],queryFn:()=>tX.getProductByAttribute(t?.gencode),enabled:!!t?.gencode});if(!t)return null;let c=[{label:"Dimensions",value:[a?.width,a?.length,a?.depth].filter(Boolean).map(e=>e?`${e.split(".")[0]} cm`:"").join(" / ")},{label:"Poids net",value:a?.weight},{label:"Matière",value:a?.material},{label:"Contenu du pack",value:t.packContent,isHtml:!0},{label:"Description",value:t.features,isHtml:!0}].filter(e=>!!e.value&&!e.value?.trim().startsWith("<!--"));return(0,y.jsxs)(e0.Modal,{title:t.name,active:!!t,onClose:e,size:rY.ModalSize.MEDIUM,children:[(0,y.jsx)(e1.ModalBody,{children:l?(0,y.jsx)(r4,{}):r?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(e8,{as:"p",content:a?.description}),(0,y.jsx)(r5,{crossSellItem:t,isCentered:!1}),!!a?.obligation&&(0,y.jsx)(Q.Text,{children:function(e){if(!e)return null;switch(e){case"monthly12":return"Engagement 12 mois";case"monthly24":return"Engagement 24 mois";default:return null}}(a?.obligation)})]}):(0,y.jsxs)(C.FlexBox,{gap:I.GapSize.FOUR,direction:E.DirectionEnum.COLUMN,children:[a?.medias&&a.medias.length>0&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(rZ.default,{doted:a.medias.length>3,invertedDoted:!0,motionLess:a.medias.length<=3,children:a.medias.map(e=>(0,y.jsx)(rQ.default,{size:4,children:(0,y.jsx)(rV,{src:`/${e}`,className:"accessory-image",alt:"",width:200,height:200})},e))}),(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.TWO})]}),a?.color&&a?.color_code&&(0,y.jsx)(r3,{color:a.color,colorCode:a.color_code}),c.map(e=>(0,y.jsxs)(j.FlexItem,{children:[(0,y.jsxs)(Q.Text,{marginless:!0,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:[e.label," :"]}),e.isHtml?(0,y.jsx)(e8,{content:e.value}):(0,y.jsx)(Q.Text,{children:e.value})]},e.label)),(0,y.jsx)(r5,{crossSellItem:t})]})}),(0,y.jsx)(e2.ModalFooter,{children:(0,y.jsxs)(rX.ButtonList,{children:[(0,y.jsx)(B.Button,{variant:z.ButtonVariant.SECONDARY,onClick:e,children:"Fermer"}),(0,y.jsx)(B.Button,{variant:i?z.ButtonVariant.SECONDARY:z.ButtonVariant.CONVERSION,onClick:i?s:n,loading:o||l,disabled:o||l,children:i?"Supprimer":"Ajouter"})]})})]})}function r4(){return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,className:"skeleton w-fit",children:"skeleton content skeleton content"}),(0,y.jsx)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,className:"skeleton",children:"skeleton content skeleton content"}),(0,y.jsx)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,className:"skeleton w-fit",children:"skeleton content skeleton content skeleton content skeleton content"}),(0,y.jsx)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,className:"skeleton",children:"skeleton content skeleton content"}),(0,y.jsx)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,className:"skeleton w-fit",children:"skeleton content skeleton content skeleton content skeleton content"})]})}function r6({title:e,items:t=[],isOptions:r,journeyType:i,isFull:n,onToggleFull:s}){let{cart:o,addProductsToCartMutation:a,removeProductFromCartMutation:l}=(0,T.useContext)(b.CartContext),[c,u]=(0,T.useState)(null),d=o?.getJourneyOfType(i),p=d?.products?.map(e=>e.gencode)??[],m=(0,tD.useMutation)({mutationFn:async e=>{await a.mutateAsync({gencodes:[e],journey:i})}}),h=(0,tD.useMutation)({mutationFn:async e=>{await l.mutateAsync({gencode:e,journey:i})}}),g=(0,T.useMemo)(()=>t.filter(e=>e.isHighlighted),[t]),x=(0,T.useMemo)(()=>t.filter(e=>!e.isHighlighted),[t]),f=(0,T.useMemo)(()=>t.filter(e=>!e.isHighlighted).length>3,[t]),v=(0,T.useMemo)(()=>{let e=r?"options":"accessoires";return n?`Voir moins d'${e}`:`Voir tous les ${e}`},[n,r]),E=(0,T.useMemo)(()=>m.isPending||h.isPending,[m.isPending,h.isPending]),_=e=>{u(e)};return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(el.Title,{level:ec.TitleLevels.FIVE,children:e}),(0,y.jsxs)(C.FlexBox,{wrap:!0,gap:I.GapSize.FIVE,children:[g.map((e,t)=>(0,y.jsx)(j.FlexItem,{size:12,children:(0,y.jsx)(r$,{crossSellItem:e,isInCart:p.includes(e.gencode),isReversed:t%2==1,onAddProduct:e=>m.mutate(e),onRemoveProduct:e=>
1h.mutate(e),isLoading:E,isOption:r,onClickShowDetails:_})},e.gencode)),(n?x:x.slice(0,3)).map(e=>(0,y.jsx)(j.FlexItem,{size:{mobile:12,tablet:4},children:(0,y.jsx)(rH,{crossSellItem:e,isInCart:p.includes(e.gencode),onAddProduct:e=>m.mutate(e),onRemoveProduct:e=>h.mutate(e),onClickShowDetails:_,isLoading:E,isOption:r})},e.gencode))]}),f&&(0,y.jsx)(eS.Box,{children:(0,y.jsx)(eA.BoxContent,{className:"has-text-centered",children:(0,y.jsx)(B.Button,{variant:z.ButtonVariant.SECONDARY,onClick:s,testId:"toggle-btn",children:v})})}),(0,y.jsx)(r9,{onClose:()=>u(null),item:c,isOption:r,isAdded:!!c&&p.includes(c.gencode),onAdd:()=>m.mutate(c.gencode),onRemove:()=>h.mutate(c.gencode),isLoading:!!c&&E})]})}function r8(){return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(el.Title,{className:"skeleton w-fit",level:ec.TitleLevels.FIVE,children:"Lorem ipsum dolor"}),(0,y.jsx)(C.FlexBox,{wrap:!0,gap:I.GapSize.FIVE,children:["card1","card2","card3"].map((e,t)=>(0,y.jsx)(j.FlexItem,{size:12,children:(0,y.jsx)(rJ,{isReversed:t%2==1})},e))})]})}function r7({currentModule:e}){let{cart:t}=(0,T.useContext)(b.CartContext),{user:r}=(0,X.useStableSession)(),i=(0,eI.useRouter)(),n=t?.isMixedCart(),s=t?.journeys[0],o=t?.journeys[1],[a,l]=(0,T.useState)(s),[c,u]=(0,T.useState)(!1),[d,p]=(0,T.useState)(!1),m=a?.type===v.JourneyType.FAI_ACQUISITION?"Complements_options_fai":"Complements_options_mobiles",h=a?.getPrincipalProduct();(0,J.usePageViewTracking)({page:m,pageCategory:"Commande",eCommerceStep:"Checkout"});let g=(0,td.useQuery)({queryKey:["cross-sell","options",t,a?.type,h?.metadata?.upSellsProducts],queryFn:()=>rk.getCrossSellProductsByGencodes("options",t,a.type,h.metadata.upSellsProducts,r),enabled:!!h,placeholderData:rM.keepPreviousData}),x=(0,td.useQuery)({queryKey:["cross-sell","accessories",a?.type,h?.metadata?.crossSellsProducts],queryFn:()=>rk.getCrossSellProductsByGencodes("accessories",t,a.type,h.metadata.crossSellsProducts,r),enabled:!!a&&!n,placeholderData:rM.keepPreviousData}),f=(0,T.useMemo)(()=>oT(e,t),[t,e]),I=(0,T.useCallback)(()=>{if(n&&a?.type===s?.type)return void l(o);if(rN(t)){let e=oy.find(e=>"Contact"===e.key);e?.isValid?.(t)&&(0,e$.sendPageViewTracking)(t,{page:"Coordonnees",pageCategory:"Commande",eCommerceStep:"Checkout"}),i.push(f)}},[n,a?.type,s?.type,o,t,i,f]);return((0,W.useSubmitHandler)(()=>I()),(0,T.useEffect)(()=>{let e=g.isPending||x.isPending,t=!!((g.data?.length??0)+(x.data?.length??0));e||t||I()},[g.isPending,x.isPending,g.data,x.data,I]),t&&a)?g.isLoading?(0,y.jsx)(r8,{}):(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,mobile:!0,gap:8,children:[!!g.data?.length&&(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(r6,{title:`Options ${a.type===v.JourneyType.FAI_ACQUISITION?"Bbox":"Mobile"}`,items:g.data,journeyType:a.type,isOptions:!0,isFull:c,onToggleFull:()=>u(e=>!e)})}),a.type===v.JourneyType.FAI_ACQUISITION&&!t.isMixedCart()&&!!x.data?.length&&(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(r6,{title:"Accessoires Bbox",items:x.data,journeyType:a.type,isFull:d,onToggleFull:()=>p(e=>!e)})})]}):null}function ie(){return(0,y.jsx)(r8,{})}function it({currentModule:e}){let{isLoading:t}=(0,T.useContext)(b.CartContext);return t?(0,y.jsx)(ie,{}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(r7,{currentModule:e}),(0,y.jsx)(tC.TriggerLogin,{})]})}var ir=e.i(602498);e.s(["Delivery",()=>nv],66675);var eH=eH;let ii=(0,_.getAppConfig)(),is=new class{url;constructor(e){this.url=e}async getPostalAddress(e,t){let r=await S.apiHttpService.get(`${this.url}${e}`,void 0,{user:t}).catch(()=>void 0);return{city:r?.ville??"",streetNumber:r?.numero,street:r?.rue,zipCode:r?.codePostal,complement:"",isChecked:!1}}}(ii.bytelApi.url),io=new class{async getAddressFromContracts(e,t){let r=await this.get
1SignedContracts(e,t),i=this.findRelevantContract(r),n=i?._links.personPostalAddress.href;if(n)return await is.getPostalAddress(n,t)}async getSignedContracts(e,t){return await tV.contractsRepository.getSignedContracts(e,t)}findRelevantContract(e){let t=e.filter(e=>"ACTIF"===e.status),r=t.filter(e=>"FNB"===e.marketLine);if(r.length>0)return this.findMostRecent(r);let i=t.filter(e=>"FAI"===e.marketLine);if(i.length>0)return this.findMostRecent(i)}findMostRecent(e){return e.toSorted((e,t)=>new Date(t.creationDate).getTime()-new Date(e.creationDate).getTime())[0]}};class ia{static deliveryModeMapper(e){return e?.livraisons?e.livraisons.flatMap(({modesLivraisonPossibles:e,produits:t})=>e.map(e=>({gencode:e.gencode,name:e.libelle,price:e.prix,estimatedDeliveryDate:e.dateLivraisonEstimee,latestDeliveryDate:e.dateLivraisonEstimeeAuPlusTard,products:v.ShippingFactory.createShippedProductsFromVapiResponse(t),priceType:e.typePrix}))):[]}static simulatedDeliveryModeMapper(e){return e.map(e=>({gencode:e.gencode,name:e.libelle,price:e.prix,estimatedDeliveryDate:e.dateLivraisonEstimee,latestDeliveryDate:e.dateLivraisonEstimeeAuPlusTard,priceType:e.typePrix}))}}let il=(0,_.getAppConfig)(),ic=new class{url;constructor(e){this.url=e}async getEligibleDeliveryModes(e,t,r){return await S.apiHttpService.post(`${this.url}/paniers/${e}/modes-livraison-eligibles`,{adresseLivraison:t},{user:r}).then(e=>ia.deliveryModeMapper(e.livraisonsPossibles?.[0]))}async getSimulatedDeliveryModes(e,t){return await S.apiHttpService.post(`${this.url}/paniers/simulation-modes-livraison-eligibles`,{parcours:[{elements:e.map((e,t)=>({composantCommercial:{identifiant:e},referenceExterne:`product-${t}`})),type:"ACQUISITION",referenceExterne:"referenceExterne-parcours"}],acheteur:{type:v.BuyerTypeEnum.PROSPECT_GP},adresseLivraison:{codePostal:"75000",pays:"FRANCE",ville:"PARIS"}},{user:t}).then(e=>ia.simulatedDeliveryModeMapper(e.livraisonsPossibles[0]?.livraisons[0]?.modesLivraisonPossibles??[]))}async getDeliveryBanners(){return await S.apiHttpService.get(`${il.assets.palpatine.checkoutApi}/checkout_banner`).then(e=>e.items.map(e=>({id:e.id,color:e.color,title:e.title,text:e.text,startDate:e.start_date,endDate:e.end_date}))).catch(()=>[])}}(il.bytelApi.url);var iu=e.i(537090);let id=(0,_.getAppConfig)(),ip=`${id.assets.palpatine.mediaLibrary}/original/CMS/ecommerce/checkout/livraison/transporteurs`;function im(e){return!!(e.civility&&e.lastName&&e.firstName)}var ih=e.i(234662),ig=e.i(677241);function ix(e,t){let r,i,n=()=>(0,ig.constructFrom)(t?.in,NaN),s=t?.additionalDigits??2,o=function(e){let t,r={},i=e.split(iy);if(i.length>2)return r;if(/:/.test(i[0])?t=i[0]:(r.date=i[0],t=i[1],iT.test(r.date)&&(r.date=e.split(iT)[0],t=e.substr(r.date.length,e.length))),t){let e=iv.exec(t);e?(r.time=t.replace(e[1],""),r.timezone=e[1]):r.time=t}return r}(e);if(o.date){let e=function(e,t){let r=RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),i=e.match(r);if(!i)return{year:NaN,restDateString:""};let n=i[1]?parseInt(i[1]):null,s=i[2]?parseInt(i[2]):null;return{year:null===s?n:100*s,restDateString:e.slice((i[1]||i[2]).length)}}(o.date,s);r=function(e,t){var r,i,n,s,o,a,l,c,u,d;if(null===t)return new Date(NaN);let p=e.match(ib);if(!p)return new Date(NaN);let m=!!p[4],h=ij(p[1]),g=ij(p[2])-1,x=ij(p[3]),f=ij(p[4]),y=ij(p[5])-1;if(m){let e,a;return(r=f,i=y,r>=1&&r<=53&&i>=0&&i<=6)?(n=t,s=f,o=y,(e=new Date(0)).setUTCFullYear(n,0,4),a=e.getUTCDay()||7,e.setUTCDate(e.getUTCDate()+((s-1)*7+o+1-a)),e):new Date(NaN)}{let e=new Date(0);return(a=t,l=g,c=x,l>=0&&l<=11&&c>=1&&c<=(i_[l]||(iS(a)?29:28))&&(u=t,(d=h)>=1&&d<=(iS(u)?366:365)))?(e.setUTCFullYear(t,g,Math.max(h,x)),e):new Date(NaN)}}(e.restDateString,e.year)}if(!r||isNaN(+r))return n();let a=+r,l=0;if(o.time&&isNaN(l=function(e){var t,r,i;let n=e.match(iE);if(!n)return NaN;let s=iI(n[1]),o=iI(n[2]),a=iI(n[3]);return(t=s,r=o,i=a,24===t?0===r&&0===i:i>=0&&i<60&&r>=0&&r<60&&t>=0&&t<25)?s*ih.millisecondsInHour+o*ih.millisecondsInMinute+1e3*a:NaN}(o.time)))return n();if(o.timezone){if(isNaN(i=function(e){var t;if("Z"===e)return 0;let r=e.match(iC);if(!r)return 0;let i="+"===r[1]?-1:1,n=parseInt(r[2]),s=r[3]&&parseInt(r[3])||0;return(t=s)>=0&&t<=59?i*(n*ih.millisecondsInHour+s*ih.millisecondsInMinute):NaN}(o.timezone)))return n()}else{let e=new Date(a+l),r=(0,L.toDate)(0,t?.in);return r.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),r.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),r}return(0,L.toDate)(a+l+i,t?.in)}let iy=/[T ]/,iT=/[Z ]/i,iv=/([Z+-].*)$/,ib=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,iE=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}
1(?:[.,]\d*)?))?$/,iC=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ij(e){return e?parseInt(e):1}function iI(e){return e&&parseFloat(e.replace(",","."))||0}let i_=[31,null,31,30,31,30,31,31,30,31,30,31];function iS(e){return e%400==0||e%4==0&&e%100!=0}let iA=new class{async getDeliveryModes(e,t,r){let[i,n]=await Promise.all([ic.getEligibleDeliveryModes(e,{rue:t.street,numero:t.streetNumber?parseInt(t.streetNumber,10):void 0,codePostal:t.zipCode??"",ville:t.city,complementAdresse1:t.complement},r),tX.getCategoriesDetails([rI.SapicCategoryId.DELIVERY_STORE,rI.SapicCategoryId.DELIVERY_PICKUP,rI.SapicCategoryId.DELIVERY_HOME])]);return i.map(e=>{let t=Object.entries(n).find(([,t])=>t.products.includes(e.gencode))?.[0],r=t?n[t]?.name:void 0;if(t)return{...e,name:v.ShippingFactory.formatDeliveryModeName(e.name),category:{code:t,name:((e,t)=>{switch(e){case rI.SapicCategoryId.DELIVERY_PICKUP:return"Livraison en relais";case rI.SapicCategoryId.DELIVERY_STORE:return"à récupérer en boutique";case rI.SapicCategoryId.DELIVERY_HOME:return"Livraison à domicile";default:return t}})(t,r??t)}}}).filter(e=>void 0!==e).sort((e,t)=>e.price-t.price)}async getSoonestSimulatedDeliveryMode(e,t){let r=(await this.get
1SimulatedDeliveryModes(e,t)).toSorted((e,t)=>new Date(e.estimatedDeliveryDate).getTime()-new Date(t.estimatedDeliveryDate).getTime());return r[0]?.estimatedDeliveryDate}async getCurrentDeliveryBanner(){let e=await ic.getDeliveryBanners();if(!e||0===e.length)return;let t=new Date;return e.find(e=>{var r,i;return!(!(e.title||e.text)||e.startDate&&(r=ix(e.startDate),+(0,L.toDate)(t)<+(0,L.toDate)(r)))&&!(e.endDate&&(i=ix(e.endDate),+(0,L.toDate)(t)>+(0,L.toDate)(i)))})}async getSimulatedDeliveryModes(e,t){let r=e.products.map(e=>e.gencode);return await ic.getSimulatedDeliveryModes(r,t)}},iL=(0,_.getAppConfig)(),iF=new class{baseUrl;VALID_CODE=0;constructor(e){this.baseUrl=e}async normalizeAddress(e){try{let t={numero:e.streetNumber??"",voie:e.street??"",complement:e.complement??"",codePostal:e.zipCode??"",ville:e.city??""},r=await S.apiHttpService.post(`${this.baseUrl}/referentiel/adresses/normalisation-adresse`,t),i=r.message.code===this.VALID_CODE,n=r.adresseNormalisee;if(i&&n)return{zipCode:n.codePostal??e.zipCode,city:n.localite??e.city,street:n.voie??e.street,streetNumber:n.numero??e.streetNumber,complement:e.complement,isChecked:!0};return{...e,isChecked:!1}}catch(t){return console.error("Address normalization error:",t),{...e,isChecked:!1}}}}(iL.bytelApi.url),ik=new class{async validateAddress(e){return await iF.normalizeAddress(e)}};function iN({onModifyAddress:e,onConfirmAddress:t}={}){let{setBillingContextMutation:r}=(0,T.useContext)(b.CartContext),[i,n]=(0,T.useState)(!1),[s,o]=(0,T.useState)(null),a=(0,tD.useMutation)({mutationFn:e=>r.mutateAsync({billingAddress:e})}),l=(0,T.useCallback)(async e=>{await a.mutateAsync(e)},[a]),c=(0,T.useCallback)(async e=>{let t=await ik.validateAddress(e);return e.isChecked||(o(t),n(!0)),t},[]),u=(0,T.useCallback)(()=>{s&&t?.(s),n(!1),o(null)},[s,t]);return{showConfirmationAlert:i,pendingAddress:s,validateAddress:c,saveBillingAddress:l,handleConfirmAddress:u,handleModifyAddress:(0,T.useCallback)(()=>{n(!1),o(null),e?.()},[e]),isSaving:a.isPending}}var rO=rO,iM=e.i(872771),iO=e.i(883966),eH=eH,iR=e.i(542334);function iD({onModify:e,onConfirm:t}){return(0,y.jsx)(C.FlexBox,{children:(0,y.jsxs)(j.FlexItem,{size:{mobile:12,widescreen:8},children:[(0,y.jsx)(eH.default,{status:iR.VariantState.INFO,description:(0,y.jsxs)(y.Fragment,{children:["Attention, nous n'avons pas reconnu votre adresse.",(0,y.jsx)("br",{}),"Souhaitez-vous tout de même la confirmer ?"]})}),(0,y.jsxs)(rX.ButtonList,{children:[(0,y.jsx)(B.Button,{variant:z.ButtonVariant.PRIMARY,onClick:e,children:"Modifier"}),(0,y.jsx)(B.Button,{variant:z.ButtonVariant.CONVERSION,onClick:t,children:"Confirmer"})]}),(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.TWO})]})})}var iw=e.i(831644);let iP=(0,T.createContext)(null);var iB=e.i(430224);function iz(e,t=e=>e,r={}){let i=r.equal??iV;return(0,iB.useSyncExternalStoreWithSelector)(e.subscribe,()=>e.state,()=>e.state,t,i)}function iV(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[r,i]of e)if(!t.has(r)||!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let r=iW(e);if(r.length!==iW(t).length)return!1;for(let i=0;i<r.length;i++)if(!Object.prototype.hasOwnProperty.call(t,r[i])||!Object.is(e[r[i]],t[r[i]]))return!1;return!0}function iW(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}function iU(e,...t){return"function"==typeof e?e(...t):e}class iH{#e=!0;#t;#r;#i;#n;#s;#o;#a;#l=0;#c=5;#u=!1;#d=!1;#p=null;#m=()=>{this.debugLog("Connected to event bus"),this.#s=!0,this.#u=!1,this.debugLog("Emitting queued events",this.#n),this.#n.forEach(e=>this.emitEventToBus(e)),this.#n=[],this.stopConnectLoop(),this.#r().removeEventListener("tanstack-connect-success",this.#m)};#h=()=>{if(this.#l<this.#c){this.#l++,this.dispatchCustomEvent("tanstack-connect",{});return}this.#r().removeEventListener("tanstack-connect",this.#h),this.#d=!0,this.debugLog("Max retries reached, giving up on connection"),this.stopConnectLoop()};#g=()=>{this.#u||(this.#u=!0,this.#r().addEventListener("tanstack-connect-success",this.#m),this.#h())};constructor({pluginId:e,debug:t=!1,enabled:r=!0,reconnectEveryMs:i=300}){this.#t=e,this.#e=r,this.#r=this.getGlobalTarget,this.#i=t,this.debugLog(" Initializing event subscription for plugin",this.#t),this.#n=[],this.#s=!1,this.#d=!1,this.#o=null,this.#a=i}startConnectLoop(){null!==this.#o||this.#s||(this.debugLog(`Starting connect loop (every ${this.#a}ms)`),this.#o=setInterval(this.#h,this.#a))}stopConnectLoop(){this.#u=!1,null!==this.#o&&(clearInterval(this.#o),this.#o=null,this.#n=[],this.debugLog("Stopped connect loop"))}debugLog(...e){this.#i&&console.log(`ð´ [tanstack-devtools:${this.#t}-plugin]`,...e)}
1getGlobalTarget(){if("u">typeof globalThis&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog("Using global event target"),globalThis.__TANSTACK_EVENT_TARGET__;if("u">typeof window&&void 0!==window.addEventListener)return this.debugLog("Using window as event target"),window;let e="u">typeof EventTarget?new EventTarget:void 0;return void 0===e||void 0===e.addEventListener?(this.debugLog("No event mechanism available, running in non-web environment"),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog("Using new EventTarget as fallback"),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let r=new Event(e,{detail:t});this.#r().dispatchEvent(r)}catch(e){this.debugLog("Failed to dispatch shim event")}}dispatchCustomEvent(e,t){try{this.#r().dispatchEvent(new CustomEvent(e,{detail:t}))}catch(r){this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog("Emitting event to client bus",e),this.dispatchCustomEvent("tanstack-dispatch-event",e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e)return void this.debugLog("Event bus client is disabled, not emitting event",e,t);if(this.#p&&(this.debugLog("Emitting event to internal event target",e,t),this.#p.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#d)return void this.debugLog("Previously failed to connect, not emitting to bus");if(!this.#s){this.debugLog("Bus not available, will be pushed as soon as connected"),this.#n.push(this.createEventPayload(e,t)),"u">typeof CustomEvent&&!this.#u&&(this.#g(),this.startConnectLoop());return}return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,r){let i=r?.withEventTarget??!1,n=`${this.#t}:${e}`;if(i&&(this.#p||(this.#p=new EventTarget),this.#p.addEventListener(n,e=>{t(e.detail)})),!this.#e)return this.debugLog("Event bus client is disabled, not registering event",n),()=>{};let s=e=>{this.debugLog("Received event from bus",e.detail),t(e.detail)};return this.#r().addEventListener(n,s),this.debugLog("Registered event to bus",n),()=>{i&&this.#p?.removeEventListener(n,s),this.#r().removeEventListener(n,s)}}onAll(e){if(!this.#e)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};let t=t=>{e(t.detail)};return this.#r().addEventListener("tanstack-devtools-global",t),()=>this.#r().removeEventListener("tanstack-devtools-global",t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};let t=t=>{let r=t.detail;this.#t&&r.pluginId!==this.#t||e(r)};return this.#r().addEventListener("tanstack-devtools-global",t),()=>this.#r().removeEventListener("tanstack-devtools-global",t)}}let iG=new class extends iH{constructor(e){super({pluginId:"pacer",debug:e?.debug})}},iq=new WeakMap,i$=new WeakMap,iJ={current:[]},iX=!1,iY=new Set,iZ=new Map;class iQ{constructor(e,t){this.listeners=new Set,this.subscribe=e=>{var t,r;this.listeners.add(e);let i=null==(r=null==(t=this.options)?void 0:t.onSubscribe)?void 0:r.call(t,e,this);return()=>{this.listeners.delete(e),null==i||i()}},this.prevState=e,this.state=e,this.options=t}setState(e){var t,r,i;(this.prevState=this.state,null==(t=this.options)?void 0:t.updateFn)?this.state=this.options.updateFn(this.prevState)(e):"function"==typeof e?this.state=e(this.prevState):this.state=e,null==(i=null==(r=this.options)?void 0:r.onUpdate)||i.call(r),function(e){if(iY.add(e),!iX)try{for(iX=!0;iY.size>0;){let e=Array.from(iY);for(let t of(iY.clear(),e)){let e=iZ.get(t)??t.prevState;t.prevState=e,function(e){let t={prevVal:e.prevState,currentVal:e.state};for(let r of e.listeners)r(t)}(t)}for(let t of e){let e=iq.get(t);e&&(iJ.current.push(t),function e(t){for(let r of t){if(iJ.current.includes(r))continue;iJ.current.push(r),r.recompute();let t=i$.get(r);if(t)for(let r of t){let t=iq.get(r);(null==t?void 0:t.length)&&e(t)}}}(e))}for(let t of e){let e=iq.get(t);if(e)for(let t of e)!function(e){let t={prevVal:e.prevState,currentVal:e.state};for(let r of e.listeners)r(t)}(t)}}}finally{iX=!1,iJ.current=[],iZ.clear()}}(this)}}function iK(){return{canLeadingExecute:!0,executionCount:0,isPending:!1,lastArgs:void 0,status:"idle",maybeExecuteCount:0}}let i0={enabled:!0,leading:!1,trailing:!0,wait:0};var i1=class{#x;constructor(e,t){this.fn=e,this.store=new iQ(iK()),this.setOptions=e=>{this.options={...this.options,...e},this.#f()||this.cancel()},this.maybeExecute=(...e)=>{if(!this.#f())return;this.#y({maybeExecuteCount:this.store.state.maybeExecuteCount+1});let t=!1;this.options.leading&&this.store.state.canLeadingExecute&&(this.#y({canLeadingExecute:!1}),t=!0,this.#T(...e)),this.options.trailing&&this.#y({isPending:!0,lastArgs:e}),this.#x&&clearTimeout(this.#x),this.#x=setTimeout(()=>{this.#y({canLeadingExecute:!0}),this.options.trailing&&!t&&this.#T(...e)},this.#v())},this.flush=()=>{this.store.state.isPending&&this.store.state.lastArgs&&(this.#b(),this.#T(...this.store.state.lastArgs))},this.cancel=()=>{this.#b(),this.#y({canLeadingExecute:!0,isPending:!1})},this.reset=()=>{this.#y(iK())},this.key=t.key,this.options={...i0,...t},this.#y(this.options.initialState??{}),this.key&&iG.on("d-Debouncer",e=>{e.payload.key===this.key&&(this.#y(e.payload.store.state),this.setOptions(e.payload.options))})}#y=e=>{this.store.setState(t=>{let r={...t,...e},{isPending:i}=r;return{...r,status:this.#f()?i?"pending":"idle":"disabled"}}),this.key&&iG.emit("Debouncer",this)};#f=()=>!!iU(this.options.enabled,this);#v=()=>iU(this.options.wait,this);#T=(...e)=>{this.#f()&&(this.fn(...e),this.#y({executionCount:this.store.state.executionCount+1,isPending:!1,lastArgs:void 0}),this.options.onExecute?.(e,this))};#b=()=>{this.#x&&(clearTimeout(this.#x),this.#x=void 0)}};function i2(e,t){let r=e.find(e=>e.types.includes(t));return r?.long_name??""}function i3({onSwitchToManual:e,addressType:t,initialAddress:r,onAddressSaved:i,validateAddress:n}){let{predictions:s,isSearching:o,selectedAddress:a,searchAddress:l,selectPrediction:c,clearSelection:u}=function(){let[e,t]=(0,T.useState)(""),[r,i]=(0,T.useState)(!1),[n,s]=(0,T.useState)(null),o=(0,T.useRef)(null),a=(0,T.useRef)(null),[l]=function(e,t){let[r,i,n]=function(e,t,r){let[i,n]=(0,T.useState)(e),s=function(e,t,r=()=>({})){let i={...((0,T.useContext)(iP)?.defaultOptions??{}).debouncer,...t},[n]=(0,T.useState)(()=>{let t=new i1(e,i);return t.Subscribe=function(e){let r=iz(t.store,e.selector);return"function"==typeof e.children?e.children(r):e.children},t});n.fn=e,n.setOptions(i),(0,T.useEffect)(()=>()=>{n.cancel()},[n]);let s=iz(n.store,r);return(0,T.useMemo)(()=>({...n,state:s}),[n,s])}(n,t,r);return[i,s.maybeExecute,s]}(e,t,void 0);return(0,T.useEffect)(()=>{i(e)},[e,i]),[r,n]}(e,{wait:800});(0,T.useEffect)(()=>{let e=()=>
1{window.google?.maps?.places&&(o.current=new window.google.maps.places.AutocompleteService,a.current=new window.google.maps.places.PlacesService(document.createElement("div")),i(!0))};e();let t=setInterval(()=>{window.google?.maps?.places&&(e(),clearInterval(t))},500);return()=>clearInterval(t)},[]);let{data:c=[],isFetching:u}=(0,td.useQuery)({queryKey:["google-places-autocomplete",l],queryFn:()=>{var e,t;return o.current?(e=o.current,t=l,new Promise(r=>e.getPlacePredictions({input:t,componentRestrictions:{country:"fr"},types:["address"]},e=>{r(e??[])}))):[]},enabled:r&&l.length>=3,staleTime:iw.DEFAULT_STALE_TIME}),d=(0,T.useCallback)(e=>{t(e)},[]),p=(0,T.useCallback)(e=>new Promise(t=>{a.current?a.current.getDetails({placeId:e},e=>{var r;let i;if(!e?.address_components)return void t({});let n={numero:i2(i=(r=e).address_components??[],"street_number"),voie:i2(i,"route"),codePostal:i2(i,"postal_code"),ville:i2(i,"locality"),pays:i2(i,"country")?.substring(0,3).toUpperCase(),coordonnees:r.geometry?.location?{lat:r.geometry.location.lat(),lng:r.geometry.location.lng()}:void 0};s(n),t(n)}):t({})}),[]);return{predictions:c,isSearching:u,isGoogleLoaded:r,selectedAddress:n,searchAddress:d,selectPrediction:(0,T.useCallback)(e=>p(e.place_id),[p]),clearSelection:(0,T.useCallback)(()=>{s(null),t("")},[])}}(),d=(0,H.useTrilogyForm)({defaultValues:{address:r?t_(r)??"":"",complement:r?.complement??""},onSubmit:async({value:e})=>
1{if(a){let t=await n({zipCode:a.codePostal??"",city:a.ville??"",street:a.voie??"",streetNumber:a.numero,complement:e.complement||void 0,isChecked:!1});t.isChecked&&i?.(t,a.coordonnees)}else if(r){let t=await n({zipCode:r.zipCode,city:r.city,street:r.street,streetNumber:r.streetNumber,complement:e.complement||void 0,isChecked:!1});t.isChecked&&i?.(t)}}}),p=async e=>{d.setFieldValue("address",e.description),await c(e)},m=(0,T.useMemo)(()=>s.map(e=>({label:e.description,data:e})),[s]);return(0,y.jsxs)("form",{onSubmit:e=>{e.preventDefault(),d.handleSubmit()},children:[(0,y.jsxs)(C.FlexBox,{direction:{mobile:E.DirectionEnum.COLUMN,desktop:E.DirectionEnum.ROW},gap:I.GapSize.FIVE,children:[(0,y.jsx)(j.FlexItem,{size:{mobile:12,tablet:7,desktop:6},children:(0,y.jsxs)(C.FlexBox,{gap:I.GapSize.FOUR,direction:E.DirectionEnum.COLUMN,children:[(0,y.jsx)(d.AppField,{name:"address",validators:{onChange:({value:e})=>{if(!e)return"Pas de résultat"},onSubmit:({value:e})=>e?a||r?void 0:"Merci de sélectionner une adresse dans la liste":"Adresse requise"},children:e=>(0,y.jsx)(e.AutoComplete,{placeholder:"Rechercher mon adresse",onChange:e=>{u(),l(e.inputValue)},onItemSelected:e=>{let t=e.value;t&&p(t.data)},data:m,loading:o,matching:e=>e,children:e=>(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,direction:E.DirectionEnum.ROW,gap:2,children:[(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(eF.Icon,{name:ek.IconName.MARKER,size:eN.IconSize.SMALL})}),(0,y.jsx)(Q.Text,{children:e.label})]}),iconNameRight:ek.IconName.SEARCH})}),(0,y.jsx)(d.AppField,{name:"complement",children:e=>(0,y.jsx)(e.Input,{placeholder:"Complément d'adresse (Porte, bâtiment, palier)",maxLength:35})})]})}),(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:(0,y.jsx)(te.ButtonClear,{onClick:e,children:"Vous ne trouvez pas votre adresse ?"})})})]}),(0,y.jsxs)(d.AppForm,{children:[(0,y.jsx)(d.Subscribe,{selector:e=>e.values.address,children:e=>(0,y.jsxs)(d.Submit,{variant:z.ButtonVariant.CONVERSION,disabled:!(e&&(a||r)),children:["Valider votre adresse de ",t]})}),(0,y.jsx)("div",{})]})]})}function i5({initialAddress:e,onSwitchToAutomatic:t,onAddressSaved:r,validateAddress:i,isSaving:n}){let s=(0,H.useTrilogyForm)({defaultValues:{streetNumber:e?.streetNumber??"",street:e?.street??"",zipCode:e?.zipCode??"",city:e?.city??"",complement:e?.complement??""},onSubmit:async({value:e})=>{let t=await i({streetNumber:e.streetNumber||void 0,street:e.street,zipCode:e.zipCode,city:e.city,complement:e.complement||void 0,isChecked:!1});t.isChecked&&r?.(t)}});return(0,y.jsx)("form",{onSubmit:e=>{e.preventDefault(),s.handleSubmit()},children:(0,y.jsxs)(C.FlexBox,{wrap:!0,direction:{mobile:E.DirectionEnum.COLUMN,desktop:E.DirectionEnum.ROW},gap:I.GapSize.SIX,children:[(0,y.jsx)(j.FlexItem,{size:{mobile:12,tablet:3},children:(0,y.jsx)(s.AppField,{name:"streetNumber",children:e=>(0,y.jsx)(e.Input,{placeholder:"N°",maxLength:10})})}),(0,y.jsx)(j.FlexItem,{size:{mobile:12,tablet:9},children:(0,y.jsx)(s.AppField,{name:"street",validators:{onSubmit:({value:e})=>e?void 0:"Voie requise"},children:e=>(0,y.jsx)(e.Input,{placeholder:"Voie",maxLength:34})})}),(0,y.jsx)(j.FlexItem,{size:{mobile:12,tablet:3},children:(0,y.jsx)(s.AppField,{name:"zipCode",validators:{onSubmit:({value:e})=>e?void 0:"Code postal requis"},children:e=>(0,y.jsx)(e.Input,{placeholder:"Code postal",maxLength:5})})}),(0,y.jsx)(j.FlexItem,{size:{mobile:12,tablet:9},children:(0,y.jsx)(s.AppField,{name:"city",validators:{onSubmit:({value:e})=>e?void 0:"Ville requise"},children:e=>(0,y.jsx)(e.Input,{placeholder:"Ville",maxLength:34})})}),(0,y.jsx)(j.FlexItem,{size:12,children:(0,y.jsx)(s.AppField,{name:"complement",children:e=>(0,y.jsx)(e.Input,{placeholder:"Complément d'adresse (Porte, bâtiment, palier)",maxLength:35})})}),t&&(0,y.jsx)(j.FlexItem,{size:12,children:(0,y.jsx)(te.ButtonClear,{onClick:t,children:"Revenir à la recherche automatique"})}),(0,y.jsx)(j.FlexItem,{size:12,children:(0,y.jsx)(s.Subscribe,{selector:e=>e.canSubmit,children:e=>(0,y.jsx)(B.Button,{type:"submit",variant:z.ButtonVariant.CONVERSION,loading:n,disabled:!e,children:"Continuer"})})})]})})}function i9({addressType:e="facturation",initialAddress:t,onAddressSaved:r}){let i,[n,s]=(0,T.useState)(!0),{showConfirmationAlert:o,pendingAddress:a,validateAddress:l,handleConfirmAddress:c,handleModifyAddress:u,isSaving:d}=iN({onConfirmAddress:r,onModifyAddress:()=>s(!0)});return i=o?(0,y.jsx)(iD,{onModify:u,onConfirm:c}):n?(0,y.jsx)(i3,{onSwitchToManual:()=>s(!1),addressType:e,initialAddress:t,onAddressSaved:r,validateAddress:l}):(0,y.jsx)(i5,{onSwitchToAutomatic:()=>s(!0),initialAddress:t,onAddressSaved:r,validateAddress:l,isSaving:d}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eL.Divider,{}),(0,y.jsxs)(Q.Text,{level:K.TextLevels.ONE,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:[a?`Votre adresse de ${e} actuelle`:`Ajouter une adresse de ${e}`," :"]}),a&&(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,gap:I.GapSize.THREE,children:[(0,y.jsx)(eF.Icon,{name:ek.IconName.MARKER}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,marginless:!0,children:t_(a)})]}),i]})}function i4({billingAddress:e,billingAddressError:t=!1,shippingAddress:r,useSameBillingAddress:i,setUseSameBillingAddress:n,onShippingAddressSaved:s,onBillingAddressSaved:o,isEditingShippingAddress:a,setIsEditingShippingAddress:l,handleUseDifferentAddress:c,isAlreadyClient:u,hasNoDelivery:d=!1}){let{cart:p}=(0,T.useContext)(b.CartContext),[m,h]=(0,T.useState)(!1),[g,x]=(0,T.useState)(!1),f=(0,T.useCallback)(()=>{n(!0),l(!1),e&&s?.(e)},[e,s,n,l]),E=!!e,_=!!r,S=(0,T.useMemo)(()=>p?.journeys.some(e=>e.getProductsByType(v.ProductType.ESIM).length>0),[p]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eS.Box,{testId:"billing-and-shipping-address-box",children:(0,y.jsxs)(eA.BoxContent,{children:[(0,y.jsx)(G.MandatoryField,{isSingular:!0}),(0,y.jsx)(el.Title,{level:ec.TitleLevels.FIVE,children:d?"Adresse de facturation":"Adresse de livraison et de facturation"}),t&&(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:rw.TypographyColor.TEXT_ERROR,className:"help","data-has-error":"true",children:"Veuillez renseigner une adresse de facturation."}),!!e&&!m&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eL.Divider,{}),(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:"Votre adresse de facturation actuelle :"}),(0,y.jsxs)(C.FlexBox,{gap:{desktop:I.GapSize.FIVE,tablet:I.GapSize.FIVE,mobile:I.GapSize.TWO},wrap:!0,children:[(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,gap:I.GapSize.THREE,children:[(0,y.jsx)(eF.Icon,{name:ek.IconName.MARKER}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,marginless:!0,children:t_(e)})]}),!u&&(0,y.jsx)(Y.Link,{className:"is-size-6",onClick:()=>h(!0),children:"Modifier l'adresse"})]}),!!e&&!d&&(0,y.jsxs)(C.FlexBox,{wrap:!0,gap:I.GapSize.SIX,children:[(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,marginless:!0,markup:K.TextMarkup.SPAN,children:"Souhaitez-vous utiliser cette adresse comme adresse de livraison ?"})}),(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsxs)(C.FlexBox,{gap:{desktop:I.GapSize.FOUR,mobile:I.GapSize.FOUR},children:[(0,y.jsx)(iM.Radio,{name:"useSameBillingAddress",value:"true",checked:i,onChange:f,label:"Oui",id:"use
1SameBillingAddress-yes"}),(0,y.jsx)(iM.Radio,{name:"useSameBillingAddress",value:"false",checked:!i,onChange:c,label:"Non",id:"useSameBillingAddress-no"})]})})]})]}),(!E||m)&&(0,y.jsx)(i9,{addressType:"facturation",initialAddress:m?e:void 0,onAddressSaved:e=>{o?.(e),h(!1)}}),!i&&(!_||a)&&(0,y.jsx)("div",{id:"shipping-address-form",children:(0,y.jsx)(i9,{addressType:"livraison",initialAddress:a?r:void 0,onAddressSaved:(e,t)=>{s?.(e,t),l(!1)}})}),!i&&_&&!a&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eL.Divider,{}),(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:"Votre adresse de livraison actuelle :"}),(0,y.jsxs)(C.FlexBox,{gap:{desktop:I.GapSize.FIVE,tablet:I.GapSize.FIVE,mobile:I.GapSize.TWO},children:[(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,gap:I.GapSize.THREE,children:[(0,y.jsx)(eF.Icon,{name:ek.IconName.MARKER}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,marginless:!0,children:t_(r)})]}),(0,y.jsx)(te.ButtonClear,{onClick:()=>l(!0),children:"Modifier l'adresse"})]})]}),S&&(0,y.jsxs)(eS.Box,{flat:!0,children:[(0,y.jsx)(rO.default,{children:"Comment récupérer votre eSIM ?"}),(0,y.jsx)(eA.BoxContent,{children:(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,children:[(0,y.jsx)(eF.Icon,{size:eN.IconSize.MEDIUM,name:ek.IconName.MOBILE_SCAN_QR}),(0,y.jsxs)(iO.View,{children:[(0,y.jsx)(Q.Text,{children:"Rendez-vous sur votre espace client pour trouver le QR code de votre eSIM. Connectez-vous en WiFi avec votre smartphone, puis scannez le QR code."}),(0,y.jsx)(te.ButtonClear,{onClick:()=>x(!0),children:"Voir les téléphones compatibles"})]})]})})]})]})}),(0,y.jsx)(i6,{active:g,onClose:()=>x(!1)})]})}function i6({active:e,onClose:t}){return(0,y.jsxs)(e0.Modal,{active:e,title:"Liste des téléphones compatibles eSIM",onClose:t,children:[(0,y.jsx)(e1.ModalBody,{children:(0,y.jsx)(ee.SSIBlock,{url:"/partials/mixte/modal_e_sim_mobiles_compatibles"})}),(0,y.jsx)(e2.ModalFooter,{children:(0,y.jsx)(B.Button,{onClick:t,variant:z.ButtonVariant.PRIMARY,children:"Fermer"})})]})}var eH=eH;let i8=(0,_.getAppConfig)(),i7=new class{url;constructor(e){this.url=e}async getPickupPoints(e,t){let{latitude:r,longitude:i,cartId:n,typeRessource:s="POINT_RELAIS",gencodes:o,identifiantParcours:a}=e;try{let e=await S.apiHttpService.get(`${this.url}/ressources`,{latitude:r,longitude:i,identifiantPanier:n,typeRessource:s,gencodes:o,identifiantParcours:a},{user:t});return O.pickupPointsMapper(e.ressourcesEligibles??[])}catch(e){return console.error("Failed to fetch pickup points:",e),[]}}}(i8.bytelApi.url),ne=new class{async getPickupPoints(e,t){return await i7.getPickupPoints(e,t)}};function nt({isOpen:e,handleClose:t}){return(0,y.jsxs)(e0.Modal,{active:e,onClose:t,title:"En savoir plus sur le Click & Collect",children:[(0,y.jsxs)(e1.ModalBody,{children:[(0,y.jsx)(eF.Icon,{name:ek.IconName.STOPWATCH_CLICK_COLLECT,size:eN.IconSize.LARGE}),(0,y.jsx)(Q.Text,{children:"IMPORTANT : Seule la personne dont le nom est mentionné sur le bon de commande ou la facture sera autorisée à retirer la commande, sur présentation de sa pièce d'identité."}),(0,y.jsx)(Q.Text,{children:"Votre commande sera mise à disposition dans les 2 heures pour toute commande passée avant 17 heures aux heures d'ouverture de la boutique du lundi au samedi et avant 15h30 en cas d'ouverture exceptionnelle des boutiques le dimanche ou les jours fériés."}),(0,y.jsx)(Q.Text,{children:"Retrait possible à compter de la confirmation de la mise à disposition de la commande par Bouygues Telecom. Cette confirmation est faite par l'envoi d'un SMS et d'un e-mail."}),(0,y.jsx)(Q.Text,{children:"L'envoi de ces communications peut prendre jusqu'à 24 heures, délai maximum de la part des équipes Bouygues Telecom pour valider votre commande."}),(0,y.jsx)(Q.Text,{children:"A l'issue de cette validation, le mobile est à retirer sous 2 jours (hors dimanche) dans la boutique sélectionnée."})]}),(0,y.jsx)(e2.ModalFooter,{children:(0,y.jsx)(B.Button,{onClick:t,variant:z.ButtonVariant.PRIMARY,children:"Fermer"})})]})}var en=en,es=es,eo=eo,ea=ea,nr=e.i(423254);function ni({deliveryModes:e,selectedModeGencode:t}){let[r,i]=(0,T.useState)(!1),n=e.length>1?"Comprendre les modes de livraison":"Comprendre ce mode de livraison",s=()=>{i(!1)};return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(e0.Modal,{active:r,onClose:s,title:n,children:[(0,y.jsxs)(e1.ModalBody,{children:[(0,y.jsx)(en.default,{children:e.map(e=>(0,y.jsxs)(ea.default,{open:e.gencode===t,children:[(0,y.jsx)(eo.default,{children:e.name}),(0,y.jsxs)(es.default,{children:[(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,gap:I.GapSize.FIVE,children:[(0,y.jsxs)(Q.Text,{marginless:!0,level:K.TextLevels.TWO,children:[e.estimatedDeliveryDuration,"* -"," ",e.price>0?` ${(0,rU.formatPrice)(e.price)}`:"Gratuit"]}),e.image?.src&&(0,y.jsx)(nr.Image,{src:e.image.src,width:e.image?.width??60,alt:e.name})]}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:e.description})]})]},e.gencode))}),(0,y.jsx)(Q.Text,{level:K.TextLevels.THREE,children:"* Jours ouvrables : du lundi au samedi hors jours fériés"})]}),(0,y.jsx)(e2.ModalFooter,{children:(0,y.jsx)(B.Button,{onClick:s,variant:z.ButtonVariant.PRIMARY,children:"Fermer"})})]}),(0,y.jsx)(te.ButtonClear,{onClick:()=>{i(!0)},children:n})]})}function nn({deliveryMode:e,onClickGetClickCollectPopover:t}){let r=e.image?.src;return(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,direction:E.DirectionEnum.ROW,children:[(0,y.jsxs)(j.FlexItem,{children:[(0,y.jsx)(el.Title,{level:ec.TitleLevels.SIX,children:e.name}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,marginless:!0,children:e.category.code===rI.SapicCategoryId.DELIVERY_STORE?(0,y.jsxs)(y.Fragment,{children:["Dès 2h en boutique"," ",(0,y.jsx)(eM.Popover,{trigger:(0,y.jsx)(eF.Icon,{onClick:e=>{e.preventDefault(),t()},name:ek.IconName.QUESTION_CIRCLE,size:eN.IconSize.SMALL}),children:"Cliquez pour obtenir plus d'informations"})]}):`Entre le ${tS(e.estimatedDeliveryDate)} et le 2 ${tS(e.latestDeliveryDate)}*`}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,marginless:!0,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:e.price>0?(0,rU.formatPrice)(e.price):"Gratuit"})]}),r&&(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(nr.Image,{src:r,width:e.image?.width??60,alt:e.name})})]})}let ns=(0,_.getAppConfig)();function no(e){return{url:e.url,size:new google.maps.Size(e.size.width,e.size.height),scaledSize:new google.maps.Size(e.scaledSize.width,e.scaledSize.height),anchor:new google.maps.Point(e.scaledSize.width/2,e.
2scaledSize.height)}}let na=e=>({DEFAULT:{url:`${ns.assets.palpatine.mediaLibrary}/original/CMS/ecommerce/checkout/livraison/map/${e?"icon-pickup":"tri-marker-solid"}.svg`,size:{width:32,height:32},scaledSize:{width:32,height:32}},SELECTED:{url:`${ns.assets.palpatine.mediaLibrary}/original/CMS/ecommerce/checkout/livraison/map/${e?"icon-pickup-selected":"tri-marker-solid-selected"}.svg`,size:{width:50,height:50},scaledSize:{width:50,height:50}},HOME:{url:`${ns.assets.palpatine.mediaLibrary}/original/CMS/ecommerce/checkout/livraison/map/marker-solid-home.svg`,size:{width:32,height:32},scaledSize:{width:32,height:32}}});function nl({pickupPoints:e,selectedPickupPoint:t,onSelectPickupPoint:r,centerCoordinates:i,isClickAndCollect:n}){let s=(0,T.useRef)(null),o=(0,T.useRef)(null),a=(0,T.useRef)([]),l=(0,T.useRef)(r),[c,u]=(0,T.useState)(!1);return(0,T.useEffect)(()=>{if(s.current&&window.google?.maps)return o.current=new google.maps.Map(s.current,{center:i,zoom:14,mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1}),u(!0),()=>{for(let e of a.current)e.setMap(null);a.current=[]}},[i]),(0,T.useEffect)(()=>{if(!(c&&o.current))return;for(let e of a.current)e.setMap(null);if(a.current=[],0===e.length)return;let r=new google.maps.LatLngBounds;if(i){let e=new google.maps.Marker({position:i,map:o.current,title:"Votre adresse",icon:no(na(n).HOME),zIndex:1e3});r.extend(i),a.current.push(e)}for(let i of e){let e=parseFloat(i.address.latitude),s=parseFloat(i.address.longitude);if(Number.isNaN(e)||Number.isNaN(s))return;let c={lat:e,lng:s};r.extend(c);let u=new google.maps.Marker({position:c,map:o.current,title:i.label,icon:no(na(n).DEFAULT),animation:google.maps.Animation.DROP});u.addListener("click",()=>{l.current(i)}),u.addListener("mouseover",()=>{t?.id!==i.id&&u.setIcon(no(na(n).SELECTED))}),u.addListener("mouseout",()=>{t?.id!==i.id&&u.setIcon(no(na(n).DEFAULT))}),a.current.push(u)}e.length>1&&o.current.fitBounds(r,{top:50,right:50,bottom:50,left:50})},[c,e,i,t?.id,n]),(0,T.useEffect)(()=>{c&&(i?a.current.slice(1):a.current).forEach((r,i)=>{let s=e[i],a=t?.id===s?.id;if(r.setIcon(no(a?na(n).SELECTED:na(n).DEFAULT)),a&&s){let e=parseFloat(s.address.latitude),t=parseFloat(s.address.longitude);Number.isNaN(e)||Number.isNaN(t)||o.current?.panTo({lat:e,lng:t})}})},[c,t,e,i,n]),(0,y.jsx)("div",{ref:s,style:{width:"100%",minHeight:"400px",borderRadius:"8px",height:"100%"}})}var nc=e.i(639665),nc=nc;let nu=["Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche"];function nd({pickup:e,isSelected:t,handleChange:r,isClickAndCollect:i,isLast:n}){let[s,o]=(0,T.useState)(t),a=new Date().toLocaleDateString("fr-FR",{weekday:"long"});(0,T.useEffect)(()=>{t&&o(!0)},[t]);let l=(0,T.useMemo)(()=>{if(!e.distance)return null;let t=Number(e.distance);return t>1e3?`${(t/1e3).toFixed(2)} km`:`${t} m`},[e.distance]),c=(0,T.useMemo)(()=>nu.map(t=>{let r=e.schedule.find(e=>e.day.toLowerCase()===t.toLowerCase());return{dayName:t,isToday:a===t.toLowerCase(),hours:r?r.slots.length>1&&r.slots[1]?.openingTime&&r.slots[1].closingTime?r.slots[0]?.closingTime===r.slots[1]?.openingTime?`${r.slots[0]?.openingTime} - ${r.slots[1]?.closingTime}`:`${r.slots[0]?.openingTime} - ${r.slots[0]?.closingTime} / 3 ${r.slots[1]?.openingTime} - ${r.slots[1]?.closingTime}`:`${r.slots[0]?.openingTime} - ${r.slots[0]?.closingTime}`:"Fermé"}}),[e.schedule,a]);return(0,y.jsxs)(T.Fragment,{children:[(0,y.jsxs)("div",{"data-pickup-id":e.id,children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:e.label}),(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,children:[(0,y.jsx)(eF.Icon,{name:ek.IconName.MARKER_SOLID}),(0,y.jsxs)(Q.Text,{level:K.TextLevels.TWO,children:[e.address.streetNumber," ",e.address.streetName,", ",e.address.zipCode," ",e.address.city]})]}),(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,gap:I.GapSize.FOUR,children:[!!e.distance&&(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,children:[(0,y.jsx)(eF.Icon,{name:ek.IconName.PARCEL}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:l})]}),t?(0,y.jsx)(nc.default,{small:!0,iconName:ek.IconName.CHECK_CIRCLE,variant:eT.TrilogyColor.INFO,label:i?"Boutique sélectionnée":"Point de retrait sélectionné"}):(0,y.jsxs)(B.Button,{variant:z.ButtonVariant.PRIMARY,onClick:()=>r(e.id),children:["Choisir ",i?"cette boutique":"ce point de retrait"]})]}),(0,y.jsx)(eS.Box,{shadowless:!0,children:(0,y.jsxs)(eA.BoxContent,{backgroundColor:eT.TrilogyColor.NEUTRAL_FADE,children:[(0,y.jsxs)(te.ButtonClear,{onClick:()=>o(!s),children:["Voir les horaires d'ouverture"," ",(0,y.jsx)(eF.Icon,{name:s?ek.IconName.ARROW_UP:ek.IconName.ARROW_DOWN})]}),s&&c.map(({dayName:e,isToday:t,hours:r})=>
3(0,y.jsxs)(C.FlexBox,{className:`is-marginless ${t?"has-text-weight-semibold":""}`,justify:eZ.Justify.SPACE_BETWEEN,children:[(0,y.jsxs)(Q.Text,{level:K.TextLevels.TWO,children:[e,"Â : "]}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:r})]},e))]})})]}),!n&&(0,y.jsx)("div",{children:(0,y.jsx)(eL.Divider,{})})]})}function np({shippingCoordinates:e,selectedDeliveryMode:t,user:r,shippingAddress:i,handleUseDifferentAddress:n,deliveryModeInCart:s,journey:o,clickCollectStores:a,customer:l}){let{cart:c,setShippingMutation:u}=(0,T.useContext)(b.CartContext),d=(0,T.useMemo)(()=>{if(s&&"pickup"in s)return s.pickup?.id},[s]),p=t?.gencode===iu.SHIPPING_MODES.CLICK_AND_COLLECT,m=c?.getJourneyOfType(v.JourneyType.FAI_ACQUISITION)?.getPrincipalProduct(),h=!!(m&&(0,P.isFtth3Clics)(m))&&t?.gencode===iu.SHIPPING_MODES.RELAIS_EXPRESS,{data:g=[],isLoading:x}=(0,td.useQuery)({queryKey:["pickup-points",e?.lat,e?.lng,c?.id,t?.gencode],queryFn:()=>{let i=c?.getJourneyOfType(o);return ne.getPickupPoints({latitude:e.lat,longitude:e.lng,cartId:c.id,typeRessource:t?.gencode,gencodes:i?.getProductsByType(v.ProductType.TERMINAL)[0]?.gencode,identifiantParcours:i?.id},r)},enabled:!!(e&&c?.id&&!p),retry:2}),f=(0,T.useMemo)(()=>t?.category.code===rI.SapicCategoryId.DELIVERY_STORE?a:g,[a,g,t]),I=e=>f.find(t=>t.id===e),_=(0,H.useTrilogyForm)({defaultValues:{pickupId:d??""},onSubmit:({value:e})=>{let r=I(e.pickupId);if(!(r&&t))return;if(!im(l))throw Error("Informations acheteur manquantes.");let n={type:v.ShippingEnum.PICKUP,pickup:r,address:i,gencode:t?.gencode,shippedProducts:t?.products,customer:l};return u.mutateAsync({journey:o,shipping:n})},validators:{onSubmit:({value:e})=>
3{if(!e.pickupId)return t?.category.code===rI.SapicCategoryId.DELIVERY_STORE?"Veuillez sélectionner une boutique.":"Veuillez sélectionner un point relais."}},listeners:{onChange:({formApi:e})=>{e.setFieldMeta("pickupId",e=>({...e,errorMap:{...e.errorMap,onChange:void 0}})),e.handleSubmit()}}});(0,T.useEffect)(()=>{!d&&h&&0!==g.length&&(_.setFieldValue("pickupId",g[0].id),_.handleSubmit())},[_.handleSubmit,_.setFieldValue,h,d,g]),(0,W.useSubmitQueue)(`pickup-points-form-submit-${o}`,()=>{if(!s||"pickup"in s&&!s.pickup.id){let e=t?.category.code===rI.SapicCategoryId.DELIVERY_STORE?"Veuillez sélectionner une boutique.":"Veuillez sélectionner un point relais.";throw _.setErrorMap({onChange:{fields:{pickupId:e}}}),Error(e)}return Promise.resolve()});let S=(0,T.useRef)(null),A=(0,T.useCallback)(e=>{let t=S.current;if(!t)return;let r=t.querySelector(`[data-pickup-id="${e}"]`);if(r){let e=t.getBoundingClientRect().top,i=r.getBoundingClientRect().top-e+t.scrollTop;t.scrollTo({top:i,behavior:"smooth"})}},[]),L=(0,T.useMemo)(()=>{let e=t?.category.code===rI.SapicCategoryId.DELIVERY_STORE,r=f.length;return 0===r?`Aucun${e?"e boutique disponible":" point de retrait disponible"} pour cette adresse.`:1===r?(0,y.jsxs)(Q.Text,{children:[e?"La":"Le"," ",e?"boutique":"point de retrait"," disponible ",e?"la ":"le ","plus proche de :"]}):(0,y.jsxs)(Q.Text,{children:["Les",(0,y.jsxs)(Q.Text,{markup:K.TextMarkup.SPAN,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:[" ",r," "]}),e?"boutiques les plus proches de":"points de retrait les plus proches de"," :"]})},[t?.category.code,f.length]);return x?(0,y.jsx)(eS.Box,{children:(0,y.jsx)(eA.BoxContent,{className:"is-centered is-vcentered is-flex",children:(0,y.jsx)(tZ.Loader,{})})}):(0,y.jsx)(eS.Box,{testId:"pickup-points-box",children:(0,y.jsx)(eA.BoxContent,{children:(0,y.jsx)("form",{onSubmit:e=>{e.preventDefault(),_.handleSubmit()},children:(0,y.jsxs)(C.FlexBox,{gap:5,wrap:!0,children:[(0,y.jsxs)(j.FlexItem,{size:{tablet:6,mobile:12},children:[(0,y.jsx)(_.Subscribe,{selector:e=>e.errors,children:e=>e.map(e=>(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:rw.TypographyColor.TEXT_ERROR,className:"help","data-has-error":"true","data-error":"select-pickup-point",children:e},e))}),L,(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,gap:2,className:"has-text-info",children:[(0,y.jsx)(eF.Icon,{name:ek.IconName.MARKER_SOLID}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,markup:K.TextMarkup.SPAN,children:t_(i)})]}),(0,y.jsx)(te.ButtonClear,{onClick:n,children:"Modifier l'adresse"}),(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.FIVE}),(0,y.jsx)(C.FlexBox,{ref:S,className:"stores-container",direction:E.DirectionEnum.COLUMN,children:(0,y.jsx)(_.AppField,{name:"pickupId",children:e=>(0,y.jsxs)(y.Fragment,{children:[e.state.meta.errors.map(e=>(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:rw.TypographyColor.TEXT_ERROR,className:"help","data-has-error":"true","data-error":"select-delivery-mode",children:e},e)),f.map(r=>(0,y.jsx)(nd,{pickup:r,isSelected:e.state.value===r.id,handleChange:e.handleChange,isClickAndCollect:t?.category.code===rI.SapicCategoryId.DELIVERY_STORE,isLast:g.indexOf(r)===g.length-1},r.id))]})})})]}),(0,y.jsx)(_.Subscribe,{selector:e=>({selectedPickupPoint:I(e.values.pickupId)??null}),children:({selectedPickupPoint:r})=>(0,y.jsx)(j.FlexItem,{size:{tablet:6,mobile:12},children:(0,y.jsx)(nl,{pickupPoints:f,selectedPickupPoint:r,onSelectPickupPoint:e=>{_.setFieldValue("pickupId",e.id),A(e.id)},centerCoordinates:e,isClickAndCollect:t?.category.code===rI.SapicCategoryId.DELIVERY_STORE})})})]})})})})}function nm({journeyType:e,deliveryModes:t,shippingAddress:r,shippingCoordinates:i,handleUseDifferentAddress:n,user:s,removeAddress:o}){let{cart:a,setShippingMutation:l}=(0,T.useContext)(b.CartContext),[c,u]=(0,T.useState)(!1),d=(0,T.useCallback)(e=>t.find(t=>t.gencode===e),[t]),{showErrorModal:p}=(0,q.useErrorModal)(),m=(0,T.useMemo)(()=>a?.getJourneyOfType(e)?.shipping,[a,e]),h=a?.getJourneyOfType(v.JourneyType.FAI_ACQUISITION)?.getPrincipalProduct(),g=!!(h&&(0,P.isFtth3Clics)(h)),x={civility:a?.buyer?.civility,firstName:a?.buyer?.firstName,lastName:a?.buyer?.lastName},f=(0,H.useTrilogyForm)({defaultValues:{deliveryModeGencode:m?.gencode??"",shippingAddress:r},onSubmit:({value:t})=>{let r=d(t.deliveryModeGencode);if(!(r&&t.shippingAddress))throw Error("Veuillez sélectionner un mode de livraison.");
3if(!im(x))throw Error("Informations acheteur manquantes.");let i={type:v.ShippingEnum.HOME,customer:x,address:t.shippingAddress,gencode:r.gencode,shippedProducts:r.products};return l.mutateAsync({journey:e,shipping:i}).catch(e=>{console.error("Failed to set shipping information for the journey",e),p("no-delivery",{onRetry:o})})},listeners:{onChange:async({formApi:t})=>{let r=t.state.values.deliveryModeGencode,i=t.state.values.shippingAddress,n=d(r),s=n?.category.code===rI.SapicCategoryId.DELIVERY_PICKUP||n?.category.code===rI.SapicCategoryId.DELIVERY_STORE;if(!r)return;await t.validateAllFields("change");let o=m?.gencode!==r,a=i&&m?.address&&!v.AddressModel.fromInterface(i).equals(v.AddressModel.fromInterface(m.address));s?o&&await l.mutateAsync({journey:e,shipping:null}):(o||a)&&await t.handleSubmit()}}});(0,T.useEffect)(()=>{f.getFieldInfo("shippingAddress").instance?.handleChange(r)},[r,f.getFieldInfo]),(0,T.useEffect)(()=>{if(m||!g)return;let e=t.find(e=>e.gencode===iu.SHIPPING_MODES.RELAIS_EXPRESS);e&&f.setFieldValue("deliveryModeGencode",e.gencode)},[m,t,f.setFieldValue,g]);let{data:E=[]}=(0,td.useQuery)({queryKey:["click-collect-stores",i?.lat,i?.lng,a?.id],queryFn:()=>{let t=a?.getJourneyOfType(e);return ne.getPickupPoints({latitude:i.lat,longitude:i.lng,cartId:a.id,typeRessource:iu.SHIPPING_MODES.CLICK_AND_COLLECT,gencodes:t?.getProductsByType(v.ProductType.TERMINAL)[0]?.gencode,identifiantParcours:t?.id},s)},enabled:!!(i&&a?.id&&t.find(e=>e.gencode===iu.SHIPPING_MODES.CLICK_AND_COLLECT)),retry:2});(0,W.useSubmitQueue)(`${e}-delivery`,()=>{if(!m)throw f.setErrorMap({onChange:{fields:{deliveryModeGencode:"Veuillez sélectionner un mode de livraison."}}}),Error("Veuillez sélectionner un mode de livraison.");return Promise.resolve()});let C=(0,T.useMemo)(()=>a?.isMixedCart()?e===v.JourneyType.FAI_ACQUISITION?"Livraison de votre box internet":"Livraison de votre carte SIM":"Votre mode de livraison",[a,e]),j=(0,T.useMemo)(()=>a?.isMixedCart()&&e===v.JourneyType.MOBILE_ACQUISITION?"Votre carte SIM sera envoyée à votre adresse de livraison.":t.length>1?"Sélectionnez un mode de livraison.":void 0,[a,e,t]),I=(0,T.useCallback)(()=>u(!0),[]),_=(0,T.useCallback)(e=>({key:e.gencode,value:e.gencode,id:e.gencode,"data-gencode":e.gencode,sticker:e.category.code===rI.SapicCategoryId.DELIVERY_STORE?"Le plus rapide":void 0,stickerVariant:iR.VariantState.MAIN,className:"is-fullwidth",horizontal:!0,description:(0,y.jsx)(nn,{deliveryMode:e,onClickGetClickCollectPopover:I})}),[I]),S=(0,T.useMemo)(()=>t.filter(e=>e.category.code!==rI.SapicCategoryId.DELIVERY_STORE||E.length>0).reduce((e,t)=>(e[t.category.name]??=[],e[t.category.name].push(_(t)),e),{}),[t,E.length,_]),A=(0,T.useMemo)(()=>t.find(e=>e.priceType===v.PriceTypeEnum.DEFERRED),[t]);return(0,T.useEffect)(()=>{let e=t[0];1===t.length&&e&&!f.getFieldValue("deliveryModeGencode")&&(f.setFieldValue("deliveryModeGencode",e.gencode),e.category.code!==rI.SapicCategoryId.DELIVERY_PICKUP&&f.handleSubmit())},[t,f.setFieldValue,f.getFieldValue,f.handleSubmit]),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eS.Box,{testId:"delivery-modes-box",children:(0,y.jsx)(eA.BoxContent,{children:(0,y.jsxs)("form",{onSubmit:e=>{e.preventDefault(),f.handleSubmit()},children:[(0,y.jsx)(G.MandatoryField,{isSingular:!0}),(0,y.jsx)(el.Title,{level:ec.TitleLevels.FIVE,children:C}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:j}),A&&(0,y.jsx)(eH.default,{status:e6.StatusState.INFO,description:"Les frais de livraison seront automatiquement ajoutés à votre première facture."}),(0,y.jsx)(eL.Divider,{}),(0,y.jsx)(f.AppField,{name:"shippingAddress",children:()=>null}),(0,y.jsx)(f.AppField,{name:"deliveryModeGencode",validators:{onChange:({value:e})=>
3{if(!d(e))return"Veuillez sélectionner un mode de livraison."}},children:e=>(0,y.jsxs)(y.Fragment,{children:[e.state.meta.errors.map(e=>(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:rw.TypographyColor.TEXT_ERROR,className:"help","data-has-error":"true","data-error":"select-delivery-mode",children:e},e)),Object.entries(S).map(([t,r])=>(0,y.jsxs)(T.Fragment,{children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:t}),(0,y.jsx)(e.RadioTiles,{className:"is-fullwidth is-horizontal",hideErrorHelp:!0,elements:r})]},t))]})}),a?.isMixedCart()&&e===v.JourneyType.MOBILE_ACQUISITION?null:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"* Hors dimanche et jours fériés."}),(0,y.jsx)(ni,{deliveryModes:t,selectedModeGencode:f.getFieldValue("deliveryModeGencode")})]})]})})}),(0,y.jsx)(f.Subscribe,{selector:e=>e.values.deliveryModeGencode,children:t=>{let o=d(t);return o?.category.code&&[rI.SapicCategoryId.DELIVERY_PICKUP,rI.SapicCategoryId.DELIVERY_STORE].includes(o.category.code)?(0,y.jsx)(np,{shippingAddress:r,shippingCoordinates:i,selectedDeliveryMode:o,user:s,handleUseDifferentAddress:()=>n(!0),deliveryModeInCart:m,journey:e,clickCollectStores:E,customer:x}):null}}),(0,y.jsx)(nt,{isOpen:c,handleClose:()=>u(!1)})]})}var nh=e.i(693126),ng=e.i(115289);function nx(){return(0,y.jsx)(eS.Box,{children:(0,y.jsxs)(eA.BoxContent,{children:[(0,y.jsx)(G.MandatoryField,{isSingular:!0}),(0,y.jsx)(el.Title,{level:ec.TitleLevels.FIVE,className:"skeleton w-fit",children:"Adresse de livraison et de facturation"}),(0,y.jsx)(eL.Divider,{}),(0,y.jsx)(Q.Text,{className:"skeleton w-fit",children:"Recette d'un très bon Banana bread By Félix"}),(0,y.jsx)(Q.Text,{className:"skeleton w-fit",children:"200g de sucre, 60g de beurre mou, 2 à 3 bananes très mures, 2 oeufs"}),(0,y.jsx)(Q.Text,{className:"skeleton w-fit",children:"125g de yaourt, une pincée de sel, 1 sachet de levure, 125g de farine, des pépite de chocolat ou noix (optionnel)"})]})})}function nf(){return(0,y.jsx)(eS.Box,{children:(0,y.jsxs)(eA.BoxContent,{children:[(0,y.jsx)(G.MandatoryField,{isSingular:!0}),(0,y.jsx)(el.Title,{level:ec.TitleLevels.FIVE,className:"skeleton w-fit",children:"Allons-y étape par étape"}),(0,y.jsx)(Q.Text,{className:"skeleton w-fit",children:"Préchauffez votre four à 180°C (thermostat 6)."}),(0,y.jsx)(eL.Divider,{}),(0,y.jsx)(Q.Text,{className:"skeleton w-fit",children:"Première étape"}),(0,y.jsx)(nh.RadioTile,{horizontal:!0,description:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{className:"skeleton w-fit",children:"Mélanger le beurre et le sucre"}),(0,y.jsx)(Q.Text,{className:"skeleton w-fit",marginless:!0,children:"Ajouter les Åufs dans le mélange"}),(0,y.jsx)(Q.Text,{className:"skeleton w-fit",children:"C'est bien"})]}),disabled:!0}),(0,y.jsx)(Q.Text,{className:"skeleton w-fit",children:"Deuxième étape"}),(0,y.jsxs)(ng.RadioTiles,{children:[(0,y.jsx)(nh.RadioTile,{horizontal:!0,description:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{className:"skeleton w-fit",children:"Ajouter ces ingrédients"}),(0,y.jsx)(Q.Text,{className:"skeleton w-fit",marginless:!0,children:"La farine, le sel, la levure et le yaourt"}),(0,y.jsx)(Q.Text,{className:"skeleton w-fit",children:"Bientot finis"})]}),disabled:!0}),(0,y.jsx)(nh.RadioTile,{horizontal:!0,description:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{className:"skeleton w-fit",children:"Ãcraser les bananes"}),(0,y.jsx)(Q.Text,{className:"skeleton w-fit",marginless:!0,children:"Pas trop c'est bon avec des morceaux"}),(0,y.jsx)(Q.Text,{className:"skeleton w-fit",children:"Ajouter les"})]}),disabled:!0})]}),(0,y.jsx)(Q.Text,{className:"skeleton w-fit",children:"Ajouter les noix ou les pépites si vous avez envie"}),(0,y.jsx)(Q.Text,{className:"skeleton w-fit",children:"Enfourner pendant 45 à 50 minutes au four"})]})})}function ny({removeAddress:e}){let{showErrorModal:t}=(0,q.useErrorModal)();return(0,T.useEffect)(()=>{t("no-delivery",{onRetry:e})},[t,e]),null}function nT({deliveryModes:e,isPending:t,shippingAddress:r,shippingCoordinates:i,handleUseDifferentAddress:n,setShippingAddress:s,user:o}){let{cart:a}=(0,T.useContext)(b.CartContext),l=(0,T.useMemo)(()=>
3{if(!e||e?.length===0)return[];let t={[v.JourneyType.MOBILE_ACQUISITION]:0,[v.JourneyType.FAI_ACQUISITION]:1,[v.JourneyType.RENEWAL]:2};return Object.entries(e.reduce((e,t)=>{let r=t.products[0];if(!r)return e;let i=a?.journeys?.find(e=>e.id===r.journey);return i&&e[i.type].push((e=>{let t;switch(e.gencode){case iu.SHIPPING_MODES.CLICK_AND_COLLECT:t={description:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"Commandez votre produit en ligne et retirez-le gratuitement dans les 2 heures** dans la boutique de votre choix."}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"Vous serez notifié par SMS et email*** de la mise à disposition de votre commande."}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"A l'issue de cette notification, le mobile est à retirer sous 2 jours (hors dimanche)."}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"Important : Seule la personne dont le nom est mentionné sur le bon de commande ou la facture sera autorisée à retirer la commande, sur présentation de sa pièce d'identité."}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"** Pour toute commande passée avant 17 heures aux heures d'ouverture de la boutique du lundi au samedi et avant 15h30 en cas d'ouverture exceptionnelle des boutiques le dimanche ou les jours fériés."}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"*** L'envoi de ces communications peut prendre jusqu'à 24 heures, délai maximum de la part des équipes Bouygues Telecom pour valider votre commande."})]}),estimatedDeliveryDuration:"Disponible dès 2h",image:{src:`${ip}/click-and-collect.svg`,width:100}};break;case iu.SHIPPING_MODES.CHRONOPOST:t={description:(0,y.jsx)(Q.Text,{children:"Commandez votre produit et recevez-le à domicile ou à l'adresse de votre choix en express."}),estimatedDeliveryDuration:"1 à 2 jours ouvrables",image:{src:`${ip}/chronopost.svg`,width:100}};break;case iu.SHIPPING_MODES.RELAIS_EXPRESS:t={description:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{children:"Commandez votre produit et recevez-le dans le point de retrait de votre choix. Ces points de retrait sont des commerces de proximité : tabac, presse, fleuriste, alimentationâ¦"}),(0,y.jsx)(Q.Text,{children:"Une fois votre colis disponible en point de retrait, vous disposez d'un délai de 7 jours pour le récupérer."})]}),estimatedDeliveryDuration:"1 à 2 jours ouvrables",image:{src:`${ip}/chronopost.svg`,width:100}};break;case iu.SHIPPING_MODES.DIRECT:t={description:(0,y.jsx)(Q.Text,{children:"Commandez votre produit et recevez-le à domicile ou à l'adresse de votre choix."}),estimatedDeliveryDuration:"2 à 3 jours ouvrables",image:{src:`${ip}/colissimo.svg`,width:100}};break;case iu.SHIPPING_MODES.RELAIS_COLIS:t={description:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{children:"Commandez votre produit et recevez-le dans le point de retrait de votre choix. Ces points de retrait sont des commerces de proximité : tabac, presse, fleuriste, alimentationâ¦"}),(0,y.jsx)(Q.Text,{children:"Une fois votre colis disponible en point de retrait, vous disposez d'un délai de 7 jours pour le récupérer."})]}),estimatedDeliveryDuration:"De 3 à 5 jours ouvrables",image:{src:`${ip}/relais-colis.png`,width:100}};break;case iu.SHIPPING_MODES.LA_POSTE:default:t={description:(0,y.jsx)(Q.Text,{children:"Commandez votre carte SIM seule et recevez-le à domicile ou à l'adresse de votre choix."}),estimatedDeliveryDuration:"3 à 5 jours ouvrables",image:{src:`${ip}/laposte.webp`,width:100}}}return{...e,...t}})(t)),e},{[v.JourneyType.FAI_ACQUISITION]:[],[v.JourneyType.MOBILE_ACQUISITION]:[],[v.JourneyType.RENEWAL]:[]})).filter(([,e])=>e.length>0).sort(([e],[r])=>t[e]-t[r])},[a,e]);if(t)return(0,y.jsx)(nf,{});let c=a?.journeys.length===1&&(a?.journeys[0]?.isType(v.JourneyType.MOBILE_ACQUISITION)||a?.journeys[0]?.isType(v.JourneyType.RENEWAL))&&(a?.journeys[0].getProductsByType(v.ProductType.ESIM)?.length??0)>0,u=()=>{s(void 0),n()};return 0!==l.length||c?l.map(([e,t])=>(0,y.jsx)(nm,{journeyType:e,deliveryModes:t,shippingAddress:r,shippingCoordinates:i,handleUseDifferentAddress:n,user:o,removeAddress:u},e)):(0,y.jsx)(ny,{removeAddress:u})}function nv({currentModule:e}){let t=(0,eI.useRouter)(),{cart:r,isLoading:i,setShippingMutation:n}=(0,T.useContext)(b.CartContext),{user:s}
3=(0,X.useStableSession)(),{saveBillingAddress:o}=iN(),a=(0,ir.useGoogleMapsReady)(),[l,c]=(0,T.useState)(!1),u=(0,T.useMemo)(()=>oT(e,r),[e,r]),d=()=>{for(let e of r?.journeys??[])e.shipping?.type===v.ShippingEnum.PICKUP&&n.mutate({journey:e.type,shipping:null})},p=(e=!1)=>{if(R(!1),L(void 0),M(void 0),d(),e){let e=document.getElementById("shipping-address-form");e&&e.scrollIntoView({behavior:"smooth"})}},m=!!r?.getJourneyOfType(v.JourneyType.FAI_ACQUISITION),h=r?.getJourneyOfType(v.JourneyType.FAI_ACQUISITION)?.getPrincipalProduct(),g=!!(h&&(0,P.isFtth3Clics)(h)),{data:x,isPending:f}=(0,td.useQuery)({queryKey:["existing-facturation-address",r?.buyer?.id],queryFn:()=>io.getAddressFromContracts(r.buyer,s),enabled:!!(s?.sub&&r?.buyer&&!r?.billingContext?.billingAddress?.address)}),{data:E}=(0,td.useQuery)({queryKey:["delivery-banner"],queryFn:()=>iA.getCurrentDeliveryBanner()}),C=(0,T.useMemo)(()=>{if(m&&!x&&!f)return r?.getJourneyOfType(v.JourneyType.FAI_ACQUISITION)?.eligibility?.address},[r,m,x,f]),j=r?.billingContext?.billingAddress?.address??x??C,I=r?.journeys[0]?.shipping?.address,[_,S]=(0,T.useState)(j),[A,L]=(0,T.useState)(I??_),[F,k]=(0,T.useState)(!1),[N,M]=(0,T.useState)(),[O,R]=(0,T.useState)(()=>!A||!_||v.AddressModel.fromInterface(A).equals(v.AddressModel.fromInterface(_))),D=(0,T.useMemo)(()=>A||(O?_:void 0),[A,_,O]);(0,T.useEffect)(()=>{j&&!_&&S(j),_&&k(!1);let e=O&&_?_:D;O&&_&&L(_),e&&a&&(function(e){if(!window.google?.maps?.Geocoder)return;let t=new window.google.maps.Geocoder,r=[e.streetNumber,e.street,e.zipCode,e.city,"France"].filter(Boolean).join(" ");return new Promise(e=>{t.geocode({address:r,componentRestrictions:{country:"fr"}},(t,r)=>{if("OK"===r&&t?.[0]?.geometry?.location){let r=t[0].geometry.location;e({lat:r.lat(),lng:r.lng()})}else e(void 0)})})})(e)?.then(e=>{e&&M(e)})},[_,O,j,D,a]),(0,W.useSubmitHandler)(()=>(u&&t.push(u),Promise.resolve()));let w=!!r?.getJourneyOfType(v.JourneyType.RENEWAL),B=(0,td.useQuery)({queryKey:["delivery-modes",r?.id,D,r?.isVirtual],queryFn:()=>iA.getDeliveryModes(r.id,D,s),enabled:!!(s&&r?.id&&D&&!r?.isVirtual)}),z=B.data?.length===0,V=(0,T.useMemo)(()=>{if(B.data)return[...new Set(B.data.map(e=>e.category.code))].join(",")},[B.data]),U=(0,T.useMemo)(()=>{if(B.data)return[...new Set(B.data.map(e=>e.name))].join(",")},[B.data]);return((0,J.usePageViewTracking)({page:"Livraison",pageCategory:"Commande",eCommerceStep:"Checkout"},{enable:!D,key:"no-address"}),(0,J.usePageViewTracking)({page:"Livraison_choix_mode",pageCategory:"Commande",eCommerceStep:"Checkout",variables:{eligibiliteCategorieLivraison:V,eligibiliteModeLivraison:U}},{enable:!!D&&!B.isPending,key:"with-modes"}),(0,W.useSubmitQueue)("save-billing",async()=>{if(!w){if(!_)throw k(!0),Error("Veuillez renseigner une adresse de facturation.");await o(_)}}),i||!s)?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(nx,{}),(0,y.jsx)(nf,{})]}):(0,y.jsxs)(y.Fragment,{children:[E&&(0,y.jsx)(eH.default,{description:E.text??"",title:E.title,status:(e=>{switch(e){case"warning":return e6.StatusState.WARNING;case"error":return e6.StatusState.ERROR;case"success":return e6.StatusState.SUCCESS;default:return e6.StatusState.INFO}})(E.color)}),D&&B.isPending?(0,y.jsx)(nx,{}):(0,y.jsx)(i4,{billingAddress:_,billingAddressError:F,shippingAddress:A,isAlreadyClient:!!(x||w),useSameBillingAddress:O,setUseSameBillingAddress:e=>{R(e),d()},isEditingShippingAddress:l,setIsEditingShippingAddress:e=>{c(e),e&&d()},handleUseDifferentAddress:p,hasNoDelivery:z,onShippingAddressSaved:(e,t)=>{g&&(0,P.stopFtth3Clics)(),L(e),t&&M(t)},onBillingAddressSaved:S}),D&&(0,y.jsx)(nT,{deliveryModes:B.data,isPending:B.isPending,shippingAddress:D,shippingCoordinates:N,setShippingAddress:L,handleUseDifferentAddress:p,user:s}),(0,y.jsx)(tC.ForceLogin,{})]})}e.s(["Housing",()=>nB],313727);var nb=e.i(377097),nE=v;class nC extends nE.LocalStorageRepository{get(e){try{let t=super.get(e);if(!t)return null;let r=JSON.parse(t);if(!r||"object"!=typeof r||!r.expiresTimestamp)return r;if(Date.now()<r.expiresTimestamp)return r.data;return this.delete(e),null}catch{return null}}}class nj{storageKey="provider_results";storage=new nC;eligibilityResult=null;get(){return this.eligibilityResult??=this.storage.get(this.storageKey),this.eligibilityResult}}let nI=new nj;var n_=v;class nS extends n_.EligibilityFactory{static toRequestBody(e,t){let r,i=e.address;if("string"==typeof t)r={pto:t};else{i=t.address;let e="unknown"===t.choice?n_.PtoStatus.UNKNOWN:n_.PtoStatus.ABSENT;t.building&&(e="SATISFAISANT"===t.building.ptoPresenceRate?n_.PtoStatus.UNKNOWN:n_.PtoStatus.ABSENT),r={statutAccesFTTH:e}}return{localisation:{adresse:i?{_type:"AdresseVerticale",codePostal:i.zipCode,commune:i.city,complementNumero:i.complement,numero:i.streetNumber,voie:i.street,batiment:i.building,escalier:i.stair,etage:i.floor,codeINSEE:i.inseeCode,codeRivoli:i.rivoliCode,hexaCleInterne:i.hexacle,idAdresseByTel:i.idAddress}:void 0,pointAcces:r}}}}
3let nA=new class{getBuildingList(){let e=nI.get();return e?.results?.ftth?.buildings??[]}isPtoRequired(){let e=this.getBuildingList();return 0!==e.length&&e.filter(e=>e.idPm?.startsWith("SRO-")).flatMap(e=>e.stairs).flatMap(e=>e.stages).flatMap(e=>e.ptos).some(({pto:e})=>e.startsWith("UG-"))}getPtos(){return this.getBuildingList().flatMap(e=>e.stairs).flatMap(e=>e.stages)?.flatMap(e=>e.ptos)?.map(e=>e.pto)??[]}getBuildings(){return this.getBuildingList().map(e=>e.building)??[]}getBuilding(e){return this.getBuildingList().find(t=>t.building===e)}getStairs(e){return this.getBuildingList().find(t=>t.building===e)?.stairs?.map(({stair:e})=>e)}getFloors(e,t){return this.getBuildingList().find(t=>t.building===e)?.stairs?.find(e=>e.stair===t)?.stages?.map(({floor:e})=>e)}async addPtoToCart(e,t){let r=e.getJourneyOfType(v.JourneyType.FAI_ACQUISITION),i=r?.eligibility;if(!i)throw Error("Aucune donnée d'éligibilité trouvée.");let n=this.getBuildingList(),s=this.getVerticalByPto(n,t);return s&&i.address&&(i.address.stair=s.stair,i.address.floor=s.floor,i.address.building=s.building),await nb.corbisRepository.updateLocation(i.id,nS.toRequestBody(i,t)).then(()=>nb.corbisRepository.getEligibilityById(i.id))}showDebitPlus(e){let t=nI.get()?.offersWithOptions,r=t?.find(t=>t.idOffer===e?.gencode);return!!r&&r.options?.every(t=>e?.metadata?.upSellsProducts?.includes(t))}getVerticalByPto(e,t){if("string"==typeof t){let r=this.findVerticalForPto(e,t),i=e?.[0];return{building:r?.building.building||i?.building||"_NA_",stair:r?.stair.stair||i?.stairs?.[0]?.stair||"_NA_",floor:r?.stage.floor||i?.stairs?.[0]?.stages[0]?.floor||"_NA_",imb:r?.building.imb}}return{building:t?.address.building||"_NA_",stair:t.address.stair||"_NA_",floor:t.address.floor||"_NA_"}}findVerticalForPto(e,t){for(let r of e)for(let e of r.stairs)for(let i of e.stages)if(i.ptos.some(e=>e.pto===t))return{building:r,stair:e,stage:i}}};function nL(e,t){let[r,i]=(0,T.useState)(t),[n,s]=(0,T.useState)(!0),o=(0,T.useRef)(e);return(0,T.useEffect)(()=>{o.current=e}),(0,T.useEffect)(()=>{i(o.current()),s(!1)},[]),{data:r,isLoading:n}}function nF({isPtoRequired:e,isLoading:t=!1}){return(0,y.jsxs)("div",{children:[(0,y.jsx)(el.Title,{level:ec.TitleLevels.FIVE,children:"Quelle est la référence de votre prise fibre ?"}),(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,className:t?"skeleton":"",children:e?"Nous avons détecté une prise fibre murale dans votre logement":"Renseignez-la dès maintenant pour profiter de votre box plus rapidement ð"}),e&&(0,y.jsx)(Q.Text,{marginless:!0,level:K.TextLevels.TWO,className:t?"skeleton":"",children:"Pour finaliser votre commande, merci de renseigner la référence de votre prise fibre murale."})]})}function nk({label:e=""}){let{cart:t}=(0,T.useContext)(b.CartContext),{data:r,isLoading:i}=nL(()=>nA.getPtos(),[]),{showErrorModal:n}=(0,q.useErrorModal)(),s=(0,H.useTrilogyForm)({defaultValues:{ptoReference:""},onSubmit:async({value:e,formApi:r})=>{if(!t)throw Error("Aucun panier n'a été trouvé.");if(!e.ptoReference)return void r.setErrorMap({onChange:{fields:{ptoReference:"La référence de la prise est requise."}}});if(e.ptoReference.length<7)return void r.setErrorMap({onChange:{fields:{ptoReference:"La référence de la prise doit contenir au minimum 7 caractères."}}});try{if(!(await nA.addPtoToCart(t,e.ptoReference)).isEligible)throw n("ftth-eligibility"),Error("FTTH eligibility check failed")}catch(e){if(e instanceof Error&&"FTTH eligibility check failed"===e.message)throw e;throw n("technical-error",{onRetry:()=>s.handleSubmit()}),e}}});return(0,W.useSubmitQueue)("pto-form",s.handleSubmit),(0,y.jsx)("form",{onSubmit:e=>{e.preventDefault(),s.handleSubmit()},children:(0,y.jsx)(s.AppField,{name:"ptoReference",validators:{onChange:({value:e})=>
3{if(!(e.length<6)&&!r.includes(e))return"Numéro PTO invalide, veuillez réessayer ou faire un autre choix."}},children:t=>(0,y.jsx)(t.Input,{"data-cy":"pto_input",required:!0,label:e,minLength:7,maxLength:20,placeholder:"XX-XXX-XX",loading:i,onChange:({inputValue:e})=>t.handleChange(e.toUpperCase())})})})}var eH=eH;function nN({choice:e}){let{cart:t}=(0,T.useContext)(b.CartContext),{showErrorModal:r}=(0,q.useErrorModal)(),{data:i}=nL(()=>nA.getBuildings().map(e=>({id:e,label:e,value:e,ptoPresenceRate:e})),[]),n=(0,T.useMemo)(()=>1===i.length?i[0].value:"default",[i]),s=(0,T.useMemo)(()=>t?.getJourneyOfType(v.JourneyType.FAI_ACQUISITION),[t]),o=(0,T.useMemo)(()=>t_(s?.eligibility?.address),[s?.eligibility?.address]),a=(0,T.useMemo)(()=>"none"===e?"On s'occupe de tout ! Notre équipe raccordera votre logement à la fibre optique, et installera votre prise murale.":(0,y.jsxs)(y.Fragment,{children:["Vous pouvez toujours nous la communiquer sous 48h depuis votre ",(0,y.jsx)("b",{children:"espace client"}),", rubrique"," ",(0,y.jsx)("b",{children:"Suivi de commande"}),"."]}),[e]),l=(0,H.useTrilogyForm)({defaultValues:{building:n,stair:"default",floor:"default"},onSubmit:async({value:i})=>{if(!t)throw Error("Aucun panier trouvé.");let n=s?.eligibility?.address;if(!n)throw Error("Aucune donnée d'éligibilité trouvée.");n.building="default"===i.building?"_NA_":i.building,n.stair="default"===i.stair?"_NA_":i.stair,n.floor="default"===i.floor?"_NA_":i.floor;let o=nA.getBuilding(i.building);try{if(!(await nA.addPtoToCart(t,{address:n,choice:e,building:o})).isEligible)throw r("ftth-eligibility"),Error("FTTH eligibility check failed")}catch(e){if(e instanceof Error&&"FTTH eligibility check failed"===e.message)throw e;throw r("technical-error",{onRetry:()=>l.handleSubmit()}),e}}}),c=(0,ri.useStore)(l.store,e=>"default"===e.values.building?void 0:e.values.building),u=(0,ri.useStore)(l.store,e=>"default"===e.values.stair?void 0:e.values.stair),d=(0,T.useMemo)(()=>c?(nA.getStairs(c)??[]).map(e=>({id:e,label:e,value:e})):[],[c]),p=(0,T.useMemo)(()=>c&&u?(nA.getFloors(c,u)??[]).map(e=>({id:e,label:e,value:e})):[],[c,u]);return(0,W.useSubmitQueue)("ptoUnknown",l.handleSubmit),(0,T.useEffect)(()=>{c&&1===d.length&&l.setFieldValue("stair",d[0].value)},[c,d,l.setFieldValue]),(0,T.useEffect)(()=>{u&&1===p.length&&l.setFieldValue("floor",p[0].value)},[u,p,l.setFieldValue]),(0,y.jsx)("form",{onSubmit:e=>{e.preventDefault(),l.handleSubmit()},children:(0,y.jsxs)(j.FlexItem,{children:[(0,y.jsx)(eH.default,{status:e6.StatusState.INFO,description:(0,y.jsx)(Q.Text,{level:K.TextLevels.THREE,children:a}),display:!0}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"Veuillez confirmer le bâtiment, l'escalier et l'étage où aura lieu l'installation."}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:o}),i.length>1&&(0,y.jsx)(l.AppField,{name:"building",validators:{onSubmit:({value:e})=>
3{if("default"===e)return"Veuillez sélectionner un bâtiment."}},children:e=>(0,y.jsx)(e.Select,{required:!0,"data-cy":"building_pto",label:"Bâtiment",elements:[{id:"default",label:"Choisissez un bâtiment",disabled:!0,value:"default"},...i]})}),c&&d.length>1&&(0,y.jsx)(l.AppField,{name:"stair",validators:{onSubmit:({value:e})=>{if("default"===e)return"Veuillez sélectionner un escalier."}},children:e=>(0,y.jsx)(e.Select,{required:!0,"data-cy":"stair_pto",label:"Escalier",elements:[{id:"default",label:"Choisissez un escalier",disabled:!0,value:"default"},...d]})}),u&&p.length>1&&(0,y.jsx)(l.AppField,{name:"floor",validators:{onSubmit:({value:e})=>{if("default"===e)return"Veuillez sélectionner un étage."}},children:e=>(0,y.jsx)(e.Select,{required:!0,"data-cy":"floor_pto",label:"Ãtage",elements:[{id:"default",label:"Choisissez un étage",disabled:!0,value:"default"},...p]})})]})})}function nM({ptoChoice:e,onPtoChoiceChange:t}){return(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:I.GapSize.FOUR,children:[(0,y.jsx)(iM.Radio,{name:"ptoChoice",value:"know",checked:"know"===e,onChange:()=>t("know"),label:"Je connais la référence de ma prise fibre"}),"know"===e&&(0,y.jsx)(nk,{}),(0,y.jsx)(iM.Radio,{name:"ptoChoice",value:"unknown",checked:"unknown"===e,onChange:()=>t("unknown"),label:"Je ne connais pas la référence de ma prise fibre"}),"unknown"===e&&(0,y.jsx)(nN,{choice:"unknown"}),(0,y.jsx)(iM.Radio,{name:"ptoChoice",value:"none",checked:"none"===e,onChange:()=>t("none"),label:"Je n'ai pas de prise murale fibre"}),"none"===e&&(0,y.jsx)(nN,{choice:"none"})]})}let nO={src:e.i(518204).default,width:289,height:200,blurWidth:0,blurHeight:0};function nR(){return(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,children:[(0,y.jsxs)(j.FlexItem,{children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,"aria-hidden":"true",children:"Comment trouver la référence de votre prise fibre ?"}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"Retrouvez cette référence sur la prise murale (salon, entrée ou armoire électrique), sur la facture ou dans l'espace client de votre opérateur internet."})]}),(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(C.FlexBox,{justify:eZ.Justify.CENTER,children:(0,y.jsx)(rP.default,{height:200,alt:"",className:"has-text-centered",src:nO})})})]})}var nD=e.i(218648),nw=e.i(34621);function nP(){let[e,t]=(0,T.useState)(!1);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"Vous la retrouverez sur :"}),(0,y.jsxs)(nD.List,{children:[(0,y.jsx)(nw.ListItem,{children:(0,y.jsxs)(Q.Text,{level:K.TextLevels.TWO,children:["Votre ",(0,y.jsx)("b",{children:"prise fibre murale"})," (armoire électrique, salon ou pièce principale)"]})}),(0,y.jsx)(nw.ListItem,{children:(0,y.jsxs)(Q.Text,{level:K.TextLevels.TWO,children:["La ",(0,y.jsx)("b",{children:"facture"})," de votre ",(0,y.jsx)("b",{children:"opérateur internet"})," actuel"]})}),(0,y.jsx)(nw.ListItem,{children:(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"Votre contrat de location"})}),(0,y.jsx)(nw.ListItem,{children:(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"Votre quittance de loyer"})})]}),(0,y.jsx)(nk,{label:"Renseigner ma référence fibre"}),(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.FOUR}),(0,y.jsx)(te.ButtonClear,{type:"button",onClick:()=>t(!0),children:"Vous l'avez cherchée partout sans succès ? "}),e&&(0,y.jsxs)(e0.Modal,{active:!0,onClose:()=>t(!1),title:"Nous avons besoin de votre référence fibre pour finaliser la commande",children:[(0,y.jsxs)(e1.ModalBody,{children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,children:"Vous la retrouverez facilement sur la prise fibre murale de votre logement ou sur la facture de votre opérateur internet actuel."}),(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,children:"Vous ne la retrouvez toujours pas ? Un conseiller vous rappelle pour vous aider à la retrouver."})]}),(0,y.jsx)(e2.ModalFooter,{children:(0,y.jsxs)(rX.ButtonList,{children:[(0,y.jsx)(B.Button,{type:"button",variant:z.ButtonVariant.SECONDARY,onClick:()=>t(!1),children:"Renseigner ma référence fibre"}),(0,y.jsx)(B.Button,{type:"button",variant:z.ButtonVariant.CONVERSION,onClick:()=>{(0,eI.redirect)(tt.paths.recall("tlvctcfai10"))},children:"Me faire rappeler"})]})})]})]})}function nB({currentModule:e}){let t=(0,eI.useRouter)(),{cart:r}=(0,T.useContext)(b.CartContext),{user:i}
3=(0,X.useStableSession)(),{showErrorModal:n}=(0,q.useErrorModal)(),{data:s,isLoading:o}=nL(()=>nA.isPtoRequired(),!1),[a,l]=(0,T.useState)(null),[c,u]=(0,T.useState)(null),[d,p]=(0,T.useState)(!1),m=(0,T.useMemo)(()=>oT(e,r),[e,r]);return(0,T.useEffect)(()=>{s&&l("know")},[s]),(0,T.useEffect)(()=>{(async()=>{if(!(i&&r))return;let e=r?.getJourneyOfType(v.JourneyType.FAI_ACQUISITION),t=e?.eligibility?.address;if(!t)return;let s=r.buyer?.id;if(s){p(!0);try{let[e,o]=await Promise.all([tY.canSubscribeToFai(s,i,t),tY.canSubscribeToFaiOffer(i,r)]);e&&o||n("fai-error")}catch(e){console.error("Error checking FAI contract:",e)}finally{p(!1)}}})()},[i,r,n]),(0,J.usePageViewTracking)({page:"Identification_Logement_PTO",pageCategory:"Commande",eCommerceStep:"Checkout"}),(0,W.useSubmitHandler)(()=>a?(t.push(m),Promise.resolve()):(u("Veuillez faire un choix concernant votre PTO."),Promise.reject())),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eS.Box,{testId:"housing-box",children:(0,y.jsx)(eA.BoxContent,{children:(0,y.jsxs)(C.FlexBox,{gap:{mobile:I.GapSize.FOUR,tablet:I.GapSize.FIVE},direction:E.DirectionEnum.COLUMN,children:[(0,y.jsx)(nF,{isPtoRequired:s,isLoading:o||d}),o||d?(0,y.jsxs)(j.FlexItem,{children:[(0,y.jsx)(Q.Text,{className:"skeleton",children:"Lorem ipsum"}),(0,y.jsx)(Q.Text,{className:"skeleton",children:"Lorem ipsum"}),(0,y.jsx)(Q.Text,{className:"skeleton",children:"Lorem ipsum"})]}):(0,y.jsxs)(j.FlexItem,{children:[s?(0,y.jsx)(nP,{}):(0,y.jsx)(nM,{ptoChoice:a,onPtoChoiceChange:e=>{l(e),u(null)}}),c&&(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:rw.TypographyColor.TEXT_ERROR,children:c})]}),(0,y.jsx)(nR,{})]})})}),(0,y.jsx)(U,{className:"is-hidden-desktop is-hidden-tablet",testId:"continue-btn"}),(0,y.jsx)(tC.ForceLogin,{})]})}var nz=e.i(315171);e.s(["Redirect",()=>nX],805697);var nV=e.i(34958),nW=e.i(825245),nU=e.i(95187);let nH=(0,nU.createServerReference)("006e4ff00531a561af7aba0fe20573e4a25629335d",nU.callServer,void 0,nU.findSourceMapURL,"getServerSession");var nG=e.i(764858),nq=e.i(793140),n$=e.i(849524),nJ=e.i(809176);function nX({currentModule:e}){let{user:t}=(0,X.useStableSession)(),{cart:r,isLoading:i,generatePurchaseOrderMutation:n}=(0,T.useContext)(b.CartContext),{showErrorModal:s}=(0,q.useErrorModal)(),o=function(e,t){let r=oy.findIndex(t=>t.key===e);if(r<=0)return null;for(let e=r-1;e>=0;e--){let r=oy[e];if(!r.shouldDisableModule?.(t))return`/${r.path.join("/")}`}return null}(e,r),[a,l]=(0,T.useState)(!1),{pspFormPost:c,handleOrderRedirect:u}=(0,nq.usePspRedirect)(),d=(0,T.useRef)(!1),{prismeLogger:p}=(0,nV.usePrismeLogger)();(0,T.useEffect)(()=>{nH().then(e=>{let t=(0,n$.getClientCookies)("cart-id");p.log("redirect-page-arrival",JSON.stringify({cartId:t,noPersonne:e?.user?.sub}))})},[]);let m=(0,T.useCallback)(async()=>{if(!r?.id||!t)return;let e=await nW.scoringService.evaluate(r.id,t,r.funding);if(e.isBlocked||e.requiresEdpRetrait||e.requiresCreditRetrait)return void s("scoring-ko",{messages:e.messages});try{let e=await (0,nJ.getDeviceFingerPrint)(),t=`${window.location.origin}${tt.paths.thankYouBaseUrl}`,i=await n.mutateAsync({fingerprint:e,thankYouPageBaseUrl:t});(0,e$.saveOrderTrackingSnapshot)(r),tO.virtualCartService.clearStorage(),(0,n$.deleteClientCookie)("oauth2_contract_id"),u(i)}catch(e){if(e instanceof v.PurchaseOrderGenerationError&&!e.isRetryable)return void s("cart-creation-error");s("technical-error")}},[r,t,s,n,u]),h=(0,T.useCallback)(async()=>{r?.fundingRedirect?.status==="OK"?await m():r?.funding?.isType(v.FundingType.SWAPPY)?r?.fundingRedirect?.raison!=="ANNULER"?(await tO.realCartService.reset().catch(ej.noop),s("younited-rejected-swappy")):s("younited-cancelled"):l(!0)},[r?.fundingRedirect?.status,r?.fundingRedirect?.raison,r?.funding,m,s]);(0,T.useEffect)(()=>{i||!r||d.current||t&&(d.current=!0,h())},[i,r,t,h]);let g=i||n.isPending||!(a||c||d.current);return c?(0,y.jsx)(nG.PspRedirect,{formUrl:c.formUrl,formData:c.formData}):g?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eE.ModuleLoader,{}),(0,y.jsx)(tC.ForceLogin,{})]}):a?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(nY,{previousModulePath:o??"/tunnel/paiement"}),(0,y.jsx)(tC.ForceLogin,{})]}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eE.ModuleLoader,{}),(0,y.jsx)(tC.ForceLogin,{})]})}function nY({previousModulePath:e}){let t=(0,eI.useRouter)();return(0,y.jsx)(Z.Section,{children:(0,y.jsx)(eS.Box,{children:(0,y.jsx)(eA.BoxContent,{children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,align:e_.Align.CENTER,children:[(0,y.jsx)(tZ.Loader,{}),(0,y.jsx)(el.Title,{level:ec.TitleLevels.TWO,markup:ec.TitleMarkup.H1,
3className:"has-text-centered",children:"On va devoir faire autrement"}),(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,typo:eu.TypographyBold.TEXT_WEIGHT_NORMAL,className:"has-text-centered",children:"D'autres solutions vous attendent sur la page de paiement"}),(0,y.jsx)(B.Button,{variant:z.ButtonVariant.CONVERSION,onClick:()=>t.push(e),children:"J'y vais"})]})})})})}e.s(["Summary",()=>of],191575);var nZ=e.i(771558);let nQ="yama_cart",nK=(0,_.getAppConfig)();function n0({title:e,icon:t,ctaLabel:r,href:i}){return(0,y.jsx)(eS.Box,{fullheight:!0,children:(0,y.jsx)(eA.BoxContent,{children:(0,y.jsxs)(C.FlexBox,{fullheight:!0,justify:eZ.Justify.SPACE_BETWEEN,gap:5,direction:E.DirectionEnum.COLUMN,mobile:!0,className:"has-text-centered",children:[(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(el.Title,{level:ec.TitleLevels.FIVE,children:e})}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(eF.Icon,{name:t,size:eN.IconSize.MEDIUM})}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(B.Button,{href:i,variant:z.ButtonVariant.PRIMARY,children:r})})]})})})}function n1(){return(0,y.jsxs)(C.FlexBox,{className:"is-fullwidth",gap:5,children:[(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(n0,{title:"Besoin d'un forfait ?",icon:ek.IconName.SIM_CARD,ctaLabel:"Choisir",href:tt.paths.plans})}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(n0,{title:"Besoin d'un téléphone ?",icon:ek.IconName.MOBILE,ctaLabel:"Choisir",href:tt.paths.phoneWall})}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(n0,{title:"Besoin d'une box ?",icon:ek.IconName.BOX,ctaLabel:"Choisir",href:tt.paths.homeFai})})]})}function n2(){return(0,y.jsxs)(C.FlexBox,{gap:5,direction:E.DirectionEnum.COLUMN,className:"is-marginless",children:[(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(n1,{})}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(eS.Box,{children:(0,y.jsx)(eA.BoxContent,{children:(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,children:[(0,y.jsx)(j.FlexItem,{children:(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,direction:{mobile:E.DirectionEnum.COLUMN_REVERSE,tablet:E.DirectionEnum.ROW},children:[(0,y.jsx)(eF.Icon,{name:ek.IconName.ACCESSORIES,size:eN.IconSize.LARGE}),(0,y.jsx)(el.Title,{level:ec.TitleLevels.FIVE,children:"Côté accessoires, vous n'oubliez rien ? "})]})}),(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(B.Button,{variant:z.ButtonVariant.PRIMARY,href:tt.paths.accessoryWall,children:"Choisir"})})]})})})})]})}var rR=rR;function n3(e,t){return t.products.flatMap(e=>e.neededProducts).includes(e.gencode)}function n5({journey:e}){let{removeProductFromCartMutation:t}=(0,T.useContext)(b.CartContext),r=e?.products?.filter(e=>e.isType(v.ProductType.ACCESSORY))??[];return 0===r.length?null:(0,y.jsx)(eS.Box,{testId:"accessories-box",children:(0,y.jsxs)(eA.BoxContent,{children:[(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.SPACE_BETWEEN,children:[(0,y.jsx)(el.Title,{markup:ec.TitleMarkup.H2,level:ec.TitleLevels.FIVE,marginless:!0,children:"Mes accessoires"}),(0,y.jsx)(Y.Link,{href:tt.paths.accessoryWall,children:"Ajouter"})]}),(0,y.jsx)(eL.Divider,{}),r.map(r=>{let i=n3(r,e);return(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.ROW,mobile:!0,align:e_.Align.CENTER,gap:{mobile:4,tablet:5},"data-gencode":r.gencode,children:[(0,y.jsx)(j.FlexItem,{narrow:!0,children:r.metadata?.image&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(nr.Image,{src:`https://www.bouyguestelecom.fr${r.metadata.image}`,alt:"",width:60,className:"is-hidden-mobile"}),(0,y.jsx)(nr.Image,{src:`https://www.bouyguestelecom.fr${r.metadata.image}`,alt:"",width:160,className:"is-hidden-tablet"})]})}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.SPACE_BETWEEN,align:e_.Align.END,children:[(0,y.jsxs)(j.FlexItem,{children:[(0,y.jsx)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,marginless:!0,children:r.metadata?.name}),(0,y.jsx)(Q.Text,{children:r.metadata?.color}),(0,y.jsx)(rR.default,{level:rD.PriceLevel.SIX,oldAmount:r.price.basePrice!==r.price.foreverPrice?r.price.basePrice:void 0,amount:r.price.foreverPrice})]}),!i&&(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)("button",{type:"button","data-testid":"delete-btn",onClick:()=>t.mutateAsync({journey:e.type,gencode:r.gencode}),className:"link button-clear is-size-6",children:"Supprimer"})})]})})]},r.id)})]})})}var n9=e.i(668740);let n4=(0,_.getAppConfig)(),n6=new class{async getBanners(){return await S.httpService.get(`${n4.assets.palpatine.checkoutApi}/cart_banners`)}
3async getNuggetsBySlug(e){return await S.httpService.get(`${n4.assets.palpatine.nuggets}/btbd/${e}`).then(e=>({alert:{title:e.alert_title,content:e.alert_content,icon:e.alert_icon},content:e.contenu.map(({title:e,pepites:t})=>({title:e,nuggets:(0,eP.markdownTrilogy)(t)}))})).catch(()=>null)}async getParentalControlDecoration(){return await S.httpService.get(`${n4.assets.palpatine.checkoutApi}/checkout_parental_control`).then(e=>e.items[0]?.parental_control_choice?.items?.reduce((e,t)=>(e[t.gencode]={name:t.title,description:t.description,sticker:t.sticker_text?{label:t.sticker_text,color:t.sticker_color,icon:t.sticker_icon,extraInfo:t.pricing_extra_info}:void 0,flag:t.radio_flag},e),{})??{}).catch(()=>({}))}async getPlansCms(){return(await S.httpService.get(`${n4.assets.palpatine.plans}/forfaits_offers`,void 0,{ttl:Number.parseInt(n4.cache.ttl.cms,10),tags:[ew.CMS]}).catch(()=>({items:[]}))).items.reduce((e,t)=>(e[t.gencode]=t,e),{})}},n8=new class{async getMixedCartMobilePlans(e,t,r){let i,[n,s,o]=await Promise.all([tX.getCategoryProducts([e]),(i=v.CartFactory.toRequestBody(t),!t.getJourneyOfType(v.JourneyType.MOBILE_ACQUISITION)&&i.parcours.push({referenceExterne:v.JourneyType.MOBILE_ACQUISITION,typeParcours:v.JourneyType.MOBILE_ACQUISITION,elements:[]}),rC.getProductsByCategory(e,i,v.JourneyType.MOBILE_ACQUISITION,{fundingMode:rI.SapicFundingMode.MIN_ONE_OFF,withDetails:!1,limit:-1},r)),n6.getPlansCms()]),a=n.reduce((e,t)=>{let r=t.gencode;return r&&(e[r]=t),e},{});return s.products.map(e=>rF.mobilePlanMapper(e,a[e.gencode],!1,o[e.gencode])).sort((e,t)=>e.position-t.position)}};function n7({title:e,subtitle:t,promoMessage:r,backgroundColor:i,backgroundImage:n,isInverted:s,iconOrImage:o,children:a,name:l,active:c,setActive:u,className:d="",isLoading:p=!1,testId:m,labelYes:h="Oui",labelNo:g="Non",subtitleCloseToTitle:x=!0}){return(0,y.jsx)(eS.Box,{testId:m,children:(0,y.jsxs)(eA.BoxContent,{backgroundSrc:i?void 0:n,...i&&{style:{backgroundColor:i}},className:(0,ts.classNames)(s?"is-inverted":"",d),children:[(0,y.jsxs)(C.FlexBox,{gap:5,children:[(0,y.jsx)(j.FlexItem,{className:"is-fullwidth",children:(0,y.jsxs)(C.FlexBox,{align:{mobile:e_.Align.START,desktop:e_.Align.CENTER},gap:5,className:"is-fullwidth",children:[o&&(0,y.jsx)(j.FlexItem,{narrow:!0,children:o}),(0,y.jsxs)(j.FlexItem,{children:[(0,y.jsx)(el.Title,{level:ec.TitleLevels.FIVE,className:`is-fullwidth ${p?"
3skeleton w-fit":""}`,children:e}),r&&(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,marginless:!0,children:r}),x&&("string"==typeof t?(0,y.jsx)(e8,{className:p?"skeleton":"",content:(0,eP.markdownTrilogy)(t)}):t)]})]})}),(0,y.jsx)(j.FlexItem,{className:"is-fullwidth-mobile",children:(0,y.jsxs)(C.FlexBox,{className:" has-text-font",justify:eZ.Justify.END,children:[(0,y.jsx)(nh.RadioTile,{onChange:()=>u(!0),value:"yes",label:h,name:l,checked:c,horizontal:!0,disabled:p,className:(0,ts.classNames)("w-fit-tablet",p?"skeleton":"")}),(0,y.jsx)(nh.RadioTile,{onChange:()=>{u(!1)},value:"no",label:g,name:l,checked:!c,horizontal:!0,disabled:p,className:(0,ts.classNames)("w-fit-tablet",p?"skeleton":"")})]})})]}),!x&&("string"==typeof t?(0,y.jsx)(e8,{className:p?"skeleton":"",content:(0,eP.markdownTrilogy)(t)}):t),c&&a&&a]})})}let se=new class{async getBanner(e){let t=(await n6.getBanners()).items.filter(t=>t.slug===e);return this.getPrioritizedBanners(t)[0]??null}getPrioritizedBanners(e){let t=e.filter(e=>{if(!(e.start_date||e.end_date))return!1;let t=new Date;return e.start_date&&e.end_date?function(e,t){let r=+(0,L.toDate)(e,void 0),[i,n]=[+(0,L.toDate)(t.start,void 0),+(0,L.toDate)(t.end,void 0)].sort((e,t)=>e-t);return r>=i&&r<=n}(t,{start:ix(e.start_date),end:ix(e.end_date)}):e.start_date?t>=ix(e.start_date):!!e.end_date&&t<=ix(e.end_date)}),r=e.filter(e=>!(e.start_date||e.end_date));return t.sort((e,t)=>{var r,i;let n;return e.start_date||t.start_date?e.start_date?t.start_date?(r=ix(e.start_date),i=ix(t.start_date),(n=(0,L.toDate)(r)-(0,L.toDate)(i))>0?-1:n<0?1:n):-1:1:0}),[...t,...r]}};var st=((x={}).FAI_BYOU="panier-mixte-offre-byou-pure-fibre",x.FAI_BIG="panier-mixte-offre-fixe",x.FAI_BANK="panier-mixte-offre-banque",x.MOBILE_BYOU="panier-mixte-offre-mobile",x.MOBILE_BIG="panier-mixte-offre-foyer",x.MOBILE_BANK="panier-mixte-offre-banque-mobile",x);let sr=({className:e,config:t={elig_title:"On regarde ensemble si la Fibre est disponible chez vous ?",button_label:"Tester mon éligibilité",endpoint:"/offres-internet/test-eligibilite-panier-mixte",show_migration_link:!1,show_icon:!1}})=>{let{cart:r}=(0,T.useContext)(b.CartContext);(0,T.useMemo)(()=>r?.getJourneyOfType(v.JourneyType.MOBILE_ACQUISITION)?.products.some(e=>e.metadata?.bankingOffer||e.metadata?.categories?.includes(rI.SapicCategoryId.BANK_MIXED_CART)),[r])&&(t.endpoint="/offres-internet/test-eligibilite-bboxbanque");let i=(0,T.useRef)(null),[n,s]=(0,T.useState)(null),o=(0,_.getAppConfig)();return((0,T.useEffect)(()=>{let e="fai-eligibility-widget";if(document.getElementById(e))return;let t=document.createElement("script");return t.id=e,t.src=o.widget.faiEligibilityWidget.src,t.async=!0,t.onerror=()=>{s("Failed to load FAI eligibility widget")},document.body.appendChild(t),()=>{let t=document.getElementById(e);t&&document.body.removeChild(t)}},[o.widget.faiEligibilityWidget.src]),n)?(0,y.jsx)("div",{className:e,role:"alert",children:(0,y.jsx)("p",{children:"Erreur lors du chargement du widget"})}):(0,y.jsx)("div",{id:"widget",ref:i,className:e,children:(0,T.createElement)("fai-eligibility-widget",{elig_title:t?.elig_title,button_label:t?.button_label,endpoint:t?.endpoint,show_migration_link:t?.show_migration_link,show_icon:t?.show_icon})})};var rO=rO,si=e.i(842402),rR=rR,rR=rR;function sn({width:e=12,infoBlockContent:t,children:r}){return(0,y.jsx)(C.FlexBox,{children:(0,y.jsx)(j.FlexItem,{size:{mobile:12,tablet:e},children:(0,y.jsx)(eS.Box,{shadowless:!0,highlighted:eT.TrilogyColor.INFO,className:"box-thin",children:(0,y.jsx)(eA.BoxContent,{backgroundColor:eT.TrilogyColor.INFO_FADE,children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,children:[(0,y.jsx)(j.FlexItem,{children:(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,justify:eZ.Justify.SPACE_BETWEEN,gap:I.GapSize.TWO,direction:E.DirectionEnum.ROW,children:[(0,y.jsx)(j.FlexItem,{children:(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,gap:I.GapSize.THREE,direction:E.DirectionEnum.ROW,children:[(0,y.jsx)(j.FlexItem,{narrow:!0,children:t.icon}),(0,y.jsxs)(j.FlexItem,{children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,marginless:!0,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:t.title}),(0,y.jsx)(Q.Text,{level:K.TextLevels.THREE,marginless:!0,children:t.subtitle})]})]})}),(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(rR.default,{level:rD.PriceLevel.SEVEN,amount:t.price,period:"mois"})})]})}),r&&(0,y.jsx)(j.FlexItem,{children:r})]})})})})})}var ss=e.i(596764);function so({isByou:e,isAdded:t,isLoading:r,onAddRemove:i,onShowDetail
3s:n,onShowDestinations:s}){return(0,y.jsxs)(rX.ButtonList,{direction:ss.ButtonListDirectionEnum.COLUMN,className:"has-text-centered",children:[(0,y.jsx)(B.Button,{fullwidth:!0,variant:t?z.ButtonVariant.SECONDARY:z.ButtonVariant.PRIMARY,onClick:i,className:e&&!t?"has-background-byou":"",loading:r,disabled:r,testId:t?"remove-btn":"add-btn",children:t?"Supprimer":"Ajouter ce forfait"}),e?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.TWO}),(0,y.jsx)(te.ButtonClear,{onClick:s,children:"Voir les destinations en Europe*"})]}):(0,y.jsx)(B.Button,{fullwidth:!0,variant:z.ButtonVariant.SECONDARY,onClick:n,testId:"details-btn",children:"En savoir plus"})]})}function sa({iconName:e,children:t,level:r=K.TextLevels.TWO,iconSize:i=eN.IconSize.SMALL}){return(0,y.jsx)(j.FlexItem,{children:(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,direction:E.DirectionEnum.ROW,children:[(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(eF.Icon,{name:e??ek.IconName.CHECK,size:i})}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(Q.Text,{level:r,marginless:!0,typo:eD.TypographyAlign.TEXT_LEFT,className:"is-prewrap",children:t})})]})})}function sl(e,t){let r=e.split(" ");return`<b>${r.slice(0,t).join(" ")}</b> ${r.slice(t).join(" ")}`}function sc({offer:e}){var t;let r,i=e.fromAbroad?.trim().split("\n"),n=i?.[0]?sl(i[0],2):"",s=i?.[1]?.includes("autres destinations")?sl(i[1],2):"",o="";e.unlimitedCalls?.trim()&&(o=sl((t=e.unlimitedCalls,r=["2h d'appels et SMS illimités","Appels, SMS, MMS illimités"].map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),t.replaceAll(RegExp(`(${r})`,"gi"),"<b>$1</b>")),4));let a=e.internationalCall?.trim()?sl(e.internationalCall,5):"",l=e.wordingBtv?.trim()?sl(e.wordingBtv,5):"",c=e.hasDoubleSim?sl("Multi-SIM incluse utilisable sur un second appareil",2):"",u=[{content:n,iconName:ek.IconName.AT},{content:s,iconName:ek.IconName.AIR_TRAVEL},{content:o,iconName:ek.IconName.MOBILE_GLOBE},{content:a,iconName:ek.IconName.PHONE_GLOBE},{content:l,iconName:ek.IconName.BTV},{content:c,iconName:ek.IconName.SIM_CARDS}].filter(({content:e})=>e);return(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:{desktop:I.GapSize.FOUR,mobile:I.GapSize.TWO},"data-cy":"offer-card-pepites",children:[u.map(({content:e,iconName:t})=>(0,y.jsx)(sa,{iconName:t,children:(0,y.jsx)(e8,{content:e})},t)),e.cmsContent?.addedPepites?.map(e=>(0,y.jsx)(sa,{iconName:e.icon,children:(0,y.jsx)(e8,{content:e.pepite})},e.pepite))]})}let su={src:e.i(926733).default,width:391,height:187,blurWidth:0,blurHeight:0},sd={src:e.i(432580).default,width:391,height:187,blurWidth:0,blurHeight:0},sp={src:e.i(78187).default,width:391,height:187,blurWidth:0,blurHeight:0},sm={src:e.i(328444).default,width:391,height:187,blurWidth:0,blurHeight:0};var sh=((f={}).PRIMARY="primary",f.INFO="info",f.WHITE="white",f.NEUTRAL="grey",f);function sg({height:e=16,variant:t="primary",...r}){let i;switch(t){case"info":i=sp;break;case"grey":i=sd;break;case"white":i=sm;break;default:i=su}return(0,y.jsx)(rP.default,{height:e,src:i,alt:"Big",priority:!0,...r})}function sx({plan:e,isByou:t}){return(0,y.jsx)(eA.BoxContent,{backgroundColor:t?eT.TrilogyColor.INFO_FADE:eT.TrilogyColor.BACKGROUND,children:(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,justify:eZ.Justify.SPACE_BETWEEN,className:t?"has-text-byou":void 0,children:[t?(0,y.jsx)(el.Title,{marginless:!0,level:ec.TitleLevels.THREE,children:e.name}):(0,y.jsxs)("div",{children:[(0,y.jsxs)(el.Title,{marginless:!0,level:ec.TitleLevels.THREE,children:["Forfait ",e.shortDescription]}),(0,y.jsx)(el.Title,{level:ec.TitleLevels.FIVE,children:e.dataEnvelope})]}),(0,y.jsx)(eF.Icon,{name:ek.IconName.UI_5G,size:eN.IconSize.MEDIUM,className:t?"has-background-byou":void 0,stretched:t})]})})}function sf({plan:e,isByou:t}){let[r,i]=(0,T.useState)(!1),[n,s]=(0,T.useState)(!1),[o,a]=(0,T.useState)(!1);return(0,y.jsx)("div",{style:{minHeight:"220px"},children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,children:[!!e.fromAbroad&&(0,y.jsxs)(sy,{iconName:ek.IconName.AT_GLOBE,isByou:t,children:[(0,y.jsx)(e8,{content:e.fromAbroad}),!t&&(0,y.jsx)(te.ButtonClear,{onClick:()=>i(!0),children:"Voir les destinations"})]}),r&&(0,y.jsx)(sT,{partialUrl:"/partials/mobiles/banniere_forfaits-mobiles_destinations_europe",onClose:()=>i(!1),customList:e.cmsContent?.modalCustomDestinationPartial}),!!e.unlimitedCalls&&(0,y.jsx)(sy,{iconName:ek.IconName.SHOOTING_STAR,isByou:t,children:(0,y.jsx)(e8,{content:e.unlimitedCalls})}),!!e.hasDoubleSim&&(0,y.jsx)(sy,{iconName:ek.IconName.SIM_CARDS,isByou:t,children:"Une 2ème carte SIM Internet pour utiliser votre forfait sur un second appareil (tablette, montreâ¦)"}),!!e.smsMms&&(0,y.jsxs)(sy,{iconName:ek.IconName.PHONE_WAITING_CALL,isByou:t,children:[(0,y.jsx)(e8,{content:e.smsMms}),!t&&(0,y.jsx)(te.ButtonClear,{onClick:()=>s(!0),children:"Voir les destinations en Europe"})]}),n&&(0,y.jsx)(sT,{partialUrl:"/partials/mobiles/banniere_forfaits-mobiles_destinations_europe",onClose:()=>s(!1)}),!!e.internationalCall&&(0,y.jsxs)(sy,{iconName:ek.IconName.PHONE_OUTGOING_CALL,isByou:t,children:[(0,y.jsx)(e8,{content:e.internationalCall}),!t&&(0,y.jsx)(te.ButtonClear,{onClick:()=>a(!0),children:"Voir les destinations"})]}),o&&(0,y.jsx)(sT,{partialUrl:"/mobiles/banniere_forfaits-mobiles_destinations",onClose:()=>a(!1)}),t&&(0,y.jsx)(sy,{iconName:ek.IconName.HAND_MOBILE,isByou:t,children:"Assistance 24h/24 via l'application"})]})})}function sy({iconName:e,isByou:t,children:r}){return(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,mobile:!0,direction:E.DirectionEnum.ROW,children:[(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(eF.Icon,{name:e,size:t?eN.IconSize.SMALL:eN.IconSize.MEDIUM})}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(Q.Text,{level:t?K.TextLevels.TWO:K.TextLevels.ONE,children:r})})]})}function sT({onClose:e,partialUrl:t,customList:r}){return(0,y.jsxs)(eS.Box,{shadowless:!0,backgroundColor:eT.TrilogyColor.NEUTRAL_FADE,className:"is-relative",children:[(0,y.jsx)(te.ButtonClear,{onClick:e,className:"is-absolute",style:{to
3p:10,right:10,cursor:"pointer"},children:(0,y.jsx)(eF.Icon,{name:ek.IconName.TIMES})}),r?(0,y.jsx)("div",{dangerouslySetInnerHTML:{__html:(0,eP.markdownTrilogy)(r)}}):(0,y.jsx)(ee.SSIBlock,{url:t})]})}function sv({isByou:e,plan:t,planInCart:r,onShowDetailsModal:i,onShowDestinationsModal:n,appliedPortabilityDiscount:s,onMobilePlanMutate:o}){let[a,l]=(0,T.useState)(!1),c=(0,T.useMemo)(()=>t.details.discounts.find(e=>!e.isIncitation&&e.marketingTypes.includes(tl.HOME)),[t.details.discounts]),u=r?.gencode===t.gencode,d=async()=>{l(!0);try{let e=t.details.discounts.some(e=>e.marketingTypes.includes(tl.PORTABILITY)),r=t.neededElements?.filter(e=>e.gencode).map(e=>e.gencode)||[];await o({gencodes:{plan:t.gencode,autoAddedProducts:r},isAdded:u,hasPortability:e})}finally{l(!1)}},p=t.details.discounts.find(e=>e.marketingTypes.includes(tl.PORTABILITY)),m=r?.gencode!==t.gencode||s?.id===p?.label?p:void 0,h=function(e,t){let r=e.details.discounts.find(e=>!e.isIncitation&&e.marketingTypes.includes(tl.HOME)),i={title:"Remise client Bbox",subtitle:"Déjà déduite",price:-(r?.value??0),icon:(0,y.jsx)(sg,{height:12,variant:sh.INFO})};if(r)return i;let n=e.details.discounts.filter(e=>e.isIncitation&&e.marketingTypes?.includes(tl.HOME)&&null!=e.value).sort((e,t)=>(e.value??0)-(t.value??0))[0]??null,s=t?.availableDiscounts.filter(e=>e.marketingType?.includes(tl.MULTILINE));if(n)i.title="Prix client Bbox",i.subtitle=e.details.price.duration?`${(0,rU.formatPrice)((e.details.price.forever??0)-(n.value??0))}/mois apr\xe8s ${e.details.price.duration} mois`:"",i.price=(e.details.price.final??0)-(n.value??0),i.icon=(0,y.jsx)(sg,{height:12,variant:sh.INFO});else if((s?.length??0)>0)i.title=(0,y.jsxs)(y.Fragment,{children:["Prix déjà client Bbox + forfait"," ",(0,y.jsx)(eM.Popover,{trigger:(0,y.jsx)(eF.Icon,{name:ek.IconName.QUESTION_CIRCLE}),children:"Pour tout client détenteur d'une offre Bbox et d'un forfait Bouygues Telecom 20 Go et + (hors B&YOU)"})]}),i.price=(e.details.price.final??0)-(s?.reduce((e,t)=>e+(t.amount??0),0)??0),i.icon=(0,y.jsx)(sg,{height:12,variant:sh.INFO});else if(!r)return;return i}(t,r);return e?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(sx,{plan:t,isByou:!0}),(0,y.jsx)(eA.BoxContent,{children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,align:e_.Align.CENTER,gap:4,children:[(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(sf,{plan:t,isByou:!0})}),(0,y.jsxs)(j.FlexItem,{children:[(0,y.jsx)(rR.default,{className:`is-fullwidth is-centered ${a?"skeleton":""}`,level:rD.PriceLevel.THREE,amount:t.details.price.final,period:"mois"}),(0,y.jsx)(Q.Text,{level:K.TextLevels.THREE,typo:eD.TypographyAlign.TEXT_CENTERED,children:"Sans engagement"})]}),(0,y.jsx)(j.FlexItem,{className:"!is-fullwidth",children:(0,y.jsx)(so,{isByou:e,isAdded:u,isLoading:a,onAddRemove:d,onShowDetails:i,onShowDestinations:n})})]})})]}):(0,y.jsx)(eA.BoxContent,{children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,justify:eZ.Justify.SPACE_BETWEEN,fullheight:!0,gap:{mobile:I.GapSize.ONE},children:[(0,y.jsx)(j.FlexItem,{children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:{mobile:I.GapSize.THREE,desktop:I.GapSize.FIVE},children:[(0,y.jsx)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:I.GapSize.FIVE,children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:I.GapSize.SEVEN,className:c?"big-info-box":void 0,children:[(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.SPACE_BETWEEN,children:[(0,y.jsxs)("div",{children:[(0,y.jsxs)(el.Title,{level:ec.TitleLevels.THREE,marginless:!0,children:["Forfait ",t.shortDescription]}),(0,y.jsx)(el.Title,{level:ec.TitleLevels.FIVE,marginless:!0,children:t.dataEnvelope})]}),(0,y.jsx)(eF.Icon,{name:t?.maxConnections==="5g"?ek.IconName.UI_5G:ek.IconName.UI_4G,size:"medium"})]})}),(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:I.GapSize.FOUR,children:[(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:I.GapSize.TWO,className:`main-price-bloc ${m?"with-y1y2-price":""}`,children:[(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(iO.View,{justify:eZ.Justify.CENTER,align:e_.Align.CENTER,flexable:!0,children:(0,y.jsx)(rR.default,{className:a?"skeleton":"",amount:t.details.price.final-(m?.discount||0),period:"mois",level:rD.PriceLevel.FOUR,"data-cy":"plan-final-price"})})}),(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.CENTER,gap:I.GapSize.TWO,direction:E.DirectionEnum.ROW,children:[(0,y.jsxs)(j.FlexItem,{narrow:!0,children:[m&&(0,y.jsxs)(Q.Text,{typo:[eD.TypographyAlign.TEXT_CENTERED,eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD],marginless:!0,level:K.TextLevels.THREE,children:["puis ",(0,y.jsx)(ed.InlinePrice,{level:K.TextLevels.THREE,amount:t.details.price.forever,period:"mois"})," après ",m.duration," mois"]}),(0,y.jsx)(Q.Text,{marginless:!0,typo:eD.TypographyAlign.TEXT_CENTERED,level:K.TextLevels.THREE,className:"capitalize-first",children:t.obligationLabel})]}),(0,y.jsx)(j.FlexItem,{narrow:!0,children:(m?.duration||0)>0&&(0,y.jsxs)(eM.Popover,{direction:si.PopoverDirection.LEFT,trigger:(0,y.jsx)(Q.Text,{level:K.TextLevels.THREE,marginless:!0,children:(0,y.jsx)(eF.Icon,{size:eN.IconSize.SMALLER,name:ek.IconName.INFOS_CIRCLE})}),children:["Prix sans conservation du numéro :"," ",(0,rU.formatPrice)(t.details.price.forever),"/mois"]})})]})})]}),c&&h&&(0,y.jsx)(sn,{infoBlockContent:h,children:t.cmsContent?.bigBenefit&&(0,y.jsx)("div",{className:"text is-level-3",dangerouslySetInnerHTML:{__html:(0,eP.markdownTrilogy)(t.cmsContent.bigBenefit)}})})]})]})}),(0,y.jsx)(B.Button,{loading:a,onClick:d,type:"button",variant:u?z.ButtonVariant.SECONDARY:z.ButtonVariant.PRIMARY,fullwidth:!0,"data-cy":"cta-show-plan-upgrade-modal",children:u?"Supprimer":"Ajouter ce forfait"}),(0,y.jsx)(sc,{offer:t})]})}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:I.GapSize.FIVE,justify:eZ.Justify.END,fullheight:!0,children:[(0,y.jsx)(B.Button,{onClick:i,type:"button",variant:z.ButtonVariant.GHOST,fullwidth:!0,accessibilityLabel:`Voir les d\xe9tails du ${t.name}`,children:"Voir les détails"}),(0,y.jsx)(Q.Text,{level:K.TextLevels.THREE,marginless:!0,children:'* Liste des destinations dans "Voir les détails"'})]})})]})})}
3function sb({isOpen:e,onClose:t,url:r="/partials/mobiles/banniere_forfaits-mobiles_destinations_europe",title:i="Destinations de la zone Europe"}){return(0,y.jsxs)(e0.Modal,{size:rY.ModalSize.SMALL,title:i,active:e,onClose:t,children:[(0,y.jsx)(e1.ModalBody,{children:(0,y.jsx)(ee.SSIBlock,{url:r})}),(0,y.jsx)(e2.ModalFooter,{children:(0,y.jsx)(B.Button,{variant:z.ButtonVariant.PRIMARY,onClick:t,children:"Fermer"})})]})}function sE({plan:e,isOpen:t,onClose:r}){return(0,y.jsxs)(e0.Modal,{size:rY.ModalSize.SMALL,title:`Forfait ${e.name}`,active:t,onClose:r,children:[(0,y.jsxs)(e1.ModalBody,{children:[(0,y.jsxs)(Q.Text,{children:[(0,y.jsx)(ed.InlinePrice,{amount:e.details.price.final,period:"mois",typo:[eu.TypographyBold.TEXT_WEIGHT_NORMAL]}),e.details.price.duration&&e.details.price.duration>0&&(0,y.jsxs)(y.Fragment,{children:["pendant ",e.details.price.duration," mois puis"," ",(0,y.jsx)(ed.InlinePrice,{amount:e.details.price.forever,period:"mois"})]})]}),(0,y.jsx)(el.Title,{level:ec.TitleLevels.FIVE,children:e.hasLowPrice?"L'essentiel pour bien communiquerâ¦":"Le plein de gigas, mais pas seulementâ¦"}),(0,y.jsx)(sf,{plan:e,isByou:!1})]}),(0,y.jsx)(e2.ModalFooter,{children:(0,y.jsx)(B.Button,{variant:z.ButtonVariant.PRIMARY,onClick:()=>r(),children:"Fermer"})})]})}function sC({plan:e,planInCart:t,isByou:r,appliedPortabilityDiscount:i,onMobilePlanMutate:n}){let[s,o]=(0,T.useState)(!1),[a,l]=(0,T.useState)(!1);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(eS.Box,{className:"is-marginless","data-gencode":e.gencode,id:`plan-${e.gencode}`,fullheight:!0,children:[!!e.planFlag&&(0,y.jsx)(rO.default,{children:e.planFlag}),(0,y.jsx)(sv,{plan:e,isByou:r,planInCart:t,onShowDetailsModal:()=>o(!0),onShowDestinationsModal:()=>l(!0),appliedPortabilityDiscount:i,onMobilePlanMutate:n})]}),(0,y.jsx)(sE,{plan:e,isOpen:s,onClose:()=>o(!1)}),(0,y.jsx)(sb,{isOpen:a,onClose:()=>l(!1)})]})}var rR=rR,nc=nc;function sj(){return(0,y.jsxs)(eS.Box,{children:[(0,y.jsx)(eA.BoxContent,{children:(0,y.jsx)(el.Title,{marginless:!0,level:ec.TitleLevels.TWO,className:"skeleton w-fit",children:"Lorem"})}),(0,y.jsx)(eA.BoxContent,{children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,align:e_.Align.CENTER,gap:4,children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.THREE,className:"skeleton",marginless:!0,children:"Lorem ipsum dolor sit amet consectetur adipiscing elit. Donec suscipit auctor dui, at condimentum velit efficitur ut. Donec suscipit auctor dui, at condimentum velit efficitur ut."}),(0,y.jsx)(nc.default,{className:"has-text-centered is-fullwidth skeleton",small:!0,label:"test fanion",variant:iR.VariantState.INFO}),(0,y.jsx)(rR.default,{className:"is-fullwidth is-centered skeleton",level:rD.PriceLevel.THREE,amount:99.99,period:"mois"}),(0,y.jsx)(Q.Text,{level:K.TextLevels.THREE,typo:eD.TypographyAlign.TEXT_CENTERED,className:"skeleton",children:"Sans engagement"}),(0,y.jsx)(j.FlexItem,{className:"!is-fullwidth",children:(0,y.jsxs)(rX.ButtonList,{direction:ss.ButtonListDirectionEnum.COLUMN,children:[(0,y.jsx)(B.Button,{fullwidth:!0,variant:z.ButtonVariant.PRIMARY,disabled:!0,children:"Ajouter au panier"}),(0,y.jsx)(B.Button,{fullwidth:!0,variant:z.ButtonVariant.SECONDARY,disabled:!0,children:"En savoir plus"})]})})]})})]})}function sI({plans:e,isLoading:t,isByouOffer:r,onMobilePlanMutate:i}){let{cart:n}=(0,T.useContext)(b.CartContext),s=n?.getJourneyOfType(v.JourneyType.MOBILE_ACQUISITION)?.products.find(e=>e.isType(v.ProductType.MAIN_MOBILE_OFFER)),o=s?.appliedDiscounts.find(({marketingType:e})=>e===tl.PORTABILITY);return(0,y.jsx)(C.FlexBox,{gap:I.GapSize.FIVE,wrap:!0,children:t?(0,y.jsx)(s_,{}):e.map(e=>(0,y.jsx)(j.FlexItem,{size:{widescreen:4,tablet:6,mobile:12},children:(0,y.jsx)(sC,{plan:e,planInCart:s,isByou:r,appliedPortabilityDiscount:o,onMobilePlanMutate:i})},e.gencode))})}function s_(){return["plan1","plan2","plan3"].map(e=>(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(sj,{})},`skeleton-${e}`))}function sS({journeyType:e,onMobilePlanMutate:t,plans:r,isPlansLoading:i}){let{cart:n}=(0,T.useContext)(b.CartContext),[s,o]=(0,T.useState)(!0),a=(0,n9.isMixedCartEnabled)(),{banner:l,isByou:c}=function(){let{cart:e}=(0,T.useContext)(b.CartContext),t=e.journeys[0],r=t.isType(v.JourneyType.FAI_ACQUISITION)?t.getProductsByType(v.ProductType.MAIN_FAI_OFFER)[0]:t.getProductsByType(v.ProductType.MAIN_MOBILE_OFFER)[0],i=(0,T.useMemo)(()=>r?.metadata?.categories?.includes(rI.SapicCategoryId.FAI_BYOU)||r?.metadata?.commercialRange===tc.B_YOU,[r?.metadata?.categories,r?.metadata?.commercialRange]),n=(0,T.useMemo)(()=>r?.metadata?.bankingOffer||r?.metadata?.categories?.includes(rI.SapicCategoryId.BANK_MIXED_CART),[r?.metadata]),s=(0,T.useMemo)(()=>{let e=t.isType(v.JourneyType.FAI_ACQUISITION);return n?e?st.FAI_BANK:st.MOBILE_BANK:i?e?st.FAI_BYOU:st.MOBILE_BYOU:e?st.FAI_BIG:st.MOBILE_BIG},[i,t,n]),{data:o}=(0,td.useQuery)({queryKey:["mixedCartBanner",s],queryFn:()=>se.getBanner(s),enabled:!!s&&(0,n9.isMixedCartEnabled)()});return{banner:o,isByou:i}}(),u=n?.getJourneyOfType(v.JourneyType.FAI_ACQUISITION),d=u?.products.find(e=>e.isType(v.ProductType.MAIN_FAI_OFFER)),p=d?.metadata?.categories?.includes(rI.SapicCategoryId.FAI_BYOU)??!1,m=e===v.JourneyType.FAI_ACQUISITION&&!i&&!r?.length;if(!(a&&n?.journeys[0]&&l)||m)return null;let h=l.background?.public_url??"https://www.bouyguestelecom.fr/static/wbm/media/banners/pc10-fond-beige-240923-background-lame_desktop.webp",g=void 0!==n.getJourneyOfType(v.JourneyType.FAI_ACQUISITION),x=n.journeys.flatMap(e=>e.products).find(e=>e.isType(v.ProductType.MAIN_MOBILE_OFFER));if(g&&x&&!r?.map(e=>e.gencode).includes(x?.gencode))return null;let f=(0,y.jsx)(nr.Image,{height:c?44:24,src:`${l.image?.public_url??"big-logo.webp"}`,alt:""}),E=l.trilogy_icon?(0,y.jsx)(eF.Icon,{name:l.trilogy_icon,size:eN.IconSize.MEDIUM}):null;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(n7,{backgroundImage:h,isInverted:c,iconOrImage:E??f,title:l?.title??"Ajoutez un forfait pour faire des BiG économies !",subtitle:l.description??"Profitez de nos offres exclusives pour votre foyer.",active:s,setActive:o,name:"incitation-mixed-cart"}),s&&(0,y.jsxs)(y.Fragment,{children:[e===v.JourneyType.MOBILE_ACQUISITION&&!g&&(0,y.jsx)(sr,{}),e===v.JourneyType.FAI_ACQUISITION&&(0,y.jsx)(sI,{plans:r??[],isLoading:i,isByouOffer:p,onMobilePlanMutate:t})]})]})}let sA=new class{getBankNuggets(e){return n6.getNuggetsBySlug(e)}};var eH=eH;function sL({data:e}){let[t,r]=(0,T.useState)(!1);return(0,y.jsxs)(eS.Box,{className:"btbd-pepites-container",children:[(0,y.jsx)(C.FlexBox,{wrap:!0,direction:{desktop:E.DirectionEnum.ROW,tablet:E.DirectionEnum.COLUMN,mobile:E.DirectionEnum.COLUMN},children:e.content.map(e=>(0,y.jsxs)(j.FlexItem,{size:{desktop:4},children:[(0,y.jsx)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:e.title}),(0,y.jsx)(e8,{content:e.nuggets})]},e.title))}),(0,y.jsx)(te.ButtonClear,{className:"has-text-left",onClick:()=>r(!0),children:"Voir les destinations en Europe*"}),e.alert.title&&e.alert.content&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.FOUR}),(0,y.jsx)(eH.default,{iconName:e.alert.icon,className:"is-fullwidth is-marginless",title:e.alert.title,de
3scription:e.alert.content,status:eT.TrilogyColor.INFO})]}),(0,y.jsx)(sb,{isOpen:t,onClose:()=>r(!1)})]})}var eH=eH;function sF({data:e}){return(0,y.jsxs)(eS.Box,{className:"ftth3clics-pepites-container",children:[(0,y.jsx)(C.FlexBox,{wrap:!0,direction:{desktop:E.DirectionEnum.ROW,tablet:E.DirectionEnum.COLUMN,mobile:E.DirectionEnum.COLUMN},children:e.content.map(e=>(0,y.jsxs)(j.FlexItem,{size:{desktop:4},children:[(0,y.jsx)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:e.title}),(0,y.jsx)(e8,{content:e.nuggets})]},e.title))}),e.alert.title&&e.alert.content&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.FOUR}),(0,y.jsx)(eH.default,{iconName:e.alert.icon,className:"is-fullwidth is-marginless",title:e.alert.title,description:e.alert.content})]})]})}function sk(e,t){return(0,td.useQuery)({queryKey:[e,t],queryFn:()=>{if(!t)throw Error("Slug is required");return sA.getBankNuggets(t)},enabled:!!t})}function sN({journey:e}){let t=e.products.some(e=>e.metadata?.bankingOffer),r=e.getPrincipalProduct(),i=e.isType(v.JourneyType.FAI_ACQUISITION),n=function(e,t){if(!(e&&t))return null;let r=e?.metadata?.commercialSeries;if((0,P.isFtth3Clics)(e))return`zone_panier_1_descriptif_${e?.metadata?.rangeNg}`;switch(!0){case"smart_tv"===r:return"/partials/mixte/zone_panier_bbox_smart_tv_1";case"tablette"===r:return"/partials/ec/zone_panier_bbox_tablette";case"gaming"===r:return"/partials/checkout/indiana/bloc-reception";default:return null}}(r,i),s=sk("btbd-nuggets",(0,T.useMemo)(()=>(i?r?.metadata?.commercialSeries==="banque"||r?.metadata?.bankingOffer:t)?i?`${r?.metadata?.rangeNg}-${r?.metadata?.commercialSeries}`:r?.metadata?.urlKey??null:null,[i,r,t])),o=sk("ftth3clics-nuggets",(0,T.useMemo)(()=>i&&r&&(0,P.isFtth3Clics)(r)?`${r.metadata?.rangeNg}-${r.metadata?.commercialSeries}`:null,[i,r]));return s.data?(0,y.jsx)(sL,{data:s.data}):o.data?(0,y.jsx)(sF,{data:o.data}):n?(0,y.jsx)(ee.SSIBlock,{url:n}):null}var rR=rR;function sM(e){switch(e.metadata?.obligation){case"monthly12":return"Engagement 12 mois";case"monthly24":return"Engagement 24 mois";default:return"Sans engagement"}}function sO(){return(0,y.jsx)(eS.Box,{shadowless:!0,className:"box-thin",testId:"debit-plus-box",children:(0,y.jsx)(eA.BoxContent,{backgroundColor:eT.TrilogyColor?.MAIN_FADE,children:(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,direction:E.DirectionEnum.ROW,children:[(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(eF.Icon,{size:eN.IconSize.MEDIUM,name:ek.IconName.GAUGE})}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(Q.Text,{marginless:!0,level:K.TextLevels.THREE,children:"Option Débit+ jusqu'à 8 Gb/s disponible gratuitement à l'étape suivante."})})]})})})}var sR=e_,sD=e.i(567236);let sw=(0,_.getAppConfig)(),sP=({children:e,product:t,journey:r,customLabel:i,customImageSrc:n,align:s=sR.Align.START,showModifyAndDelete:o=!0,is5gBoxWithTv:a=!1,mainProduct:l,cardFooter:c,isLoading:u=!1,isBankingOffer:d=!1})=>{let{cart:p,removeProductFromCartMutation:m}=(0,T.useContext)(b.CartContext),h=d||t.metadata?.bankingOffer,g=p?.getJourneyOfType(v.JourneyType.FAI_ACQUISITION)?.getPrincipalProduct(),x=!!(g&&(0,P.isFtth3Clics)(g)),f=(0,T.useMemo)(()=>r.type===v.JourneyType.RENEWAL,[r.type]),_=(0,T.useMemo)(()=>t.isType(v.ProductType.MAIN_MOBILE_OFFER)?`Forfait ${t.label}`:t.label,[t]),S=(0,tD.useMutation)({mutationFn:async e=>{await m.mutateAsync({gencode:e.gencode,journey:e.journey})}}),A=(e,t)=>{if(t)return(0,y.jsx)(nr.Image,{src:t,height:74});switch(!0){case e.isType(v.ProductType.TERMINAL):return(0,y.jsx)(nr.Image,{src:`https://www.bouyguestelecom.fr${e.metadata?.image}`,width:70});case e.isType(v.ProductType.FAI_EQUIPMENT):return(0,y.jsx)(nr.Image,{src:`https://www.bouyguestelecom.fr${e.metadata?.image}`,width:80});default:return null}},L=h&&!r.isType(v.JourneyType.FAI_ACQUISITION);return(0,y.jsx)(eS.Box,{fullheight:!0,testId:"cart-item-box",children:(0,y.jsx)(eA.BoxContent,{children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,fullheight:!0,justify:eZ.Justify.SPACE_BETWEEN,gap:{mobile:I.GapSize.THREE,tablet:I.GapSize.FIVE},children:[(0,y.jsxs)(C.FlexBox,{direction:{mobile:E.DirectionEnum.COLUMN_REVERSE,tablet:E.DirectionEnum.ROW},className:"is-marginless",children:[(0,y.jsx)(j.FlexItem,{children:!a&&(0,y.jsx)(el.Title,{className:u?"skeleton":"",level:ec.TitleLevels.FIVE,children:i??_})}),(0,y.jsx)("div",{className:"flex-item",style:{display:o?"block":"none"},children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.ROW,mobile:!0,className:"is-marginless",gap:4,justify:eZ.Justify.END,children:[!L&&(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(B.Button,{onClick:()=>{x&&(0,P.stopFtth3Clics)(),window.location.href=(e=>{switch(!0){case e.isType(v.ProductType.TERMINAL):{let e=r.getProductsByType(v.ProductType.MAIN_MOBILE_OFFER)?.[0];if(e?.metadata?.subType===ta.SMART_CHANGE)return tt.paths.phoneFilter(f,"smart-change");return f?tt.paths.renewalPhoneWall:tt.paths.phoneWall}case e.isType(v.ProductType.MAIN_MOBILE_OFFER):{let t=r.getProductsByType(v.ProductType.TERMINAL)?.[0],i=t?.metadata?.urlKey;if(f&&i)return`${tt.paths.phoneDetail(i,!0)}#offerSelect`;if(e.metadata?.commercialRange===tc.B_YOU)return e.metadata.categories?.includes("forfaits-packs")?tt.paths.plansByouPack:tt.paths.plansByou;if(e.metadata?.commercialRange===tc.WITHOUT_MOBILE)return tt.paths.plansWithoutPhone;if(e.metadata?.technology===sD.TECHNOLOGY.BOX_4G||e.metadata?.technology===sD.TECHNOLOGY.BOX_5G)return tt.paths.hotspotWall;return tt.paths.plans}case e.isType(v.ProductType.MAIN_FAI_OFFER):return tt.paths.eligibilityResult;case e.isType(v.ProductType.FAI_EQUIPMENT):return h?tt.paths.bankEligibility:tt.paths.eligibilityResult;default:return tt.paths.plans}})(t)},loading:S.isPending,className:"link button-clear is-size-7",testId:"modify-btn",children:"Modifier"})}),!f&&(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(B.Button,{onClick:()=>{o&&(x&&(0,P.stopFtth3Clics)(),S.mutateAsync({gencode:l?.gencode??t.gencode,journey:r.type}))},loading:S.isPending,className:"link button-clear is-size-7",testId:"delete-btn",children:"Supprimer"})})]})})]}),a?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(nr.Image,{width:80,src:`${sw.assets.palpatine.mediaLibrary}/original/CMS/ecommerce/checkout/terebi_offer_logo.svg`}),(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.THREE}),(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,children:"Internet et TV"})]}):null,(0,y.jsxs)(C.FlexBox,{gap:I.GapSize.ONE,direction:E.DirectionEnum.COLUMN,fullheight:!0,justify:eZ.Justify.SPACE_BETWEEN,children:[(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.ROW,mobile:!0,align:s,gap:I.GapSize.FOUR,children:[!!A(t,n)&&(0,y.jsx)(j.FlexItem,{narrow:!0,children:A(t,n)}),(0,y.jsx)(j.FlexItem,{children:e})]})}),c]})]})})})};function sB({children:e}){return(0,y.jsx)(eS.Box,{fullheight:!0,children:(0,y.jsxs)(eA.BoxContent,{children:[(0,y.jsx)(iO.View,{children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.ROW,mobile:!0,className:"is-marginless",gap:4,justify:eZ.Justify.END,children:[(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(B.Button,{className:"button-clear is-size-7 skeleton",children:"Modifier"})}),(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(B.Button,{className:"button-clear is-size-7 skeleton",children:"Supprimer"})})]})}),(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.THREE}),(0,y.jsx)(el.Title,{level:ec.TitleLevels.FOUR,className:"skeleton",children:"Félix se fait cracher dessus"}),(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.ROW,mobile:!0,gap:5,children:[(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(iO.View,{style:{width:70,height:70,backgroundColor:"#E0E0E0",borderRadius:8}})}),(0,y.jsx)(j.FlexItem,{children:e})]})]})})}function sz({journey:e}){let t,r=e?.products.find(e=>e.isType(v.ProductType.MAIN_FAI_OFFER)),i=e?.products.find(e=>e.isType(v.ProductType.FAI_EQUIPMENT)),n=Math.round(((r?.price.priceWithPromotions??0)+(i?.price.priceWithPromotions??0))*100)/100,s=(r?.price.foreverPrice??0)+(i?.price.foreverPrice??0),o=r?.metadata?.technology==="FTTH",{data:a,isFetching:l}=(0,td.useQuery)({queryKey:["product-prio",r?.metadata?.productPrio],queryFn:async()=>await rk.getProductsByGencode([r?.metadata?.productPrio??""]).then(e=>e[r.metadata.productPrio]),enabled:!!r?.metadata?.productPrio,staleTime:iw.DEFAULT_STALE_TIME}),c=r?.metadata?.commercialSeries==="medium_tv_xgbox",{data:u}=nL(()=>nA.showDebitPlus(r),!1),d=r?function(e){let t=e.appliedDiscounts.find(e=>e.marketingType?.includes(tl.HOME));if(t)return{title:"Remise client mobile",subtitle:"Déjà déduite",price:-(t.amount??0),icon:(0,y.jsx)(sg,{height:12,variant:sh.INFO})}}(r):void 0;return r?(0,y.jsxs)(C.FlexBox,{gap:{mobile:4,tablet:5},children:[(0,y.jsx)(j.FlexItem,{size:{tablet:6},children:(0,y.jsxs)(sP,{product:r,journey:e,customLabel:r.metadata?.shortDe
3scription,showModifyAndDelete:!1,is5gBoxWithTv:c,align:e_.Align.CENTER,children:[(0,y.jsx)(rR.default,{level:rD.PriceLevel.SIX,amount:n,period:"mois"}),s>0&&s!==n&&(0,y.jsxs)(Q.Text,{marginless:!0,level:K.TextLevels.TWO,children:["Pendant ",r.price.discountDuration," mois puis"," ",(0,y.jsx)(ed.InlinePrice,{amount:s,typo:eu.TypographyBold.TEXT_WEIGHT_NORMAL,level:K.TextLevels.TWO})," ","/mois"]}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:sM(r)}),(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.FOUR}),d&&(0,y.jsx)(sn,{infoBlockContent:d,width:12}),o&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{marginless:!0,level:K.TextLevels.TWO,children:(t="Internet",r.metadata?.play==="3P"&&(t+=" / TV"),(r.metadata?.play==="2P"||r.metadata?.play==="3P")&&(t+=" / Téléphonie"),r.metadata?.commercialSeries==="smart_tv"&&(t="Internet / TV / Téléphonie + Smart TV"),t)}),(0,y.jsx)(Q.Text,{marginless:!0,level:K.TextLevels.TWO,children:"Fibre très rapide jusqu'à "}),(0,y.jsxs)(C.FlexBox,{children:[(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,children:[(0,y.jsx)(eF.Icon,{name:ek.IconName.ARROW_BOTTOM,size:eN.IconSize.SMALLER}),(0,y.jsx)(Q.Text,{marginless:!0,level:K.TextLevels.TWO,children:r.metadata?.speedDown})]}),(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,children:[(0,y.jsx)(eF.Icon,{name:ek.IconName.ARROW_HIGH,size:eN.IconSize.SMALLER}),(0,y.jsx)(Q.Text,{marginless:!0,level:K.TextLevels.TWO,children:r.metadata?.speedUp})]})]}),u&&(0,y.jsx)(sO,{})]})]})}),(0,y.jsx)(j.FlexItem,{size:{tablet:6},children:i&&(0,y.jsx)(sP,{product:i,isBankingOffer:!!(r.metadata?.commercialSeries==="banque"||r?.metadata?.bankingOffer),journey:e,customLabel:"Mon équipement",customImageSrc:`https://www.bouyguestelecom.fr${a?a.image:r.metadata?.image}`,align:e_.Align.CENTER,mainProduct:r,isLoading:l,cardFooter:(0,y.jsx)(sV,{journey:e}),children:(0,y.jsx)(Q.Text,{className:l?"skeleton":"",level:K.TextLevels.TWO,children:a?a.name:r?.metadata?.equipmentLabel})})})]}):null}function sV({journey:e}){let t=(0,T.useMemo)(()=>t_(e?.eligibility?.address)??"",[e?.eligibility?.address]);return(0,y.jsxs)("div",{children:[(0,y.jsx)(eL.Divider,{}),(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,direction:E.DirectionEnum.ROW,className:"is-marginless",gap:I.GapSize.ONE,children:[(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(eF.Icon,{name:ek.IconName.MARKER,size:eN.IconSize.SMALLER})}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,marginless:!0,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:"Adresse d'installation"})})]}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:t})]})}var eH=eH;let sW="insurance-choice",sU=[{label:"Casse",value:!0},{label:"Vol",value:!0},{label:"Oxydation suite à un contact avec un liquide",value:!0}];function sH({journey:e}){var t;let{addProductsToCartMutation:r,removeProductFromCartMutation:i}=(0,T.useContext)(b.CartContext),n=e.getProductsByType(v.ProductType.TERMINAL)?.[0],s=e.getProductsByType(v.ProductType.INSURANCE)?.[0],o=(0,td.useQuery)({queryKey:["insurance",n?.metadata?.relatedProduct],queryFn:async()=>{let e=n?.metadata?.relatedProduct??[];if(0!==e.length)return(await tX.getProductsByGencodes(e)).produits[e[0]]},enabled:(n?.metadata?.relatedProduct?.length??0)>0,staleTime:iw.DEFAULT_STALE_TIME}),a=(0,H.useTrilogyForm)({defaultValues:{insuranceSelection:s?.gencode?s.gencode:(t=e.type,"no"===sessionStorage.getItem(`${sW}-${t}`))?"no":""},onSubmit:async({value:t})=>{var n,o;if(""===t.insuranceSelection)throw Error("Champs assurance non sélectionné");(s&&await i.mutateAsync({gencode:s.gencode,journey:e.type}),"no"===t.insuranceSelection)?(n=e.type,sessionStorage.setItem(`${sW}-${n}`,"no")):(o=e.type,sessionStorage.removeItem(`${sW}-${o}`),t.insuranceSelection.length>0&&await r.mutateAsync({gencodes:[t.insuranceSelection],journey:e.type}))},listeners:{onChange:({formApi:e})=>e.handleSubmit()}}),l=!(n&&(o.isLoading||o.data));if((0,W.useSubmitQueue)(`${e.type}-insurance-box`,async()=>{l||await a.handleSubmit()}),l)return null;let c=(o.data?.price??0)>0?` ${(0,rU.formatPrice)(o.data.price)}/mois`:"";return(0,y.jsx)(eS.Box,{testId:"insurance-box",children:(0,y.jsxs)(eA.BoxContent,{children:[(0,y.jsxs)(Q.Text,{level:K.TextLevels.TWO,children:["Champ obligatoire ",(0,y.jsx)("span",{className:"text has-text-error",children:"*"})]}),(0,y.jsxs)("form",{onSubmit:e=>{e.preventDefault(),a.handleSubmit()},children:[(0,y.jsx)(el.Title,{markup:ec.TitleMarkup.H2,level:ec.TitleLevels.FIVE,children:"Je protège mon mobile"}),(0,y.jsx)(a.AppField,{name:"insuranceSelection",validators:{onChange:({value:e})=>
3{if(""===e)return"Avec ou sans assurance mobile ? Merci de sélectionner votre choix."}},children:t=>(0,y.jsx)(t.RadioTiles,{elements:[{id:"insurance-yes",value:o.data?.gencode??"",dataCy:"insurance_yes","data-gencode":o.data?.gencode,horizontal:!0,label:`Avec assurance mobile${c}`,sticker:"Recommandé",stickerVariant:iR.VariantState.MAIN,disabled:o.isLoading,description:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.THREE}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_NORMAL,children:"Mon téléphone est réparé ou remplacé sans frais supplémentaires s'il est inutilisable en cas de : "}),sU.map(e=>(0,y.jsxs)(C.FlexBox,{className:"is-marginless",direction:E.DirectionEnum.ROW,align:e_.Align.CENTER,children:[(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)(Q.Text,{typo:e.value?rw.TypographyColor.TEXT_SUCCESS:rw.TypographyColor.TEXT_ERROR,level:K.TextLevels.TWO,children:(0,y.jsx)(eF.Icon,{name:e.value?ek.IconName.CHECK:ek.IconName.TIMES})})}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_NORMAL,level:K.TextLevels.TWO,children:e.label})})]},e.label)),(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.TWO}),e.type===v.JourneyType.RENEWAL&&(0,y.jsx)(eH.default,{description:"Si vous avez déjà une assurance pour votre ancien mobile, elle ne couvrira pas votre nouveau mobile. Vous devrez contacter votre courtier gestionnaire de l'offre.",status:e6.StatusState.INFO}),(0,y.jsx)(a.Subscribe,{selector:e=>e.values.insuranceSelection,children:e=>e===o.data?.gencode&&(0,y.jsxs)(Q.Text,{typo:eD.TypographyAlign.TEXT_JUSTIFIED,level:K.TextLevels.FOUR,children:[(0,y.jsx)(Q.Text,{markup:K.TextMarkup.SPAN,children:"Vous souhaitez adhérer à l'assurance mobile Bouygues Telecom pour garantir votre téléphone mobile. La cotisation d'assurance sera prélevée mensuellement directement par SPB, courtier gestionnaire de l'offre, sur votre compte bancaire. Un contrat d'assurance mobile vous engage 12 mois, et vous pouvez résilier votre contrat à tout moment à l'issue de la 1ère année. Si vous changez d'avis, vous aurez la possibilité de renoncer à votre adhésion pendant un délai de 30 jours calendaires à compter de votre date d'adhésion. Avant d'adhérer, vous devez consulter la brochure \" "}),(0,y.jsx)(Y.Link,{href:tt.paths.mobileInsurance,blank:!0,children:"Assurance mobile"}),(0,y.jsx)(Q.Text,{markup:K.TextMarkup.SPAN,children:"\". Une fois validée, vous recevrez un mail de la part de SPB confirmant votre adhésion, vous adressant l'ensemble des documents contractuels et vous invitant à vous connecter à votre espace assuré SPB."})]})})]})},{id:"insurance-no",label:"Sans assurance mobile",value:"no",dataCy:"insurance_no",horizontal:!0,disabled:o.isLoading}]})})]})]})})}var rR=rR,eq=eq,nc=nc;function sG({isOpen:e,handleClose:t}){return(0,y.jsxs)(e0.Modal,{active:e,onClose:t,title:"Votre smartphone certifié moins cher ou remboursé",children:[(0,y.jsxs)(e1.ModalBody,{children:[(0,y.jsxs)(C.FlexBox,{mobile:!0,children:[(0,y.jsx)(j.FlexItem,{narrow:!0,verticalAlign:e_.Align.CENTER,children:(0,y.jsx)(eF.Icon,{name:ek.IconName.MOBILE,size:eN.IconSize.MEDIUM,circled:!0,color:eT.TrilogyColor.MAIN,backgroundColor:eT.TrilogyColor.MAIN_FADE})}),(0,y.jsxs)(j.FlexItem,{verticalAlign:e_.Align.CENTER,children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,marginless:!0,children:"Vous achetez votre smartphone"}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"Avec ou sans forfait, sur notre site, en boutique ou par téléphone."})]})]}),(0,y.jsxs)(C.FlexBox,{mobile:!0,children:[(0,y.jsx)(j.FlexItem,{narrow:!0,verticalAlign:e_.Align.CENTER,children:(0,y.jsx)(eF.Icon,{name:ek.IconName.MOBILE_EURO,size:eN.IconSize.MEDIUM,circled:!0,color:eT.TrilogyColor.MAIN,backgroundColor:eT.TrilogyColor.MAIN_FADE})}),(0,y.jsxs)(j.FlexItem,{verticalAlign:e_.Align.CENTER,children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,marginless:!0,children:"Vous repérez un meilleur prix"}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"Une capture d'écran ou une photo suffit pour nous apporter la preuve."})]})]}),(0,y.jsxs)(C.FlexBox,{mobile:!0,children:[(0,y.jsx)(j.FlexItem,{narrow:!0,verticalAlign:e_.Align.CENTER,children:(0,y.jsx)(eF.Icon,{name:ek.IconName.FILE_ATTACHED,size:eN.IconSize.MEDIUM,circled:!0,color:eT.TrilogyColor.MAIN,backgroundColor:eT.TrilogyColor.MAIN_FADE})}),(0,y.jsxs)(j.FlexItem,{verticalAlign:e_.Align.CENTER,children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,marginless:!0,children:"Vous déposez votre demande en ligne"}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"Via notre formulaire en ligne avec cette preuve, votre facture et votre RIB."})]})]}),(0,y.jsxs)(j.FlexItem,{verticalAlign:e_.Align.CENTER,children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,marginless:!0,children:"Bonne nouvelle ! On vous rembourse la différence sur votre compte bancaire ð¤©"}
3),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"(Montant du remboursement entre 5⬠et 150â¬)"})]})]}),(0,y.jsx)(e2.ModalFooter,{children:(0,y.jsx)(B.Button,{variant:z.ButtonVariant.PRIMARY,onClick:t,children:"Fermer"})})]})}function sq({title:e="Vous avez trouvé moins cher ailleurs ?",subtitle:t="Bonne nouvelle : on vous rembourse la différence !",linkLabel:r="Comment ça marche ?",badge:i}){let[n,s]=(0,T.useState)(!1);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(sG,{isOpen:n,handleClose:()=>s(!1)}),(0,y.jsx)(eS.Box,{className:"promo-bordered-block",shadowless:!0,children:(0,y.jsx)(eA.BoxContent,{children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.ROW,align:e_.Align.CENTER,gap:I.GapSize.FOUR,children:[(0,y.jsx)(eF.Icon,{name:ek.IconName.CERTIFIED,size:eN.IconSize.SMALL}),(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,children:[i?(0,y.jsx)(nc.default,{className:"is-marginless",small:!0,label:i}):null,(0,y.jsxs)(Q.Text,{marginless:!0,level:K.TextLevels.TWO,children:[(0,y.jsx)("strong",{children:e}),(0,y.jsx)("br",{}),t]}),(0,y.jsx)("button",{type:"button",className:"is-size-6 link button-clear has-text-left",onClick:()=>s(!0),children:r})]})]})})})]})}e.i(180073);var s$=e.i(250901);function sJ({journey:e,shouldHideTopBox:t}){let[r,i]=(0,T.useState)(!1),{cart:n,addProductsToCartMutation:s,removeProductFromCartMutation:o}=(0,T.useContext)(b.CartContext),{hasFunding:a}=tn(),{user:l}=(0,X.useStableSession)(),c=e.products.some(e=>e.gencode===tu),[u,d]=(0,T.useState)(null),p=null!==u,m=u??c,h=n?.isMixedCart()??!1,g=e.products.find(e=>e.isType(v.ProductType.TERMINAL)),x=e.getPrincipalProduct(),f=(0,T.useMemo)(()=>e.getProductsByType(v.ProductType.SIM)?.[0]??e.getProductsByType(v.ProductType.ESIM)?.[0],[e]),_=f?.isType(v.ProductType.ESIM)??!1,{data:S}=(0,td.useQuery)({queryKey:["simulated-delivery-modes",g?.gencode],queryFn:()=>iA.getSoonestSimulatedDeliveryMode(e,l),enabled:!!(g?.gencode&&e.isPreorder())}),A=!!(g||x),L=x?.metadata?.locked===r_.LOCK_OPTIONAL,F=async()=>{if(p)return;let e=!m;d(e);try{e?await s.mutateAsync({journey:v.JourneyType.MOBILE_ACQUISITION,gencodes:[tu]}):await o.mutateAsync({journey:v.JourneyType.MOBILE_ACQUISITION,gencode:tu})}finally{d(null)}},k=x?.metadata?.technology===sD.TECHNOLOGY.BOX_4G||x?.metadata?.technology===sD.TECHNOLOGY.BOX_5G,N=(0,T.useMemo)(()=>e.isType(v.JourneyType.RENEWAL)&&x?x.appliedDiscounts.filter(e=>e.type!==v.DiscountType.COUPON&&e.marketingType!==tl.HOME&&void 0!==e.amount):[],[e,x]),M=x?function(e){let t=e.appliedDiscounts.find(e=>e.marketingType?.includes(tl.HOME)),r=e.appliedDiscounts.find(e=>e.marketingType?.includes(tl.MULTILINE)),i={title:"Remise client Bbox",subtitle:"Déjà déduite",price:-(t?.amount??0),icon:(0,y.jsx)(sg,{height:12,variant:sh.INFO})};if(t)return i;let n=e.availableDiscounts.filter(e=>e.marketingType?.includes(tl.HOME)).filter(e=>void 0!==e.amount).sort((e,t)=>(e.amount??0)-(t.amount??0))[0]??null,s=e.availableDiscounts.filter(e=>e.marketingType?.includes(tl.MULTILINE));if(r)i.title=(0,y.jsx)(y.Fragment,{children:"Remise déjà client Bbox + forfait"}),i.price=-(r.amount??0);else if(n)i.title="Prix client Bbox",i.subtitle=e.price.discountDuration?`${(0,rU.formatPrice)((e.price.foreverPrice??0)-(n.amount??0))}/mois apr\xe8s ${e.price.discountDuration} mois`:"",i.price=(e.price.priceWithPromotions??0)-(n.amount??0);else if(s.length>0)i.title=(0,y.jsxs)(y.Fragment,{children:["Prix déjà client Bbox + forfait"," ",(0,y.jsx)(eM.Popover,{trigger:(0,y.jsx)(eF.Icon,{name:ek.IconName.QUESTION_CIRCLE}),children:"Pour tout client détenteur d'une offre Bbox et d'un forfait Bouygues Telecom 20 Go et + (hors B&YOU)"})]}),i.price=(e.price.priceWithPromotions??0)-s.reduce((e,t)=>e+(t.amount??0),0),i.subtitle=void 0;else if(!t)return;return i}(x):void 0;return t?null:(0,y.jsxs)(y.Fragment,{children:[r&&(0,y.jsxs)(e0.Modal,{onClose:()=>i(!1),title:`Paiement en ${n?.funding?.installments} fois ${n?.funding?.APR?"avec frais":"sans frais"}`,active:!0,children:[(0,y.jsxs)(e1.ModalBody,{children:[n?.funding&&(0,y.jsx)(s$.FundingDetailsBox,{funding:n.funding,shouldShowFinancingText:!0}),(0,y.jsx)(Q.Text,{children:"Les informations affichées tiennent compte d l'ensemble de votre panier (terminal, accessoires, frais de livraison, etcâ¦) "})]}),(0,y.jsx)(e2.ModalFooter,{children:(0,y.jsx)(B.Button,{variant:z.ButtonVariant.PRIMARY,onClick:()=>i(!1),children:"Fermer"})})]}),(0,y.jsx)(C.FlexBox,{gap:{mobile:4,tablet:5},children:A?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(j.FlexItem,{size:{tablet:h?12:6},children:x?(0,y.jsxs)(sP,{product:x,journey:e,align:k?e_.Align.CENTER:e_.Align.START,children:[k&&(0,y.jsxs)(C.FlexBox,{gap:I.GapSize.SIX,children:[(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,align:e_.Align.CENTER,children:[(0,y.jsx)(eF.Icon,{size:eN.IconSize.LARGE,name:ek.IconName.UI_4G}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"Réseau 4G  / 4G+"})]}),(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,align:e_.Align.CENTER,children:[(0,y.jsx)(eF.Icon,{size:eN.IconSize.LARGE,name:ek.IconName.TV}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"TV HD + 70 chaînes"})]})]}),!(_||k)&&(0,y.jsx)(Q.Text,{level:K.TextLevels.THREE,children:"SIM triple découpe compatible tous mobiles"}),(0,y.jsx)(rR.default,{level:rD.PriceLevel.SIX,amount:x?.price.priceWithPromotions,period:"mois"}),x.price.discountDuration&&x.price.foreverPrice!==x.price.priceWithPromotions&&(0,y.jsxs)(Q.Text,{level:K.TextLevels.THREE,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:["puis"," ",(0,y.jsx)(ed.InlinePrice,{level:K.TextLevels.THREE,amount:x.price.foreverPrice,period:"mois"})," ","après ",x.price.discountDuration," mois"]}),N.length>0&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,marginless:!0,children:"Ce prix inclut les remises suivantes :"}),N.map(e=>(0,y.jsxs)(Q.Text,{level:K.TextLevels.THREE,children:[e.commercialLabel?.replace("%product_name%",x.label)??e.label," ",(0,y.jsx)(ed.InlinePrice,{amount:-(e.amount??0),level:K.TextLevels.THREE,typo:eu.TypographyBold.TEXT_WEIGHT_NORMAL}),e.duration&&e.duration!==1/0&&(0,y.jsxs)(y.Fragment,{children:[" pendant ",e.duration," mois"]})]},e.id))]}),(0,y.jsx)(Q.Text,{level:K.TextLevels.THREE,children:sM(x)}),M&&(0,y.jsx)(sn,{infoBlockContent:M,width:h?6:12}),L&&(0,y.jsx)(eq.default,{reversed:!0,label:"Forfait bloqué",name:"blockedOption",checked:m,onChange:F,disabled:p})]}):(0,y.jsx)(n0,{title:"Besoin d'un forfait ?",icon:ek.IconName.SIM_CARD,ctaLabel:"Choisir",href:tt.paths.plans})}),!h&&(0,y.jsx)(j.FlexItem,{size:{tablet:6},children:g?(0,y.jsxs)(sP,{product:g,journey:e,cardFooter:!g.metadata?.urlKey?.startsWith("tcl-kids-watch-mt48")&&(0,y.jsx)(sq,{badge:"Nouveau"}),children:[g.metadata?.capacity&&(0,y.jsxs)(Q.Text,{level:K.TextLevels.THREE,marginless:!0,children:["Capacité ",g.metadata.capacity]}),g.metadata?.color&&(0,y.jsxs)(Q.Text,{level:K.TextLevels.THREE,marginless:!0,children:["Couleur ",g.metadata.color]}),e.isPreorder()&&S&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.TWO}),(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,className:"is-marginless",children:[(0,y.jsx)(eF.Icon,{name:ek.IconName.CALENDAR_CLOCK_CIRCLE}),(0,y.jsxs)(Q.Text,{level:K.TextLevels.THREE,children:["Disponible à partir du"," ",tS(S,{withMonth:!0,withYear:!0})]})]})]}),(0,y.jsxs)(el.Title,{level:ec.TitleLevels.FOUR,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:[(0,y.jsx)(ed.InlinePrice,{amount:a?n?.funding?.initialDeposit:g.price.priceWithPromotions}),a&&(0,y.jsxs)(Q.Text,{level:K.TextLevels.THREE,children:[`+ ${(0,rU.formatPrice)(n?.funding?.monthlyAmount??0)}/mois pendant ${n?.funding?.installments} mois`,(0,y.jsx)(eF.Icon,{name:ek.IconName.INFOS_CIRCLE,onClick:()=>i(!0)})]})]})]}):(0,y.jsx)(n0,{title:"Besoin d'un téléphone ?",icon:ek.IconName.MOBILE,ctaLabel:"Choisir",href:tt.paths.phoneWall})})]}):(0,y.jsx)(n1,{})})]})}function sX(){return(0,y.jsxs)(C.FlexBox,{gap:{mobile:4,tablet:5},children:[(0,y.jsx)(j.FlexItem,{size:{tablet:6},children:(0,y.jsxs)(sB,{children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.THREE,className:"skeleton",children:"Par un chat"}),(0,y.jsx)(Q.Text,{level:K.TextLevels.THREE,className:"skeleton",children:"Pas gentil"}),(0,y.jsx)(rR.default,{level:rD.PriceLevel.SIX,amount:800,className:"skeleton"})]})}),(0,y.jsx)(j.FlexItem,{size:{tablet:6},children:(0,y.jsxs)(sB,{children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.THREE,className:"skeleton",children:"Capacité"}),(0,y.jsx)(Q.Text,{level:K.TextLevels.THREE,className:"skeleton",children:"Couleur"}),(0,y.jsx)(el.Title,{level:ec.TitleLevels.FOUR,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:(0,y.jsx)(ed.InlinePrice,{amount:1e4,isLoading:!0})})]})})]})}var rR=rR;function sY({journey:e}){let{removeProductFromCartMutation:t,cart:r}=(0,T.useContext)(b.CartContext),i=e.products.filter(e=>!(e.isType(v.ProductType.INSURANCE)||e.metadata?.categories?.includes(rI.SapicCategoryId.PARENTAL_CONTROL))&&(e.isType(v.ProductType.OPTION)??e.isType(v.ProductType.PARTNER_OPTION)));return r&&i&&0!==i.length?(0,y.jsx)(eS.Box,{testId:"options-box",children:(0,y.jsxs)(eA.BoxContent,{children:[(0,y.jsx)(el.Title,{markup:ec.TitleMarkup.H2,level:ec.TitleLevels.FIVE,marginless:!0,children:"Mes options"}),(0,y.jsx)(eL.Divider,{}),i.map(r=>{let i=n3(r,e);return(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.ROW,mobile:!0,align:e_.Align.CENTER,gap:{mobile:4,tablet:5},"data-gencode":r.gencode,testId:"options-card",children:[(0,y.jsx)(j.FlexItem,{narrow:!0,children:r.metadata?.image&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(nr.Image,{src:`https://www.bouyguestelecom.fr${r.metadata.smallImage}`,alt:"",width:60,className:"is-hidden-mobile"}),(0,y.jsx)(nr.Image,{src:`https://www.bouyguestelecom.fr${r.metadata.smallImage}`,alt:"",width:160,className:"is-hidden-tablet"})]})}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.SPACE_BETWEEN,align:e_.Align.END,children:[(0,y.jsxs)(j.FlexItem,{children:[(0,y.jsx)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,marginless:!0,children:r.metadata?.name}
3),(0,y.jsx)(Q.Text,{children:r.metadata?.shortDescription}),r.metadata?.wordingPromo?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{typo:[rw.TypographyColor.TEXT_INFO,eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD],children:r.metadata.wordingPromo}),(0,y.jsxs)(C.FlexBox,{children:[(0,y.jsx)(Q.Text,{children:"puis"}),(0,y.jsx)(rR.default,{level:rD.PriceLevel.SIX,oldAmount:r.price.basePrice!==r.price.foreverPrice?r.price.basePrice:void 0,amount:r.price.foreverPrice})]})]}):(0,y.jsx)(rR.default,{level:rD.PriceLevel.SIX,oldAmount:r.price.basePrice!==r.price.foreverPrice?r.price.basePrice:void 0,amount:r.price.foreverPrice})]}),!i&&(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsx)("button",{type:"button","data-testid":"delete-btn",onClick:()=>t.mutateAsync({journey:e.type,gencode:r.gencode}),className:"link button-clear is-size-6",children:"Supprimer"})})]})})]},r.id)})]})}):null}let sZ=new class{async getParentalControlOptions(e,t,r){let[i,n]=await Promise.allSettled([rC.getProductsByCategory(rI.SapicCategoryId.PARENTAL_CONTROL,v.CartFactory.toRequestBody(e),t,{inStock:!0,throwOnError:!0},r),n6.getParentalControlDecoration()]);if("rejected"===i.status)throw i.reason;let s=i.value.products,o="fulfilled"===n.status?n.value:{};return s.map(e=>rF.optionsMapper(e,o[e.gencode]??{})).toSorted((e,t)=>(e.price??0)-(t.price??0))}async getParentalControlOptionsForCart({cart:e,journeyType:t,companionJourneyType:r,selectedOption:i,user:n}){let s=await this.getParentalControlOptions(e,t,n);return r&&i&&r?{currentOptions:s,companionOptions:await this.getParentalControlOptions(e,r,n)}:{currentOptions:s,companionOptions:[]}}};var en=en,es=es,eo=eo,ea=ea;let sQ=[{id:1,name:"Basique",subtitle:"Le premier niveau de protection",items:["Disponible sur cette ligne mobile uniquement","Filtrage des sites sensibles et des achats uniquement sur le réseau mobile (pas en WiFi)"]},{id:2,name:"Mode Enfant",subtitle:"Le contrôle parental avec géolocalisation et suivi du temps dâécran",items:["Jusquâà 5 enfants protégés","Disponible quels que soient la ligne mobile et lâappareil","Filtrage des sites sensibles sur le réseau mobile et le WiFi","Consultation du temps dâécran par appli et réseaux sociaux","Géolocalisation en temps réel *"]},{id:3,name:"Mode Enfant Avancé",subtitle:"Le contrôle parental ultra complet qui vous permet enfin dâagir",items:["Jusquâà 5 enfants protégés","Disponible quels que soient la ligne mobile et lâappareil","Filtrage des sites sensibles sur le réseau mobile et le WiFi","Consultation du temps dâécran par appli et réseaux sociaux","Blocage des réseaux sociaux","Limites de temps dâécran","Routines de déconnexion","Géolocalisation en temps réel *","Pause Internet immédiate","Gestion des applis et des jeux","Suivi de ses déplacements"]}];function sK({active:e,onClose:t}){return(0,y.jsxs)(e0.Modal,{size:rY.ModalSize.SMALL,title:"Quel contrôle parental choisir ?",active:e,onClose:t,children:[(0,y.jsx)(e1.ModalBody,{children:(0,y.jsx)(en.default,{children:sQ?.map((e,t)=>(0,y.jsxs)(ea.default,{open:0===t,id:e.id.toString(),children:[(0,y.jsx)(eo.default,{children:e.name}),(0,y.jsxs)(es.default,{children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:e.subt
3itle}),(0,y.jsx)(nD.List,{children:e.items.map(e=>(0,y.jsx)(nw.ListItem,{iconName:ek.IconName.CHECK,children:(0,y.jsx)(Q.Text,{marginless:!0,level:K.TextLevels.TWO,children:e})},e))})]})]},e.id))})}),(0,y.jsx)(e2.ModalFooter,{children:(0,y.jsx)(rX.ButtonList,{children:(0,y.jsx)(B.Button,{onClick:t,variant:z.ButtonVariant.PRIMARY,children:"Fermer"})})})]})}var rR=rR,s0=e.i(760256),s0=s0;function s1({journey:e,options:t,selectedOption:r,setSelectedOption:i,onAddOption:n,onRemoveOption:s}){return(0,y.jsxs)(ng.RadioTiles,{children:[t.map(t=>(0,y.jsx)(nh.RadioTile,{horizontal:!0,name:`parental-control-${e.type}`,id:`radio-parental-control-${t.id}-${e.type}`,value:t.id,checked:r===t.gencode,onChange:()=>{i(t.gencode),n(t.gencode)},sticker:t.flag,stickerVariant:iR.VariantState.MAIN,className:"is-fullwidth","data-gencode":t.gencode,description:(0,y.jsxs)(C.FlexBox,{align:{mobile:e_.Align.START,tablet:e_.Align.CENTER},children:[(0,y.jsx)(j.FlexItem,{children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:1,children:[(0,y.jsx)(el.Title,{level:ec.TitleLevels.SIX,marginless:!0,children:t.name}),!!t.description&&(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:t.description}),t.sticker&&(0,y.jsx)("div",{children:(0,y.jsx)(s0.default,{label:t.sticker.label,className:t.sticker.color,variant:(e=>{switch(e){case"is-warning":return r0.TagVariant.WARNING;case"is-success":return r0.TagVariant.SUCCESS;case"is-error":return r0.TagVariant.ERROR;default:return r0.TagVariant.INFO}})(t.sticker.color),iconName:t.sticker.icon,small:!0})})]})}),(0,y.jsx)(j.FlexItem,{narrow:!0,children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:1,align:{mobile:e_.Align.START,tablet:e_.Align.END},children:[(0,y.jsx)(rR.default,{level:rD.PriceLevel.SIX,amount:t.details.price.final,period:"mois"}),!!t.discountLabel&&(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,marginless:!0,children:t.discountLabel}),!!t.sticker?.extraInfo&&(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,marginless:!0,children:t.sticker?.extraInfo})]})})]}),accessibilityLabel:t.name},t.id)),(0,y.jsx)(nh.RadioTile,{horizontal:!0,label:"Non, pas de contrôle parental",name:`parental-control-${e.type}`,id:`radio-parental-control-none-${e.type}`,value:"none",checked:null===r,onChange:()=>{i(null),s()}})]})}function s2({journey:e}){let t,{cart:r,addProductsToCartMutation:i,removeProductFromCartMutation:n}=(0,T.useContext)(b.CartContext),{user:s}=(0,X.useStableSession)(),[o,a]=(0,T.useState)(void 0),[l,c]=(0,T.useState)(null),[u,d]=(0,T.useState)(!1),p=e.getPrincipalProduct(),m=r?.journeys[1],h=r?.isMixedCart()??!1;h&&(t=e.isType(v.JourneyType.MOBILE_ACQUISITION)?v.JourneyType.FAI_ACQUISITION:v.JourneyType.MOBILE_ACQUISITION);let g=(0,T.useMemo)(()=>(0,tO.getCartWithoutParentalControl)(r),[r]),x=(0,td.useQuery)({queryKey:["parental-control-options",p?.gencode,s?.sub,m?.type],queryFn:()=>g?sZ.getParentalControlOptionsForCart({cart:g,journeyType:e.type,companionJourneyType:t,selectedOption:l,user:s}):Promise.resolve({currentOptions:[],companionOptions:[]}),enabled:!!(p?.gencode&&g),placeholderData:e=>e,staleTime:iw.DEFAULT_STALE_TIME,retry:2});$({isError:x.isError,refetch:x.refetch,enabled:!!(p?.gencode&&g)});let f=(0,T.useMemo)(()=>e.products.find(e=>e.metadata?.categories?.includes(rI.SapicCategoryId.PARENTAL_CONTROL)),[e.products]),E=(0,tD.useMutation)({mutationFn:async t=>{await j.mutateAsync(),await i.mutateAsync({journey:e.type,gencodes:[t]})}}),j=(0,tD.useMutation)({mutationFn:async()=>{f&&await n.mutateAsync({journey:e.type,gencode:f.gencode})}}),_=E.isPending||j.isPending,S=(0,T.useMemo)(()=>[...x.data?.currentOptions??[]].sort((e,t)=>e.details.price.forever-t.details.price.forever),[x.data?.currentOptions]),A=(0,T.useMemo)(()=>{if(h)return S.find(e=>e.gencode===l)?.subscribedOptions;let e=new Map;for(let t of S)for(let r of t.subscribedOptions??[]){let t=`${r.idOption}-${r.numeroLigne??""}`;e.has(t)||e.set(t,r)}return Array.from(e.values())},[h,S,l]),L=(0,T.useCallback)(e=>e.match(/.{1,2}/g)?.join(".")??e,[]),F=e.isType(v.JourneyType.FAI_ACQUISITION)?"Mobile":"Fixe",k=(0,T.useCallback)((e,t)=>t?`Vous b\xe9n\xe9ficiez d\xe9j\xe0 de l\u0027option ${e} sur la ligne ${L(t)}.`:`Vous avez d\xe9j\xe0 s\xe9lectionn\xe9 le contr\xf4le parental ${e} pour votre offre ${F}.`,[L,F]);return((0,T.useEffect)(()=>{_||void 0!==o?S?.length&&f&&!S.some(e=>e.gencode===f.gencode)&&(j.mutateAsync(),c(null)):(a(!!f),f&&c(f.gencode))},[_,o,f,S,j.mutateAsync]),x.data?.currentOptions?.length||x.isLoading||x.isError)?(0,y.jsxs)(n7,{title:"Vous avez un enfant de moins de 18 ans ?",subt
3itle:(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"Si oui, on a des solutions pour encadrer son activité en ligne."}),active:o??!1,setActive:e=>{if(a(e),e){let e=x.data?.currentOptions?.[0]?.gencode??null;e&&(E.mutate(e),c(e))}else f&&(j.mutate(),c(null))},name:`parental-control-box-${e.type}`,testId:`parental-control-box-${e.type}`,children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:"Sélectionnez votre contrôle parental (sans engagement) :"}),A?.map(e=>(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,gap:I.GapSize.ONE,children:[(0,y.jsx)(eF.Icon,{name:ek.IconName.INFOS_CIRCLE}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,marginless:!0,children:k(e.libelle,e.numeroLigne)})]},`${e.idOption}-${e.numeroLigne??"no-line"}`)),e.isType(v.JourneyType.MOBILE_ACQUISITION)&&(0,y.jsx)(te.ButtonClear,{onClick:()=>d(!0),children:"Comparer les solutions"}),(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.FIVE}),(0,y.jsx)(s1,{journey:e,options:S,selectedOption:l,setSelectedOption:e=>{c(e)},onAddOption:E.mutateAsync,onRemoveOption:j.mutateAsync}),!!x.data?.currentOptions?.length&&(0,y.jsx)(sK,{active:u,onClose:()=>d(!1)})]}):null}function s3({children:e}){return(0,y.jsxs)(C.FlexBox,{gap:5,direction:E.DirectionEnum.COLUMN,children:[(0,y.jsx)(j.FlexItem,{size:{mobile:12,tablet:6},children:e}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(eS.Box,{shadowless:!0,testId:"portability-info-box",children:(0,y.jsx)(eA.BoxContent,{backgroundColor:eT.TrilogyColor.MAIN_FADE,children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,children:[(0,y.jsx)(j.FlexItem,{children:(0,y.jsxs)(C.FlexBox,{align:e_.Align.CENTER,className:"is-marginless",children:[(0,y.jsx)(eF.Icon,{name:ek.IconName.STOPWATCH,size:eN.IconSize.MEDIUM}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:"Votre numéro est transféré sous 3 jours ouvrés !"})})]})}),(0,y.jsxs)(j.FlexItem,{children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"En attendant, vous pouvez :"}),(0,y.jsxs)(nD.List,{className:"gapless",children:[(0,y.jsx)(nw.ListItem,{children:(0,y.jsxs)(Q.Text,{level:K.TextLevels.TWO,children:["Utiliser votre nouvelle SIM avec un"," ",(0,y.jsx)(Q.Text,{markup:K.TextMarkup.SPAN,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:"numéro provisoire reçu par e-mail"})]})}),(0,y.jsx)(eL.Divider,{className:"text is-level-2",content:"ou"}),(0,y.jsx)(nw.ListItem,{children:(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:"Utiliser votre ancienne SIM jusqu'au transfert de votre numéro actuel"})})]})]})]})})})})]})}var en=en,es=es,eo=eo,ea=ea,s5=e.i(659233);let s9=new class{async checkRio(e,t){return await s5.grapiRepository.checkRio(e,t)}},s4=new RegExp(/^(06|07)(\d{8})$/),s6=new RegExp(/^0[123459]\d{8}$/),s8=/^[a-z0-9+]{12}$/i,s7=[{provider:"ACN Communications",phoneNumber:"0800713179"},{provider:"Akeo Telecom",phoneNumber:"0800713179"},{provider:"Budget Telecom",phoneNumber:"0800713179"},{provider:"Ciel Telecom",phoneNumber:"0800713179"},{provider:"Coriolis",phoneNumber:"0800713179"},{provider:"France Telephony",phoneNumber:"0800713179"},{provider:"Free",phoneNumber:"0805923179"},{provider:"Legos",phoneNumber:"0805084198"},{provider:"Orange",phoneNumber:"0800003179"},{provider:"OVH",phoneNumber:"0805693179"},{provider:"Prixtel",phoneNumber:"0800713179"},{provider:"Réseau Santé Social",phoneNumber:"0800713179"},{provider:"SFR",phoneNumber:"0800973179"},{provider:"Sosh",phoneNumber:"0800003179"},{provider:"UKtelecom",phoneNumber:"0800713179"},{provider:"Virgin",phoneNumber:"0800713179"}];function oe({journeyType:e,onClick:t}){return e===v.JourneyType.MOBILE_ACQUISITION?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(Q.Text,{level:K.TextLevels.TWO,children:[(0,y.jsx)(Q.Text,{markup:K.TextMarkup.SPAN,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:"Appeler le 3179"})," ","pour connaitre votre n° de RIO."]}),(0,y.jsx)(Q.Text,{level:K.TextLevels.FOUR,children:"Appel gratuit en France Métropolitaine - Service immédiat avec le service, suite à l'appel vous recevrez un SMS avec le numéro RIO."})]}):(0,y.jsxs)(Q.Text,{className:"rio-help-message",markup:K.TextMarkup.SPAN,children:["Pour obtenir votre RIO,"," ",(0,y.jsx)(Q.Text,{className:"is-inline",markup:K.TextMarkup.SPAN,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:"appelez gratuitement le 3179"})," ","depuis votre ligne fixe ou"," ",(0,y.jsx)("button",{type:"button",className:"button-clear link is-inline",onClick:t,children:(0,y.jsx)("span",{className:"rio-help-message-link",children:"consultez le numéro de votre ancien opérateur."})})]})}function ot({journeyType:e,productWithPortability:t,onSubmitPortability:r,isSuccess:i=!1,isLoading:n=!1}){let[s,o]=(0,T.useState)(!1),a=(0,T.useMemo)(()=>{let e=t?.getAllocatedResourceByType(v.ResourceType.PORTABILITY);if(e)return{phone:e.getCharacteristicByKey(v.ResourceCharacteristicType.PHONE_NUMBER)?.value??"",rio:e.getCharacteristicByKey(v.ResourceCharacteristicType.RIO)?.value??""}},[t]),l=(0,H.useTrilogyForm)({defaultValues:{phoneNumber:a?.phone??"",rio:a?.rio??""},onSubmit:({value:e})=>r({phoneNumber:e.phoneNumber,rio:e.rio}),validators:{onChangeAsync:async({value:e})=>{let t=await s9.checkRio(e.phoneNumber,e.rio).then(()=>void 0).catch(e=>e instanceof Error?e.message:"Une erreur est survenue lors de la validation du RIO. Merci de réessayer.");if(t)return{fields:{rio:t}};r({phoneNumber:e.phoneNumber,rio:e.rio})}}});return(0,W.useSubmitQueue)(`portability-form-submit-${e}`,async()=>
3{if(!a)throw await l.validateAllFields("submit"),Error("Le formulaire n'est pas valide")}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("form",{onSubmit:e=>{e.preventDefault(),l.handleSubmit()},children:[(0,y.jsx)(G.MandatoryField,{}),(0,y.jsx)(l.AppField,{name:"phoneNumber",validators:{onChange:({value:t})=>(function(e,t){if(e&&!(t===v.JourneyType.FAI_ACQUISITION?s6:s4).test(e))return"Ce numéro est incorrect. Merci de le vérifier et essayer à nouveau."})(t,e),onSubmit:({value:e})=>e?void 0:"Merci de renseigner votre numéro de téléphone."},children:t=>(0,y.jsx)(t.Input,{label:"N° de téléphone à conserver",required:!0,minLength:10,maxLength:10,"data-cy":`porta_phone_${e.toLocaleLowerCase()}`,type:"tel",autoCompleteType:"tel",status:i?eG.InputStatus.SUCCESS:void 0,disabled:n})}),(0,y.jsx)(l.AppField,{name:"rio",validators:{onChange:({value:t})=>(function(e,t){if(!e)return;let r=e.toUpperCase();return r.startsWith("03P")||r.startsWith("03E")?(0,y.jsxs)(y.Fragment,{children:["Un forfait Bouygues Telecom est déjà associé à ce code RIO. Pour changer d'offre, rendez-vous dans la rubrique"," ",(0,y.jsx)(Y.Link,{blank:!0,href:"/mon-compte",rel:"noopener",children:"Mes Lignes"})," ","de votre espace client."]}):s8.test(e)?t===v.JourneyType.FAI_ACQUISITION&&e.toLowerCase().startsWith("f4")?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{children:"Vous avez déjà une offre Bouygues Telecom sur ce numéro."}),(0,y.jsx)(Q.Text,{children:'Vous souhaitez changer d\'offre ? Cliquez sur "Je change d\'offre" dans votre Espace Client, rubrique "Mon offre" '}),(0,y.jsx)(Q.Text,{children:'Vous souhaitez déménager ? Cliquez sur "Je déclare mon déménagement" dans votre Espace Client, rubrique "Mon offre"'})]}):void 0:"Ce code RIO est incorrect. Merci de le vérifier et essayer à nouveau."})(t,e),onSubmit:({value:e})=>e?void 0:"Merci de renseigner votre numéro RIO."},children:t=>(0,y.jsx)(t.Input,{label:"N° de RIO (sans espace)",required:!0,minLength:12,maxLength:12,"data-cy":`porta_rio_${e.toLocaleLowerCase()}`,onChange:({inputValue:e})=>t.handleChange(e.toUpperCase()),status:i?eG.InputStatus.SUCCESS:void 0,help:(0,y.jsx)(oe,{onClick:()=>o(!0),journeyType:e}),disabled:n})})]}),(0,y.jsx)(e0.Modal,{title:"Demandez votre n° de RIO à votre ancien opérateur",active:s,onClose:()=>o(!1),children:(0,y.jsxs)(e1.ModalBody,{children:[(0,y.jsxs)(Q.Text,{children:["Si vous ne pouvez pas appeler le 3179 depuis votre ligne fixe,"," ",(0,y.jsx)("b",{children:"vous pouvez joindre le numéro correspondant à votre ancien opérateur"})," depuis n'importe quel téléphone fixe ou mobile."]}),(0,y.jsx)(en.default,{children:(0,y.jsxs)(ea.default,{children:[(0,y.jsx)(eo.default,{children:"Afficher tous les opérateurs"}),(0,y.jsx)(es.default,{className:"rio-list",children:(0,y.jsx)(nD.List,{divider:!0,children:s7.map(e=>(0,y.jsx)(nw.ListItem,{children:(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.SPACE_BETWEEN,direction:E.DirectionEnum.ROW,children:[(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(Q.Text,{children:e.provider})}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(Q.Text,{children:e.phoneNumber})})]})},e.provider))})})]})})]})})]})}function or({journey:e}){let{addResourceToProductMutation:t,isLoading:r}=(0,T.useContext)(b.CartContext),i=(0,T.useMemo)(()=>e.products.find(e=>e.getAllocatedResourceByType(v.ResourceType.PORTABILITY)),[e.products]),n=(0,T.useMemo)(()=>e.products.find(e=>e.getAllocatedResourceByType(v.ResourceType.PORTABILITY_SIMULATED)),[e.products]),s=(0,T.useMemo)(()=>e.products.find(e=>e.getAllocatedResourceByType(v.ResourceType.NUMBER)),[e.products]),o=e.getMissingPortabilityProducts()?.[0],a=i??n??s??o,l=(0,T.useMemo)(()=>{let e=a?.appliedDiscounts?.find(({marketingType:e})=>"PORTABILITE"===e);if(e)return e.characteristics.portabilityYes;let t=a?.availableDiscounts?.find(({marketingType:e})=>"PORTABILITE"===e);return t?.characteristics.portabilityNo},[a]),[c,u]=(0,T.useState)(void 0),d=i||n||s||o;(0,W.useSubmitQueue)(`${e.type}-portability-box`,async()=>{d&&!1===c&&!s&&await p.mutateAsync()});let p=(0,tD.useMutation)({mutationFn:async()=>{await t.mutateAsync({gencode:a.gencode,type:v.ResourceType.NUMBER})}}),m=(0,tD.useMutation)({mutationFn:async()=>{await t.mutateAsync({gencode:a.gencode,type:v.ResourceType.PORTABILITY_SIMULATED})}}),h=(0,tD.useMutation)({mutationFn:async({phoneNumber:e,rio:r})=>{await t.mutateAsync({gencode:a.gencode,type:v.ResourceType.PORTABILITY,characteristics:[{key:v.ResourceCharacteristicType.PHONE_NUMBER,value:e},{key:v.ResourceCharacteristicType.RIO,value:r}]})}});return((0,T.useEffect)(()=>
3{if(!r&&void 0===c){let e=!!s,t=a?.appliedDiscounts?.find(({marketingType:e})=>"PORTABILITE"===e),r=a?.availableDiscounts?.find(({marketingType:e})=>"PORTABILITE"===e);u(!e&&(!!i||!!t||!!r))}},[r,c,i,a,s]),d)?(0,y.jsxs)(n7,{title:`Votre num\xe9ro de ${e.isType(v.JourneyType.FAI_ACQUISITION)?"fixe":"mobile"}`,promoMessage:l,subtitleCloseToTitle:!1,narrowColumns:!0,subtitle:c?(0,y.jsxs)(Q.Text,{level:K.TextLevels.TWO,children:["En conservant votre numéro,"," ",(0,y.jsx)(Q.Text,{markup:K.TextMarkup.SPAN,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:"on s'occupe de tout : "})," ","résiliation, transfert et activation de votre nouvelle ligne."]}):void 0,active:c??!0,setActive:e=>{u(e),e?m.mutateAsync():p.mutateAsync()},name:`portability-${e.type}`,labelYes:"Conserver mon numéro",labelNo:"Obtenir un nouveau numéro",children:[e.isType(v.JourneyType.MOBILE_ACQUISITION)&&(0,y.jsx)(s3,{children:(0,y.jsx)(ot,{journeyType:e.type,productWithPortability:i,onSubmitPortability:h.mutateAsync,isSuccess:h.isSuccess,isLoading:r})}),e.isType(v.JourneyType.FAI_ACQUISITION)&&(0,y.jsx)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:5,children:(0,y.jsx)(j.FlexItem,{size:6,children:(0,y.jsx)(ot,{journeyType:e.type,productWithPortability:i,onSubmitPortability:h.mutateAsync,isSuccess:h.isSuccess,isLoading:r})})})]}):null}function oi(){return(0,y.jsx)(n7,{title:"Votre numéro de mobile",subtitle:"En choisissant de conserver votre numéro, vous nous mandatez pour résilier votre forfait auprès de votre ancien opérateur, transférer votre numéro et activer votre nouvelle ligne.",active:!1,setActive:()=>{},name:"portability",isLoading:!0})}var eH=eH;let on=new class{async getAvailableSims(e,t,r){return await rC.getProductsByCategory(rI.SapicCategoryId.SIM,v.CartFactory.toRequestBody(e),t,{fundingMode:"aucun",inStock:!0,throwOnError:!0},r).then(e=>e.products.map(e=>rF.simMapper(e)))}},os="renewal-sim-choice",oo=[{description:"Ouvrez la notification qui vous dirige directement dans les paramètres de votre ligne",id:"1"},{description:"Cliquez sur Installer ma eSIM",id:"2"}],oa=[{description:"Rendez-vous dans la rubrique Mes commandes et cliquez sur Installer ma eSIM",id:"d1"},{description:"Scannez le QR code avec votre téléphone et laissez-vous guider",id:"d2"}];function ol(){return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(Q.Text,{marginless:!0,children:"Une fois votre commande finalisée, vous recevez un email et un SMS de confirmation."}),(0,y.jsx)(Q.Text,{children:"Connectez-vous en WiFi et téléchargez votre eSIM :"}),(0,y.jsxs)(Q.Text,{children:[(0,y.jsx)(Q.Text,{markup:K.TextMarkup.SPAN,marginless:!0,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:"Depuis votre application Bouygues Telecom"}),(0,y.jsx)(Q.Text,{markup:K.TextMarkup.SPAN,children:" (recommandé)"})]}),(0,y.jsx)(nD.List,{ordered:!0,children:oo.map(e=>(0,y.jsx)(nw.ListItem,{children:(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:e.description})},e.id))}),(0,y.jsx)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:"Depuis votre espace client"}),(0,y.jsx)(nD.List,{ordered:!0,children:oa.map(e=>(0,y.jsx)(nw.ListItem,{children:(0,y.jsx)(Q.Text,{marginless:!0,level:K.TextLevels.TWO,children:e.description})},e.description))}),(0,y.jsxs)(Q.Text,{children:["ð¡ ",(0,y.jsx)("b",{children:"Notre astuce :"})," affichez le QR code sur un écran d'ordinateur ou imprimez-le pour le scanner."]}),(0,y.jsx)(eL.Divider,{}),(0,y.jsx)(Q.Text,{marginless:!0,children:"Votre eSIM est disponible 1 heure après la réception de l'e-mail de confirmation."}),(0,y.jsx)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:"Le code PIN sera 0000."})]})}function oc({journey:e}){let{cart:t,addProductsToCartMutation:r,removeProductFromCartMutation:i}=(0,T.useContext)(b.CartContext),{user:n}=(0,X.useStableSession)(),[s,o]=function(){let[e,t]=(0,T.useState)(()=>"no"!==sessionStorage.getItem(os));return[e,(0,T.useCallback)(e=>{e?sessionStorage.removeItem(os):sessionStorage.setItem(os,"no"),t(e)},[])]}(),[a,l]=(0,T.useState)(!1),c=e.getPrincipalProduct(),u=(0,T.useMemo)(()=>e.type===v.JourneyType.RENEWAL,[e.type]),d=(0,T.useMemo)(()=>c?.metadata?.categories?.includes(rI.SapicCategoryId.FAIM_UNLIMITED),[c]),p=(0,T.useMemo)(()=>e.getProductsByType(v.ProductType.SIM)?.[0]??e.getProductsByType(v.ProductType.ESIM)?.[0],[e]),m=(0,T.useMemo)(()=>e.getProductsByType(v.ProductType.TERMINAL)?.[0],[e]),h=(0,T.useMemo)(()=>{let e=p?.isType(v.ProductType.ESIM)??!1;return{title:e?"L'eSIM n'est pas compatible avec cet appareil":"La carte SIM physique n'est pas compatible avec cet appareil",incompatibleType:e?"eSIM":"carte SIM physique",recommendedType:e?"carte SIM physique":"eSIM"}},[p]),g=(0,tD.useMutation)({mutationFn:t=>r.mutateAsync({gencodes:[t],journey:e.type})}),x=(0,tD.useMutation)({mutationFn:async()=>{p&&await i.mutateAsync({gencode:p.gencode,journey:e.type})}}),f=(0,td.useQuery)({queryKey:["sims",e.type,c?.gencode,n],queryFn:async()=>await on.getAvailableSims(t,e.type,n),enabled:!!t,staleTime:iw.DEFAULT_STALE_TIME,retry:2});$({isError:f.isError,refetch:f.refetch,enabled:!!t});let _=(0,T.useMemo)(()=>e.isType(v.JourneyType.RENEWAL)&&!s?"no-sim":p?p.gencode:f.data?.f
3ind(e=>e.preferred)?.gencode??f.data?.[0]?.gencode??"",[e,s,p,f.data]),S=(0,H.useTrilogyForm)({defaultValues:{simSelection:_},onSubmit:async({value:e})=>e.simSelection===p?.gencode?Promise.resolve():u&&"no-sim"===e.simSelection?(o(!1),await x.mutateAsync()):""===e.simSelection?Promise.resolve():(o(!0),g.mutateAsync(e.simSelection)),listeners:{onChange:({formApi:e})=>e.handleSubmit()}});(0,T.useEffect)(()=>{!p&&_&&"no-sim"!==_&&g.mutate(_)},[p,_,g.mutate]);let A=(0,T.useMemo)(()=>f.data?.[0]?.isCurrentSimCompatible??!1,[f.data]),L=(0,T.useMemo)(()=>{if(u)if(A)return"Votre SIM actuelle est compatible avec ce téléphone. Vous pouvez commander une nouvelle SIM si vous le souhaitez.";else return"Votre SIM actuelle est incompatible avec ce téléphone. Nous ajoutons dans votre panier une SIM compatible."},[u,A]),F=(0,T.useMemo)(()=>{if(!m)return!0;if(e.isType(v.JourneyType.RENEWAL)&&!s)return A;if(!p)return!0;let t=f.data?.find(e=>e.gencode===p.gencode);return t?.isCompatibleWithDevice??!1},[p,e,s,m,f.data,A]),k=(0,T.useMemo)(()=>u?[{horizontal:!0,className:"is-fullwidth",id:"sim-renew-selection",value:"no-sim",checked:void 0===p,"data-cy":"renew",description:(0,y.jsx)(C.FlexBox,{className:"is-fullwidth",justify:eZ.Justify.START,align:e_.Align.CENTER,children:(0,y.jsxs)("div",{children:[(0,y.jsx)(el.Title,{marginless:!0,level:ec.TitleLevels.SIX,children:"Conserver ma SIM"}),A&&(0,y.jsx)(Q.Text,{children:"Recommandé pour vous."})]})})}]:[],[u,p,A]);return d||!(f.isLoading||f.isError)&&(f.data?.length??0)===0?null:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eS.Box,{testId:"sim-selection-box",children:(0,y.jsxs)(eA.BoxContent,{children:[(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:I.GapSize.FIVE,children:[(0,y.jsx)(j.FlexItem,{children:(0,y.jsxs)("form",{onSubmit:e=>{e.preventDefault(),S.handleSubmit()},children:[(0,y.jsx)(el.Title,{markup:ec.TitleMarkup.H2,level:ec.TitleLevels.FIVE,children:"Je choisis ma SIM"}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,children:L}),(0,y.jsx)(S.AppField,{name:"simSelection",validators:{onSubmit:({value:e})=>
3{if(""===e&&!u)return"Veuillez sélectionner une carte SIM."}},children:t=>(0,y.jsx)(t.RadioTiles,{className:"is-flex is-wrapless",elements:f.isLoading?op:[...k,...f.data.map(t=>{let r=t.type===rj.ProductType.ESIM;return{horizontal:!0,className:"is-fullwidth",id:`sim-${t.gencode}`,value:t.gencode,"data-gencode":t.gencode,description:(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.SPACE_BETWEEN,align:e_.Align.CENTER,children:[(0,y.jsxs)("div",{children:[(0,y.jsx)(el.Title,{marginless:!0,level:ec.TitleLevels.SIX,children:e.isType(v.JourneyType.RENEWAL)?r?"Nouvelle eSIM":"Nouvelle carte SIM":r?"eSIM":"Carte SIM"}),(0,y.jsx)(Q.Text,{children:r?"Disponible dès lâactivation de votre numéro de mobile.":"Livrée chez vous sous 3 jours ouvrés."})]}),(0,y.jsx)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:t.details.price.final>0?(0,y.jsx)(ed.InlinePrice,{amount:t.details.price.final}):"Gratuit"})]})}})]})})]})}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsxs)(iO.View,{className:"icon-and-text",children:[(0,y.jsx)(eF.Icon,{name:ek.IconName.ESIM,size:eN.IconSize.LARGE}),(0,y.jsxs)("div",{children:[(0,y.jsx)(Q.Text,{marginless:!0,level:K.TextLevels.TWO,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:"L'eSIM, votre SIM dématérialisée"}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,markup:"p",children:"Plus de carte à insérer. Vous recevez un e-mail pour l'activer."}),(0,y.jsx)("button",{type:"button",className:"link button-clear",onClick:()=>l(!0),children:"Comment ça fonctionne ?"})]})]})})]}),!(f.isLoading||F)&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.FIVE}),(0,y.jsx)(eH.default,{status:e6.StatusState.WARNING,title:h.title,description:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(Q.Text,{level:K.TextLevels.TWO,marginless:!0,children:["L'appareil que vous avez ajouté au panier ne permet pas d'utiliser"," ",h.incompatibleType,"."]}),(0,y.jsxs)(Q.Text,{level:K.TextLevels.TWO,marginless:!0,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:["Nous vous conseillons de choisir une ",h.recommendedType,"."]}),(0,y.jsxs)(Q.Text,{level:K.TextLevels.TWO,marginless:!0,children:["Si vous choisissez une ",h.incompatibleType," maintenant, vous devrez l'utiliser avec un autre appareil."]})]})})]})]})}),(0,y.jsxs)(e0.Modal,{title:"Comment installer votre eSIM ?",onClose:()=>l(!1),active:a,className:"has-text-left",children:[(0,y.jsx)(e1.ModalBody,{children:(0,y.jsx)(ol,{})}),(0,y.jsx)(e2.ModalFooter,{children:(0,y.jsx)(rX.ButtonList,{children:(0,y.jsx)(B.Button,{onClick:()=>l(!1),variant:z.ButtonVariant.PRIMARY,children:"Fermer"})})})]})]})}function ou(){return(0,y.jsx)(eS.Box,{children:(0,y.jsxs)(eA.BoxContent,{children:[(0,y.jsx)(el.Title,{markup:ec.TitleMarkup.H2,level:ec.TitleLevels.FIVE,className:"skeleton w-fit",children:"Je choisis ma SIM"}),(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,className:"skeleton w-fit",children:"Essentielle pour profiter de mon forfait."}),(0,y.jsx)(ng.RadioTiles,{children:op.map(e=>(0,y.jsx)(nh.RadioTile,{...e},e.id))})]})})}function od(){return(0,y.jsxs)(C.FlexBox,{className:"is-fullwidth",justify:eZ.Justify.SPACE_BETWEEN,align:e_.Align.CENTER,children:[(0,y.jsxs)(iO.View,{children:[(0,y.jsx)(el.Title,{marginless:!0,level:ec.TitleLevels.SIX,className:"skeleton w-fit",children:"Carte SIM"}),(0,y.jsx)(Q.Text,{className:"skeleton w-fit",children:"Une carte SIM dématérialisée. Plus de carte à insérer."})]}),(0,y.jsx)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,className:"skeleton w-fit",children:"Gratuit"})]})}let op=[{id:"sim-skeleton-1",horizontal:!0,className:"is-fullwidth skeleton",disabled:!0,description:(0,y.jsx)(od,{})},{id:"sim-skeleton-2",horizontal:!0,className:"is-fullwidth skeleton",disabled:!0,description:(0,y.jsx)(od,{})}];function om({journey:e,index:t,canDoMixedCart:r,isMixedCart:i,isMobilePlanMutating:n,onMobilePlanMutate:s}){let o=e.isType(v.JourneyType.MOBILE_ACQUISITION),a=e.isType(v.JourneyType.FAI_ACQUISITION),{cart:l}=(0,T.useContext)(b.CartContext),{user:c}=(0,X.useStableSession)(),u=e.isType(v.JourneyType.RENEWAL),d=!r||i&&o||0!==t,p=l?.getJourneyOfType(v.JourneyType.FAI_ACQUISITION),m=p?.getPrincipalProduct(),h=(0,T.useMemo)(()=>
3{if(m){if(m.metadata?.categories?.includes(rI.SapicCategoryId.FAI_BYOU))return rI.SapicCategoryId.FAI_BYOU;if(m.metadata?.categories?.includes(rI.SapicCategoryId.FAI_SIMO))return rI.SapicCategoryId.FAI_SIMO;if(m.metadata?.bankingOffer||m.metadata?.categories?.includes(rI.SapicCategoryId.BANK_MIXED_CART))return rI.SapicCategoryId.BANK_MIXED_CART}},[m]),{data:g,isLoading:x}=(0,td.useQuery)({queryKey:["mixed-cart-plans",h,c?.sub],queryFn:async()=>l&&h?await n8.getMixedCartMobilePlans(h,l,c):[],enabled:!!(m?.gencode&&!d&&h)}),f=l?.getJourneyOfType(v.JourneyType.MOBILE_ACQUISITION)?.getPrincipalProduct(),I=!!(f?.gencode&&g?.map(e=>e.gencode).includes(f?.gencode));return(0,y.jsxs)(j.FlexItem,{children:[t>0&&!I&&(0,y.jsxs)(Q.Text,{typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:["Mon offre ",a?"fixe":"mobile"]}),(0,y.jsxs)(C.FlexBox,{gap:5,direction:E.DirectionEnum.COLUMN,children:[a?(0,y.jsx)(sz,{journey:e}):(0,y.jsx)(sJ,{journey:e,shouldHideTopBox:I}),(a||!n)&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(n5,{journey:e}),(0,y.jsx)(sY,{journey:e}),(0,y.jsx)(sN,{journey:e}),(0,y.jsx)(oc,{journey:e}),(0,y.jsx)(or,{journey:e}),!u&&(0,y.jsx)(s2,{journey:e})]}),!d&&(0,y.jsx)(sS,{journeyType:e.type,onMobilePlanMutate:s,plans:g,isPlansLoading:x}),(0,y.jsx)(sH,{journey:e})]})]},e.type)}function oh(){return(0,y.jsx)(j.FlexItem,{children:(0,y.jsxs)(C.FlexBox,{gap:5,direction:E.DirectionEnum.COLUMN,children:[(0,y.jsx)(sX,{}),(0,y.jsx)(ou,{}),(0,y.jsx)(oi,{}),(0,y.jsx)(oi,{})]})})}function og({cart:e}){let{addProductsToCartMutation:t,removeProductFromCartMutation:r,addResourceToProductMutation:i}=(0,T.useContext)(b.CartContext),n=e?.isMixedCart()??!1,s=n||(0,n9.canUseMixedCart)(e),o=(0,tD.useMutation)({mutationFn:async({gencodes:e,isAdded:n,hasPortability:s})=>{n?await r.mutateAsync({gencode:e.plan,journey:v.JourneyType.MOBILE_ACQUISITION}):(await t.mutateAsync({gencodes:[e.plan,...e.autoAddedProducts],journey:v.JourneyType.MOBILE_ACQUISITION}),s&&await i.mutateAsync({gencode:e.plan,type:v.ResourceType.PORTABILITY_SIMULATED}))}});return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(C.FlexBox,{gap:5,direction:E.DirectionEnum.COLUMN,className:"is-marginless",children:e.journeys?.slice(0,s?2:1).map((e,t)=>(0,y.jsx)(om,{journey:e,index:t,canDoMixedCart:s,isMixedCart:n,isMobilePlanMutating:o.isPending,onMobilePlanMutate:o.mutateAsync},e.type))}),(0,y.jsx)(eO.Spacer,{size:eR.SpacerSize.SIX}),(0,y.jsx)(C.FlexBox,{direction:E.DirectionEnum.ROW,justify:eZ.Justify.CENTER,className:"is-hidden-mobile",children:(0,y.jsx)(j.FlexItem,{size:6,align:e_.Align.CENTER,children:(0,y.jsx)(U,{testId:"continue-button-bottom",className:"is-fullwidth"})})})]})}function ox(){return(0,y.jsx)(C.FlexBox,{gap:5,direction:E.DirectionEnum.COLUMN,className:"is-marginless",children:(0,y.jsx)(oh,{})})}function of({currentModule:e}){let{cart:t,isLoading:r}=(0,T.useContext)(b.CartContext),i=(0,eI.useRouter)(),{isLoading:n}=function(){let{addProductsToCartMutation:e,reset:t,setFundingModeMutation:r}=(0,T.useContext)(b.CartContext),i=(0,eI.useSearchParams)(),{showErrorModal:n}=(0,q.useErrorModal)(),[s,o]=(0,T.useState)(!0),a=(0,tD.useMutation)({mutationFn:async i=>{if(t(),"gencode"===i.type){let t=await tX.getProductsByGencodes([i.gencode]),r=t.produits?.[i.gencode],n=r?.technology==="BOX_5G"||r?.technology==="BOX_4G",s=nI.get(),o=s?.results?.box5g?.homeZone??s?.results?.box4g?.homeZone,a=n&&o?{[i.gencode]:[{key:v.ProductCharacteristicType.HOME_ZONE,value:o}]}:void 0,l=await e.mutateAsync({gencodes:[i.gencode],journey:i.journey,productCharacteristics:a}),c=l.getJourneyOfType(v.JourneyType.FAI_ACQUISITION)?.products.flatMap(e=>e.neededProducts);c?.length&&await e.mutateAsync({gencodes:c,journey:i.journey})}else{let t=await tX.getProductsByUrlKeys(i.urlKeys);if(!(0,nZ.getLocalDataIfNotExpired)(nQ)&&t.some(e=>e.banking_offer)){var s;let e,t;if(s=nK.yamaReferrers,t=document.referrer?new URL(document.referrer):null,e=t?.hostname??null,!(!s||e&&s.some(t=>e.includes(t))))return void n("partner-exclusivity");let r=Date.now()+iw.MILLISECONDS_IN_DAY;(0,nZ.setLocalVariable)(nQ,JSON.stringify({data:!0,expiresTimestamp:r}))}let o=t.map(e=>e.gencode).filter(e=>!!e);if(0===o.length)throw Error(`No valid products found for urlKeys: ${i.urlKeys.join(", ")}`);await e.mutateAsync({gencodes:o,journey:i.journey}),i.fundingKey&&await r.mutateAsync({fundingKey:i.fundingKey,callbackUrl:tt.paths.fundingRedirect(),paymentMethod:v.PaymentMethod.CB})}},onError:e=>{console.error("Auto-add failed:",e)}});return(0,T.useEffect)(()=>{(a.isSuccess||a.isError)&&o(!1)},[a.isSuccess,a.isError]),(0,T.useEffect)(()=>{let e;if(a.isPending||a.isSuccess||a.isError)return;let t=i.get("funding");t&&(Object.values(v.FundingKey).includes(t)?e=t:console.warn(`Invalid funding key: ${t}`));let r=i.get("auto-add");if(r)return void a.mutate({type:"gencode",journey:v.JourneyType.FAI_ACQUISITION,gencode:r});let n=window.location.hash;
3if(n){let t=n.slice(1).split("/").filter(Boolean);if(t.length>=2&&"add"===t[0]){let r=t[t.length-1];if(r){let t=r.replace("pack-","").split("_");a.mutate({type:"urlKeys",journey:v.JourneyType.MOBILE_ACQUISITION,urlKeys:t,fundingKey:e});return}}}o(!1)},[i,a]),{isLoading:s,isError:a.isError,error:a.error}}(),s=(0,T.useMemo)(()=>oT(e,t),[e,t]),o=!t?.journeys?.[0]?.products?.[0];return((0,J.usePageViewTracking)({page:"Panier",pageCategory:"Commande",eCommerceStep:"Panier",variant:{panierVide:o}},{enable:!(r||n)}),(0,W.useSubmitHandler)(()=>{let e=t?.getJourneyOfType(v.JourneyType.FAI_ACQUISITION),r=e?.getPrincipalProduct(),n=e?.products.some(e=>e.getAllocatedResourceByType(v.ResourceType.PORTABILITY));r&&n&&(0,P.isFtth3Clics)(r)&&(0,P.stopFtth3Clics)();let o=oy.find(e=>"Contact"===e.key),a=oy.findIndex(e=>"Contact"===e.key),l=oy.findIndex(e=>`/${e.path.join("/")}`===s);return o?.isValid?.(t)&&l>a&&(0,e$.sendPageViewTracking)(t,{page:"Coordonnees",pageCategory:"Commande",eCommerceStep:"Checkout"}),i.push(s),Promise.resolve()}),!function(){let{cart:e,setReferrerMutation:t,reset:r}=(0,T.useContext)(b.CartContext),{showErrorModal:i}=(0,q.useErrorModal)();(0,T.useEffect)(()=>{if(!e)return;let n=(0,nZ.getLocalDataIfNotExpired)(nQ);n&&!e.referrer?t.mutate():e&&e.journeys.some(e=>{let t=e.getPrincipalProduct();return!!t?.metadata?.bankingOffer})&&!n&&(r(),i("partner-exclusivity",{isExpiredCart:!0}))},[e,t.mutate,r,i])}(),!t&&r||n)?(0,y.jsx)(ox,{}):(0,y.jsxs)(y.Fragment,{children:[o?(0,y.jsx)(n2,{}):(0,y.jsx)(og,{cart:t}),(0,y.jsx)(tC.TriggerLogin,{})]})}let oy=[{key:"Summary",module:{label:"Récapitulatif",module:function(e){return(0,y.jsx)(tv,{cartProvider:tM.VirtualCartProvider,...e,children:(0,y.jsx)(of,{...e})})},metadata:{title:"Panier"},path:["panier"],isValid:rN}},{key:"CrossSell",module:{label:"Compléments",module:function(e){return(0,y.jsx)(tv,{cartProvider:tM.VirtualCartProvider,...e,children:(0,y.jsx)(it,{currentModule:e.currentModule})})},metadata:{title:"Compléments"},path:["tunnel","recapitulatif"],shouldDisableModule:function(e){if(!e)return!0;let t=e.getJourneyOfType(v.JourneyType.FAI_ACQUISITION)?.getPrincipalProduct();return!t||(0,P.isFtth3Clics)(t)},isValid:function(e){return!0}}},{key:"Contact",module:{label:"Coordonnées",module:function(e){return(0,y.jsx)(tv,{hideTicketOnMobile:!0,cartProvider:tM.VirtualCartProvider,...e,children:(0,y.jsx)(rT,{})})},metadata:{title:"Coordonnées"},path:["tunnel","coordonnees"],isValid:function(e){return!!e&&e.buyer?.status===v.StatusEnum.VALID}}},{key:"CartCreation",module:{label:"Coordonnées",module:function(e){return(0,y.jsx)(tv,{hideTicketOnMobile:!0,cartProvider:tM.VirtualCartProvider,...e,children:(0,y.jsx)(tz,{})})},metadata:{title:"Coordonnées"},path:["tunnel","validation"],isValid:function(e){return e?.buyer?.status===v.StatusEnum.VALID},isHidden:!0}},{key:"Logement",module:{label:"Logement",module:function(e){return(0,y.jsx)(tv,{hideTicketOnMobile:!0,cartProvider:tb.RealCartProvider,...e,children:(0,y.jsx)(nB,{...e})})},metadata:{title:"Logement"},path:["tunnel","logement"],shouldDisableModule:function(e){if(!e)return!0;let t=e.getJourneyOfType(v.JourneyType.FAI_ACQUISITION);if(!t)return!0;let r=t.getPrincipalProduct();return!r||r.metadata?.isType("faim")||!t.eligibility?.needPrecision},isValid:function(e){if(!e)return!1;let t=e.getJourneyOfType(v.JourneyType.FAI_ACQUISITION);if(!t)return!1;let r=t.eligibility;return r?.isValid()??!1}}},{key:"Rendez-vous",module:{label:"Rendez-vous",module:function(e){return(0,y.jsx)(tv,{hideTicketOnMobile:!0,cartProvider:tb.RealCartProvider,...e,children:(0,y.jsx)(oL,{...e})})},metadata:{title:"Rendez-vous"},path:["tunnel","rendez-vous"],shouldDisableModule:function(e){if(!e)return!0;let t=e?.getJourneyOfType(v.JourneyType.FAI_ACQUISITION);return!(t&&(t.getMissingAppointmentProducts().length||t.appointment))},isValid:function(e){return!e?.getJourneyOfType(v.JourneyType.FAI_ACQUISITION)?.getMissingAppointmentProducts()?.length}}},{key:"Facturation",module:{label:"Facturation",module:function(e){return(0,y.jsx)(tv,{cartProvider:tb.RealCartProvider,...e,children:(0,y.jsx)(tk,{...e})})},metadata:{title:"Facturation"},path:["tunnel","facturation"],isValid:function(e){return!!e},shouldDisableModule:function(e){return!e||!tN.rfe.enabled||0===(e?.buyer?.legalEntity?.routingAddresses??[]).length}}},{key:"Delivery",module:{label:"Livraison",module:function(e){return(0,y.jsx)(tv,{cartProvider:tb.RealCartProvider,...e,children:(0,y.jsx)(ir.GoogleMapsScript,{children:(0,y.jsx)(nv,{...e})})})},metadata:{title:"Livraison"},path:["tunnel","livraisons"],isValid:function(e){return!!e&&!e.journeys.flatMap(e=>e.products).some(e=>"PRODUIT_LIVRABLE_NON_LIVRE"===e.statusChangeReason)}}},{key:"Payment",module:{label:"Paiement",module:function(e){return(0,y.jsx)(tv,{cartProvider:tb.RealCartProvider,...e,children:(0,y.jsx)(nz.Payment,{})})},metadata:{title:"Paiement"},path:["tunnel","paiement"],isValid:function(e){return!0}}},{key:"Redirect",module:{label:"Retour partenaire",module:function(e){return(0,y.jsxs)(tv,{cartProvider:tb.RealCartProvider,shouldHideTicket:!0,...e,children:[(0,y.jsx)(tC.ForceLogin,{}),(0,y.jsx)(nX,{...e})]})},metadata:{title:"Retour partenaire"},path:["tunnel","redirect"],isHidden:!0}},{key:"Bank",module:{label:"Retour open banking",module:function(e){return(0,y.jsx)(tv,{cartProvider:tb.RealCartProvider,...e,children:(0,y.jsx)(tE.Bank,{...e})})},metadata:{title:"Vérification bancaire"},path:["tunnel","banque"],isHidden:!0}}].map(e=>({key:e.key,...e.module}));function oT(e,t){let r=oy.findIndex(t=>t.key===e);if(-1===r)return null;for(let e=r+1;e<oy.length;e++){let r=oy[e];if(!r.shouldDisableModule?.(t)&&!("Contact"===r.key&&r.isValid?.(t)))return`/${r.path.join("/")}`}return null}function ov({selectedSlot:e,children:t}){return e?.slotStart&&e?.slotEnd?(0,y.jsx)(eS.Box,{testId:"appointment-complementary-info",children:(0,y.jsxs)(eA.BoxContent,{children:[(0,y.jsx)(el.Title,{level:ec.TitleLevels.FIVE,children:"Informations complémentaires"}),t]})}):null}var eH=eH;function ob({title:e}){return(0,y.jsx)(eH.default,{title:e??"Un conseiller vous appellera quelques jours avant pour préparer votre rendez-vous technicien.",status:e6.StatusState.INFO,className:"is-fullwidth"})}var eH=eH,en=en,eo=eo,ea=ea;function oE(){return(0,y.jsx)(eS.Box,{children:(0,y.jsxs)(eA.BoxContent,{children:[(0,y.jsx)(el.Title,{level:ec.TitleLevels.FIVE,children:"Choisissez la date et le créneau horaire du rendez-vous technicien"}),(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.CENTER,align:e_.Align.CENTER,gap:I.GapSize.FOUR,mobile:!0,children:[(0,y.jsx)(B.Button,{className:"is-invisible is-narrow",iconName:ek.IconName.ARROW_LEFT,variant:z.ButtonVariant.SECONDARY,disabled:!0}),(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,className:"skeleton w-fit",marginless:!0,children:"xx / xx - xx / xx"}),(0,y.jsx)(B.Button,{className:"is-narrow",iconName:ek.IconName.ARROW_RIGHT,variant:z.ButtonVariant.SECONDARY,disabled:!0})]}),(0,y.jsx)(en.default,{children:["Vendredi 10 mars","Samedi 11 mars","Dimanche 12 mars","Lundi 13 mars","Mardi 14 mars","Mercredi 15 mars"].map(e=>(0,y.jsx)(ea.default,{disabled:!0,children:(0,y.jsx)(eo.default,{children:(0,y.jsx)(Q.Text,{className:"skeleton w-fit",children:e})})},e))}),(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,children:"En cas d'imprévu, vous pourrez modifier ce créneau jusqu'à 24h avant."})]})})}function oC({dateRange:e,onPrevious:t,onNext:r,canGoPrevious:i=!0,canGoNext:n=!0}){return(0,y.jsxs)(C.FlexBox,{justify:eZ.Justify.CENTER,align:e_.Align.CENTER,gap:I.GapSize.FOUR,mobile:!0,children:[(0,y.jsx)(B.Button,{className:(0,ts.classNames)(i?"":"is-invisible","is-narrow"),iconName:ek.IconName.ARROW_LEFT,variant:z.ButtonVariant.SECONDARY,accessibilityLabel:"Voir les rendez-vous des jours précédents",onClick:t,disabled:!i,testId:"appointment-nav-prev"}),(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,accessibilityLabel:`Rendez-vous dis
3ponibles du ${e}`,marginless:!0,children:e}),(0,y.jsx)(B.Button,{className:(0,ts.classNames)(n?"":"is-invisible","is-narrow"),iconName:ek.IconName.ARROW_RIGHT,variant:z.ButtonVariant.SECONDARY,accessibilityLabel:"Voir les rendez-vous des prochains jours",onClick:r,disabled:!n,testId:"appointment-nav-next"})]})}var en=en,es=es,eo=eo,ea=ea,oj=e.i(149198),oj=oj,oI=e.i(926401),oI=oI;function o_({week:e,selectedSlotId:t,onSlotSelect:r,openDayDate:i,onDayToggle:n}){return(0,y.jsx)(en.default,{children:e.days.map(e=>(0,y.jsxs)(ea.default,{open:e.date===i,onClick:t=>{var r;t.preventDefault(),n(i===(r=e.date)?null:r)},children:[(0,y.jsx)(eo.default,{children:tS(e.date,{withDayWeek:!0,withMonth:!0})}),(0,y.jsx)(es.default,{children:(0,y.jsx)(oI.default,{children:e.slots.map(e=>(0,y.jsxs)(oj.default,{active:t===e.id,onClick:t=>{t.preventDefault(),r(e)},children:[tA(e.slotStart)," - ",tA(e.slotEnd)]},e.id))})})]},e.date))})}function oS({selectedSlotId:e,onSlotSelect:t,appointmentsByWeek:r,errors:i,isLoading:n=!1,hasDataLoadingError:s=!1,infoMessage:o}){let[a,l]=(0,T.useState)(0),[c,u]=(0,T.useState)(()=>r?.[0]?.days[0]?.date??null),d=r?.[a]??null,p=(0,T.useMemo)(()=>d?`${tS(d.weekStart)} - ${tS(d.weekEnd)}`:"",[d]),m=a<r.length-1,h=(0,T.useCallback)(()=>{l(e=>(u(r?.[e-1]?.days[0]?.date??null),e-1))},[r]),g=(0,T.useCallback)(()=>{l(e=>(u(r?.[e+1]?.days[0]?.date??null),e+1))},[r]);return((0,T.useEffect)(()=>{if(e)for(let t=0;t<r.length;t++){let i=r[t]?.days.find(t=>t.slots.some(t=>t.id===e));if(i){l(t),u(i.date);return}}},[e,r]),n)?(0,y.jsx)(oE,{}):(0,y.jsx)(eS.Box,{testId:"appointment-selection-box",children:(0,y.jsxs)(eA.BoxContent,{children:[(0,y.jsx)(el.Title,{level:ec.TitleLevels.FIVE,children:"Choisissez la date et le créneau horaire du rendez-vous technicien"}),o&&(0,y.jsx)(ob,{title:o}),s||!d?(0,y.jsx)(eH.default,{status:e6.StatusState.ERROR,title:"Les créneaux disponibles n'ont pas pu être récupérés, veuillez réessayer ultérieurement"}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(oC,{dateRange:p,onPrevious:h,onNext:g,canGoPrevious:a>0,canGoNext:m}),i.map(e=>(0,y.jsx)(Q.Text,{level:K.TextLevels.TWO,typo:rw.TypographyColor.TEXT_ERROR,className:"help","data-has-error":"true",children:e},e)),(0,y.jsx)(o_,{week:d,selectedSlotId:e,onSlotSelect:t,openDayDate:c,onDayToggle:u}),(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,children:"En cas d'imprévu, vous pourrez modifier ce créneau jusqu'à 24h avant."})]})]})})}function oA({selectedSlot:e}){let{cart:t}=(0,T.useContext)(b.CartContext),r=t?.getJourneyOfType(v.JourneyType.FAI_ACQUISITION),i=t_(r?.eligibility?.address);return e?.slotStart&&e?.slotEnd?(0,y.jsx)(eS.Box,{testId:"appointment-summary-box",children:(0,y.jsx)(eA.BoxContent,{children:(0,y.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:I.GapSize.FIVE,children:[(0,y.jsx)(el.Title,{level:ec.TitleLevels.FIVE,children:"Récapitulatif de votre rendez-vous"}),(0,y.jsxs)("div",{children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:"Votre rendez-vous technicien :"}),(0,y.jsxs)(Q.Text,{level:K.TextLevels.ONE,children:[tS(e.slotStart,{withDayWeek:!0,withMonth:!0})," ","entre ",tA(e.slotStart)," et ",tA(e.slotEnd)]})]}),(0,y.jsxs)("div",{children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:"Votre adresse d'installation : "}),(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,children:i})]}),(0,y.jsxs)("div",{children:[(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,typo:eu.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:"ð¡ Pour préparer votre rendez-vous :"}),(0,y.jsxs)(nD.List,{children:[(0,y.jsx)(nw.ListItem,{iconName:ek.IconName.CHECK,children:(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,children:"Vérifiez que vous avez bien récupéré vos équipements avant le jour J"})}),(0,y.jsx)(nw.ListItem,{iconName:ek.IconName.CHECK,children:(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,children:"Assurez-vous qu'une personne majeure pourra nous accueillir"})}),(0,y.jsx)(nw.ListItem,{iconName:ek.IconName.CHECK,children:(0,y.jsx)(Q.Text,{level:K.TextLevels.ONE,children:"Libérez l'endroit d'installation pour en faciliter l'accès"})})]})]})]})})}):null}function oL({currentModule:e}){let t=(0,eI.useRouter)(),{user:r}=(0,X.useStableSession)(),{cart:i,setAppointmentMutation:n}=(0,T.useContext)(b.CartContext),s=i?.getJourneyOfType(v.JourneyType.FAI_ACQUISITION),o=s?.getPrincipalProduct(),a=s?.appointment,l=!!(o&&(0,P.isFtth3Clics)(o)),[c,u]=(0,T.useState)(!1),d=(0,T.useMemo)(()=>oT(e,i),[e,i]);(0,W.useSubmitHandler)(()=>(t.push(d),Promise.resolve()));let{data:p,isPending:m,isError:h,refetch:g}=(0,td.useQuery)({queryKey:["appointments",i?.id,o?.id],queryFn:()=>w.getAppointments({identifiantElementPanier:o.id,identifiantPanier:i.id},r),enabled:!!(i?.id&&o?.id),retry:2});$({isError:h,refetch:g,enabled:!!(i?.id&&o?.id)});let x=(0,T.useMemo)(()=>
3{if(!p||0===p.length)return"aucun";let e=p[0]?.days?.[0]?.slots?.[0]?.slotStart;if(!e)return"aucun";let t=new Date,r=Math.floor((new Date(e).getTime()-t.getTime())/864e5);return r<7?"moins7jours":r<=15?"entre7et15jours":"plus15jours"},[p]),f=!p||0===p.length;(0,J.usePageViewTracking)({page:"Rdv",pageCategory:"Commande",eCommerceStep:"Checkout",variant:{ressourceCreneauIndisponible:f,premierCreneauDisponible:x}},{enable:!m});let _=(0,T.useMemo)(()=>{if(!(l&&p))return;let e=new Date;return e.setHours(0,0,0,0),e.setDate(e.getDate()+11),p.flatMap(e=>e.days.flatMap(e=>e.slots)).find(t=>new Date(t.slotStart)>=e)},[p,l]),S=(0,H.useTrilogyForm)({formId:"appointment-booking-form",defaultValues:{interphone:a?.interphone,digicode:a?.digicode,contactPhoneNumber:a?.phoneNumber??i?.buyer?.phoneNumber,complementaryInformation:a?.additionalInformation,slotId:a?.slotId??_?.id??""},onSubmit:({value:e})=>e.slotId&&e.contactPhoneNumber?n.mutateAsync({journey:v.JourneyType.FAI_ACQUISITION,appointment:{interphone:e.interphone,digicode:e.digicode,phoneNumber:e.contactPhoneNumber,additionalInformation:e.complementaryInformation,slotId:e.slotId}}):Promise.reject(Error("Le créneau et le numéro de téléphone sont requis pour prendre un rendez-vous"))});(0,T.useEffect)(()=>{!a?.slotId&&_&&S.setFieldValue("slotId",_.id)},[a?.slotId,_,S.setFieldValue]),(0,W.useSubmitQueue)("appointment-form",S.handleSubmit);let A=(0,ri.useStore)(S.store,e=>e.values.slotId),L=(0,T.useMemo)(()=>{if(p&&A)for(let e of p){let t=e.days.flatMap(e=>e.slots).find(e=>e.id===A);if(t)return t}},[A,p]),F=(0,T.useMemo)(()=>{if(!(l&&L))return;let e=`le ${tS(L.slotStart,{withDayWeek:!0,withMonth:!0})} entre ${tA(L.slotStart)} et ${tA(L.slotEnd)}`;return c||a?.slotId?`Vous avez choisi ${e}.`:`Votre rendez-vous pr\xe9s\xe9lectionn\xe9 : ${e}. Vous pouvez cliquer sur une autre date pour le modifier.`},[a?.slotId,c,l,L]);return(0,y.jsx)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:5,children:(0,y.jsxs)("form",{onSubmit:e=>{e.preventDefault(),S.handleSubmit()},children:[(0,y.jsxs)(C.FlexBox,{gap:I.GapSize.SIX,direction:E.DirectionEnum.COLUMN,mobile:!0,children:[(0,y.jsx)(S.AppField,{name:"slotId",validators:{onChange:({value:e})=>e?void 0:"Veuillez sélectionner un créneau de rendez-vous."},children:e=>(0,y.jsx)(oS,{selectedSlotId:e.state.value,onSlotSelect:t=>{u(!0),e.handleChange(t.id)},appointmentsByWeek:p??[],isLoading:m,errors:e.state.meta.errors??[],hasDataLoadingError:h,infoMessage:l?F:void 0})}),L&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(ob,{}),(0,y.jsxs)(ov,{selectedSlot:L,children:[(0,y.jsx)(G.MandatoryField,{}),(0,y.jsxs)(C.FlexBox,{gap:I.GapSize.FOUR,direction:{mobile:E.DirectionEnum.COLUMN,tablet:E.DirectionEnum.ROW},children:[(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(S.AppField,{name:"contactPhoneNumber",validators:{onChange:({value:e})=>e&&t1.test(e)?void 0:"Veuillez renseigner un numéro de téléphone valide."},children:e=>(0,y.jsx)(e.Input,{label:"Numéro de mobile",required:!0,type:"tel",minLength:10,maxLength:10,"data-cy":"contact-phoneNumber"})})}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(S.AppField,{name:"digicode",children:e=>(0,y.jsx)(e.Input,{label:"Digicode",minLength:4,maxLength:10,"data-cy":"digicode"})})}),(0,y.jsx)(j.FlexItem,{children:(0,y.jsx)(S.AppField,{name:"interphone",children:e=>(0,y.jsx)(e.Input,{label:"Interphone","data-cy":"interphone"})})})]}),(0,y.jsx)(S.AppField,{name:"complementaryInformation",children:e=>(0,y.jsx)(e.TextArea,{label:"Instructions pour le technicien",minLength:2,placeholder:"Toute information utile (nom de la personne présente, du gardienâ¦)","data-cy":"complementaryInformation",maxLength:255})})]}),(0,y.jsx)(oA,{selectedSlot:L})]})]}),(0,y.jsx)(U,{className:"is-hidden-desktop is-hidden-tablet",testId:"continue-btn"})]})})}},855524,900214,170604,41253,e=>{"use strict";var t,r=e.i(741857),i=e.i(901769);async function n(e,t){let r=(await i.apiHttpService.get(e,void 0,{user:t,ttl:1440})).keys.find(e=>"RSA"===e.kty&&"enc"===e.use&&e.alg?.startsWith("RSA-OAEP"));if(!r)throw Error("Aucune clé publique RSA-OAEP valide trouvée dans le JWKS");return r}e.s(["fetchEncryptionKey",0,n],900214);let s=(0,r.getAppConfig)(),o=new class{url;
3constructor(e){this.url=e}async getPublicKey(e){return await n(`${this.url}/r-banque/jwks`,e)}async validateIban(e,t){return await i.apiHttpService.post(`${this.url}/ibans/validation`,{iban:e},{user:t,headers:{"x-version":"2"}})}async getBankAccountCheck(e,t){try{return await i.apiHttpService.get(`${this.url}/verifications-bancaires`,{noPersonne:e},{user:t,headers:{"x-version":"2"}})}catch(e){if(404===e?.response?.status)return null;throw e}}async createBankAccountCheck(e,t){return await i.apiHttpService.post(`${this.url}/verifications-bancaires/demande`,e,{user:t})}}(s.bytelApi.url);e.s(["rBanqueRepository",0,o],170604);let a=new class{async createVerification(e,t,r){let i=await o.createBankAccountCheck({demande:{noPersonne:e,urlCallBack:t}},r);return{requiresOpenBanking:!0,url:i.urlParcours,id:i.id}}async getVerificationStatus(e,t){return await o.getBankAccountCheck(e,t)}async forceNewVerification(e,t,r){return{url:(await o.createBankAccountCheck({demande:{noPersonne:e,urlCallBack:t}},r)).urlParcours}}};e.s(["openBankingService",0,a],855524);var l=((t={}).ABANDONNE="ABANDONNE",t.CREE="CREE",t.EN_COURS="EN_COURS",t.ERREUR="ERREUR",t.EXPIRE="EXPIRE",t.REALISE="REALISE",t.REFUSE="REFUSE",t);e.s(["OpenBankingStatus",()=>l],41253)},170682,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(858480);e.i(940804);var n=e.i(662794),s=e.i(548233),o=e.i(41908),a=e.i(92786),l=e.i(147067),c=e.i(110528),u=e.i(556987),d=e.i(729421),p=e.i(921046),m=e.i(522999),h=e.i(669762),g=e.i(163516),x=e.i(586907),f=e.i(305555),y=e.i(651508),T=e.i(524826),v=e.i(855524),b=e.i(41253);e.i(150300);var E=e.i(62309);e.i(590279);var C=e.i(508491),j=e.i(779629),I=e.i(708594),_=e.i(266027),S=e.i(618566);e.s(["Bank",0,function({currentModule:e}){let{cart:A,isLoading:L}=(0,r.useContext)(i.CartContext),{user:F}=(0,j.useStableSession)(),k=(0,S.useSearchParams)().get("journeyId"),N=(0,_.useQuery)({queryKey:["open-banking-verification",F?.sub],queryFn:async()=>{if(!k)return{success:!1};let e=await v.openBankingService.getVerificationStatus(A.buyer.id,F);return e?.statut!==b.OpenBankingStatus.REALISE?{success:!1}:{success:!0}},enabled:!L&&!!A?.buyer?.id,retry:(e,t)=>{let r=t?.response?.status;return(!r||!(r>=400)||!(r<500))&&e<2}});if(N.isPending)return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(C.ModuleLoader,{}),(0,t.jsx)(E.ForceLogin,{})]});let M=!N.isError&&N.data?.success;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.FlexBox,{direction:c.DirectionEnum.COLUMN,align:n.Align.CENTER,gap:6,children:(0,t.jsx)(d.FlexItem,{children:(0,t.jsx)(s.Box,{children:(0,t.jsx)(o.BoxContent,{children:(0,t.jsxs)(u.FlexBox,{direction:c.DirectionEnum.COLUMN,align:n.Align.CENTER,gap:6,children:[(0,t.jsx)(d.FlexItem,{children:(0,t.jsx)(p.Icon,{name:m.IconName.SHOPPING_CART,size:h.IconSize.LARGE})}),M?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(d.FlexItem,{children:[(0,t.jsx)(f.Title,{level:y.TitleLevels.THREE,markup:y.TitleMarkup.H1,typo:T.TypographyAlign.TEXT_CENTERED,children:"La connexion à votre banque est réussie !"}),(0,t.jsx)(g.Text,{level:x.TextLevels.ONE,typo:T.TypographyAlign.TEXT_CENTERED,children:"Il ne vous reste plus qu'à valider le paiement pour finaliser votre commande."})]}),(0,t.jsx)(d.FlexItem,{children:(0,t.jsx)(a.Button,{variant:l.ButtonVariant.CONVERSION,href:I.paths.payment,children:"Passer au paiement"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(d.FlexItem,{children:[(0,t.jsx)(f.Title,{level:y.TitleLevels.THREE,markup:y.TitleMarkup.H1,typo:T.TypographyAlign.TEXT_CENTERED,children:"Une erreur est survenue"}),(0,t.jsx)(g.Text,{level:x.TextLevels.ONE,typo:T.TypographyAlign.TEXT_CENTERED,children:"Le parcours bancaire n'a pas pu être finalisé. Veuillez prendre rendez-vous en boutique."})]}),(0,t.jsx)(d.FlexItem,{children:(0,t.jsx)(u.FlexBox,{direction:c.DirectionEnum.COLUMN,align:n.Align.CENTER,gap:3,children:(0,t.jsx)(a.Button,{variant:l.ButtonVariant.CONVERSION,href:I.paths.storeLocation,children:"Prendre rendez-vous en boutique"})})})]})]})})})})}),(0,t.jsx)(E.ForceLogin,{})]})}])},129003,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(858480),n=e.i(499329),s=e.i(467955),o=e.i(683455);e.s(["VirtualCartProvider",0,function({children:e}){return(0,r.useEffect)(()=>{n.virtualCartService.initialize().then(e=>{e&&e.getCart().catch(s.noop)}).catch(e=>{console.error("Error fetching cart:",e)})},[]),(0,t.jsx)(i.CartProvider,{cartService:n.virtualCartService,cartType:"virtual",children:(0,t.jsx)(o.NoFundingGuard,{children:e})})}])},85864,(e,t,r)=>{t.exports={VERSION:"410"}},602498,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(741857),n=e.i(3303);let s=(0,i.getAppConfig)().googleMaps.apiKey,o=(0,r.createContext)(!1);e.s(["GoogleMapsScript",0,function({children:e}){let[i,a]=(0,r.useState)(()=>!!window.google?.maps?.Geocoder),l=(0,r.useCallback)(()=>{a(!0)},[]);return s?(0,t.jsxs)(o.Provider,{value:i,children:[(0,t.jsx)(n.default,{src:`https://maps.googleapis.com/ma
3ps/api/js?libraries=places,geocode&key=${s}&language=fr`,strategy:"lazyOnload",onReady:l}),e]}):(console.warn("Google Maps API key is not configured"),(0,t.jsx)(o.Provider,{value:!1,children:e}))},"useGoogleMapsReady",0,function(){return(0,r.useContext)(o)}])},63715,223664,298600,436006,299242,42,378734,100989,749222,970202,537090,218648,34621,825245,567236,250901,180073,764858,793140,809176,315171,e=>{"use strict";let t,r;var i,n,s,o,a,l,c,u,d,p=e.i(843476);e.i(940804);var m=e.i(163516),h=e.i(586907);function g({isSingular:e=!1}){return(0,p.jsxs)(m.Text,{level:h.TextLevels.TWO,children:[e?"Champ obligatoire":"Champs obligatoires"," ",(0,p.jsx)("span",{className:"text has-text-error",children:"*"})]})}e.s(["MandatoryField",0,g],63715);var x=e.i(943918);function f(...e){return e.filter(Boolean).join(" ")}e.s(["classNames",0,f],223664);let y=e=>e?.toLocaleString("fr-FR",{style:"currency",currency:"EUR",maximumFractionDigits:2*!Number.isInteger(e)});function T({amount:e,level:t=h.TextLevels.ONE,typo:r=x.TypographyBold.TEXT_WEIGHT_SEMIBOLD,period:i,strike:n=!1,className:s="",isLoading:o=!1,...a}){let l=y(e??0),c=i?`${l}⬠par ${i}`:l;return(0,p.jsxs)(m.Text,{level:t,markup:h.TextMarkup.SPAN,typo:r,accessibilityLabel:c,marginless:!0,className:f(s,"price",n?"strike":"",o?"skeleton":""),...a,children:[l,i?`/${i}`:""]})}e.s(["formatPrice",0,y],298600),e.s(["InlinePrice",0,T],436006);var v=e.i(212251);e.s(["Divider",()=>v.default],299242);var b=e.i(248547);e.s(["Popover",()=>b.default],42);var E=e.i(110528),C=e.i(556987),j=e.i(729421),I=e.i(207313);function _({label:e,price:t,period:r,percentage:i,isLoading:n=!1,isIncluded:s=!1,isSmall:o=!1}){let a=o?h.TextLevels.THREE:h.TextLevels.TWO;return(0,p.jsxs)(C.FlexBox,{justify:I.Justify.SPACE_BETWEEN,direction:E.DirectionEnum.ROW,children:[(0,p.jsx)(j.FlexItem,{children:(0,p.jsx)(m.Text,{level:a,marginless:!0,children:e})}),(0,p.jsx)(j.FlexItem,{narrow:!0,children:(0,p.jsxs)(m.Text,{level:a,marginless:!0,children:[n&&(0,p.jsx)(T,{amount:100,period:r,level:a,typo:x.TypographyBold.TEXT_WEIGHT_NORMAL,isLoading:!0}),!n&&(0,p.jsxs)(p.Fragment,{children:[void 0===t&&void 0===i&&s&&"Inclus",0===t&&"Gratuit",void 0!==t&&0!==t&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(T,{amount:t,period:r,level:a,typo:x.TypographyBold.TEXT_WEIGHT_NORMAL}),s&&" inclus"]}),void 0!==i&&(0,p.jsxs)(p.Fragment,{children:[i," %",s&&" inclus"]})]})]})})]})}function S({children:e,className:t="",isLink:r=!0,...i}){return(0,p.jsx)("button",{type:"button",className:`button-clear${r?" link":""} ${t}`,...i,children:e})}e.s(["TicketLine",0,_],378734),e.s(["ButtonClear",0,S],100989);var A=e.i(285899),L=e.i(578441);class F{static fundingModeMapper(e){let t=e.propositionsCommerciales[0],{type:r,key:i}=A.FundingFactory.splitKey(e.type);return"EDP"===e.type&&(i=A.FundingKey.EDP,r=A.FundingType.EDP),new A.FundingModel({key:i,type:r,label:e.libelle,initialDeposit:t?.apportInitial??0,installments:t?.nbrEcheances??0,monthlyAmount:t?.montantMensualite??0,APR:t?.tAEG??0,interestAmount:t?.montantInterets??0,totalFinancingCost:t?.coutTotalFinancement??0,amountToFinance:t?.montantAFinancer??0,fixedInterestRate:t?.tauxDebiteurFixe??0})}}class k{ignoredPaymentMethods=[A.PaymentMethod.WITHOUT_PAYMENT];async getCartFundingModes(e,t){let r=await L.fapiRepository.getFundingModes(e,t),i={},n=r.parcours.flatMap(({elementsPanier:e})=>e).flatMap(({modesFinancementsElementPanier:e})=>e).filter(e=>e.propositionsCommerciales.length>0).reduce((e,t)=>{let r=F.fundingModeMapper(t);return e[r.key]=r,e},{});return{fundings:r.modesFinancement.map(e=>{let t=F.fundingModeMapper(e);0===e.propositionsCommerciales.length&&(t=n[t.key]??t);let r=e.modesDePaiement.map(e=>A.PaymentMethodFactory.paymentMethodMapper[e.type]).filter(e=>!!e&&!this.ignoredPaymentMethods.includes(e));return r.length>0&&(i[t.key]=r),t}),paymentMethodsByFundingKey:i,edpParcours:r.parcours.map(e=>({identifiant:e.identifiant,elementsPanier:e.elementsPanier.filter(e=>e.modesFinancementsElementPanier.some(e=>"EDP"===e.type)).map(e=>({identifiant:e.identifiant,modeDeFinancement:"EDP"}))}))}}}let N=new k;e.s(["fundingService",0,N],749222);var M=e.i(741857),O=e.i(901769);let R=new class{url;
3constructor(e){this.url=e}async getSignedContracts(e,t){return(await O.apiHttpService.get(`${this.url}/personnes/${e.id}/contrats-signes`,void 0,{user:t})).items.map(e=>({id:e.id,marketLine:e.ligneMarche,lineType:e.typeLigne,phone:e.numeroTel,status:e.statut,creationDate:e.dateCreation,subscription:{offerId:e.abonnement.idOffre,label:e.abonnement.libelle},_links:{personPostalAddress:{href:e._links.adressePostalePersonne.href},personBankAccount:{href:e._links.compteBancairePersonne.href}}}))}async getPersonneFromContract(e,t){return await O.apiHttpService.get(`${this.url}/contrats/${e}`,{},{user:t}).then(e=>e._links.titulaire.href.replace("/personnes/","")).catch(()=>void 0)}}((0,M.getAppConfig)().bytelApi.url);e.s(["contractsRepository",0,R],970202);var D=((i={}).CLICK_AND_COLLECT="CLICK_COLLECT",i.RELAIS_EXPRESS="POINT_RELAIS_EXPRESS",i.RELAIS_COLIS="POINT_RELAIS",i.LA_POSTE="LA_POSTE",i.CHRONOPOST="CHRONOPOST",i.INSTALLER="INSTALLATEUR",i.DIRECT="LIVRAISON_DIRECTE",i.LIVRAISON_RDV="LIVRAISON_RDV",i);e.s(["SHIPPING_MODES",()=>D],537090);var w=e.i(2550);e.s(["List",()=>w.default],218648);var P=e.i(826555);e.s(["ListItem",()=>P.default],34621);var B=e.i(271645),z=e.i(858480),V=e.i(548233),W=e.i(41908),U=e.i(319359),H=e.i(496691);e.i(150300);var G=e.i(62309),q=e.i(513110),$=e.i(855524);let J=(0,M.getAppConfig)(),X=new class{url;constructor(e){this.url=e}async checkAuthorisationVente(e,t){return await O.apiHttpService.post(`${this.url}/controles-risques-vente/autorisation-vente`,e,{user:t})}}(J.bytelApi.url),Y=["KO","KO_SAUF_ACTION_REALISEE"];class Z{static evaluationMapper(e){let t=e.resultats.filter(e=>"ResultatGlobal"===e.type).find(e=>"ParActeDemande"===e.champApplication.type),r=!!t&&Y.includes(t.resultat),i=r&&!!t?.actions?.some(e=>"VERIFICATION_BANCAIRE"===e.action),n=r&&!i,s=n&&!!t?.actions?.some(e=>"RETRAIT_EDP"===e.action),o=n&&!!t?.actions?.some(e=>"RETRAIT_CREDIT"===e.action);return{isBlocked:n,requiresEdpRetrait:s,requiresCreditRetrait:o,requiresOpenBanking:i,messages:Z.messagesMapper(e)}}static messagesMapper(e){let t=e.resultats.filter(e=>"ResultatGlobal"===e.type),r=new Set,i=[];for(let e of t){if("ParLigneMarcheMetier"!==e.champApplication.type||!e.message)continue;let t=e.champApplication.ligneMarcheMetier;if(!(!t||r.has(t))&&(r.add(t),i.push({ligneMarcheMetier:t,message:e.message}),2===r.size))break}return i}}let Q=new class{async evaluate(e,t,r){let i;try{let n=this.buildRequest(e,r);i=await X.checkAuthorisationVente(n,t)}catch{return{isBlocked:!1,requiresEdpRetrait:!1,requiresCreditRetrait:!1,requiresOpenBanking:!1,messages:[]}}return Z.evaluationMapper(i)}buildRequest(e,t){let r={enregistrementCommande:!1,objetControle:{id:e,type:"PANIER"}};return(t?.isType(A.FundingType.YOUNITED)||t?.isType(A.FundingType.SWAPPY))&&(r.intentionFinancementCredit=!0),r}};e.s(["scoringService",0,Q],825245);var K=e.i(41253),ee=e.i(708594),et=e.i(266027),er=e.i(654479),ei=e.i(779629),en=e.i(6371),es=e.i(662794),eo=e.i(921046),ea=e.i(669762),el=e.i(522999);function ec({label:e}){return(0,p.jsxs)(C.FlexBox,{align:es.Align.CENTER,className:"is-marginless",children:[(0,p.jsx)(eo.Icon,{name:el.IconName.CHECK,size:ea.IconSize.SMALL,color:ea.IconColor.SUCCESS}),(0,p.jsx)(m.Text,{level:h.TextLevels.ONE,marginless:!0,children:e})]})}var eu=e.i(305555),ed=e.i(651508);function ep({cart:e}){let t=(0,B.useMemo)(()=>e?.getJourneyOfType(A.JourneyType.MOBILE_ACQUISITION)??e?.getJourneyOfType(A.JourneyType.RENEWAL),[e]),r=(0,B.useMemo)(()=>e?.getJourneyOfType(A.JourneyType.FAI_ACQUISITION),[e]),i=(0,B.useMemo)(()=>t?.products?.find(e=>e.isType(A.ProductType.TERMINAL)),[t]),n=(0,B.useMemo)(()=>t?.products?.filter(e=>e.isType(A.ProductType.ACCESSORY))??[],[t]),s=(0,B.useMemo)(()=>t?.products?.find(e=>e.isType(A.ProductType.SIM))??t?.products?.find(e=>e.isType(A.ProductType.ESIM)),[t]),o=(0,B.useMemo)(()=>{let e=t?.shipping??r?.shipping;if(e&&e.price.priceWithPromotions>0)return e},[t,r]),a=(0,B.useMemo)(()=>{if(!i)return"";let{name:e,color:t,capacity:r}=i.metadata??{},n=[t,r].filter(Boolean).join(", ");return n?`${e??""} (${n})`:e??""},[i]),l=(0,B.useMemo)(()=>!(n.length>0)||i||s?"Mon panier":"Mes accessoires",[n,i,s]);return 0===(0,B.useMemo)(()=>(i?.price?.priceWithPromotions??0)+n.reduce((e,t)=>
3e+(t.price?.priceWithPromotions??0),0)+(s?.price?.priceWithPromotions??0)+(o?.price.priceWithPromotions??0),[i?.price?.priceWithPromotions,n,s?.price?.priceWithPromotions,o?.price.priceWithPromotions])?null:(0,p.jsxs)(j.FlexItem,{size:{desktop:8,widescreen:6},children:[(0,p.jsx)(eu.Title,{level:ed.TitleLevels.FIVE,markup:ed.TitleMarkup.H2,children:l}),i&&(0,p.jsx)(ec,{label:a}),n.length>3&&(0,p.jsx)(ec,{label:"Accessoires"}),n.length>0&&n.length<=3&&n.map(e=>(0,p.jsx)(ec,{label:e.metadata?.name??e.label},e.id)),s&&!s?.price.isType(A.PriceTypeEnum.DEFERRED)&&(0,p.jsx)(ec,{label:s.label}),o&&(0,p.jsx)(ec,{label:o.label})]})}var em=e.i(292414),b=b;class eh{static mapDocumentType(e){return e}static documentMapper(e){return{type:eh.mapDocumentType(e.typeDocument),href:e._links?.recupererLienTelechargementUniversel?.href}}}let eg=(0,M.getAppConfig)(),ex=new class{url;constructor(e){this.url=e}async getDocuments(e,t){try{let r=await O.apiHttpService.get(`${this.url}/documents/documents-precontractuels`,{idPanier:e},{user:t});return r.documents?.map(e=>eh.documentMapper(e))??[]}catch(e){return console.error("Error in getDocuments:",e),[]}}async getDocumentLink(e,t){try{return await O.apiHttpService.get(`${this.url}${e}`,{ttl:0},{user:t})}catch(e){return console.error("Error in getDocumentLink:",e),null}}async downloadDocument(e,t){try{let r=await O.apiHttpService.get(`${this.url}${e}`,{},{headers:{"content-type":"application/pdf"},ttl:0,responseType:"arraybuffer",user:t});return new Blob([r],{type:"application/pdf"})}catch(e){return console.error("Error in downloadDocument:",e),null}}}(eg.bytelApi.url),ef=new class{getAllDocuments(e,t){return ex.getDocuments(e,t)}async getDocumentByType(e,t,r){return(await this.getAllDocuments(e,r)).find(e=>e.type===t)??null}async openDocument(e,t){let r=ee.paths.termsAndConditions;if(e.href)try{let r=await ex.getDocumentLink(e.href,t),i=r?._links?.telechargerDocumentLienEphemere?.href;if(i){let e=await ex.downloadDocument(i,t);if(e){let t=window.URL.createObjectURL(e);this.openUrl(t);return}}}catch(e){console.error("Error opening document:",e)}this.openUrl(r)}openUrl(e){window.open(e,"_blank","noopener,noreferrer")}};var ey=((n={}).CONTRACT="RECAP_CONTRACTUEL",n);e.i(207221);var eT=e.i(471964),ev=((s={}).FTTH="FTTH",s.BOX_4G="BOX_4G",s.BOX_5G="BOX_5G",s);(o={})._2P="2P",o._3P="3P",(a={}).GP="offre_gp",a.PRO="offre_pro",a.OLD="offre_old",(l={}).ERROR="error",l.NO_OFFER="no_offer",l.MISMATCH_CONFIG="mismatch_config",(c={}).PRIMARY="is-primary",c.SECONDARY="is-secondary";var eb=((u={}).DEFAULT="default",u.PROMO="promo",u.MIXED_CART="mixed_cart",u.SMART_TV="smart_tv",u.GAMING="gaming",u.TABLET="tablet",u.MOINS_26_ANS="moins_26_ans",u.BANK="bank",u);function eE({value:e}){if(!e)return"Merci d'accepter les conditions générales d'assurance et d'autoriser le partage de vos informations avec SPB."}function eC({value:e}){if(!e)return"Merci d'accepter les conditions générales."}function ej({value:e}){if(!e)return"Merci d'accepter les conditions générales de reprise."}function eI({cart:e,funding:t}){let{user:r}=(0,ei.useStableSession)(),{data:i}=(0,et.useQuery)({queryKey:["contract-document",e?.id,r],queryFn:()=>ef.getDocumentByType(e.id,ey.CONTRACT,r),enabled:!!e?.id}),n=(0,B.useMemo)(()=>e?.getJourneyOfType(A.JourneyType.MOBILE_ACQUISITION),[e]),s=(0,B.useMemo)(()=>e?.getJourneyOfType(A.JourneyType.RENEWAL),[e]),o=(0,B.useMemo)(()=>e?.getJourneyOfType(A.JourneyType.FAI_ACQUISITION),[e]),a=(0,B.useMemo)(()=>e?.journeys.some(e=>e.getProductsByType(A.ProductType.INSURANCE)?.length>0)??!1,[e]),l=(0,B.useMemo)(()=>void 0!==(n?.getPrincipalProduct()??s?.getPrincipalProduct()),[n,s]),c=(0,B.useMemo)(()=>{switch(t?.type){case A.FundingType.YOUNITED:case A.FundingType.SWAPPY:return"Younited";default:return}},[t]),u=(0,B.useMemo)(()=>!!t&&t.isType(A.FundingType.SWAPPY),[t]),d=(0,B.useMemo)(()=>!!(n?.tradeIn??s?.tradeIn),[n,s]),g=(0,B.useMemo)(()=>{let e=n?.getPrincipalProduct(),t=n?.getPortability()?.isType(A.ResourceType.PORTABILITY),r=n?.shipping?.gencode===D.CLICK_AND_COLLECT;return void 0!==e&&!t&&!r},[n]),x=(0,B.useMemo)(()=>{let e=o?.getPrincipalProduct();return e?.metadata?.commercialSeries===eb.SMART_TV},[o]),f=(0,B.useMemo)(()=>{let e=o?.getPrincipalProduct();return e?.metadata?.commercialSeries===eb.BANK},[o]),y=(0,B.useCallback)(async()=>{i&&await ef.openDocument(i,r)}
3,[i,r]),T=(0,eT.useTrilogyForm)({formId:"payment-cgv-form",defaultValues:{insuranceTerms:!1,fundingTerms:!1,cgv:!1,cgrecommerce:!1}});return(0,en.useSubmitQueue)("payment-cgv-form",T.handleSubmit),(0,p.jsx)(j.FlexItem,{children:(0,p.jsxs)(C.FlexBox,{direction:{mobile:E.DirectionEnum.COLUMN,tablet:E.DirectionEnum.COLUMN,desktop:E.DirectionEnum.ROW},gap:4,align:es.Align.CENTER,children:[(0,p.jsxs)(C.FlexBox,{gap:4,direction:E.DirectionEnum.COLUMN,children:[a&&(0,p.jsx)(j.FlexItem,{children:(0,p.jsx)(T.AppField,{name:"insuranceTerms",validators:{onSubmit:eE},children:e=>(0,p.jsx)(e.Checkbox,{label:"Je déclare avoir pris connaissance de l'ensemble de la documentation précontractuelle. J'ai lu la notice d'information figurant dans la brochure d'assurance mobile et j'en accepte les conditions. J'autorise Bouygues Telecom à communiquer mes informations personnelles au courtier gestionnaire SPB qui prélèvera mes cotisations d'assurance."})})}),c&&(0,p.jsx)(j.FlexItem,{children:(0,p.jsx)(T.AppField,{name:"fundingTerms",validators:{onSubmit:e=>(function({value:e},t){if(!e)return`Merci d\u0027autoriser le partage de vos informations personnelles avec ${t}.`})(e,c)},children:e=>(0,p.jsx)(e.Checkbox,{label:(0,p.jsxs)(p.Fragment,{children:[`J'autorise Bouygues Telecom \xe0 communiquer mes informations personnelles \xe0 ${c} pour pr\xe9-remplir ma demande et gagner du temps.`,u&&" Si vous souscrivez ce crédit dans le cadre de l'offre Smart Change, vous acceptez que Younited Crédit transmette à Bouygues Telecom les informations suivantes liées à votre contrat de crédit et soumises au secret professionnel : le statut du crédit, le montant restant dû et le nombre d'échéances payées. Avec ces informations, Bouygues Telecom pourra ainsi vous proposer d'affecter la valeur de reprise du bien financé au remboursement anticipé de votre crédit."]})})})}),(0,p.jsx)(j.FlexItem,{children:(0,p.jsx)(T.AppField,{name:"cgv",validators:{onSubmit:eC},children:e=>(0,p.jsx)(e.Checkbox,{label:(0,p.jsxs)(p.Fragment,{children:["Je certifie l'exactitude des informations ciâdessus et reconnais avoir préalablement lu et accepté les"," ",(0,p.jsx)(em.Link,{href:ee.paths.termsPDF,blank:!0,rel:"noopener noreferrer",children:"Conditions Générales de Vente à distance"}),", les"," ",(0,p.jsx)(em.Link,{href:ee.paths.serviceConditionsPDF,blank:!0,rel:"noopener noreferrer",children:"Conditions Générales de Service"}),", les"," ",(0,p.jsx)(em.Link,{href:ee.paths.pricingGuidePDF,blank:!0,rel:"noopener noreferrer",children:"tarifs"}),i&&(0,p.jsxs)(p.Fragment,{children:[", le"," ",(0,p.jsx)(S,{onClick:y,className:"is-marginless",children:"récapitulatif contractuel"})]}),f&&(0,p.jsxs)(p.Fragment,{children:[", les"," ",(0,p.jsx)(em.Link,{href:ee.paths.bankingOfferLegals,blank:!0,rel:"noopener noreferrer",children:"Fiches d'informations standardisées"})]})," ","et les éventuelles modifications apportées à mon offre. J'ai pris connaissance du traitement de mes données tel que décrit dans la"," ",(0,p.jsx)(em.Link,{href:ee.paths.privacyPolicy,blank:!0,rel:"noopener noreferrer",children:"Politique de Confidentialité"})," ","de BOUYGUES TELECOM.",g&&(0,p.jsxs)(p.Fragment,{children:[" ","J'accepte de finaliser ma souscription, ma ligne sera activée automatiquement par Bouygues Telecom. Une fois ma ligne activée, je pourrai signer mon mandat SEPA sur mon Espace Client / Mes infos personnelles."]}),(0,p.jsx)(U.Spacer,{size:H.SpacerSize.FOUR})]})})})}),d&&(0,p.jsx)(j.FlexItem,{children:(0,p.jsx)(T.AppField,{name:"cgrecommerce",validators:{onSubmit:ej},children:e=>(0,p.jsx)(e.Checkbox,{label:(0,p.jsxs)(p.Fragment,{children:["J'accepte les"," ",(0,p.jsx)(em.Link,{href:ee.paths.mobileCGCPDF,blank:!0,rel:"noopener noreferrer",children:"Conditions Générales de Reprise par Recommerce Solutions"})]})})})}),x&&(0,p.jsx)(j.FlexItem,{children:(0,p.jsx)(m.Text,{level:h.TextLevels.THREE,children:"L'achat du téléviseur auprès de Samsung nécessite de créer un compte Samsung. Pour en savoir plus, nous vous invitons à consulter la politique de confidentialité de Samsung. En cliquant sur « Valider », nous vous rappelons que dans le cadre de votre souscription à notre offre Bbox Smart TV, Bouygues Telecom transmet à Samsung certaines de vos données personnelles d'identité qui sont nécessaires à l'obtention de la remise sur la télévision auprès de Samsung. Samsung traitera ces données en qualité de responsable du traitement pour les besoins de l'exécution et du suivi du contrat de vente et de la gestion de ses clients."})})]}),l&&(0,p.jsxs)(b.default,{trigger:(0,p.jsx)(eo.Icon,{name:el.IconName.QUESTION_CIRCLE,size:ea.IconSize.SMALL}),children:[g&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Text,{children:"Bouygues Telecom s'occupe de tout, sans aucune démarche complémentaire de ma part."}
3),(0,p.jsx)(m.Text,{children:"Ma ligne est utilisable dès réception."}),(0,p.jsx)(m.Text,{children:"En cas de conservation de mon numéro, le transfert est effectif 3 jours ouvrés après l'activation de ma ligne provisoire. Je reste toujours joignable."})]}),(0,p.jsx)(m.Text,{children:'Votre numéro ne sera pas inscrit dans l\'annuaire universel sauf démarche contraire de votre part. Pour ce faire, une fois votre ligne activée, rendez-vous sur votre espace client bouyguestelecom.fr rubrique "Infos perso" puis "Annuaire Universel". '})]})]})})}(d={}).SUMMARY="provider_summary",d.RESULTS="provider_results",d.ADDRESS="provider_address",d.MODE="provider_eligibility_mode",d.PACK_PRODUCT="provider_pack_product",d.REFERER="provider_results_referer",d.YAMA_CART="yama_cart",e.s(["ELIGIBILITY_JOURNEY",()=>eb,"TECHNOLOGY",()=>ev],567236);var e_=e.i(879252);let eS={src:e.i(848153).default,width:210,height:48,blurWidth:0,blurHeight:0};var eA=e.i(657688);function eL({height:e=16,...t}){return(0,p.jsx)(eA.default,{height:e,src:eS,alt:"Younited",priority:!0,...t})}function eF({funding:e,shouldShowFinancingText:t=!1}){let r=e.isType(A.FundingType.YOUNITED)||e.isType(A.FundingType.SWAPPY),i=(0,B.useMemo)(()=>e?.fixedInterestRate!==void 0&&e.fixedInterestRate>=0,[e?.fixedInterestRate]);return(0,p.jsx)(V.Box,{shadowless:!0,testId:"funding-details-box",children:(0,p.jsxs)(W.BoxContent,{backgroundColor:e_.TrilogyColor.NEUTRAL_FADE,children:[t&&(0,p.jsxs)(m.Text,{level:h.TextLevels.TWO,className:"is-flex",children:["* Financement ",r&&(0,p.jsx)(eL,{})]}),(0,p.jsxs)(m.Text,{level:h.TextLevels.ONE,marginless:!0,children:[e.installments??0," mensualités de"," ",(0,p.jsx)(T,{amount:e.monthlyAmount,period:"mois"})]}),(0,p.jsxs)(m.Text,{level:h.TextLevels.ONE,marginless:!0,typo:x.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:["Montant total dû : ",(0,p.jsx)(T,{amount:e.totalFinancingCost})]}),(0,p.jsxs)(m.Text,{level:h.TextLevels.ONE,marginless:!0,typo:x.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:["TAEG fixe : ",e.APR.toString().replace(".",","),"%"]}),(0,p.jsxs)(m.Text,{level:h.TextLevels.ONE,marginless:!0,children:["Montant financé : ",(0,p.jsx)(T,{amount:e.amountToFinance,typo:[]})]}),(0,p.jsxs)(m.Text,{level:h.TextLevels.ONE,marginless:i,children:["Intérêts : ",(0,p.jsx)(T,{amount:e.interestAmount,typo:[]})]}),i&&(0,p.jsxs)(m.Text,{level:h.TextLevels.ONE,children:["Taux débiteur fixe : ",e.fixedInterestRate.toString().replace(".",","),"%"]}),(0,p.jsx)(m.Text,{level:h.TextLevels.ONE,typo:x.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:"Attention, un crédit coûte de l'argent et doit être remboursé."})]})})}e.s(["FundingDetailsBox",0,eF],250901);var ek=e.i(693126);function eN({funding:e,isSelected:t,onSelect:r}){let i=e.isType(A.FundingType.YOUNITED)||e.isType(A.FundingType.SWAPPY),n=e.interestAmount>0;return(0,p.jsx)(j.FlexItem,{children:(0,p.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:1,children:[(0,p.jsx)(ek.RadioTile,{id:e.key,horizontal:!0,checked:t,onChange:r,description:(0,p.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:3,children:[(0,p.jsx)(j.FlexItem,{narrow:!0,children:i&&(0,p.jsx)(eL,{})}),(0,p.jsxs)(j.FlexItem,{children:[(0,p.jsx)(m.Text,{level:h.TextLevels.TWO,children:(0,p.jsx)(T,{amount:e.initialDeposit,level:h.TextLevels.TWO})}),(0,p.jsxs)(m.Text,{level:h.TextLevels.TWO,children:["+ ",(0,p.jsx)(T,{amount:e.monthlyAmount,level:h.TextLevels.TWO})," par mois pendant ",e.installments??0," mois ",n?"avec frais":"sans frais"]})]})]}),name:"fundingInstallment"}),t&&(0,p.jsx)(eF,{funding:e})]})})}var eM=e.i(976670);function eO({value:e,options:t,onChange:r,error:i,isHidden:n=!1}){return n?null:(0,p.jsxs)(j.FlexItem,{size:{desktop:8,widescreen:6},children:[(0,p.jsx)(eu.Title,{level:ed.TitleLevels.FIVE,children:"Sélectionnez vos mensualités :"}),(0,p.jsx)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:2,mobile:!0,children:t.map(t=>(0,p.jsx)(eN,{funding:t,isSelected:e===t.key,onSelect:()=>r(t.key)},t.key))}),i&&(0,p.jsx)(m.Text,{level:h.TextLevels.THREE,typo:eM.TypographyColor.TEXT_ERROR,children:i})]})}var b=b;function eR(e){return e.toSorted((e,t)=>(e.initialDeposit??0)-(t.initialDeposit??0))[0]?.key??""}function eD({funding:e,fundingOptions:t,isSelected:r,onSelect:i}){let n=e.isType(A.FundingType.YOUNITED)||e.isType(A.FundingType.SWAPPY),s=e.isType(A.FundingType.EDP),o=function(e,t){switch(e.type){case A.FundingType.COMPTANT:return"En une seule fois";case A.FundingType.YOUNITED:case A.FundingType.SWAPPY:{let e=[...new Set(t.map(e=>e.installments).filter(e=>void 0!==e).sort((e,t)=>
3e-t))].sort((e,t)=>e-t);if(1===e.length)return`Le reste en ${e[0]} mois`;if(2===e.length)return`Le reste en ${e[0]} ou ${e[1]} mois`;let r=e.at(-1),i=e.slice(0,-1).join(", ");return`Le reste en ${i} ou ${r} mois`}case A.FundingType.EDP:return`+ ${y(e.monthlyAmount)}/mois pendant ${e.installments??0} mois ${e.interestAmount>0?"avec":"sans"} frais`;default:return null}}(e,t);return(0,p.jsx)(ek.RadioTile,{id:e.type,horizontal:!0,name:"paymentMethod",checked:r,onChange:i,description:(0,p.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:3,children:[n&&(0,p.jsx)(j.FlexItem,{narrow:!0,children:(0,p.jsx)(eL,{})}),(0,p.jsxs)(j.FlexItem,{children:[(0,p.jsxs)(m.Text,{level:h.TextLevels.ONE,typo:x.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:[n&&"à partir de ",(0,p.jsx)(T,{amount:e.initialDeposit,level:h.TextLevels.ONE}),s&&e.amountToFinance>0&&(0,p.jsxs)(p.Fragment,{children:[" ",(0,p.jsxs)(b.default,{trigger:(0,p.jsx)(eo.Icon,{name:el.IconName.INFOS_CIRCLE}),children:["Facilité de paiement du téléphone à hauteur de"," ",y(e.amountToFinance),". Le restant dû étant à payer au comptant."]})]})]}),o&&(0,p.jsx)(m.Text,{level:h.TextLevels.TWO,children:o})]})]})})}function ew({value:e,options:t,onChange:r,error:i,fundingKeysByType:n}){let s=(n[e]??[]).length<=1;return(0,p.jsxs)(j.FlexItem,{size:{desktop:8,widescreen:6},children:[(0,p.jsx)(eu.Title,{level:ed.TitleLevels.FIVE,children:"Sélectionnez votre paiement :"}),(0,p.jsx)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:4,mobile:!0,"data-has-error":!!i,children:t.map(t=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(eD,{funding:t,fundingOptions:n[t.type]??[],isSelected:e===t.type,onSelect:()=>r(t.type)},t.type),e===t.type&&(t.isType(A.FundingType.SWAPPY)||t.isType(A.FundingType.YOUNITED))&&s&&(0,p.jsx)(eF,{funding:t})]},t.type))}),i&&(0,p.jsx)(m.Text,{level:h.TextLevels.THREE,typo:eM.TypographyColor.TEXT_ERROR,children:i})]})}function eP(){return(0,p.jsxs)(j.FlexItem,{size:{desktop:8,widescreen:6},children:[(0,p.jsx)(eu.Title,{level:ed.TitleLevels.FIVE,markup:ed.TitleMarkup.H2,children:"Mon abonnement"}),(0,p.jsx)(m.Text,{level:h.TextLevels.TWO,children:"Le paiement mensuel de votre offre nécessite l'utilisation de votre IBAN."})]})}var eB=e.i(294070),ez=e.i(818448),eV=e.i(286791);let eW=new class{async encrypt(e,t){let r=await (0,eV.importJWK)(t,t.alg);return await new ez.CompactEncrypt(new TextEncoder().encode(e)).setProtectedHeader({alg:t.alg,enc:"A256GCM",kid:t.kid}).encrypt(r)}},eU=(0,M.getAppConfig)(),eH=new A.CustomerRepository({refcliUrl:eU.bytelApi.url},O.apiHttpService);var eG=e.i(170604),eq=e.i(900214);let e$=(0,M.getAppConfig)(),eJ=new class{url;constructor(e){this.url=e}async getPublicKey(e){return await (0,eq.fetchEncryptionKey)(`${this.url}/refclient/jwks`,e)}}(e$.bytelApi.url),eX=new class{async getBankAccountFromContracts(e,t){let r=await this.get
3SignedContracts(e,t),i=this.findRelevantContract(r),n=i?._links.personBankAccount?.href;if(n)return await eH.getBankAccountByUrl(n,t)}async validateIban(e,t){try{let r=await eG.rBanqueRepository.getPublicKey(t),i=await eW.encrypt(e,r),n=await eG.rBanqueRepository.validateIban(i,t);if("COURANT"!==n.typeCompte)return"IBAN non accepté"}catch(e){if(e instanceof Error)return e.message;return"Une erreur technique est survenue"}}async encryptIban(e,t){let r=await eJ.getPublicKey(t);return await eW.encrypt(e,r)}async getSignedContracts(e,t){return await R.getSignedContracts(e,t)}findRelevantContract(e){let t=e.filter(e=>"ACTIF"===e.status),r=t.filter(e=>"FNB"===e.marketLine);if(r.length>0)return this.findMostRecent(r);let i=t.filter(e=>"FAI"===e.marketLine);if(i.length>0)return this.findMostRecent(i)}findMostRecent(e){return e.toSorted((e,t)=>new Date(t.creationDate).getTime()-new Date(e.creationDate).getTime())[0]}},eY={AD:{len:20,regex:/^[0-9]{8}[0-9A-Z]{12}$/},AE:{len:19,regex:/^[0-9]{19}$/},AL:{len:24,regex:/^[0-9]{8}[0-9A-Z]{16}$/},AT:{len:16,regex:/^[0-9]{16}$/},AZ:{len:24,regex:/^[A-Z]{4}[0-9A-Z]{20}$/},BA:{len:16,regex:/^[0-9]{16}$/},BE:{len:12,regex:/^[0-9]{12}$/},BG:{len:18,regex:/^[A-Z]{4}[0-9]{4}[0-9]{2}[0-9A-Z]{8}$/},BH:{len:18,regex:/^[A-Z]{4}[0-9A-Z]{14}$/},BR:{len:25,regex:/^[0-9]{23}[A-Z]{1}[0-9A-Z]{1}$/},BY:{len:24,regex:/^[0-9A-Z]{20}[0-9]{4}$/},CH:{len:17,regex:/^[0-9]{5}[0-9A-Z]{12}$/},CR:{len:18,regex:/^[0-9]{18}$/},CY:{len:24,regex:/^[0-9]{8}[0-9A-Z]{16}$/},CZ:{len:20,regex:/^[0-9]{20}$/},DE:{len:18,regex:/^[0-9]{18}$/},DK:{len:14,regex:/^[0-9]{14}$/},DO:{len:24,regex:/^[0-9A-Z]{4}[0-9]{20}$/},EE:{len:16,regex:/^[0-9]{16}$/},ES:{len:20,regex:/^[0-9]{20}$/},FI:{len:14,regex:/^[0-9]{14}$/},FO:{len:14,regex:/^[0-9]{14}$/},FR:{len:23,regex:/^[0-9]{12}[0-9A-Z]{11}$/},GB:{len:18,regex:/^[A-Z]{4}[0-9]{6}[0-9]{8}$/},GE:{len:18,regex:/^[A-Z]{2}[0-9]{16}$/},GI:{len:19,regex:/^[A-Z]{4}[0-9A-Z]{15}$/},GL:{len:14,regex:/^[0-9]{14}$/},GR:{len:23,regex:/^[0-9]{7}[0-9A-Z]{16}$/},GT:{len:24,regex:/^[0-9A-Z]{24}$/},HR:{len:17,regex:/^[0-9]{17}$/},HU:{len:24,regex:/^[0-9]{24}$/},IE:{len:18,regex:/^[A-Z]{4}[0-9]{6}[0-9]{8}$/},IL:{len:19,regex:/^[0-9]{19}$/},IQ:{len:19,regex:/^[A-Z]{4}[0-9]{3}[0-9]{12}$/},IS:{len:22,regex:/^[0-9]{22}$/},IT:{len:23,regex:/^[A-Z]{1}[0-9]{5}[0-9]{5}[0-9A-Z]{12}$/},JO:{len:26,regex:/^[A-Z]{4}[0-9]{4}[0-9A-Z]{18}$/},KW:{len:26,regex:/^[A-Z]{4}[0-9A-Z]{22}$/},KZ:{len:16,regex:/^[0-9]{3}[0-9A-Z]{13}$/},LB:{len:24,regex:/^[0-9]{4}[0-9A-Z]{20}$/},LC:{len:28,regex:/^[A-Z]{4}[0-9A-Z]{24}$/},LI:{len:17,regex:/^[0-9]{5}[0-9A-Z]{12}$/},LT:{len:16,regex:/^[0-9]{16}$/},LU:{len:16,regex:/^[0-9]{3}[0-9A-Z]{13}$/},LV:{len:17,regex:/^[A-Z]{4}[0-9A-Z]{13}$/},MC:{len:23,regex:/^[0-9]{12}[0-9A-Z]{11}$/},MD:{len:20,regex:/^[0-9A-Z]{20}$/},ME:{len:18,regex:/^[0-9]{18}$/},MK:{len:15,regex:/^[0-9]{5}[0-9A-Z]{10}$/},MR:{len:23,regex:/^[0-9]{23}$/},MT:{len:27,regex:/^[A-Z]{4}[0-9]{5}[0-9A-Z]{18}$/},MU:{len:26,regex:/^[A-Z]{7}[0-9]{2}[0-9]{2}[0-9]{12}[0-9]{3}$/},NL:{len:14,regex:/^[A-Z]{4}[0-9]{10}$/},NO:{len:11,regex:/^[0-9]{11}$/},PK:{len:20,regex:/^[A-Z]{4}[0-9A-Z]{16}$/},PL:{len:24,regex:/^[0-9]{24}$/},PS:{len:25,regex:/^[A-Z]{4}[0-9A-Z]{21}$/},PT:{len:21,regex:/^[0-9]{21}$/},QA:{len:25,regex:/^[A-Z]{4}[0-9A-Z]{21}$/},RO:{len:20,regex:/^[A-Z]{4}[0-9A-Z]{16}$/},RS:{len:18,regex:/^[0-9]{18}$/},SA:{len:20,regex:/^[0-9]{2}[0-9A-Z]{18}$/},SC:{len:27,regex:/^[A-Z]{7}[0-9]{2}[0-9]{2}[0-9]{16}$/},SE:{len:20,regex:/^[0-9]{20}$/},SI:{len:15,regex:/^[0-9]{15}$/},SK:{len:20,regex:/^[0-9]{20}$/},SM:{len:23,regex:/^[A-Z]{1}[0-9]{5}[0-9]{5}[0-9A-Z]{12}$/},ST:{len:21,regex:/^[0-9]{21}$/},SV:{len:24,regex:/^[A-Z]{4}[0-9]{20}$/},TL:{len:19,regex:/^[0-9]{19}$/},TN:{len:20,regex:/^[0-9]{20}$/},TR:{len:22,regex:/^[0-9]{6}[0-9A-Z]{16}$/},UA:{len:25,regex:/^[0-9]{6}[0-9A-Z]{19}$/},VG:{len:20,regex:/^[A-Z]{4}[0-9]{16}$/},VA:{len:23,regex:/^[A-Z]{1}[0-9]{5}[0-9]{5}[0-9A-Z]{12}$/},XK:{len:16,regex:/^[0-9]{16}$/}},eZ=/([A-Z]{2}[0-9O]{2}[0-9A-Z]{11,30})/g;function eQ(e){return e.replace(/[^A-Za-z0-9]/g,"").toUpperCase()}function eK(e="FR"){let t=eY[e];return e.padEnd(t.len+4,"X")}function e0(e){let t=e.substring(0,2),r=eY[t];if(!r)return`Merci de saisir un IBAN correct (Ex: ${eK()}).`;let i=`Merci de saisir un IBAN correct (Ex: ${eK(t)}).`,n=r.len+4;if(e.length!==n)return i;let s=e.substring(4);return r.regex.test(s)&&function(e){let t=eQ(e),r=(t.slice(4)+t.slice(0,4)).split("").map(e=>{let t=e.charCodeAt(0);return t>=65&&t<=90?(t-55).toString():e}).join("");for(;r.length>2;){let e=r.slice(0,9);r=(parseInt(e,10)%97).toString()+r.slice(e.length)}return parseInt(r,10)%97==1}(e)?null:i}let e1="Aucun IBAN n'a été détecté. Merci de vérifier la lisibilité et d'essayer à nouveau.";var e2=e.i(92786),e3=e.i(147067),e5=e.i(886743);function e9({onFileSelect:e,onError:t,isProcessing:r=!1,disabled:i=!1,isRenewal:n=!1}){let s=(0,B.useRef)(null);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("input",{ref:s,t
3ype:"file",accept:"image/jpeg,image/png,application/pdf",onChange:r=>{let i=r.target.files?.[0];if(i){if(!["image/jpeg","image/png","application/pdf"].includes(i.type))return void t?.("Type de fichier non supporté. Utilisez une image (JPEG, PNG) ou un PDF.");if(i.size>0xa00000)return void t?.("Le fichier est trop volumineux (max 10 Mo).");e(i),r.target.value=""}},style:{display:"none"},disabled:i||r}),(0,p.jsx)(e2.Button,{variant:e3.ButtonVariant.SECONDARY,iconName:el.IconName.CAMERA,onClick:()=>{(0,e5.sendTracking)(n,{action:"Clic_selection",category:"Scan_Iban",name:"Scanner_ou_telecharger_votre_IBAN"}),s.current?.click()},disabled:i||r,children:r?"Analyse en coursâ¦":"Scanner ou télécharger votre IBAN"})]})}function e4({openBankingBankAccountId:t}){let{user:r}=(0,ei.useStableSession)(),{cart:i,setBillingContextMutation:n}=(0,B.useContext)(z.CartContext),s=!!i?.getJourneyOfType(A.JourneyType.RENEWAL),{showErrorModal:o}=(0,q.useErrorModal)(),a=(0,et.useQuery)({queryKey:["existingBankAccount",r?.id,i?.billingContext?.bankAccount?.id],enabled:!!(r&&i?.buyer),queryFn:async()=>r&&i?.buyer?await eX.getBankAccountFromContracts(i.buyer,r)??null:null}),l=i?.billingContext?.bankAccount,[c,u]=(0,B.useState)(!!l),d=!!t;(0,B.useEffect)(()=>{t&&l?.id!==t&&n.mutateAsync({bankAccountId:t}).catch(e=>(function(e,t){if(e instanceof A.InvalidBankAccountTypeError)return void t("wrong-iban-banking-partner");let r=e?.response,i=r?.status,n=r?.data?.message;t("technical-error",i&&i>=400&&i<500&&n?{message:n}:{message:"Une erreur technique est survenue"})})(e,o))},[t,l?.id,n,o]);let m=d?l?.iban??"":l?.iban??a.data?.iban??"",h=(0,eT.useTrilogyForm)({formId:"iban-form",defaultValues:{iban:m},onSubmit:async({value:e})=>
3{if(s||d)return;let t=e.iban;if(t===a.data?.iban)return await n.mutateAsync({bankAccountId:a.data.id});if(t!==l?.iban)try{let e=await eX.encryptIban(eQ(t),r);return await n.mutateAsync({bankAccount:{iban:e}})}catch(e){if(e instanceof A.InvalidBankAccountTypeError)return void o("wrong-iban-banking-partner");g(e instanceof Error?e.message:"Une erreur technique est survenue")}}});(0,B.useEffect)(()=>{d&&h.setFieldValue("iban",l?.iban??"")},[d,l?.iban,h]),(0,en.useSubmitQueue)("iban-validation",h.handleSubmit);let g=(0,B.useCallback)(e=>{h.setErrorMap({onChange:{fields:{iban:e}}})},[h]),{extractIbanFromFile:x,isProcessing:f}=function(t){let[r,i]=(0,B.useState)(!1);return{extractIbanFromFile:async r=>{i(!0);try{let i;if(r.type.startsWith("image/")){let{extractTextFromImage:t}=await e.A(189444);i=await t(r)}else if("application/pdf"===r.type){let{extractTextFromPDF:t}=await e.A(850837);i=await t(r)}else throw Error("Type de fichier non supporté. Utilisez une image ou un PDF.");let n=function(e){let t=eQ(e).match(eZ);if(!t||0===t.length)return null;for(let e of t){let t=eY[e.substring(0,2)];if(!t)continue;let r=t.len+4,i=e.length>r?e.substring(0,r):e;if(null===e0(i))return i}return null}(i);if(!n)return t?.(e1),null;return n}catch(e){return t?.(e instanceof Error?e.message:e1),null}finally{i(!1)}},isProcessing:r}}(e=>g(e)),y=(0,B.useCallback)(async e=>{let t=await x(e);t&&(h.setFieldValue("iban",t),h.validateField("iban","change"))},[x,h]),T=(0,B.useCallback)(async()=>{if(!(i?.buyer?.id&&r))return;let e=`${window.location.origin}${ee.paths.bank}`;try{let{url:t}=await $.openBankingService.forceNewVerification(i.buyer.id,e,r);window.location.href=t}catch{o("technical-error")}},[i?.buyer?.id,r,o]);return(0,p.jsxs)(j.FlexItem,{size:{desktop:8,widescreen:6},children:[(0,p.jsx)(eP,{}),(0,p.jsx)(h.AppField,{name:"iban",validators:{onChange:e=>{if(!d&&e.value!==a.data?.iban&&e.value!==l?.iban&&e.value)return function({value:e}){return e0(eQ(e))??void 0}(e)},onSubmit:({value:e})=>e?void 0:"Merci de saisir votre IBAN.",onSubmitAsync:async({value:e})=>
3{if(!d&&e!==a.data?.iban&&e!==l?.iban)return await eX.validateIban(eQ(e),r)}},children:e=>{let t;return(0,p.jsx)(e.Input,{label:h.state.values.iban?"Votre IBAN":"Saisissez votre IBAN",help:"Ex: FR0012345678912389123456789",className:a.data?"is-marginless":"",maxLength:(t=eY[h.state.values.iban.substring(0,2).toUpperCase()])?t.len+4:34,disabled:d||!!(a.data&&!c)||a.isFetching||s,onChange:t=>{let r=t.inputValue.replace(/[^A-Za-z0-9]/g,"").toUpperCase();e.handleChange(r)}})}}),d&&!s&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(U.Spacer,{size:H.SpacerSize.TWO}),(0,p.jsx)(em.Link,{onClick:T,children:"Changer de compte"})]}),!(s||d)&&(0,p.jsxs)(p.Fragment,{children:[a.data&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(U.Spacer,{size:H.SpacerSize.TWO}),(0,p.jsx)(eB.Checkbox,{checked:c,onChange:e=>{let t=e.checkboxChecked;u(t),t?h.setFieldValue("iban",""):a.data?.iban&&h.setFieldValue("iban",a.data.iban)},label:"Utiliser un autre IBAN",disabled:a.isFetching})]}),(c||!a.data)&&(0,p.jsx)(e9,{onFileSelect:y,onError:e=>g(e),isProcessing:f,isRenewal:s})]})]})}var v=v;function e6({url:e}){let[t,r]=(0,B.useState)(!1);return(0,en.useSubmitQueue)("open-banking-required",()=>{throw r(!0),Error("open-banking-required")}),(0,p.jsx)(V.Box,{shadowless:!0,children:(0,p.jsxs)(W.BoxContent,{backgroundColor:e_.TrilogyColor.NEUTRAL_FADE,children:[t&&(0,p.jsx)(m.Text,{level:h.TextLevels.TWO,typo:eM.TypographyColor.TEXT_ERROR,className:"help","data-has-error":"true",children:"Merci de vous connecter à votre banque pour valider votre commande."}),(0,p.jsx)(m.Text,{level:h.TextLevels.ONE,children:"Vous pouvez désormais vous connecter à votre banque pour permettre le prélèvement automatique de votre forfait. C'est facile, rapide et sécurisé"}),(0,p.jsx)(e2.Button,{variant:e3.ButtonVariant.PRIMARY,href:e,children:"Me connecter à ma banque"}),(0,p.jsx)(v.default,{content:"OU"}),(0,p.jsx)(m.Text,{level:h.TextLevels.ONE,children:"Vous pouvez vous rendre en boutique pour un accompagnement personnalisé"}),(0,p.jsx)(e2.Button,{variant:e3.ButtonVariant.SECONDARY,href:ee.paths.storeLocation,children:"Prendre rendez-vous en boutique"})]})})}var v=v;function e8(){return(0,p.jsxs)(j.FlexItem,{children:[(0,p.jsx)(g,{}),(0,p.jsx)(eu.Title,{level:ed.TitleLevels.FIVE,children:"Paiement"}),(0,p.jsx)(v.default,{}),(0,p.jsx)(m.Text,{level:h.TextLevels.ONE,typo:x.TypographyBold.TEXT_WEIGHT_SEMIBOLD,children:"Félicitations ! Vous pouvez désormais finaliser votre commande"}),(0,p.jsx)(m.Text,{level:h.TextLevels.TWO,children:"Il ne vous reste plus qu'à entrer ces dernières informations pour profiter de votre commande"})]})}var e7=e.i(441432),w=w,P=P;let te=/plan_(premium|ideo)/i;function tt({cart:e}){let t=(0,B.useMemo)(()=>e?.getJourneyOfType(A.JourneyType.RENEWAL),[e]),r=(0,B.useMemo)(()=>e?.getJourneyOfType(A.JourneyType.FAI_ACQUISITION),[e]),i=(0,B.useMemo)(()=>e?.getJourneyOfType(A.JourneyType.MOBILE_ACQUISITION),[e]),n=(0,B.useMemo)(()=>{let e=i?.getProductsByType(A.ProductType.MAIN_MOBILE_OFFER)?.[0];return te.test((e?.metadata?.categories??[]).join(","))},[i]),s=(0,B.useMemo)(()=>{let e=r?.getPrincipalProduct();return e?.metadata?.commercialSeries===eb.SMART_TV},[r]);return t?(0,p.jsxs)(m.Text,{level:h.TextLevels.THREE,children:["Vous disposez d'un délai de rétractation de 14 jours. Vous aurez ensuite 14 jours pour nous renvoyer à vos frais l'équipement sinon il vous sera facturé."," ",(0,p.jsx)(em.Link,{href:ee.paths.retractFormPDF,blank:!0,rel:"noopener noreferrer",children:"Formulaire de rétractation"})]}):(0,p.jsxs)(p.Fragment,{children:[n&&(0,p.jsx)(m.Text,{level:h.TextLevels.THREE,children:"Si vous avez acheté un terminal (téléphone, tablette, 4GBox, 5GBox), vous avez bien noté que son prix est lié à votre durée d'engagement et sous réserve d'activation de votre ligne, conformément aux CGV."}),s?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Text,{level:h.TextLevels.THREE,children:"Vous disposez d'un délai de 14 jours dès le lendemain de la réception de la Smart TV Samsung pour vous rétracter : "}),(0,p.jsxs)(w.default,{children:[(0,p.jsx)(P.default,{children:(0,p.jsx)(m.Text,{level:h.TextLevels.THREE,children:"Soit uniquement de la Smart TV Samsung en conservant votre abonnement Bbox Smart TV. Dans ce cas, la rétractation se fait exclusivement auprès de Samsung."})}),(0,p.jsx)(P.default,{children:(0,p.jsx)(m.Text,{level:h.TextLevels.THREE,children:"Soit uniquement de l'abonnement Bbox Smart TV en conservant le Produit au prix non remisé. Dans ce cas, la rétractation se fait exclusivement auprès de Bouygues Telecom. Vous pouvez demander un remboursement au moyen d'une déclaration dénuée d'ambiguïté, par exemple en utilisant le modèle de formulaire de rétractation que vous pouvez trouver ici ou en contactant le Service Clients (au 1064 depuis un mobile Bouygues Telecom ou depuis un poste fixe ou un mobile d'un autre opérateur, prix d'un appel local depuis un téléphone fixe)."})})]}),(0,p.jsxs)(m.Text,{level:h.TextLevels.THREE,children:["Vous avez ensuite 14 jours pour nous renvoyer à vos frais l'équipement sinon il vous sera facturé. Si vous avez déjà activé nos services, nous vous facturons vos consommations et le prorata de vos abonnements et options jusqu'à votre date de rétractation. En cas de rétractation à la Bbox Smart TV en conservant la Smart TV Samsung ou de défaut de retour ou de retour défectueux de la Smart TV Samsung dans les délais impartis, vous serez redevable du prix de la Smart TV Samsung non remisé, déduction faite du montant déjà payé."," ",(0,p.jsx)(em.Link,{href:ee.paths.retractFormPDF,blank:!0,rel:"noopener noreferrer",children:"Formulaire de rétractation"})]})]}):(0,p.jsxs)(m.Text,{level:h.TextLevels.THREE,children:["Vous disposez d'un délai de rétractation de 14 jours. V
3ous aurez ensuite 14 jours pour nous renvoyer à vos frais l'équipement sinon il vous sera facturé. Si vous avez déjà activé vos services, nous vous facturerons vos consommations et le prorata de vos abonnements et options jusqu'à votre date de rétractation."," ",(0,p.jsx)(em.Link,{href:ee.paths.retractFormPDF,blank:!0,rel:"noopener noreferrer",children:"Formulaire de rétractation"}),"."]})]})}function tr({cart:e}){return(0,p.jsx)(j.FlexItem,{children:(0,p.jsxs)(e7.Section,{children:[(0,p.jsx)(tt,{cart:e}),(0,p.jsx)(m.Text,{level:h.TextLevels.THREE,children:"Les informations recueillies à l'occasion de votre commande sont enregistrées dans un fichier informatisé et traitées par Bouygues Telecom pour : i) gérer votre relation contractuelle avec Bouygues Telecom, vous fournir vos produits et services et vous identifier et/ou vous authentifier; ii) effectuer des études pour améliorer vos offres et services et/ou améliorer la connaissance client de Bouygues Telecom; iii) lutter contre la fraude, y compris documentaire, et contre les impayés, notamment consulter le fichier Preventel si vous souhaitez souscrire à une offre mobile; iv) gérer les éventuels précontentieux et contentieux; v) le respect des obligations légales de Bouygues Telecom."}),(0,p.jsxs)(m.Text,{level:h.TextLevels.THREE,typo:[x.TypographyBold.TEXT_WEIGHT_SEMIBOLD],children:["Sauf opposition de votre part, vos données personnelles seront aussi traitées pour vous informer par mails et SMS des offres et actualités du groupe Bouygues Telecom, et pour vous adresser par téléphone et courrier des propositions du groupe Bouygues Telecom et de ses partenaires du secteur des médias. Pour vous opposer, vous pouvez consulter vos"," ",(0,p.jsx)(em.Link,{href:ee.paths.clientSpacePreferencesContacts,blank:!0,rel:"noopener noreferrer",children:"préférences de contacts"}),"."]}),(0,p.jsxs)(m.Text,{level:h.TextLevels.THREE,children:["Pour en savoir plus sur la gestion de vos données personnelles et exercer vos droits, vous pouvez consulter notre"," ",(0,p.jsx)(em.Link,{href:ee.paths.privacyPolicy,blank:!0,rel:"noopener noreferrer",children:"Politique de confidentialité"}),"."]})]})})}var ti=e.i(524826);function tn({isDisabled:e=!1}){let t=(0,en.useSubmitContext)();return(0,p.jsxs)(j.FlexItem,{children:[(0,p.jsx)(m.Text,{level:h.TextLevels.ONE,typo:[x.TypographyBold.TEXT_WEIGHT_SEMIBOLD,ti.TypographyAlign.TEXT_CENTERED],children:"En cliquant sur « Valider et payer » vous serez redirigé vers l'interface de paiement"}),(0,p.jsx)(C.FlexBox,{justify:I.Justify.CENTER,children:(0,p.jsx)(e2.Button,{disabled:t?.isDisabled||e,variant:e3.ButtonVariant.CONVERSION,loading:t?.isLoading,testId:"payment-submit-btn",onClick:()=>t?.onSubmit?.(),children:t?.label})})]})}function ts(){return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(j.FlexItem,{size:{desktop:8,widescreen:6},children:[(0,p.jsx)(eu.Title,{level:ed.TitleLevels.FIVE,className:"skeleton w-fit",children:"Sélectionnez votre paiement :"}),(0,p.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:4,mobile:!0,children:[(0,p.jsx)(ek.RadioTile,{horizontal:!0,name:"paymentMethod",disabled:!0,description:(0,p.jsxs)("div",{children:[(0,p.jsx)(m.Text,{level:h.TextLevels.TWO,typo:x.TypographyBold.TEXT_WEIGHT_SEMIBOLD,className:"skeleton w-fit",children:"Lorem ipsum"}),(0,p.jsx)(m.Text,{level:h.TextLevels.TWO,typo:x.TypographyBold.TEXT_WEIGHT_SEMIBOLD,className:"skeleton",children:"Lorem ipsum dolor sit amet, consectetur adipiscing elit."})]})}),(0,p.jsx)(ek.RadioTile,{horizontal:!0,name:"paymentMethod",disabled:!0,description:(0,p.jsxs)("div",{children:[(0,p.jsx)(m.Text,{level:h.TextLevels.TWO,typo:x.TypographyBold.TEXT_WEIGHT_SEMIBOLD,className:"skeleton w-fit",children:"Lorem ipsum"}),(0,p.jsx)(m.Text,{level:h.TextLevels.TWO,typo:x.TypographyBold.TEXT_WEIGHT_SEMIBOLD,className:"skeleton",children:"Lorem ipsum dolor sit amet, consectetur adipiscing elit."})]})})]})]}),(0,p.jsxs)(j.FlexItem,{size:{desktop:8,widescreen:6},children:[(0,p.jsx)(eu.Title,{level:ed.TitleLevels.FIVE,className:"skeleton w-fit",children:"Sélectionnez votre moyen de paiement :"}),(0,p.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:4,mobile:!0,children:[(0,p.jsx)(ek.RadioTile,{horizontal:!0,name:"paymentMethod",disabled:!0,description:(0,p.jsxs)("div",{children:[(0,p.jsx)(m.Text,{level:h.TextLevels.TWO,typo:x.TypographyBold.TEXT_WEIGHT_SEMIBOLD,className:"skeleton w-fit",children:"Lorem ipsum"}),(0,p.jsx)(m.Text,{level:h.TextLevels.TWO,typo:x.TypographyBold.TEXT_WEIGHT_SEMIBOLD,className:"skeleton",children:"Lorem ipsum dolor sit amet, consectetur adipiscing elit."})]})}),(0,p.jsx)(ek.RadioTile,{horizontal:!0,name:"paymentMethod",disabled:!0,description:(0,p.jsxs)("div",{children:[(0,p.jsx)(m.Text,{level:h.TextLevels.TWO,typo:x.TypographyBold.TEXT_WEIGHT_SEMIBOLD,className:"skeleton w-fit",children:"Lorem ipsum"}),(0,p.jsx)(m.Text,{level:h.TextLevels.TWO,typo:x.TypographyBold.TEXT_WEIGHT_SEMIBOLD,className:"skeleton",children:"Lorem ipsum dolor sit amet, consectetur adipiscing elit."})]})})]})]})]})}function to({formUrl:e,formData:t}){let r=(0,B.useRef)(null);return(0,B.useEffect)(()=>{r.current?.submit()},[]),(0,p.jsx)("form",{ref:r,method:"POST",action:e,children:Object.entries(t).map(([e,t])=>(0,p.jsx)("input",{type:"hidden",name:e,value:t},e))})}function ta(){let[e,t]=(0,B.useState)(null);return{pspFormPost:e,handleOrderRedirect:e=>{"redirect"===e.type?window.location.href=e.url:t({formUrl:e.formUrl,formData:e.formData})}}}e.s([],180073),e.s(["PspRedirect",0,to],764858),e.s(["usePspRedirect",0,ta
3],793140);var tl=e.i(499329),tc=e.i(849524),tu=e.i(945168),td="5.1.0";function tp(e,t){return new Promise(r=>setTimeout(r,e,t))}function tm(e){return!!e&&"function"==typeof e.then}function th(e,t){try{let r=e();tm(r)?r.then(e=>t(!0,e),e=>t(!1,e)):t(!0,r)}catch(e){t(!1,e)}}async function tg(e,t,r=16){let i=Array(e.length),n=Date.now();for(let s=0;s<e.length;++s){i[s]=t(e[s],s);let o=Date.now();o>=n+r&&(n=o,await new Promise(e=>{let t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(null)}))}return i}function tx(e){return e.then(void 0,()=>void 0),e}function tf(e){return parseInt(e)}function ty(e){return parseFloat(e)}function tT(e,t){return"number"==typeof e&&isNaN(e)?t:e}function tv(e){return e.reduce((e,t)=>e+ +!!t,0)}function tb(e,t=1){if(Math.abs(t)>=1)return Math.round(e/t)*t;{let r=1/t;return Math.round(e*r)/r}}function tE(e,t){let r=e[0]>>>16,i=65535&e[0],n=e[1]>>>16,s=65535&e[1],o=t[0]>>>16,a=65535&t[0],l=t[1]>>>16,c=65535&t[1],u=0,d=0,p,m;p=0+((m=0+(s+c))>>>16),m&=65535,p+=n+l,d+=p>>>16,p&=65535,d+=i+a,u+=d>>>16,d&=65535,u+=r+o,u&=65535,e[0]=u<<16|d,e[1]=p<<16|m}function tC(e,t){let r=e[0]>>>16,i=65535&e[0],n=e[1]>>>16,s=65535&e[1],o=t[0]>>>16,a=65535&t[0],l=t[1]>>>16,c=65535&t[1],u=0,d=0,p,m;p=0+((m=0+s*c)>>>16),m&=65535,p+=n*c,d+=p>>>16,p&=65535,p+=s*l,d+=p>>>16,p&=65535,d+=i*c,u+=d>>>16,d&=65535,d+=n*l,u+=d>>>16,d&=65535,d+=s*a,u+=d>>>16,d&=65535,u+=r*c+i*l+n*a+s*o,u&=65535,e[0]=u<<16|d,e[1]=p<<16|m}function tj(e,t){let r=e[0];32==(t%=64)?(e[0]=e[1],e[1]=r):t<32?(e[0]=r<<t|e[1]>>>32-t,e[1]=e[1]<<t|r>>>32-t):(t-=32,e[0]=e[1]<<t|r>>>32-t,e[1]=r<<t|e[1]>>>32-t)}function tI(e,t){0==(t%=64)||(t<32?(e[0]=e[1]>>>32-t,e[1]=e[1]<<t):(e[0]=e[1]<<t-32,e[1]=0))}function t_(e,t){e[0]^=t[0],e[1]^=t[1]}let tS=[0xff51afd7,0xed558ccd],tA=[0xc4ceb9fe,0x1a85ec53];function tL(e){let t=[0,e[0]>>>1];t_(e,t),tC(e,tS),t[1]=e[0]>>>1,t_(e,t),tC(e,tA),t[1]=e[0]>>>1,t_(e,t)}let tF=[0x87c37b91,0x114253d5],tk=[0x4cf5ad43,0x2745937f],tN=[0,5],tM=[0,0x52dce729],tO=[0,0x38495ab5];function tR(){let e=window,t=navigator;return tv(["MSCSSMatrix"in e,"msSetImmediate"in e,"msIndexedDB"in e,"msMaxTouchPoints"in t,"msPointerEnabled"in t])>=4}function tD(){let e=window,t=navigator;return tv(["webkitPersistentStorage"in t,"webkitTemporaryStorage"in t,0===(t.vendor||"").indexOf("Google"),"webkitResolveLocalFileSystemURL"in e,"BatteryManager"in e,"webkitMediaStream"in e,"webkitSpeechGrammar"in e])>=5}function tw(){let e=window;return tv(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,0===navigator.vendor.indexOf("Apple"),"RGBColor"in e,"WebKitMediaKeys"in e])>=4}function tP(){let e=window,{HTMLElement:t,Document:r}=e;return tv(["safari"in e,!("ongestureend"in e),!("TouchEvent"in e),!("orientation"in e),t&&!("autocapitalize"in t.prototype),r&&"pointerLockElement"in r.prototype])>=4}function tB(){var e;let t=window;return e=t.print,/^function\s.*?\{\s*\[native code]\s*}$/.test(String(e))&&"[object WebPageNamespace]"===String(t.browser)}function tz(){var e,t;let r=window;return tv(["buildID"in navigator,"MozAppearance"in(null!=(t=null==(e=document.documentElement)?void 0:e.style)?t:{}),"onmozfullscreenchange"in r,"mozInnerScreenX"in r,"CSSMozDocumentRule"in r,"CanvasCaptureMediaStream"in r])>=4}function tV(){let{CSS:e}=window;return tv([e.supports("selector(::details-content)"),e.supports("selector(::before::marker)"),e.supports("selector(::after::marker)"),!("locale"in CompositionEvent.prototype)])>=3}function tW(){let e=window,{CSS:t,HTMLButtonElement:r}=e;return tv([!("getStorageUpdates"in navigator),r&&"popover"in r.prototype,"CSSCounterStyleRule"in e,t.supports("font-size-adjust: ex-height 0.5"),t.supports("text-transform: full-width")])>=4}function tU(){let e=tD(),t=tz(),r=window,i=navigator,n="connection";return e?tv([!("SharedWorker"in r),i[n]&&"ontypechange"in i[n],!("sinkId"in new Audio)])>=2:!!t&&tv(["onorientationchange"in r,"orientation"in r,/android/i.test(i.appVersion)])>=2}function tH(e){let t=Error(e);return t.name=e,t}async function tG(e,t,r=50){var i,n,s;let o=document;for(;!o.body;)await tp(r);let a=o.createElement("iframe");try{for(await new Promise((e,r)=>{let i=!1,n=()=>
3{i=!0,e()};a.onload=n,a.onerror=e=>{i=!0,r(e)};let{style:s}=a;s.setProperty("display","block","important"),s.position="absolute",s.top="0",s.left="0",s.visibility="hidden",t&&"srcdoc"in a?a.srcdoc=t:a.src="about:blank",o.body.appendChild(a);let l=()=>{var e,t;i||((null==(t=null==(e=a.contentWindow)?void 0:e.document)?void 0:t.readyState)==="complete"?n():setTimeout(l,10))};l()});!(null==(n=null==(i=a.contentWindow)?void 0:i.document)?void 0:n.body);)await tp(r);return await e(a,a.contentWindow)}finally{null==(s=a.parentNode)||s.removeChild(a)}}let tq=["monospace","sans-serif","serif"],t$=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"];function tJ(e){return e.toDataURL()}function tX(){let e=screen;return[tT(ty(e.availTop),null),tT(ty(e.width)-ty(e.availWidth)-tT(ty(e.availLeft),0),null),tT(ty(e.height)-ty(e.availHeight)-tT(ty(e.availTop),0),null),tT(ty(e.availLeft),null)]}function tY(e){for(let t=0;t<4;++t)if(e[t])return!1;return!0}async function tZ({debug:e}={}){let t;if(!(tw()||tU()))return;let r={abpIndo:["#Iklan-Melayang","#Kolom-Iklan-728","#SidebarIklan-wrapper",'[title="ALIENBOLA" i]',(t=atob)("I0JveC1CYW5uZXItYWRz")],abpvn:[".quangcao","#mobileCatfish",t("LmNsb3NlLWFkcw=="),'[id^="bn_bottom_fixed_"]',"#pmadv"],adBlockFinland:[".mainostila",t("LnNwb25zb3JpdA=="),".ylamainos",t("YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd"),t("YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZHBlYWsuY29tL2FkcyJd")],adBlockPersian:["#navbar_notice_50",".kadr",'TABLE[width="140px"]',"#divAgahi",t("YVtocmVmXj0iaHR0cDovL2cxLnYuZndtcm0ubmV0L2FkLyJd")],adBlockWarningRemoval:["#adblock-honeypot",".adblocker-root",".wp_adblock_detect",t("LmhlYWRlci1ibG9ja2VkLWFk"),t("I2FkX2Jsb2NrZXI=")],adGuardAnnoyances:[".hs-sosyal","#cookieconsentdiv",'div[class^="app_gdpr"]',".as-oil",'[data-cypress="soft-push-notification-modal"]'],adGuardBase:[".BetterJsPopOverlay",t("I2FkXzMwMFgyNTA="),t("I2Jhbm5lcmZsb2F0MjI="),t("I2NhbXBhaWduLWJhbm5lcg=="),t("I0FkLUNvbnRlbnQ=")],adGuardChinese:[t("LlppX2FkX2FfSA=="),t("YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd"),"#widget-quan",t("YVtocmVmKj0iLzg0OTkyMDIwLnh5eiJd"),t("YVtocmVmKj0iLjE5NTZobC5jb20vIl0=")],adGuardFrench:["#pavePub",t("LmFkLWRlc2t0b3AtcmVjdGFuZ2xl"),".mobile_adhesion",".widgetadv",t("LmFkc19iYW4=")],adGuardGerman:['aside[data-portal-id="leaderboard"]'],adGuardJapanese:["#kauli_yad_1",t("YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0="),t("Ll9wb3BJbl9pbmZpbml0ZV9hZA=="),t("LmFkZ29vZ2xl"),t("Ll9faXNib29zdFJldHVybkFk")],adGuardMobile:[t("YW1wLWF1dG8tYWRz"),t("LmFtcF9hZA=="),'amp-embed[type="24smi"]',"#mgid_iframe1",t("I2FkX2ludmlld19hcmVh")],adGuardRussian:[t("YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0="),t("LnJlY2xhbWE="),'div[id^="smi2adblock"]',t("ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd"),"#psyduckpockeball"],adGuardSocial:[t("YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0="),t("YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0="),".etsy-tweet","#inlineShare",".popup-social"],adGuardSpanishPortuguese:["#barraPublicidade","#Publicidade","#publiEspecial","#queTooltip",".cnt-publi"],adGuardTrackingProtection:["#qoo-counter",t("YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ=="),t("YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0="),t("YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ=="),"#top100counter"],adGuardTurkish:["#backkapat",t("I3Jla2xhbWk="),t("YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0="),t("YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd"),t("YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ==")],bulgarian:[t("dGQjZnJlZW5ldF90YWJsZV9hZHM="),"#ea_intext_div",".lapni-pop-over","#xenium_hot_offers"],easyList:[".yb-floorad",t("LndpZGdldF9wb19hZHNfd2lkZ2V0"),t("LnRyYWZmaWNqdW5reS1hZA=="),".textad_headline",t("LnNwb25zb3JlZC10ZXh0LWxpbmtz")],easyListChina:[t("LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ=="),t("LmZyb250cGFnZUFkdk0="),"#taotaole","#aafoot.top_box",".cfa_popup"],easyListCookie
vendor: 3,598 bytes, line 3
3:[".ezmob-footer",".cc-CookieWarning","[data-cookie-number]",t("LmF3LWNvb2tpZS1iYW5uZXI="),".sygnal24-gdpr-modal-wrap"],easyListCzechSlovak:["#onlajny-stickers",t("I3Jla2xhbW5pLWJveA=="),t("LnJla2xhbWEtbWVnYWJvYXJk"),".sklik",t("W2lkXj0ic2tsaWtSZWtsYW1hIl0=")],easyListDutch:[t("I2FkdmVydGVudGll"),t("I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw=="),".adstekst",t("YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0="),"#semilo-lrectangle"],easyListGermany:["#SSpotIMPopSlider",t("LnNwb25zb3JsaW5rZ3J1ZW4="),t("I3dlcmJ1bmdza3k="),t("I3Jla2xhbWUtcmVjaHRzLW1pdHRl"),t("YVtocmVmXj0iaHR0cHM6Ly9iZDc0Mi5jb20vIl0=")],easyListItaly:[t("LmJveF9hZHZfYW5udW5jaQ=="),".sb-box-pubbliredazionale",t("YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd"),t("YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG1sLml0LyJd"),t("YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ==")],easyListLithuania:[t("LnJla2xhbW9zX3RhcnBhcw=="),t("LnJla2xhbW9zX251b3JvZG9z"),t("aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd"),t("aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd"),t("aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd")],estonian:[t("QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==")],fanboyAnnoyances:["#ac-lre-player",".navigate-to-top","#subscribe_popup",".newsletter_holder","#back-top"],fanboyAntiFacebook:[".util-bar-module-firefly-visible"],fanboyEnhancedTrackers:[".open.pushModal","#issuem-leaky-paywall-articles-zero-remaining-nag","#sovrn_container",'div[class$="-hide"][zoompage-fontsize][style="display: block;"]',".BlockNag__Card"],fanboySocial:["#FollowUs","#meteored_share","#social_follow",".article-sharer",".community__social-desc"],frellwitSwedish:[t("YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ=="),t("YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiXQ=="),"article.category-samarbete",t("ZGl2LmhvbGlkQWRz"),"ul.adsmodern"],greekAdBlock:[t("QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd"),t("QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ=="),t("QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd"),"DIV.agores300","TABLE.advright"],hungarian:["#cemp_doboz",".optimonk-iframe-container",t("LmFkX19tYWlu"),t("W2NsYXNzKj0iR29vZ2xlQWRzIl0="),"#hirdetesek_box"],iDontCareAboutCookies:['.alert-info[data-block-track*="CookieNotice"]',".ModuleTemplateCookieIndicator",".o--cookies--container","#cookies-policy-sticky","#stickyCookieBar"],icelandicAbp:[t("QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ==")],latvian:[t("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0OiA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0="),t("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6IDMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==")],listKr:[t("YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0="),t("I2xpdmVyZUFkV3JhcHBlcg=="),t("YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ=="),t("aW5zLmZhc3R2aWV3LWFk"),".revenue_unit_item.dable"],listeAr:[t("LmdlbWluaUxCMUFk"),".right-and-left-sponsers",t("YVtocmVmKj0iLmFmbGFtLmluZm8iXQ=="),t("YVtocmVmKj0iYm9vcmFxLm9yZyJd"),t("YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd")],listeFr:[t("YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ=="),t("I2FkY29udGFpbmVyX3JlY2hlcmNoZQ=="),t("YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0="),".site-pub-interstitiel",'div[id^="crt-"][data-criteo-id]'],officialPolish:["#ceneo-placeholder-ceneo-12",t("W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd"),t("YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ=="),t("YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiX
3Q=="),t("ZGl2I3NrYXBpZWNfYWQ=")],ro:[t("YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd"),t("YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd"),t("YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0="),t("YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd"),'a[href^="/url/"]'],ruAd:[t("YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd"),t("YVtocmVmKj0iLy91dGltZy5ydS8iXQ=="),t("YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0="),"#pgeldiz",".yandex-rtb-block"],thaiAds:["a[href*=macau-uta-popup]",t("I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA=="),t("LmFkczMwMHM="),".bumq",".img-kosana"],webAnnoyancesUltralist:["#mod-social-share-2","#social-tools",t("LmN0cGwtZnVsbGJhbm5lcg=="),".zergnet-recommend",".yt.btn-link.btn-md.btn"]},i=Object.keys(r),n=[].concat(...i.map(e=>r[e])),s=await tQ(n);e&&function(e,t){let r="DOM blockers debug:\n```";for(let i of Object.keys(e))for(let n of(r+=` 4${i}:`,e[i]))r+=` 5 ${t[n]?"ð«":"â¡ï¸"} ${n}`;console.log(`${r} 6\`\`\``)}(r,s);let o=i.filter(e=>{let t=r[e];return tv(t.map(e=>s[e]))>.6*t.length});return o.sort(),o}async function tQ(e){var t;let r=document,i=r.createElement("div"),n=Array(e.length),s={};tK(i);for(let t=0;t<e.length;++t){let s=function(e){let[t,r]=function(e){var t,r;let i=`Unexpected syntax '${e}'`,n=/^\s*([a-z-]*)(.*)$/i.exec(e),s=n[1]||void 0,o={},a=/([.:#][\w-]+|\[.+?\])/gi,l=(e,t)=>{o[e]=o[e]||[],o[e].push(t)};for(;;){let e=a.exec(n[2]);if(!e)break;let s=e[0];switch(s[0]){case".":l("class",s.slice(1));break;case"#":l("id",s.slice(1));break;case"[":{let e=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(s);if(e)l(e[1],null!=(r=null!=(t=e[4])?t:e[5])?r:"");else throw Error(i);break}default:throw Error(i)}}return[s,o]}(e),i=document.createElement(null!=t?t:"div");for(let e of Object.keys(r)){let t=r[e].join(" ");"style"===e?function(e,t){for(let r of t.split(";")){let t=/^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(r);if(t){let[,r,i,,n]=t;e.setProperty(r,i,n||"")}}}(i.style,t):i.setAttribute(e,t)}return i}(e[t]);"DIALOG"===s.tagName&&s.show();let o=r.createElement("div");tK(o),o.appendChild(s),i.appendChild(o),n[t]=s}for(;!r.body;)await tp(50);r.body.appendChild(i);try{for(let t=0;t<e.length;++t)n[t].offsetParent||(s[e[t]]=!0)}finally{null==(t=i.parentNode)||t.removeChild(i)}return s}function tK(e){e.style.setProperty("visibility","hidden","important"),e.style.setProperty("display","block","important")}function t0(e){return matchMedia(`(inverted-colors: ${e})`).matches}function t1(e){return matchMedia(`(forced-colors: ${e})`).matches}function t2(e){return matchMedia(`(prefers-contrast: ${e})`).matches}function t3(e){return matchMedia(`(prefers-reduced-motion: ${e})`).matches}function t5(e){return matchMedia(`(prefers-reduced-transparency: ${e})`).matches}function t9(e){return matchMedia(`(dynamic-range: ${e})`).matches}let t4=Math,t6=()=>0,t8={default:[],apple:[{font:"-apple-system-body"}],serif:[{fontFamily:"serif"}],sans:[{fontFamily:"sans-serif"}],mono:[{fontFamily:"monospace"}],min:[{fontSize:"1px"}],system:[{fontFamily:"system-ui"}]},t7=function(){let e=window;for(;;){let t=e.parent;if(!t||t===e)return!1;try{if(t.location.origin!==e.location.origin)return!0}catch(e){if(e instanceof Error&&"SecurityError"===e.name)return!0;throw e}e=t}},re=new Set([10752,2849,2884,2885,2886,2928,2929,2930,2931,2932,2960,2961,2962,2963,2964,2965,2966,2967,2968,2978,3024,3042,3088,3089,3106,3107,32773,32777,32777,32823,32824,32936,32937,32938,32939,32968,32969,32970,32971,3317,33170,3333,3379,3386,33901,33902,34016,34024,34076,3408,3410,3411,3412,3413,3414,3415,34467,34816,34817,34818,34819,34877,34921,34930,35660,35661,35724,35738,35739,36003,36004,36005,36347,36348,36349,37440,37441,37443,7936,7937,7938]),rt=new Set([34047,35723,36063,34852,34853,34854,34229,36392,36795,38449]),rr=["FRAGMENT_SHADER","VERTEX_SHADER"],ri=["LOW_FLOAT","MEDIUM_FLOAT","HIGH_FLOAT","LOW_INT","MEDIUM_INT","HIGH_INT"],rn="WEBGL_debug_renderer_info";function rs(e){let t;if(e.webgl)return e.webgl.context;let r=document.createElement("canvas");for(let e of(r.addEventListener("webglCreateContextError",()=>t=void 0),["webgl","experimental-webgl"])){try{t=r.getContext(e)}catch(e){}if(t)break}return e.webgl={context:t},t}function ro(e){return Object.keys(e.__proto__).filter(ra)}function ra(e){return"string"==typeof e&&!e.match(/[^A-Z0-9_x]/)}function rl(e){return"function"==typeof e.getParameter}let rc={fonts:function(){return tG(async(e,{document:t})=>{let r=t.body;r.style.fontSize="48px";let i=t.createElement("div");i.style.setProperty("visibility","hidden","important");let n={},s={},o=e=>{let r=t.createElement("span"),{style:n}=r;return n.position="absolute",n.top="0",n.left="0",n.fontFamily=e,r.textContent="mmMwWLliI0O&1",i.appendChild(r),r},a=(e,t)=>o(`'${e}',${t}`),l=tq.map(o),c=(()=>{let e={};for(let t of t$)e[t]=tq.map(e=>a(t,e));return e})();r.appendChild(i);for(let e=0;e<tq.length;e++)n[tq[e]]=l[e].offsetWidth,s[tq[e]]=l[e].offsetHeight;
6return t$.filter(e=>{let t;return t=c[e],tq.some((e,r)=>t[r].offsetWidth!==n[e]||t[r].offsetHeight!==s[e])})})},domBlockers:tZ,fontPreferences:function(){return function(e,t=4e3){return tG((r,i)=>{let n=i.document,s=n.body,o=s.style;o.width=`${t}px`,o.webkitTextSizeAdjust=o.textSizeAdjust="none",tD()?s.style.zoom=`${1/i.devicePixelRatio}`:tw()&&(s.style.zoom="reset");let a=n.createElement("div");return a.textContent=[...Array(t/20|0)].map(()=>"word").join(" "),s.appendChild(a),e(n,s)},'<!doctype html><html><head><meta name="viewport" content="width=device-width, initial-scale=1">')}((e,t)=>{let r={},i={};for(let i of Object.keys(t8)){let[n={},s="mmMwWLliI0fiflO&1"]=t8[i],o=e.createElement("span");for(let e of(o.textContent=s,o.style.whiteSpace="nowrap",Object.keys(n))){let t=n[e];void 0!==t&&(o.style[e]=t)}r[i]=o,t.append(e.createElement("br"),o)}for(let e of Object.keys(t8))i[e]=r[e].getBoundingClientRect().width;return i})},audio:function(){return tw()&&tW()&&tB()||tD()&&function(){let e=navigator,t=window,r=Audio.prototype,{visualViewport:i}=t;return tv(["srLatency"in r,"srChannelCount"in r,"devicePosture"in e,i&&"segments"in i,"getTextInformation"in Image.prototype])>=3}()&&function(){let e=window,{URLPattern:t}=e;return tv(["union"in Set.prototype,"Iterator"in e,t&&"hasRegExpGroups"in t.prototype,"RGB8"in WebGLRenderingContext.prototype])>=3}()?-4:function(){var e;let t,r,i=window,n=i.OfflineAudioContext||i.webkitOfflineAudioContext;if(!n)return -2;if(tw()&&!tP()&&!(tv(["DOMRectList"in(t=window),"RTCPeerConnectionIceEvent"in t,"SVGGeometryElement"in t,"ontransitioncancel"in t])>=3))return -1;let s=new n(1,5e3,44100),o=s.createOscillator();o.type="triangle",o.frequency.value=1e4;let a=s.createDynamicsCompressor();a.threshold.value=-50,a.knee.value=40,a.ratio.value=12,a.attack.value=0,a.release.value=.25,o.connect(a),a.connect(s.destination),o.start(0);let[l,c]=(e=s,r=()=>void 0,[new Promise((t,i)=>{let n=!1,s=0,o=0;e.oncomplete=e=>t(e.renderedBuffer);let a=()=>{setTimeout(()=>i(tH("timeout")),Math.min(500,o+5e3-Date.now()))},l=()=>{try{let t=e.startRendering();switch(tm(t)&&tx(t),e.state){case"running":o=Date.now(),n&&a();break;case"suspended":!document.hidden&&s++,n&&s>=3?i(tH("suspended")):setTimeout(l,500)}}catch(e){i(e)}};l(),r=()=>{!n&&(n=!0,o>0&&a())}}),r]),u=tx(l.then(e=>(function(e){let t=0;for(let r=0;r<e.length;++r)t+=Math.abs(e[r]);return t})(e.getChannelData(0).subarray(4500)),e=>{if("timeout"===e.name||"suspended"===e.name)return -3;throw e}));return()=>(c(),u)}()},screenFrame:function(){let e=tw()&&tW()&&tB(),i=tz()&&tV();if(e||i)return()=>Promise.resolve(void 0);let n=(!function(){if(void 0!==r)return;let e=()=>{let i=tX();tY(i)?r=setTimeout(e,2500):(t=i,r=void 0)};e()}(),async()=>{let e=tX();if(tY(e)){let r;if(t)return[...t];if((r=document).fullscreenElement||r.msFullscreenElement||r.mozFullScreenElement||r.webkitFullscreenElement){let t;await ((t=document).exitFullscreen||t.msExitFullscreen||t.mozCancelFullScreen||t.webkitExitFullscreen).call(t),e=tX()}}return tY(e)||(t=e),e});return async()=>{let e=await n(),t=e=>null===e?null:tb(e,10);return[t(e[0]),t(e[1]),t(e[2]),t(e[3])]}},canvas:function(){let e,t;return function(e){var t,r,i,n,s,o;let a,l,c,u,d,p=!1,[m,h]=((a=document.createElement("canvas")).width=1,a.height=1,[a,a.getContext("2d")]);return(t=m,h&&t.toDataURL)?((r=h).rect(0,0,10,10),r.rect(2,2,6,6),p=!r.isPointInPath(5,5,"evenodd"),e?u=d="skipped":[u,d]=(i=m,n=h,s=i,o=n,s.width=240,s.height=60,o.textBaseline="alphabetic",o.fillStyle="#f60",o.fillRect(100,1,62,20),o.fillStyle="#069",o.font='11pt "Times New Roman"',l=`Cwm fjordbank gly ${String.fromCharCode(55357,56835)}`,o.fillText(l,2,15),o.fillStyle="rgba(102, 204, 0, 0.2)",o.font="18pt Arial",o.fillText(l,4,45),(c=tJ(i))!==tJ(i)?["unstable","unstable"]:(function(e,t){for(let[r,i,n]of(e.width=122,e.height=110,t.globalCompositeOperation="multiply",[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]]))t.fillStyle=r,t.beginPath(),t.arc(i,n,40,0,2*Math.PI,!0),t.closePath(),t.fill();t.fillStyle="#f9c",t.arc(60,60,60,0,2*Math.PI,!0),t.arc(60,60,20,0,2*Math.PI,!0),t.fill("evenodd")}(i,n),[tJ(i),c]))):u=d="unsupported",{winding:p,geometry:u,text:d}}((e=tw()&&tW()&&tB(),t=tz()&&function(){let e=navigator,{CSS:t}=window;return tv(["userActivation"in e,t.supports("color","light-dark(#000, #fff)"),t.supports("height","1lh"),"globalPrivacyControl"in e])>=3}(),e||t))},osCpu:function(){return navigator.oscpu},languages:function(){let e=navigator,t=[],r=e.language||e.userLanguage||e.browserLanguage||e.systemLanguage;
6if(void 0!==r&&t.push([r]),Array.isArray(e.languages)){let r;tD()&&tv([!("MediaSettingsRange"in(r=window)),"RTCEncodedAudioFrame"in r,""+r.Intl=="[object Intl]",""+r.Reflect=="[object Reflect]"])>=3||t.push(e.languages)}else if("string"==typeof e.languages){let r=e.languages;r&&t.push(r.split(","))}return t},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return tT(ty(navigator.deviceMemory),void 0)},screenResolution:function(){if(!(tw()&&tW()&&tB())){let e,t;return(t=[tT(tf((e=screen).width),null),tT(tf(e.height),null)]).sort().reverse(),t}},hardwareConcurrency:function(){let e=tT(tf(navigator.hardwareConcurrency),void 0);return void 0!==e&&tz()&&tV()?e>=8?8:4:e},timezone:function(){var e;let t,r=null==(e=window.Intl)?void 0:e.DateTimeFormat;if(r){let e=new r().resolvedOptions().timeZone;if(e)return e}let i=-Math.max(ty(new Date(t=new Date().getFullYear(),0,1).getTimezoneOffset()),ty(new Date(t,6,1).getTimezoneOffset()));return`UTC${i>=0?"+":""}${i}`},sessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},localStorage:function(){try{return!!window.localStorage}catch(e){return!0}},indexedDB:function(){let e,t;if(!(tR()||tv(["msWriteProfilerMark"in(e=window),"MSStream"in e,"msLaunchUri"in(t=navigator),"msSaveBlob"in t])>=3&&!tR()))try{return!!window.indexedDB}catch(e){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){let{platform:e}=navigator;return"MacIntel"===e&&tw()&&!tP()?!function(){if("iPad"===navigator.platform)return!0;let e=screen,t=e.width/e.height;return tv(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,t>.65&&t<1.53])>=2}()?"iPhone":"iPad":e},plugins:function(){let e=navigator.plugins;if(!e)return;let t=[];for(let r=0;r<e.length;++r){let i=e[r];if(!i)continue;let n=[];for(let e=0;e<i.length;++e){let t=i[e];n.push({type:t.type,suffixes:t.suffixes})}t.push({name:i.name,description:i.description,mimeTypes:n})}return t},touchSupport:function(){let e,t=navigator,r=0;void 0!==t.maxTouchPoints?r=tf(t.maxTouchPoints):void 0!==t.msMaxTouchPoints&&(r=t.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(t){e=!1}return{maxTouchPoints:r,touchEvent:e,touchStart:"ontouchstart"in window}},vendor:function(){return navigator.vendor||""},vendorFlavors:function(){let e=[];for(let t of["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"]){let r=window[t];r&&"object"==typeof r&&e.push(t)}return e.sort()},cookiesEnabled:function(){let e=document;try{e.cookie="cookietest=1; SameSite=Strict;";let t=-1!==e.cookie.indexOf("cookietest=");return e.cookie="cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT",t}catch(e){return!1}},colorGamut:function(){for(let e of["rec2020","p3","srgb"])if(matchMedia(`(color-gamut: ${e})`).matches)return e},invertedColors:function(){return!!t0("inverted")||!t0("none")&&void 0},forcedColors:function(){return!!t1("active")||!t1("none")&&void 0},monochrome:function(){if(matchMedia("(min-monochrome: 0)").matches){for(let e=0;e<=100;++e)if(matchMedia(`(max-monochrome: ${e})`).matches)return e;throw Error("Too high value")}},contrast:function(){return t2("no-preference")?0:t2("high")||t2("more")?1:t2("low")||t2("less")?-1:t2("forced")?10:void 0},reducedMotion:function(){return!!t3("reduce")||!t3("no-preference")&&void 0},reducedTransparency:function(){return!!t5("reduce")||!t5("no-preference")&&void 0},hdr:function(){return!!t9("high")||!t9("standard")&&void 0},math:function(){let e=t4.acos||t6,t=t4.acosh||t6,r=t4.asin||t6,i=t4.asinh||t6,n=t4.atanh||t6,s=t4.atan||t6,o=t4.sin||t6,a=t4.sinh||t6,l=t4.cos||t6,c=t4.cosh||t6,u=t4.tan||t6,d=t4.tanh||t6,p=t4.exp||t6,m=t4.expm1||t6,h=t4.log1p||t6;return{acos:e(.12312423423423424),acosh:t(1e308),acoshPf:t4.log(1e154+t4.sqrt(1e154*1e154-1)),asin:r(.12312423423423424),asinh:i(1),asinhPf:t4.log(1+t4.sqrt(2)),atanh:n(.5),atanhPf:t4.log(3)/2,atan:s(.5),sin:o(-1e300),sinh:a(1),sinhPf:t4.exp(1)-1/t4.exp(1)/2,cos:l(10.000000000123),cosh:c(1),coshPf:(t4.exp(1)+1/t4.exp(1))/2,tan:u(-1e300),tanh:d(1),tanhPf:(t4.exp(2)-1)/(t4.exp(2)+1),exp:p(1),expm1:m(1),expm1Pf:t4.exp(1)-1,log1p:h(10),log1pPf:t4.log(11),powPI:t4.pow(t4.PI,-100)}},pdfViewerEnabled:function(){return navigator.pdfViewerEnabled},architecture:function(){let e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],t[3]},applePay:function(){let{ApplePaySession:e}=window;if("function"!=typeof(null==e?void 0:e.canMakePayments))return -1;if(t7())return -3;try{return+!!e.canMakePayments()}catch(e){var t=e;if(t instanceof Error&&"InvalidAccessError"===t.name&&/\bfrom\b.*\binsecure\b/i.test(t.message))return -2;throw t}},privateClickMeasurement:function(){var e;let t=document.createElement("a"),r=null!=(e=t.attributionSourceId)?e:t.attributionsourceid;return void 0===r?void 0:String(r)},audioBaseLatency:function(){if(!(tU()||tw()))return -2;if(!window.AudioContext)return -1;let e=new AudioContext().baseLatency;return null==e?-1:isFinite(e)?e:-3},dateTimeLocale:function(){if(!window.Intl)return -1;let e=window.Intl.DateTimeFormat;if(!e)return -2;let t=e().resolvedOptions().locale;return t||""===t?t:-3}
6,webGlBasics:function({cache:e}){var t,r,i,n,s,o;let a=rs(e);if(!a)return -1;if(!rl(a))return -2;let l=tz()?null:a.getExtension(rn);return{version:(null==(t=a.getParameter(a.VERSION))?void 0:t.toString())||"",vendor:(null==(r=a.getParameter(a.VENDOR))?void 0:r.toString())||"",vendorUnmasked:l?null==(i=a.getParameter(l.UNMASKED_VENDOR_WEBGL))?void 0:i.toString():"",renderer:(null==(n=a.getParameter(a.RENDERER))?void 0:n.toString())||"",rendererUnmasked:l?null==(s=a.getParameter(l.UNMASKED_RENDERER_WEBGL))?void 0:s.toString():"",shadingLanguageVersion:(null==(o=a.getParameter(a.SHADING_LANGUAGE_VERSION))?void 0:o.toString())||""}},webGlExtensions:function({cache:e}){let t=rs(e);if(!t)return -1;if(!rl(t))return -2;let r=t.getSupportedExtensions(),i=t.getContextAttributes(),n=[],s=[],o=[],a=[],l=[];if(i)for(let e of Object.keys(i))s.push(`${e}=${i[e]}`);for(let e of ro(t)){let r=t[e];o.push(`${e}=${r}${re.has(r)?`=${t.getParameter(r)}`:""}`)}if(r)for(let e of r){if(e===rn&&tz()||"WEBGL_polygon_mode"===e&&(tD()||tw()))continue;let r=t.getExtension(e);if(!r){n.push(e);continue}for(let e of ro(r)){let i=r[e];a.push(`${e}=${i}${rt.has(i)?`=${t.getParameter(i)}`:""}`)}}for(let e of rr)for(let r of ri){let i=function(e,t,r){let i=e.getShaderPrecisionFormat(e[t],e[r]);return i?[i.rangeMin,i.rangeMax,i.precision]:[]}(t,e,r);l.push(`${e}.${r}=${i.join(",")}`)}return a.sort(),o.sort(),{contextAttributes:s,parameters:o,shaderPrecisions:l,extensions:r,extensionParameters:a,unsupportedExtensions:n}}};var ru=async function(e={}){var t,r,i;let n,s,o,{delayFallback:a,debug:l,monitoring:c=!0}=e;return c&&function(){if(!(window.__fpjs_d_m||Math.random()>=.001))try{let e=new XMLHttpRequest;e.open("get",`https://m1.openfpcdn.io/fingerprintjs/v${td}/npm-monitoring`,!0),e.send()}catch(e){console.error(e)}}(),await function(e=50){return function(e,t=1/0){let{requestIdleCallback:r}=window;return r?new Promise(e=>r.call(window,()=>e(),{timeout:t})):tp(Math.min(e,t))}(e,2*e)}(a),t={cache:{},debug:l},r=[],s=tx(tg(n=Object.keys(rc).filter(e=>!function(e,t){for(let r=0,i=e.length;r<i;++r)if(e[r]===t)return!0;return!1}(r,e)),e=>{var r;let i;return r=rc[e],i=tx(new Promise(e=>{let i=Date.now();th(r.bind(null,t),(...t)=>{let r=Date.now()-i;if(!t[0])return e(()=>({error:t[1],duration:r}));let n=t[1];if("function"!=typeof n)return e(()=>({value:n,duration:r}));e(()=>new Promise(e=>{let t=Date.now();th(n,(...i)=>{let n=r+Date.now()-t;if(!i[0])return e({error:i[1],duration:n});e({value:i[1],duration:n})})}))})})),function(){return i.then(e=>e())}},void 0)),i=async function(){let e=await s,t=await tg(e,e=>tx(e()),void 0),r=await Promise.all(t),i={};for(let e=0;e<n.length;++e)i[n[e]]=r[e];return i},o=Date.now(),{async get(e){var t;let r,n,s,a=Date.now(),c=await i(),u={get visitorId(){return void 0===r&&(r=function(e,t){let r,i=function(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(i>127)return new TextEncoder().encode(e);t[r]=i}return t}(e);t=t||0;let n=[0,i.length],s=n[1]%16,o=n[1]-s,a=[0,t],l=[0,t],c=[0,0],u=[0,0];for(r=0;r<o;r+=16)c[0]=i[r+4]|i[r+5]<<8|i[r+6]<<16|i[r+7]<<24,c[1]=i[r]|i[r+1]<<8|i[r+2]<<16|i[r+3]<<24,u[0]=i[r+12]|i[r+13]<<8|i[r+14]<<16|i[r+15]<<24,u[1]=i[r+8]|i[r+9]<<8|i[r+10]<<16|i[r+11]<<24,tC(c,tF),tj(c,31),tC(c,tk),t_(a,c),tj(a,27),tE(a,l),tC(a,tN),tE(a,tM),tC(u,tk),tj(u,33),tC(u,tF),t_(l,u),tj(l,31),tE(l,a),tC(l,tN),tE(l,tO);c[0]=0,c[1]=0,u[0]=0,u[1]=0;let d=[0,0];switch(s){case 15:d[1]=i[r+14],tI(d,48),t_(u,d);case 14:d[1]=i[r+13],tI(d,40),t_(u,d);case 13:d[1]=i[r+12],tI(d,32),t_(u,d);case 12:d[1]=i[r+11],tI(d,24),t_(u,d);case 11:d[1]=i[r+10],tI(d,16),t_(u,d);case 10:d[1]=i[r+9],tI(d,8),t_(u,d);case 9:d[1]=i[r+8],t_(u,d),tC(u,tk),tj(u,33),tC(u,tF),t_(l,u);case 8:d[1]=i[r+7],tI(d,56),t_(c,d);case 7:d[1]=i[r+6],tI(d,48),t_(c,d);case 6:d[1]=i[r+5],tI(d,40),t_(c,d);case 5:d[1]=i[r+4],tI(d,32),t_(c,d);case 4:d[1]=i[r+3],tI(d,24),t_(c,d);case 3:d[1]=i[r+2],tI(d,16),t_(c,d);case 2:d[1]=i[r+1],tI(d,8),t_(c,d);case 1:d[1]=i[r],t_(c,d),tC(c,tF),tj(c,31),tC(c,tk),t_(a,c)}return t_(a,n),t_(l,n),tE(a,l),tE(l,a),tL(a),tL(l),tE(a,l),tE(l,a),("00000000"+(a[0]>>>0).toString(16)).slice(-8)+("00000000"+(a[1]>>>0).toString(16)).slice(-8)+("00000000"+(l[0]>>>0).toString(16)).slice(-8)+("00000000"+(l[1]>>>0).toString(16)).slice(-8)}(function(e){let t="";for(let r of Object.keys(e).sort()){let i=e[r],n="error"in i?"error":JSON.stringify(i.value);t+=`${t?"|":""}${r.replace(/([:|\\])/g,"\\$1")}:${n}`}return t}(this.components))),r},set visitorId(visitorId){r=visitorId},confidence:(s=tb(.99+.01*(n=function(e){if(tU())return .4;if(tw())return tP()&&!(tW()&&tB())?.5:.3;let t="value"in e.platform?e.platform.value:"";return/^Win/.test(t)?.6:/^Mac/.test(t)?.5:.7}(t=c)),1e-4),{score:n,comment:"$ if upgrade to Pro: https://fingerprint.com/github/?utm_source=oss&utm_medium=referral&utm_campaign=confidence_score".replace(/\$/g,`${s}`)}),components:t,version:td};return(l||(null==e?void 0:e.debug))&&console.log(`Copy the text below to get the debug data: 7 8\`\`\` 9version: ${u.version} 10userAgent: ${navigator.userAgent} 11timeBetweenLoadAndGet: ${a-o} 12visitorId: ${u.visitorId} 13components: ${JSON.stringify(c,(e,t)=>{if(t instanceof Error){var r;return{name:t.name,message:t.message,stack:null==(r=t.stack)?void 0:r.split("\n"),...t}}return t},2)} 14\`\`\``),u}}};async function rd(){if((0,tu.isServer)())return"";let e=await ru({monitoring:!1});return(await e.get()).visitorId}e.s(["getDeviceFingerPrint",0,rd],809176);var rp=e.i(912598);let rm={src:e.i(2167).default,width:177,height:26,blurWidth:0,blurHeight:0},rh={src:e.i(545390).default,width:189,height:48,blurWidth:0,blurHeight:0}
14,rg={[A.PaymentMethod.CB]:"Carte bancaire",[A.PaymentMethod.HYBRID]:"Paiement hybride",[A.PaymentMethod.PAYPAL]:"PayPal",[A.PaymentMethod.CREDIT_X3]:"Crédit x3",[A.PaymentMethod.MONTHLY_CREDIT]:"Crédit mensuel",[A.PaymentMethod.INCOMING_TRANSFER]:"Virement entrant",[A.PaymentMethod.CASH_REGISTER]:"Caisse",[A.PaymentMethod.WITHOUT_PAYMENT]:"Sans paiement"};function rx({method:e}){switch(e){case A.PaymentMethod.CB:return(0,p.jsx)(eA.default,{src:rm,alt:rg[e]??e,height:25,style:{maxWidth:150,objectFit:"contain"}});case A.PaymentMethod.PAYPAL:return(0,p.jsx)(eA.default,{src:rh,alt:rg[e]??e,height:25,style:{maxWidth:150,maxHeight:"25px",objectFit:"contain"}});default:return(0,p.jsx)(m.Text,{level:h.TextLevels.ONE,children:rg[e]??e})}}function rf({options:e,value:t,onChange:r,error:i}){return e.length<1?null:(0,p.jsxs)(j.FlexItem,{size:{desktop:8,widescreen:6},children:[(0,p.jsxs)(eu.Title,{level:ed.TitleLevels.FIVE,children:["Sélectionnez votre moyen de paiement",(0,p.jsx)("span",{className:"text has-text-error",children:" *"})," :"]}),(0,p.jsx)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:4,mobile:!0,"data-has-error":!!i,children:e.map(e=>(0,p.jsx)(ek.RadioTile,{id:`payment-mode-${e}`,horizontal:!0,name:"paymentMode",checked:t===e,onChange:()=>r(e),description:(0,p.jsx)(rx,{method:e})},e))}),i&&(0,p.jsx)(m.Text,{level:h.TextLevels.THREE,typo:eM.TypographyColor.TEXT_ERROR,children:i})]})}var ry=e.i(57438),v=v,rT=e.i(935745),rv=e.i(959248),rb=e.i(555790),rE=e.i(679599),rC=e.i(618566);function rj({isOpen:e,onClose:t}){let{cart:r,reset:i}=(0,B.useContext)(z.CartContext),n=(0,rC.useRouter)(),s=r?.journeys.flatMap(e=>e.products)?.filter(e=>!e.isType(A.ProductType.FAI_EQUIPMENT))??[],o=s.filter(e=>e.price.isType(A.PriceTypeEnum.IMMEDIATE)),a=s.filter(e=>e.price.isType(A.PriceTypeEnum.MONTHLY)&&!e.isType(A.ProductType.OPTION)&&!e.isType(A.ProductType.PARTNER_OPTION)),l=(r?.journeys.flatMap(e=>e.shipping)??[]).filter(e=>e?.price.isType(A.PriceTypeEnum.IMMEDIATE)),c=r?.prices?.find(e=>e.isType(A.PriceTypeEnum.IMMEDIATE)),u=r?.prices?.find(e=>e.isType(A.PriceTypeEnum.MONTHLY));return(0,p.jsxs)(rv.Modal,{active:e,onClose:t,title:"Information",children:[(0,p.jsxs)(rb.ModalBody,{children:[(0,p.jsx)(m.Text,{level:h.TextLevels.TWO,children:"L'étalement de paiement doit être retiré pour finaliser la vente"}),(0,p.jsx)(m.Text,{level:h.TextLevels.TWO,children:"Si vous décidez de continuer avec le paiement en une fois, les montants de votre facture seront modifiés de la manière suivante :"}),(0,p.jsx)(V.Box,{children:(0,p.jsx)(W.BoxContent,{children:(0,p.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:rT.GapSize.ZERO,children:[(0,p.jsxs)(j.FlexItem,{children:[(0,p.jsx)(eu.Title,{level:ed.TitleLevels.THREE,markup:ed.TitleMarkup.H2,children:"Mes achats"}),(0,p.jsx)(v.default,{})]}),c&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(C.FlexBox,{justify:I.Justify.SPACE_BETWEEN,direction:E.DirectionEnum.ROW,children:[(0,p.jsx)(eu.Title,{level:ed.TitleLevels.SIX,markup:ed.TitleMarkup.H3,children:"à payer aujourd'hui"}),(0,p.jsx)(m.Text,{typo:x.TypographyBold.TEXT_WEIGHT_SEMIBOLD,level:h.TextLevels.ONE,children:(0,p.jsx)(T,{amount:c.priceWithPromotions})})]}),(0,p.jsxs)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:rT.GapSize.TWO,children:[o.map(e=>(0,p.jsx)(_,{label:e.label,price:e.price.priceWithPromotions},e.id)),l.map(e=>(0,p.jsx)(_,{label:e?.label??"",price:e?.price.priceWithPromotions??0},e?.gencode))]}),(0,p.jsx)(v.default,{})]}),u&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(C.FlexBox,{justify:I.Justify.SPACE_BETWEEN,direction:E.DirectionEnum.ROW,children:[(0,p.jsx)(eu.Title,{level:ed.TitleLevels.SIX,markup:ed.TitleMarkup.H3,children:"à payer par mois"}),(0,p.jsx)(m.Text,{typo:x.TypographyBold.TEXT_WEIGHT_SEMIBOLD,level:h.TextLevels.ONE,children:(0,p.jsx)(T,{amount:u.priceWithPromotions,period:"mois"})})]}),(0,p.jsx)(C.FlexBox,{direction:E.DirectionEnum.COLUMN,gap:rT.GapSize.TWO,children:a.length>0&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Text,{level:h.TextLevels.TWO,typo:x.TypographyBold.TEXT_WEIGHT_SEMIBOLD,marginless:!0,children:a.length>1?"Mes offres":"Mon offre"}),a.map(e=>(0,p.jsx)(_,{label:e.label,price:e.price.priceWithPromotions,period:"mois"},e.id))]})}),(0,p.jsx)(v.default,{})]})]})})})]}),(0,p.jsx)(rE.ModalFooter,{children:(0,p.jsxs)(ry.ButtonList,{children:[(0,p.jsx)(e2.Button,{variant:e3.ButtonVariant.SECONDARY,onClick:()=>{tl.virtualCartService.clearStorage(),(0,tc.deleteClientCookie)("oauth2_contract_id"),i?.(),n.push("/")},children:"Revenir à l'accueil"}),(0,p.jsx)(e2.Button,{variant:e3.ButtonVariant.PRIMARY,onClick:t,children:"Payer en une fois"})]})})]})}function rI({cart:e,user:t,fundings:r,fundingTypes:i,fundingKeysByType:n,paymentMethodsByFundingKey:s,edpParcours:o,cartFundingType:a,cartFundingKey:l,cartPaymentMethod:c,setFundingModeMutation:u,generatePurchaseOrderMutation:d,showErrorModal:m}){let h=(0,en.useSubmitContext)(),g=(0,rp.useQueryClient)(),[x,f]=(0,B.useState)(!1),{pspFormPost:y,handleOrderRedirect:T}=ta(),v=Object.values(s).every(e=>1===e.length&&e[0]===A.PaymentMethod.WITHOUT_PAYMENT),b=(0,eT.useTr
14ilogyForm)({defaultValues:function({fundingTypes:e,fundingKeysByType:t,paymentMethodsByFundingKey:r,cartFundingType:i,cartFundingKey:n,cartPaymentMethod:s}){let o=1===e.length?e[0].type:i,a=t[o]??[],l=1===a.length?eR(a):n||eR(a),c=l?r[l]??[]:[];return{fundingType:o,fundingKey:l,paymentMethod:1===c.length?c[0]:s??""}}({fundingTypes:i,fundingKeysByType:n,paymentMethodsByFundingKey:s,cartFundingType:a,cartFundingKey:l,cartPaymentMethod:c}),onSubmit:async({value:t,formApi:r})=>{if(t.fundingKey)try{await u.mutateAsync({fundingKey:t.fundingKey,paymentMethod:t.paymentMethod?t.paymentMethod:A.PaymentMethod.WITHOUT_PAYMENT,callbackUrl:ee.paths.fundingRedirect(e?.id),...t.fundingKey===A.FundingKey.EDP&&{edpParcours:o}})}catch{m("technical-error",{onRetry:()=>{r.handleSubmit(),h?.setIsDisabled(!1)}}),h?.setIsDisabled?.(!0)}},listeners:{onChange:({formApi:e})=>e.handleSubmit()}});return(0,en.useSubmitQueue)("payment-form",async()=>{let{fundingKey:t,paymentMethod:r}=b.state.values,i=e?.funding?.key===t,n=r||A.PaymentMethod.WITHOUT_PAYMENT,s=e?.paymentMethod;i&&s===n||await b.handleSubmit()}),(0,en.useSubmitHandler)(async()=>{let r=g.getQueryData(["cart"]),i=r?.funding;if(r?.id&&t){let n=await Q.evaluate(r.id,t,i);if(n.requiresEdpRetrait||n.requiresCreditRetrait){await u.mutateAsync({fundingKey:A.FundingKey.COMPTANT,callbackUrl:ee.paths.fundingRedirect(e?.id)}),f(!0);return}if(n.isBlocked)return void m("scoring-ko",{messages:n.messages})}let n={page:"Bascule_vers_plateforme_de_paiement",pageCategory:"Commande",eCommerceStep:"Checkout_paiement"},s=r?.funding?.key,a=r?.paymentMethod,l=s&&a?await u.mutateAsync({fundingKey:s,paymentMethod:a,callbackUrl:ee.paths.fundingRedirect(r?.id),...s===A.FundingKey.EDP&&{edpParcours:o},apply:!0}):r,c=l?.fundingRedirect?.url;if(c)await (0,e5.sendPageViewTracking)(l,n),window.location.href=c;else{let e=await rd(),t=`${window.location.origin}${ee.paths.thankYouBaseUrl}`;try{let r=await d.mutateAsync({fingerprint:e,thankYouPageBaseUrl:t});(0,e5.saveOrderTrackingSnapshot)(l),tl.virtualCartService.clearStorage(),(0,tc.deleteClientCookie)("oauth2_contract_id"),"form-post"!==r.type&&r.url.startsWith(window.location.origin)||await (0,e5.sendPageViewTracking)(l,n),T(r)}catch(e){if(e instanceof A.PurchaseOrderGenerationError&&!e.isRetryable)return void m("cart-creation-error");m("technical-error",{onRetry:()=>{h?.onSubmit()}})}}}),(0,p.jsxs)(p.Fragment,{children:[y&&(0,p.jsx)(to,{formUrl:y.formUrl,formData:y.formData}),!v&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(b.AppField,{name:"fundingType",validators:{onSubmit:({value:e})=>
14{if(!e)return"Veuillez sélectionner un moyen de financement."}},listeners:{onChange:({value:e,fieldApi:t})=>{t.form.setFieldValue("fundingKey",eR(n[e]??[]))}},children:e=>(0,p.jsx)(ew,{value:e.state.value,onChange:e.handleChange,error:e.state.meta.errors.join(", "),options:i,fundingKeysByType:n})}),(0,p.jsx)(b.Subscribe,{selector:e=>e.values.fundingType,children:e=>{let t=n[e]??[],r=t.length<=1;return(0,p.jsx)(b.AppField,{name:"fundingKey",validators:{onSubmit:({value:e})=>{if(!e)return"Veuillez sélectionner une mensualité."}},listeners:{onChange:({value:e,fieldApi:t})=>{e?t.form.setFieldValue("paymentMethod",s[e]?.[0]??""):t.form.setFieldValue("paymentMethod","")}},children:e=>(0,p.jsx)(eO,{value:e.state.value,options:t,onChange:e.handleChange,error:e.state.meta.errors.join(", "),isHidden:r})})}}),(0,p.jsx)(b.Subscribe,{selector:e=>e.values.fundingKey,children:e=>(0,p.jsx)(b.AppField,{name:"paymentMethod",validators:{onSubmit:({value:e})=>{if(!e)return"Veuillez sélectionner un moyen de paiement."}},children:t=>{let r=e&&s[e]?s[e]:[];return(0,p.jsx)(rf,{options:r,value:t.state.value,onChange:t.handleChange,error:t.state.meta.errors.join(", ")})}})})]}),(0,p.jsx)(b.Subscribe,{selector:e=>e.values.fundingKey,children:t=>{let i=r.find(e=>e.key===t);return(0,p.jsx)(eI,{cart:e,funding:i})}}),(0,p.jsx)(tn,{}),(0,p.jsx)(tr,{cart:e}),x&&(0,p.jsx)(rj,{isOpen:!0,onClose:()=>f(!1)})]})}var r_=e.i(853470);function rS(){return(0,p.jsxs)(C.FlexBox,{gap:6,direction:E.DirectionEnum.COLUMN,"data-type":"payment-module",children:[(0,p.jsx)(V.Box,{children:(0,p.jsx)(W.BoxContent,{children:(0,p.jsxs)(C.FlexBox,{gap:8,direction:E.DirectionEnum.COLUMN,children:[(0,p.jsx)(e8,{}),(0,p.jsxs)(j.FlexItem,{size:{desktop:8,widescreen:6},children:[(0,p.jsx)(eu.Title,{level:ed.TitleLevels.FIVE,className:"skeleton w-fit",markup:ed.TitleMarkup.H2,children:"Mon abonnement"}),(0,p.jsx)(m.Text,{level:h.TextLevels.ONE,className:"skeleton",children:"Lorem ipsum dolor sit amet"}),(0,p.jsx)(m.Text,{level:h.TextLevels.ONE,className:"skeleton w-fit",children:"Lorem ipsum dolor sit amet"}),(0,p.jsx)(m.Text,{level:h.TextLevels.ONE,className:"skeleton w-fit",children:"Lorem ipsum dolor sit amet, consetetur"}),(0,p.jsx)(r_.Input,{disabled:!0}),(0,p.jsx)(e2.Button,{variant:e3.ButtonVariant.SECONDARY,iconName:el.IconName.CAMERA,disabled:!0,children:"Scanner ou télécharger votre IBAN"})]}),(0,p.jsxs)(j.FlexItem,{size:{desktop:8,widescreen:6},children:[(0,p.jsx)(eu.Title,{level:ed.TitleLevels.FIVE,className:"skeleton w-fit",markup:ed.TitleMarkup.H2,children:"Mon abonnement"}),(0,p.jsx)(m.Text,{level:h.TextLevels.ONE,className:"skeleton w-fit",children:"Lorem ipsum dolor sit"}),(0,p.jsx)(m.Text,{level:h.TextLevels.ONE,className:"skeleton w-fit",children:"Lorem ipsum dolor sit"})]}),(0,p.jsx)(ts,{})]})})}),(0,p.jsx)(j.FlexItem,{children:(0,p.jsxs)(C.FlexBox,{gap:4,direction:E.DirectionEnum.COLUMN,children:[(0,p.jsx)(j.FlexItem,{children:(0,p.jsx)(m.Text,{level:h.TextLevels.TWO,className:"skeleton",children:"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata"})}),(0,p.jsx)(j.FlexItem,{children:(0,p.jsx)(m.Text,{level:h.TextLevels.TWO,className:"skeleton",children:"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata"})})]})}),(0,p.jsx)(tn,{isDisabled:!0}),(0,p.jsx)(tr,{})]})}e.s(["Payment",0,function(){let e,t,r,{cart:i,isLoading:n,setFundingModeMutation:s,generatePurchaseOrderMutation:o}=(0,B.useContext)(z.CartContext),{showErrorModal:a}=(0,q.useErrorModal)(),{user:l}=(0,ei.useStableSession)(),c=(0,en.useSubmitContext)(),u=i?.paymentMethod;(0,B.useEffect)(()=>{c?.setLabel("Valider et payer")},[c]);let d=(0,et.useQuery)({queryKey:["funding-modes-payment",i?.id,l?.sub],queryFn:async()=>
14{if(!i?.id)throw Error("Cart ID is required");return await N.getCartFundingModes(i.id,l)},enabled:!!i?.id}),m=d.data?.fundings??[],h=d.data?.paymentMethodsByFundingKey??{},g=d.data?.edpParcours??[];(0,B.useEffect)(()=>{d.isLoading||0!==m.length||a("no-funding")},[d.isLoading,m.length,a]);let x=i?.fundingRedirect?.status==="KO",f=(0,B.useMemo)(()=>x&&0!==m.length?m.find(e=>e.isType(A.FundingType.COMPTANT))??m[0]:null,[x,m]),y=f?.type??i?.funding?.type??A.FundingType.COMPTANT,T=f?.key??i?.funding?.key??A.FundingKey.COMPTANT;(0,B.useEffect)(()=>{f&&!s.isPending&&i?.funding?.key!==f.key&&s.mutate({fundingKey:f.key,paymentMethod:A.PaymentMethod.CB,callbackUrl:ee.paths.fundingRedirect(i?.id)})},[f,i?.funding?.key,i?.id,s,s.isPending]);let{openBankingUrl:v,openBankingBankAccountId:b,isOpenBankingRequired:I,isLoading:_}=(e=`${window.location.origin}${ee.paths.bank}`,r=(t=(0,et.useQuery)({queryKey:["open-banking",i?.id,i?.buyer?.id,String(T)],queryFn:async()=>{if((await Q.evaluate(i.id,l,i.funding)).requiresOpenBanking)return await $.openBankingService.createVerification(i.buyer.id,e,l);let t=await $.openBankingService.getVerificationStatus(i.buyer.id,l);return t?.statut===K.OpenBankingStatus.REALISE?{requiresOpenBanking:!0,bankAccountId:t.informationsSupplementaires.identifiantCompteBancaire,id:t.id}:null},enabled:!!(i?.id&&i.buyer?.id&&l),retry:!1})).data,{openBankingUrl:r?.url,openBankingBankAccountId:r?.bankAccountId,isOpenBankingRequired:!!r?.requiresOpenBanking&&!r?.bankAccountId,isLoading:t.is
14Fetching});(0,er.usePageViewTracking)({page:"Paiement",pageCategory:"Commande",eCommerceStep:"Checkout_paiement",variant:{blocCB:m.some(e=>e.isType(A.FundingType.COMPTANT)),blocFinancerIntegralitePanier:m.some(e=>e.isType(A.FundingType.YOUNITED)||e.isType(A.FundingType.SWAPPY)),blocFinancerUniquementTelephone:m.some(e=>e.isType(A.FundingType.EDP))}},{enable:!d.isPending});let S=(0,B.useMemo)(()=>m.reduce((e,t)=>(e.some(e=>e.type===t.type)||e.push(t),e),[]),[m]),L=(0,B.useMemo)(()=>m.reduce((e,t)=>(e[t.type]||(e[t.type]=[]),e[t.type].push(t),e),{}),[m]),F=(0,B.useMemo)(()=>{if(I)return!1;let e=!!i?.billingContext?.bankAccount?.iban,t=i?.journeys?.some(e=>"FACTURATION_MANQUANTE"===e.statusChangeReason);return e||t||!!b},[I,i?.billingContext?.bankAccount?.iban,i?.journeys,b]);return n||_?(0,p.jsx)(rS,{}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(C.FlexBox,{gap:6,direction:E.DirectionEnum.COLUMN,"data-type":"payment-module",children:(0,p.jsx)(V.Box,{children:(0,p.jsx)(W.BoxContent,{children:(0,p.jsxs)(C.FlexBox,{gap:8,direction:E.DirectionEnum.COLUMN,children:[(0,p.jsx)(e8,{}),F&&(0,p.jsx)(e4,{openBankingBankAccountId:b}),!_&&I&&v&&(0,p.jsxs)(j.FlexItem,{children:[(0,p.jsx)(eP,{}),(0,p.jsx)(U.Spacer,{size:H.SpacerSize.FOUR}),(0,p.jsx)(e6,{url:v})]}),(0,p.jsx)(ep,{cart:i}),d.isLoading?(0,p.jsx)(ts,{}):(0,p.jsx)(rI,{cart:i,user:l,fundings:m,fundingTypes:S,fundingKeysByType:L,paymentMethodsByFundingKey:h,edpParcours:g,cartFundingType:y,cartFundingKey:T,cartPaymentMethod:u,setFundingModeMutation:s,generatePurchaseOrderMutation:o,showErrorModal:a})]})})})}),(0,p.jsx)(G.ForceLogin,{})]})}],315171)},628525,(e,t,r)=>{"use strict";var i={};function n(e,t,r){var s,o,a,l,c,u="";for("string"!=typeof t&&(r=t,t=n.defaultChars),void 0===r&&(r=!0),c=function(e){var t,r,n=i[e];if(n)return n;for(t=0,n=i[e]=[];t<128;t++)r=String.fromCharCode(t),/^[0-9a-z]$/i.test(r)?n.push(r):n.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)n[e.charCodeAt(t)]=e[t];return n}(t),s=0,o=e.length;s<o;s++){if(a=e.charCodeAt(s),r&&37===a&&s+2<o&&/^[0-9a-f]{2}$/i.test(e.slice(s+1,s+3))){u+=e.slice(s,s+3),s+=2;continue}if(a<128){u+=c[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&s+1<o&&(l=e.charCodeAt(s+1))>=56320&&l<=57343){u+=encodeURIComponent(e[s]+e[s+1]),s++;continue}u+="%EF%BF%BD";continue}u+=encodeURIComponent(e[s])}return u}n.defaultChars=";/?:@&=+$,-_.!~*'()#",n.componentChars="-_.!~*'()",t.exports=n},788253,(e,t,r)=>{"use strict";var i={};function n(e,t){var r;return"string"!=typeof t&&(t=n.defaultChars),r=function(e){var t,r,n=i[e];if(n)return n;for(t=0,n=i[e]=[];t<128;t++)r=String.fromCharCode(t),n.push(r);for(t=0;t<e.length;t++)n[r=e.charCodeAt(t)]="%"+("0"+r.toString(16).toUpperCase()).slice(-2);return n}(t),e.replace(/(%[a-f0-9]{2})+/gi,function(e){var t,i,n,s,o,a,l,c="";for(t=0,i=e.length;t<i;t+=3){if((n=parseInt(e.slice(t+1,t+3),16))<128){c+=r[n];continue}if((224&n)==192&&t+3<i&&(192&(s=parseInt(e.slice(t+4,t+6),16)))==128){(l=n<<6&1984|63&s)<128?c+="��":c+=String.fromCharCode(l),t+=3;continue}if((240&n)==224&&t+6<i&&(s=parseInt(e.slice(t+4,t+6),16),o=parseInt(e.slice(t+7,t+9),16),(192&s)==128&&(192&o)==128)){(l=n<<12&61440|s<<6&4032|63&o)<2048||l>=55296&&l<=57343?c+="���":c+=String.fromCharCode(l),t+=6;continue}if((248&n)==240&&t+9<i&&(s=parseInt(e.slice(t+4,t+6),16),o=parseInt(e.slice(t+7,t+9),16),a=parseInt(e.slice(t+10,t+12),16),(192&s)==128&&(192&o)==128&&(192&a)==128)){(l=n<<18&1835008|s<<12&258048|o<<6&4032|63&a)<65536||l>1114111?c+="����":(l-=65536,c+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9;continue}c+="�"}return c})}n.defaultChars=";/?:@&=+$,#",n.componentChars="",t.exports=n},910216,(e,t,r)=>{"use strict";t.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}},969755,(e,t,r)=>{"use strict";function i(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}
14var n=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,o=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,a=["%","/","?",";","#"].concat(["'"].concat(["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n"," "]))),l=["/","?","#"],c=/^[+a-z0-9A-Z_-]{0,63}$/,u=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},p={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};i.prototype.parse=function(e,t){var r,i,s,m,h,g=e;if(g=g.trim(),!t&&1===e.split("#").length){var x=o.exec(g);if(x)return this.pathname=x[1],x[2]&&(this.search=x[2]),this}var f=n.exec(g);if(f&&(s=(f=f[0]).toLowerCase(),this.protocol=f,g=g.substr(f.length)),(t||f||g.match(/^\/\/[^@\/]+@[^@\/]+/))&&(h="//"===g.substr(0,2))&&!(f&&d[f])&&(g=g.substr(2),this.slashes=!0),!d[f]&&(h||f&&!p[f])){var y,T,v=-1;for(r=0;r<l.length;r++)-1!==(m=g.indexOf(l[r]))&&(-1===v||m<v)&&(v=m);for(-1!==(T=-1===v?g.lastIndexOf("@"):g.lastIndexOf("@",v))&&(y=g.slice(0,T),g=g.slice(T+1),this.auth=y),v=-1,r=0;r<a.length;r++)-1!==(m=g.indexOf(a[r]))&&(-1===v||m<v)&&(v=m);-1===v&&(v=g.length),":"===g[v-1]&&v--;var b=g.slice(0,v);g=g.slice(v),this.parseHost(b),this.hostname=this.hostname||"";var E="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!E){var C=this.hostname.split(/\./);for(r=0,i=C.length;r<i;r++){var j=C[r];if(j&&!j.match(c)){for(var I="",_=0,S=j.length;_<S;_++)j.charCodeAt(_)>127?I+="x":I+=j[_];if(!I.match(c)){var A=C.slice(0,r),L=C.slice(r+1),F=j.match(u);F&&(A.push(F[1]),L.unshift(F[2])),L.length&&(g=L.join(".")+g),this.hostname=A.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),E&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var k=g.indexOf("#");-1!==k&&(this.hash=g.substr(k),g=g.slice(0,k));var N=g.indexOf("?");return -1!==N&&(this.search=g.substr(N),g=g.slice(0,N)),g&&(this.pathname=g),p[s]&&this.hostname&&!this.pathname&&(this.pathname=""),this},i.prototype.parseHost=function(e){var t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},t.exports=function(e,t){if(e&&e instanceof i)return e;var r=new i;return r.parse(e,t),r}},274899,(e,t,r)=>{"use strict";t.exports.encode=e.r(628525),t.exports.decode=e.r(788253),t.exports.format=e.r(910216),t.exports.parse=e.r(969755)},634171,(e,t,r)=>{t.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},270893,(e,t,r)=>{t.exports=/[\0-\x1F\x7F-\x9F]/},218095,(e,t,r)=>{t.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},484865,(e,t,r)=>{t.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},940454,(e,t,r)=>{t.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},303672,(e,t,r)=>{"use strict";r.Any=e.r(634171),r.Cc=e.r(270893),r.Cf=e.r(218095),r.P=e.r(484865),r.Z=e.r(940454)},274846,(e,t,r)=>
vendor: 33,010 bytes, line 14
14{t.exports=JSON.parse('{"Aacute":"Ã","aacute":"á","Abreve":"Ä","abreve":"Ä","ac":"â¾","acd":"â¿","acE":"â¾Ì³","Acirc":"Ã","acirc":"â","acute":"´","Acy":"Ð","acy":"а","AElig":"Ã","aelig":"æ","af":"â¡","Afr":"ð","afr":"ð","Agrave":"Ã","agrave":"à ","alefsym":"âµ","aleph":"âµ","Alpha":"Î","alpha":"α","Amacr":"Ä","amacr":"Ä","amalg":"⨿","amp":"&","AMP":"&","andand":"â©","And":"â©","and":"â§","andd":"â©","andslope":"â©","andv":"â©","ang":"â ","ange":"⦤","angle":"â ","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"â¦","angmsdag":"⦮","angmsdah":"⦯","angmsd":"â¡","angrt":"â","angrtvb":"â¾","angrtvbd":"â¦","angsph":"â¢","angst":"Ã
","angzarr":"â¼","Aogon":"Ä","aogon":"Ä
","Aopf":"ð¸","aopf":"ð","apacir":"⩯","ap":"â","apE":"â©°","ape":"â","apid":"â","apos":"\'","ApplyFunction":"â¡","approx":"â","approxeq":"â","Aring":"Ã
","aring":"Ã¥","Ascr":"ð","ascr":"ð¶","Assign":"â","ast":"*","asymp":"â","asympeq":"â","Atilde":"Ã","atilde":"ã","Auml":"Ã","auml":"ä","awconint":"â³","awint":"â¨","backcong":"â","backepsilon":"϶","backprime":"âµ","backsim":"â½","backsimeq":"â","Backslash":"â","Barv":"â«§","barvee":"â½","barwed":"â
","Barwed":"â","barwedge":"â
","bbrk":"âµ","bbrktbrk":"â¶","bcong":"â","Bcy":"Ð","bcy":"б","bdquo":"â","becaus":"âµ","because":"âµ","Because":"âµ","bemptyv":"⦰","bepsi":"϶","bernou":"â¬","Bernoullis":"â¬","Beta":"Î","beta":"β","beth":"â¶","between":"â¬","Bfr":"ð
","bfr":"ð","bigcap":"â","bigcirc":"â¯","bigcup":"â","bigodot":"â¨","bigoplus":"â¨","bigotimes":"â¨","bigsqcup":"â¨","bigstar":"â
","bigtriangledown":"â½","bigtriangleup":"â³","biguplus":"â¨","bigvee":"â","bigwedge":"â","bkarow":"â¤","blacklozenge":"â§«","blacksquare":"âª","blacktriangle":"â´","blacktriangledown":"â¾","blacktriangleleft":"â","blacktriangleright":"â¸","blank":"â£","blk12":"â","blk14":"â","blk34":"â","block":"â","bne":"=â¥","bnequiv":"â¡â¥","bNot":"â«","bnot":"â","Bopf":"ð¹","bopf":"ð","bot":"â¥","bottom":"â¥","bowtie":"â","boxbox":"â§","boxdl":"â","boxdL":"â","boxDl":"â","boxDL":"â","boxdr":"â","boxdR":"â","boxDr":"â","boxDR":"â","boxh":"â","boxH":"â","boxhd":"â¬","boxHd":"â¤","boxhD":"â¥","boxHD":"â¦","boxhu":"â´","boxHu":"â§","boxhU":"â¨","boxHU":"â©","boxminus":"â","boxplus":"â","boxtimes":"â ","boxul":"â","boxuL":"â","boxUl":"â","boxUL":"â","boxur":"â","boxuR":"â","boxUr":"â","boxUR":"â","boxv":"â","boxV":"â","boxvh":"â¼","boxvH":"âª","boxVh":"â«","boxVH":"â¬","boxvl":"â¤","boxvL":"â¡","boxVl":"â¢","boxVL":"â£","boxvr":"â","boxvR":"â","boxVr":"â","boxVR":"â ","bprime":"âµ","breve":"Ë","Breve":"Ë","brvbar":"¦","bscr":"ð·","Bscr":"â¬","bsemi":"â","bsim":"â½","bsime":"â","bsolb":"â§
","bsol":"\\\\","bsolhsub":"â","bull":"â¢","bullet":"â¢","bump":"â","bumpE":"⪮","bumpe":"â","Bumpeq":"â","bumpeq":"â","Cacute":"Ä","cacute":"Ä","capand":"â©","capbrcup":"â©","capcap":"â©","cap":"â©","Cap":"â","capcup":"â©","capdot":"â©","CapitalDifferentialD":"â
","caps":"â©ï¸","caret":"â","caron":"Ë","Cayleys":"â","ccaps":"â©","Ccaron":"Ä","ccaron":"Ä","Ccedil":"Ã","ccedil":"ç","Ccirc":"Ä","ccirc":"Ä","Cconint":"â°","ccups":"â©","ccupssm":"â©","Cdot":"Ä","cdot":"Ä","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"ð ","Cfr":"â","CHcy":"Ч","chcy":"Ñ","check":"â","checkmark":"â","Chi":"Χ","chi":"Ï","circ":"Ë","circeq":"â","circlearrowleft":"âº","circlearrowright":"â»","circledast":"â","circledcirc":"â","circleddash":"â","CircleDot":"â","circledR":"®","circledS":"â","CircleMinus":"â","CirclePlus":"â","CircleTimes":"â","cir":"â","cirE":"â§","cire":"â","cirfnint":"â¨","cirmid":"⫯","cirscir":"â§","ClockwiseContourIntegral":"â²","CloseCurlyDoubleQuote":"â","CloseCurlyQuote":"â","clubs":"â£","clubsuit":"â£","colon":":","Colon":"â·","Colone":"â©´","colone":"â","coloneq":"â","comma":",","commat":"@","comp":"â","compfn":"â","complement":"â","complexes":"â","cong":"â
","congdot":"â©","Congruent":"â¡","conint":"â®","Conint":"â¯","ContourIntegral":"â®","copf":"ð","Copf":"â","coprod":"â","Coproduct":"â","copy":"©","COPY":"©","copysr":"â","CounterClockwiseContourIntegral":"â³","crarr":"âµ","cross":"â","Cross":"⨯","Cscr":"ð","cscr":"ð¸","csub":"â«","csube":"â«","csup":"â«","csupe":"â«","ctdot":"â¯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"â","cuesc":"â","cularr":"â¶","cularrp":"⤽","cupbrcap":"â©","cupcap":"â©","CupCap":"â","cup":"âª","Cup":"â","cupcup":"â©","cupdot":"â","cupor":"â©
","cups":"âªï¸","curarr":"â·","curarrm":"⤼","curlyeqprec":"â","curlyeqsucc":"â","curlyvee":"â","curlywedge":"â","curren":"¤","curvearrowleft":"â¶","curvearrowright":"â·","cuvee":"â","cuwed":"â","cwconint":"â²","cwint":"â±","cylcty":"â","dagger":"â ","Dagger":"â¡","daleth":"â¸","darr":"â","Darr":"â¡","dArr":"â","dash":"â","Dashv":"⫤","dashv":"â£","dbkarow":"â¤","dblac":"Ë","Dcaron":"Ä","dcaron":"Ä","Dcy":"Ð","dcy":"д","ddagger":"â¡","ddarr":"â","DD":"â
","dd":"â
","DDotrahd":"â¤","ddotseq":"â©·","deg":"°","Del":"â","Delta":"Î","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"ð","dfr":"ð¡","dHar":"⥥","dharl":"â","dharr":"â","DiacriticalAcute":"´","DiacriticalDot":"Ë","DiacriticalDoubleAcute":"Ë","DiacriticalGrave":"`","DiacriticalTilde":"Ë","diam":"â","diamond":"â","Diamond":"â","diamondsuit":"â¦","diams":"â¦","die":"¨","DifferentialD":"â
","digamma":"Ï","disin":"â²","div":"÷","divide":"÷","divideontimes":"â","divonx":"â","DJcy":"Ð","djcy":"Ñ","dlcorn":"â","dlcrop":"â","dollar":"$","Dopf":"ð»","dopf":"ð","Dot":"¨","dot":"Ë","DotDot":"â","doteq":"â","doteqdot":"â","DotEqual":"â","dotminus":"â¸","dotplus":"â","dotsquare":"â¡","doublebarwedge":"â","DoubleContourIntegral":"â¯","DoubleDot":"¨","DoubleDownArrow":"â","DoubleLeftArrow":"â","DoubleLeftRightArrow":"â","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"â¸","DoubleLongLeftRightArrow":"âº","DoubleLongRightArrow":"â¹","DoubleRightArrow":"â","DoubleRightTee":"â¨","DoubleUpArrow":"â","DoubleUpDownArrow":"â","DoubleVerticalBar":"â¥","DownArrowBar":"â¤","downarrow":"â","DownArrow":"â","Downarrow":"â","DownArrowUpArrow":"âµ","DownBreve":"Ì","downdownarrows":"â","downharpoonleft":"â","downharpoonright":"â","DownLeftRightVector":"â¥","DownLeftTeeVector":"â¥","DownLeftVectorBar":"â¥","DownLeftVector":"â½","DownRightTeeVector":"â¥","DownRightVectorBar":"â¥","DownRightVector":"â","DownTeeArrow":"â§","DownTee":"â¤","drbkarow":"â¤","drcorn":"â","drcrop":"â","Dscr":"ð","dscr":"ð¹","DScy":"Ð
","dscy":"Ñ","dsol":"â§¶","Dstrok":"Ä","dstrok":"Ä","dtdot":"â±","dtri":"â¿","dtrif":"â¾","duarr":"âµ","duhar":"⥯","dwangle":"⦦","DZcy":"Ð","dzcy":"Ñ","dzigrarr":"â¿","Eacute":"Ã","eacute":"é","easter":"â©®","Ecaron":"Ä","ecaron":"Ä","Ecirc":"Ã","ecirc":"ê","ecir":"â","ecolon":"â","Ecy":"Ð","ecy":"Ñ","eDDot":"â©·","Edot":"Ä","edot":"Ä","eDot":"â","ee":"â
","efDot":"â","Efr":"ð","efr":"ð¢","eg":"âª","Egrave":"Ã","egrave":"è","egs":"âª","egsdot":"âª","el":"âª","Element":"â","elinters":"â§","ell":"â","els":"âª","elsdot":"âª","Emacr":"Ä","emacr":"Ä","empty":"â
","emptyset":"â
","EmptySmallSquare":"â»","emptyv":"â
","EmptyVerySmallSquare":"â«","emsp13":"â","emsp14":"â
","emsp":"â","ENG":"Å","eng":"Å","ensp":"â","Eogon":"Ä","eogon":"Ä","Eopf":"ð¼","eopf":"ð","epar":"â","eparsl":"â§£","eplus":"⩱","epsi":"ε","Epsilon":"Î","epsilon":"ε","epsiv":"ϵ","eqcirc":"â","eqcolon":"â","eqsim":"â","eqslantgtr":"âª","eqslantless":"âª","Equal":"⩵","equals":"=","EqualTilde":"â","equest":"â","Equilibrium":"â","equiv":"â¡","equivDD":"⩸","eqvparsl":"â§¥","erarr":"⥱","erDot":"â","escr":"â¯","Escr":"â°","esdot":"â","Esim":"⩳","esim":"â","Eta":"Î","eta":"η","ETH":"Ã","eth":"ð","Euml":"Ã","euml":"ë","euro":"â¬","excl":"!","exist":"â","Exists":"â","expectation":"â°","exponentiale":"â
","ExponentialE":"â
","fallingdotseq":"â","Fcy":"Ф","fcy":"Ñ","female":"â","ffilig":"ï¬","fflig":"ï¬","ffllig":"ï¬","Ffr":"ð","ffr":"ð£","filig":"ï¬","FilledSmallSquare":"â¼","FilledVerySmallSquare":"âª","fjlig":"fj","flat":"â","fllig":"ï¬","fltns":"â±","fnof":"Æ","Fopf":"ð½","fopf":"ð","forall":"â","ForAll":"â","fork":"â","forkv":"â«","Fouriertrf":"â±","fpartint":"â¨","frac12":"½","frac13":"â
","frac14":"¼","frac15":"â
","frac16":"â
","frac18":"â
","frac23":"â
","frac25":"â
","frac34":"¾","frac35":"â
","frac38":"â
","frac45":"â
","frac56":"â
","frac58":"â
","frac78":"â
","frasl":"â","frown":"â¢","fscr":"ð»","Fscr":"â±","gacute":"ǵ","Gamma":"Î","gamma":"γ","Gammad":"Ï","gammad":"Ï","gap":"âª","Gbreve":"Ä","gbreve":"Ä","Gcedil":"Ä¢","Gcirc":"Ä","gcirc":"Ä","Gcy":"Ð","gcy":"г","Gdot":"Ä ","gdot":"Ä¡","ge":"â¥","gE":"â§","gEl":"âª","gel":"â","geq":"â¥","geqq":"â§","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"âª","gesdoto":"âª","gesdotol":"âª","gesl":"âï¸","gesles":"âª","Gfr":"ð","gfr":"ð¤","gg":"â«","Gg":"â","ggg":"â","gimel":"â·","GJcy":"Ð","gjcy":"Ñ","gla":"⪥","gl":"â·","glE":"âª","glj":"⪤","gnap":"âª","gnapprox":"âª","gne":"âª","gnE":"â©","gneq":"âª","gneqq":"â©","gnsim":"â§","Gopf":"ð¾","gopf":"ð","grave":"`","GreaterEqual":"â¥","GreaterEqualLess":"â","GreaterFullEqual":"â§","GreaterGreater":"⪢","GreaterLess":"â·","GreaterSlantEqual":"⩾","GreaterTilde":"â³","Gscr":"ð¢","gscr":"â","gsim":"â³","gsime":"âª","gsiml":"âª","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"â«","gtdot":"â","gtlPar":"â¦","gtquest":"⩼","gtrapprox":"âª","gtrarr":"⥸","gtrdot":"â","gtreqless":"â","gtreqqless":"âª","gtrless":"â·","gtrsim":"â³","gvertneqq":"â©ï¸","gvnE":"â©ï¸","Hacek":"Ë","hairsp":"â","half":"½","hamilt":"â","HARDcy":"Ъ","hardcy":"Ñ","harrcir":"â¥","harr":"â","hArr":"â","harrw":"â","Hat":"^","hbar":"â","Hcirc":"Ĥ","hcirc":"Ä¥","hearts":"â¥","heartsuit":"â¥","hellip":"â¦","hercon":"â¹","hfr":"ð¥","Hfr":"â","HilbertSpace":"â","hksearow":"⤥","hkswarow":"⤦","hoarr":"â¿","homtht":"â»","hookleftarrow":"â©","hookrightarrow":"âª","hopf":"ð","Hopf":"â","horbar":"â","HorizontalLine":"â","hscr":"ð½","Hscr":"â","hslash":"â","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"â","HumpEqual":"â","hybull":"â","hyphen":"â","Iacute":"Ã","iacute":"Ã","ic":"â£","Icirc":"Ã","icirc":"î","Icy":"Ð","icy":"и","Idot":"İ","IEcy":"Ð","iecy":"е","iexcl":"¡","iff":"â","ifr":"ð¦","Ifr":"â","Igrave":"Ã","igrave":"ì","ii":"â
","iiiint":"â¨","iiint":"â","iinfin":"â§","iiota":"â©","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"Ä«","image":"â","ImaginaryI":"â
","imagline":"â","imagpart":"â","imath":"ı","Im":"â","imof":"â·","imped":"Ƶ","Implies":"â","incare":"â
","in":"â","infin":"â","infintie":"â§","inodot":"ı","intcal":"âº","int":"â«","Int":"â¬","integers":"â¤","Integral":"â«","intercal":"âº","Intersection":"â","intlarhk":"â¨","intprod":"⨼","InvisibleComma":"â£","InvisibleTimes":"â¢","IOcy":"Ð","iocy":"Ñ","Iogon":"Ä®","iogon":"į","Iopf":"ð","iopf":"ð","Iota":"Î","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"ð¾","Iscr":"â","isin":"â","isindot":"âµ","isinE":"â¹","isins":"â´","isinsv":"â³","isinv":"â","it":"â¢","Itilde":"Ĩ","itilde":"Ä©","Iukcy":"Ð","iukcy":"Ñ","Iuml":"Ã","iuml":"ï","Jcirc":"Ä´","jcirc":"ĵ","Jcy":"Ð","jcy":"й","Jfr":"ð","jfr":"ð§","jmath":"È·","Jopf":"ð","jopf":"ð","Jscr":"ð¥","jscr":"ð¿","Jsercy":"Ð","jsercy":"Ñ","Jukcy":"Ð","jukcy":"Ñ","Kappa":"Î","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"Ä·","Kcy":"Ð","kcy":"к","Kfr":"ð","kfr":"ð¨","kgreen":"ĸ","KHcy":"Ð¥","khcy":"Ñ
","KJcy":"Ð","kjcy":"Ñ","Kopf":"ð","kopf":"ð","Kscr":"ð¦","kscr":"ð","lAarr":"â","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"â","Lambda":"Î","lambda":"λ","lang":"â¨","Lang":"âª","langd":"â¦","langle":"â¨","lap":"âª
","Laplacetrf":"â","laquo":"«","larrb":"â¤","larrbfs":"â¤","larr":"â","Larr":"â","lArr":"â","larrfs":"â¤","larrhk":"â©","larrlp":"â«","larrpl":"⤹","larrsim":"⥳","larrtl":"â¢","latail":"â¤","lAtail":"â¤","lat":"⪫","late":"âª","lates":"âªï¸","lbarr":"â¤","lBarr":"â¤","lbbrk":"â²","lbrace":"{","lbrack":"[","lbrke":"â¦","lbrksld":"â¦","lbrkslu":"â¦","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ä»","lcedil":"ļ","lceil":"â","lcub":"{","Lcy":"Ð","lcy":"л","ldca":"⤶","ldquo":"â","ldquor":"â","ldrdhar":"⥧","ldrushar":"â¥","ldsh":"â²","le":"â¤","lE":"â¦","LeftAngleBracket":"â¨","LeftArrowBar":"â¤","leftarrow":"â","LeftArrow":"â","Leftarrow":"â","LeftArrowRightArrow":"â","leftarrowtail":"â¢","LeftCeiling":"â","LeftDoubleBracket":"â¦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"â¥","LeftDownVector":"â","LeftFloor":"â","leftharpoondown":"â½","leftharpoonup":"â¼","leftleftarrows":"â","leftrightarrow":"â","LeftRightArrow":"â","Leftrightarrow":"â","leftrightarrows":"â","leftrightharpoons":"â","leftrightsquigarrow":"â","LeftRightVector":"â¥","LeftTeeArrow":"â¤","LeftTee":"â£","LeftTeeVector":"â¥","leftthreetimes":"â","LeftTriangleBar":"â§","LeftTriangle":"â²","LeftTriangleEqual":"â´","LeftUpDownVector":"â¥","LeftUpTeeVector":"⥠","LeftUpVectorBar":"â¥","LeftUpVector":"â¿","LeftVectorBar":"â¥","LeftVector":"â¼","lEg":"âª","leg":"â","leq":"â¤","leqq":"â¦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"â©¿","lesdoto":"âª","lesdotor":"âª","lesg":"âï¸","lesges":"âª","lessapprox":"âª
","lessdot":"â","lesseqgtr":"â","lesseqqgtr":"âª","LessEqualGreater":"â","LessFullEqual":"â¦","LessGreater":"â¶","lessgtr":"â¶","LessLess":"⪡","lesssim":"â²","LessSlantEqual":"⩽","LessTilde":"â²","lfisht":"⥼","lfloor":"â","Lfr":"ð","lfr":"ð©","lg":"â¶","lgE":"âª","lHar":"⥢","lhard":"â½","lharu":"â¼","lharul":"⥪","lhblk":"â","LJcy":"Ð","ljcy":"Ñ","llarr":"â","ll":"âª","Ll":"â","llcorner":"â","Lleftarrow":"â","llhard":"⥫","lltri":"âº","Lmidot":"Ä¿","lmidot":"Å","lmoustache":"â°","lmoust":"â°","lnap":"âª","lnapprox":"âª","lne":"âª","lnE":"â¨","lneq":"âª","lneqq":"â¨","lnsim":"â¦","loang":"â¬","loarr":"â½","lobrk":"â¦","longleftarrow":"âµ","LongLeftArrow":"âµ","Longleftarrow":"â¸","longleftrightarrow":"â·","LongLeftRightArrow":"â·","Longleftrightarrow":"âº","longmapsto":"â¼","longrightarrow":"â¶","LongRightArrow":"â¶","Longrightarrow":"â¹","looparrowleft":"â«","looparrowright":"â¬","lopar":"â¦
","Lopf":"ð","lopf":"ð","loplus":"â¨","lotimes":"⨴","lowast":"â","lowbar":"_","LowerLeftArrow":"â","LowerRightArrow":"â","loz":"â","lozenge":"â","lozf":"â§«","lpar":"(","lparlt":"â¦","lrarr":"â","lrcorner":"â","lrhar":"â","lrhard":"â¥","lrm":"â","lrtri":"â¿","lsaquo":"â¹","lscr":"ð","Lscr":"â","lsh":"â°","Lsh":"â°","lsim":"â²","lsime":"âª","lsimg":"âª","lsqb":"[","lsquo":"â","lsquor":"â","Lstrok":"Å","lstrok":"Å","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"âª","ltdot":"â","lthree":"â","ltimes":"â","ltlarr":"⥶","ltquest":"â©»","ltri":"â","ltrie":"â´","ltrif":"â","ltrPar":"â¦","lurdshar":"â¥","luruhar":"⥦","lvertneqq":"â¨ï¸","lvnE":"â¨ï¸","macr":"¯","male":"â","malt":"â ","maltese":"â ","Map":"â¤
","map":"â¦","mapsto":"â¦","mapstodown":"â§","mapstoleft":"â¤","mapstoup":"â¥","marker":"â®","mcomma":"⨩","Mcy":"Ð","mcy":"м","mdash":"â","mDDot":"âº","measuredangle":"â¡","MediumSpace":"â","Mellintrf":"â³","Mfr":"ð","mfr":"ðª","mho":"â§","micro":"µ","midast":"*","midcir":"â«°","mid":"â£","middot":"·","minusb":"â","minus":"â","minusd":"â¸","minusdu":"⨪","MinusPlus":"â","mlcp":"â«","mldr":"â¦","mnplus":"â","models":"â§","Mopf":"ð","mopf":"ð","mp":"â","mscr":"ð","Mscr":"â³","mstpos":"â¾","Mu":"Î","mu":"μ","multimap":"â¸","mumap":"â¸","nabla":"â","Nacute":"Å","nacute":"Å","nang":"â â","nap":"â","napE":"⩰̸","napid":"â̸","napos":"Å","napprox":"â","natural":"â®","naturals":"â","natur":"â®","nbsp":" ","nbump":"â̸","nbumpe":"â̸","ncap":"â©","Ncaron":"Å","ncaron":"Å","Ncedil":"Å
","ncedil":"Å","ncong":"â","ncongdot":"â©Ì¸","ncup":"â©","Ncy":"Ð","ncy":"н","ndash":"â","nearhk":"⤤","nearr":"â","neArr":"â","nearrow":"â","ne":"â ","nedot":"â̸","NegativeMediumSpace":"â","NegativeThickSpace":"â","NegativeThinSpace":"â","NegativeVeryThinSpace":"â","nequiv":"â¢","nesear":"⤨","nesim":"â̸","NestedGreaterGreater":"â«","NestedLessLess":"âª","NewLine":"\\n","nexist":"â","nexists":"â","Nfr":"ð","nfr":"ð«","ngE":"â§Ì¸","nge":"â±","ngeq":"â±","ngeqq":"â§Ì¸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"â̸","ngsim":"âµ","nGt":"â«â","ngt":"â¯","ngtr":"â¯","nGtv":"â«Ì¸","nharr":"â®","nhArr":"â","nhpar":"⫲","ni":"â","nis":"â¼","nisd":"âº","niv":"â","NJcy":"Ð","njcy":"Ñ","nlarr":"â","nlArr":"â","nldr":"â¥","nlE":"â¦Ì¸","nle":"â°","nleftarrow":"â","nLeftarrow":"â","nleftrightarrow":"â®","nLeftrightarrow":"â","nleq":"â°","nleqq":"â¦Ì¸","nleqslant":"⩽̸","nles":"⩽̸","nless":"â®","nLl":"â̸","nlsim":"â´","nLt":"âªâ","nlt":"â®","nltri":"âª","nltrie":"â¬","nLtv":"âªÌ¸","nmid":"â¤","NoBreak":"â ","NonBreakingSpace":" ","nopf":"ð","Nopf":"â","Not":"⫬","not":"¬","NotCongruent":"â¢","NotCupCap":"â","NotDoubleVerticalBar":"â¦","NotElement":"â","NotEqual":"â ","NotEqualTilde":"â̸","NotExists":"â","NotGreater":"â¯","NotGreaterEqual":"â±","NotGreaterFullEqual":"â§Ì¸","NotGreaterGreater":"â«Ì¸","NotGreaterLess":"â¹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"âµ","NotHumpDownHump":"â̸","NotHumpEqual":"â̸","notin":"â","notindot":"âµÌ¸","notinE":"â¹Ì¸","notinva":"â","notinvb":"â·","notinvc":"â¶","NotLeftTriangleBar":"â§Ì¸","NotLeftTriangle":"âª","NotLeftTriangleEqual":"â¬","NotLess":"â®","NotLessEqual":"â°","NotLessGreater":"â¸","NotLessLess":"âªÌ¸","NotLessSlantEqual":"⩽̸","NotLessTilde":"â´","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"â","notniva":"â","notnivb":"â¾","notnivc":"â½","NotPrecedes":"â","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"â ","NotReverseElement":"â","NotRightTriangleBar":"â§Ì¸","NotRightTriangle":"â«","NotRightTriangleEqual":"â","NotSquareSubset":"â̸","NotSquareSubsetEqual":"â¢","NotSquareSuperset":"â̸","NotSquareSupersetEqual":"â£","NotSubset":"ââ","NotSubsetEqual":"â","NotSucceeds":"â","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"â¡","NotSucceedsTilde":"â¿Ì¸","NotSuperset":"ââ","NotSupersetEqual":"â","NotTilde":"â","NotTildeEqual":"â","NotTildeFullEqual":"â","NotTildeTilde":"â","NotVerticalBar":"â¤","nparallel":"â¦","npar":"â¦","nparsl":"⫽â¥","npart":"â̸","npolint":"â¨","npr":"â","nprcue":"â ","nprec":"â","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"â","nrArr":"â","nrarrw":"â̸","nrightarrow":"â","nRightarrow":"â","nrtri":"â«","nrtrie":"â","nsc":"â","nsccue":"â¡","nsce":"⪰̸","Nscr":"ð©","nscr":"ð","nshortmid":"â¤","nshortparallel":"â¦","nsim":"â","nsime":"â","nsimeq":"â","nsmid":"â¤","nspar":"â¦","nsqsube":"â¢","nsqsupe":"â£","nsub":"â","nsubE":"â«
̸","nsube":"â","nsubset":"ââ","nsubseteq":"â","nsubseteqq":"â«
̸","nsucc":"â","nsucceq":"⪰̸","nsup":"â
","nsupE":"â«Ì¸","nsupe":"â","nsupset":"ââ","nsupseteq":"â","nsupseteqq":"â«Ì¸","ntgl":"â¹","Ntilde":"Ã","ntilde":"ñ","ntlg":"â¸","ntriangleleft":"âª","ntrianglelefteq":"â¬","ntriangleright":"â«","ntrianglerighteq":"â","Nu":"Î","nu":"ν","num":"#","numero":"â","numsp":"â","nvap":"ââ","nvdash":"â¬","nvDash":"â","nVdash":"â®","nVDash":"â¯","nvge":"â¥â","nvgt":">â","nvHarr":"â¤","nvinfin":"â§","nvlArr":"â¤","nvle":"â¤â","nvlt":"<â","nvltrie":"â´â","nvrArr":"â¤","nvrtrie":"âµâ","nvsim":"â¼â","nwarhk":"⤣","nwarr":"â","nwArr":"â","nwarrow":"â","nwnear":"⤧","Oacute":"Ã","oacute":"ó","oast":"â","Ocirc":"Ã","ocirc":"ô","ocir":"â","Ocy":"Ð","ocy":"о","odash":"â","Odblac":"Å","odblac":"Å","odiv":"⨸","odot":"â","odsold":"⦼","OElig":"Å","oelig":"Å","ofcir":"⦿","Ofr":"ð","ofr":"ð¬","ogon":"Ë","Ograve":"Ã","ograve":"ò","ogt":"â§","ohbar":"⦵","ohm":"Ω","oint":"â®","olarr":"âº","olcir":"⦾","olcross":"⦻","oline":"â¾","olt":"â§","Omacr":"Å","omacr":"Å","Omega":"Ω","omega":"Ï","Omicron":"Î","omicron":"ο","omid":"⦶","ominus":"â","Oopf":"ð","oopf":"ð ","opar":"⦷","OpenCurlyDoubleQuote":"â","OpenCurlyQuote":"â","operp":"⦹","oplus":"â","orarr":"â»","Or":"â©","or":"â¨","ord":"â©","order":"â´","orderof":"â´","ordf":"ª","ordm":"º","origof":"â¶","oror":"â©","orslope":"â©","orv":"â©","oS":"â","Oscr":"ðª","oscr":"â´","Oslash":"Ã","oslash":"ø","osol":"â","Otilde":"Ã","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"â","Ouml":"Ã","ouml":"ö","ovbar":"â½","OverBar":"â¾","OverBrace":"â","OverBracket":"â´","OverParenthesis":"â","para":"¶","parallel":"â¥","par":"â¥","parsim":"⫳","parsl":"⫽","part":"â","PartialD":"â","Pcy":"Ð","pcy":"п","percnt":"%","period":".","permil":"â°","perp":"â¥","pertenk":"â±","Pfr":"ð","pfr":"ð","Phi":"Φ","phi":"Ï","phiv":"Ï","phmmat":"â³","phone":"â","Pi":"Î ","pi":"Ï","pitchfork":"â","piv":"Ï","planck":"â","planckh":"â","plankv":"â","plusacir":"⨣","plusb":"â","pluscir":"⨢","plus":"+","plusdo":"â","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"â","pointint":"â¨","popf":"ð¡","Popf":"â","pound":"£","prap":"⪷","Pr":"⪻","pr":"âº","prcue":"â¼","precapprox":"⪷","prec":"âº","preccurlyeq":"â¼","Precedes":"âº","PrecedesEqual":"⪯","PrecedesSlantEqual":"â¼","PrecedesTilde":"â¾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"â¨","pre":"⪯","prE":"⪳","precsim":"â¾","prime":"â²","Prime":"â³","primes":"â","prnap":"⪹","prnE":"⪵","prnsim":"â¨","prod":"â","Product":"â","profalar":"â®","profline":"â","profsurf":"â","prop":"â","Proportional":"â","Proportion":"â·","propto":"â","prsim":"â¾","prurel":"â°","Pscr":"ð«","pscr":"ð
","Psi":"Ψ","psi":"Ï","puncsp":"â","Qfr":"ð","qfr":"ð®","qint":"â¨","qopf":"ð¢","Qopf":"â","qprime":"â","Qscr":"ð¬","qscr":"ð","quaternions":"â","quatint":"â¨","quest":"?","questeq":"â","quot":"\\"","QUOT":"\\"","rAarr":"â","race":"â½Ì±","Racute":"Å","racute":"Å","radic":"â","raemptyv":"⦳","rang":"â©","Rang":"â«","rangd":"â¦","range":"⦥","rangle":"â©","raquo":"»","rarrap":"⥵","rarrb":"â¥","rarrbfs":"⤠","rarrc":"⤳","rarr":"â","Rarr":"â ","rArr":"â","rarrfs":"â¤","rarrhk":"âª","rarrlp":"â¬","rarrpl":"â¥
","rarrsim":"⥴","Rarrtl":"â¤","rarrtl":"â£","rarrw":"â","ratail":"â¤","rAtail":"â¤","ratio":"â¶","rationals":"â","rbarr":"â¤","rBarr":"â¤","RBarr":"â¤","rbbrk":"â³","rbrace":"}","rbrack":"]","rbrke":"â¦","rbrksld":"â¦","rbrkslu":"â¦","Rcaron":"Å","rcaron":"Å","Rcedil":"Å","rcedil":"Å","rceil":"â","rcub":"}","Rcy":"Ð ","rcy":"Ñ","rdca":"⤷","rdldhar":"⥩","rdquo":"â","rdquor":"â","rdsh":"â³","real":"â","realine":"â","realpart":"â","reals":"â","Re":"â","rect":"â","reg":"®","REG":"®","ReverseElement":"â","ReverseEquilibrium":"â","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"â","rfr":"ð¯","Rfr":"â","rHar":"⥤","rhard":"â","rharu":"â","rharul":"⥬","Rho":"Ρ","rho":"Ï","rhov":"ϱ","RightAngleBracket":"â©","RightArrowBar":"â¥","rightarrow":"â","RightArrow":"â","Rightarrow":"â","RightArrowLeftArrow":"â","rightarrowtail":"â£","RightCeiling":"â","RightDoubleBracket":"â§","RightDownTeeVector":"â¥","RightDownVectorBar":"â¥","RightDownVector":"â","RightFloor":"â","rightharpoondown":"â","rightharpoonup":"â","rightleftarrows":"â","rightleftharpoons":"â","rightrightarrows":"â","rightsquigarrow":"â","RightTeeArrow":"â¦","RightTee":"â¢","RightTeeVector":"â¥","rightthreetimes":"â","RightTriangleBar":"â§","RightTriangle":"â³","RightTriangleEqual":"âµ","RightUpDownVector":"â¥","RightUpTeeVector":"â¥","RightUpVectorBar":"â¥","RightUpVector":"â¾","RightVectorBar":"â¥","RightVector":"â","ring":"Ë","risingdotseq":"â","rlarr":"â","rlhar":"â","rlm":"â","rmoustache":"â±","rmoust":"â±","rnmid":"â«®","roang":"â","roarr":"â¾","robrk":"â§","ropar":"â¦","ropf":"ð£","Ropf":"â","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"â¦","rppolint":"â¨","rrarr":"â","Rrightarrow":"â","rsaquo":"âº","rscr":"ð","Rscr":"â","rsh":"â±","Rsh":"â±","rsqb":"]","rsquo":"â","rsquor":"â","rthree":"â","rtimes":"â","rtri":"â¹","rtrie":"âµ","rtrif":"â¸","rtriltri":"â§","RuleDelayed":"â§´","ruluhar":"⥨","rx":"â","Sacute":"Å","sacute":"Å","sbquo":"â","scap":"⪸","Scaron":"Å ","scaron":"Å¡","Sc":"⪼","sc":"â»","sccue":"â½","sce":"⪰","scE":"⪴","Scedil":"Å","scedil":"Å","Scirc":"Å","scirc":"Å","scnap":"⪺","scnE":"⪶","scnsim":"â©","scpolint":"â¨","scsim":"â¿","Scy":"С","scy":"Ñ","sdotb":"â¡","sdot":"â
","sdote":"⩦","searhk":"⤥","searr":"â","seArr":"â","searrow":"â","sect":"§","semi":";","seswar":"⤩","setminus":"â","setmn":"â","sext":"â¶","Sfr":"ð","sfr":"ð°","sfrown":"â¢","sharp":"â¯","SHCHcy":"Щ","shchcy":"Ñ","SHcy":"Ш","shcy":"Ñ","ShortDownArrow":"â","ShortLeftArrow":"â","shortmid":"â£","shortparallel":"â¥","ShortRightArrow":"â","ShortUpArrow":"â","shy":"Â","Sigma":"Σ","sigma":"Ï","sigmaf":"Ï","sigmav":"Ï","sim":"â¼","simdot":"⩪","sime":"â","simeq":"â","simg":"âª","simgE":"⪠","siml":"âª","simlE":"âª","simne":"â","simplus":"⨤","simrarr":"⥲","slarr":"â","SmallCircle":"â","smallsetminus":"â","smashp":"⨳","smeparsl":"⧤","smid":"â£","smile":"â£","smt":"⪪","smte":"⪬","smtes":"⪬ï¸","SOFTcy":"Ь","softcy":"Ñ","solbar":"â¿","solb":"â§","sol":"/","Sopf":"ð","sopf":"ð¤","spades":"â ","spadesuit":"â ","spar":"â¥","sqcap":"â","sqcaps":"âï¸","sqcup":"â","sqcups":"âï¸","Sqrt":"â","sqsub":"â","sqsube":"â","sqsubset":"â","sqsubseteq":"â","sqsup":"â","sqsupe":"â","sqsupset":"â","sqsupseteq":"â","square":"â¡","Square":"â¡","SquareIntersection":"â","SquareSubset":"â","SquareSubsetEqual":"â","SquareSuperset":"â","SquareSupersetEqual":"â","SquareUnion":"â","squarf":"âª","squ":"â¡","squf":"âª","srarr":"â","Sscr":"ð®","sscr":"ð","ssetmn":"â","ssmile":"â£","sstarf":"â","Star":"â","star":"â","starf":"â
","straightepsilon":"ϵ","straightphi":"Ï","strns":"¯","sub":"â","Sub":"â","subdot":"⪽","subE":"â«
","sube":"â","subedot":"â«","submult":"â«","subnE":"â«","subne":"â","subplus":"⪿","subrarr":"⥹","subset":"â","Subset":"â","subseteq":"â","subseteqq":"â«
","SubsetEqual":"â","subsetneq":"â","subsetneqq":"â«","subsim":"â«","subsub":"â«","subsup":"â«","succapprox":"⪸","succ":"â»","succcurlyeq":"â½","Succeeds":"â»","SucceedsEqual":"⪰","SucceedsSlantEqual":"â½","SucceedsTilde":"â¿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"â©","succsim":"â¿","SuchThat":"â","sum":"â","Sum":"â","sung":"âª","sup1":"¹","sup2":"²","sup3":"³","sup":"â","Sup":"â","supdot":"⪾","supdsub":"â«","supE":"â«","supe":"â","supedot":"â«","Superset":"â","SupersetEqual":"â","suphsol":"â","suphsub":"â«","suplarr":"⥻","supmult":"â«","supnE":"â«","supne":"â","supplus":"â«","supset":"â","Supset":"â","supseteq":"â","supseteqq":"â«","supsetneq":"â","supsetneqq":"â«","supsim":"â«","supsub":"â«","supsup":"â«","swarhk":"⤦","swarr":"â","swArr":"â","swarrow":"â","swnwar":"⤪","szlig":"Ã","Tab":"\\t","target":"â","Tau":"Τ","tau":"Ï","tbrk":"â´","Tcaron":"Ť","tcaron":"Å¥","Tcedil":"Å¢","tcedil":"Å£","Tcy":"Т","tcy":"Ñ","tdot":"â","telrec":"â","Tfr":"ð","tfr":"ð±","there4":"â´","therefore":"â´","Therefore":"â´","Theta":"Î","theta":"θ","thetasym":"Ï","thetav":"Ï","thickapprox":"â","thicksim":"â¼","ThickSpace":"ââ","ThinSpace":"â","thinsp":"â","thkap":"â","thksim":"â¼","THORN":"Ã","thorn":"þ","tilde":"Ë","Tilde":"â¼","TildeEqual":"â","TildeFullEqual":"â
","TildeTilde":"â","timesbar":"⨱","timesb":"â ","times":"Ã","timesd":"⨰","tint":"â","toea":"⤨","topbot":"â¶","topcir":"⫱","top":"â¤","Topf":"ð","topf":"ð¥","topfork":"â«","tosa":"⤩","tprime":"â´","trade":"â¢","TRADE":"â¢","triangle":"âµ","triangledown":"â¿","triangleleft":"â","trianglelefteq":"â´","triangleq":"â","triangleright":"â¹","trianglerighteq":"âµ","tridot":"â¬","trie":"â","triminus":"⨺","TripleDot":"â","triplus":"⨹","trisb":"â§","tritime":"⨻","trpezium":"â¢","Tscr":"ð¯","tscr":"ð","TScy":"Ц","tscy":"Ñ","TSHcy":"Ð","tshcy":"Ñ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"â¬","twoheadleftarrow":"â","twoheadrightarrow":"â ","Uacute":"Ã","uacute":"ú","uarr":"â","Uarr":"â","uArr":"â","Uarrocir":"â¥","Ubrcy":"Ð","ubrcy":"Ñ","Ubreve":"Ŭ","ubreve":"Å","Ucirc":"Ã","ucirc":"û","Ucy":"У","ucy":"Ñ","udarr":"â
","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"ð","ufr":"ð²","Ugrave":"Ã","ugrave":"ù","uHar":"⥣","uharl":"â¿","uharr":"â¾","uhblk":"â","ulcorn":"â","ulcorner":"â","ulcrop":"â","ultri":"â¸","Umacr":"Ū","umacr":"Å«","uml":"¨","UnderBar":"_","UnderBrace":"â","UnderBracket":"âµ","UnderParenthesis":"â","Union":"â","UnionPlus":"â","Uogon":"Ų","uogon":"ų","Uopf":"ð","uopf":"ð¦","UpArrowBar":"â¤","uparrow":"â","UpArrow":"â","Uparrow":"â","UpArrowDownArrow":"â
","updownarrow":"â","UpDownArrow":"â","Updownarrow":"â","UpEquilibrium":"⥮","upharpoonleft":"â¿","upharpoonright":"â¾","uplus":"â","UpperLeftArrow":"â","UpperRightArrow":"â","upsi":"Ï
","Upsi":"Ï","upsih":"Ï","Upsilon":"Î¥","upsilon":"Ï
","UpTeeArrow":"â¥","UpTee":"â¥","upuparrows":"â","urcorn":"â","urcorner":"â","urcrop":"â","Uring":"Å®","uring":"ů","urtri":"â¹","Uscr":"ð°","uscr":"ð","utdot":"â°","Utilde":"Ũ","utilde":"Å©","utri":"âµ","utrif":"â´","uuarr":"â","Uuml":"Ã","uuml":"ü","uwangle":"⦧","vangrt":"â¦","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"â
","varphi":"Ï","varpi":"Ï","varpropto":"â","varr":"â","vArr":"â","varrho":"ϱ","varsigma":"Ï","varsubsetneq":"âï¸","varsubsetneqq":"â«ï¸","varsupsetneq":"âï¸","varsupsetneqq":"â«ï¸","vartheta":"Ï","vartriangleleft":"â²","vartriangleright":"â³","vBar":"⫨","Vbar":"â««","vBarv":"â«©","Vcy":"Ð","vcy":"в","vdash":"â¢","vDash":"â¨","Vdash":"â©","VDash":"â«","Vdashl":"⫦","veebar":"â»","vee":"â¨","Vee":"â","veeeq":"â","vellip":"â®","verbar":"|","Verbar":"â","vert":"|","Vert":"â","VerticalBar":"â£","VerticalLine":"|","VerticalSeparator":"â","VerticalTilde":"â","VeryThinSpace":"â","Vfr":"ð","vfr":"ð³","vltri":"â²","vnsub":"ââ","vnsup":"ââ","Vopf":"ð","vopf":"ð§","vprop":"â","vrtri":"â³","Vscr":"ð±","vscr":"ð","vsubnE":"â«ï¸","vsubne":"âï¸","vsupnE":"â«ï¸","vsupne":"âï¸","Vvdash":"âª","vzigzag":"â¦","Wcirc":"Å´","wcirc":"ŵ","wedbar":"â©","wedge":"â§","Wedge":"â","wedgeq":"â","weierp":"â","Wfr":"ð","wfr":"ð´","Wopf":"ð","wopf":"ð¨","wp":"â","wr":"â","wreath":"â","Wscr":"ð²","wscr":"ð","xcap":"â","xcirc":"â¯","xcup":"â","xdtri":"â½","Xfr":"ð","xfr":"ðµ","xharr":"â·","xhArr":"âº","Xi":"Î","xi":"ξ","xlarr":"âµ","xlArr":"â¸","xmap":"â¼","xnis":"â»","xodot":"â¨","Xopf":"ð","xopf":"ð©","xoplus":"â¨","xotime":"â¨","xrarr":"â¶","xrArr":"â¹","Xscr":"ð³","xscr":"ð","xsqcup":"â¨","xuplus":"â¨","xutri":"â³","xvee":"â","xwedge":"â","Yacute":"Ã","yacute":"ý","YAcy":"Я","yacy":"Ñ","Ycirc":"Ŷ","ycirc":"Å·","Ycy":"Ы","ycy":"Ñ","yen":"Â¥","Yfr":"ð","yfr":"ð¶","YIcy":"Ð","yicy":"Ñ","Yopf":"ð","yopf":"ðª","Yscr":"ð´","yscr":"ð","YUcy":"Ю","yucy":"Ñ","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"Ð","zcy":"з","Zdot":"Å»","zdot":"ż","zeetrf":"â¨","ZeroWidthSpace":"â","Zeta":"Î","zeta":"ζ","zfr":"ð·","Zfr":"â¨","ZHcy":"Ð","zhcy":"ж","zigrarr":"â","zopf":"ð«","Zopf":"â¤","Zscr":"ðµ","zscr":"ð","zwj":"â","zwnj":"â"}')},
14306963,(e,t,r)=>{"use strict";t.exports=e.r(274846)},785306,(e,t,r)=>{"use strict";var i=Object.prototype.hasOwnProperty;function n(e,t){return i.call(e,t)}function s(e){return(!(e>=55296)||!(e<=57343))&&(!(e>=64976)||!(e<=65007))&&(65535&e)!=65535&&(65535&e)!=65534&&(!(e>=0)||!(e<=8))&&11!==e&&(!(e>=14)||!(e<=31))&&(!(e>=127)||!(e<=159))&&!(e>1114111)&&!0}function o(e){return e>65535?String.fromCharCode(55296+((e-=65536)>>10),56320+(1023&e)):String.fromCharCode(e)}var a=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=RegExp(a.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i,u=e.r(306963),d=/[&<>"]/,p=/[&<>"]/g,m={"&":"&","<":"<",">":">",'"':"""};function h(e){return m[e]}var g=/[.?*+^$[\]\\(){}|-]/g,x=e.r(484865);r.lib={},r.lib.mdurl=e.r(274899),r.lib.ucmicro=e.r(303672),r.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){if(t){if("object"!=typeof t)throw TypeError(t+"must be object");Object.keys(t).forEach(function(r){e[r]=t[r]})}}),e},r.isString=function(e){return"[object String]"===Object.prototype.toString.call(e)},r.has=n,r.unescapeMd=function(e){return 0>e.indexOf("\\")?e:e.replace(a,"$1")},r.unescapeAll=function(e){return 0>e.indexOf("\\")&&0>e.indexOf("&")?e:e.replace(l,function(e,t,r){var i;if(t)return t;return n(u,r)?u[r]:35===r.charCodeAt(0)&&c.test(r)&&s(i="x"===r[1].toLowerCase()?parseInt(r.slice(2),16):parseInt(r.slice(1),10))?o(i):e})},r.isValidEntityCode=s,r.fromCodePoint=o,r.escapeHtml=function(e){return d.test(e)?e.replace(p,h):e},r.arrayReplaceAt=function(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))},r.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},r.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},r.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},r.isPunctChar=function(e){return x.test(e)},r.escapeRE=function(e){return e.replace(g,"\\$&")},r.normalizeReference=function(e){return(e=e.trim().replace(/\s+/g," ")).toLowerCase().toUpperCase()}},999876,(e,t,r)=>{"use strict";t.exports=function(e,t,r){var i,n,s,o,a=-1,l=e.posMax,c=e.pos;for(e.pos=t+1,i=1;e.pos<l;){if(93===(s=e.src.charCodeAt(e.pos))&&0==--i){n=!0;break}if(o=e.pos,e.md.inline.skipToken(e),91===s){if(o===e.pos-1)i++;else if(r)return e.pos=c,-1}}return n&&(a=e.pos),e.pos=c,a}},806282,(e,t,r)=>{"use strict";var i=e.r(785306).unescapeAll;t.exports=function(e,t,r){var n,s,o=t,a={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(o)){for(o++;o<r&&10!==(n=e.charCodeAt(o))&&60!==n;){if(62===n){a.pos=o+1,a.str=i(e.slice(t+1,o)),a.ok=!0;break}if(92===n&&o+1<r){o+=2;continue}o++}return a}for(s=0;o<r&&32!==(n=e.charCodeAt(o))&&!(n<32)&&127!==n;){if(92===n&&o+1<r){if(32===e.charCodeAt(o+1))break;o+=2;continue}if(40===n&&++s>32)return a;
14if(41===n){if(0===s)break;s--}o++}return t===o||0!==s||(a.str=i(e.slice(t,o)),a.pos=o,a.ok=!0),a}},807095,(e,t,r)=>{"use strict";var i=e.r(785306).unescapeAll;t.exports=function(e,t,r){var n,s,o=0,a=t,l={ok:!1,pos:0,lines:0,str:""};if(a>=r||34!==(s=e.charCodeAt(a))&&39!==s&&40!==s)return l;for(a++,40===s&&(s=41);a<r;){if((n=e.charCodeAt(a))===s){l.pos=a+1,l.lines=o,l.str=i(e.slice(t+1,a)),l.ok=!0;break}if(40===n&&41===s)break;10===n?o++:92===n&&a+1<r&&(a++,10===e.charCodeAt(a)&&o++);a++}return l}},979167,(e,t,r)=>{"use strict";r.parseLinkLabel=e.r(999876),r.parseLinkDestination=e.r(806282),r.parseLinkTitle=e.r(807095)},681902,(e,t,r)=>{"use strict";var i=e.r(785306).assign,n=e.r(785306).unescapeAll,s=e.r(785306).escapeHtml,o={};function a(){this.rules=i({},o)}o.code_inline=function(e,t,r,i,n){var o=e[t];return"<code"+n.renderAttrs(o)+">"+s(o.content)+"</code>"},o.code_block=function(e,t,r,i,n){var o=e[t];return"<pre"+n.renderAttrs(o)+"><code>"+s(e[t].content)+"</code></pre>\n"},o.fence=function(e,t,r,i,o){var a,l,c,u,d=e[t],p=d.info?n(d.info).trim():"",m="",h="";return(p&&(m=(c=p.split(/(\s+)/g))[0],h=c.slice(2).join("")),0===(a=r.highlight&&r.highlight(d.content,m,h)||s(d.content)).indexOf("<pre"))?a+"\n":p?(l=d.attrIndex("class"),u=d.attrs?d.attrs.slice():[],l<0?u.push(["class",r.langPrefix+m]):(u[l]=u[l].slice(),u[l][1]+=" "+r.langPrefix+m),"<pre><code"+o.renderAttrs({attrs:u})+">"+a+"</code></pre>\n"):"<pre><code"+o.renderAttrs(d)+">"+a+"</code></pre>\n"},o.image=function(e,t,r,i,n){var s=e[t];return s.attrs[s.attrIndex("alt")][1]=n.renderInlineAsText(s.children,r,i),n.renderToken(e,t,r)},o.hardbreak=function(e,t,r){return r.xhtmlOut?"<br />\n":"<br>\n"},o.softbreak=function(e,t,r){return r.breaks?r.xhtmlOut?"<br />\n":"<br>\n":"\n"},o.text=function(e,t){return s(e[t].content)},o.html_block=function(e,t){return e[t].content},o.html_inline=function(e,t){return e[t].content},a.prototype.renderAttrs=function(e){var t,r,i;if(!e.attrs)return"";for(t=0,i="",r=e.attrs.length;t<r;t++)i+=" "+s(e.attrs[t][0])+'="'+s(e.attrs[t][1])+'"';return i},a.prototype.renderToken=function(e,t,r){var i,n="",s=!1,o=e[t];return o.hidden?"":(o.block&&-1!==o.nesting&&t&&e[t-1].hidden&&(n+="\n"),n+=(-1===o.nesting?"</":"<")+o.tag,n+=this.renderAttrs(o),0===o.nesting&&r.xhtmlOut&&(n+=" /"),o.block&&(s=!0,1===o.nesting&&t+1<e.length&&("inline"===(i=e[t+1]).type||i.hidden?s=!1:-1===i.nesting&&i.tag===o.tag&&(s=!1))),n+=s?">\n":">")},a.prototype.renderInline=function(e,t,r){for(var i,n="",s=this.rules,o=0,a=e.length;o<a;o++)void 0!==s[i=e[o].type]?n+=s[i](e,o,t,r,this):n+=this.renderToken(e,o,t);return n},a.prototype.renderInlineAsText=function(e,t,r){for(var i="",n=0,s=e.length;n<s;n++)"text"===e[n].type?i+=e[n].content:"image"===e[n].type?i+=this.renderInlineAsText(e[n].children,t,r):"softbreak"===e[n].type&&(i+="\n");return i},a.prototype.render=function(e,t,r){var i,n,s,o="",a=this.rules;for(i=0,n=e.length;i<n;i++)"inline"===(s=e[i].type)?o+=this.renderInline(e[i].children,t,r):void 0!==a[s]?o+=a[s](e,i,t,r,this):o+=this.renderToken(e,i,t,r);return o},t.exports=a},6108,(e,t,r)=>{"use strict";function i(e,t,r){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}i.prototype.attrIndex=function(e){var t,r,i;if(!this.attrs)return -1;for(r=0,i=(t=this.attrs).length;r<i;r++)if(t[r][0]===e)return r;return -1},i.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},i.prototype.attrSet=function(e,t){var r=this.attrIndex(e),i=[e,t];r<0?this.attrPush(i):this.attrs[r]=i},i.prototype.attrGet=function(e){var t=this.attrIndex(e),r=null;return t>=0&&(r=this.attrs[t][1]),r},i.prototype.attrJoin=function(e,t){var r=this.attrIndex(e);r<0?this.attrPush([e,t]):this.attrs[r][1]=this.attrs[r][1]+" "+t},t.exports=i},946480,(e,t,r)=>{"use strict";var i=e.r(6108);function n(e,t,r){this.src=e,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=t}n.prototype.Token=i,t.exports=n},46009,(e,t,r)=>{"use strict";function i(){this.__rules__=[],this.__cache__=null}i.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return -1},i.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach(function(e){e.enabled&&e.alt.forEach(function(e){0>t.indexOf(e)&&t.push(e)})}),e.__cache__={},t.forEach(function(t){e.__cache__[t]=[],e.__rules__.forEach(function(r){!r.enabled||t&&0>r.alt.indexOf(t)||e.__cache__[t].push(r.fn)})})},i.prototype.at=function(e,t,r){var i=this.__find__(e);
14if(-1===i)throw Error("Parser rule not found: "+e);this.__rules__[i].fn=t,this.__rules__[i].alt=(r||{}).alt||[],this.__cache__=null},i.prototype.before=function(e,t,r,i){var n=this.__find__(e);if(-1===n)throw Error("Parser rule not found: "+e);this.__rules__.splice(n,0,{name:t,enabled:!0,fn:r,alt:(i||{}).alt||[]}),this.__cache__=null},i.prototype.after=function(e,t,r,i){var n=this.__find__(e);if(-1===n)throw Error("Parser rule not found: "+e);this.__rules__.splice(n+1,0,{name:t,enabled:!0,fn:r,alt:(i||{}).alt||[]}),this.__cache__=null},i.prototype.push=function(e,t,r){this.__rules__.push({name:e,enabled:!0,fn:t,alt:(r||{}).alt||[]}),this.__cache__=null},i.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var r=[];return e.forEach(function(e){var i=this.__find__(e);if(i<0){if(t)return;throw Error("Rules manager: invalid rule name "+e)}this.__rules__[i].enabled=!0,r.push(e)},this),this.__cache__=null,r},i.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,t)},i.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var r=[];return e.forEach(function(e){var i=this.__find__(e);if(i<0){if(t)return;throw Error("Rules manager: invalid rule name "+e)}this.__rules__[i].enabled=!1,r.push(e)},this),this.__cache__=null,r},i.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},t.exports=i},437645,(e,t,r)=>{"use strict";var i=/\r\n?|\n/g,n=/\0/g;t.exports=function(e){var t;t=(t=e.src.replace(i,"\n")).replace(n,"�"),e.src=t}},900328,(e,t,r)=>{"use strict";t.exports=function(e){var t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},496848,(e,t,r)=>{"use strict";t.exports=function(e){var t,r,i,n=e.tokens;for(r=0,i=n.length;r<i;r++)"inline"===(t=n[r]).type&&e.md.inline.parse(t.content,e.md,e.env,t.children)}},816256,(e,t,r)=>{"use strict";var i=e.r(785306).arrayReplaceAt;t.exports=function(e){var t,r,n,s,o,a,l,c,u,d,p,m,h,g,x,f,y,T,v,b=e.tokens;if(e.md.options.linkify){for(s=0,o=b.length;s<o;s++)if("inline"===b[s].type&&e.md.linkify.pretest(b[s].content))for(a=b[s].children,x=0,n=a.length-1;n>=0;n--){if("link_close"===(c=a[n]).type){for(n--;a[n].level!==c.level&&"link_open"!==a[n].type;)n--;continue}if("html_inline"===c.type&&(t=c.content,/^<a[>\s]/i.test(t)&&x>0&&x--,r=c.content,/^<\/a\s*>/i.test(r)&&x++),!(x>0)&&"text"===c.type&&e.md.linkify.test(c.content)){for(p=c.content,v=e.md.linkify.match(p),u=[],g=c.level,h=0,v.length>0&&0===v[0].index&&n>0&&"text_special"===a[n-1].type&&(v=v.slice(1)),d=0;d<v.length;d++)f=v[d].url,y=e.md.normalizeLink(f),e.md.validateLink(y)&&(T=v[d].text,T=v[d].schema?"mailto:"!==v[d].schema||/^mailto:/i.test(T)?e.md.normalizeLinkText(T):e.md.normalizeLinkText("mailto:"+T).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+T).replace(/^http:\/\//,""),(m=v[d].index)>h&&((l=new e.Token("text","",0)).content=p.slice(h,m),l.level=g,u.push(l)),(l=new e.Token("link_open","a",1)).attrs=[["href",y]],l.level=g++,l.markup="linkify",l.info="auto",u.push(l),(l=new e.Token("text","",0)).content=T,l.level=g,u.push(l),(l=new e.Token("link_close","a",-1)).level=--g,l.markup="linkify",l.info="auto",u.push(l),h=v[d].lastIndex);h<p.length&&((l=new e.Token("text","",0)).content=p.slice(h),l.level=g,u.push(l)),b[s].children=a=i(a,n,u)}}}}},270453,(e,t,r)=>{"use strict";var i=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,n=/\((c|tm|r)\)/i,s=/\((c|tm|r)\)/ig,o={c:"©",r:"®",tm:"â¢"};function a(e,t){return o[t.toLowerCase()]}t.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(n.test(e.tokens[t].content)&&function(e){var t,r,i=0;for(t=e.length-1;t>=0;t--)"text"!==(r=e[t]).type||i||(r.content=r.content.replace(s,a)),"link_open"===r.type&&"auto"===r.info&&i--,"link_close"===r.type&&"auto"===r.info&&i++}(e.tokens[t].children),i.test(e.tokens[t].content)&&function(e){var t,r,n=0;for(t=e.length-1;t>=0;t--)"text"===(r=e[t]).type&&!n&&i.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"â¦").replace(/([?!])â¦/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1â").replace(/(^|\s)--(?=\s|$)/mg,"$1â").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1â")),"link_open"===r.type&&"auto"===r.info&&n--,"link_close"===r.type&&"auto"===r.info&&n++}(e.tokens[t].children))}},608671,(e,t,r)=>{"use strict";var i=e.r(785306).isWhiteSpace,n=e.r(785306).isPunctChar,s=e.r(785306).isMdAsciiPunct,o=/['"]/,a=/['"]/g;function l(e,t,r){return e.slice(0,t)+r+e.slice(t+1)}t.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&o.test(e.tokens[t].content)&&function(e,t){var r,o,c,u,d,p,m,h,g,x,f,y,T,v,b,E,C,j,I,_,S;for(r=0,I=[];r<e.length;r++){for(o=e[r],m=e[r].level,C=I.length-1;C>=0&&!(I[C].level<=m);C--);if(I.length=C+1,"text"===o.type){c=o.content,d=0,p=c.length;e:for(;d<p&&(a.lastIndex=d,u=a.exec(c));){if(b=E=!0,d=u.index+1,j="'"===u[0],g=32,u.index-1>=0)g=c.charCodeAt(u.index-1);else for(C=r-1;C>=0&&"softbreak"!==e[C].type&&"hardbreak"!==e[C].type;C--)if(e[C].content){g=e[C].content.charCodeAt(e[C].content.length-1);break}if(x=32,d<p)x=c.charCodeAt(d);else for(C=r+1;C<e.length&&"softbreak"!==e[C].type&&"hardbreak"!==e[C].type;C++)if(e[C].content){x=e[C].content.charCodeAt(0);break}if(f=s(g)||n(String.fromCharCode(g)),y=s(x)||n(String.fromCharCode(x)),T=i(g),(v=i(x))?b=!1:y&&!(T||f)&&(b=!1),T?E=!1:f&&!(v||y)&&(E=!1),34===x&&'"'===u[0]&&g>=48&&g<=57&&(E=b=!1),b&&E&&(b=f,E=y),!b&&!E){j&&(o.content=l(o.content,u.index,"â"));continue}if(E){for(C=I.length-1;C>=0&&(h=I[C],!(I[C].level<m));C--)if(h.single===j&&I[C].level===m){h=I[C],j?(_=t.md.options.quotes[2],S=t.md.options.quotes[3]):(_=t.md.options.quotes[0],S=t.md.options.quotes[1]),o.content=l(o.content,u.index,S),e[h.token].content=l(e[h.token].content,h.pos,_),d+=S.length-1,h.token===r&&(d+=_.length-1),p=(c=o.content).length,I.length=C;continue e}}b?I.push({token:r,pos:u.index,single:j,level:m}):E&&j&&(o.content=l(o.content,u.index,"â"))}}}}(e.tokens[t].children,e)}},736187,(e,t,r)=>{"use strict";
14t.exports=function(e){var t,r,i,n,s,o,a=e.tokens;for(t=0,r=a.length;t<r;t++)if("inline"===a[t].type){for(n=0,s=(i=a[t].children).length;n<s;n++)"text_special"===i[n].type&&(i[n].type="text");for(n=o=0;n<s;n++)"text"===i[n].type&&n+1<s&&"text"===i[n+1].type?i[n+1].content=i[n].content+i[n+1].content:(n!==o&&(i[o]=i[n]),o++);n!==o&&(i.length=o)}}},413510,(e,t,r)=>{"use strict";var i=e.r(46009),n=[["normalize",e.r(437645)],["block",e.r(900328)],["inline",e.r(496848)],["linkify",e.r(816256)],["replacements",e.r(270453)],["smartquotes",e.r(608671)],["text_join",e.r(736187)]];function s(){this.ruler=new i;for(var e=0;e<n.length;e++)this.ruler.push(n[e][0],n[e][1])}s.prototype.process=function(e){var t,r,i;for(t=0,r=(i=this.ruler.getRules("")).length;t<r;t++)i[t](e)},s.prototype.State=e.r(946480),t.exports=s},81251,(e,t,r)=>{"use strict";var i=e.r(6108),n=e.r(785306).isSpace;function s(e,t,r,i){var s,o,a,l,c,u,d,p;for(this.src=e,this.md=t,this.env=r,this.tokens=i,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",o=this.src,p=!1,a=l=u=d=0,c=o.length;l<c;l++){if(s=o.charCodeAt(l),!p)if(n(s)){u++,9===s?d+=4-d%4:d++;continue}else p=!0;(10===s||l===c-1)&&(10!==s&&l++,this.bMarks.push(a),this.eMarks.push(l),this.tShift.push(u),this.sCount.push(d),this.bsCount.push(0),p=!1,u=0,d=0,a=l+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}s.prototype.push=function(e,t,r){var n=new i(e,t,r);return n.block=!0,r<0&&this.level--,n.level=this.level,r>0&&this.level++,this.tokens.push(n),n},s.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},s.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},s.prototype.skipSpaces=function(e){for(var t=this.src.length;e<t&&n(this.src.charCodeAt(e));e++);return e},s.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!n(this.src.charCodeAt(--e)))return e+1;return e},s.prototype.skipChars=function(e,t){for(var r=this.src.length;e<r&&this.src.charCodeAt(e)===t;e++);return e},s.prototype.skipCharsBack=function(e,t,r){if(e<=r)return e;for(;e>r;)if(t!==this.src.charCodeAt(--e))return e+1;return e},s.prototype.getLines=function(e,t,r,i){var s,o,a,l,c,u,d,p=e;if(e>=t)return"";for(s=0,u=Array(t-e);p<t;p++,s++){for(o=0,d=l=this.bMarks[p],c=p+1<t||i?this.eMarks[p]+1:this.eMarks[p];l<c&&o<r;){if(n(a=this.src.charCodeAt(l)))9===a?o+=4-(o+this.bsCount[p])%4:o++;else if(l-d<this.tShift[p])o++;else break;l++}o>r?u[s]=Array(o-r+1).join(" ")+this.src.slice(l,c):u[s]=this.src.slice(l,c)}return u.join("")},s.prototype.Token=i,t.exports=s},355627,(e,t,r)=>{"use strict";var i=e.r(785306).isSpace;function n(e,t){var r=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];return e.src.slice(r,i)}function s(e){var t,r=[],i=0,n=e.length,s=!1,o=0,a="";for(t=e.charCodeAt(i);i<n;)124===t&&(s?(a+=e.substring(o,i-1),o=i):(r.push(a+e.substring(o,i)),a="",o=i+1)),s=92===t,i++,t=e.charCodeAt(i);return r.push(a+e.substring(o)),r}t.exports=function(e,t,r,o){var a,l,c,u,d,p,m,h,g,x,f,y,T,v,b,E,C,j;if(t+2>r||(p=t+1,e.sCount[p]<e.blkIndent||e.sCount[p]-e.blkIndent>=4||(c=e.bMarks[p]+e.tShift[p])>=e.eMarks[p]||124!==(C=e.src.charCodeAt(c++))&&45!==C&&58!==C||c>=e.eMarks[p]||124!==(j=e.src.charCodeAt(c++))&&45!==j&&58!==j&&!i(j)||45===C&&i(j)))return!1;for(;c<e.eMarks[p];){if(124!==(a=e.src.charCodeAt(c))&&45!==a&&58!==a&&!i(a))return!1;c++}for(u=0,m=(l=n(e,t+1)).split("|"),x=[];u<m.length;u++){if(!(f=m[u].trim()))if(0===u||u===m.length-1)continue;else return!1;if(!/^:?-+:?$/.test(f))return!1;58===f.charCodeAt(f.length-1)?x.push(58===f.charCodeAt(0)?"center":"right"):58===f.charCodeAt(0)?x.push("left"):x.push("")}if(-1===(l=n(e,t).trim()).indexOf("|")||e.sCount[t]-e.blkIndent>=4||((m=s(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),0===(h=m.length)||h!==x.length))return!1;if(o)return!0;for(u=0,v=e.parentType,e.parentType="table",E=e.md.block.ruler.getRules("blockquote"),(g=e.pu
14sh("table_open","table",1)).map=y=[t,0],(g=e.push("thead_open","thead",1)).map=[t,t+1],(g=e.push("tr_open","tr",1)).map=[t,t+1];u<m.length;u++)g=e.push("th_open","th",1),x[u]&&(g.attrs=[["style","text-align:"+x[u]]]),(g=e.push("inline","",0)).content=m[u].trim(),g.children=[],g=e.push("th_close","th",-1);for(g=e.push("tr_close","tr",-1),g=e.push("thead_close","thead",-1),p=t+2;p<r&&!(e.sCount[p]<e.blkIndent);p++){for(u=0,b=!1,d=E.length;u<d;u++)if(E[u](e,p,r,!0)){b=!0;break}if(b||!(l=n(e,p).trim())||e.sCount[p]-e.blkIndent>=4)break;for((m=s(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),p===t+2&&((g=e.push("tbody_open","tbody",1)).map=T=[t+2,0]),(g=e.push("tr_open","tr",1)).map=[p,p+1],u=0;u<h;u++)g=e.push("td_open","td",1),x[u]&&(g.attrs=[["style","text-align:"+x[u]]]),(g=e.push("inline","",0)).content=m[u]?m[u].trim():"",g.children=[],g=e.push("td_close","td",-1);g=e.push("tr_close","tr",-1)}return T&&(g=e.push("tbody_close","tbody",-1),T[1]=p),g=e.push("table_close","table",-1),y[1]=p,e.parentType=v,e.line=p,!0}},798417,(e,t,r)=>{"use strict";t.exports=function(e,t,r){var i,n,s;if(e.sCount[t]-e.blkIndent<4)return!1;for(n=i=t+1;i<r;){if(e.isEmpty(i)){i++;continue}if(e.sCount[i]-e.blkIndent>=4){n=++i;continue}break}return e.line=n,(s=e.push("code_block","code",0)).content=e.getLines(t,n,4+e.blkIndent,!1)+"\n",s.map=[t,e.line],!0}},753818,(e,t,r)=>{"use strict";t.exports=function(e,t,r,i){var n,s,o,a,l,c,u,d=!1,p=e.bMarks[t]+e.tShift[t],m=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||p+3>m||126!==(n=e.src.charCodeAt(p))&&96!==n||(l=p,(s=(p=e.skipChars(p,n))-l)<3)||(u=e.src.slice(l,p),o=e.src.slice(p,m),96===n&&o.indexOf(String.fromCharCode(n))>=0))return!1;if(i)return!0;for(a=t;!(++a>=r)&&(!((p=l=e.bMarks[a]+e.tShift[a])<(m=e.eMarks[a]))||!(e.sCount[a]<e.blkIndent));){;if(!(e.src.charCodeAt(p)!==n||e.sCount[a]-e.blkIndent>=4||(p=e.skipChars(p,n))-l<s)&&!((p=e.skipSpaces(p))<m)){d=!0;break}}return s=e.sCount[t],e.line=a+ +!!d,(c=e.push("fence","code",0)).info=o,c.content=e.getLines(t+1,a,s,!0),c.markup=u,c.map=[t,e.line],!0}},674620,(e,t,r)=>{"use strict";var i=e.r(785306).isSpace;t.exports=function(e,t,r,n){var s,o,a,l,c,u,d,p,m,h,g,x,f,y,T,v,b,E,C,j,I=e.lineMax,_=e.bMarks[t]+e.tShift[t],S=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||62!==e.src.charCodeAt(_))return!1;if(n)return!0;for(h=[],g=[],y=[],T=[],E=e.md.block.ruler.getRules("blockquote"),f=e.parentType,e.parentType="blockquote",p=t;p<r&&(j=e.sCount[p]<e.blkIndent,!((_=e.bMarks[p]+e.tShift[p])>=(S=e.eMarks[p])));p++){if(62===e.src.charCodeAt(_++)&&!j){for(l=e.sCount[p]+1,32===e.src.charCodeAt(_)?(_++,l++,s=!1,v=!0):9===e.src.charCodeAt(_)?(v=!0,(e.bsCount[p]+l)%4==3?(_++,l++,s=!1):s=!0):v=!1,m=l,h.push(e.bMarks[p]),e.bMarks[p]=_;_<S&&i(o=e.src.charCodeAt(_));)9===o?m+=4-(m+e.bsCount[p]+ +!!s)%4:m++,_++;u=_>=S,g.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+ +!!v,y.push(e.sCount[p]),e.sCount[p]=m-l,T.push(e.tShift[p]),e.tShift[p]=_-e.bMarks[p];continue}if(u)break;for(a=0,b=!1,c=E.length;a<c;a++)if(E[a](e,p,r,!0)){b=!0;break}if(b){e.lineMax=p,0!==e.blkIndent&&(h.push(e.bMarks[p]),g.push(e.bsCount[p]),T.push(e.tShift[p]),y.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}h.push(e.bMarks[p]),g.push(e.bsCount[p]),T.push(e.tShift[p]),y.push(e.sCount[p]),e.sCount[p]=-1}for(x=e.blkIndent,e.blkIndent=0,(C=e.push("blockquote_open","blockquote",1)).markup=">",C.map=d=[t,0],e.md.block.tokenize(e,t,p),(C=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=I,e.parentType=f,d[1]=e.line,a=0;a<T.length;a++)e.bMarks[a+t]=h[a],e.tShift[a+t]=T[a],e.sCount[a+t]=y[a],e.bsCount[a+t]=g[a];return e.blkIndent=x,!0}},206929,(e,t,r)=>{"use strict";var i=e.r(785306).isSpace;t.exports=function(e,t,r,n){var s,o,a,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||42!==(s=e.src.charCodeAt(c++))&&45!==s&&95!==s)return!1;for(o=1;c<u;){if((a=e.src.charCodeAt(c++))!==s&&!i(a))return!1;a===s&&o++}return!(o<3)&&(!!n||(e.line=t+1,(l=e.push("hr","hr",0)).map=[t,e.line],l.markup=Array(o+1).join(String.fromCharCode(s)),!0))}},261684,(e,t,r)=>{"use strict";var i=e.r(785306).isSpace;function n(e,t){var r,n,s;return(n=e.bMarks[t]+e.tShift[t],s=e.eMarks[t],42!==(r=e.src.charCo
14deAt(n++))&&45!==r&&43!==r||n<s&&!i(e.src.charCodeAt(n)))?-1:n}function s(e,t){var r,n=e.bMarks[t]+e.tShift[t],s=n,o=e.eMarks[t];if(s+1>=o||(r=e.src.charCodeAt(s++))<48||r>57)return -1;for(;;){if(s>=o)return -1;if((r=e.src.charCodeAt(s++))>=48&&r<=57){if(s-n>=10)return -1;continue}if(41===r||46===r)break;return -1}return s<o&&!i(r=e.src.charCodeAt(s))?-1:s}t.exports=function(e,t,r,i){var o,a,l,c,u,d,p,m,h,g,x,f,y,T,v,b,E,C,j,I,_,S,A,L,F,k,N,M=t,O=!1,R=!0;if(e.sCount[M]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[M]-e.listIndent>=4&&e.sCount[M]<e.blkIndent)return!1;if(i&&"paragraph"===e.parentType&&e.sCount[M]>=e.blkIndent&&(O=!0),(S=s(e,M))>=0){if(p=!0,L=e.bMarks[M]+e.tShift[M],y=Number(e.src.slice(L,S-1)),O&&1!==y)return!1}else{if(!((S=n(e,M))>=0))return!1;p=!1}if(O&&e.skipSpaces(S)>=e.eMarks[M])return!1;if(i)return!0;for(f=e.src.charCodeAt(S-1),x=e.tokens.length,p?(N=e.push("ordered_list_open","ol",1),1!==y&&(N.attrs=[["start",y]])):N=e.push("bullet_list_open","ul",1),N.map=g=[M,0],N.markup=String.fromCharCode(f),A=!1,k=e.md.block.ruler.getRules("list"),E=e.parentType,e.parentType="list";M<r;){for(_=S,T=e.eMarks[M],d=v=e.sCount[M]+S-(e.bMarks[M]+e.tShift[M]);_<T;){if(9===(o=e.src.charCodeAt(_)))v+=4-(v+e.bsCount[M])%4;else if(32===o)v++;else break;_++}if((u=(a=_)>=T?1:v-d)>4&&(u=1),c=d+u,(N=e.push("list_item_open","li",1)).markup=String.fromCharCode(f),N.map=m=[M,0],p&&(N.info=e.src.slice(L,S-1)),I=e.tight,j=e.tShift[M],C=e.sCount[M],b=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=c,e.tight=!0,e.tShift[M]=a-e.bMarks[M],e.sCount[M]=v,a>=T&&e.isEmpty(M+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,M,r,!0),(!e.tight||A)&&(R=!1),A=e.line-M>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=b,e.tShift[M]=j,e.sCount[M]=C,e.tight=I,(N=e.push("list_item_close","li",-1)).markup=String.fromCharCode(f),M=e.line,m[1]=M,M>=r||e.sCount[M]<e.blkIndent||e.sCount[M]-e.blkIndent>=4)break;for(l=0,F=!1,h=k.length;l<h;l++)if(k[l](e,M,r,!0)){F=!0;break}if(F)break;if(p){if((S=s(e,M))<0)break;L=e.bMarks[M]+e.tShift[M]}else if((S=n(e,M))<0)break;if(f!==e.src.charCodeAt(S-1))break}return(N=p?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(f),g[1]=M,e.line=M,e.parentType=E,R&&function(e,t){var r,i,n=e.level+2;for(r=t+2,i=e.tokens.length-2;r<i;r++)e.tokens[r].level===n&&"paragraph_open"===e.tokens[r].type&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}(e,x),!0}},185894,(e,t,r)=>{"use strict";var i=e.r(785306).normalizeReference,n=e.r(785306).isSpace;t.exports=function(e,t,r,s){var o,a,l,c,u,d,p,m,h,g,x,f,y,T,v,b,E=0,C=e.bMarks[t]+e.tShift[t],j=e.eMarks[t],I=t+1;if(e.sCount[t]-e.blkIndent>=4||91!==e.src.charCodeAt(C))return!1;for(;++C<j;)if(93===e.src.charCodeAt(C)&&92!==e.src.charCodeAt(C-1)){if(C+1===j||58!==e.src.charCodeAt(C+1))return!1;break}for(c=e.lineMax,v=e.md.block.ruler.getRules("reference"),g=e.parentType,e.parentType="reference";I<c&&!e.isEmpty(I);I++)if(!(e.sCount[I]-e.blkIndent>3)&&!(e.sCount[I]<0)){for(d=0,T=!1,p=v.length;d<p;d++)if(v[d](e,I,c,!0)){T=!0;break}if(T)break}for(C=1,j=(y=e.getLines(t,I,e.blkIndent,!1).trim()).length;C<j;C++){if(91===(o=y.charCodeAt(C)))return!1;if(93===o){h=C;break}10===o?E++:92===o&&++C<j&&10===y.charCodeAt(C)&&E++}if(h<0||58!==y.charCodeAt(h+1))return!1;for(C=h+2;C<j;C++)if(10===(o=y.charCodeAt(C)))E++;else if(n(o));else break;if(!(x=e.md.helpers.parseLinkDestination(y,C,j)).ok||(u=e.md.normalizeLink(x.str),!e.md.validateLink(u)))return!1;for(C=x.pos,E+=x.lines,a=C,l=E,f=C;C<j;C++)if(10===(o=y.charCodeAt(C)))E++;else if(n(o));else break;for(x=e.md.helpers.parseLinkTitle(y,C,j),C<j&&f!==C&&x.ok?(b=x.str,C=x.pos,E+=x.lines):(b="",C=a,E=l);C<j&&n(o=y.charCodeAt(C));)C++;if(C<j&&10!==y.charCodeAt(C)&&b)for(b="",C=a,E=l;C<j&&n(o=y.charCodeAt(C));)C++;return(!(C<j)||10===y.charCodeAt(C))&&!!(m=i(y.slice(1,h)))&&(!!s||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[m]&&(e.env.references[m]={title:b,href:u}),e.parentType=g,e.line=t+E+1,!0))}},365092,(e,t,r)=>{"use strict";t.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},465726,(e,t,r)=>{"use strict";var i="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",n="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",s=RegExp("^(?:"+i+"|"+n+"|<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->|<[?][\\s\\S]*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),o=RegExp("^(?:"+i+"|"+n+")");t.exports.HTML_TAG_RE=s,t.exports.HTML_OPEN_CLOSE_TAG_RE=o},848004,(e,t,r)=>{"use strict";var i=e.r(365092),n=e.r(465726).HTML_OPEN_CLOSE_TAG_RE,s=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[RegExp("^</?("+i.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[RegExp(n.source+"\\s*$"),/^$/,!1]];t.exports=function(e,t,r,i){var n,o,a,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>
14=4||!e.md.options.html||60!==e.src.charCodeAt(c))return!1;for(n=0,l=e.src.slice(c,u);n<s.length&&!s[n][0].test(l);n++);if(n===s.length)return!1;if(i)return s[n][2];if(o=t+1,!s[n][1].test(l)){for(;o<r&&!(e.sCount[o]<e.blkIndent);o++)if(c=e.bMarks[o]+e.tShift[o],u=e.eMarks[o],l=e.src.slice(c,u),s[n][1].test(l)){0!==l.length&&o++;break}}return e.line=o,(a=e.push("html_block","",0)).map=[t,o],a.content=e.getLines(t,o,e.blkIndent,!0),!0}},198801,(e,t,r)=>{"use strict";var i=e.r(785306).isSpace;t.exports=function(e,t,r,n){var s,o,a,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||35!==(s=e.src.charCodeAt(c))||c>=u)return!1;for(o=1,s=e.src.charCodeAt(++c);35===s&&c<u&&o<=6;)o++,s=e.src.charCodeAt(++c);return!(o>6)&&(!(c<u)||!!i(s))&&(!!n||(u=e.skipSpacesBack(u,c),(a=e.skipCharsBack(u,35,c))>c&&i(e.src.charCodeAt(a-1))&&(u=a),e.line=t+1,(l=e.push("heading_open","h"+String(o),1)).markup="########".slice(0,o),l.map=[t,e.line],(l=e.push("inline","",0)).content=e.src.slice(c,u).trim(),l.map=[t,e.line],l.children=[],(l=e.push("heading_close","h"+String(o),-1)).markup="########".slice(0,o),!0))}},877687,(e,t,r)=>{"use strict";t.exports=function(e,t,r){var i,n,s,o,a,l,c,u,d,p,m=t+1,h=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(p=e.parentType,e.parentType="paragraph";m<r&&!e.isEmpty(m);m++)if(!(e.sCount[m]-e.blkIndent>3)){if(e.sCount[m]>=e.blkIndent&&(l=e.bMarks[m]+e.tShift[m])<(c=e.eMarks[m])&&(45===(d=e.src.charCodeAt(l))||61===d)&&(l=e.skipChars(l,d),(l=e.skipSpaces(l))>=c)){u=61===d?1:2;break}if(!(e.sCount[m]<0)){for(s=0,n=!1,o=h.length;s<o;s++)if(h[s](e,m,r,!0)){n=!0;break}if(n)break}}return!!u&&(i=e.getLines(t,m,e.blkIndent,!1).trim(),e.line=m+1,(a=e.push("heading_open","h"+String(u),1)).markup=String.fromCharCode(d),a.map=[t,e.line],(a=e.push("inline","",0)).content=i,a.map=[t,e.line-1],a.children=[],(a=e.push("heading_close","h"+String(u),-1)).markup=String.fromCharCode(d),e.parentType=p,!0)}},944020,(e,t,r)=>{"use strict";t.exports=function(e,t,r){var i,n,s,o,a,l,c=t+1,u=e.md.block.ruler.getRules("paragraph");for(l=e.parentType,e.parentType="paragraph";c<r&&!e.isEmpty(c);c++)if(!(e.sCount[c]-e.blkIndent>3)&&!(e.sCount[c]<0)){for(s=0,n=!1,o=u.length;s<o;s++)if(u[s](e,c,r,!0)){n=!0;break}if(n)break}return i=e.getLines(t,c,e.blkIndent,!1).trim(),e.line=c,(a=e.push("paragraph_open","p",1)).map=[t,e.line],(a=e.push("inline","",0)).content=i,a.map=[t,e.line],a.children=[],a=e.push("paragraph_close","p",-1),e.parentType=l,!0}},689451,(e,t,r)=>{"use strict";var i=e.r(46009),n=[["table",e.r(355627),["paragraph","reference"]],["code",e.r(798417)],["fence",e.r(753818),["paragraph","reference","blockquote","list"]],["blockquote",e.r(674620),["paragraph","reference","blockquote","list"]],["hr",e.r(206929),["paragraph","reference","blockquote","list"]],["list",e.r(261684),["paragraph","reference","blockquote"]],["reference",e.r(185894)],["html_block",e.r(848004),["paragraph","reference","blockquote"]],["heading",e.r(198801),["paragraph","reference","blockquote"]],["lheading",e.r(877687)],["paragraph",e.r(944020)]];function s(){this.ruler=new i;for(var e=0;e<n.length;e++)this.ruler.push(n[e][0],n[e][1],{alt:(n[e][2]||[]).slice()})}s.prototype.tokenize=function(e,t,r){for(var i,n,s,o=this.ruler.getRules(""),a=o.length,l=t,c=!1,u=e.md.options.maxNesting;l<r&&(e.line=l=e.skipEmptyLines(l),!(l>=r)&&!(e.sCount[l]<e.blkIndent));){if(e.level>=u){e.line=r;break}for(n=0,s=e.line;n<a;n++)if(i=o[n](e,l,r,!1)){if(s>=e.line)throw Error("block rule didn't increment state.line");break}if(!i)throw Error("none of the block rules matched");e.tight=!c,e.isEmpty(e.line-1)&&(c=!0),(l=e.line)<r&&e.isEmpty(l)&&(c=!0,e.line=++l)}},s.prototype.parse=function(e,t,r,i){var n;e&&(n=new this.State(e,t,r,i),this.tokenize(n,n.line,n.lineMax))},s.prototype.State=e.r(81251),t.exports=s},155068,(e,t,r)=>{"use strict";var i=e.r(6108),n=e.r(785306).isWhiteSpace,s=e.r(785306).isPunctChar,o=e.r(785306).isMdAsciiPunct;function a(e,t,r,i){this.src=e,this.env=r,this.md=t,this.tokens=i,this.tokens_meta=Array(i.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}a.prototype.pushPending=function(){var e=new i("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},a.prototype.push=function(e,t,r){this.pending&&this.pushPending();var n=new i(e,t,r),s=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(s),n},a.prototype.scanDelims=function(e,t){var r,i,a,l,c,u,d,p,m,h=e,g=!0,x=!0,f=this.posMax,y=this.src.charCo
14deAt(e);for(r=e>0?this.src.charCodeAt(e-1):32;h<f&&this.src.charCodeAt(h)===y;)h++;return a=h-e,i=h<f?this.src.charCodeAt(h):32,d=o(r)||s(String.fromCharCode(r)),m=o(i)||s(String.fromCharCode(i)),u=n(r),(p=n(i))?g=!1:m&&!(u||d)&&(g=!1),u?x=!1:d&&!(p||m)&&(x=!1),t?(l=g,c=x):(l=g&&(!x||d),c=x&&(!g||m)),{can_open:l,can_close:c,length:a}},a.prototype.Token=i,t.exports=a},936523,(e,t,r)=>{"use strict";t.exports=function(e,t){for(var r=e.pos;r<e.posMax&&!function(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}(e.src.charCodeAt(r));)r++;return r!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}},856976,(e,t,r)=>{"use strict";var i=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;t.exports=function(e,t){var r,n,s,o,a,l,c;return!!e.md.options.linkify&&!(e.linkLevel>0)&&!((r=e.pos)+3>e.posMax)&&58===e.src.charCodeAt(r)&&47===e.src.charCodeAt(r+1)&&47===e.src.charCodeAt(r+2)&&!!(n=e.pending.match(i))&&(s=n[1],!!(o=e.md.linkify.matchAtStart(e.src.slice(r-s.length)))&&!((a=o.url).length<=s.length)&&(a=a.replace(/\*+$/,""),l=e.md.normalizeLink(a),!!e.md.validateLink(l)&&(t||(e.pending=e.pending.slice(0,-s.length),(c=e.push("link_open","a",1)).attrs=[["href",l]],c.markup="linkify",c.info="auto",(c=e.push("text","",0)).content=e.md.normalizeLinkText(a),(c=e.push("link_close","a",-1)).markup="linkify",c.info="auto"),e.pos+=a.length-s.length,!0)))}},369495,(e,t,r)=>{"use strict";var i=e.r(785306).isSpace;t.exports=function(e,t){var r,n,s,o=e.pos;if(10!==e.src.charCodeAt(o))return!1;if(r=e.pending.length-1,n=e.posMax,!t)if(r>=0&&32===e.pending.charCodeAt(r))if(r>=1&&32===e.pending.charCodeAt(r-1)){for(s=r-1;s>=1&&32===e.pending.charCodeAt(s-1);)s--;e.pending=e.pending.slice(0,s),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(o++;o<n&&i(e.src.charCodeAt(o));)o++;return e.pos=o,!0}},320595,(e,t,r)=>{"use strict";for(var i=e.r(785306).isSpace,n=[],s=0;s<256;s++)n.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){n[e.charCodeAt(0)]=1}),t.exports=function(e,t){var r,s,o,a,l,c=e.pos,u=e.posMax;if(92!==e.src.charCodeAt(c)||++c>=u)return!1;if(10===(r=e.src.charCodeAt(c))){for(t||e.push("hardbreak","br",0),c++;c<u&&i(r=e.src.charCodeAt(c));)c++;return e.pos=c,!0}return a=e.src[c],r>=55296&&r<=56319&&c+1<u&&(s=e.src.charCodeAt(c+1))>=56320&&s<=57343&&(a+=e.src[c+1],c++),o="\\"+a,t||(l=e.push("text_special","",0),r<256&&0!==n[r]?l.content=a:l.content=o,l.markup=o,l.info="escape"),e.pos=c+1,!0}},37417,(e,t,r)=>{"use strict";t.exports=function(e,t){var r,i,n,s,o,a,l,c,u=e.pos;if(96!==e.src.charCodeAt(u))return!1;for(r=u,u++,i=e.posMax;u<i&&96===e.src.charCodeAt(u);)u++;if(l=(n=e.src.slice(r,u)).length,e.backticksScanned&&(e.backticks[l]||0)<=r)return t||(e.pending+=n),e.pos+=l,!0;for(a=u;-1!==(o=e.src.indexOf("`",a));){for(a=o+1;a<i&&96===e.src.charCodeAt(a);)a++;if((c=a-o)===l)return t||((s=e.push("code_inline","code",0)).markup=n,s.content=e.src.slice(u,o).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=a,!0;e.backticks[c]=o}return e.backticksScanned=!0,t||(e.pending+=n),e.pos+=l,!0}},995832,(e,t,r)=>{"use strict";function i(e,t){var r,i,n,s,o,a=[],l=t.length;for(r=0;r<l;r++)126===(n=t[r]).marker&&-1!==n.end&&(s=t[n.end],(o=e.tokens[n.token]).type="s_open",o.tag="s",o.nesting=1,o.markup="~~",o.content="",(o=e.tokens[s.token]).type="s_close",o.tag="s",o.nesting=-1,o.markup="~~",o.content="","text"===e.tokens[s.token-1].type&&"~"===e.tokens[s.token-1].content&&a.push(s.token-1));for(;a.length;){for(i=(r=a.pop())+1;i<e.tokens.length&&"s_close"===e.tokens[i].type;)i++;r!==--i&&(o=e.tokens[i],e.tokens[i]=e.tokens[r],e.tokens[r]=o)}}t.exports.tokenize=function(e,t){var r,i,n,s,o=e.pos,a=e.src.charCodeAt(o);if(t||126!==a||(n=(i=e.scanDelims(e.pos,!0)).length,s=String.fromCharCode(a),n<2))return!1;for(n%2&&(e.push("text","",0).content=s,n--),r=0;r<n;r+=2)e.push("text","",0).content=s+s,e.delimiters.push({marker:a,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0},t.exports.postProcess=function(e){var t,r=e.tokens_meta,n=e.tokens_meta.length;for(i(e,e.delimiters),t=0;t<n;t++)r[t]&&r[t].delimiters&&i(e,r[t].delimiters)}},45745,(e,t,r)=>{"use strict";function i(e,t){var r,i,n,s,o,a;for(r=t.length-1;r>=0;r--)(95===(i=t[r]).marker||42===i.marker)&&-1!==i.end&&(n=t[i.end],a=r>0&&t[r-1].end===i.end+1&&t[r-1].marker===i.marker&&t[r-1].token===i.token-1&&t[i.end+1].token===n.token+1,o=String.fromCharCode(i.marker),(s=e.tokens[i.token]).type=a?"strong_open":"em_open",s.tag=a?"strong":"em",s.nesting=1,s.markup=a?o+o:o,s.content="",(s=e.tokens[n.token]).type=a?"strong_close":"em_close",s.tag=a?"strong":"em",s.nesting=-1,s.markup=a?o+o:o,s.content="",a&&(e.tokens[t[r-1].token].content="",e.tokens[t[i.end+1].token].content="",r--))}
14t.exports.tokenize=function(e,t){var r,i,n=e.pos,s=e.src.charCodeAt(n);if(t||95!==s&&42!==s)return!1;for(r=0,i=e.scanDelims(e.pos,42===s);r<i.length;r++)e.push("text","",0).content=String.fromCharCode(s),e.delimiters.push({marker:s,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0},t.exports.postProcess=function(e){var t,r=e.tokens_meta,n=e.tokens_meta.length;for(i(e,e.delimiters),t=0;t<n;t++)r[t]&&r[t].delimiters&&i(e,r[t].delimiters)}},753742,(e,t,r)=>{"use strict";var i=e.r(785306).normalizeReference,n=e.r(785306).isSpace;t.exports=function(e,t){var r,s,o,a,l,c,u,d,p="",m="",h=e.pos,g=e.posMax,x=e.pos,f=!0;if(91!==e.src.charCodeAt(e.pos)||(l=e.pos+1,(a=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0))return!1;if((c=a+1)<g&&40===e.src.charCodeAt(c)){for(f=!1,c++;c<g&&(n(s=e.src.charCodeAt(c))||10===s);c++);if(c>=g)return!1;if(x=c,(u=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok){for(p=e.md.normalizeLink(u.str),e.md.validateLink(p)?c=u.pos:p="",x=c;c<g&&(n(s=e.src.charCodeAt(c))||10===s);c++);if(u=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<g&&x!==c&&u.ok)for(m=u.str,c=u.pos;c<g&&(n(s=e.src.charCodeAt(c))||10===s);c++);}(c>=g||41!==e.src.charCodeAt(c))&&(f=!0),c++}if(f){if(void 0===e.env.references)return!1;if(c<g&&91===e.src.charCodeAt(c)?(x=c+1,(c=e.md.helpers.parseLinkLabel(e,c))>=0?o=e.src.slice(x,c++):c=a+1):c=a+1,o||(o=e.src.slice(l,a)),!(d=e.env.references[i(o)]))return e.pos=h,!1;p=d.href,m=d.title}return t||(e.pos=l,e.posMax=a,e.push("link_open","a",1).attrs=r=[["href",p]],m&&r.push(["title",m]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)),e.pos=c,e.posMax=g,!0}},208009,(e,t,r)=>{"use strict";var i=e.r(785306).normalizeReference,n=e.r(785306).isSpace;t.exports=function(e,t){var r,s,o,a,l,c,u,d,p,m,h,g,x,f="",y=e.pos,T=e.posMax;if(33!==e.src.charCodeAt(e.pos)||91!==e.src.charCodeAt(e.pos+1)||(c=e.pos+2,(l=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0))return!1;if((u=l+1)<T&&40===e.src.charCodeAt(u)){for(u++;u<T&&(n(s=e.src.charCodeAt(u))||10===s);u++);if(u>=T)return!1;for(x=u,(p=e.md.helpers.parseLinkDestination(e.src,u,e.posMax)).ok&&(f=e.md.normalizeLink(p.str),e.md.validateLink(f)?u=p.pos:f=""),x=u;u<T&&(n(s=e.src.charCodeAt(u))||10===s);u++);if(p=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<T&&x!==u&&p.ok)for(m=p.str,u=p.pos;u<T&&(n(s=e.src.charCodeAt(u))||10===s);u++);else m="";if(u>=T||41!==e.src.charCodeAt(u))return e.pos=y,!1;u++}else{if(void 0===e.env.references)return!1;if(u<T&&91===e.src.charCodeAt(u)?(x=u+1,(u=e.md.helpers.parseLinkLabel(e,u))>=0?a=e.src.slice(x,u++):u=l+1):u=l+1,a||(a=e.src.slice(c,l)),!(d=e.env.references[i(a)]))return e.pos=y,!1;f=d.href,m=d.title}return!t&&(o=e.src.slice(c,l),e.md.inline.parse(o,e.md,e.env,g=[]),(h=e.push("image","img",0)).attrs=r=[["src",f],["alt",""]],h.children=g,h.content=o,m&&r.push(["title",m])),e.pos=u,e.posMax=T,!0}},538282,(e,t,r)=>{"use strict";var i=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,n=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;t.exports=function(e,t){var r,s,o,a,l,c,u=e.pos;if(60!==e.src.charCodeAt(u))return!1;for(l=e.pos,c=e.posMax;;){if(++u>=c||60===(a=e.src.charCodeAt(u)))return!1;if(62===a)break}return(r=e.src.slice(l+1,u),n.test(r))?(s=e.md.normalizeLink(r),!!e.md.validateLink(s)&&(t||((o=e.push("link_open","a",1)).attrs=[["href",s]],o.markup="autolink",o.info="auto",(o=e.push("text","",0)).content=e.md.normalizeLinkText(r),(o=e.push("link_close","a",-1)).markup="autolink",o.info="auto"),e.pos+=r.length+2,!0)):!!i.test(r)&&(s=e.md.normalizeLink("mailto:"+r),!!e.md.validateLink(s)&&(t||((o=e.push("link_open","a",1)).attrs=[["href",s]],o.markup="autolink",o.info="auto",(o=e.push("text","",0)).content=e.md.normalizeLinkText(r),(o=e.push("link_close","a",-1)).markup="autolink",o.info="auto"),e.pos+=r.length+2,!0))}},36434,(e,t,r)=>{"use strict";var i=e.r(465726).HTML_TAG_RE;t.exports=function(e,t){var r,n,s,o,a,l,c,u=e.pos;
14return!!e.md.options.html&&(l=e.posMax,60===e.src.charCodeAt(u)&&!(u+2>=l))&&(33===(o=e.src.charCodeAt(u+1))||63===o||47===o||!!((r=32|o)>=97&&r<=122))&&!!(a=e.src.slice(u).match(i))&&(!t&&((c=e.push("html_inline","",0)).content=a[0],n=c.content,/^<a[>\s]/i.test(n)&&e.linkLevel++,s=c.content,/^<\/a\s*>/i.test(s)&&e.linkLevel--),e.pos+=a[0].length,!0)}},316560,(e,t,r)=>{"use strict";var i=e.r(306963),n=e.r(785306).has,s=e.r(785306).isValidEntityCode,o=e.r(785306).fromCodePoint,a=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;t.exports=function(e,t){var r,c,u,d=e.pos,p=e.posMax;if(38!==e.src.charCodeAt(d)||d+1>=p)return!1;if(35===e.src.charCodeAt(d+1)){if(c=e.src.slice(d).match(a))return t||(r="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),(u=e.push("text_special","",0)).content=s(r)?o(r):o(65533),u.markup=c[0],u.info="entity"),e.pos+=c[0].length,!0}else if((c=e.src.slice(d).match(l))&&n(i,c[1]))return t||((u=e.push("text_special","",0)).content=i[c[1]],u.markup=c[0],u.info="entity"),e.pos+=c[0].length,!0;return!1}},433584,(e,t,r)=>{"use strict";function i(e){var t,r,i,n,s,o,a,l,c={},u=e.length;if(u){var d=0,p=-2,m=[];for(t=0;t<u;t++)if(i=e[t],m.push(0),(e[d].marker!==i.marker||p!==i.token-1)&&(d=t),p=i.token,i.length=i.length||0,i.close){for(c.hasOwnProperty(i.marker)||(c[i.marker]=[-1,-1,-1,-1,-1,-1]),s=c[i.marker][3*!!i.open+i.length%3],o=r=d-m[d]-1;r>s;r-=m[r]+1)if((n=e[r]).marker===i.marker&&n.open&&n.end<0&&(a=!1,(n.close||i.open)&&(n.length+i.length)%3==0&&(n.length%3!=0||i.length%3!=0)&&(a=!0),!a)){l=r>0&&!e[r-1].open?m[r-1]+1:0,m[t]=t-r+l,m[r]=l,i.open=!1,n.end=t,n.close=!1,o=-1,p=-2;break}-1!==o&&(c[i.marker][3*!!i.open+(i.length||0)%3]=o)}}}t.exports=function(e){var t,r=e.tokens_meta,n=e.tokens_meta.length;for(i(e.delimiters),t=0;t<n;t++)r[t]&&r[t].delimiters&&i(r[t].delimiters)}},408022,(e,t,r)=>{"use strict";t.exports=function(e){var t,r,i=0,n=e.tokens,s=e.tokens.length;for(t=r=0;t<s;t++)n[t].nesting<0&&i--,n[t].level=i,n[t].nesting>0&&i++,"text"===n[t].type&&t+1<s&&"text"===n[t+1].type?n[t+1].content=n[t].content+n[t+1].content:(t!==r&&(n[r]=n[t]),r++);t!==r&&(n.length=r)}},904483,(e,t,r)=>{"use strict";var i=e.r(46009),n=[["text",e.r(936523)],["linkify",e.r(856976)],["newline",e.r(369495)],["escape",e.r(320595)],["backticks",e.r(37417)],["strikethrough",e.r(995832).tokenize],["emphasis",e.r(45745).tokenize],["link",e.r(753742)],["image",e.r(208009)],["autolink",e.r(538282)],["html_inline",e.r(36434)],["entity",e.r(316560)]],s=[["balance_pairs",e.r(433584)],["strikethrough",e.r(995832).postProcess],["emphasis",e.r(45745).postProcess],["fragments_join",e.r(408022)]];function o(){var e;for(e=0,this.ruler=new i;e<n.length;e++)this.ruler.push(n[e][0],n[e][1]);for(e=0,this.ruler2=new i;e<s.length;e++)this.ruler2.push(s[e][0],s[e][1])}o.prototype.skipToken=function(e){var t,r,i=e.pos,n=this.ruler.getRules(""),s=n.length,o=e.md.options.maxNesting,a=e.cache;if(void 0!==a[i]){e.pos=a[i];return}if(e.level<o){for(r=0;r<s;r++)if(e.level++,t=n[r](e,!0),e.level--,t){if(i>=e.pos)throw Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;!t&&e.pos++,a[i]=e.pos},o.prototype.tokenize=function(e){for(var t,r,i,n=this.ruler.getRules(""),s=n.length,o=e.posMax,a=e.md.options.maxNesting;e.pos<o;){if(i=e.pos,e.level<a){for(r=0;r<s;r++)if(t=n[r](e,!1)){if(i>=e.pos)throw Error("inline rule didn't increment state.pos");break}}if(t){if(e.pos>=o)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},o.prototype.parse=function(e,t,r,i){var n,s,o,a=new this.State(e,t,r,i);for(this.tokenize(a),o=(s=this.ruler2.getRules("")).length,n=0;n<o;n++)s[n](a)},o.prototype.State=e.r(155068),t.exports=o},318515,(e,t,r)=>{"use strict";t.exports=function(t){var r={};t=t||{},r.src_Any=e.r(634171).source,r.src_Cc=e.r(270893).source,r.src_Z=e.r(940454).source,r.src_P=e.r(484865).source,r.src_ZPCc=[r.src_Z,r.src_P,r.src_Cc].join("|"),r.src_ZCc=[r.src_Z,r.src_Cc].join("|");var i="[><ï½]";return r.src_pseudo_letter="(?:(?!"+i+"|"+r.src_ZPCc+")"+r.src_Any+")",r.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",r.src_auth="(?:(?:(?!"+r.src_ZCc+"|[@/\\[\\]()]).)+@)?",r.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",r.src_host_terminator="(?=$|"+i+"|"+r.src_ZPCc+")(?!"+(t["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+r.src_ZPCc+"))",r.src_path="(?:[/?#](?:(?!"+r.src_ZCc+"|"+i+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+r.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+r.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+r.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+r.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+r.src_ZCc+"|[']).)+\\'|\\'(?="+r.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+r.src_ZCc+"|[.]|$)|"+(t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+r.src_ZCc+"|$)|;(?!"+r.src_ZCc+"|$)|\\!+(?!"+r.src_ZCc+"|[!]|$)|\\?(?!"+r.src_ZCc+"|[?]|$))+|\\/)?",r.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',r.src_xn="xn--[a-z0-9\\-]{1,59}",r.src_domain_root="(?:"+r.src_xn+"|"+r.src_pseudo_letter+"{1,63})",r.src_domain="(?:"+r.src_xn+"|(?:"+r.src_pseudo_letter+")|(?:"+r.src_pseudo_letter+"(?:-|"+r.src_pseudo_letter+"){0,61}
14"+r.src_pseudo_letter+"))",r.src_host="(?:(?:(?:(?:"+r.src_domain+")\\.)*"+r.src_domain+"))",r.tpl_host_fuzzy="(?:"+r.src_ip4+"|(?:(?:(?:"+r.src_domain+")\\.)+(?:%TLDS%)))",r.tpl_host_no_ip_fuzzy="(?:(?:(?:"+r.src_domain+")\\.)+(?:%TLDS%))",r.src_host_strict=r.src_host+r.src_host_terminator,r.tpl_host_fuzzy_strict=r.tpl_host_fuzzy+r.src_host_terminator,r.src_host_port_strict=r.src_host+r.src_port+r.src_host_terminator,r.tpl_host_port_fuzzy_strict=r.tpl_host_fuzzy+r.src_port+r.src_host_terminator,r.tpl_host_port_no_ip_fuzzy_strict=r.tpl_host_no_ip_fuzzy+r.src_port+r.src_host_terminator,r.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+r.src_ZPCc+"|>|$))",r.tpl_email_fuzzy="(^|"+i+'|"|\\(|'+r.src_ZCc+")("+r.src_email_name+"@"+r.tpl_host_fuzzy_strict+")",r.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|ï½]|"+r.src_ZPCc+"))((?![$+<=>^`|ï½])"+r.tpl_host_port_fuzzy_strict+r.src_path+")",r.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|ï½]|"+r.src_ZPCc+"))((?![$+<=>^`|ï½])"+r.tpl_host_port_no_ip_fuzzy_strict+r.src_path+")",r}},328631,(e,t,r)=>{"use strict";function i(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){t&&Object.keys(t).forEach(function(r){e[r]=t[r]})}),e}function n(e){return Object.prototype.toString.call(e)}function s(e){return"[object Function]"===n(e)}function o(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var a={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},l={"http:":{validate:function(e,t,r){var i=e.slice(t);return(r.re.http||(r.re.http=RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(i))?i.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,r){var i=e.slice(t);return(r.re.no_http||(r.re.no_http=RegExp("^"+r.re.src_auth+"(?:localhost|(?:(?:"+r.re.src_domain+")\\.)+"+r.re.src_domain_root+")"+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(i))?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:i.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,r){var i=e.slice(t);return(r.re.mailto||(r.re.mailto=RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(i))?i.match(r.re.mailto)[0].length:0}}},c="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|ÑÑ".split("|");function u(){return function(e,t){t.normalize(e)}}function d(t){var r=t.re=e.r(318515)(t.__opts__),i=t.__tlds__.slice();function a(e){return e.replace("%TLDS%",r.src_tlds)}t.onCompile(),t.__tlds_replaced__||i.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),i.push(r.src_xn),r.src_tlds=i.join("|"),r.email_fuzzy=RegExp(a(r.tpl_email_fuzzy),"i"),r.link_fuzzy=RegExp(a(r.tpl_link_fuzzy),"i"),r.link_no_ip_fuzzy=RegExp(a(r.tpl_link_no_ip_fuzzy),"i"),r.host_fuzzy_test=RegExp(a(r.tpl_host_fuzzy_test),"i");var l=[];function c(e,t){throw Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}t.__compiled__={},Object.keys(t.__schemas__).forEach(function(e){var r=t.__schemas__[e];if(null!==r){var i,o={validate:null,link:null};if(t.__compiled__[e]=o,"[object Object]"===n(r)){"[object RegExp]"===n(r.validate)?(i=r.validate,o.validate=function(e,t){var r=e.slice(t);return i.test(r)?r.match(i)[0].length:0}):s(r.validate)?o.validate=r.validate:c(e,r),s(r.normalize)?o.normalize=r.normalize:r.normalize?c(e,r):o.normalize=u();return}if("[object String]"===n(r))return void l.push(e);c(e,r)}}),l.forEach(function(e){t.__compiled__[t.__schemas__[e]]&&(t.__compiled__[e].validate=t.__compiled__[t.__schemas__[e]].validate,t.__compiled__[e].normalize=t.__compiled__[t.__schemas__[e]].normalize)}),t.__compiled__[""]={validate:null,normalize:u()};var d=Object.keys(t.__compiled__).filter(function(e){return e.length>0&&t.__compiled__[e]}).map(o).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><ï½]|"+r.src_ZPCc+"))("+d+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[>
14<ï½]|"+r.src_ZPCc+"))("+d+")","ig"),t.re.schema_at_start=RegExp("^"+t.re.schema_search.source,"i"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),t.__index__=-1,t.__text_cache__=""}function p(e,t){var r=e.__index__,i=e.__last_index__,n=e.__text_cache__.slice(r,i);this.schema=e.__schema__.toLowerCase(),this.index=r+t,this.lastIndex=i+t,this.raw=n,this.text=n,this.url=n}function m(e,t){var r=new p(e,t);return e.__compiled__[r.schema].normalize(r,e),r}function h(e,t){if(!(this instanceof h))return new h(e,t);!t&&Object.keys(e||{}).reduce(function(e,t){return e||a.hasOwnProperty(t)},!1)&&(t=e,e={}),this.__opts__=i({},a,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=i({},l,e),this.__compiled__={},this.__tlds__=c,this.__tlds_replaced__=!1,this.re={},d(this)}h.prototype.add=function(e,t){return this.__schemas__[e]=t,d(this),this},h.prototype.set=function(e){return this.__opts__=i(this.__opts__,e),this},h.prototype.test=function(e){var t,r,i,n,s,o,a,l;if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;if(this.re.schema_test.test(e)){for((a=this.re.schema_search).lastIndex=0;null!==(t=a.exec(e));)if(n=this.testSchemaAt(e,t[2],a.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l<this.__index__)&&null!==(r=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(s=r.index+r[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=r.index+r[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(i=e.match(this.re.email_fuzzy))&&(s=i.index+i[1].length,o=i.index+i[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&o>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=o)),this.__index__>=0},h.prototype.pretest=function(e){return this.re.pretest.test(e)},h.prototype.testSchemaAt=function(e,t,r){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,r,this):0},h.prototype.match=function(e){var t=0,r=[];this.__index__>=0&&this.__text_cache__===e&&(r.push(m(this,t)),t=this.__last_index__);for(var i=t?e.slice(t):e;this.test(i);)r.push(m(this,t)),i=i.slice(this.__last_index__),t+=this.__last_index__;return r.length?r:null},h.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;var t=this.re.schema_at_start.exec(e);if(!t)return null;var r=this.testSchemaAt(e,t[2],t[0].length);return r?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+r,m(this,0)):null},h.prototype.tlds=function(e,t){return(e=Array.isArray(e)?e:[e],t)?this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,r){return e!==r[t-1]}).reverse():(this.__tlds__=e.slice(),this.__tlds_replaced__=!0),d(this),this},h.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},h.prototype.onCompile=function(){},t.exports=h},676027,e=>{"use strict";let t=/^xn--/,r=/[^\0-\x7F]/,i=/[\x2E\u3002\uFF0E\uFF61]/g,n={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},s=Math.floor,o=String.fromCharCode;function a(e){throw RangeError(n[e])}function l(e,t){let r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+(function(e,t){let r=[],i=e.length;for(;i--;)r[i]=t(e[i]);return r})((e=e.replace(i,".")).split("."),t).join(".")}function c(e){let t=[],r=0,i=e.length;for(;r<i;){let n=e.charCodeAt(r++);if(n>=55296&&n<=56319&&r<i){let i=e.charCodeAt(r++);(64512&i)==56320?t.push(((1023&n)<<10)+(1023&i)+65536):(t.push(n),r--)}else t.push(n)}return t}let u=e=>String.fromCodePoint(...e),d=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},p=function(e,t,r){let i=0;for(e=r?s(e/700):e>>1,e+=s(e/t);e>455;i+=36)e=s(e/35);return s(i+36*e/(e+38))},m=function(e){let t=[],r=e.length,i=0,n=128,o=72,l=e.lastIndexOf("-");l<0&&(l=0);for(let r=0;r<l;++r)e.charCodeAt(r)>=128&&a("not-basic"),t.push(e.charCodeAt(r));for(let u=l>0?l+1:0;u<r;){let l=i;for(let t=1,n=36;;n+=36){var c;u>=r&&a("invalid-input");let l=(c=e.charCodeAt(u++))>=48&&c<58?26+(c-48):c>=65&&c<91?c-65:c>=97&&c<123?c-97:36;l>=36&&a("invalid-input"),l>s((0x7fffffff-i)/t)&&a("overflow"),i+=l*t;let d=n<=o?1:n>=o+26?26:n-o;if(l<d)break;let p=36-d;t>s(0x7fffffff/p)&&a("overflow"),t*=p}let d=t.length+1;
14o=p(i-l,d,0==l),s(i/d)>0x7fffffff-n&&a("overflow"),n+=s(i/d),i%=d,t.splice(i++,0,n)}return String.fromCodePoint(...t)},h=function(e){let t=[],r=(e=c(e)).length,i=128,n=0,l=72;for(let r of e)r<128&&t.push(o(r));let u=t.length,m=u;for(u&&t.push("-");m<r;){let r=0x7fffffff;for(let t of e)t>=i&&t<r&&(r=t);let c=m+1;for(let h of(r-i>s((0x7fffffff-n)/c)&&a("overflow"),n+=(r-i)*c,i=r,e))if(h<i&&++n>0x7fffffff&&a("overflow"),h===i){let e=n;for(let r=36;;r+=36){let i=r<=l?1:r>=l+26?26:r-l;if(e<i)break;let n=e-i,a=36-i;t.push(o(d(i+n%a,0))),e=s(n/a)}t.push(o(d(e,0))),l=p(n,c,m===u),n=0,++m}++n,++i}return t.join("")},g=function(e){return l(e,function(e){return t.test(e)?m(e.slice(4).toLowerCase()):e})},x=function(e){return l(e,function(e){return r.test(e)?"xn--"+h(e):e})};e.s(["decode",0,m,"default",0,{version:"2.3.1",ucs2:{decode:c,encode:u},decode:m,encode:h,toASCII:x,toUnicode:g},"encode",0,h,"toASCII",0,x,"toUnicode",0,g,"ucs2decode",0,c,"ucs2encode",0,u])},680997,(e,t,r)=>{"use strict";t.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"ââââ",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},311985,(e,t,r)=>{"use strict";t.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"ââââ",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}}},657944,(e,t,r)=>{"use strict";t.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"ââââ",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},19236,(e,t,r)=>{"use strict";var i=e.r(785306),n=e.r(979167),s=e.r(681902),o=e.r(413510),a=e.r(689451),l=e.r(904483),c=e.r(328631),u=e.r(274899),d=e.r(676027),p={default:e.r(680997),zero:e.r(311985),commonmark:e.r(657944)},m=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function g(e){var t=e.trim().toLowerCase();return!m.test(t)||!!h.test(t)}var x=["http:","https:","mailto:"];function f(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||x.indexOf(t.protocol)>=0))try{t.hostname=d.toASCII(t.hostname)}catch(e){}return u.encode(u.format(t))}function y(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||x.indexOf(t.protocol)>=0))try{t.hostname=d.toUnicode(t.hostname)}catch(e){}return u.decode(u.format(t),u.decode.defaultChars+"%")}function T(e,t){if(!(this instanceof T))return new T(e,t);t||i.isString(e)||(t=e||{},e="default"),this.inline=new l,this.block=new a,this.core=new o,this.renderer=new s,this.linkify=new c,this.validateLink=g,this.normalizeLink=f,this.normalizeLinkText=y,this.utils=i,this.helpers=i.assign({},n),this.options={},this.configure(e),t&&this.set(t)}T.prototype.set=function(e){return i.assign(this.options,e),this},T.prototype.configure=function(e){var t,r=this;if(i.isString(e)&&!(e=p[t=e]))throw Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw Error("Wrong `markdown-it` preset, can't be empty");return e.options&&r.set(e.options),e.components&&Object.keys(e.components).forEach(function(t){e.components[t].rules&&r[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&r[t].ruler2.enableO
14nly(e.components[t].rules2)}),this},T.prototype.enable=function(e,t){var r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){r=r.concat(this[t].ruler.enable(e,!0))},this),r=r.concat(this.inline.ruler2.enable(e,!0));var i=e.filter(function(e){return 0>r.indexOf(e)});if(i.length&&!t)throw Error("MarkdownIt. Failed to enable unknown rule(s): "+i);return this},T.prototype.disable=function(e,t){var r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){r=r.concat(this[t].ruler.disable(e,!0))},this),r=r.concat(this.inline.ruler2.disable(e,!0));var i=e.filter(function(e){return 0>r.indexOf(e)});if(i.length&&!t)throw Error("MarkdownIt. Failed to disable unknown rule(s): "+i);return this},T.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},T.prototype.parse=function(e,t){if("string"!=typeof e)throw Error("Input data should be a String");var r=new this.core.State(e,this,t);return this.core.process(r),r.tokens},T.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},T.prototype.parseInline=function(e,t){var r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens},T.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},t.exports=T},477094,(e,t,r)=>{"use strict";t.exports=e.r(19236)},193283,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=e=>{e.renderer.rules.image,e.renderer.rules.image=(e,t,r,i,n)=>{let s=e[t],o=s.attrIndex("src");if(s&&s.attrs&&s.attrs[o]&&(s.attrs[o][1].includes("youtube.com")||s.attrs[o][1].includes("youtube-nocookie.com"))){let e=s.attrs[o][1].split("/").slice(-1)[0];return`<iframe width="100%" height="500px" src="https://www.youtube-nocookie.com/embed/${e}" frameborder="0" allow="accelerometer;" autoplay;="" encrypted-media;="" gyroscope;="" picture-in-picture="" allowfullscreen=""></iframe>`}let a=s.attrIndex("src"),l=s.attrs[a][1],c=s.attrIndex("alt"),u=s.attrs[c][1];return`<figure class='image'><img src=${l} alt=${u}/></figure>`}}},465789,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.replaceClassToToken=r.addClassToToken=r.toArray=r.splitWithSpace=void 0,r.splitWithSpace=e=>e?e.split(" "):[],r.toArray=e=>Array.isArray(e)?e:[e],r.addClassToToken=(e,t)=>{let i=(0,r.splitWithSpace)((null==e?void 0:e.attrGet("class"))||"");return e.attrSet("class",[...i,...t].join(" "))},r.replaceClassToToken=(e,t)=>e.attrSet("class",t.join(" "))},403371,(e,t,r)=>{t.exports={h1:["title","is-level-1"],h2:["title","is-level-2"],h3:["title","is-level-3"],h4:["title","is-level-4"],h5:["title","is-level-5"],h6:["title","is-level-6"],p:"text",a:"link",ul:"list",ol:"list",hr:"is-divider",table:["table","is-bordered","is-fullwidth"],em:"is-italic"}},30789,(e,t,r)=>{"use strict";var i=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});let n=e.r(465789),s=i(e.r(403371)).default,o=e=>{e.forEach(e=>{if(/(_open$|image|hr)/.test(e.type)&&s[e.tag]){let t=(0,n.toArray)(s[e.tag]);(0,n.addClassToToken)(e,t)}e.children&&o(e.children)})},a=e=>{o(e.tokens)};r.default=(e,t)=>{s=t||s,e.core.ruler.push("markdownit-tag-to-trilogy-class",a)}},774543,(e,t,r)=>{function i(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}r.getAttrs=function(e,t,r){let i=/[^\t\n\f />"'=]/,n=[],s="",o="",a=!0,l=!1;for(let c=t+r.leftDelimiter.length;c<e.length;c++){if(e.slice(c,c+r.rightDelimiter.length)===r.rightDelimiter){""!==s&&n.push([s,o]);break}let t=e.charAt(c);if("="===t&&a){a=!1;continue}if("."===t&&""===s){"."===e.charAt(c+1)?(s="css-module",c+=1):s="class",a=!1;continue}if("#"===t&&""===s){s="id",a=!1;continue}if('"'===t&&""===o&&!l){l=!0;continue}if('"'===t&&l){l=!1;continue}if(" "===t&&!l){if(""===s)continue;n.push([s,o]),s="",o="",a=!0;continue}if(!a||-1!==t.search(i)){if(a){s+=t;continue}o+=t}}if(r.allowedAttributes&&r.allowedAttributes.length){let e=r.allowedAttributes;return n.filter(function(t){let r=t[0];return e.some(function(e){return r===e||e instanceof RegExp&&e.test(r)})})}return n},r.addAttrs=function(e,t){for(let r=0,i=e.length;r<i;++r){let i=e[r][0];"class"===i?t.attrJoin("class",e[r][1]):"css-module"===i?t.attrJoin("css-module",e[r][1]):t.attrPush(e[r])}return t},r.hasDelimiters=function(e,t){if(!e)throw Error('Parameter `where` not passed. Should be "start", "end" or "only".');return function(r){var i;let n,s,o,a,l,c=t.leftDelimiter.length+1+t.rightDelimiter.length;if(!r||"string"!=typeof r||r.length<c)return!1;let u=c-t.rightDelimiter.length;switch(e){case"start":s=-1==(n=r.slice(0,t.leftDelimiter.length)===t.leftDelimiter?0:-1)?-1:r.indexOf(t.rightDelimiter,u),(o=r.charAt(s+t.rightDelimiter.length))&&-1!==t.rightDelimiter.indexOf(o)&&(s=-1);break;case"end":s=(s=-1===(n=r.lastIndexOf(t.leftDelimiter))?-1:r.indexOf(t.rightDelimiter,n+u))===r.length-t.rightDelimiter.length?s:-1;break;case"only":n=r.slice(0,t.leftDelimiter.length)===t.leftDelimiter?0:-1,s=r.slice(r.length-t.rightDelimiter.length)===t.rightDelimiter?r.length-t.rightDelimiter.length:-1;break;default:throw Error(`Unexpected case ${e}, expected 'start', 'end' or 'only'`)}return -1!==n&&-1!==s&&(a="."===(i=r.substring(n,s+t.rightDelimiter.length)).charAt(t.leftDelimiter.length),l="#"===i.charAt(t.leftDelimiter.length),a||l?i.length>=c+1:i.length>=c)}},r.removeDelimiter=function(e,t){let r=i(t.leftDelimiter),n=i(t.rightDelimiter),s=RegExp("[ \\n]?"+r+"[^"+r+n+"]+"+n+"$"),o=e.search(s);return -1!==o?e.slice(0,o):e},r.escapeRegExp=i,r.getMatchingOpeningToken=function(e,t){if("softbreak"===e[t].type)return!1;if(0===e[t].nesting)return e[t];let r=e[t].level,i=e[t].type.replace("_close","_open");for(;t>=0;--t)if(e[t].type===i&&e[t].level===r)return e[t];return!1};let n=/[&<>"]/,s=/[&<>"]/g,o={"&":"&","<":"<",">":">",'"':"""};function a(e){return o[e]}r.escapeHtml=function(e){return n.test(e)?e.replace(s,a):e}},82017,(e,t,r)=>{"use strict";let i=e.r(774543);function n(e){return e.slice(-1)[0]}
14function s(e){e.hidden=!0,e.children&&e.children.forEach(e=>(e.content="",void s(e)))}t.exports=e=>{let t=RegExp("^ {0,3}[-*_]{3,} ?"+i.escapeRegExp(e.leftDelimiter)+"[^"+i.escapeRegExp(e.rightDelimiter)+"]");return[{name:"fenced code blocks",tests:[{shift:0,block:!0,info:i.hasDelimiters("end",e)}],transform:(t,r)=>{let n=t[r],s=n.info.lastIndexOf(e.leftDelimiter),o=i.getAttrs(n.info,s,e);i.addAttrs(o,n),n.info=i.removeDelimiter(n.info,e)}},{name:"inline nesting 0",tests:[{shift:0,type:"inline",children:[{shift:-1,type:e=>"image"===e||"code_inline"===e},{shift:0,type:"text",content:i.hasDelimiters("start",e)}]}],transform:(t,r,n)=>{let s=t[r].children[n],o=s.content.indexOf(e.rightDelimiter),a=t[r].children[n-1],l=i.getAttrs(s.content,0,e);i.addAttrs(l,a),s.content.length===o+e.rightDelimiter.length?t[r].children.splice(n,1):s.content=s.content.slice(o+e.rightDelimiter.length)}},{name:"tables",tests:[{shift:0,type:"table_close"},{shift:1,type:"paragraph_open"},{shift:2,type:"inline",content:i.hasDelimiters("only",e)}],transform:(t,r)=>{let n=t[r+2],s=i.getMatchingOpeningToken(t,r),o=i.getAttrs(n.content,0,e);i.addAttrs(o,s),t.splice(r+1,3)}},{name:"tables thead metadata",tests:[{shift:0,type:"tr_close"},{shift:1,type:"thead_close"},{shift:2,type:"tbody_open"}],transform:(e,t)=>{let r=i.getMatchingOpeningToken(e,t),n=e[t-1],s=0,o=t;for(;--o;){if(e[o]===r){e[o-1].meta=Object.assign({},e[o+2].meta,{colsnum:s});break}s+=0|(e[o].level===n.level&&e[o].type===n.type)}e[t+2].meta=Object.assign({},e[t+2].meta,{colsnum:s})}},{name:"tables tbody calculate",tests:[{shift:0,type:"tbody_close",hidden:!1}],transform:(e,t)=>{let r=t-2;for(;r>0&&"tbody_open"!==e[--r].type;);let i=0|e[r].meta.colsnum;if(i<2)return;let n=e[t].level+2;for(let o=r;o<t;o++){if(e[o].level>n)continue;let a=e[o],l=a.hidden?0:0|a.attrGet("rowspan"),c=a.hidden?0:0|a.attrGet("colspan");if(l>1){let t=i-(c>0?c:1);for(let r=o,i=l;i>1;r++)"tr_open"==e[r].type&&(e[r].meta=Object.assign({},e[r].meta),e[r].meta&&e[r].meta.colsnum&&(t-=1),e[r].meta.colsnum=t,i--)}if("tr_open"==a.type&&a.meta&&a.meta.colsnum){let r=a.meta.colsnum;for(let i=o,n=0;i<t;i++){if("td_open"==e[i].type)n+=1;else if("tr_close"==e[i].type)break;n>r&&(e[i].hidden||s(e[i]))}}if(c>1){let n=[],l=o+3,u=i;for(let t=o;t>r;t--)if("tr_open"==e[t].type){u=e[t].meta&&e[t].meta.colsnum||u;break}else"td_open"===e[t].type&&n.unshift(t);for(let r=o+2;r<t;r++)if("tr_close"==e[r].type){l=r;break}else"td_open"==e[r].type&&n.push(r);let d=u-n.indexOf(o);d=d>c?c:d,c>d&&a.attrSet("colspan",d+"");for(let t=n.slice(u+1-i-d)[0];t<l;t++)e[t].hidden||s(e[t])}}}},{name:"inline attributes",tests:[{shift:0,type:"inline",children:[{shift:-1,nesting:-1},{shift:0,type:"text",content:i.hasDelimiters("start",e)}]}],transform:(t,r,n)=>{let s=t[r].children[n],o=s.content,a=i.getAttrs(o,0,e),l=i.getMatchingOpeningToken(t[r].children,n-1);i.addAttrs(a,l),s.content=o.slice(o.indexOf(e.rightDelimiter)+e.rightDelimiter.length)}},{name:"list softbreak",tests:[{shift:-2,type:"list_item_open"},{shift:0,type:"inline",children:[{position:-2,type:"softbreak"},{position:-1,type:"text",content:i.hasDelimiters("only",e)}]}],transform:(t,r,n)=>{let s=t[r].children[n].content,o=i.getAttrs(s,0,e),a=r-2;for(;t[a-1]&&"ordered_list_open"!==t[a-1].type&&"bullet_list_open"!==t[a-1].type;)a--;i.addAttrs(o,t[a-1]),t[r].children=t[r].children.slice(0,-2)}},{name:"list double softbreak",tests:[{shift:0,type:e=>"bullet_list_close"===e||"ordered_list_close"===e},{shift:1,type:"paragraph_open"},{shift:2,type:"inline",content:i.hasDelimiters("only",e),children:e=>1===e.length},{shift:3,type:"paragraph_close"}],transform:(t,r)=>{let n=t[r+2].content,s=i.getAttrs(n,0,e),o=i.getMatchingOpeningToken(t,r);i.addAttrs(s,o),t.splice(r+1,3)}},{name:"list item end",tests:[{shift:-2,type:"list_item_open"},{shift:0,type:"inline",children:[{position:-1,type:"text",content:i.hasDelimiters("end",e)}]}],transform:(t,r,s)=>{let o=t[r].children[s],a=o.content,l=i.getAttrs(a,a.lastIndexOf(e.leftDelimiter),e);i.addAttrs(l,t[r-2]);let c=a.slice(0,a.lastIndexOf(e.leftDelimiter));o.content=" "!==n(c)?c:c.slice(0,-1)}},{name:"\n{.a} softbreak then curly in start",tests:[{shift:0,type:"inline",children:[{position:-2,type:"softbreak"},{position:-1,type:"text",content:i.hasDelimiters("only",e)}]}],transform:(t,r,n)=>{let s=t[r].children[n],o=i.getAttrs(s.content,0,e),a=r+1;for(;t[a+1]&&-1===t[a+1].nesting;)a++;let l=i.getMatchingOpeningToken(t,a);i.addAttrs(o,l),t[r].children=t[r].children.slice(0,-2)}},{name:"horizontal rule",tests:[{shift:0,type:"paragraph_open"},{shift:1,type:"inline",children:e=>1===e.length,content:e=>null!==e.match(t)},{shift:2,type:"paragraph_close"}],transform:(t,r)=>{let n=t[r];n.type="hr",n.tag="hr",n.nesting=0;let s=t[r+1].content,o=s.lastIndexOf(e.leftDelimiter),a=i.getAttrs(s,o,e);i.addAttrs(a,n),n.markup=s,t.splice(r+1,2)}},{name:"end of block",tests:[{shift:0,type:"inline",children:[{position:-1,content:i.hasDelimiters("end",e),t
14ype:e=>"code_inline"!==e&&"math_inline"!==e}]}],transform:(t,r,s)=>{let o=t[r].children[s],a=o.content,l=i.getAttrs(a,a.lastIndexOf(e.leftDelimiter),e),c=r+1;do if(t[c]&&-1===t[c].nesting)break;while(c++<t.length)let u=i.getMatchingOpeningToken(t,c);i.addAttrs(l,u);let d=a.slice(0,a.lastIndexOf(e.leftDelimiter));o.content=" "!==n(d)?d:d.slice(0,-1)}}]}},764962,(e,t,r)=>{"use strict";let i=e.r(82017),n={leftDelimiter:"{",rightDelimiter:"}",allowedAttributes:[]};t.exports=function(e,t){let r=Object.assign({},n),s=i(r=Object.assign(r,t));e.core.ruler.before("linkify","curly_attributes",function(e){let t=e.tokens;for(let e=0;e<t.length;e++)for(let r=0;r<s.length;r++){let i=s[r],n=null;if(i.tests.every(r=>{let i=function e(t,r,i){var n,s,o,a;let l={match:!1,j:null},c=void 0!==i.shift?r+i.shift:i.position;if(void 0!==i.shift&&c<0)return l;let u=(n=t,(s=c)>=0?n[s]:n[n.length+s]);if(void 0===u)return l;for(let t of Object.keys(i))if("shift"!==t&&"position"!==t){if(void 0===u[t])return l;if("children"===t&&Array.isArray(o=i.children)&&o.length&&o.every(e=>"object"==typeof e)){let t;if(0===u.children.length)return l;let r=i.children,n=u.children;if(r.every(e=>void 0!==e.position)){if(t=r.every(t=>e(n,t.position,t).match)){let e=(r.slice(-1)[0]||{}).position;l.j=e>=0?e:n.length+e}}else for(let i=0;i<n.length;i++)if(t=r.every(t=>e(n,i,t).match)){l.j=i;break}if(!1===t)return l;continue}switch(typeof i[t]){case"boolean":case"number":case"string":if(u[t]!==i[t])return l;break;case"function":if(!i[t](u[t]))return l;break;case"object":if(Array.isArray(a=i[t])&&a.length&&a.every(e=>"function"==typeof e)){if(!1===i[t].every(e=>e(u[t])))return l;break}default:throw Error(`Unknown type of pattern test (key: ${t}). Test should be of type boolean, number, string, function or array of functions.`)}}return l.match=!0,l}(t,e,r);return null!==i.j&&(n=i.j),i.match}))try{i.transform(t,e,n),("inline attributes"===i.name||"inline nesting 0"===i.name)&&r--}catch(e){console.error(`markdown-it-attrs: Error in pattern '${i.name}': ${e.message}`),console.error(e.stack)}}})}},299316,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let i=e.r(764962),n=e.r(465789);r.default=e=>{let t=!1;e.use(i);let r=(e,t,r,i,n)=>n.renderToken(e,t,r),s=e.renderer.rules.link_open||r,o=e.renderer.rules.link_close||r;e.renderer.rules.link_open=(e,r,i,o,a)=>{let l=e[r];return l.attrIndex("CTA")>-1&&l.attrs?(t=!0,l.attrs.splice(l.attrIndex("CTA"),1),(0,n.replaceClassToToken)(l,["button","is-primary","is-loaded"]),`<span class="buttons has-text-centered"><a${a.renderAttrs(l)} type="button" style="text-decoration: none; padding: 0 16px; font-weight: 600; margin: 24px auto;">`):s(e,r,i,o,a)},e.renderer.rules.link_close=(e,r,i,n,s)=>
14t?(t=!1,"</a></span>"):o(e,r,i,n,s)}},543881,(e,t,r)=>{"use strict";var i=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function n(e,t){var r,n,s=e.posMax,o=e.pos;if(94!==e.src.charCodeAt(o)||t||o+2>=s)return!1;for(e.pos=o+1;e.pos<s;){if(94===e.src.charCodeAt(e.pos)){r=!0;break}e.md.inline.skipToken(e)}return!r||o+1===e.pos||(n=e.src.slice(o+1,e.pos)).match(/(^|[^\\])(\\\\)*\s/)?(e.pos=o,!1):(e.posMax=e.pos,e.pos=o+1,e.push("sup_open","sup",1).markup="^",e.push("text","",0).content=n.replace(i,"$1"),e.push("sup_close","sup",-1).markup="^",e.pos=e.posMax+1,e.posMax=s,!0)}t.exports=function(e){e.inline.ruler.after("emphasis","sup",n)}},455205,(e,t,r)=>{"use strict";var i=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.markdownTrilogy=void 0;let n=i(e.r(477094)),s=i(e.r(193283)),o=i(e.r(30789)),a=i(e.r(299316));r.markdownTrilogy=t=>new n.default().use(o.default).use(s.default).use(a.default).use(e.r(543881)).render(t)}]); 15 16//# sourceMappingURL=0pdirez8oou49.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.