!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="36efefc3-3d7d-4015-97a0-ce01a5796b8e",e._sentryDebugIdIdentifier="sentry-dbid-36efefc3-3d7d-4015-97a0-ce01a5796b8e")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9612],{31311:(e,t,r)=>{r.d(t,{o:()=>_});var n,a=r(7620),c=r(48590),o=r(30857),s=r(47919),i=function(e){var t=e.referenceHash,r=(0,c.A)();return{favoritesStarButton:(0,o.q)((0,s.t)({referenceHash:t,utils:{dispatch:r}}))}},l=r(77785),u=r.n(l),f=function(e){return(null==e?void 0:e._type)==="CoachMarkError"},p=r(60348),v=r(40071),d=r(69292),m=r(60180),b=r(274),h=r(84397);let y=function(e){var t=(0,d.P)().buildBrandClassNames,r=e.title,n=e.description,c=e.onClose,o=e.className;return a.createElement("div",{className:t({common:["min-w-[231px] max-w-[336px] flex-col rounded-[5px] border-onDark-01 p-3 text-onDark-01",o]}),"data-testid":"atom-coach-mark"},a.createElement("div",{className:"space-y-1"},a.createElement("div",{className:t({common:"flex font-bold",eurosport:"caps-s6-fx",tntsports:"title-5"})},f(e)&&a.createElement(p.A,{type:v.M.STATUS_ERROR_COLOURED_ON_DARK,size:14,className:"mr-2"}),r,a.createElement("button",{onClick:c,"aria-label":"Close",className:"ml-auto"},a.createElement(p.A,{type:v.M.CROSS,variant:v.l.INHERIT,size:16}))),n&&a.createElement("div",{className:t({common:"items-center",eurosport:"caption-s6-fx",tntsports:"caption-2"})},n)),f(e)&&a.createElement("div",{className:"flex"},a.createElement(b.A,{className:"mt-3.5",href:e.cta.href,size:h.M.MEDIUM,variant:h.A.SECONDARY,target:e.cta.isTargetBlank?"_blank":void 0,"data-testId":"".concat(e._type,"-CTA")},(0,m.r)(e.cta.label))),(null==e?void 0:e._type)==="CoachMarkSignIn"&&a.createElement("div",{className:"flex items-center space-x-2"},a.createElement(b.A,{className:"mt-3.5",href:e.signInCta.href,size:h.M.MEDIUM,variant:h.A.SECONDARY,target:e.signInCta.isTargetBlank?"_blank":void 0,"data-testId":"".concat(e._type,"-CTA-sign-in")},(0,m.r)(e.signInCta.label)),a.createElement(b.A,{className:"mt-3.5",href:e.signUpCta.href,size:h.M.MEDIUM,variant:h.A.OUTLINE,target:e.signUpCta.isTargetBlank?"_blank":void 0,"data-testId":"".concat(e._type,"-CTA-sign-up")},(0,m.r)(e.signUpCta.label))))};var g=r(35431);function k(){return(k=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=Array(t);r{r.d(t,{$:()=>M,t:()=>w});var n=r(1756),a=r(23491),c=r(24977),o=r(60863),s=r(10898),i=r(29306),l=r(11972),u=r(17681),f=r(38070),p=r(54628),v=r(595),d=r.n(v),m=r(79636),b=r(97695),h=r(38880),y=function(e){return e.ADD="ADD",e.REMOVE="REMOVE",e}({}),g=function(e){var t=e.userStatus,r=e.t,n=e.signInUrl,a=e.signUpUrl,c=e.manageFavoritesUrl,o=e.action,s=e.favoritesCount;return t===m.A.GUEST_USER?{_type:"CoachMarkSignIn",resetCallback:void 0,title:r("zones.score_center.favorites.coachmarks.sign_in.title"),description:r("zones.score_center.favorites.coachmarks.sign_in.description"),signInCta:{_type:h.u,href:null!=n?n:"",label:r("zones.score_center.favorites.coachmarks.sign_in.sign_in_cta")},signUpCta:{_type:h.u,href:null!=a?a:"",label:r("zones.score_center.favorites.coachmarks.sign_in.sign_up_cta")}}:s>=b.hn&&o===y.ADD?{_type:"CoachMarkError",resetCallback:void 0,title:r("zones.score_center.favorites.coachmarks.error.title"),description:r("zones.score_center.favorites.coachmarks.error.description"),cta:{_type:h.u,href:null!=c?c:"",label:r("zones.score_center.favorites.coachmarks.error.cta")}}:{_type:"CoachMarkSuccess",resetCallback:void 0,title:r(o===y.ADD?"zones.score_center.favorites.coachmarks.success_add.title":"zones.score_center.favorites.coachmarks.success_delete.title")}},k=r(43840),O=r(3974),E=r(49912),_=function(e,t,r,n){var a;return a=(0,p.A)(d().mark(function a(c,s){var l,u,p,v,m,h,_,A,C,I,D,N,S,M,w;return d().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(p=s(),v=(0,i.yl)(p),m=(0,i.bI)(p),_=(h=(0,i.mT)(p)).userStatus,A=h.loginPageUrl,C=h.createAccountPageUrl,I=h.myAccountFavoritesPageUrl,D=g({userStatus:_,favoritesCount:v.length,action:r?y.REMOVE:y.ADD,t:n,signInUrl:A,signUpUrl:C,manageFavoritesUrl:I}),c((0,O.U0)({coachMark:D})),m){a.next=10;break}return a.abrupt("return");case 10:if(S=null!==(l=null===(u=(0,o.X7)(e))||void 0===u?void 0:u.id)&&void 0!==l?l:"",!r){a.next=15;break}N=v.filter(function(e){return e.id!==S}),a.next=19;break;case 15:if(!(v.length>=b.hn)){a.next=17;break}return a.abrupt("return");case 17:M={id:String(S),type:t},N=[].concat((0,f.A)(v),[M]);case 19:return c((0,O.IN)({userFavoritesEntityIds:N.map(function(e){return e.id})})),w=(0,i.vp)(p),a.prev=21,a.next=24,c(k.$.initiate({favorites:N,userToken:m,options:w})).unwrap();case 24:a.next=30;break;case 26:a.prev=26,a.t0=a.catch(21),c((0,O.IN)({userFavoritesEntityIds:v.map(function(e){return e.id})})),c((0,O.Pk)({toasterStatus:E.v9.ERROR}));case 30:case"end":return a.stop()}},a,null,[[21,26]])})),function(e,t){return a.apply(this,arguments)}};function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function C(e){for(var t=1;t{r.d(t,{a:()=>n});var n="FavoritesStarButtonContainerInput"},89284:(e,t,r)=>{r.d(t,{H:()=>o});var n=r(66514),a=r(60863),c=r(4882);(0,n.q)(c.c);var o=function(e){return(0,a.pp)(c.c,e)}},92394:(e,t,r)=>{r.d(t,{q:()=>o});var n=r(66514),a=r(60863),c=r(57064);(0,n.q)(c.F);var o=function(e){return(0,a.pp)(c.F,e)}}}]); //# sourceMappingURL=9612-bd6aa72c2a5c56c7.js.map