1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[628],{7936:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile/billing",function(){return n(5628)}])},6884:function(e,t,n){"use strict";var i=n(5893),r=n(5187);t.Z=e=>{let{errorMsg:t}=e;return(0,i.jsx)("div",{className:"grow flex items-center justify-center",children:t||(0,i.jsx)(r.Z,{height:90,width:90})})}},8707:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var i=n(5893),r=n(1664),s=n.n(r);let l=[{text:"Profile Info",href:"/profile/info"},{text:"Users",href:"/profile/users"},{text:"Store Settings",href:"/profile/store-settings"},{text:"Metrics Definitions",href:"/profile/metrics-definitions"},{text:"Billing",href:"/profile/billing"}],a=e=>{let{children:t,href:n,isActive:r}=e;return(0,i.jsx)("li",{className:"".concat(r&&"border-b-2 pb-0.5 border-myPaleBlue border-0.5 md:font-bold"),children:(0,i.jsx)(s(),{href:n,legacyBehavior:!0,children:t})})};var o=e=>{let{activeLink:t}=e;return(0,i.jsx)("div",{className:"md:px-6 py-4 md:pt-10 border-b md:border-r border-black ",style:{minWidth:200},children:(0,i.jsx)("ul",{className:"flex mx-auto items-center max-w-[640px] px-4 md:px-0 md:items-start md:flex-col gap-10 whitespace-nowrap md:whitespace-normal overflow-auto",children:l.map(e=>(0,i.jsx)(a,{href:e.href,isActive:t===e.text,children:e.text},e.href))})})},c=e=>{let{children:t,activeNavLink:n}=e;return(0,i.jsxs)("div",{className:"flex flex-col md:flex-row grow",children:[(0,i.jsx)(o,{activeLink:n}),(0,i.jsx)("div",{className:"px-6 container pt-11 md:pt-14 md:px-20 pb-20",children:t})]})}},8133:function(e,t,n){"use strict";var i=n(7294),r=n(4965);t.Z=e=>{let t=(0,i.useContext)(r.z);(0,i.useEffect)(()=>(t&&t.updatePage(e),()=>null==t?void 0:t.updatePage("")),[t,e])}},5628:function(e,t,n){"use strict";n.r(t);var i=n(5893),r=n(7294),s=n(9669),l=n.n(s),a=n(8707),o=n(6884),c=n(8133),d=n(9580),u=n(7195),f=n(8205),x=n(9008),m=n.n(x),h=n(5811);let p=e=>{let{title:t,stat:n}=e;return(0,i.jsxs)("div",{className:"mb-12",children:[(0,i.jsx)("h3",{className:"mb-4",children:t}),(0,i.jsx)("p",{children:n})]})};t.default=()=>{let{user:e,isLoading:t,errorMsg:n}=(0,u.Z)(!0);(0,c.Z)("profile");let[s,x]=(0,r.useState)(null),[g,v]=(0,r.useState)(!1),[j,b]=(0,r.useState)("");async function w(){v(!0);try{let e=await l().get(d.z0+"/api/billing/user-info",{withCredentials:!0});console.log(e),x(e.data),v(!1)}catch(i){var e,t,n;console.log(i),(0,h.I)(i)&&(null==i?void 0:null===(t=i.response)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.message)?b(i.response.data.message):b(null!==(n=i.message)&&void 0!==n?n:"Whoops, something went wrong."),v(!1)}}return((0,r.useEffect)(()=>{w()},[e]),!e||t)?(0,i.jsx)(o.Z,{errorMsg:n}):(0,i.jsxs)(a.Z,{activeNavLink:"Billing",children:[(0,i.jsx)(m(),{children:(0,i.jsxs)("title",{children:["Billing Info | ",d.iC]})}),(0,i.jsx)("h1",{children:"Billing Information"}),g?(0,i.jsx)("div",{className:"mt-10",children:"Loading billing info..."}):""!==j?(0,i.jsx)("p",{className:"mt-10 text-red-500",children:j}):(0,i.jsx)("div",{className:"mt-16",children:s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p,{title:"Plan Type:",stat:s.name}),(0,i.jsx)(p,{title:"Activation Date:",stat:(0,f.ie)(s.activated_on)}),(0,i.jsx)(p,{title:"First Payment:",stat:(0,f.ie)(s.billing_on)}),(0,i.jsx)(p,{title:"Price:",stat:"$".concat(s.price," / month")})]})})]})}},8205:function(e,t,n){"use strict";n.d(t,{LE:function(){return u},YG:function(){return d},bm:function(){return o},ie:function(){return a},p6:function(){return l}});var i=n(5582),r=n.n(i),s=n(9580);let l=e=>{let t=c(e),n=e.getDate(),i=e.getFullYear();return"".concat(t," ").concat(n,", ").concat(i)},a=e=>r()(e).format("MMM DD, YYYY"),o=e=>r()(e).format("YYYY-MM-DD"),c=e=>s.gg[e.getMonth()],d=(e,t)=>{for(var n=[],i=new Date(e);i<=new Date(t);i.setDate(i.getDate()+1))n.push(new Date(i));return n},u=e=>r()(e,"YYYY-MM-DD",!0).isValid()},9008:function(e,t,n){e.exports=n(7828)}},function(e){e.O(0,[885,888,774,179],function(){return e(e.s=7936)}),_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.