PageSourceSearch

https://eskolare.shop/_next/static/chunks/pages/_sites/[site]/pay-by-link/[basketUid]-2ce6f14af1a2d0fb.js

js eskolare.shop collected 2026-10-06 01:02:42 UTC 9,540 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9119],{37944:function(l,i,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_sites/[site]/pay-by-link/[basketUid]",function(){return e(27791)}])},85765:function(l,i,e){"use strict";e.d(i,{Z:function(){return v}});var n=e(85893),o=e(82623),s=e(7414),t=e(95117),r=e(97564),d=e(54777),a=e(71232),u=e(67294),c=e(18501);function v(l){let{options:i}=l;return(0,n.jsxs)(o.X,{withBorder:!0,children:[(0,n.jsx)(s.x,{p:"xs",children:(0,n.jsx)(t.x,{weight:"bold",size:"sm",children:"Complementos"})}),(0,n.jsx)(r.K,{spacing:0,children:i.map(l=>{let{additionAmount:i,name:e,type:o,value:r,uid:v}=l;return(0,n.jsxs)(u.Fragment,{children:[(0,n.jsx)(d.i,{}),(0,n.jsxs)(a.Z,{p:"xs",position:"apart",children:[(0,n.jsxs)(s.x,{children:[(0,n.jsx)(t.x,{size:"xs",children:e}),(0,n.jsx)(c.$0,{type:o,value:r})]}),i&&i>0&&(0,n.jsxs)(t.x,{color:"blue.5",size:"sm",weight:"bold",children:["+ ",(0,n.jsx)(c.N6,{value:i})]})]})]},v)})})]})}},24982:function(l,i,e){"use strict";e.d(i,{Z:function(){return m}});var n=e(85893),o=e(64761),s=e(72445),t=e(11163),r=e(4298),d=e.n(r),a=e(67294),u=e(76055),c=e(26937),v=e(23950),h=e(81695),x=e(73098),p=e(31773);function m(l){var i,e,r,m,j;let{children:g}=l,b=(0,a.useRef)(null),f=(0,a.useRef)(null),{site:k}=(0,t.useRouter)().query||{},y="calc(100vh - ".concat((null==b?void 0:null===(i=b.current)||void 0===i?void 0:i.clientHeight)||0,"px - ").concat((null==f?void 0:null===(e=f.current)||void 0===e?void 0:e.clientHeight)||0,"px)"),{data:w,error:C}=(0,x.ib)([k?"/".concat(k,"/"):null]),Z=null==w?void 0:null===(m=w.theme)||void 0===m?void 0:null===(r=m.configuration)||void 0===r?void 0:r.customColor,N=Array.isArray(Z)&&10===Z.length?{colors:{custom:Z},primaryColor:"custom"}:void 0;return w||C?(null==C?void 0:null===(j=C.response)||void 0===j?void 0:j.status)===404?(0,n.jsx)(u.l_,{url:"/404"}):(0,n.jsxs)(p.Z,{children:[(0,n.jsx)(d(),{id:"pagseguro-sdk",src:"https://assets.pagseguro.com.br/checkout-sdk-js/rc/dist/browser/pagseguro.min.js"}),(0,n.jsx)(d(),{id:"iugu-sdk",src:"https://js.iugu.com/v2"}),(0,n.jsx)(d(),{id:"cielo-sdk",src:"/lib/js/cielo.js"}),(0,n.jsxs)(o.Me,{theme:N,inherit:!0,children:[(0,n.jsx)(c.Z,{siteData:w}),(0,n.jsx)(s.W,{size:"xl",sx:{position:"relative",minHeight:y},children:g}),(0,n.jsx)(v.Z,{siteData:w,footerRef:f})]}),(0,n.jsx)(h.Z,{})]}):null}},27791:function(l,i,e){"use strict";e.r(i),e.d(i,{default:function(){return H}});var n=e(85893),o=e(11163),s=e(2962),t=e(98700),r=e(24982),d=e(73098),a=e(94675),u=e(36484),c=e(64761),v=e(49737),h=e(20050),x=e(97564),p=e(19236),m=e(82623),j=e(5044),g=e(95117),b=e(38090),f=e(72445),k=e(34065),y=e(63991),w=e(25675),C=e.n(w),Z=e(67294),N=e(33023),_=e(4582),P=e(24118),z=e(60712),S=e(21017),D=e(69764),L=e(85765),E=e(56188),R=e(78792);function q(l){var i,e,o,s,t;let{data:r}=l;return(0,n.jsxs)(x.K,{spacing:"sm",p:"xl",children:[(0,n.jsx)(p.D,{order:2,children:null==r?void 0:null===(i=r.product)||void 0===i?void 0:i.title}),(0,n.jsx)(g.x,{children:null==r?void 0:null===(e=r.product)||void 0===e?void 0:e.subtitle}),(0,n.jsxs)(h.r,{children:[(0,n.jsx)(h.r.Col,{span:12,sm:5,children:(0,n.jsx)(D.j0,{slides:null==r?void 0:null===(o=r.product)||void 0===o?void 0:o.images})}),(0,n.jsx)(h.r.Col,{span:12,sm:7,children:(0,n.jsxs)(S.Z,{withBorder:!0,p:0,children:[(0,n.jsx)(E.Z,{...null==r?void 0:r.product}),!!(null==r?void 0:r.options)&&r.options.length>0&&(0,n.jsx)(L.Z,{options:r.options}),(0,n.jsx)(R.Z,{sellerSlug:null==r?void 0:null===(t=r.product)||void 0===t?void 0:null===(s=t.seller)||void 0===s?void 0:s.slug})]})})]})]})}var B=e(56817),K=e(71232),T=e(17789),F=e(18501);let I=(0,B.k)(l=>({line:{":hover":{backgroundColor:l.colors.gray[3]}}}));function O(l){let{data:i}=l,{classes:e}=I();return(0,n.jsx)(x.K,{spacing:"xs",children:null==i?void 0:i.map(l=>{var i;return(0,n.jsx)(S.Z,{withBorder:!0,p:"lg",className:e.line,children:(0,n.jsxs)(K.Z,{position:"apart",children:[(0,n.jsx)(D.DP,{title:l.product.title,picture:null===(i=l.product.primaryImage)||void 0===i?void 0:i.file}),(0,n.jsxs)(K.Z,{spacing:"sm",children:[(0,n.jsxs)(T.C,{children:[l.quantity,"x"]})," ",(0,n.jsx)(g.x,{fw:"bold",children:(0,n.jsx)(F.N6,{value:l.sellingPrice})})]})]})},l.uid)})})}function X(l){var i,e,s,t,r;let{initialData:u}=l,w=(0,o.useRouter)(),S=(0,c.rZ)(),{isAuthenticated:D}=(0,P.a)()||{},{studentModalOpen:L,setStudentModalOpen:E}=(0,z.Y)(),R=(0,k.a)("(max-width: ".concat(S.breakpoints.xs,"px)")),B=(0,k.a)("(max-width: ".concat(S.breakpoints.sm,"px)")),K=(0,k.a)("(min-width: ".concat(S.breakpoints.md,"px)")),{basketUid:T,site:F}=w.query||{},[I,X]=(0,Z.useState)(!1),{data:H}=(0,d.ib)([F?"/".concat(F,"/"):null],{fallbackData:null==u?void 0:u.site}),{data:U,error:A,isValidating:V}=(0,d.ib)([F&&T?"/".concat(F,"/basket/pay-by-link/").concat(T,"/"):null],{retryCount:3}),W=!U&&!!A,{data:G}=(0,d.ib)([(null==H?void 0:H.beneficiary)==="shopper"&&F?"/".concat(F,"/students/"):null,{is_active:!0,is_responsible:!0}]),M={numItems:Number((null==U?void 0:U.quantityItemsLines)||0),discountTotal:Number((null==U?void 0:U.discountLines)||0),subTotal:Number((null==U?void 0:U.subtotalLines)||0),total:Number((null==U?void 0:U.totalLines)||0),canCheckout:!0},Y=l=>{var i,e,n;let{studentSiteProfile:o,studentChannelProfile:s}=l;return o?null==o?void 0:null===(e=o.studentChannelProfiles[0])||void 0===e?void 0:null===(i=e.showcase)||void 0===i?void 0:i.uid:s?null==s?void 0:null===(n=s.showcase)||void 0===n?void 0:n.uid:void 0},$=async l=>{let{studentSiteProfile:i=null,studentChannelProfile:e=null,studentSiteProfileUid:n=null}=l;X(!0);try{let l={studentSiteProfile:(null==i?void 0:i.uid)||n,...!(null==U?void 0:U.paymentLinkShowcase)&&(i||e)?{showcase:Y({studentSiteProfile:i,studentChannelProfile:e})}:{}}
1,o=await a.hi.post("/".concat(F,"/basket/pay-by-link/").concat(T,"/"),l);o.data&&w.push("/checkout/".concat(o.data.uid))}catch(l){var o,s;(0,a.ob)({variant:"error",message:(null===(o=(0,a.Po)(null==l?void 0:null===(s=l.response)||void 0===s?void 0:s.data))||void 0===o?void 0:o.messages)||"Ocorreu um erro ao criar pedido. Tente novamente mais tarde."})}X(!1)},J=async()=>{var l;let i=null==G?void 0:null===(l=G.results)||void 0===l?void 0:l[0];(null==i?void 0:i.uid)?$({studentSiteProfileUid:null==i?void 0:i.uid}):(0,a.ob)({variant:"error",message:(0,a.Po)(A).messages||"Ocorreu um erro ao criar pedido. Tente novamente mais tarde."})};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v.f,{visible:!U&&!A}),(0,n.jsxs)(h.r,{gutter:"xl",sx:{minHeight:"calc(100vh)",alignContent:K?"stretch":"space-between"},children:[(0,n.jsx)(h.r.Col,{xs:12,md:W?12:8,children:(0,n.jsxs)(x.K,{py:"sm",children:[(0,n.jsxs)(x.K,{align:"center",children:[(null==H?void 0:H.logo)&&(0,n.jsx)(C(),{alt:null==H?void 0:null===(i=H.seller)||void 0===i?void 0:i.displayName,src:null==H?void 0:H.logo,width:100,height:100}),(null==H?void 0:null===(e=H.seller)||void 0===e?void 0:e.displayName)&&(0,n.jsx)(p.D,{order:3,sx:{whiteSpace:"nowrap"},children:null==H?void 0:H.seller.displayName})]}),W&&(0,n.jsx)(m.X,{p:50,withBorder:!0,children:(0,n.jsxs)(x.K,{align:"center",children:[(0,n.jsx)(j.k,{color:"red",variant:"light",radius:100,size:100,mb:30,children:(0,n.jsx)(y.kLi,{size:80})}),(0,n.jsx)(p.D,{order:3,color:"red",align:"center",children:"Link de pagamento n\xe3o existe"}),(0,n.jsx)(g.x,{align:"center",children:"Este link de pagamento \xe9 inv\xe1lido"})]})}),(null==U?void 0:null===(s=U.lines)||void 0===s?void 0:s.length)>1&&(0,n.jsx)(O,{data:U.lines}),(null==U?void 0:null===(t=U.lines)||void 0===t?void 0:t.length)===1&&(0,n.jsx)(q,{data:null===(r=U.lines)||void 0===r?void 0:r[0]})]})}),(0,n.jsx)(h.r.Col,{xs:12,md:4,hidden:W,children:(0,n.jsx)(N.ER,{data:M,loading:V||I,showSubmitButton:!0,checkoutLabel:D?"Comprar":"Fazer login",onSubmit:()=>{if(D)(null==H?void 0:H.beneficiary)!=="shopper"?null==E||E(!0):J();else{var l;w.push("/accounts/login?callbackUrl=/pay-by-link/".concat(T,"&channel=").concat(null==U?void 0:null===(l=U.channel)||void 0===l?void 0:l.slug))}}})})]}),(0,n.jsx)(b.u,{overflow:"inside",opened:L||!1,onClose:()=>null==E?void 0:E(!1),closeButtonLabel:"Fechar",zIndex:201,size:"100%",styles:{modal:{height:"90vh"}},children:(0,n.jsxs)(f.W,{px:"lg",py:"lg",size:"xl",fluid:!0,children:[(0,n.jsx)(p.D,{order:R?4:B?3:2,children:"Para quem est\xe1 comprando?"}),(0,n.jsx)(g.x,{mb:"lg",size:"lg",color:"dimmed",children:"Selecione o perfil de compra que deseja utilizar:"}),(0,n.jsx)(_.Z,{initialData:{site:H},modalView:!0,canEditProfile:!0,isChannelProfileRequired:!(null==U?void 0:U.paymentLinkShowcase),onSelect:$})]})})]})}function H(){var l,i;let e=(0,o.useRouter)(),c=(null===(l=window.location)||void 0===l?void 0:l.host).replace(".".concat("eskolare.shop"),"").replace(".".concat("eskolare-shops-9bzmr0uy7-eskolare.vercel.app"),"").replace(":3000",""),{data:v}=(0,d.ib)([c?"/".concat(c,"/"):null]),h=(null==v?void 0:v.domain)||(0,a.Se)(c,null==e?void 0:e.asPath),x={title:(null==v?void 0:v.title)||(null==v?void 0:null===(i=v.seller)||void 0===i?void 0:i.displayName),description:null==v?void 0:v.description};return(0,n.jsx)(t.Z,{Layout:r.Z,View:X,initialData:{initialData:v},children:(0,n.jsx)(s.PB,{canonical:h,...x,openGraph:{...x,url:h,images:[{url:(null==v?void 0:v.cover)||(null==v?void 0:v.logo),alt:x.title}]},...u.i})})}},4298:function(l,i,e){l.exports=e(23381)}},function(l){l.O(0,[1664,8346,870,9550,795,7279,3608,5544,6055,1929,9594,3023,4582,8907,2888,9774,179],function(){return l(l.s=37944)}),_N_E=l.O()}]);
2//# sourceMappingURL=[basketUid]-2ce6f14af1a2d0fb.js.map

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.