1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2166],{87348:function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/subscription/[id]/pay",function(){return n(35186)}])},40570:function(e,r,n){"use strict";var t=n(26042),i=n(69396),a=n(99534),s=n(85893),o=n(67294),l=n(86002),c=n(4662),d=n(282),u=n(71344),p=o.forwardRef((function(e,r){var n=e.color,p=(0,a.Z)(e,["color"]),h=(0,c.Z)(),f=o.useMemo((function(){switch(n){case"default":case"inherit":case"primary":case"secondary":case void 0:return h;case"warning":return(0,i.Z)((0,t.Z)({},h),{palette:(0,i.Z)((0,t.Z)({},h.palette),{primary:(0,t.Z)({},h.palette.warning)})});case"error":return(0,i.Z)((0,t.Z)({},h),{palette:(0,i.Z)((0,t.Z)({},h.palette),{primary:(0,t.Z)({},h.palette.error)})});default:return(0,l.default)((0,i.Z)((0,t.Z)({},h),{palette:{primary:{main:n}}}))}}),[n,h]);return"default"===n||"inherit"===n||"primary"===n||"secondary"===n||void 0===n?(0,s.jsx)(d.Z,(0,t.Z)({ref:r,color:n},p)):(0,s.jsx)(u.Z,{theme:f,children:(0,s.jsx)(d.Z,(0,t.Z)({ref:r,color:"primary"},p))})}));r.Z=p},62284:function(e,r,n){"use strict";var t=n(14924),i=n(26042),a=n(85893),s=n(67294),o=n(32427),l=n(43832),c=(0,o.Z)((function(e){return{root:(0,t.Z)({},e.breakpoints.down("xs"),{paddingRight:"8px",paddingLeft:"8px"})}})),d=s.forwardRef((function(e,r){var n=c();return(0,a.jsx)(l.Z,(0,i.Z)({ref:r,classes:n,fixed:!0,maxWidth:"sm"},e))}));r.Z=d},35186:function(e,r,n){"use strict";n.r(r),n.d(r,{__N_SSP:function(){return D},default:function(){return P}});var t=n(85893),i=n(67294),a=n(9008),s=n.n(a),o=n(11163),l=n(2859),c=n(86664),d=n(33681),u=n(13048),p=n(47568),h=n(828),f=n(20414),x=n(60357),Z=n.n(x),m=n(60253),v=n(8936),j=n(18463),b=n(51907),y=n(79912),w=n(82302),S=n(99613),_=n(88222),g=n(57394),k=n(22318),C=n(40570),N=function(e){var r,n=e.subscription,a=(0,m.$G)().t,s=(0,c.useElements)(),o=(0,c.useStripe)(),l=(0,h.Z)(i.useState(!1),2),d=l[0],u=l[1],x=(0,h.Z)(i.useState(""),2),N=x[0],E=x[1],D=i.useCallback(function(){var e=(0,p.Z)((function(e){var r;return(0,f.__generator)(this,(function(t){switch(t.label){case 0:return e.preventDefault(),s&&o&&n.ID?(u(!0),[4,o.confirmPayment({elements:s,confirmParams:{return_url:"".concat("https://baskadia.com","/auth/subscription/").concat(n.ID,"/thanks")}})]):[2];case 1:return"card_error"===(r=t.sent().error).type||"validation_error"===r.type?E(r.message||a("error-occurred")):E(a("error-occurred")),u(!1),[2]}}))}));return function(r){return e.apply(this,arguments)}}(),[s,o,n.ID,a]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("form",{onSubmit:D,className:"jsx-ff7a0ca1633abda0",children:(0,t.jsxs)(j.Z,{children:[(0,t.jsxs)(y.Z,{children:[(0,t.jsx)(k.Z,{variant:"h6",children:a("payment")}),(0,t.jsx)("div",{className:"jsx-ff7a0ca1633abda0 container",children:(0,t.jsx)(k.Z,{variant:"body1",children:(0,t.jsx)(w.Z,{children:(0,t.jsxs)(S.Z,{children:[(0,t.jsxs)(g.Z,{style:{border:"none"},children:[(0,t.jsx)(_.Z,{component:"th",scope:"row",style:{whiteSpace:"nowrap"},children:a("creator")}),(0,t.jsx)(_.Z,{style:{fontWeight:"bold",wordBreak:"break-all"},children:(null===(r=n.Seller)||void 0===r?void 0:r.Name)||a("guest")})]}),(0,t.jsxs)(g.Z,{children:[(0,t.jsx)(_.Z,{component:"th",scope:"row",style:{whiteSpace:"nowrap"},children:a("plan")}),(0,t.jsx)(_.Z,{style:{fontWeight:"bold"},children:a(n.CurrentPlan||"")})]}),(0,t.jsxs)(g.Z,{children:[(0,t.jsx)(_.Z,{component:"th",scope:"row",style:{border:"none",whiteSpace:"nowrap"},children:a("monthly-fee")}),(0,t.jsxs)(_.Z,{style:{border:"none",fontWeight:"bold"},children:[(((null===n||void 0===n?void 0:n.CurrentPrice)||0)/100).toLocaleString()," ","USD"]})]})]})})})}),(0,t.jsx)(c.PaymentElement,{options:{layout:"tabs"}}),N&&(0,t.jsx)(v.Z,{color:"error",style:{marginTop:"16px"},children:N})]}),(0,t.jsx)(b.Z,{children:(0,t.jsx)(C.Z,{color:"primary",disabled:d,type:"submit",variant:"contained",style:{marginLeft:"auto"},children:a("pay")})})]})}),(0,t.jsx)(Z(),{id:"ff7a0ca1633abda0",children:".container.jsx-ff7a0ca1633abda0{margin:16px 0;padding:8px 16px;border:solid 1px#bdbdbd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}"})]})},E=n(62284),D=!0,P=function(){var e,r=(0,o.useRouter)().query,n="string"===typeof r.id?r.id:"",a=(0,u.Z)(n?"/auth/subscription/".concat(n):null).data,p={appearance:{theme:"stripe"},clientSecret:null===a||void 0===a?void 0:a.ClientSecret},h=i.useMemo((function(){var e;return(null===a||void 0===a||null===(e=a.Seller)||void 0===e?void 0:e.StripeID)?(0,l.J)("pk_live_51JlNQrBgBWAqLUreSsnfu4ekOlQKXrk3G4YEfjDKa62949Cs4CazwZiFZIMRw2iv9gUzpvC2PrNuYyQezs1triHV00EscMbAUK",{str
1ipeAccount:null===a||void 0===a?void 0:a.Seller.StripeID}):null}),[null===a||void 0===a||null===(e=a.Seller)||void 0===e?void 0:e.StripeID]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s(),{children:(0,t.jsx)("title",{children:"Baskadia"})}),(!(null===a||void 0===a?void 0:a.ClientSecret)||!h)&&(0,t.jsx)(d.Z,{}),(null===a||void 0===a?void 0:a.ClientSecret)&&h&&(0,t.jsx)(E.Z,{maxWidth:"sm",children:(0,t.jsx)(c.Elements,{options:p,stripe:h,children:(0,t.jsx)(N,{subscription:a})})})]})}}},function(e){e.O(0,[5304,5696,9774,2888,179],(function(){return r=87348,e(e.s=r);var r}));var r=e.O();_N_E=r}]);
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.