PageSourceSearch

https://ici.tou.tv/_next/static/chunks/pages/abonnement-utilisateu…/completer-profil-3b9292143953e761.js

js tou.tv collected 2026-09-24 17:44:26 UTC 5,520 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[631],{196:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/abonnement-utilisateur/inscription/completer-profil",function(){return n(1090)}])},46206:function(e,t,n){"use strict";n.d(t,{Z:function(){return C}});var i=n(24246),o=n(28228),r=n(27378),c=n(88039),l=n(30504),s=n(90093),u=n(55072),a=n(15224),d=n(69864),f=n(31367),h=n(95850),p=n(60473),m=n(56718),g=n(17668),b=n(24241),v=n(52419),x=n(1585),j=n(50416),_=n(3257);let Z=e=>(null==e?void 0:e.behaviour)===h.kY.AutoSubscribe,w=e=>(null==e?void 0:e.behaviour)===h.kY.Manual;function C(e){let{fromEntitlements:t,onSubmit:n}=e,{auth:u}=(0,a.a)(),{accountData:h,isLoading:x}=(0,m.m)(),{mailingLists:_,loading:C}=(0,d.Z)(),[S]=(0,r.useState)({level:"success",title:(0,p.t)("Your account has been successfully created!")}),[T,$]=(0,r.useState)(!1),I=(0,r.useRef)(null),{spacing:N,fontWeights:L}=(0,o.useTheme)(),{register:R,handleSubmit:B,setValue:F}=(0,c.cI)({mode:"onBlur"}),H=(null==_?void 0:_.filter(w).length)===0,M=(0,r.useCallback)(async e=>{if(null==u?void 0:u.accessToken){for(let t of($(!0),null!=_?_:[])){if(!t.id)return;
1if(Z(t)||(null==e?void 0:e[t.id])){let e={id:t.id,toutv:t.id===g.PY,partner:t.id===g.Vq};try{await (0,f.eF)(u.accessToken,t.id,!0),(0,b.cM)(new v.a4(e))}catch(t){(0,b.cM)(new v.a4(e,t))}}}$(!1),null==n||n()}else t||null==n||n()},[null==u?void 0:u.accessToken,_,n,t]),Y=B(M);return((0,r.useEffect)(()=>{null==_||_.filter(Z).forEach(e=>{e.id&&F(e.id,!0)})},[_,F]),(0,r.useEffect)(()=>{if(["warning","error"].includes(S.level)){var e;window.scrollTo({top:null===(e=I.current)||void 0===e?void 0:e.getBoundingClientRect().top,behavior:"smooth"})}},[S]),(0,r.useEffect)(()=>{H&&M()},[M,H]),x||C)?(0,i.jsx)(y,{}):!h||H?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.SH,{alert:S,ref:I}),(0,i.jsxs)(s.ZP,{onSubmit:Y,children:[(0,i.jsx)(s.ZP.Title,{children:(0,p.t)("Complete your Profile")}),(0,i.jsx)(E,{$_css3:N[16],children:null==_?void 0:_.filter(w).map(e=>e.id?(0,i.jsxs)("div",{children:[(0,i.jsx)(k,{color:"gray-b",weight:"light",$_css:N[16],children:e.title}),(0,i.jsx)(P,{htmlFor:e.id,text:e.description,$_css2:L.light,children:(0,i.jsx)(s.ZP.Checkbox,{...R(e.id)})})]},e.id):null)}),(0,i.jsx)(s.ZP.Buttons,{children:(0,i.jsx)(j.Z,{isLoading:T,type:"submit",backgroundColor:"brandDarker",children:(0,p.t)("Continue")})})]})]})}var y=(0,o.default)(x.Z).withConfig({componentId:"sc-ba7cd02a-0"})({margin:"0 auto"}),k=(0,o.default)(_.l5).withConfig({componentId:"sc-ba7cd02a-1"})(e=>({marginBottom:e.$_css})),P=(0,o.default)(u.ZP.CheckboxLabel).withConfig({componentId:"sc-ba7cd02a-2"})(e=>({"* & p":{fontWeight:e.$_css2}})),E=(0,o.default)(s.ZP.Content).withConfig({componentId:"sc-ba7cd02a-3"})(e=>({gap:e.$_css3}))},50416:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var i=n(24246),o=n(28228);n(27378);var r=n(50220),c=n(60473),l=n(40209),s=n(85022),u=n(7811);function a(e){let{isLoading:t,children:n,...o}=e;return(0,i.jsx)(f,{disabled:t,isLoading:t,"data-cy":r.$n.loadingBtn,...o,children:(0,i.jsx)(d,{isLoading:t,children:n})})}function d(e){let{isLoading:t,loadingAriaLabel:n,children:o}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(h,{"aria-hidden":t,$_css:t?0:1,children:o}),t&&(0,i.jsx)(u.Z,{"aria-label":null!=n?n:(0,c.t)("Loading")})]})}var f=(0,o.default)(function(e){let{isLoading:t,buttonComponent:n="Primary",children:o,...r}=e,c={Primary:l.Z,Secondary:s.Z}[n];return(0,i.jsx)(c,{...r,children:o})}).withConfig({componentId:"sc-6e3d265d-0"})({position:"relative"}),h=(0,o.default)("span").withConfig({componentId:"sc-6e3d265d-1"})(e=>({opacity:e.$_css}))},12126:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var i=n(69755),o=n(56718);function r(e,t){let{accountData:n,isLoading:r}=(0,o.m)(),c=null!=e?e:t;if(!c)throw Error("useEntitlementsFlow: Either redirectUrl or loginUrl must be provided");let l=!!t&&("string"==typeof c&&"string"==typeof t?c!==t:"object"==typeof c&&"object"==typeof t?c.pathname!==t.pathname:("string"==typeof c?c:c.pathname)!==("string"==typeof t?t:t.pathname));return(0,i.Z)(c,l),{isLoadingRequiredData:r||!n}}},69755:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var i=n(27378),o=n(86677),r=n(15224);function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],{auth:n}=(0,r.a)(),c=(0,o.useRouter)(),[l,s]=(0,i.useState)(!1);(0,i.useEffect)(()=>{n&&(t||!n.accessToken)&&!l&&(s(!0),c.replace(e))},[t,e,n,l,c])}},1090:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return m},default:function(){return g}});var i=n(24246),o=n(86677),r=n(46206),c=n(66899),l=n(60029),s=n(27378),u=n(17668),a=n(56718),d=n(12126),f=n(65861),h=n(60473),p=n(59502),m=!0;function g(){let e=(0,o.useRouter)();return!function(){let{accountData:e}=(0,a.m)(),{query:t}=(0,o.useRouter)(),n=!!(null==e?void 0:e.firstName)&&!!(null==e?void 0:e.lastName),i=(0,s.useMemo)(()=>{if(n)return u.HQ.subscription.identification},[n]),r={pathname:u.HQ.subscription.login,query:t},{isLoadingRequiredData:c}=(0,d.Z)(i,r)}(),(0,i.jsxs)(p.Z,{pageId:f.u.SubscriptionAccountCompleteProfile,children:[(0,i.jsx)(c.Z,{title:"".concat((0,h.t)("Complete profile")," | ").concat((0,h.t)("Account | Premium Subscription"))}),(0,i.jsx)(l.Z,{children:(0,i.jsx)(r.Z,{onSubmit:()=>e.push(u.HQ.subscription.identification),fromEntitlements:!0})})]})}}},function(e){e.O(0,[3085,346,546,2888,9774,179],function(){return e(e.s=196)}),_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.