PageSourceSearch

https://www.empara.fr/_next/static/chunks/pages/pay/go-b5de5fc2c4b80621.js

js empara.fr collected 2026-09-28 06:41:49 UTC 7,164 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4873,5067],{11508:(e,r,t)=>{"use strict";t.d(r,{A:()=>s});let s=(0,t(17963).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},30860:(e,r,t)=>{"use strict";t.d(r,{A:()=>s});let s=(0,t(17963).A)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},35739:(e,r,t)=>{"use strict";t.d(r,{A:()=>s});let s=(0,t(17963).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},51412:(e,r,t)=>{"use strict";t.d(r,{A:()=>o});var s=t(37876);t(14232);var i=t(93242),n=t.n(i);function o(e){let{width:r,top:t,left:i,styles:o}=e,a={"--dataWidth":r||"34px","--dataTop":t||"30%","--dataLeft":i||"0px",...o};return(0,s.jsxs)("div",{className:"".concat(n().Loader),style:a,children:[(0,s.jsx)("div",{}),(0,s.jsx)("div",{}),(0,s.jsx)("div",{}),(0,s.jsx)("div",{})]})}},56732:(e,r,t)=>{"use strict";t.d(r,{A:()=>s});let s=(0,t(17963).A)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},69405:(e,r,t)=>{"use strict";t.r(r),t.d(r,{__N_SSP:()=>p,default:()=>m});var s=t(37876),i=t(14232),n=t(89099),o=t(79804),a=t(51412),l=t(92035),d=t(77328),c=t.n(d);let u="true"===t(65364).env.NEXT_PUBLIC_ENABLE_GO_SPECIAL_OPERATION;var p=!0;let m=e=>{let{user:r}=e,t=(0,n.useRouter)(),{item:d,option:p="once",coupon:m,courseId:f,label:h}=t.query,[x,y]=(0,i.useState)(!1),[w,v]=(0,i.useState)(!0),[j,E]=(0,i.useState)(null),[_,b]=(0,i.useState)("Initialisation..."),g=(0,i.useRef)(!1);(0,i.useEffect)(()=>{if(t.isReady){if(!r){v(!1),y(!0);return}g.current||(g.current=!0,N())}},[t.isReady,t.query,r]);let N=async()=>{try{if(v(!0),E(null),!d&&!h)throw Error("Param\xe8tre 'item' ou 'label' manquant.");if("curieux"===d&&!f)throw Error("Param\xe8tre 'courseId' manquant pour l'offre Curieux.");b("Pr\xe9paration de ta commande...");let r=["DSJBNTR","PANPGHTRS","MEJXJXXS","ZXJXJXXS","GFHTYD","SDNGHTUM","FPSXHTWL"],t="passionne"===d||"pro"===d||"pro12"===d||"passionne12"===d||r.includes(d),s=await fetch("/api/pay/initialize-cart",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({item:d,label:h,option:p,rec:t||h?"sub":"payment",course:f?{_id:f}:void 0,returnUrl:"/abonnements",isSpecialOperation:u})}),i=await s.json();if(!i.success){if(i.needsAnticipation)throw Error("Ce plan n\xe9cessite une action manuelle (anticipation). Veuillez passer par la page des tarifs.");throw Error(i.error||"Erreur lors de l'initialisation du panier.")}i.needsAnticipation&&i.id&&i.url&&(i.sessionId=i.id,i.sessionUrl=i.url);let n=i.sessionId,o=i.sessionUrl;if("twelve_times"===p){var e;if(!(null==(e=i.session12x)?void 0:e.sessionId))throw Error("Le paiement en 12 fois n'est pas disponible pour cette offre.");n=i.session12x.sessionId,o=i.session12x.sessionUrl}else if("four_times"===p){if(!i.sessionId)throw Error("Erreur lors de la cr\xe9ation de la session de paiement.");n=i.sessionId,o=i.sessionUrl}else n=i.sessionId,o=i.sessionUrl;if((null==m?void 0:m.trim())&&!r.includes(d)){b("Application du code promo...");try{let e=await fetch("/api/pay/apply-coupon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:n,couponCode:m.trim()})}),r=await e.json();if(!r.success)throw Error(r.error||"Code promo invalide.");r.sessionId&&(n=r.sessionId),r.sessionUrl&&(o=r.sessionUrl)}catch(e){throw console.error("Erreur lors de l'application du coupon:",e),Error(e.message||"Erreur lors de l'application du code promo.")}}if(b("Redirection vers le paiement..."),"once"===p){if(!o)throw Error("URL de session Stripe manquante.");window.location.href=o}else if("four_times"===p||"twelve_times"===p){b("Cr\xe9ation du paiement en plusieurs fois...");let e=await fetch("/api/pay/create-alma-payment",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:n})}),r=await e.json();if(!r.success)throw Error(r.error||"Erreur lors de l'initialisation du paiement Alma.");
1if(!r.paymentUrl)throw Error("URL de paiement Alma introuvable.");b("Redirection vers Alma..."),window.location.href=r.paymentUrl}else throw Error("Option de paiement non valide: ".concat(p))}catch(e){console.error("Payment flow error:",e),E(e.message||"Une erreur est survenue."),v(!1),b("")}};return(0,s.jsxs)("div",{className:"min-h-screen bg-black flex flex-col items-center justify-center p-4 font-sans ".concat(h?"pt-20":""),children:[(0,s.jsxs)(c(),{children:[(0,s.jsx)("title",{children:"Paiement en cours - Empara"}),(0,s.jsx)("meta",{name:"robots",content:"noindex, nofollow"})]}),w&&(0,s.jsxs)("div",{className:"flex flex-col items-center animate-in fade-in duration-500",children:[(0,s.jsx)(a.A,{}),(0,s.jsx)("p",{className:"text-gray-400 text-lg font-light tracking-wide animate-pulse mt-6",children:_})]}),j&&!w&&(0,s.jsxs)("div",{className:"max-w-md w-full bg-[#1e1e1e] border border-red-900/50 rounded-xl p-8 text-center shadow-2xl animate-in slide-in-from-bottom-4 duration-500",children:[(0,s.jsx)("div",{className:"w-16 h-16 bg-red-900/20 rounded-full flex items-center justify-center mx-auto mb-6",children:(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8 text-red-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,s.jsx)("h2",{className:"text-2xl font-bold text-white mb-2",children:"Une erreur est survenue"}),(0,s.jsx)("p",{className:"text-gray-400 mb-8",children:j}),(0,s.jsx)(l.A,{variant:"primary",fullWidth:!0,onClick:()=>t.push("/abonnements"),children:"Retour aux abonnements"})]}),!r&&!w&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex flex-col items-center gap-6 max-w-sm w-full text-center",children:[(0,s.jsx)("div",{className:"text-gray-400 text-lg",children:"Connecte-toi pour continuer..."}),(0,s.jsx)(l.A,{variant:"primary",size:"medium",fullWidth:!0,onClick:()=>y(!0),children:"Se connecter"})]}),(0,s.jsx)(o.A,{isOpen:x,onClose:()=>{y(!1)},onSuccess:()=>{window.location.reload()},subscriptionInfo:d?{item:d,customTitle:"Pour profiter de ton offre",pricing:{standard:{yearly:{amount:0},monthly:{amount:0}},pro:{yearly:{amount:0}}}}:null})]})]})}},89926:(e,r,t)=>{"use strict";t.d(r,{A:()=>s});let s=(0,t(17963).A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},93242:e=>{e.exports={Loader:"Loader_Loader__yw0V1","lds-ring":"Loader_lds-ring__Vntqy"}},97552:(e,r,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/pay/go",function(){return t(69405)}])}},e=>{e.O(0,[5068,8864,1959,1725,9804,636,6593,8792],()=>e(e.s=97552)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.