"use strict";(self.webpackChunksp_seller_dashboard_client=self.webpackChunksp_seller_dashboard_client||[]).push([[8586],{78428(e,n,t){var l=t(85569),r=t.n(l),i=t(64007),o=t.n(i),a=t(39510),u=(t(62436),t(90875),t(57107),t(60954)),s=t(88149),d=t(94892),c=t(21757),v=t(12827),m=t.n(v),g=t(6641),h=t(68238),p=t(59681);var E=t(81120),w=t(3320),f=t(8186),y=t(70821),k=t(28797),_=t(62056),S=t(18979),b=t.n(S),I=t(66512),T=t.n(I),N=t(72132),P=t(12408),A=e=>{var{url:n,titleText:t,keywords:l,description:r,canonicalLink:i,pageSchema:o}=e;(0,u.useEffect)(()=>{P.A.setMetaTagsSEO(n,t,r,l,i,o)},[n,t,r,l,i,o])};var F,O=t(1723),L=t(33544),C=t(64772),D=(0,C.J1)(F||(F=(0,L.A)(["\n query validateSubAccountInvite($token: String!) {\n validateSubAccountInvite(token: $token) {\n token_id\n invitee_email\n }\n }\n"]))),U=t(86226),B=t.n(U),x=t(11265),z=t.n(x),R=e=>{var n;if(!e||"object"!=typeof e)return null;var t=e,l=null!==(n=t.error_code)&&void 0!==n?n:t.errorCode,r=t.message;return l||r?{error_code:l,message:r}:null};function G(e){var n,t,l=null===(n=e.message)||void 0===n?void 0:z()(n).call(n),r=null===(t=e.error_code)||void 0===t?void 0:z()(t).call(t);return l&&"Something went wrong"!==l?{error_code:r||"UNKNOWN",message:l}:r?{error_code:r,message:r}:null}function M(e){var n,t;if(!e)return null;for(var l=function(e){var n,t,l=[];B()(n=e.graphQLErrors).call(n,e=>{var n=e.extensions,t=null==n?void 0:n.response,r=null==t?void 0:t.body;l.push(null==r?void 0:r.result,r,null==t?void 0:t.error,t)});var r=null===(t=e.networkError)||void 0===t?void 0:t.result;if(r&&"object"==typeof r){var i,o,a,u,s=r;null===(i=s.errors)||void 0===i||B()(i).call(i,e=>{var n=e.extensions,t=null==n?void 0:n.response,r=null==t?void 0:t.body;l.push(null==r?void 0:r.result,r,null==t?void 0:t.error,t,n,e)}),l.push(null===(o=s.extensions)||void 0===o||null===(a=o.__DEBUG_LOGS__)||void 0===a||null===(u=a[0])||void 0===u?void 0:u.error,r,r.error)}return l}(e),r=0;r{var{inviteError:n}=e;return u.createElement(V.y,{themeVariant:"light"},u.createElement($,null,u.createElement(j.A,{icon:"Failure",primaryMessage:n.message})))};var Y,H,J=(0,C.J1)(Y||(Y=(0,L.A)(["\n query resolveBrandStoreInvite($token: String) {\n resolveBrandStoreInvite(token: $token) {\n token_id\n status\n route\n invitee_email\n }\n }\n"]))),K=((0,C.J1)(H||(H=(0,L.A)(["\n mutation redeemBrandStoreInvite($token: String) {\n redeemBrandStoreInvite(token: $token) {\n message\n }\n }\n"]))),"VALID"),Q={NOT_FOUND:"This invite link is invalid.",EXPIRED:"This invite link has expired.",ALREADY_USED:"This invite link has already been used.",GSTIN_MISMATCH:"Your GSTIN does not match the one associated with this invite."},X={loading:!1,isValid:!1,route:null,invitee_email:null,token_id:null,inviteError:null},q={NOT_FOUND:{title:"This link isn't working",subtitle:"Something went wrong opening this invite.\nPlease try again, or contact your brand if the problem continues."},EXPIRED:{title:"This invite has expired",subtitle:"Invitation links are valid only for 7 days.\nAsk your brand to send you a fresh invite to join their network on Flipkart."},ALREADY_USED:{title:"You've already used this invite",subtitle:"You have already used this invite link on Flipkart.\nLog in to your Seller account to manage it.",showLoginBtn:!0},GSTIN_MISMATCH:{title:"GSTIN doesn't match",subtitle:"The GSTIN on your account doesn't match the one your brand used to invite you, so we couldn't add you to their network.\nPlease reach out to the brand for a fresh invite."},DEFAULT:{title:"This link isn't working",subtitle:"Something went wrong opening this invite.\nPlease try again, or contact your brand if the problem continues."}};function Z(e){var n,t,l,r,{data:i,loading:o,error:a}=(0,O.I)(J,{variables:{token:e},skip:!e,fetchPolicy:"network-only"});if(!e)return X;var u=null!==(n=null==i?void 0:i.resolveBrandStoreInvite)&&void 0!==n?n:null,s=!a&&(null==u?void 0:u.status)===K,d=null!==(t=null!==(l=a?function(e){var n,t,l,r,i=null===(n=e.graphQLErrors)||void 0===n||null===(t=n[0])||void 0===t||null===(l=t.extensions)||void 0===l?void 0:l.status;return i&&i!==K&&i in Q?{error_code:i,message:null!==(r=Q[i])&&void 0!==r?r:"Something went wrong. Please try again."}:null}(a):null)&&void 0!==l?l:M(a))&&void 0!==t?t:u&&!s?{error_code:u.status,message:null!==(r=Q[u.status])&&void 0!==r?r:"Something went wrong. Please try again."}:null;return{loading:o,isValid:s,route:s?u.route:null,invitee_email:s?u.invitee_email:null,token_id:s?u.token_id:null,inviteError:d}}const ee=e=>{var{token:n,email:t}=e;return(0,u.useEffect)(()=>{t&&sessionStorage.setItem("brand_invite_email",t);var e=new(T());e.set("show_login","true"),e.set("invite_token",n),e.set("inviteType","brand"),window.location.href="/?".concat(e.toString())},[]),null};var ne=t(13203),te=E.default.div.withConfig({displayName:"styles__Wrapper",componentId:"sc-3as0pd-0"})(["min-height:60vh;width:100%;display:flex;align-items:center;justify-content:center;p,span{white-space:pre-line !important;text-align:center !important;}"]);const le=e=>{var{inviteError:n}=e,t=q[n.error_code],l=null!=t?t:{title:n.message||q.DEFAULT.title,subtitle:""},r=l.showLoginBtn?{alignment:"center",buttons:[{buttonType:ne.uk.secondary,size:ne.Mp.small,onClick:()=>{window.location.href="/"},children:"Continue to Login"}]}:void 0;return u.createElement(V.y,{themeVariant:"light"},u.createElement(te,null,u.createElement(j.A,{icon:"Failure",primaryMessage:l.title,userMessage:l.subtitle,buttonGroupProps:r})))};var re=u.lazy(()=>t.e(5754).then(t.t.bind(t,45754,23))),ie=u.lazy(()=>t.e(9163).then(t.t.bind(t,29163,23))),oe=u.lazy(()=>t.e(9995).then(t.t.bind(t,19995,23)).then(e=>({default:e.Container}))),ae=u.lazy(()=>t.e(7560).then(t.t.bind(t,7560,23))),ue=()=>{var[e,n]=(0,u.useState)(null);if((0,u.useEffect)(()=>{t.e(7560).then(t.t.bind(t,7560,23)).then(e=>{n(()=>e.useWindowSizeContext)})},[]),!e)return u.createElement(N.N9,{hideProgressBar:!0,position:N.oR.POSITION.TOP_RIGHT});var{isMobile:l}=e();return u.createElement(N.N9,{hideProgressBar:!0,position:l?N.oR.POSITION.TOP_CENTER:N.oR.POSITION.TOP_RIGHT})},se=e=>{var{breakPoint:n,children:t}=e;return u.createElement(u.Suspense,{fallback:u.createElement(u.Fragment,null)},u.createElement(ae,{breakPoint:n},u.createElement(u.Fragment,null,u.createElement(oe,null,u.createElement(ie,{activePage:"signUp"}),t),u.createElement(a.z,null))))};const de=()=>{var e,n;try{var t,l,r;null===(t=window)||void 0===t||null===(l=t.sessionStorage)||void 0===l||null===(r=l.clear)||void 0===r||r.call(l)}catch(e){}var i=(0,f.A)(),o=Number(null==i||null===(e=i.resolution)||void 0===e||null===(n=e.mobileCutoff)||void 0===n?void 0:b()(n).call(n,0,-5))||768,a=new(T())(window.location.search),s=a.get("token"),d="brand"===a.get("inviteType"),c="true"===a.get("redeem_error"),{isValid:v,loading:m,invite:g,inviteError:h}=function(e){var n,{data:t,loading:l,error:r}=(0,O.I)(D,{variables:{token:e},skip:!e,fetchPolicy:"network-only"});if(!e)return{isValid:!0,loading:!1,invite:null,inviteError:null};var i=null!==(n=null==t?void 0:t.validateSubAccountInvite)&&void 0!==n?n:null,o=M(r),a=!r&&(null==i?void 0:i.token_id)===e;return{isValid:a,loading:l,invite:a?i:null,inviteError:o}}(d?null:s),{loading:p,isValid:E,route:w,invitee_email:y,inviteError:k}=Z(d&&!c?s:null);if(A({url:"https://seller.flipkart.com/signUp/accountCreation/new",titleText:"Sell on Flipkart | Start Selling with 0% Fees Commission",description:"Start selling on Flipkart today! Simple sign-up, secure payments, and 0% fees Commission. Reach millions of customers and grow your business now!",keywords:"Flipkart seller, sell online, seller registration, online marketplace, e-commerce India",canonicalLink:"https://seller.flipkart.com/signUp/accountCreation/new"}),d?p:m)return null;if(d&&c)return u.createElement(se,{breakPoint:o},u.createElement(le,{inviteError:{error_code:"DEFAULT",message:""}}));if(d){if(s&&!E)return u.createElement(se,{breakPoint:o},u.createElement(le,{inviteError:k||{error_code:"DEFAULT",message:"Something went wrong. Please try again."}}));if("LOGIN"===w)return u.createElement(ee,{token:s,email:y});if("SIGNUP"===w){var _={invitee_email:y,token:s};return u.createElement(se,{breakPoint:o},u.createElement(re,{brandInvite:_}),u.createElement(ue,null))}}return s&&!v?u.createElement(se,{breakPoint:o},u.createElement(W,{inviteError:h||{error_code:"UNKNOWN",message:"Something went wrong. Please try again."}})):u.createElement(se,{breakPoint:o},u.createElement(re,{invite:g}),u.createElement(ue,null))};var ce,ve,me,ge,he,pe,Ee,we,fe=t(71401),ye=t(46071);"undefined"!=typeof window&&(window.scriptsLoaded=!0);var ke="undefined"!=typeof window&&/\/accountCreation\/new\/?$/.test(window.location.pathname||""),_e=e=>{try{if(!e)return;return JSON.parse(e)}catch(e){return}};ke&&(()=>{if("undefined"!=typeof window){try{var e;null===fe.A||void 0===fe.A||null===(e=fe.A.clearItem)||void 0===e||e.call(fe.A)}catch(e){}try{var n,t;null===(n=window.sessionStorage)||void 0===n||null===(t=n.clear)||void 0===t||t.call(n)}catch(e){}(()=>{if("undefined"!=typeof window)try{var e,n,t,l,i,o,a,u,s,d,c=_e(null===(e=window.localStorage)||void 0===e||null===(n=e.getItem)||void 0===n?void 0:n.call(e,"__appData"))||{},v=_e(null===(t=window.localStorage)||void 0===t||null===(l=t.getItem)||void 0===l?void 0:l.call(t,"campaign")),m=c.__deviceId||(null==c?void 0:c.deviceId)||(null==c?void 0:c.__deviceID)||"",g=c.source||"Direct",h=c.medium||"",p=c.term||"",E=v&&"object"==typeof v?v:{gclid:"",utmCampaign:"",utmSource:"direct",utmMedium:""};null===(i=window.localStorage)||void 0===i||null===(o=i.clear)||void 0===o||o.call(i),null===(a=window.localStorage)||void 0===a||null===(u=a.setItem)||void 0===u||u.call(a,"__appData",r()({__deviceId:m,source:g,medium:h,campaign:"",term:p})),null===(s=window.localStorage)||void 0===s||null===(d=s.setItem)||void 0===d||d.call(s,"campaign",r()(E))}catch(e){}})()}})();var Se=m()(),be=function(e,n){var t=[(0,g.wf)(n),p.default],l=[(0,h.applyMiddleware)(...t)],r=h.compose;return(0,h.createStore)((0,g.S6)(n)(e),{},r(...l))}(w.A,Se,"Login App"),Ie=document.getElementById("app"),Te=(0,ye.A)(),Ne=new y.A;document.getElementsByTagName("link")[0].href=null==Ne||null===(ce=Ne.textStrings)||void 0===ce||null===(ve=ce.sellerBoardCommon)||void 0===ve?void 0:ve.favicon;var Pe=u.lazy(()=>t.e(2126).then(t.t.bind(t,12126,23))),Ae=u.lazy(()=>t.e(7760).then(t.t.bind(t,57760,23))),Fe=u.lazy(()=>t.e(2684).then(t.t.bind(t,42684,23))),Oe=u.lazy(()=>t.e(5735).then(t.t.bind(t,45735,23))),Le=ke;d.render(u.createElement(c.Provider,{store:be},u.createElement(g.Ny,{history:Se},u.createElement(u.Suspense,{fallback:u.createElement(u.Fragment,null)},u.createElement(s.BrowserRouter,null,u.createElement(c.Provider,{store:be},u.createElement(g.Ny,{history:Se},u.createElement(k.X,{client:_.S},u.createElement(E.ThemeProvider,{theme:(0,f.A)()},Le?u.createElement(u.Fragment,null,u.createElement(de,null)):"HYPERLOCAL"===Te?u.createElement(u.Fragment,null,(null==Se||null===(me=Se.location)||void 0===me?void 0:o()(ge=me.pathname).call(ge,"ignite"))>-1?u.createElement(u.Fragment,null):u.createElement(Pe,null),u.createElement(u.Suspense,{fallback:u.createElement(u.Fragment,null)},u.createElement(Oe,null)),u.createElement(Ae,null),u.createElement(a.z,null)):u.createElement(u.Fragment,null,(null==Se||null===(he=Se.location)||void 0===he?void 0:o()(pe=he.pathname).call(pe,"multi-select"))>-1?u.createElement(Pe,null):u.createElement(u.Fragment,null," "),u.createElement(u.Suspense,{fallback:u.createElement(u.Fragment,null)},u.createElement(Fe,null)),(null==Se||null===(Ee=Se.location)||void 0===Ee?void 0:o()(we=Ee.pathname).call(we,"multi-select"))>-1?u.createElement(Ae,null):u.createElement(u.Fragment,null," "),u.createElement(a.z,null)))))))))),Ie)}},e=>{e.O(0,[903,414,293,995,5639],()=>{return n=78428,e(e.s=n);var n});e.O()}]);