Loading
function(e,t,a){a.d(t,{RB:()=>p,aB:()=>N,x6:()=>g});var s=a(636537),i=a(691540),n=a(857250),r=a(97483),l=a(228366),c=a(181658),o=a(919466),d=a(297966),u=a(652215),m=a(375708);function A(){let e=o.A.getRequestState();return e===d.db.FETCHING||e===d.db.CANCELLING}async function N(e){if(!A()){l.h.dispatch({type:"PARTNER_ACTIVATION_FETCH_START"});try{let t=await s.Bo.post({url:u.Rsh.PARTNER_PERK(e),body:{},rejectWithError:!0});return l.h.dispatch({type:"PARTNER_ACTIVATION_FETCH_SUCCESS",activationStatus:t.body}),t.body}catch{l.h.dispatch({type:"PARTNER_ACTIVATION_FETCH_FAILURE"}),(0,i.P0)((0,n.o)(m.intl.string(m.t.F8FvUy),r.Ck.FAILURE))}}}async function g(e){if(!A()){l.h.dispatch({type:"PARTNER_ACTIVATION_FETCH_START"});try{let t=await s.Bo.get({url:u.Rsh.PARTNER_PERK_ACTIVATION_STATUS(e),rejectWithError:!0});return l.h.dispatch({type:"PARTNER_ACTIVATION_FETCH_SUCCESS",activationStatus:t.body}),t.body}catch(e){10138===new c.A(e).code?l.h.dispatch({type:"PARTNER_ACTIVATION_RESET"}):l.h.dispatch({type:"PARTNER_ACTIVATION_FETCH_FAILURE"})}}}async function p(e){if(!A()){l.h.dispatch({type:"PARTNER_CANCELLATION_START"});try{await s.Bo.del({url:u.Rsh.PARTNER_PERK(e),rejectWithError:!0}),l.h.dispatch({type:"PARTNER_CANCELLATION_SUCCESS"})}catch{l.h.dispatch({type:"PARTNER_CANCELLATION_FAILURE"}),(0,i.P0)((0,n.o)(m.intl.string(m.t.F8FvUy),r.Ck.FAILURE))}}}}