PageSourceSearch

https://www.fazendinha.me/_next/static/chunks/3412-b93bb3a4519d4018baa8.js

js fazendinha.me collected 2026-10-05 03:39:07 UTC 129,662 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3412],{50408:function(e,t,r){"use strict";r.d(t,{tg:function(){return p},sY:function(){return s}});var n=r(85893),a=(r(66384),r(6497)),i=r(78847),o=r.n(i),s=function(e){var t=e.cards;return(0,n.jsx)("div",{className:o().root,children:(0,n.jsx)("div",{className:o().container,children:(0,n.jsx)("div",{className:o().cards,children:t.map((function(e){var t=e.icon,r=e.title,i=e.description;return(0,n.jsxs)("div",{className:o().card,children:[t&&(0,n.jsx)("div",{className:o().icon,children:t}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:o().title,children:r}),i&&(0,n.jsx)("div",{className:o().description,children:i})]})]},"four-inline-cards-".concat((0,a.l)(r)))}))})})})},c=r(81035),l=r(66801),u=r(63395),d=r.n(u),p=function(e){var t=e.title,r=e.value;return(0,n.jsxs)("div",{className:d().root,children:[(0,n.jsx)("div",{className:d().icon,children:(0,n.jsx)(c.B_,{})}),(0,n.jsxs)("div",{className:d().content,children:[(0,n.jsx)("div",{className:d().title,children:t}),(0,n.jsxs)("div",{className:d().value,children:["R$ ",(0,l.f)(r)]})]})]})}},46626:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return u}});var n=r(85893),a=r(32718),i=r(66384),o=r(94184),s=r.n(o),c=r(37235),l=r.n(c),u=function(){var e=(0,a.X)(),t=e.acceptedCookies,r=e.onAcceptCookies,o=t,c=s()(l().root,{transform:!0,"translate-y-0 opacity-100":!o,"translate-y-full opacity-0":o});return(0,n.jsxs)("div",{className:c,children:[(0,n.jsxs)("div",{className:l().content,children:["Esse site utiliza cookies para melhorar a sua experi\xeancia de navega\xe7\xe3o. Consulte nossa"," ",(0,n.jsx)(i.rU,{href:"/politica-de-privacidade",children:(0,n.jsx)("u",{children:"pol\xedtica de privacidade"})}),"."]}),(0,n.jsx)(i.zx,{onClick:r,children:"Aceitar"})]})}},59861:function(e,t,r){"use strict";r.d(t,{aG:function(){return _e},Cq:function(){return pe},$_:function(){return P},wp:function(){return fe},uW:function(){return je},ZP:function(){return be}});var n=r(85893),a=r(94184),i=r.n(a),o=r(5152),s=r(66384),c=r(36249),l=r(23994),u=r(56688),d=r.n(u),p={loading:function(){return(0,n.jsx)(s.gb,{})}},f=(0,o.default)((function(){return Promise.resolve().then(r.bind(r,46626))}),p),m=function(e){var t=e.children,r=e.header,a=void 0===r||r,o=e.footer,s=void 0===o||o,u=(0,l.ET)().isMercadinho;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.KB,{children:(0,n.jsx)(c.CC,{fromWidget:!0})}),(0,n.jsxs)("div",{className:i()(d().root),children:[a&&(0,n.jsx)(fe,{}),(0,n.jsx)("main",{className:d().root,children:t}),(0,n.jsx)(f,{}),s&&!u&&(0,n.jsx)(P,{})]})]})},h=(r(46626),r(67294));var v=r(26265);function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){(0,v.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var x=function(e){return(0,n.jsx)("svg",g(g({"aria-hidden":"true","data-prefix":"fab","data-icon":"facebook-square",className:"facebook-square_svg__svg-inline--fa facebook-square_svg__fa-facebook-square facebook-square_svg__fa-w-14",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em"},e),{},{children:(0,n.jsx)("path",{fill:"currentColor",d:"M400 32H48A48 48 0 000 80v352a48 48 0 0048 48h137.25V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.27c-30.81 0-40.42 19.12-40.42 38.73V256h68.78l-11 71.69h-57.78V480H400a48 48 0 0048-48V80a48 48 0 00-48-48z"})}))};function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?j(Object(r),!0).forEach((function(t){(0,v.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var y=function(e){return(0,n.jsx)("svg",b(b({"aria-hidden":"true","data-prefix":"fab","data-icon":"instagram",className:"instagram_svg__svg-inline--fa instagram_svg__fa-instagram instagram_svg__fa-w-14",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",width:"1em",height:"1em"},e),{},{children:(0,n.jsx)("path",{fill:"currentColor",d:"M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"})}))};function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w(Object(r),!0).forEach((function(t){(0,v.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var O=function(e){return(0,n.jsx)("svg",N(N({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em"},e),{},{children:(0,n.jsx)("path",{d:"M.057 24l1.687-6.163a11.867 11.867 0 01-1.587-5.946C.16 5.335 5.495 0 12.05 0a11.817 11.817 0 018.413 3.488 11.824 11.824 0 013.48 8.414c-.003 6.557-5.338 11.892-11.893 11.892a11.9 11.9 0 01-5.688-1.448L.057 24zm6.597-3.807c1.676.995 3.276 1.591 5.392 1.592 5.448 0 9.886-4.434 9.889-9.885.002-5.462-4.415-9.89-9.881-9.892-5.452 0-9.887 4.434-9.889 9.884-.001 2.225.651 3.891 1.746 5.634l-.999 3.648 3.742-.981zm11.387-5.464c-.074-.124-.272-.198-.57-.347-.297-.149-1.758-.868-2.031-.967-.272-.099-.47-.149-.669.149-.198.297-.768.967-.941 1.165-.173.198-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.521.151-.172.2-.296.3-.495.099-.198.05-.372-.025-.521-.075-.148-.669-1.611-.916-2.206-.242-.579-.487-.501-.669-.51l-.57-.01c-.198 0-.52.074-.792.372s-1.04 1.016-1.04 2.479 1.065 2.876 1.213 3.074c.149.198 2.095 3.2 5.076 4.487.709.306 1.263.489 1.694.626.712.226 1.36.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.695.248-1.29.173-1.414z"})}))},k=r(86179),C=r.n(k),P=function(){return(0,n.jsxs)("div",{className:C().root,children:[(0,n.jsxs)(s.W2,{className:C().container,children:[(0,n.jsx)("ul",{className:C().links,children:[{to:"/produtores",label:"Produtores"},{to:"/seja-um-vendedor",label:"Como vender na fazendinha"},{to:"/programa-afiliados",label:"Programa de afiliados"},{to:"/quem-somos",label:"Quem Somos"},{to:"/perguntas-frequentes",label:"Perguntas frequentes"},{to:"https://admin.fazendinha.me/",label:"Login como vendedor"},{to:"/blog",label:"Blog"},{to:"/contato",label:"Contato"}].map((function(e){var t=e.to,r=e.label;return(0,n.jsx)("li",{children:(0,n.jsx)(s.rU,{href:t,children:r})},"footer-".concat(t.replace("/","")))}))}),(0,n.jsx)("div",{className:C().socialLinks,children:(0,n.jsxs)("div",{children:[(0,n.jsx)(s.rU,{href:"https://api.whatsapp.com/se
1nd?1=pt_br&phone=".concat("5511994022799"),className:C().social,newTab:!0,children:(0,n.jsx)(O,{})}),(0,n.jsx)(s.rU,{href:"https://facebook.com/".concat("fazendinhaemcasa"),className:C().social,newTab:!0,children:(0,n.jsx)(x,{})}),(0,n.jsx)(s.rU,{href:"https://instagram.com/".concat("fazendinhaemcasa"),className:C().social,newTab:!0,children:(0,n.jsx)(y,{})})]})})]}),(0,n.jsx)(s.W2,{className:C().copyright,children:(0,n.jsxs)(s.rj.Row,{children:[(0,n.jsxs)(s.rj.Column,{children:["CNPJ: 22.816.619/0001-01",(0,n.jsx)("br",{}),(0,n.jsx)("address",{children:"Rua Antonio Sim\xe3o da Costa n\xba 219, Industrial 4 Se\xe7\xe3o, Ibirit\xe9 - Minas Gerais - Brasil."}),(0,n.jsx)("br",{}),"Conhe\xe7a nossa"," ",(0,n.jsx)(s.rU,{href:"/politica-de-privacidade",children:(0,n.jsx)("u",{children:"Pol\xedtica de Privacidade"})})," ","|"," ",(0,n.jsx)(s.rU,{href:"/termos-e-condicoes-para-vendedores",children:(0,n.jsx)("u",{children:"Termos e Condi\xe7\xf5es para Vendedores"})}),(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"\xa9 2021 ","Fazendinha em Casa",". Todos os direitos reservados."]}),(0,n.jsx)(s.rj.Column,{children:(0,n.jsxs)("div",{className:"flex flex-col md:flex-row gap-8 items-end md:items-center justify-end",children:[(0,n.jsx)("a",{rel:"noreferrer",target:"_blank",href:"https://fcjventurebuilder.com",children:(0,n.jsx)("img",{src:"/assets/logos/fcj.png",alt:"FCJ Venture Builder",width:"100px"})}),(0,n.jsx)("a",{rel:"noreferrer",target:"_blank",href:"https://aws.amazon.com/pt/",children:(0,n.jsx)("img",{src:"/assets/logos/aws.png",alt:"",width:"180px"})})]})})]})})]})}
1,S=r(809),q=r.n(S),E=r(92447),I=r(11163),D=r(15196),Z=r(81035),F=r(55687),z=r(3780),R=r(67442),A=r(52626),L=r(30792),U=r.n(L),M=function(e){var t=e.className,r=e.onSubmit,a=(0,A.l)().notify,o=(0,h.useState)(""),c=o[0],l=o[1];return(0,n.jsx)("form",{onSubmit:function(e){if(e.preventDefault(),0===c.length)l("");else if(c.length<3)return void a({title:"Seja mais espec\xedfico",type:"danger"});r(c)},className:i()(U().root,t),children:(0,n.jsxs)("div",{className:U().searchContainer,children:[(0,n.jsx)("span",{className:U().searchIcon,children:(0,n.jsx)(R.Z,{})}),(0,n.jsx)(s.II,{type:"search",name:"search",placeholder:"Pesquisar...",pure:!0,onChange:function(e){l(e.target.value)},inputClassName:U().searchInput})]})})},T=r(71924),B=r(62286),V=function(){var e=(0,I.useRouter)(),t=(0,B.parseCookies)().zipcode||"",r=(0,l.ET)(),a=r.isMercadinho,i=r.mercadinhoID;return(0,n.jsx)(M,{onSubmit:function(r){"/pedido-facil"!==e.pathname?a?e.push({pathname:"/mercadinho/".concat(i),query:{search:r}}):e.push({pathname:T.qu,query:{search:r,zipcode:t}}):e.push({pathname:"/pedido-facil",query:r?{search:r}:{}},void 0,{shallow:!0})}})},Q=r(25675),W=r(18359),K=r(50128),H=r(58509),G=r(59359),J=r(25116),X=(r(1682),r(11699)),Y=r(59999),$=r(97274),ee=r.n($),te=function(e){var t=e.baseUrl,r=e.preserveQuery,a=void 0===r||r,o=e.className,c=e.filters,l=e.vertical,u=void 0!==l&&l,d=e.callback,p=(0,I.useRouter)(),f=(0,h.useState)([]),m=f[0],v=f[1];if(!c)return(0,n.jsx)(n.Fragment,{});var _=a?p.query:{};return _.page="1",(0,n.jsx)("ul",{className:i()(ee().root,o),children:c.map((function(e){var r=e.id,a=e.slug,o=e.name,c=e.categories;return(0,n.jsxs)("li",{children:[c&&c.length>0?(0,n.jsxs)("button",{type:"button",className:ee().filterLink,children:[(0,n.jsx)(s.rU,{onClick:d,href:{pathname:"".concat(t).concat(a),query:_},children:o}),(0,n.jsx)("button",{onClick:function(){return function(e){if(m.includes(e)){var t=m.filter((function(t){return t!==e}));v((0,Y.Z)(t))}else{var r=m;r.push(e),v((0,Y.Z)(r))}}(a)},type:"button",children:m.includes(a)?(0,n.jsx)(Z.Kh,{}):(0,n.jsx)(Z._M,{})})]}):(0,n.jsx)(s.rU,{onClick:d,href:{pathname:"".concat(t).concat(a),query:_},className:ee().filterLink,children:o}),m.includes(a)&&(0,n.jsx)("ul",{className:i()(u&&ee().vertical,ee().subcategory),children:c&&c.length>0&&c.map((function(e){return(0,n.jsx)(s.rU,{onClick:d,href:{pathname:"".concat(t).concat(e.slug),query:_},className:ee().filterLink,children:e.name})}))})]},"filter-link-".concat(r))}))})},re=r(96107),ne=r.n(re),ae=r(38347),ie=r(49720),oe=r(48595),se=r(42283),ce=r(60055),le=r.n(ce);function ue(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function de(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(r),!0).forEach((function(t){(0,v.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ue(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var pe=function(e){var t,r=e.className,a=(0,ae.Z)(e,["className"]),o=(0,I.useRouter)(),c=new oe.D,l=(0,ie.jD)(),u=l.zipCode,d=l.setZipCode,p=l.setPopup,f=l.popup,m=(l.emptyCart,(0,h.useState)(!1)),v=m[0],_=m[1],g=(0,B.parseCookies)(),x=g.city||"",j=(0,h.useState)(!1),b=j[0],y=j[1],w=(0,se.cI)({mode:"onChange"}),N=w.register,O=w.handleSubmit,k=w.formState,C=k.errors,P=k.touched,S=k.isSubmitting,D=w.getValues,F=w.setError,z=function(e){p(e),_(e)};function R(e){return A.apply(this,arguments)}function A(){return(A=(0,E.Z)(q().mark((function e(t){return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:y(!0),d(t);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function L(){return(L=(0,E.Z)(q().mark((function e(){var t,r,n;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=D().zipCode.replace(/\D/g,""),e.prev=1,e.next=4,c.getAddressByZipcode(t);case 4:r=e.sent,n=r.data,(0,B.setCookie)(null,"city",n.city_name,{maxAge:2592e3,path:"/"}),(0,B.setCookie)(null,"zipcode",t,{maxAge:2592e3,path:"/"}),R(t),localStorage.removeItem("selectedAddress"),o.push((0,X.u)(o.pathname)?"/pedido-facil":"/"),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),F("zipCode",{message:"CEP n\xe3o encontrado"});case 16:case"end":return e.stop()}}),e,null,[[1,13]])})))).apply(this,arguments)}return(0,h.useEffect)((function(){function e(){return(e=(0,E.Z)(q().mark((function e(){var t,r;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u){e.next=5;break}(0,B.setCookie)(null,"city","",{maxAge:2592e3,path:"/"}),(0,B.setCookie)(null,"zipcode","",{maxAge:2592e3,path:"/"}),e.next=11;break;case 5:return e.next=7,c.getAddressByZipcode(u);case 7:t=e.sent,r=t.data,(0,B.setCookie)(null,"city",r.city_name,{maxAge:2592e3,path:"/"}),(0,B.setCookie)(null,"zipcode",u,{maxAge:2592e3,path:"/"});case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[u,g.city]),(0,h.useEffect)((function(){_(f)}),[f]),(0,h.useEffect)((function(){u&&_(!1)}),[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.zx,de(de({variant:"ghost",className:i()(le().root,r)},a),{},{onClick:function(){return z(!v)},children:[(0,n.jsx)(Z.O_,{})," ",(0,n.jsx)("span",{children:x||"Informe seu CEP"})]})),(0,n.jsx)(s.u_,{onClose:function(){return z(!v)},open:v,showCloseButton:!0,className:le().modal_delivery,children:(0,n.jsxs)("div",{className:le().delivery_area,children:[(0,n.jsxs)("header",{children:[(0,n.jsx)("div",{className:le().title,children:o.asPath.includes("/produto/")?(0,n.jsxs)(n.Fragment,{children:["Informe seu CEP para verificar ",(0,n.jsx)("br",{}),"se esse produto \xe9 entregue no seu endere\xe7o pelo produtor"]}):(0,n.jsxs)(n.Fragment,{children:["Informe seu CEP para facilitar ",(0,n.jsx)("br",{}),"sua busca de produtores que atendem seu endere\xe7o"]})}),(0,n.jsx)("div",{className:le().subTitle,children:"Informe o CEP abaixo"})]}),(0,n.jsxs)("form",{onSubmit:O((function(){return L.apply(this,arguments)})),className:le().form,children:[(0,n.jsx)("div",{className:le().input,children:(0,n.jsx)(s.II,{type:"phone",name:"zipCode",placeholder:"CEP",error:null===C||void 0===C||null===(t=C.zipCode)||void 0===t?void 0:t.message,touched:null===P||void 0===P?void 0:P.zipCode,disabled:S,defaultValue:u,maxLength:8,ref:N({required:{value:!0,message:"Informe o CEP"},minLength:{value:8,message:"CEP inv\xe1lido"}})})}),(0,n.jsx)(s.zx,{type:"submit",disabled:S,variant:"primary",loading:S,className:le().button,children:"Verificar"})]}),b&&!o.asPath.includes("/produto/")&&"/"!==o.asPath?(0,n.jsxs)("p",{className:le().refresh,children:["Clique"," ",(0,n.jsx)(s.zx,{type:"button",variant:"text",onClick:function(){o.reload()},children:"aqui"})," ","para atualizar a p\xe1gina."]}):(0,n.jsx)(n.Fragment,{}),b&&"/"===o.asPath?(0,n.jsxs)("p",{className:le().refresh,children:["Clique"," ",(0,n.jsx)(s.zx,{href:"".concat(T.qu,"?zipcode=").concat(u),type:"button",variant:"text",onClick:function(){return z(!1)},children:"aqui"})," ","para ver os produtos que atendem sua regi\xe3o."]}):(0,n.jsx)(n.Fragment,{})]})})]})},fe=function(){var e=(0,z.EN)().toggleCartModal,t=(0,B.parseCookies)().zipcode||"",r=(0,z.ET)().isMercadinho,a=(0,I.useRouter)(),i="/pedido-facil"===a.pathname,o=(0,X.u)(a.pathname),c=(0,z.jD
1)().items,l=(0,h.useState)(null),u=l[0],d=l[1];(0,h.useEffect)((function(){function e(){return(e=(0,E.Z)(q().mark((function e(){var t,r;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new W.H,e.next=3,t.getCategories();case 3:r=e.sent,d(t.parser(r.data.data));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(function(){return e.apply(this,arguments)})().catch((function(){}))}),[]);var p=(0,h.useState)(!1),f=p[0],m=p[1];return(0,h.useEffect)((function(){return f&&(0,H.Qp)(document.body),function(){return(0,H.tP)()}}),[f]),(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:ne().root,children:[(0,n.jsxs)("header",{className:ne().header,children:[(0,n.jsx)("div",{className:ne().logo,children:r?(0,n.jsx)(Q.default,{src:"/assets/images/logo_facil.png",alt:"Fazendinha em Casa",width:"100px",height:"55px"}):(0,n.jsx)(s.rU,{href:o?"/pedido-facil":"/",children:(0,n.jsx)(Q.default,{src:"/assets/images/logo.png",alt:"Fazendinha em Casa",width:"44px",height:"44px"})})}),!r&&(0,n.jsx)(G.I3,{children:(0,n.jsx)(pe,{})}),(0,n.jsx)(G.I3,{viewClassName:ne().desktop,children:u&&!r&&!i&&(0,n.jsx)(J.v2,{menuButton:(0,n.jsxs)(J.j2,{className:ne().menuCategories,children:[(0,n.jsx)(Z.Ll,{}),(0,n.jsx)("span",{children:"Categorias"})]}),children:u.map((function(e){var t;return null!==e&&void 0!==e&&e.categories&&(null===e||void 0===e||null===(t=e.categories)||void 0===t?void 0:t.length)>0?(0,n.jsx)(J.Wd,{label:(0,n.jsx)("span",{onClick:function(){return a.push(T.qu+e.slug)},children:e.name}),children:((null===e||void 0===e?void 0:e.categories)||[]).map((function(e){return(0,n.jsx)(J.sN,{href:T.qu+e.slug,children:e.name})}))}):(0,n.jsx)(J.sN,{href:T.qu+e.slug,children:e.name})}))})}),(0,n.jsx)("div",{className:ne().search,children:(0,n.jsx)(V,{})}),!r&&!i&&(0,n.jsxs)(G.I3,{viewClassName:ne().desktop,children:[(0,n.jsx)(s.v2,{label:"Entregas",items:[{href:"".concat(T.qu,"?days=Segunda-Feira&zipcode=").concat(t),label:"Segunda-feira"},{href:"".concat(T.qu,"?days=Terca-Feira&zipcode=").concat(t),label:"Ter\xe7a-feira"},{href:"".concat(T.qu,"?days=Quarta-Feira&zipcode=").concat(t),label:"Quarta-feira"},{href:"".concat(T.qu,"?days=Quinta-Feira&zipcode=").concat(t),label:"Quinta-feira"},{href:"".concat(T.qu,"?days=Sexta-Feira&zipcode=").concat(t),label:"Sexta-feira"},{href:"".concat(T.qu,"?days=Sabado&zipcode=").concat(t),label:"S\xe1bado"}]}),(0,n.jsx)(s.rU,{className:ne().link,href:"/produtos/experiencias?zipcode=".concat(t),children:"Experi\xeancias"}),(0,n.jsx)(s.rU,{className:ne().link,href:"/produtos?zipcode=".concat(t),children:"Produtos"}),(0,n.jsx)(s.rU,{className:ne().link,href:"/seja-um-vendedor",children:"Quero vender"})]}),(0,n.jsx)(D.WE,{total:c.length||0,onClick:function(){if(a.asPath.includes("checkout")){var t=new URLSearchParams(window.location.search);r&&t.append("ismercadinho","true");var n="".concat("/carrinho","?").concat(t.toString());a.push(n)}else e()}}),!r&&!i&&(0,n.jsx)("button",{type:"button",className:ne().menu,"aria-label":"toggle menu",onClick:function(){return m(!f)},children:(0,n.jsx)(Z.Ll,{})}),(0,n.jsx)(G.I3,{viewClassName:ne().session,children:(0,n.jsx)(F.ig,{})})]}),(0,n.jsx)(G.$,{children:(0,n.jsx)(K.Z,{children:f&&!i?(0,n.jsxs)("div",{className:ne().panel,children:[(0,n.jsxs)("div",{className:ne().columns,children:[(0,n.jsx)(s.rU,{className:ne().link,href:"/produtos?zipcode=".concat(t),children:"Produtos"}),(0,n.jsx)(s.rU,{className:ne().link,href:"/produtos/experiencias",children:"Experi\xeancias"}),(0,n.jsx)(s.v2,{label:"Entregas",onClickCallback:function(){return m(!f)},items:[{href:"".concat(T.qu,"?days=Segunda-Feira&zipcode=").concat(t),label:"Segunda-feira"},{href:"".concat(T.qu,"?days=Terca-Feira&zipcode=").concat(t),label:"Ter\xe7a-feira"},{href:"".concat(T.qu,"?days=Quarta-Feira&zipcode=").concat(t),label:"Quarta-feira"},{href:"".concat(T.qu,"?days=Quinta-Feira&zipcode=").concat(t),label:"Quinta-feira"},{href:"".concat(T.qu,"?days=Sexta-Feira&zipcode=").concat(t),label:"Sexta-feira"},{href:"".concat(T.qu,"?days=Sabado&zipcode=").concat(t),label:"S\xe1bado"}]}),(0,n.jsx)(F.ig,{})]}),(0,n.jsx)("div",{className:ne().categories,children:u&&(0,n.jsx)(te,{callback:function(){return m(!f)},filters:u,preserveQuery:!1,baseUrl:T.qu})}),(0,n.jsx)(s.rU,{className:ne().link,href:"/seja-um-vendedor",children:"Quero vender"})]}):null})})]})})}
1,me=r(6497),he=r(46091),ve=r.n(he),_e=function(e){var t=e.crumbs,r=e.separator,a=e.isHome;if(t&&t.length<1||!t)return null;t.unshift({url:"/",label:"Home"});var o=t.length-1,c=t.map((function(e,t){var a=e.url,c=e.label;return(0,n.jsxs)(h.Fragment,{children:[t<o&&a?(0,n.jsx)(s.rU,{href:a,className:i()(ve().link,t===o&&ve().last),children:c}):(0,n.jsx)("span",{className:i()(t===o&&ve().last),children:c}),t<o&&(0,n.jsx)("span",{className:ve().separator,children:r||(0,n.jsx)(Z.bg,{})})]},"breadcrumb-".concat((0,me.l)(c)))}));return a?(0,n.jsx)(G.$,{children:(0,n.jsx)("div",{className:ve().root,children:(0,n.jsx)(s.W2,{children:(0,n.jsx)(pe,{})})})}):(0,n.jsx)("div",{className:ve().root,children:(0,n.jsxs)(s.W2,{children:[(0,n.jsx)(G.$,{children:(0,n.jsx)(pe,{})}),(0,n.jsx)("div",{className:ve().list,children:c})]})})},ge=r(86865),xe=r.n(ge),je=function(){return(0,n.jsxs)("div",{className:xe().root,children:[(0,n.jsx)("h1",{className:xe().title,children:"404"}),(0,n.jsx)("p",{children:"Essa p\xe1gina n\xe3o existe."})]})},be=m},44611:function(e,t,r){"use strict";function n(e){var t;return{id:e.id.toString(),assinatura:e.assinatura,assinatura_desconto_produtor:e.assinatura_desconto_produtor,assinatura_frete_gratis:e.assinatura_frete_gratis,assinatura_desconto_frete:e.assinatura_desconto_frete,slug:e.slug||"erro",name:e.nome,description:e.descricao,status:e.status,image:e.imagem_principal,images:(null===(t=e.imagens)||void 0===t?void 0:t.length)>0?e.imagens.map((function(e){return{url:void 0!==e&&null!==e?e:""}})):[],seller:{id:e.produtor_id.toString(),slug:e.produtor_slug,name:e.produtor},price:{product:parseFloat(e.preco),sell:parseFloat(e.preco),discount:0},preco_promocional:e.preco_promocional?parseFloat(e.preco_promocional):0,preco_promocional_ativo:e.preco_promocional_ativo,days:e.produtor_dias_entrega,stock:e.quantidade_estoque,national:!("jadlog"!==e.forma_entrega_slug&&"retirada-local"!==e.forma_entrega_slug),tipo_produto:e.tipo_produto,categories:e.categorias?JSON.parse(e.categorias):[],categorias_slug:e.categorias_slug?e.tags_descricao:[],isAfiliadoFavorite:e.isAfiliadoFavorite}}r.d(t,{Z:function(){return n}})},22093:function(e,t){"use strict";t.Z=/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i},83685:function(e,t,r){"use strict";var n=r(74047),a=r(52700),i=r(4706),o=r(8127),s=r(44102),c=r(20775),l=r(26265);function u(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,c.Z)(e);if(t){var a=(0,c.Z)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,s.Z)(this,r)}}var d=function(e){(0,o.Z)(r,e);var t=u(r);function r(){var e;(0,n.Z)(this,r);for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return e=t.call.apply(t,[this].concat(o)),(0,l.Z)((0,i.Z)(e),"id",""),(0,l.Z)((0,i.Z)(e),"customerId",""),e}return(0,a.Z)(r,[{key:"setId",value:function(e){return this.id=e,this}},{key:"getId",value:function(){return this.id}},{key:"setCustomerId",value:function(e){this.customerId=e}},{key:"getCustomer",value:function(){return this.customerId}},{key:"list",value:function(){console.log(this.getCustomer());var e="/customers/".concat(this.getCustomer().toString(),"/address");return this.setUrl(e).get()}},{key:"getAddressById",value:function(){var e="/customers/".concat(this.getCustomer(),"/address");return this.setUrl(e).get()}},{key:"updateAddressById",value:function(e,t){var r="/customers/".concat(this.getCustomer(),"/address/").concat(e);return this.setUrl(r).post(t)}},{key:"createAddress",value:function(e){var t="COBRANCA"===e.type?"/customers/".concat(this.getCustomer(),"/billing-address"):"/customers/".concat(this.getCustomer(),"/address");return this.setUrl(t).post(e)}},{key:"getAddressByZipcode",value:function(e){var t="/viacep/zipcode/".concat(e);return this.setUrl(t).get()}},{key:"validateDeliveryArea",value:function(e){var t="/shipping/validate-delivery-area/".concat(e);return this.setUrl(t).get()}}]),r}(r(97756).Z);t.Z=d},48595:function(e,t,r){"use strict";r.d(t,{D:function(){return n.Z}});var n=r(83685)},14238:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(74047),a=r(52700),i=r(8127),o=r(44102),s=r(20775);function c(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,s.Z)(e);if(t){var a=(0,s.Z)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,o.Z)(this,r)}}var l=function(e){(0,i.Z)(r,e);var t=c(r);function r(){return(0,n.Z)(this,r),t.apply(this,arguments)}return(0,a.Z)(r,[{key:"register",value:function(e){return this.setUrl("/afiliados").post(e)}}]),r}(r(43507).B)},20304:function(e,t,r){"use strict";r.d(t,{Z:function(){return h}});var n=r(85893),a=r(81035),i=r(49053),o=r(66384),s=r(94184),c=r.n(s),l=r(71924),u=r(59359),d=r
1(54526),p=r.n(d),f=r(67294),m=r(11163),h=function(e){var t=e.item,r=e.className,s=void 0===r?"":r,d=e.clean,h=void 0!==d&&d,v=e.canEdit,_=void 0===v||v,g=e.onlyView,x=void 0!==g&&g,j=e.onChangeItemQuantity,b=e.onChangePeriod,y=e.onDeleteItem,w=t.id,N=t.experiencia_id,O=t.name,k=t.price,C=t.imageUrl,P=t.assinatura,S=t.period,q=t.assinatura_desconto_produtor,E=(0,m.useRouter)(),I=[{value:"semanal",label:"Semanal"},{value:"quinzenal",label:"Quinzenal"},{value:"mensal",label:"Mensal"}],D=(0,f.useState)(0),Z=D[0],F=D[1],z=function(e){b&&b(w,e)};return(0,f.useEffect)((function(){var e=E.query,t=e.slug,r=e.subscription;"assinaturas"!=t&&"true"!=r||void 0!==q&&q>0&&F(k-k*q/100)}),[E.query]),(0,n.jsxs)("div",{className:c()(p().root,h?p().clean:p().common,s),children:[(0,n.jsx)("div",{className:p().productImage,children:(0,n.jsx)(i.qN,{imageUrl:C,alt:O,width:80,height:80},"product-image-".concat(t.id))}),(0,n.jsxs)("div",{className:p().rightContent,children:[(0,n.jsxs)("div",{className:p().productName,children:[x?(0,n.jsx)(n.Fragment,{children:O}):(0,n.jsx)(o.rU,{href:"".concat(l.e_).concat(t.slug),children:O}),(0,n.jsx)(u.A_,{children:_&&(0,n.jsx)("button",{className:p().removeItemFromCart,type:"button",onClick:function(){return y(N||w)},children:(0,n.jsx)(a.QW,{})})})]}),(0,n.jsxs)(u.I3,{viewClassName:p().actions,children:[(0,n.jsx)(i.jF,{price:{sell:k},preco_promocional:Z,preco_promocional_ativo:Z>0}),_?(0,n.jsx)(i.K5,{canChange:!0,onChange:function(e){var t=e.next;return j(N||w,t)},quantity:t.quantity,dropdown:!1}):"".concat(t.quantity," ").concat(t.quantity>1?"unidades":"unidade"),_&&(0,n.jsx)("button",{className:p().removeItemFromCart,type:"button",onClick:function(){return y(N||w)},children:(0,n.jsx)(a.QW,{})}),!0===P&&(0,n.jsxs)("div",{className:p().periodity,children:["Escolha a periodicidade de entrega:",_&&(0,n.jsx)(o.Lt,{dropdownClassName:p().dropdown,selected:S,items:I,onSelect:z,placeholder:"-"}),!_&&(0,n.jsx)("p",{children:S})]})]}),(0,n.jsx)("div",{className:p().price,children:(0,n.jsxs)(u.A_,{viewClassName:p().quantity,children:[(0,n.jsx)(i.jF,{price:{sell:k},preco_promocional:Z,preco_promocional_ativo:Z>0}),_?(0,n.jsx)(i.K5,{canChange:!0,onChange:function(e){var t=e.next;return j(N||w,t)},quantity:t.quantity,dropdown:!1}):"".concat(t.quantity," ").concat(t.quantity>1?"unidades":"unidade"),!0===P&&(0,n.jsxs)("div",{className:p().periodityM,children:["Escolha a periodicidade de entrega:",_&&(0,n.jsx)(o.Lt,{dropdownClassName:p().dropdown,selected:S,items:I,onSelect:z,placeholder:"-"}),!_&&(0,n.jsx)("p",{children:S})]})]})})]})]})}},15196:function(e,t,r){"use strict";r.d(t,{WE:function(){return z},uZ:function(){return c},AQ:function(){return S},kK:function(){return l.Z},KA:function(){return j}});var n=r(85893),a=r(66384),i=r(3780),o=r(8571),s=r.n(o),c=function(e){var t=e.fromWidget,r=void 0===t||t,o=e.label,c=void 0===o?"Volte as compras":o,l=e.isSubscriptionCart,u=void 0!==l&&l,d=e.isExpCart,p=void 0!==d&&d,f=(0,i.EN)().toggleCartModal;return(0,n.jsxs)("div",{className:s().root,children:[u&&(0,n.jsx)("div",{className:s().title,children:"Seu carrinho de assinaturas est\xe1 vazio"}),p&&(0,n.jsx)("div",{className:s().title,children:"Seu carrinho de assinaturas est\xe1 vazio"}),!u&&(0,n.jsx)("div",{className:s().title,children:"Seu carrinho de compras est\xe1 vazio"}),(0,n.jsx)("div",{className:s().content,children:r?(0,n.jsx)(a.zx,{onClick:f,children:c}):(0,n.jsx)(a.zx,{href:"/",children:c})})]})},l=r(20304),u=r(26265),d=r(64121),p=r(67294),f=r(66801),m=r(94184),h=r.n(m),v=r(50408),_=r(8091),g=r.n(_);function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var j=function(e){var t,r,a=e.coupon,i=e.shipping,o=void 0===i?[]:i,s=e.cartTotal,c=(e.total,e.className),l=e.row,m=void 0!==l&&l,_=e.totalItems,j=e.onPage,b=e.selectedDeliveryKeys,y=e.hasOnlyExpItems,w=void 0!==y&&y;function N(e,t){var r={};t.forEach((function(e){var t=e.split("/"),n=(0,d.Z)(t,2),a=n[0],i=n[1];r[a]=i}));var n=[],a=new Set;return e.forEach((function(e){var t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?x(Object(r),!0).forEach((function(t){(0,u.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e);if(Array.isArray(e.deliveryKey)){t.sellers=[],t.deliveryKey=[],e.deliveryKey.forEach((function(n,i){var o=e.sellers[i];"fazendinhalog"!==r[n]||a.has(n)||(t.sellers.push(o),t.deliveryKey.push(n),a.add(n))})),t.sellers.length>0&&n.push(t)}else{var i=e.deliveryKey,o=i.lastIndexOf("/"),s=i.substring(0,o),c=i.substring(o+1),l=s.split(","),d=l[0];r[d]!==c||a.has(d)||(n.push(t),l.forEach((function(e){return a.add(e)})))}})),n}var O,k=(0,p.useMemo)((function(){return N(o,b)}),[o,b]),C=(0,p.useMemo)((function(){var e=0;return k&&k.length>0&&k.forEach((function(t){void 0!==t&&(e+=t.value)})),e}),[k]);O=localStorage.getItem("cart");var P=JSON.parse(O),S=s+C;return((null===P||void 0===P||null===(t=P.items)||void 0===t?void 0:t.filter((function(e){return!0===e.assinatura})))||[]).length===(null===P||void 0===P||null===(r=P.items)||void 0===r?void 0:r.length)&&(S=s),m?(0,n.jsxs)("div",{className:h()(g().root,c),children:[(0,n.jsxs)("div",{className:g().row,children:[(0,n.jsxs)("div",{className:g().label,children:["Produtos (",_,")"]}),(0,n.jsxs)("div",{className:g().value,children:[(0,n.jsx)("span",{children:"R$"})," ",(0,f.f)(s)]})]}),a&&(0,n.jsxs)("div",{className:g().row,children:[(0,n.jsx)("div",{className:g().label,children:a.description}),(0,n.jsxs)("div",{className:g().value,children:[(0,n.jsx)("span",{children:"R$"})," ",(0,f.f)(a.value)]})]}),!w&&"cart"!==j&&k&&k.length>0&&k.map((function(e){return void 0!==e&&(0,n.jsxs)("div",{className:g().row,children:[(0,n.jsxs)("div",{className:g().label,children:[(0,n.jsx)("small",{children:e.sellers&&e.sellers.join(", ")}),(0,n.jsx)("br",{}),(0,n.jsx)("strong",{children:e.description}),e.frequency&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("br",{}),"Entrega ",e.frequency]})]}),(0,n.jsx)("div",{className:g().value,children:e.freeShipping?(0,n.jsx)("div",{className:g().free,children:"Frete Gr\xe1tis"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{children:"R$"})," ",(0,f.f)(e.value)]})})]},Array.isArray(e.deliveryKey)?e.deliveryKey.join(","):e.deliveryKey)})),(0,n.jsxs)("div",{className:g().row,children:[(0,n.jsx)("div",{className:h()(g().label,g().total),children:"Total"}),(0,n.jsxs)("div",{className:h()(g().value,g().total),children:[(0,n.jsx)("span",{children:"R$"})," ","checkout"===j?(0,f.f)(S):(0,f.f)(s)]})]})]}):(0,n.jsxs)("div",{className:h()(g().cards,c),children:[(0,n.jsx)(v.tg,{title:"Subtotal",value:(0,f.f)(s)}),k&&(0,n.jsx)(v.tg,{title:"Frete",value:(0,f.f)(C)}),a&&(0,n.jsx)(v.tg,{title:a.description,value:(0,f.f)(a.value)}),(0,n.jsx)(v.tg,{title:"Total",value:(0,f.f)(S)})]})},b=r(11699),y=r(36249),w=r(11163),N="/carrinho",O=r(42455),k=r.n(O);function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){(0,u.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var S=function(e){var t=e.className,r=void 0===t?"":t,o=e.fromWidget,s=void 0!==o&&o,u=e.itemProps,d=void 0===u?{}:u,f=e.items,m=void 0===f?[]:f,v=e.isSubscriptionCart,_=void 0!==v&&v,g=e.isExpCart,x=void 0!==g&&g,j=e.jadlogTrackingData,O=e.showTracking,C=e.fullHeight,S=void 0!==C&&C,q=(0,w.useRouter)(),E=(0,p.useState)(!1),I=E[0],D=E[1],Z=(0,i.EN)().toggleCartModal,F=(0,i.jD)().emptyCart,z=(0,i.ET)().isMercadinho;if((0,p.useEffect)((function(){D((0,b.u)(q.pathname))}),[]),m.length<=0)return(0,n.jsx)(c,{isSubscriptionCart:_,isExpCart:x,fromWidget:s});var R=j?j.map((function(e){return null===e||void 0===e?void 0:e.sellerId})):[],A=m.map((function(e){return null===e||void 0===e?void 0:e.seller}
1)).filter(Boolean).filter((function(e,t,r){return r.findIndex((function(t){return(null===t||void 0===t?void 0:t.id)===(null===e||void 0===e?void 0:e.id)}))===t}));function L(e){if(j&&Array.isArray(j)){var t=j.find((function(t){return t&&t.sellerId===e}));return t?t.url:""}return""}return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:h()(k().root,S&&k().fullHeight,r),children:[s&&m.length>0&&(0,n.jsxs)("div",{className:k().title,children:["Meu carrinho de compras ",_&&" - Assinaturas"," ",x&&" - Experi\xeancias"]}),A&&A.length>0&&A.map((function(e){return parseInt(null===e||void 0===e?void 0:e.id,10)>0&&m.length?(0,n.jsxs)("section",{className:k().section,children:[(0,n.jsxs)("div",{className:k().header,children:[null===e||void 0===e?void 0:e.name,O&&R.includes(parseInt(null===e||void 0===e?void 0:e.id,10))&&(0,n.jsx)("a",{target:"_blank",href:L(parseInt(null===e||void 0===e?void 0:e.id,10)),children:(0,n.jsx)(a.zx,{className:k().tracking_button,children:"Acompanhe seu pedido"})})]}),m.map((function(t){var r;return(null===t||void 0===t||null===(r=t.seller)||void 0===r?void 0:r.id)===(null===e||void 0===e?void 0:e.id)&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(l.Z,P({onlyView:z},P(P({},d),{},{item:t})),"cart-items-item-".concat(t.id))})}))]}):(0,n.jsx)(n.Fragment,{})}))]}),!s&&(0,n.jsx)(a.zx,{onClick:function(){F(),q.reload()},variant:"ghost",children:"Limpar carrinho"}),s&&!I&&(0,n.jsx)(y.Jj,{fromWidget:s,onClick:function(){var e=_?"".concat(N,"/assinaturas"):x?"".concat(N,"/experiencias"):N,t=new URLSearchParams;z&&(t.append("ismercadinho","true"),t.append("subscription","false"),t.append("exp","false")),_&&t.append("subscription","true"),x&&t.append("exp","true"),_||x||(t.append("subscription","false"),t.append("exp","false"));var r="".concat(e,"?").concat(t.toString());q.push(r),s&&Z()},label:_?"Ir para o carrinho - assinaturas":x?"Ir para o carrinho - experi\xeancias":"Ir para o carrinho"})]})},q=r(38347),E=r(81035),I=r(20188),D=r.n(I);function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function F(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach((function(t){(0,u.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var z=function(e){var t=e.total,r=(0,q.Z)(e,["total"]);return(0,n.jsxs)(a.zx,F(F({className:D().root,variant:"ghost"},r),{},{children:[(0,n.jsx)(E.C3,{}),(0,n.jsx)("span",{className:D().quantity,children:t})]}))}},36249:function(e,t,r){"use strict";r.d(t,{Jj:function(){return q},CC:function(){return v},Pk:function(){return F},VD:function(){return _},KB:function(){return w}});var n=r(85893),a=r(66384),i=(r(42283),r(94184)),o=r.n(i),s=r(3780);r(809),r(10862);var c=r(67294),l=r(99870),u=(r(7758),r(62286),r(11163)),d=(r(48595),r(15196)),p=r(49720),f=r(5152),m=r(11699),h=(0,f.default)((function(){return r.e(1790).then(r.bind(r,61790))}),{ssr:!1,loadableGenerated:{webpack:function(){return[61790]},modules:["../modules/cart/containers/cart-list-items/cart-list-items.tsx -> modules/pedido-facil/containers/pedido-facil-checkout/pedido-facil-checkout"]}}),v=function(e){var t=e.canEdit,r=void 0===t||t,a=e.fromWidget,i=e.subscriptionOnly,o=void 0!==i&&i,s=e.expOnly,l=void 0!==s&&s,f=(0,p.jD)(),v=f.items,_=f.updateItemQuantity,g=f.removeItem,x=f.updatePeriod,j=(f.selectedSellersDeliveryMethod,(0,u.useRouter)()),b=(0,c.useState)([]),y=b[0],w=b[1],N=(0,c.useState)(!1),O=N[0],k=N[1],C=(0,c.useState)([]),P=C[0],S=C[1],q=(0,c.useState)([]),E=q[0],I=q[1],D=(0,c.useState)(!1),Z=D[0],F=D[1],z={canEdit:r,onChangeItemQuantity:function(e,t){return _(e.toString(),t)},onChangePeriod:function(e,t){return x(e.toString(),t)},onDeleteItem:function(e){g(e),Z||j.reload()}};return(0,c.useEffect)((function(){F((0,m.u)(j.pathname)),(j.asPath.includes("carrinho")||j.asPath.includes("checkout"))&&k(!0);var e=v.filter((function(e){return(void 0===e.assinatura||!1===e.assinatura)&&"convencional"===e.type})),t=v.filter((function(e){return!0===e.assinatura})),r=v.filter((function(e){return"experiencia"===e.type}));S(t),I(r),w(e)}),[v]),(0,n.jsxs)(n.Fragment,{children:[O&&o&&!a&&(0,n.jsx)(d.AQ,{fromWidget:a,items:P,itemProps:z,isSubscriptionCart:!0,fullHeight:!0}),O&&l&&!a&&(0,n.jsx)(d.AQ,{fromWidget:a,items:E,itemProps:z,className:"mt-3",isSubscriptionCart:!1,isExpCart:!0}),O&&!o&&!l&&!a&&(0,n.jsx)(d.AQ,{fromWidget:a,items:y,itemProps:z,className:"mt-3",isSubscriptionCart:!1}),a&&(0,n.jsxs)(n.Fragment,{children:[!Z&&P.length>0&&(0,n.jsx)(d.AQ,{fromWidget:a,items:P,itemProps:z,isExpCart:!1,isSubscriptionCart:!0}),E.length>0&&(0,n.jsx)(d.AQ,{fromWidget:a,items:E,itemProps:z,isExpCart:!0,isSubscriptionCart:!1}),y.length>0&&(0,n.jsx)(d.AQ,{fromWidget:a,items:y,itemProps:z,className:"mt-3",isSubscriptionCart:!1}),0==P.length&&0==y.length&&0==E.length&&!Z&&(0,n.jsx)(d.uZ,{isSubscriptionCart:!1,fromWidget:a}),Z&&(0,n.jsx)(h,{})]})]})},_=function(e){var t=e.row,r=void 0!==t&&t,a=e.onPage,i=void 0===a?"cart":a,o=e.hasOnlyExpItems,l=void 0!==o&&o,u=(0,s.jD)(),p=u.cartTotal,f=u.coupon,m=u.shipping,h=u.totalShipping,v=(u.totalItems,u.selectedSellersDeliveryMethod),_=u.itemsToOrder,g=u.autoUpdateCartContext,x=(0,c.useMemo)((function(){return p+(h||0)-((null===f||void 0===f?void 0:f.value)||0)}),[p,f,h]);return(0,c.useEffect)((function(){console.log("Atualizou o contexto"),g()}),[]),(0,n.jsx)(d.KA,{row:r,coupon:(null===f||void 0===f?void 0:f.value)||null,shipping:m,total:x,cartTotal:p,totalShipping:h,totalItems:_.length,onPage:i,selectedDeliveryKeys:v,hasOnlyExpItems:l})};function g(e,t){return t&&t.contains(e)&&Boolean(e.closest("body"))}var x=function(e){var t=e.active,r=void 0===t||t,n=e.onClick,a=e.children,i=(0,c.useRef)(),o=function(e){g(e.target,null===i||void 0===i?void 0:i.current)||"function"===typeof n&&n(e)};return(0,c.useEffect)((function(){return r&&(document.addEventListener("mousedown",o),document.addEventListener("touchstart",o)),function(){r&&(document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o))}})),c.cloneElement(a,{ref:i})},j=r(58509),b=r(20767),y=r.n(b),w=function(e){var t=e.children,r=(0,s.EN)(),i=r.cartModal,o=r.toggleCartModal,l=(0,c.useRef)(),u=(0,c.useCallback)((function(){return o()}),[o]),d=(0,c.useCallback)((function(e){"Escape"===e.key&&u()}),[u]);return(0,c.useEffect)((function(){return l.current&&(i?((0,j.Qp)(l.current),window.addEventListener("keydown",d)):(0,j.tG)(l.current)),function(){window.removeEventListener("keydown",d),(0,j.tP)()}}
1),[i,d]),i?(0,n.jsxs)("section",{className:y().root,ref:l,children:[(0,n.jsx)("aside",{className:y().backdrop}),(0,n.jsx)(x,{active:!0,onClick:u,children:(0,n.jsxs)("aside",{className:y().content,children:[t,(0,n.jsx)(a.zx,{variant:"ghost",onClick:u,className:y().buttonClose,children:"Voltar"})]})})]}):null},N=r(26265),O=r(38347),k=r(71464),C=r.n(k);function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function S(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){(0,N.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var q=function(e){var t=e.onClick,r=e.fromWidget,i=void 0!==r&&r,u=e.className,d=e.label,f=void 0===d?"Ir para o carrinho":d,m=(0,O.Z)(e,["onClick","fromWidget","className","label"]),h=(0,p.jD)().block,v=(0,s.EC)(),_=v.user,g=v.isLoggedIn,x=(0,s.ET)().isMercadinho,j=(0,c.useState)(!1),b=j[0],y=j[1],w=function(e){if(g&&!_.name.includes(" "))return void y(!0);t&&t(e)},N=function(){return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("p",{className:C().error,children:["O nome no seu cadastro est\xe1 incompleto,"," ",(0,n.jsx)("a",{href:l.in,children:(0,n.jsx)("strong",{children:"clique aqui"})})," ","e atualize seus dados para continuar com sua compra."]})})};return x||i?(0,n.jsxs)(n.Fragment,{children:[b&&(0,n.jsx)(N,{}),(0,n.jsx)(a.zx,S(S({onClick:w,className:o()(C().root,u)},m),{},{children:f}))]}):(0,n.jsxs)(n.Fragment,{children:[b&&(0,n.jsx)(N,{}),h?(0,n.jsxs)("div",{className:C().error,children:[h,(0,n.jsx)("br",{}),(0,n.jsx)("small",{children:"Remova do carrinho os produtos que n\xe3o podem ser entregues para continuar com a compra."})]}):(0,n.jsx)(a.zx,S(S({onClick:w,className:o()(C().root,u)},m),{},{children:h?"H\xe1 produtos que n\xe3o podem ser entregues no seu endere\xe7o. Retire-os do carrinho ou altere o CEP para continuar.":f}))]})},E=r(86346),I=r(3419),D=r(45193),Z=r.n(D),F=function(e){var t=e.className,r=e.orderId,i=(0,c.useState)(null),s=i[0],l=i[1],u=(0,p.jD)(),d=u.note,f=u.setNote;return(0,c.useEffect)((function(){l(d)}),[d]),(0,n.jsxs)("div",{className:o()(Z().root,t),children:[(0,n.jsx)("div",{className:Z().label,children:"Observa\xe7\xe3o do pedido"}),(0,n.jsx)(a.gx,{name:"note",value:s,onChange:function(e){l(e.target.value)},onBlur:function(){if(f(s),r){var e=new E.v;new I.p(e).updateComment(r,s.trim())}},placeholder:"Escreva aqui sua observa\xe7\xe3o sobre esse pedido"})]})}},50700:function(e,t,r){"use strict";r.d(t,{Z:function(){return v}});var n=r(809),a=r.n(n),i=r(92447),o=r(74047),s=r(52700),c=r(4706),l=r(8127),u=r(44102),d=r(20775),p=r(26265);function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){(0,p.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function h(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,d.Z)(e);if(t){var a=(0,d.Z)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,u.Z)(this,r)}}var v=function(e){(0,l.Z)(r,e);var t=h(r);function r(e){var n;return(0,o.Z)(this,r),n=t.call(this),(0,p.Z)((0,c.Z)(n),"order",{}),(0,p.Z)((0,c.Z)(n),"items",[]),(0,p.Z)((0,c.Z)(n),"shipping",0),(0,p.Z)((0,c.Z)(n),"customerService",void 0),n.customerService=e,n}return(0,s.Z)(r,[{key:"setOrderId",value:function(e){this.order=m(m({},this.order),{},{id:e})}},{key:"setOrder",value:function(e){return this.order=e,this}},{key:"getOrder",value:function(){return this.order}},{key:"setItems",value:function(e){return this.items=e,this}},{key:"getItems",value:function(){return this.items}},{key:"setShipping",value:function(e){return this.shipping=e,this}},{key:"getShipping",value:function(){return this.shipping}},{key:"create",value:function(){var e=(0,i.Z)(a().mark((function e(t,r){var n,i,o,s,c,l;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=this.customerService.getCustomer(),i=n.id,o={customer_id:i,items:this.getItems().map((function(e){return{product_id:e.id,quantity:e.quantity,discount:0}})),total_shipping:this.order.shippingTotal},e.next=5,this.setUrl("/orders").post(o);case 5:s=e.sent,c=s.data,l=c.order_id,this.setOrder({id:l}),t(l),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),r();case 15:case"end":return e.stop()}}),e,this,[[0,12]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"getOrderById",value:function(){var e=(0,i.Z)(a().mark((function e(t,r,n){var i,o,s,c,l,u;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i="/orders/".concat(t),e.next=4,this.setUrl(i).get();case 4:o=e.sent,s=o.data,c=s.order,l=s.items,u=m(m({},c),{},{id:c.id,items:l}),this.setOrder(u),r(u),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(0),n();case 16:case"end":return e.stop()}}),e,this,[[0,13]])})));return function(t,r,n){return e.apply(this,arguments)}}()}
1,{key:"getOrderItemsById",value:function(){var e=(0,i.Z)(a().mark((function e(t,r,n){var i,o,s,c,l;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i="/orders/".concat(t),e.next=4,this.setUrl(i).get();case 4:o=e.sent,s=o.data.order,c=s.sub_orders,l=[],c.map((function(e){e.order_items.map((function(t){var r=t.quantidade,n=t.product;r<=n.quantidade_estoque&&l.push({id:n.id,name:n.nome,slug:n.slug,price:n.preco,quantity:r,seller:e.farmer})}))})),r(l),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),n();case 15:case"end":return e.stop()}}),e,this,[[0,12]])})));return function(t,r,n){return e.apply(this,arguments)}}()}]),r}(r(43507).B)},10862:function(e,t,r){"use strict";r.d(t,{Nk:function(){return p}});r(50700);var n=r(74047),a=r(52700),i=r(8127),o=r(44102),s=r(20775);function c(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,s.Z)(e);if(t){var a=(0,s.Z)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,o.Z)(this,r)}}r(97756).Z;var l=r(4706),u=r(26265);function d(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,s.Z)(e);if(t){var a=(0,s.Z)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,o.Z)(this,r)}}var p=function(e){(0,i.Z)(r,e);var t=d(r);function r(){var e;(0,n.Z)(this,r);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),(0,u.Z)((0,l.Z)(e),"onlyUnique",(function(e,t,r){return r.indexOf(e)===t})),e}return(0,a.Z)(r,[{key:"calculate",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=0,a=0,i=[];e.map((function(e){i.push(e.seller.id),n+=e.itemTotal,"experiencia"===e.type&&(a+=1)}));var o={farmers:i.filter(this.onlyUnique),amount:n,zipcode:t,is_experience:a===e.length||r},s="/shipping/calculate",c=this.setUrl(s).post(o);return c}},{key:"calculateV2",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];console.log("items",e);var n=0,a=[];e.map((function(e){a.push(e.seller.id),e.itemTotal,"experiencia"===e.type&&(n+=1)}));var i=e.map((function(e){var t;return null===(t=e.seller)||void 0===t?void 0:t.id})),o=i.filter((function(e,t){return i.indexOf(e)===t})),s={};o.forEach((function(t){var r=e.filter((function(e){var r;return t===(null===(r=e.seller)||void 0===r?void 0:r.id)}));s[t]=r}));var c={};Object.keys(s).forEach((function(e){var t=s[e].map((function(e){return{id:null===e||void 0===e?void 0:e.id,qty:e.quantity}}));c[e]=t}));var l={data:c,zipcode:t,is_experience:n===e.length||r},u="/shipping/v2/calculate",d=this.setUrl(u).post(l);return d}},{key:"calculateProductFreight",value:function(e,t){var r={farmers:[e.seller.id],amount:e.price.sell,zipcode:t};return this.setUrl("/shipping/calculate").post(r)}},{key:"calculateProductFreightV2",value:function(e,t,r){var n={data:(0,u.Z)({},e.seller.id,[{id:e.id,qty:r}]),zipcode:t},a="/shipping/v2/calculate",i=this.setUrl(a).post(n);return i}}]),r}(r(43507).B)},18359:function(e,t,r){"use strict";r.d(t,{H:function(){return l}});var n=r(74047),a=r(52700),i=r(8127),o=r(44102),s=r(20775);function c(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,s.Z)(e);if(t){var a=(0,s.Z)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,o.Z)(this,r)}}var l=function(e){(0,i.Z)(r,e);var t=c(r);function r(){return(0,n.Z)(this,r),t.apply(this,arguments)}return(0,a.Z)(r,[{key:"getCategories",value:function(){return this.setUrl("/categories").get()}},{key:"getCategoryById",value:function(e){var t="/categories/".concat(e);return this.setUrl(t).get()}},{key:"parser",value:function(e){var t=this;return e.map((function(e){if(""!==e.slug){var r={id:e.id,slug:e.slug,name:e.descricao,header:{url:!1},description:""};return e.subcategorias.length>0&&(r.categories=t.parser(e.subcategorias)),r}return null}
1)).filter(Boolean)}}]),r}(r(43507).B)},11699:function(e,t,r){"use strict";function n(e){if("/pedido-facil"===e)return!0;try{return"1"===sessionStorage.getItem("pedidoFacilSession")}catch(t){return!1}}function a(){try{sessionStorage.setItem("pedidoFacilSession","1")}catch(e){}}r.d(t,{u:function(){return n},g:function(){return a}})},49053:function(e,t,r){"use strict";r.d(t,{ve:function(){return X},GM:function(){return y},vI:function(){return E},C3:function(){return R},Li:function(){return P},eQ:function(){return ue},qN:function(){return ne},jF:function(){return me},K5:function(){return Z}});var n=r(85893),a=r(26265),i=r(74047),o=r(52700),s=r(8127),c=r(44102),l=r(20775),u=r(67294),d=r(64487),p=r(94184),f=r.n(p),m=r(66384);var h=r(6378),v=r.n(h);function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){(0,a.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function x(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,l.Z)(e);if(t){var a=(0,l.Z)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,c.Z)(this,r)}}var j=function(e){(0,s.Z)(r,e);var t=x(r);function r(e){var n;return(0,i.Z)(this,r),(n=t.call(this,e)).state={hasError:!1},n}return(0,o.Z)(r,[{key:"componentDidCatch",value:function(e,t){d.Tb(e,{tags:{flow:"carousel",component:"ProductCarousel"},extra:{componentStack:t.componentStack}})}},{key:"render",value:function(){return this.state.hasError?null:this.props.children}}],[{key:"getDerivedStateFromError",value:function(){return{hasError:!0}}}]),r}(u.Component),b={wide:{items:6,partialVisibilityGutter:0},desktop:{items:4,partialVisibilityGutter:0},tablet:{items:3,partialVisibilityGutter:0},mobile:{items:2.2,partialVisibilityGutter:0}},y=function(e){var t=e.title,r=e.subtitle,a=e.className,i=e.rightContent,o=e.ssr,s=void 0!==o&&o,c=e.responsive,l=void 0===c?b:c,d=e.children,p=(0,u.useState)(l),h=p[0],_=p[1],x=function(){var e=(0,u.useState)({width:void 0,height:void 0}),t=e[0],r=e[1];return(0,u.useEffect)((function(){var e=function(){r({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",e),e(),function(){return window.removeEventListener("resize",e)}}),[]),t}().width;return(0,u.useEffect)((function(){_(g(g({},l),{},{mobile:g(g({},l.mobile),{},{items:x&&x<=320?1.8:l.mobile.items})}))}),[x]),(0,n.jsxs)("div",{className:f()(v().root,a),children:[t&&(0,n.jsxs)("div",{className:v().header,children:[(0,n.jsxs)("div",{className:v().left,children:[(0,n.jsx)("div",{className:v().title,children:t}),r&&(0,n.jsx)("p",{className:v().subtitle,children:r})]}),i&&(0,n.jsx)("div",{className:v().rightContent,children:(0,n.jsx)(m.rU,{href:i.href,children:i.title})})]}),(0,n.jsx)(j,{children:(0,n.jsx)(m.lr,{config:h,showArrows:!0,ssr:s,partialVisible:!0,className:v().carousel,children:d})})]})},w=r(4549),N=r(6497),O=r(86918),k=r.n(O),C={wide:{items:1},desktop:{items:1},tablet:{items:1},mobile:{items:1}},P=function(e){var t=e.className,r=e.ssr,a=void 0===r||r,i=e.images,o=i.map((function(e){return e.url}));return(0,n.jsx)("div",{className:f()(k().root,t),children:(0,n.jsx)(m.lr,{config:C,ssr:a,className:k().productGallery,thumbnails:o,showDots:o.length>0,children:i.map((function(e){return(0,n.jsx)("div",{className:k().image,children:(0,n.jsx)("img",{src:e.url||w.I,alt:""})},"product-gallery-".concat((0,N.l)(e.url)))}))},"product-gallery")})};var S=r(60487),q=r.n(S),E=function(e){var t=e.className,r=e.title,a=e.description;return(0,n.jsxs)("article",{className:f()(q().root,t),children:[r&&(0,n.jsx)("div",{className:q().title,children:r}),(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:a}})]})},I=r(13604),D=r.n(I),Z=function(e){var t=e.maximum,r=void 0===t?50:t,a=e.canChange,i=void 0===a||a,o=e.onChange,s=e.quantity,c=void 0===s?1:s,l=e.dropdown;function u(e,t){o&&o({prev:e,next:t})}if(void 0===l||l){for(var d=[],p=1;p<=5;p++)d.push({value:p,label:p.toString()});return(0,n.jsx)(m.Lt,{dropdownClassName:D().dropdown,placeholder:"1",selected:c,items:d,onSelect:function(e){u(c,e)}})}return(0,n.jsxs)("div",{className:D().root,children:[i&&(0,n.jsx)(m.zx,{variant:"ghost",onClick:function(){var e=c-1;e<=0||u(c,e)},disabled:1===c,className:D().button,children:"-"}),(0,n.jsx)("span",{className:D().text,children:c}),i&&(0,n.jsx)(m.zx,{variant:"ghost",onClick:function(){var e=c+1;e>r||u(c,e)},disabled:c===r,className:D().button,children:"+"})]})},F=r(72667),z=r.n(F),R=function(e){var t=e.maximum,r=void 0===t?10:t,a=e.canChange,i=void 0===a||a,o=e.onChange,s=e.quantity,c=void 0===s?1:s,l=e.dropdown;function u(e,t){o&&o({prev:e,next:t})}if(void 0===l||l){for(var d=[],p=1;p<=5;p++)d.push({value:p,label:p.toString()});return(0,n.jsx)(m.Lt,{dropdownClassName:z().dropdown,placeholder:"1",selected:c,items:d,onSelect:function(e){u(c,e)}})}return(0,n.jsxs)("div",{className:z().root,children:[i&&(0,n.jsx)(m.zx,{variant:"ghost",onClick:function(){var e=c-1;e<0||u(c,e)},disabled:c<=0,className:z().button,children:"-"}),(0,n.jsx)("span",{className:z().text,children:c}),i&&(0,n.jsx)(m.zx,{variant:"ghost",onClick:function(){var e=c+1;e>r||u(c,e)},disabled:c===r,className:z().button,children:"+"})]})},A=r(809),L=r.n(A),U=r(92447),M=r(81035);function T(e){return e.replace("just now","agora mesmo").replace("minute","minuto").replace("hour","hora").replace("day","dia").replace("ago","atras").replace("atrasra","agora").replace("second","segundo")}var B=r(49720),V=r(10862),Q=r(62286),W=r(23994),K=r(11163),H=r(11699),G=r(70152),J=r.n(G),X=function(e){var t=e.inCart,r=void 0===t?null:t,a=e.label,i=void 0===a?"Comprar":a,o=e.onClick,s=e.className,c=e.product,l=e.quantity,d=(0,B.jD)(),p=d.setPo
1pup,h=d.zipCode,v=(0,u.useState)(!1),_=v[0],g=v[1],x=(0,u.useState)(!1),j=x[0],b=x[1],y=(0,u.useState)(null),w=y[0],N=y[1],O=(0,u.useState)(!1),k=O[0],C=O[1],P=(0,u.useState)(!1),S=P[0],q=P[1],E=(0,u.useState)(!1),I=E[0],D=E[1],Z=(0,Q.parseCookies)().zipcode||"",F=(0,W.ET)().isMercadinho,z=(0,K.useRouter)(),R=(0,H.u)(z.pathname),A=(0,u.useCallback)((0,U.Z)(L().mark((function e(){var t,r,n,a,i,s,u,d,f,m,v,_,x,y=arguments;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(y.length>0&&void 0!==y[0]&&y[0],!j||!F){e.next=7;break}return o(I),p(!1),b(!1),g(!1),e.abrupt("return");case 7:if(!j){e.next=35;break}return t=new V.Nk,e.prev=9,e.next=12,t.calculateProductFreightV2(c,h,l);case 12:r=e.sent,n=r.data,a=[],i=Object.keys(n[Object.keys(n)[0]].products)[0],s=n[Object.keys(n)[0]],u=null===s||void 0===s?void 0:s.products[i],(d=Object.keys(u.delivery_ways)).includes("fazendinhalog")&&("string"!=typeof u.delivery_ways.fazendinhalog?a.push({success:null===u||void 0===u||null===(f=u.delivery_ways)||void 0===f||null===(m=f.fazendinhalog)||void 0===m?void 0:m.success}):a.push({success:!1})),d.includes("fazendinha-tech-log")&&("string"!=typeof u.delivery_ways["fazendinha-tech-log"]?a.push({success:null===u||void 0===u||null===(v=u.delivery_ways["fazendinha-tech-log"])||void 0===v?void 0:v.success}):a.push({success:!1})),d.includes("fazendinha-tech")&&("string"!=typeof u.delivery_ways["fazendinha-tech"]?a.push({success:null===u||void 0===u||null===(_=u.delivery_ways["fazendinha-tech"])||void 0===_?void 0:_.success}):a.push({success:!1})),d.includes("retirada-local")&&("string"!=typeof u.delivery_ways["retirada-local"]?a.push({success:!0}):a.push({success:!1})),d.includes("jadlog")&&("string"!=typeof u.delivery_ways.jadlog?a.push({success:!0}):a.push({success:!1})),a.length>0?(x=!0,a.forEach((function(e){e.success&&(x=!1)})),N(x),x?C(!0):o(I)):N(!0),e.next=30;break;case 27:e.prev=27,e.t0=e.catch(9),C(!0);case 30:return e.prev=30,p(!1),b(!1),g(!1),e.finish(30);case 35:case"end":return e.stop()}}),e,null,[[9,27,30,35]])}))),[h,j]);(0,u.useEffect)((function(){(F&&j||null!==h&&""!==h&&void 0!==h&&null===w&&j)&&A(!1)}),[h,w,A,j]);var G=function(){var e=(0,U.Z)(L().mark((function e(){var t,r=arguments;return L().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.length>0&&void 0!==r[0]&&r[0],D(t),q(!1),b(!0),g(!0),F||null!==h&&""!==h&&void 0!==h&&!0!==w){e.next=8;break}return p(!0),e.abrupt("return");case 8:return e.abrupt("return",A(t));case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(m.u_,{open:k,onClose:function(){return C(!1)},className:J().modal_delivery,children:[(0,n.jsx)("img",{src:"/assets/images/cidade.png",alt:"Este produtor n\xe3o atende o seu CEP. Confira quais produtos est\xe3o dispon\xedveis na sua localidade ou troque o CEP..",style:{height:"100%",margin:"0px auto 20px auto"}}),(0,n.jsx)("div",{className:J().sua_regiao,children:(0,n.jsxs)("div",{className:J().available_products,children:["Confira"," ",(0,n.jsxs)(m.rU,{href:"/produtos?zipcode=".concat(Z),children:[" ",(0,n.jsx)("strong",{children:"aqui"})]})," ","quais produtos est\xe3o dispon\xedveis na sua localidade ou troque o seu CEP."]})}),(0,n.jsx)("div",{className:J().sua_regiao__button,children:(0,n.jsx)(m.zx,{variant:"ghost",onClick:function(){C(!1),p(!0)},children:"Trocar CEP"})}),(0,n.jsx)("div",{className:J().sua_regiao,children:(0,n.jsx)("p",{children:"Este produto n\xe3o est\xe1 dispon\xedvel para o seu CEP."})})]}),"1"==c.assinatura.toString()&&!R&&(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("div",{children:(0,n.jsxs)(m.zx,{type:"button",className:f()(J().root,s),id:"menu-button","aria-expanded":"false","aria-haspopup":"false",onClick:function(){return q(!S)},children:["Comprar",(0,n.jsxs)("svg",{width:"23",height:"23",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"false",children:[!r&&(0,n.jsx)("path",{d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z"}),r&&(0,n.jsx)(M.Jr,{})]})]})}),(0,n.jsx)("div",{className:S?"absolute right-0":"hidden",children:(0,n.jsx)("div",{className:J().options,role:"menu","aria-orientation":"vertical","aria-labelledby":"menu-button",tabIndex:-1,
1children:(0,n.jsxs)("div",{className:"py-1",role:"none",children:[(0,n.jsx)("a",{onClick:function(){return G(!0)},className:J().option,role:"menuitem",tabIndex:-1,id:"menu-item-0",children:"Assinar"}),(0,n.jsx)("a",{onClick:function(){return G(!1)},className:J().option,role:"menuitem",tabIndex:-1,id:"menu-item-1",children:"Comprar"})]})})})]}),(!c.assinatura||R)&&(0,n.jsxs)(m.zx,{variant:"primary",onClick:function(){return G(!1)},title:r?"Adicionado ao carrinho ".concat(T(r)):i,loading:_,className:f()(J().root,s),children:[r?(0,n.jsx)(M.Jr,{}):(0,n.jsx)(M.C3,{}),(0,n.jsx)("span",{children:i})]})]})},Y=r(38347),$=r(25675),ee=r(6004),te=r.n(ee);function re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var ne=function(e){var t=e.imageUrl,r=e.alt,i=e.className,o=e.width,s=void 0===o?240:o,c=e.height,l=void 0===c?240:c,u=e.quality,d=void 0===u?80:u,p=(0,Y.Z)(e,["imageUrl","alt","className","width","height","quality"]);return(0,n.jsx)($.default,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?re(Object(r),!0).forEach((function(t){(0,a.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({alt:r,src:t||w.I,width:s,height:l,quality:d,layout:"responsive",className:f()(te().root,i)},p))},ae=r(56339),ie=r(18094),oe=r.n(ie);function se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?se(Object(r),!0).forEach((function(t){(0,a.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):se(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var le=[{value:"asc",label:"Menor pre\xe7o"},{value:"desc",label:"Maior pre\xe7o"}],ue=(0,K.withRouter)((function(e){var t=e.products,r=e.className,a=e.router,i=e.filters,o=(0,u.useState)(null),s=o[0],c=o[1];return(0,u.useEffect)((function(){var e=a.query;c((null===e||void 0===e?void 0:e.order)||null)}),[]),(0,n.jsxs)("div",{className:f()(oe().root,r),children:[(0,n.jsxs)("div",{className:oe().header,children:[(0,n.jsx)("div",{className:oe().densities,children:i}),(0,n.jsx)("div",{className:oe().order,children:(0,n.jsx)(m.Lt,{pre:"",items:le,placeholder:"Ordenar por",onSelect:function(e){c(e),a.push(ce(ce({},a),{},{query:ce(ce({},a.query),{},{sort:e})}))},selected:s})})]}),(0,n.jsx)("div",{className:oe().productListGrid,children:t.map((function(e){return(0,n.jsx)(ae.Il,{product:e},"product-grid-".concat(e.id))}))})]})})),de=r(66801),pe=r(58675),fe=r.n(pe),me=function(e){var t=e.className,r=e.price,a=e.preco_promocional,i=e.preco_promocional_ativo;return(0,n.jsxs)("div",{className:f()(fe().root,t),children:[i&&a>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:fe().priceSymbol,children:"R$"}),(0,n.jsx)("s",{children:(0,de.f)(r.sell)})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:fe().priceSymbol,children:"R$"}),(0,de.f)(r.sell)]}),i&&a>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:fe().priceSymbol,children:"R$"}),(0,de.f)(a)]})]})};r(42283),r(3780)},56339:function(e,t,r){"use strict";r.d(t,{eR:function(){return W},Il:function(){return $.Z},pG:function(){return ve},hz:function(){return oe},Yf:function(){return L},bJ:function(){return Y}});var n=r(85893),a=r(59999),i=r(809),o=r.n(i),s=r(92447),c=r(67294),l=r(94184),u=r.n(l),d=r(49053),p=r(28569),f=r.n(p),m=function(e){var t=e.title,r=void 0===t?"":t,a=e.children,i=e.vertical,o=void 0!==i&&i;return(0,n.jsxs)("div",{className:u()(f().root,o&&f().vertical),children:[r&&(0,n.jsx)("h2",{className:f().title,children:r}),a]})},h=r(66384),v=r(11163),_=r(53529),g=r.n(_),x=function(e){var t=e.title,r=void 0===t?"":t,i=e.param,o=e.className,s=e.filters,c=e.vertical,l=void 0!==c&&c,d=e.handle,p=e.checkedOptions,f=(0,v.useRouter)(),_=f.pathname,x=f.query,j=x[i]?x[i].split(","):[];function b(e,t){if(t){if(!j.find((function(t){return t===e}))){var r=(0,a.Z)(j);r.push(e),x[i]=r.join(",")}}else{var n=(0,a.Z)(j.filter((function(t){return t!==e})));x[i]=n.join(",")}d?d(e):f.push({pathname:_,query:x})}return s?(0,n.jsx)(m,{title:r,className:u()(g().root,o),vertical:!0,children:(0,n.jsx)("div",{className:u()(l&&g().vertical),children:s.map((function(e){var t=e.id,r=e.name,a=e.slug;return(0,n.jsx)(h.XZ,{name:"filter-checkbox-".concat(t),value:a,label:r,checked:p?!!p.find((function(e){return e===a})):!!j.find((function(e){return e===a})),handleChange:b,className:g().checkbox})}))})}):(0,n.jsx)(n.Fragment,{})}
1,j=r(81035),b=r(49990),y=r.n(b),w=function(e){var t=e.title,r=void 0===t?"":t,i=e.baseUrl,o=e.preserveQuery,s=void 0===o||o,l=e.className,d=e.filters,p=e.vertical,f=void 0!==p&&p,_=(0,v.useRouter)(),g=(0,c.useState)([]),x=g[0],b=g[1];if(!d)return(0,n.jsx)(n.Fragment,{});function w(e){if(x.includes(e)){var t=x.filter((function(t){return t!==e}));b((0,a.Z)(t))}else{var r=x;r.push(e),b((0,a.Z)(r))}}var N=s?_.query:{};return N.page="1",(0,n.jsx)(m,{title:r,className:u()(y().root,l),vertical:!0,children:(0,n.jsx)("ul",{className:u()(f&&y().vertical),children:d.map((function(e){var t=e.id,r=e.slug,a=e.name,o=e.categories;return(0,n.jsxs)("li",{children:[o&&o.length>0?(0,n.jsxs)("button",{type:"button",className:y().filterLink,onClick:function(){return w(r)},children:[(0,n.jsx)("span",{children:a}),o&&o.length>0&&(0,n.jsx)(h.zx,{variant:"text",children:x.includes(r)?(0,n.jsx)(j.Kh,{}):(0,n.jsx)(j._M,{})})]}):(0,n.jsxs)(h.rU,{href:{pathname:"".concat(i).concat(r),query:N},className:y().filterLink,children:[(0,n.jsx)("span",{children:a}),o&&o.length>0&&(0,n.jsx)(h.zx,{variant:"text",onClick:function(){return w(r)},children:x.includes(r)?(0,n.jsx)(j.Kh,{}):(0,n.jsx)(j._M,{})})]}),x.includes(r)&&(0,n.jsx)("ul",{className:u()(f&&y().vertical,y().subcategory),children:o&&o.length>0&&o.map((function(e){return(0,n.jsx)(h.rU,{href:{pathname:"".concat(i).concat(e.slug),query:N},className:y().filterLink,children:e.name})}))})]},"filter-link-".concat(t))}))})})},N=r(18359),O=r(74047),k=r(52700),C=r(8127),P=r(44102),S=r(20775);function q(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,S.Z)(e);if(t){var a=(0,S.Z)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,P.Z)(this,r)}}var E=function(e){(0,C.Z)(r,e);var t=q(r);function r(){return(0,O.Z)(this,r),t.apply(this,arguments)}return(0,k.Z)(r,[{key:"getTags",value:function(){return this.setUrl("/tags").get()}},{key:"getCategoryById",value:function(e){var t="/tags/".concat(e);return this.setUrl(t).get()}},{key:"parser",value:function(e){return e.map((function(e){return""!==e.slug?{id:e.id,slug:e.slug,name:e.descricao}:null})).filter(Boolean)}}]),r}(r(43507).B),I=[{id:"Segunda-Feira",slug:"Segunda-Feira",name:"Segunda-Feira"},{id:"Terca-Feira",slug:"Terca-Feira",name:"Ter\xe7a-Feira"},{id:"Quarta-Feira",slug:"Quarta-Feira",name:"Quarta-Feira"},{id:"Quinta-Feira",slug:"Quinta-Feira",name:"Quinta-Feira"},{id:"Sexta-Feira",slug:"Sexta-Feira",name:"Sexta-Feira"},{id:"S\xe1bado",slug:"Sabado",name:"S\xe1bado"}],D=r(71924),Z=r(59359),F=r(21298),z=r.n(F),R=r(23994);function A(e,t,r){return r.indexOf(e)===t}var L=(0,v.withRouter)((function(e){var t=e.className,r=e.products,i=e.lastPage,l=void 0===i?1:i,p=e.baseUrl,f=e.router,m=e.sellersPage,v=e.isExp,_=void 0!==v&&v,g=e.isSearch,b=void 0!==g&&g,y=(0,c.useState)(null),O=y[0],k=y[1],C=(0,c.useState)(null),P=C[0],S=C[1],q=(0,c.useState)(!1),F=q[0],L=q[1],U=(0,c.useState)([]),M=U[0],T=U[1],B=(0,c.useState)([]),V=B[0],Q=B[1],W=(0,R.ET)().isMercadinho;function K(){L(!F)}(0,c.useEffect)((function(){function e(){return(e=(0,s.Z)(o().mark((function e(){var t,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new N.H,e.next=3,t.getCategories();case 3:r=e.sent,k(t.parser(r.data.data));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function t(){return(t=(0,s.Z)(o().mark((function e(){var t,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new E,e.next=3,t.getTags();case 3:r=e.sent,S(t.parser(r.data.data));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}(),function(){t.apply(this,arguments)}()}),[]);return(0,n.jsxs)("div",{className:u()(z().root,t),children:[!W&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Z.A_,{children:(0,n.jsxs)("div",{className:u()(z().filterMobile,F&&z().filterMobileVisible),children:[(0,n.jsxs)("span",{className:z().filterMobileTitle,children:[(0,n.jsx)("span",{children:"Filtros"}),(0,n.jsx)(h.zx,{variant:"text",onClick:K,children:(0,n.jsx)(j.um,{})})]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:z().filterMobileRow,children:[(0,n.jsx)(x,{title:"Entrega",param:"days",filters:I,vertical:!0,handle:function(e){var t=M.indexOf(e);if(t>=0){var r=M;delete r[t],T((0,a.Z)(r))}else{var n=[].concat((0,a.Z)(M),[e]).filter(A);T(n)}},checkedOptions:M}),(0,n.jsx)(x,{title:"Caracter\xedsticas",param:"tags",filters:P,vertical:!0,handle:function(e){var t=V.indexOf(e);if(t>=0){var r=V;delete r[t],Q((0,a.Z)(r))}else{var n=[].concat((0,a.Z)(V),[e]).filter(A);Q(n)}},checkedOptions:V})]}),(0,n.jsx)(h.zx,{onClick:function(){var e=f.pathname,t=f.query;M.length>0&&(t.days=M.join(",")),V.length>0&&(t.tags=M.join(",")),L(!1),f.push({pathname:e,query:t})},children:"Filtrar"})]}),(0,n.jsx)("br",{}),(0,n.jsx)("div",{children:(0,n.jsx)(w,{filters:O,preserveQuery:!1,baseUrl:D.qu,title:"Navegue nas categorias"})})]})}),(0,n.jsx)(Z.I3,{children:(0,n.jsxs)("div",{className:u()(z().filters,F&&z().filtersVisible),children:[!_&&(0,n.jsx)(x,{title:"Entrega",param:"days",filters:I,vertical:!0}),(0,n.jsx)(w,{filters:O,preserveQuery:!1,baseUrl:D.qu,title:"Categorias"}),(0,n.jsx)(x,{title:"Caracter\xedsticas",param:"tags",filters:P,vertical:!0})]})})]}),(0,n.jsx)("main",{className:z().grid,children:r&&r.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.eQ,{products:r,filters:!W&&(0,n.jsx)(Z.A_,{viewClassName:z().buttonFilter,children:(0,n.jsxs)(h.zx,{variant:"ghost",onClick:K,children:[(0,n.jsx)(j.wn,{}),"\xa0\xa0Filtros"]})})}),(0,n.jsx)(h.tl,{total:l,href:p,className:z().pagination})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Z.A_,{viewClassName:z().buttonFilter,children:(0,n.jsxs)(h.zx,{variant:"ghost",onClick:K,children:[(0,n.jsx)(j.wn,{}),"\xa0\xa0Filtros"]})}),(0,n.jsxs)("div",{className:z().productNotFoundMobile,children:[b&&!m?"N\xe3o encontramos nenhum produto de acordo com a sua busca, tente outro termo.":"",!1===b&&(0,n.jsx)(n.Fragment,{children:m?(0,n.jsx)(n.Fragment,{children:"Seu CEP ainda n\xe3o \xe9 atendido por este produtor da Fazendinha. Aguarde novidades!"}):(0,n.jsxs)(n.Fragment,{children:["N\xe3o encontramos nenhum produto nesta categoria para o seu CEP. Confira quais produtos est\xe3o dispon\xedveis"," ",(0,n.jsx)(h.zx,{href:"/produtos",variant:"link",children:"aqui"}),"."]})})]})]})})]})})),U=r(26265),M=r(38347),T=r(1756),B=r(3780);function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?V(Object(r),!0).forEach((function(t){(0,U.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var W=function(e){var t=e.product,r=e.quantity,a=void 0===r?1:r,i=(0,M.Z)(e,["product","quantity"]),o=(0,B.jD)(),s=o.addItem,l=o.getItem,u=o.inCart,p=(0,c.useState)(void 0),f=p[0],m=p[1],h=(0,B.lm)().notify;(0,c.useEffect)((function(){m(l(t.id))}),[t,l,m]);var v=(0,T.Z)((null===f||void 0===f?void 0:f.lastChange)||new Date,{intervalMs:1e3,locale:"pt_BR",relativeDate:new Date}),_=(0,c.useMemo)((function(){return u(t.id)}),[u,t]);return(0,n.jsx)(d.ve,Q(Q({},i),{},{product:t,quantity:a,inCart:_?v:null,onClick:function(){var e,r,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=t.id,o=t.name,c=t.image,l=t.price,u=t.preco_promocional,d=t.preco_promocional_ativo,p=t.stock,m=t.slug,v=t.assinatura_desconto_produtor,_=t.assinatura_frete_gratis,g=t.assinatura_desconto_frete,x=t.categories;if(l.sell<=0)h({title:"Aten\xe7\xe3o",description:"Produtos sem valor definido n\xe3o pode ser adicionado a carrinho",type:"danger"});else if(a>p)h({title:"Sem estoque suficiente",description:"Diminua a quantidade para poder continuar",type:"danger"});else{var j="Atacado"===(null===x||void 0===x?void 0:x.atacado)||!1;s({id:i,isAtacado:j,assinatura_desconto_produtor:v,assinatura_frete_gratis:_,assinatura_desconto_frete:g,assinatura:n,type:f&&f.type?f.type:"convencional",name:o,slug:m,imageUrl:c||((null===(e=t.images)||void 0===e?void 0:e.length)>0?null===(r=t.images[0])||void 0===r?void 0:r.url:void 0),price:d&&u>0?u:l.sell,quantity:a,itemTotal:l.sell*a,lastChange:new Date,seller:t.seller,delivery_method:"retirada-local"},a),h({title:"Adicionado ao carrinho",description:"".concat(a,"x ").concat(t.name),type:"success"})}}}))},K=r(69270),H=r(29747),G=r.n(H);function J(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function X(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?J(Object(r),!0).forEach((function(t){(0,U.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Y=function(e){var t=e.product,r=e.isAfiliado,i=e.isFavorite,o=e.loadingFavorite,s=e.onToggleFavorite,l=e.StarFilled,u=e.StarOutline,p=(0,c.useState)(1),f=p[0],m=p[1],h=t.image,v=t.images,_=t.name,g=t.description,x=t.price,j=t.seller,b=(t.days,t.stock),y=(t.national,t.categorias_slug),w=t.assinatura;var N=h&&""!==h?[{url:h}].concat((0,a.Z)(v)):v;return(0,n.jsxs)("div",{className:G().root,children:[(0,n.jsxs)("div",{className:G().gallery,children:[(0,n.jsxs)("div",{style:{position:"relative"},children:[r&&l&&u&&s&&(0,n.jsx)("div",{className:i?G().favoriteStar:"".concat(G().favoriteStar," ").concat(G()["favoriteStar--empty"]),style:{position:"absolute",top:8,right:8,zIndex:2,cursor:o?"not-allowed":"pointer"},onClick:s,title:i?"Remover dos favoritos":"Adicionar aos favoritos",children:i?(0,n.jsx)(l,{}):(0,n.jsx)(u,{})}),(0,n.jsx)(d.Li,{title:t.name,images:N},"product-view-gallery")]}),(0,n.jsxs)("div",{className:G().categories,children:[y.includes("Sem Lactose")&&(0,n.jsx)("img",{src:"/assets/icons/sem-lactose.webp",alt:"Sem lactose"}),y.includes("Sem A\xe7\xfacar")&&(0,n.jsx)("img",{src:"/assets/icons/sem-acucar.webp",alt:"Sem a\xe7\xfacar"}),y.includes("Sem Gl\xfaten")&&(0,n.jsx)("img",{src:"/assets/icons/sem-gluten.webp",alt:"Sem gl\xfaten"}),y.includes("Vegano")&&(0,n.jsx)("img",{src:"/assets/icons/vegano.webp",alt:"Vegano"}),y.includes("Org\xe2nico")&&(0,n.jsx)("img",{src:"/assets/icons/organico.webp",alt:"Org\xe2nico"})]})]}),(0,n.jsxs)("div",{className:G().info,children:[(0,n.jsx)("h1",{className:G().title,children:_}),(0,n.jsx)(K.wm,X(X({},j),{},{pre:"Vendido e entregue por",className:G().seller})),(0,n.jsx)(d.vI,{description:g}),(0,n.jsx)(Z.A_,{children:(0,n.jsx)("div",{className:G().free,children:x.sell>=200&&"Frete Gr\xe1tis"})}),w&&(0,n.jsx)("div",{children:(0,n.jsxs)("p",{children:[(0,n.jsx)("br",{}),(0,n.jsx)("b",{children:"Compras em formato de Assinatura"}),(0,n.jsx)("br",{}),"Assine e receba na periodicidade desejada poupando seu tempo e sem riscos de esquecimento.",(0,n.jsx)("br",{}),"\u2022 Frete Gr\xe1tis",(0,n.jsx)("br",{}),"\u2022 Sem taxa de ades\xe3o",(0,n.jsx)("br",{}),"\u2022 Cancele quando quiser na \xe1rea do cliente aqui pelo site",(0,n.jsx)("br",{}),"\u2022 Altere a periodicidade de recebimento facilmente",(0,n.jsx)("br",{}),"As assinaturas s\xf3 s\xe3o poss\xedveis de serem pagas com cart\xe3o de cr\xe9dito.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{})]})}),(0,n.jsx)(d.jF,{price:x,preco_promocional:t.preco_promocional,preco_promocional_ativo:t.preco_promocional_ativo}),(0,n.jsx)("div",{className:G().cta,children:b&&b>0&&"INATIVO"!==t.status?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.K5,{canChange:!0,onChange:function(e){var t=e.next;m(t)},quantity:f,dropdown:!1,maximum:b}),(0,n.jsx)(W,{product:t,quantity:f}),(0,n.jsx)(Z.I3,{children:t.preco_promocional&&t.preco_promocional_ativo?(0,n.jsx)("div",{className:G().free,children:t.preco_promocional>=200&&"Frete Gr\xe1tis"}):(0,n.jsx)("div",{className:G().free,children:x.sell>=200&&"Frete Gr\xe1tis"})})]}
1):(0,n.jsx)("span",{className:G().outOfStock,children:"Produto sem estoque"})})]})]})},$=r(40955),ee=r(16739),te=r(44611),re=r(6675),ne=r.n(re);function ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(r),!0).forEach((function(t){(0,U.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ae(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var oe=function(e){var t=e.className,r=e.seller,a=(0,c.useState)([]),i=a[0],o=a[1];(0,c.useEffect)((function(){r&&r.id&&(new ee.M).query({categories:"",search:"",page:1,seller:r.id}).then((function(e){var t=e.data.data;o(t.map((function(e){return(0,te.Z)(e)})))}))}),[]);var s=(0,c.useMemo)((function(){return i.length>0?[i[0],i[1],i[2]].filter(Boolean):[]}),[i]),l=(0,c.useMemo)((function(){return i.length>0?[i[3],i[4],i[5],i[6],i[7],i[8]].filter(Boolean):[]}),[i]);return(0,n.jsxs)("div",{className:u()(ne().root,t),children:[(0,n.jsxs)("div",{className:ne().header,children:[(0,n.jsx)(K.wm,ie(ie({},r),{},{className:ne().seller})),(0,n.jsx)("span",{className:ne().new,children:"Ofertas no Atacado"})]}),(0,n.jsxs)(Z.I3,{viewClassName:ne().line,children:[(0,n.jsx)("div",{className:ne().banner,children:(0,n.jsx)("a",{href:"https://www.fazendinha.me/produtos/atacado",children:(0,n.jsx)("img",{src:"/assets/images/26-07/banneratacadodesktop.jpg",alt:r.name})})}),s.map((function(e){return(0,n.jsx)($.Z,{product:e})}))]}),(0,n.jsx)(Z.I3,{viewClassName:ne().line,children:l.map((function(e){return(0,n.jsx)($.Z,{product:e})}))}),(0,n.jsxs)(Z.A_,{children:[(0,n.jsx)("div",{className:ne().banner,children:(0,n.jsx)("a",{href:"https://www.fazendinha.me/produtos/atacado",children:(0,n.jsx)("img",{src:"/assets/images/26-07/banneratacadomobile.jpg",alt:r.name})})}),(0,n.jsx)(d.GM,{children:i.map((function(e){return(0,n.jsx)($.Z,{product:e},"product-grid-seller-product-".concat(e.id))}))})]})]})},se=r(66801),ce=r(49720),le=r(52626),ue=r(66476),de=r.n(ue);function pe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function fe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(r),!0).forEach((function(t){(0,U.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var me={wide:{items:3.5,partialVisibilityGutter:0},desktop:{items:3.5,partialVisibilityGutter:0},tablet:{items:3,partialVisibilityGutter:0},mobile:{items:2.2,partialVisibilityGutter:0}},he=function(e){var t=e.exp,r=e.add,a=t.horario,i=t.data_evento,o=t.preco,s=t.descricao,l=(0,c.useState)(0),u=l[0],p=l[1];(0,c.useEffect)((function(){r(t,u)}),[u]);var f="00",m="".concat(i,"T00:00:00-03:00"),h=new Date(m),v=h.getDate().toString(),_=f.substring(0,f.length-v.length)+v,g=(h.getMonth()+1).toString(),x=f.substring(0,f.length-g.length)+g,b=h.getFullYear();return(0,n.jsxs)("div",{className:de().ticket,children:[(0,n.jsxs)("div",{className:de().ticketInfo,children:[(0,n.jsxs)("div",{className:de().ticketDate,children:[_,"/",x,"/",b,"\xa0",(0,n.jsx)(j.SU,{width:14}),"\xa0",a]}),(0,n.jsxs)("div",{className:de().ticketDescription,children:[(0,n.jsx)("div",{children:s}),(0,n.jsxs)("div",{className:de().ticketPrice,children:["R$ ",(0,se.f)(parseFloat(o))]})]})]}),(0,n.jsx)(d.C3,{canChange:!0,onChange:function(e){var t=e.next;p(t)},quantity:u,dropdown:!1,maximum:50})]})},ve=function(e){var t=e.product,r=t.image,i=t.slug,o=t.images,s=t.name,l=t.description,u=t.experiencia_aceita_animais,p=t.experiencia_entrada,f=t.experiencia_prato_principal,m=t.experiencia_bebidas,v=t.experiencia_sobremesa,_=t.experiencia_localizacao,g=t.experiencia_transporte,x=t.seller,b=t.experiencias,y=(0,c.useState)(null),w=y[0],N=y[1],O=(0,c.useState)(null),k=O[0],C=O[1],P=(0,c.useState)(null),S=P[0],q=P[1],E=(0,c.useState)(null),I=E[0],D=E[1],Z=(0,c.useState)(null),F=Z[0],z=Z[1],R=(0,c.useState)(t.experiencias),A=R[0],L=R[1],U=(0,c.useState)(0),M=U[0],T=U[1],B=(0,ce.jD)().addItem,V=(0,le.l)().notify,Q=r&&""!==r?[{url:r}].concat((0,a.Z)(o)):o;function W(e,t){var r=A.map((function(r){return r.id===e.id&&(r.quantidade=t,r.total=t*parseFloat(r.preco)),r})),n=(0,a.Z)(r),i=0;
1n.forEach((function(e){var t=e.total;i+=t||0})),L(n),T(i)}(0,c.useEffect)((function(){C(p),q(f),D(v),z(m),N(l)}),[]);var H=(0,c.useMemo)((function(){return _&&_.length>0?(_||"").split(" ").join("+"):null}),[_]);return(0,n.jsxs)("div",{className:de().root,children:[(0,n.jsxs)("header",{children:[(0,n.jsx)("h1",{className:de().title,children:s}),(0,n.jsx)(K.wm,fe(fe({},x),{},{pre:"Anfitri\xe3o",className:de().seller}))]}),(0,n.jsx)(h.lr,{config:me,ssr:!0,className:de().gallery,children:Q.map((function(e){var t=e.url;return(0,n.jsx)("div",{className:de().image,children:(0,n.jsx)("img",{src:t,alt:""})})}))}),(0,n.jsxs)("div",{className:de().content,children:[(0,n.jsxs)("div",{className:de().description,children:[(0,n.jsxs)("div",{className:de().section,children:[(0,n.jsx)("h3",{children:"Descri\xe7\xe3o"}),(0,n.jsx)(d.vI,{description:w})]}),(0,n.jsxs)("div",{className:de().food,children:[p&&(0,n.jsxs)("div",{className:de().section,children:[(0,n.jsx)("h3",{children:"Entrada"}),(0,n.jsx)("p",{dangerouslySetInnerHTML:{__html:k}})]}),f&&(0,n.jsxs)("div",{className:de().section,children:[(0,n.jsx)("h3",{children:"Prato principal"}),(0,n.jsx)("p",{dangerouslySetInnerHTML:{__html:S}})]}),v&&(0,n.jsxs)("div",{className:de().section,children:[(0,n.jsx)("h3",{children:"Sobremesa"}),(0,n.jsx)("p",{dangerouslySetInnerHTML:{__html:I}})]}),m&&(0,n.jsxs)("div",{className:de().section,children:[(0,n.jsx)("h3",{children:"Bebidas"}),(0,n.jsx)("p",{dangerouslySetInnerHTML:{__html:F}})]})]}),u&&"sim"===u&&(0,n.jsxs)("div",{className:de().line,children:[(0,n.jsx)(j.yK,{})," ",(0,n.jsx)("span",{children:"Aceita animais"})]}),g&&(0,n.jsxs)("div",{className:de().line,children:[(0,n.jsx)(j.y1,{}),(0,n.jsx)("span",{dangerouslySetInnerHTML:{__html:g}})]})]}),(0,n.jsxs)("aside",{className:de().aside,children:[b.map((function(e){return(0,n.jsx)(he,{exp:e,add:W})})),(0,n.jsxs)("div",{className:de().ticketFinalPrice,children:[(0,n.jsx)("div",{className:de().ticketFinalPriceTotal,children:"Total"}),(0,n.jsx)("div",{children:(0,n.jsxs)("strong",{children:["R$ ",(0,se.f)(M)]})})]}),(0,n.jsx)("hr",{}),(0,n.jsx)(h.zx,{variant:"primary",width:"100%",onClick:function(){if(M<=0)V({title:"Selecione ao menos um ingresso",description:"aumente a quantidade do ingresso que quer comprar",type:"warning"});else{var e=0;A.forEach((function(n){if(n.quantidade>0){var a="00",o="".concat(n.data_evento,"T00:00:00-03:00"),c=new Date(o),l=c.getDate().toString(),u=a.substring(0,a.length-l.length)+l,d=(c.getMonth()+1).toString(),p=a.substring(0,a.length-d.length)+d,f=c.getFullYear(),m={id:n.produto_id.toString(),experiencia_id:n.id,isAtacado:!1,price:parseFloat(n.preco),type:"experiencia",delivery_method:"retirada-local",name:"".concat(s," | ").concat(n.descricao," | ").concat(u,"/").concat(p,"/").concat(f," ").concat(n.horario),slug:i,imageUrl:r,assinatura:!1,quantity:n.quantidade,itemTotal:parseFloat(n.preco)*n.quantidade,lastChange:new Date,seller:t.seller};B(m,n.quantidade),e+=n.quantidade}})),V({title:"Adicionado ao carrinho",description:"".concat(e,"x ").concat(t.name),type:"success"})}},children:"Comprar"})]})]}),H&&(0,n.jsx)("iframe",{title:"Endere\xe7o",className:de().iframe,src:"https://maps.google.com/maps?q=".concat(H,"&t=&z=13&ie=UTF8&iwloc=&output=embed")})]})}},40955:function(e,t,r){"use strict";var n=r(85893),a=r(809),i=r.n(a),o=r(92447),s=r(38347),c=r(26265),l=r(67294),u=r(94184),d=r.n(u),p=r(66384),f=r(4549),m=r(71924),h=r(49053),v=r(59359),_=r(12364),g=r.n(_),x=r(56339),j=r(11163),b=r(11699),y=r(23994),w=r(1812),N=r(14238);function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){(0,c.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var C=function(e){return(0,n.jsx)("svg",k(k({width:"24",id:"creditos-honrosos-julia-bellusci",height:"24",viewBox:"0 0 24 24",fill:"#FFD700",stroke:"#FFD700",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{},{children:(0,n.jsx)("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"})}))},P=function(e){return(0,n.jsx)("svg",k(k({width:"24",id:"creditos-honrosos-julia-bellusci",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#FFD700",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e),{},{children:(0,n.jsx)("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"})}))};t.Z=function(e){var t=e.className,r=e.product,a=e.imgProps,c=(0,s.Z)(e,["className","product","imgProps"]),u=(0,l.useState)(1),_=u[0],O=u[1],S=(0,j.useRouter)(),q=(0,y.ET)().isMercadinho,E=(0,w.Mz)().isAfiliado,I=(0,b.u)(S.pathname),D=(0,l.useState)(r.isAfiliadoFavorite),Z=D[0],F=D[1],z=(0,l.useState)(!1),R=z[0],A=z[1],L=r.slug||"",U=r.afiliadoId?"?afiliadoId=".concat(r.afiliadoId):"",M=k({href:"".concat(m.e_).concat(L).concat(U),passHref:!0,prefetch:!0},c);function T(e){var t=e.next;O(t)}var B=r,V=r.image,Q=r.images,W=r.name,K=r.price,H=r.stock,G=(r.days,r.tipo_produto),J=V&&""!==V?V:Q.length>0?Q[0].url:null,X=k(k({},M),{}
1,{href:"".concat(m.sm).concat(L)}),Y="convencional"===G?M:X;q&&(Y.href="#"),I&&(Y.href="#");var $=function(){var e=(0,o.Z)(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.stopPropagation(),t.preventDefault(),!R){e.next=4;break}return e.abrupt("return");case 4:if(A(!0),e.prev=5,n=new N.Z,!Z){e.next=13;break}return e.next=10,n.setUrl("/afiliados/delete-produto-favorito?produto_id=".concat(r.id)).delete();case 10:F(!1),e.next=16;break;case 13:return e.next=15,n.setUrl("/afiliados/add-produto-favorito").post({produto_id:r.id});case 15:F(!0);case 16:e.next=20;break;case 18:e.prev=18,e.t0=e.catch(5);case 20:return e.prev=20,A(!1),e.finish(20);case 23:case"end":return e.stop()}}),e,null,[[5,18,20,23]])})));return function(t){return e.apply(this,arguments)}}();return(0,n.jsxs)("div",{className:d()(g().root,H<=0&&g().unavailable,t),children:[E&&(0,n.jsx)("div",{className:d()(g().favoriteStar,!Z&&g()["favoriteStar--empty"]),style:{position:"absolute",top:8,right:8,zIndex:2,cursor:R?"not-allowed":"pointer"},onClick:$,title:Z?"Remover dos favoritos":"Adicionar aos favoritos",children:Z?(0,n.jsx)(C,{}):(0,n.jsx)(P,{})}),(0,n.jsx)(p.rU,k(k({},Y),{},{className:g().image,children:(0,n.jsx)("div",{className:g().image,children:(0,n.jsx)("img",k({alt:W||"",src:J||f.I},a))})})),(0,n.jsx)(p.rU,k(k({},Y),{},{className:g().title,children:W})),(0,n.jsx)(v.I3,{children:(0,n.jsxs)("div",{className:g().priceTag,children:["convencional"===G&&(0,n.jsx)(h.jF,{price:K,preco_promocional:r.preco_promocional,preco_promocional_ativo:r.preco_promocional_ativo}),"convencional"===G?(0,n.jsx)("div",{className:g().onlyDesktop,children:(0,n.jsx)(h.K5,{onChange:T,quantity:_,maximum:H,dropdown:!1})}):(0,n.jsx)(p.zx,{href:"".concat(m.sm).concat(L),className:g().euQuero,children:"Eu quero"})]})}),"convencional"===G?(0,n.jsx)(n.Fragment,{children:H>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(v.A_,{children:[(0,n.jsxs)(p.rj.Row,{className:g().mobileFooter,children:[(0,n.jsx)(h.jF,{price:K,preco_promocional:r.preco_promocional||0,preco_promocional_ativo:r.preco_promocional_ativo}),(0,n.jsx)(h.K5,{onChange:T,quantity:_,maximum:H,dropdown:!1})]}),(0,n.jsx)(x.eR,{product:B,quantity:_,className:g().buy})]}),(0,n.jsx)(v.I3,{children:(0,n.jsxs)(p.rj.Row,{className:g().footerDesktop,children:[(0,n.jsx)("div",{className:g().onlyWide,children:(0,n.jsx)(h.K5,{onChange:T,quantity:_,maximum:H,dropdown:!1})}),(0,n.jsx)(x.eR,{product:B,quantity:_,className:g().buy})]})})]}):(0,n.jsx)("div",{className:g().unavailable_text,children:"Sem estoque"})}):(0,n.jsx)(v.A_,{children:(0,n.jsx)(p.zx,{href:"".concat(m.sm).concat(L),className:g().euQuero,children:"Eu quero"})})]})}},16739:function(e,t,r){"use strict";r.d(t,{M:function(){return p}});var n=r(809),a=r.n(n),i=r(92447),o=r(74047),s=r(52700),c=r(8127),l=r(44102),u=r(20775);function d(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=(0,u.Z)(e);if(t){var a=(0,u.Z)(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return(0,l.Z)(this,r)}}var p=function(e){(0,c.Z)(r,e);var t=d(r);function r(){return(0,o.Z)(this,r),t.apply(this,arguments)}return(0,s.Z)(r,[{key:"query",value:function(){var e=(0,i.Z)(a().mark((function e(t){var r,n,i,o,s,c,l,u,d,p,f,m,h,v,_,g,x,j,b,y;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.categories,n=t.page,i=void 0===n?1:n,o=t.days,s=void 0===o?"":o,c=t.orderBy,l=t.sort,u=t.search,d=t.seller,p=t.tags,f=void 0===p?"":p,m=t.limit,h=t.zipcode,v=c||"",_=d||"",g=m||30,x=encodeURI(u||""),j=this,b="/products?nome=".concat(x,"&produtor_id=").concat(_,"&categorias_slug=").concat(r,"&tags_slug=").concat(f,"&dias_entrega=").concat(s,"&page=").concat(i,"&orderby=").concat(v,"&sort=").concat(l||"","&limit=").concat(g),h&&(b+="&cep_entrega=".concat(h)),"experiencias"===r&&(b="/products?nome=".concat(x,"&tipo_produto=experiencia&produtor_id=").concat(_,"&tags_slug=").concat(f,"&page=").concat(i,"&orderby=").concat(v,"&sort=").concat(l||"","&limit=").concat(g)),y=j.setUrl(b).get(),e.abrupt("return",y);case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getById",value:function(e){var t="/products/".concat(e);return this.setUrl(t).get()}},{key:"getBestSellers",value:function(){return this.setUrl("/products/featured/mais_vendidos").get()}},{key:"getMostRecent",value:function(){return this.setUrl("/products/featured/novos_por_aqui").get()}},{key:"getFeatured",value:function(){return this.setUrl("/products/featured/produtos_em_destaque").get()}}]),r}(r(43507).B)},69270:function(e,t,r){"use strict";r.d(t,{S6:function(){return j},To:function(){return _},wm:function(){return m},c3:function(){return n.default}});var n=r(74266),a=r(85893),i=r(38347),o=r(25675),s=r(66384),c=r(94184),l=r.n(c),u=r(4549),d=r(35145),p=r(23026),f=r.n(p),m=function(e){var t=e.withImage,r=void 0===t||t,n=e.pre,c=void 0===n?"":n,p=e.className,m=(0,i.Z)(e,["withImage","pre","className"]),h=m.slug,v=m.name,_=m.avatar;return(0,a.jsx)(s.rU,{href:"".concat(d.u8,"/").concat(h),children:(0,a.jsxs)("div",{className:l()(f().root,p),children:[""!==c&&(0,a.jsx)("div",{className:f().pre,children:c}),r&&(0,a.jsx)("div",{className:f().avatar,children:(0,a.jsx)(o.default,{src:_&&(null===_||void 0===_?void 0:_.url)||u.I,alt:v,width:"24px",height:"24px"})}),(0,a.jsx)("div",{className:f().name,children:v})]})})},h=r(79688),v=r.n(h),_=function(e){var t=e.className,r=void 0===t?"":t,n=e.children;return(0,a.jsx)("div",{className:l()(v().root,r),children:n})},g=r(20635),x=r.n(g),j=function(e){var t=e.seller,r=e.className,n=void 0===r?"":r,i=t.name,o=t.avatar,c=t.description;return(0,a.jsxs)(s.rU,{href:d.Z+t.slug,className:l()(x().root,n),children:[(0,a.jsx)("div",{className:x().avatar,children:(0,a.jsx)("img",{src:o&&(null===o||void 0===o?void 0:o.url)||u.I,alt:i})}),(0,a.jsxs)("div",{className:x().info,children:[(0,a.jsx)("div",{className:x().title,children:i}),(0,a.jsxs)("div",{className:x().description,children:[null===c||void 0===c?void 0:c.substr(0,88),"..."]})]})]})}},74266:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return f}});var n=r(85893),a=r(67294),i=r(25675),o=r(4549),s=r(66384),c=r(35145),l=r(6497),u=r(81035),d=r(77219),p=r.n(d),f=function(e){var t=e.seller,r=e.className,d=void 0===r?"":r,f=e.withHeader,m=void 0===f||f,h=e.onlyInfo,v=void 0!==h&&h,_=(0,a.useState)(!1),g=_[0],x=_[1],j=t.name,b=t.avatar,y=t.header,w=t.description,N=t.responsible,O=t.delivery;return(0,a.useEffect)((function(){x(!!(w&&(null===w||void 0===w?void 0:w.length)>280))}),[w]),(0,n.jsxs)("div",{className:p().root,children:[m&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:p().header,children:(0,n.jsx)("img",{src:y&&(null===y||void 0===y?void 0:y.url)||o.I,alt:j}
1)}),(0,n.jsx)(s.rU,{href:"".concat(c.u8,"/").concat((0,l.l)(j)),className:d,children:(0,n.jsx)("div",{className:p().titleHeader,children:j})})]}),v&&(0,n.jsx)("div",{className:p().content,children:(0,n.jsxs)(s.rj.Row,{children:[(0,n.jsx)("div",{className:p().avatar,children:(0,n.jsx)(i.default,{src:b&&(null===b||void 0===b?void 0:b.url)||o.I,alt:j,width:"160px",height:"160px"})}),(0,n.jsxs)("div",{className:p().info,children:[(0,n.jsx)(s.rU,{href:"".concat(c.u8,"/").concat((0,l.l)(j)),className:d,children:(0,n.jsx)("div",{className:p().title,children:j})}),(0,n.jsxs)("div",{className:p().description,children:[g?"".concat(null===w||void 0===w?void 0:w.substr(0,280),"..."):w,(0,n.jsx)("div",{className:p().crop,children:w&&(null===w||void 0===w?void 0:w.length)>280&&(0,n.jsxs)(s.zx,{onClick:function(){return x(!g)},variant:"text",children:["Mostrar ",g?"mais":"menos"]})})]}),(0,n.jsxs)("div",{className:p().items,children:[(0,n.jsx)(s.rj.Row,{children:(0,n.jsxs)(s.rj.Column,{className:p().item,children:[(0,n.jsx)(u.O_,{}),(0,n.jsx)("span",{children:O})]})}),(0,n.jsx)(s.rj.Row,{children:(0,n.jsxs)(s.rj.Column,{className:p().item,children:[(0,n.jsx)(u.Ys,{}),(0,n.jsx)("span",{children:N})]})})]})]})]})})]})}},55687:function(e,t,r){"use strict";r.d(t,{GR:function(){return x},B8:function(){return F},lF:function(){return v},z0:function(){return y},mC:function(){return O},cL:function(){return c},ig:function(){return E}});var n=r(85893),a=r(42283),i=r(66384),o=r(27233),s=r.n(o),c=function(e){var t,r,o=e.pushToRecoveryRequest,c=e.onSubmit,l=e.pushToSingUp,u=(0,a.cI)({mode:"onChange"}),d=u.register,p=u.handleSubmit,f=u.formState,m=f.touched,h=f.errors,v=f.isSubmitting;return(0,n.jsxs)("div",{className:s().root,children:[(0,n.jsx)("h1",{className:s().title,children:"Entrar na sua conta"}),(0,n.jsxs)("form",{onSubmit:p((function(e){c(e)})),className:s().form,children:[(0,n.jsx)(i.II,{type:"text",name:"email",placeholder:"Seu email aqui",error:null===h||void 0===h||null===(t=h.email)||void 0===t?void 0:t.message,touched:null===m||void 0===m?void 0:m.email,maxLength:56,disabled:v,ref:d({required:{value:!0,message:"Informe seu e-mail"},pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,message:"E-mail inv\xe1lido"}})}),(0,n.jsx)(i.II,{type:"password",name:"password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",error:null===h||void 0===h||null===(r=h.password)||void 0===r?void 0:r.message,touched:null===m||void 0===m?void 0:m.password,maxLength:32,disabled:v,ref:d({required:{value:!0,message:"Informe sua senha"},minLength:{value:4,message:"A senha cont\xe9m no m\xednimo 4 (quatro) caracteres"}})}),(0,n.jsx)(i.zx,{variant:"primary",type:"submit",loading:v,children:"Entrar"}),(0,n.jsx)("button",{type:"button",className:s().forgotPassword,onClick:o,children:"Esqueceu a senha?"})]}),(0,n.jsxs)("p",{children:["Ainda n\xe3o tem conta?"," ",(0,n.jsx)("button",{className:s().signUp,type:"button",onClick:l,children:"Clique aqui"})," ","para criar registrar."]})]})},l=r(26265),u=r(67294),d=r(22093);var p=r(35796),f=r.n(p);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){(0,l.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var v=function(e){var t,r,o,s,c,l,p,m,v,_,g=e.onSubmit,x=e.onCancel,j=(0,a.cI)({mode:"all"}),b=j.register,y=j.handleSubmit,w=j.formState,N=w.errors,O=w.touched,k=w.isSubmitting,C=j.getValues,P=j.setError,S=j.clearErrors,q=(0,u.useState)(!1),E=q[0],I=q[1],D=(0,u.useState)(!0),Z=D[0],F=D[1],z=function(e){"PF"!==e.target.value?F(!1):F(!0)};(0,u.useEffect)((function(){S()}),[Z]);return(0,n.jsxs)("div",{className:f().root,children:[(0,n.jsx)("h1",{className:f().title,children:"Criar conta"}),(0,n.jsxs)("form",{onSubmit:y((function(e){var t=e.password,r=e.confirmPassword,n=e.name,a=e.birthday,i=Z?"PF":"PJ";if(t===r)if(n.trim().includes(" ")){var o,s=!0;if(a&&""!==a){var c=new RegExp("^(((0[1-9]|[12][0-9]|30)[-/]?(0[13-9]|1[012])|31[-/]?(0[13578]|1[02])|(0[1-9]|1[0-9]|2[0-8])[-/]?02)[-/]?[0-9]{4}|29[-/]?02[-/]?([0-9]{2}(([2468][048]|[02468][48])|[13579][26])|([13579][26]|[02468][048]|0[0-9]|1[0-6])00))$"),l=a.split("/").join("");c.test(l)||(s=!1,P("birthday",{message:"Data de nascimento inv\xe1lida: Ex.: 01/01/1999"}))}if(s)g(h(h({},e),{},{document:e.document.replace(/[^0-9]+/g,""),phone:e.phone.replace(/[^0-9]+/g,""),insEstadual:null===(o=e.insEstadual)||void 0===o?void 0:o.replace(/[^0-9]+/g,""),personType:i,isExemptState:E}))}else P("name",{message:"Informe ".concat(Z?"o nome completo":"a raz\xe3o social")});else P("confirmPassword",{message:"As senhas n\xe3o s\xe3o compat\xedveis"})})),className:f().form,children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:f().typePerson,children:[(0,n.jsx)("input",{type:"radio",value:"PF",name:"person",checked:!0===Z,onChange:z})," Pessoa f\xedsica"]}),(0,n.jsxs)("div",{className:f().typePerson,children:[(0,n.jsx)("input",{type:"radio",value:"PJ",name:"person",checked:!0!==Z,onChange:z})," Pessoa jur\xeddica"]})]}),(0,n.jsx)(i.vy,{mask:Z?"999.999.999-99":"99.999.999/9999-99",type:"tel",name:"document",placeholder:Z?"CPF":"CNPJ",error:null===N||void 0===N||null===(t=N.document)||void 0===t?void 0:t.message,touched:null===O||void 0===O?void 0:O.document,disabled:k,ref:b({required:{value:!0,message:"Por favor, preencha seu ".concat(Z?"CPF":"CNPJ"," no campo acima")},validate:{validDocument:function(e){return!Z||(function(e){if(null==e)return!1;if(11!==e.length)return!1;if("00000000000"===e||"11111111111"===e||"22222222222"===e||"33333333333"===e||"44444444444"===e||"55555555555"===e||"66666666666"===e||"77777777777"===e||"88888888888"===e||"99999999999"===e)return!1;var t="",r=10,n=0,a=0,i=0,o="";o=e.substring(0,9);for(var s=0;s<9;s++){if(t=o.charAt(s),-1==="0123456789".search(t))return!1;n+=Number(t)*r,r--}(a=11-n%11)>9&&(a=0),r=11,n=0,o+=a;for(var c=0;c<10;c++)t=o.charAt(c),n+=Number(t)*r,r--;return(i=11-n%11)>9&&(i=0),e===o+i}(e.replace(/[^0-9]+/g,""))||"CPF inv\xe1lido")}}})}),(0,n.jsx)(i.II,{type:"text",name:"name",placeholder:Z?"Nome":"Raz\xe3o social",disabled:k,error:null===N||void 0===N||null===(r=N.name)||void 0===r?void 0:r.message,touched:null===O||void 0===O?void 0:O.name,maxLength:100,ref:b({required:{value:!0,message:"Por favor, preencha ".concat(Z?"seu nome":"sua raz\xe3o social"," no campo acima")},minLength:{value:5,message:"Ao menos 5 (cinco) caracteres"}})}),!Z&&(0,n.jsx)(i.II,{type:"text",name:"fantasyName",placeholder:"Nome fantasia",disabled:k,error:null===N||void 0===N||null===(o=N.fantasyName)||void 0===o?void 0:o.message,touched:null===O||void 0===O?void 0:O.fantasyName,maxLength:100,ref:b({required:{value:!0,message:"Por favor, preencha nome fantasia no campo acima"},minLength:{value:5,message:"Ao menos 5 (cinco) caracteres"}})}),!Z&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:f().labelCheckBox,children:(0,n.jsxs)("label",{htmlFor:"iptInscricaoEstadual",className:f().label,children:[(0,n.jsx)("input",{type:"checkbox",name:"iptInscricaoEstadual",checked:E,onChange:function(){I(!E)}}),"Isento de inscri\xe7\xe3o estadual"]})}),!E&&(0,n.jsx)(i.II,{type:"tel",name:"insEstadual",placeholder:"Inscri\xe7\xe3o estadual",disabled:k,error:null===N||void 0===N||null===(s=N.insEstadual)||void 0===s?void 0:s.message,touched:null===O||void 0===O?void 0:O.insEstadual,maxLength:25,ref:b({required:{value:!0,message:"Por favor, preencha a inscri\xe7\xe3o estadual no campo acima"},minLength:{value:5,message:"Ao menos 5 (cinco) caracteres"}})}),(0,n.jsx)(i.II,{type:"text",name:"nameCompany",placeholder:"Nome respons\xe1vel",disabled:k,error:null===N||void 0===N||null===(c=N.nameCompany)||void 0===c?void 0:c.message,touched:null===O||void 0===O?void 0:O.nameCompany,maxLength:140,ref:b({required:{value:!0,message:"Por favor, preencha o nome do respons\xe1vel no campo acima"},minLength:{value:5,message:"Ao menos 5 (cinco) caracteres"}})})]}),(0,n.jsx)(i.II,{type:"email",name:"email",placeholder:"E-mail",disabled:k,error:null===N||void 0===N||null===(l=N.email)||void 0===l?void 0:l.message,touched:null===O||void 0===O?void 0:O.email,ref:b({required:{value:!0,message:"Por favor, preencha seu e-mail"},pattern:{value:d.Z,message:"E-mail inv\xe1lido"}})}),(0,n.jsx)(i.vy,{mask:"(99) 99999-9999",type:"tel",name:"phone",placeholder:"Celular",error:null===N||void 0===N||null===(p=N.phone)||void 0===p?void 0:p.message,touched:null===O||void 0===O?void 0:O.phone,ref:b({required:{value:!0,message:"Por favor, preencha seu n\xfamero de celular"}})}),Z&&(0,n.jsx)(i.vy,{mask:"99/99/9999",name:"birthday",placeholder:"DD/MM/AAAA",error:null===N||void 0===N||null===(m=N.birthday)||void 0===m?void 0:m.message,touched:null===O||void 0===O?void 0:O.birthday,ref:b({required:{value:Z,message:"Por favor, preencha a data de nascimento"}})}),(0,n.jsx)(i.II,{type:"password",name:"password",placeholder:"Senha",error:null===N||void 0===N||null===(v=N.password)||void 0===v?void 0:v.message,touched:null===O||void 0===O?void 0:O.password,ref:b({required:{value:!0,message:"Por favor, preencha a senha"},minLength:{value:8,message:"No m\xednimo 8 (oito) caracteres"},validate:{matchesNextPassword:function(e){var t=C().confirmPassword;return!t||(t===e||"A senha precisa ser igual")}}})}),(0,n.jsx)(i.II,{type:"password",name:"confirmPassword",placeholder:"Senha de confirma\xe7\xe3o",error:null===N||void 0===N||null===(_=N.confirmPassword)||void 0===_?void 0:_.message,touched:null===O||void 0===O?void 0:O.confirmPassword,disabled:k,ref:b({required:{value:!0,message:"Confirme a senha"},minLength:{value:8,message:"No m\xednimo 8 (oito) caracteres"},validate:{matchesPreviousPassword:function(e){return C().password===e||"A senha precisa ser igual"}}})}),(0,n.jsx)(i.zx,{variant:"primary",type:"submit",disabled:k,loading:k,children:"Criar conta"}),(0,n.jsx)("button",{type:"button",className:f().back,onClick:x,children:"Voltar"})]})]})},_=(r(18228),r(34155),r(93645),r(34155),r(75147)),g=r.n(_),x=function(e){var t,r,o=e.onSubmit,s=(0,a.cI)({mode:"onChange"}),c=s.register,l=s.handleSubmit,u=s.formState,d=u.errors,p=u.touched,f=u.isSubmitting,m=s.getValues,h=s.setError;return(0,n.jsx)("div",{className:g().root,children:(0,n.jsxs)("form",{onSubmit:l((function(e){var t=e.password;t!==e.confirmPassword?h("confirmPassword",{message:"As senhas n\xe3o s\xe3o compat\xedveis"}):o({password:t})})),children:[(0,n.jsx)(i.II,{type:"password",name:"password",placeholder:"Nova senha",error:null===d||void 0===d||null===(t=d.password)||void 0===t?void 0:t.message,touched:null===p||void 0===p?void 0:p.password,maxLength:32,disabled:f,ref:c({required:{value:!0,message:"Digite sua senha"},minLength:{value:6,message:"No m\xednimo 6 (seis) caracteres"},validate:{matchesNextPassword:function(e){var t=m().confirmPassword;return!t||(t===e||"A senha precisa ser igual")}}})}),(0,n.jsx)(i.II,{type:"password",name:"confirmPassword",placeholder:"Confirmar senha",error:null===d||void 0===d||null===(r=d.confirmPassword)||void 0===r?void 0:r.message,touched:null===p||void 0===p?void 0:p.confirmPassword,maxLength:32,disabled:f,ref:c({required:{value:!0,message:"Confirme a senha"},minLength:{value:6,message:"No m\xednimo 8 (oito) caracteres"},validate:{matchesPreviousPassword:function(e){return m().password===e||"A senha precisa ser igual"}}})}),(0,n.jsx)(i.zx,{variant:"primary",type:"submit",loading:f,children:"Mudar senha"})]})})},j=r(67736),b=r.n(j),y=function(e){var t,r=e.onCancel,o=e.onSubmit,s=e.forceChangePassword,c=(0,a.cI)({mode:"onChange"}),l=c.register,u=c.handleSubmit,d=c.formState,p=d.errors,f=d.touched,m=d.isSubmitting;return(0,n.jsxs)("div",{className:b().root,children:[s?(0,n.jsx)("div",{className:b().forceChangePassword,children:(0,n.jsxs)("span",{children:["Ol\xe1!",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Estamos implementando melhorias na nossa e na sua seguran\xe7a. Para isso precisamos que voc\xea atualize sua senha de acesso."]})}):(0,n.jsx)("h1",{className:b().title,children:"Recupere sua senha"}),(0,n.jsxs)("form",{onSubmit:u((function(e){o({email:e.email})})),className:b().form,children:[(0,n.jsx)(i.II,{type:"email",name:"email",placeholder:"Seu E-mail",error:null===p||void 0===p||null===(t=p.email)||void 0===t?void 0:t.message,defaultValue:s||"",touched:null===f||void 0===f?void 0:f.email,maxLength:56,disabled:m,ref:l({required:{value:!0,message:"Por favor, informe seu e-mail"},pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,message:"E-mail inv\xe1lido"}})}),(0,n.jsx)(i.zx,{variant:"primary",type:"submit",loading:m,children:s?"Trocar minha senha":"Receber c\xf3digo"})]}),(0,n.jsx)(i.zx,{variant:"link",onClick:r,children:"Voltar"})]})},w=r(47584),N=r.n(w),O=function(e){var t,r=e.onCancel,o=e.onSubmit,s=(0,a.cI)({mode:"onChange"}),c=s.register,l=s.handleSubmit,u=s.formState,d=u.errors,p=u.touched,f=u.isSubmitting,m=s.reset,h=s.setError;return(0,n.jsxs)("div",{className:N().root,children:[(0,n.jsx)("h1",{className:N().title,children:"Confirme o c\xf3digo recebido por e-mail"}),(0,n.jsxs)("form",{onSubmit:l((function(e){e.code.length<6?h("c
1ode",{message:"C\xf3digo inv\xe1lido"}):(o(e),m())})),className:N().form,children:[(0,n.jsx)(i.II,{type:"text",name:"code",placeholder:"Seu c\xf3digo",error:null===d||void 0===d||null===(t=d.code)||void 0===t?void 0:t.message,touched:null===p||void 0===p?void 0:p.code,maxLength:6,disabled:f,ref:c({required:!0,minLength:{value:5,message:"C\xf3digo inv\xe1lido"}})}),(0,n.jsx)(i.zx,{variant:"primary",type:"submit",loading:f,children:"Confirmar c\xf3digo"})]}),(0,n.jsx)(i.zx,{variant:"link",onClick:r,children:"Voltar"})]})},k=r(3780),C=r(99870),P=r(63821),S=r.n(P),q=[{href:C.in,label:"Minha Conta"},{href:C.ai,value:"LOGOUT",label:"Sair"}],E=function(){var e=(0,k.EC)().user;return(null===e||void 0===e?void 0:e.id)?(0,n.jsx)(i.v2,{label:null!==e&&void 0!==e&&e.name?e.name.split(" ")[0]:"Cliente",items:q}):(0,n.jsx)(i.rU,{href:C.JJ,className:S().link,children:"Entrar"})},I=r(52626),D=r(87522),Z=r.n(D),F=function(e){var t,r,o,s,c,l,d,p=e.onSubmit,f=e.data,m=(0,I.l)().notify,h=(0,a.cI)({mode:"onChange"}),v=h.register,_=h.handleSubmit,g=h.formState,x=g.errors,j=g.touched,b=g.isSubmitting,y=h.setError,w=h.clearErrors,N=(0,u.useState)(1===f.isExemptState),O=N[0],k=N[1];return(0,n.jsx)("div",{className:Z().root,children:(0,n.jsxs)("form",{onSubmit:_((function(e){var t=e.email,r=e.name,n=e.phone,a=e.birthday,i=e.fantasy_name,o=e.name_company,s=e.ins_estadual,c=r.trim();if(c===f.name||c.includes(" ")){try{if(a&&""!==a){var l=new RegExp("^(((0[1-9]|[12][0-9]|30)[-/]?(0[13-9]|1[012])|31[-/]?(0[13578]|1[02])|(0[1-9]|1[0-9]|2[0-8])[-/]?02)[-/]?[0-9]{4}|29[-/]?02[-/]?([0-9]{2}(([2468][048]|[02468][48])|[13579][26])|([13579][26]|[02468][048]|0[0-9]|1[0-6])00))$"),u=a.split("/").join("");if(!l.test(u))throw new Error("Data inv\xe1lida")}}catch(d){return void m({type:"danger",title:"Data de nascimento inv\xe1lida"})}p(t,r,n,a,i,o,s)}else y("name",{message:"Informe ".concat(f.isPerson?"o nome completo":"a raz\xe3o social")})})),children:[(0,n.jsx)(i.II,{type:"text",name:"name",label:f.isPerson?"Seu nome":"Sua raz\xe3o social",placeholder:"Digite aqui",error:null===x||void 0===x||null===(t=x.name)||void 0===t?void 0:t.message,touched:null===j||void 0===j?void 0:j.name,maxLength:72,disabled:b,defaultValue:f.name,ref:v({required:{value:!0,message:"Digite ".concat(f.isPerson?"seu nome":"sua raz\xe3o social")},minLength:{value:6,message:"No m\xednimo 6 (seis) caracteres"}})}),!f.isPerson&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.II,{type:"text",name:"fantasy_name",label:"Seu nome fantasia",placeholder:"Digite aqui",error:null===x||void 0===x||null===(r=x.fantasy_name)||void 0===r?void 0:r.message,touched:null===j||void 0===j?void 0:j.fantasy_name,maxLength:85,disabled:b,defaultValue:f.fantasyName,ref:v({required:{value:!0,message:"Digite seu nome fantasia"},minLength:{value:6,message:"No m\xednimo 6 (seis) caracteres"}})}),(0,n.jsx)(i.II,{type:"text",name:"name_company",label:"Nome respons\xe1vel",placeholder:"Digite aqui",error:null===x||void 0===x||null===(o=x.name_company)||void 0===o?void 0:o.message,touched:null===j||void 0===j?void 0:j.name_company,maxLength:140,disabled:b,defaultValue:f.company_name,ref:v({required:{value:!0,message:"Digite o nome do respons\xe1vel pela empresa"},minLength:{value:6,message:"No m\xednimo 6 (seis) caracteres"}})}),(0,n.jsx)("div",{className:Z().labelCheckBox,children:(0,n.jsxs)("label",{htmlFor:"iptInscricaoEstadual",className:Z().label,children:[(0,n.jsx)("input",{type:"checkbox",disabled:0===f.isExemptState,name:"iptInscricaoEstadual",checked:O,onChange:function(){k(!O),w()}}),"Isento de inscri\xe7\xe3o estadual"]})}),!O&&(0,n.jsx)(i.II,{type:"text",name:"ins_estadual",label:"Sua inscri\xe7\xe3o estadual",placeholder:"Digite aqui",error:null===x||void 0===x||null===(s=x.ins_estadual)||void 0===s?void 0:s.message,touched:null===j||void 0===j?void 0:j.ins_estadual,maxLength:45,disabled:b,defaultValue:f.insEstadual,ref:v({required:{value:!0,message:"Digite Sua inscri\xe7\xe3o estadual"},minLength:{value:5,message:"No m\xednimo 6 (seis) caracteres"}})})]}),(0,n.jsx)(i.II,{type:"email",name:"email",label:"Seu e-mail",placeholder:"Seu e-mail",error:null===x||void 0===x||null===(c=x.email)||void 0===c?void 0:c.message,touched:null===j||void 0===j?void 0:j.email,defaultValue:f.email,maxLength:72,disabled:b,ref:v({required:{value:!0,message:"Digite seu nome"},minLength:{value:6,message:"No m\xednimo 6 (seis) caracteres"}})}),(0,n.jsx)(i.vy,{mask:"(99) 99999-9999",type:"tel",name:"phone",label:"Seu n\xfamero de celular",placeholder:"(DD) 99999-9999",error:null===x||void 0===x||null===(l=x.phone)||void 0===l?void 0:l.message,touched:null===j||void 0===j?void 0:j.phone,defaultValue:f.phone,ref:v({required:{value:!0,message:"Por favor, preencha seu n\xfamero de celular"}})}),f.isPerson&&(0,n.jsx)(i.vy,{mask:"99/99/9999",type:"text",name:"birthday",label:"Data de nascimento",placeholder:"DD/MM/AAAA",error:null===x||void 0===x||null===(d=x.birthday)||void 0===d?void 0:d.message,touched:null===j||void 0===j?void 0:j.birthday,defaultValue:f.birthday?f.birthday.replace(/[^0-9]+/g,""):"",ref:v({required:{value:!0,message:"Por favor, preencha com sua data de nascimento"}})}),(0,n.jsx)(i.zx,{variant:"primary",type:"submit",loading:b,children:"Atualizar"})]})})}},7758:function(e,t,r){"use strict";r.d(t,{l:function(){return n}});var n="/checkout"},71924:function(e,t,r){"use strict";r.d(t,{e_:function(){return n},sm:function(){return a},qu:function(){return i}});var n="/produto/",a="/experiencia/",i="/produtos/"},35145:function(e,t,r){"use strict";r.d(t,{Z:function(){return n},u8:function(){return a}});var n="/produtores/",a="/produtores"},99870:function(e,t,r){"use strict";r.d(t,{JJ:function(){return n},wi:function(){return a},Y8:function(){return i},JR:function(){return o},L5:function(){return s},in:function(){return c},_H:function(){return l},ai:function(){return u}});var n="/entrar",a="/cadastro",i="/recuperar-senha",o="/alterar-senha",s="/verificar-identidate",c="/minha-conta",l="/cadastro-afiliados",u="/sair"},63395:function(e){e.exports={root:"card-info_root__1vuOV",icon:"card-info_icon__TaT2N",content:"card-info_content__1FPA-",title:"card-info_title__20nan",value:"card-info_value__NuVeg"}},78847:function(e){e.exports={root:"four-inline-cards_root__2JT5Z",container:"four-inline-cards_container__3MBXB",cards:"four-inline-cards_cards__1EP7T",card:"four-inline-cards_card__39KFl",icon:"four-inline-cards_icon__1pVdc",title:"four-inline-cards_title__BDCKX",description:"four-inline-cards_description__3dMAv"}},28569:function(e){e.exports={root:"filter-block_root__1kXWJ",title:"filter-block_title__2zVr-",vertical:"filter-block_vertical__15NAM"}},53529:function(e){e.exports={root:"filter-check-list_root__2VcAM",vertical:"filter-check-list_vertical__3a9cX",title:"filter-check-list_title__1e802",checkbox:"filter-check-list_checkbox__29XrV"}},49990:function(e){e.exports={root:"filter-link_root__ge1u7",vertical:"filter-link_vertical__1avxg",title:"filter-link_title__wD8wm",checkbox:"filter-link_checkbox__2MWsN",subcategory:"filter-link_subcategory__1FoUP",filterLink:"filter-link_filterLink__2refJ"}},37235:function(e){e.exports={root:"accept-cookies_root__j5dFC",content:"accept-cookies_content__3qixs"}},46091:function(e){e.exports={root:"breadcrumb_root__2JED5",list:"breadcrumb_list__1rKFi",separator:"breadcrumb_separator__17SkA",link:"breadcrumb_link__2MBaO"}},60055:function(e){e.exports={root:"delivery-area_root__C5qFR",delivery_area:"delivery-area_delivery_area__2
1yKo7",form:"delivery-area_form__2ICiO",input:"delivery-area_input__Y88DY",button:"delivery-area_button__2-tn2",title:"delivery-area_title__3QRUk",subTitle:"delivery-area_subTitle__1u0n-",footer:"delivery-area_footer__eKtvB",refresh:"delivery-area_refresh__3lzzi",modal_delivery:"delivery-area_modal_delivery__2CapJ"}},86179:function(e){e.exports={root:"footer_root__1lAUH",container:"footer_container__mrLmO",links:"footer_links__3Dnj9",social:"footer_social__2iB_u",socialLinks:"footer_socialLinks__1zYAW",copyright:"footer_copyright__3vZlK",flags:"footer_flags__2ozOr"}},56688:function(e){e.exports={root:"layout_root__3X6_y"}},97274:function(e){e.exports={root:"filter-link_root__FA8At",subcategory:"filter-link_subcategory__2QRL7",filterLink:"filter-link_filterLink__1rn7x"}},96107:function(e){e.exports={root:"navbar_root__37hLZ",header:"navbar_header__3RLBB",logo:"navbar_logo__2rt47",search:"navbar_search__1HHgW",panel:"navbar_panel__2flLS",row:"navbar_row__2Wadi",menu:"navbar_menu__2aRbl",columns:"navbar_columns__1sex8",link:"navbar_link__1Y6lV",categories:"navbar_categories__306fJ",menuCategories:"navbar_menuCategories__2oCKR",desktop:"navbar_desktop__2Re3y",deliveryArea:"navbar_deliveryArea__adQMR",session:"navbar_session__CKei2"}},86865:function(e){e.exports={root:"page-not-found_root__2eeEC",title:"page-not-found_title__2ejBo"}},30792:function(e){e.exports={root:"search_root__aVbZ2",searchInput:"search_searchInput__2iXH3",searchIcon:"search_searchIcon__3cAc1",searchContainer:"search_searchContainer__2iriw"}},20188:function(e){e.exports={root:"cart-button_root__fqIBY",quantity:"cart-button_quantity__29UmY"}},8571:function(e){e.exports={root:"cart-empty_root__2QxaO",title:"cart-empty_title__2Yul2",content:"cart-empty_content__TiZJ_"}},54526:function(e){e.exports={root:"cart-list-item_root__18Ogk",common:"cart-list-item_common__39Dta",clean:"cart-list-item_clean__1WMo4",rightContent:"cart-list-item_rightContent__1_TJb",dropdown:"cart-list-item_dropdown__1xTMS",productImage:"cart-list-item_productImage__30vnI",unitPrice:"cart-list-item_unitPrice__I10VT",productName:"cart-list-item_productName__1RPp8",removeItemFromCart:"cart-list-item_removeItemFromCart__1RFdL",quantity:"cart-list-item_quantity__3h3q8",periodity:"cart-list-item_periodity__2sev6","periodity-m":"cart-list-item_periodity-m__2kVBm",actions:"cart-list-item_actions__3qr5j",price:"cart-list-item_price__URsNd"}},42455:function(e){e.exports={root:"cart-list_root__Iay6y",fullHeight:"cart-list_fullHeight__24gHN",section:"cart-list_section__1ri6e",header:"cart-list_header__14X0h",title:"cart-list_title___XJQC"}},8091:function(e){e.exports={root:"cart-values_root__2t3g8",cards:"cart-values_cards__1N-nB",row:"cart-values_row__bmuk2",label:"cart-values_label__Ww3jU",value:"cart-values_value__3h_Ss",total:"cart-values_total__1vENH",free:"cart-values_free__1gQUv"}},71464:function(e){e.exports={root:"cart-checkout-button_root__2e1I9",error:"cart-checkout-button_error__289L6"}},45193:function(e){e.exports={root:"cart-note_root__20-lR",label:"cart-note_label__3juJ0"}},20767:function(e){e.exports={root:"cart-widget_root__3VQds",backdrop:"cart-widget_backdrop__2Ljyf",content:"cart-widget_content__13yZz",view:"cart-widget_view__1T4k0",buttonClose:"cart-widget_buttonClose__32CkT"}},70152:function(e){e.exports={root:"button-add-to-cart_root__1WXZ3",available_products:"button-add-to-cart_available_products__1gUiA",added:"button-add-to-cart_added__8O2xs",sua_regiao:"button-add-to-cart_sua_regiao__d3f_8",modal_delivery:"button-add-to-cart_modal_delivery__1MQ6o",sua_regiao__button:"button-add-to-cart_sua_regiao__button__GPR_J",options:"button-add-to-cart_options__2FKF9",option:"button-add-to-cart_option__2bbaL"}},6378:function(e){e.exports={root:"product-carousel_root__10H85",carousel:"product-carousel_carousel__3XN1x",title:"product-carousel_title__2RpSC",subtitle:"product-carousel_subtitle__3wc3K",rightContent:"product-carousel_rightContent__W8lBS",header:"product-carousel_header__3vUaX",left:"product-carousel_left__1xzoS"}},60487:function(e){e.exports={root:"product-description_root__xMFX3",title:"product-description_title__344_y",button:"product-description_button__1wXnR"}},72667:function(e){e.exports={root:"product-exp-quantity_root__GT2pK",button:"product-exp-quantity_button__1DYiY",text:"product-exp-quantity_text__2Q-51",dropdown:"product-exp-quantity_dropdown__4E2Rb"}},86918:function(e){e.exports={root:"product-gallery_root__2qFmF",image:"product-gallery_image__3Vduc"}},18094:function(e){e.exports={root:"product-grid_root__1FSOS",header:"product-grid_header__3lj-S",densities:"product-grid_densities___V8sl",order:"product-grid_order__2Dlb-",productListGrid:"product-grid_productListGrid__xK_3Z",button:"product-grid_button__8T5S8",active:"product-grid_active__58GNB"}},6004:function(e){e.exports={root:"product-image_root__Oyin8"}},58675:function(e){e.exports={root:"product-price_root__21VGj",priceSymbol
1:"product-price_priceSymbol__1PXrH"}},13604:function(e){e.exports={root:"product-quantity_root__m9fvY",button:"product-quantity_button__2F1ph",text:"product-quantity_text__2gFgX",dropdown:"product-quantity_dropdown___FumE"}},12364:function(e){e.exports={root:"product-card_root__1PVLq",footer:"product-card_footer__3oX8v",image:"product-card_image__1Gfhi",title:"product-card_title__LP5z8",buy:"product-card_buy__3BqTg",euQuero:"product-card_euQuero__1r7TX",mobileFooter:"product-card_mobileFooter__1k8Fp",tag:"product-card_tag__15aR_",frete_gratis:"product-card_frete_gratis__14BH1",priceTag:"product-card_priceTag__JtZk3",unavailable_text:"product-card_unavailable_text__3dIjl",unavailable:"product-card_unavailable__39NPQ",footerDesktop:"product-card_footerDesktop__3gVQj",onlyWide:"product-card_onlyWide__1lgxj",onlyDesktop:"product-card_onlyDesktop__2c2LI",favoriteStar:"product-card_favoriteStar__2AWzg","favoriteStar--empty":"product-card_favoriteStar--empty__3DVM6"}},66476:function(e){e.exports={root:"product-event-view_root__1J_qJ",content:"product-event-view_content__3oMnK",description:"product-event-view_description__2ljb2",aside:"product-event-view_aside__tqXXz",gallery:"product-event-view_gallery__3Ibgk",image:"product-event-view_image__2qTY5",title:"product-event-view_title__-T78U",iframe:"product-event-view_iframe__1sOnF",ticket:"product-event-view_ticket__1Bs0E",ticketInfo:"product-event-view_ticketInfo__13WcU",ticketDate:"product-event-view_ticketDate__meBfl",ticketPrice:"product-event-view_ticketPrice__2h0er",ticketDescription:"product-event-view_ticketDescription__wiOmm",ticketFinalPrice:"product-event-view_ticketFinalPrice__3y0jp",ticketFinalPriceTotal:"product-event-view_ticketFinalPriceTotal__2Rz3M",line:"product-event-view_line__3W_If",section:"product-event-view_section__ED5gH",food:"product-event-view_food__4mHRS"}},6675:function(e){e.exports={root:"product-grid-with-seller_root__334Jw",seller:"product-grid-with-seller_seller__1jegk",header:"product-grid-with-seller_header__1BV53",new:"product-grid-with-seller_new__3KgyW",banner:"product-grid-with-seller_banner__b7jJG",firstLine:"product-grid-with-seller_firstLine__3TG_M",line:"product-grid-with-seller_line__1mk3R"}},21298:function(e){e.exports={root:"product-list-view_root__30QAi",filters:"product-list-view_filters__LAZ36",grid:"product-list-view_grid__nnAgJ",pagination:"product-list-view_pagination__1_BIj",filtersVisible:"product-list-view_filtersVisible__UTGDC",closeFilters:"product-list-view_closeFilters__ha-zW",buttonFilter:"product-list-view_buttonFilter__2B2k_",filterMobile:"product-list-view_filterMobile__HBre0",filterMobileRow:"product-list-view_filterMobileRow__28xXm",filterMobileVisible:"product-list-view_filterMobileVisible__3wtpU",filterMobileTitle:"product-list-view_filterMobileTitle__1b8eX",productNotFoundMobile:"product-list-view_productNotFoundMobile__1rDIr"}},29747:function(e){e.exports={root:"product-view_root__1kWQl",gallery:"product-view_gallery__3WALM",favoriteStar:"product-view_favoriteStar__1XGnE","favoriteStar--empty":"product-view_favoriteStar--empty__3dwzf",info:"product-view_info__2KrGn",name:"product-view_name__1wkGJ",categories:"product-view_categories__HNX53",description:"product-view_description__2PHjR",cta:"product-view_cta__VKMej",seller:"product-view_seller__2d6CE",title:"product-view_title__zFYKd",days:"product-view_days__1rUBX",outOfStock:"product-view_outOfStock__1JRyI",free:"product-view_free__3jLxO"}},20635:function(e){e.exports={root:"seller-card_root__3RLO8",avatar:"seller-card_avatar__UijdQ",info:"seller-card_info__2icCI",title:"seller-card_title__1pc-c",description:"seller-card_description__Kq_SK",products:"seller-card_products__Rt_Bx"}},79688:function(e){e.exports={root:"seller-grid_root__2t3wR"}},23026:function(e){e.exports={root:"seller-inline_root__2vNRT",avatar:"seller-inline_avatar__3ayyh",name:"seller-inline_name__39fAo",pre:"seller-inline_pre__IqHrW"}},77219:function(e){e.exports={root:"seller-profile_root__2ASY3",content:"seller-profile_content__2cVZZ",header:"seller-profile_header__347MG",avatar:"seller-profile_avatar__3Pu-j",titleHeader:"seller-profile_titleHeader__3a6rT",info:"seller-profile_info__3RzgS",title:"seller-profile_title__1pXrP",description:"seller-profile_description__1uG0R",items:"seller-profile_items__3QqAA",item:"seller-profile_item__hc1ym",crop:"seller-profile_crop__2Tq_0"}},75147:function(e){e.exports={root:"change-password_root__WayR_"}},87522:function(e){e.exports={root:"change-password_root__1GBMp",labelCheckBox:"change-password_labelCheckBox__2MQxY"}},35796:function(e){e.exports={root:"create-user_root__3vkDb",title:"create-user_title__2sKfc",form:"create-user_form__2-RE5",typePerson:"create-user_typePerson__15NYQ",labelCheckBox:"create-user_labelCheckBox__6d-Ms",back:"create-user_back__gqiDm"}}
1,47584:function(e){e.exports={root:"recover-password-verify_root__1uPE9",title:"recover-password-verify_title__17zT8",form:"recover-password-verify_form__1ag55",back:"recover-password-verify_back__3RHvU"}},67736:function(e){e.exports={root:"recover-password_root__1yrqM",title:"recover-password_title__2sX1O",form:"recover-password_form__sD4Ps",back:"recover-password_back__3YQA1",forceChangePassword:"recover-password_forceChangePassword__jcjs0"}},27233:function(e){e.exports={root:"sign-in_root__2X4oy",title:"sign-in_title__3cF_t",form:"sign-in_form__3lphF",signUp:"sign-in_signUp__2XVT-",forgotPassword:"sign-in_forgotPassword__3qIjQ"}},63821:function(e){e.exports={root:"user-session-button_root__NMHba",logout:"user-session-button_logout__dUUxk",link:"user-session-button_link__1WeDF"}}}]);
2//# sourceMappingURL=3412-b93bb3a4519d4018baa8.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.