1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[887],{89526:function(t,e,n){"use strict";var r,i=n(67294);function o(){return o=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o.apply(null,arguments)}e.Z=function(t){return i.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",width:8.942,height:8.942},t),r||(r=i.createElement("path",{"data-name":"Icon ionic-ios-add",d:"M8.386 3.914H5.028V.557a.557.557 0 10-1.113 0v3.358H.557a.557.557 0 000 1.113h3.358v3.358a.557.557 0 101.113 0V5.028h3.358a.557.557 0 100-1.113z"})))}},59425:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/CustomerOrderList",function(){return n(90941)}])},42515:function(t,e,n){"use strict";n.d(e,{x:function(){return _}});var r=n(14924),i=n(26042),o=n(69396),s=n(99534),a=n(85893),c=(n(67294),n(34667)),l=n.n(c),u=n(88069),d=n(93967),p=n.n(d),_=function(t){var e,n=t.customColor,c=t.disabled,d=t.className,_=(0,s.Z)(t,["customColor","disabled","className"]);return(0,a.jsx)(u.z,(0,o.Z)((0,i.Z)({className:p()(l().text,d,(e={},(0,r.Z)(e,l()["text--".concat(n)],!!n&&!c),(0,r.Z)(e,l()["text--disabled"],c),e)),disabled:c},_),{children:_.children}))}},58715:function(t,e,n){"use strict";var r=n(14924),i=n(85893),o=n(93967),s=n.n(o),a=n(74744),c=n.n(a);e.Z=function(t){return(0,i.jsx)("div",{className:s()(c()["activity-indicator"],(0,r.Z)({},c()["activity-indicator__center"],!!t.center)),children:"ellipsis"===t.indicatorType?(0,i.jsx)("div",{className:c()["ellipsis-indicator"],children:[1,2,3,4].map((function(t){return(0,i.jsx)("div",{},t)}))}):(0,i.jsx)("div",{className:c()["roller-indicator"],children:[1,2,3,4,5,6,7,8].map((function(t){return(0,i.jsx)("div",{},t)}))})})}},63401:function(t,e,n){"use strict";n.d(e,{k:function(){return u}});var r=n(85893),i=n(67294),o=n(73935),s=n(89526),a=n(40771),c=n(23303),l=n.n(c),u=function(t){var e=t.title,n=t.addButton,c=t.leftContent,u=(0,i.useState)(),d=u[0],p=u[1];(0,i.useEffect)((function(){p(document.getElementById("myAccountContainerTop"))}),[]);var _=(0,i.useMemo)((function(){return(0,r.jsxs)("div",{className:l()["my-account-right-content-top"],children:[(0,r.jsxs)("div",{className:l()["my-account-right-content-top__left"],children:[(0,r.jsx)("h2",{className:l()["my-account-right-content-top__title"],children:e}),c]}),n&&(0,r.jsx)("div",{className:l()["my-account-right-content-top__right"],children:(0,r.jsx)(a.J,{onClick:n.onClick,icon:(0,r.jsx)("div",{className:l()["my-account-right-content-top__button-icon"],children:(0,r.jsx)(s.Z,{})}),customColor:"success",children:n.title})})]})}),[e,n,c]);return d?(0,o.createPortal)(_,d):(0,r.jsx)(r.Fragment,{})}},46867:function(t,e,n){"use strict";n.d(e,{L:function(){return a}});var r=n(85893),i=n(42515),o=n(44515),s=n.n(o),a=function(t){var e=t.onClick;return(0,r.jsxs)("div",{className:s().reload,children:[(0,r.jsx)("span",{className:s()["reload-title"],children:"Ocorreu um erro inesperado!"}),(0,r.jsx)("span",{className:s()["reload-message"],children:"Recarregue a p\xe1gina ou pressione F5"}),(0,r.jsx)(i.x,{onClick:function(){return(null===e||void 0===e?void 0:e())||location.reload()},customColor:"underlined",children:"Tentar novamente"})]})}},4233:function(t,e,n){"use strict";n.d(e,{A:function(){return c}});var r=n(26042),i=n(69396),o=n(99534),s=n(85893),a=n(78641);function c(t){var e=t.style,n=(0,o.Z)(t,["style"]);return(0,s.jsx)(a.Z,(0,i.Z)((0,r.Z)({},n),{style:(0,r.Z)({textDecoration:"underline",background:"none",width:"fit-content"},e)}))}},19599:function(t,e,n){"use strict";n.d(e,{Z:function(){return d}});var r=n(26042),i=n(7297),o=n(85893),s=n(70917),a=n(16829);function c(){var t=(0,i.Z)(["\n 0% {\n background-position: -200% 0;\n }\n 100% {\n background-position: 200% 0;\n }\n"]);return c=function(){return t},t}var l=(0,s.F4)(c()),u=(0,a.Z)("div")((function(t){var e=t.width,n=t.height;return{background:"linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%)",backgroundSize:"200% 100%",animation:"".concat(l," 1.5s infinite"),width:e||"100%",height:n||16}}));function d(t){return(0,o.jsx)(u,(0,r.Z)({},t))}},90941:function(t,e,n){"use strict";n.r(e),n.d(e,{__N_SSP:function(){return dt},default:function(){return pt}});var r,i=n(26042),o=n(69396),s=n(85893),a=n(27352),c=n(36858),l=n(16829),u=n(67294);function d(){return d=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},d.apply(null,arguments)}var p=function(t){return u.createElement("svg",d({width:8,height:4,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),r||(r=u.createElement("path",{d:"M4 4L0 0h8L4 4z",fill:"#232323"})))},_=(0,l.Z)("div")({position:"relative",display:"inline-block"}),h=(0,l.Z)("div")({cursor:"pointer"}),v=(0,l.Z)("div")((function(t){var e=t.isOpen;return{position:"absolute",top:"calc(100% + 8px)",right:0,background:"#FFF",border:"1px solid #DFDFDF",borderRadius:3,boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.1)",zIndex:1e3,opacity:e?1:0,visibility:e?"visible":"hidden",transform:e?"translateY(0)":"translateY(-10px)",transition:"opacity 0.2s, transform 0.2s, visibility 0.2s",width:"max-content",maxHeight:"253px",overflowY:"auto"}}));function m(t){var e=t.trigger,n=t.children,r=t.isOpen,i=t.onOpenChange,o=(0,u.useState)(!1),a=o[0],c=o[1],l=(0,u.useRef)(null),d=void 0!==r?r:a,p=i||c;(0,u.useEffect)((function(){if(d){var t=function(t){l.current&&!l.current.contains(t.target)&&p(!1)};return document.addEventListener("mousedown",t),function(){return document.removeEventListener("mousedown",t)}}}),[d,p]);return(0,s.jsxs)(_,{ref:l,children:[(0,s.jsx)(h,{onClick:function(){p(!d)},children:e}),(0,s.jsx)(v,{isOpen:d,children:n})]})}var f,x=n(73085);function g(){return g=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},g.apply(null,arguments)}var y=function(t){return u.createElement("svg",g({width:16,height:14,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),f||(f=u.createElement("path",{d:"M6 0a3 3 0 00-2.83 2H0v2h3.17a3.001 3.001 0 005.66 0H16V2H8.83A3 3 0 006 0zM5 3a1 1 0 112 0 1 1 0 01-2 0zm5 5a3 3 0 00-2.83 2H0v2h7.17a3 3 0 005.66 0H16v-2h-3.17A3 3 0 0010 8zm-1 3a1 1 0 112 0 1 1 0 01-2 0z",fill:"#232323"})))},b=(0,u.createContext)(null);function j(){var t=(0,u.useContext)(b);if(!t)throw new Error("useCustomerOrdersContext must be used within a CustomerOrdersContextProvider");return t}var Z=n(29815),C=n(40925);function w(t,e){return"".concat(t.toISOString(),",").concat(e.toISOString())}function O(t,e){return new Date(Date.UTC(t,e,1,0,0,0,0))}function F(t,e){return new Date(Date.UTC(t,e+1,0,23,59,59,999))}function N(t){var e=(new Date).getFullYear()-1,n=e-t+1;return Array.from({length:n},(function(t,n){return function(t){return{value:w(O(t,0),F(t,11)),label:t.toString()}}(e-n)}))}
1var A=(0,l.Z)("button")({display:"flex",alignItems:"center",gap:10,padding:"8px 16px",borderRadius:3,cursor:"pointer",transition:"0.2s","@media (max-width: 1024px)":{padding:"8px 16px 8px 0"}}),k=(0,l.Z)(p)((function(t){return{transition:"0.3s",transform:t.isOpen?"rotate(180deg)":""}})),T=(0,l.Z)("ul")({listStyle:"none",padding:0,margin:0}),R=(0,l.Z)("li")((function(t){return{padding:"12px 16px",cursor:"pointer",transition:"0.2s",background:t.selected?"#F1F9FF":"#FFFFFF",":hover":{background:"#F5F5F5"},":not(:last-of-type)":{borderBottom:"1px solid #F0F0F0"}}}));function E(t){var e=t.onFilterChange,n=t.selectedFilter,r=void 0===n?"all":n,i=(0,u.useState)(!1),o=i[0],a=i[1],c=function(){var t=(0,C.useGetCustomer)().data;return(0,u.useMemo)((function(){var e=new Date,n=e.getUTCFullYear(),r=e.getUTCMonth(),i={currentMonth:w(O(n,r),F(n,r)),lastMonth:w(O(0===r?n-1:n,0===r?11:r-1),F(0===r?n-1:n,0===r?11:r-1)),currentYear:w(O(n,0),F(n,11))},o=[{value:"all",label:"Todas"},{value:i.currentMonth,label:"Este m\xeas"},{value:i.lastMonth,label:"M\xeas passado"},{value:i.currentYear,label:"Esse ano"}];if(!(null===t||void 0===t?void 0:t.createdAt))return{ranges:i,filterOptions:o};var s=N(new Date(t.createdAt).getFullYear());return{ranges:i,filterOptions:(0,Z.Z)(o).concat((0,Z.Z)(s))}}),[null===t||void 0===t?void 0:t.createdAt])}().filterOptions,l=c.find((function(t){return t.value===r}));return(0,s.jsx)(m,{isOpen:o,onOpenChange:a,trigger:(0,s.jsxs)(A,{children:[(0,s.jsx)(y,{}),(0,s.jsx)(x.Z,{variant:"body2",children:(null===l||void 0===l?void 0:l.label)||"Todas"}),(0,s.jsx)(k,{isOpen:o})]}),children:(0,s.jsx)(T,{children:c.map((function(t){return(0,s.jsx)(R,{selected:r===t.value,onClick:function(){return n=t.value,null===e||void 0===e||e(n),void a(!1);var n},children:(0,s.jsx)(x.Z,{variant:"body2",children:t.label})},t.value)}))})})}var I=n(19599),S=n(11163),M=(0,l.Z)("div")({display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:17.5,"@media (max-width: 1024px)":{marginTop:17.5,margin:"17.5px auto",width:"95%"}}),z=(0,l.Z)("div")({display:"flex",gap:4,alignItems:"center"});function L(){var t=j(),e=t.total,n=t.isFetching,r=(0,S.useRouter)(),i=r.query,o=r.push,a=(0,u.useState)("all"),c=a[0],l=a[1];(0,u.useEffect)((function(){var t=i.createdAt;l(t||"all")}),[i.createdAt]);return(0,s.jsxs)(M,{children:[(0,s.jsx)(E,{selectedFilter:c,onFilterChange:function(t){l(t),"all"===t?delete i.createdAt:i.createdAt=t,o({pathname:"/customer/orders",query:i},void 0,{shallow:!0})}}),n?(0,s.jsx)(I.Z,{width:75}):(0,s.jsxs)(z,{children:[(0,s.jsx)(x.Z,{variant:"body2",fontWeight:500,children:(0,s.jsx)("b",{children:e})}),(0,s.jsx)(x.Z,{variant:"body2",color:"#31303095",children:1===e?"registro":"registros"})]})]})}var P=n(2110),D=n(44650),q=n(43458),Y=(n(89830),n(19154)),H=n(45350),W=(0,l.Z)("div")({display:"flex",justifyContent:"center",alignItems:"center",gap:16,marginTop:32,"& .rc-pagination-item":{backgroundColor:"transparent",border:"none",a:{transition:"0.3s",border:"1px solid transparent",borderRadius:3,color:"#23232399","&:hover":{color:"#23232399",background:"#2323231A",borderColor:"#000"}}},"& .rc-pagination-item-active":{a:{fontWeight:500,background:"#2323231A",color:"#232323E5","&:hover":{color:"#232323E5"}}}}),B=(0,l.Z)(p)((function(t){return{transition:"0.3s",transform:t.isOpen?"rotate(180deg)":""}})),V=function(t){var e=t.selectProps;return(0,s.jsx)(H.c.DropdownIndicator,(0,o.Z)((0,i.Z)({},t),{children:(0,s.jsx)(B,{isOpen:e.menuIsOpen})}))},U={control:function(t){return(0,o.Z)((0,i.Z)({},t),{minWidth:100,border:"1px solid #d9d9d9",borderRadius:3,boxShadow:"none",cursor:"pointer","&:hover":{borderColor:"#000"}})},option:function(t,e){return(0,o.Z)((0,i.Z)({},t),{cursor:"pointer",backgroundColor:e.isSelected?"#E6F4FF":e.isFocused?"#f5f5f5":"white",color:"#232323",fontSize:14,"&:active":{backgroundColor:"#2323231A"}})},singleValue:function(t){return(0,o.Z)((0,i.Z)({},t),{fontSize:14,padding:"10px 5px"})},indicatorSeparator:function(){return{display:"none"}},dropdownIndicator:function(t){return(0,o.Z)((0,i.Z)({},t),{padding:15,color:"#232323","&:hover":{color:"#000"}})}};function J(t){var e=t.total,n=(0,S.useRouter)(),r=n.asPath.split("?")[0],a=Number(n.query.page)||1,c=Number(n.query.size)||15,l=[{value:"15",label:"15"},{value:"30",label:"30"},{value:"45",label:"45"},{value:"60",label:"60"}];return!e||e<=15?null:(0,s.jsxs)(W,{children:[(0,s.jsx)(q.Z,{current:a,total:e,pageSize:c,onChange:function(t){n.push({pathname:r,query:(0,o.Z)((0,i.Z)({},n.query),{page:t})},void 0,{shallow:!0})},prevIcon:(0,s.jsx)(P.Z,{}),nextIcon:(0,s.jsx)(D.Z,{}),showTitle:!1,showPrevNextJumpers:!1}),(0,s.jsx)(Y.ZP,{options:l,value:l.find((function(t){return t.value===c.toString()})),onChange:function(t){return function(t){var e=Number(t);n.push({pathname:r,query:(0,o.Z)((0,i.Z)({},n.query),{size:e,page:1})},void 0,{shallow:!0})}((null===t||void 0===t?void 0:t.value)||"15")},isMulti:!1,styles:U,isSearchable:!1,components:{DropdownIndicator:V}})]})}var X=n(63401),G=n(41664),K=n.n(G),Q=n(46867),$=n(68909),tt=n(43116),et=n.n(tt),nt=n(4233),rt=n(58715),it=function(t){var e=j(),n=e.orders,r=e.isFetching,i=e.isError,o=(0,S.useRouter)(),a=o.query,c=o.push;return r?(0,s.jsx)("div",{className:et()["customer-orders-list__empty"],children:(0,s.jsx)(rt.Z,{indicatorType:"ellipsis"})}):i?(0,s.jsx)("div",{className:et()["customer-orders-list__error"],children:(0,s.jsx)(Q.L,{})}):n.length?(0,s.jsx)("div",{className:et()["customer-orders-list__content"],
1children:n.map((function(t){return(0,s.jsx)($.k,{order:t},t.id)}))}):a?(0,s.jsxs)("div",{className:et()["customer-orders-list__empty"],children:[(0,s.jsx)(x.Z,{fontWeight:500,color:"#232323E5",children:"N\xe3o foram encontrados resultados para sua busca."}),(0,s.jsx)(nt.A,{onClick:function(){c("/customer/orders",void 0,{shallow:!0})},style:{color:"#004BA2",fontWeight:500,textDecoration:"none"},children:"Limpar busca"})]}):(0,s.jsxs)("div",{className:et()["customer-orders-list__empty"],children:[(0,s.jsx)("span",{children:"Voc\xea ainda n\xe3o realizou nenhum pedido,"}),(0,s.jsxs)("span",{children:[(0,s.jsx)(K(),{href:"/",children:(0,s.jsx)("a",{className:et()["customer-orders-list__action"],children:"fa\xe7a sua primeira compra"})}),"."]})]})};function ot(){var t=j().total;return(0,s.jsxs)("div",{className:et()["customer-orders-list"],children:[(0,s.jsx)(X.k,{title:"Meus pedidos"}),(0,s.jsx)(L,{}),(0,s.jsxs)("div",{className:et()["customer-orders-list__summary"],children:[(0,s.jsx)("span",{children:"Data do pedido"}),(0,s.jsx)("span",{children:"N\xba do pedido"}),(0,s.jsx)("span",{children:"Valor total"}),(0,s.jsx)("span",{children:"Status"})]}),(0,s.jsx)(it,{}),(0,s.jsx)(J,{total:t})]})}var st=n(31799),at=n(51911),ct=n.n(at),lt=n(12129);function ut(t){var e=t.children,n=(0,S.useRouter)(),r=n.query.createdAt,i=n.query.page,o=n.query.size,a=n.query.query,c=(0,lt.Y)(void 0,{createdAt:r,page:Number(i)||1,size:Number(o)||15,query:a}),l=c.data,u=c.isFetching,d=c.isLoading,p=c.refetch,_=c.isError;return(0,s.jsx)(b.Provider,{value:{orders:(null===l||void 0===l?void 0:l.items)||[],total:(null===l||void 0===l?void 0:l.total)||0,isFetching:u,isLoading:d,refetch:p,isError:_},children:e})}var dt=!0,pt=function(t){return(0,s.jsxs)(a.ZP,(0,o.Z)((0,i.Z)({},t),{children:[(0,s.jsx)(st.Z,{title:"Pedidos"}),(0,s.jsx)(c.R,{children:(0,s.jsx)(ut,{children:(0,s.jsx)("div",{className:ct()["customer-order-list"],children:(0,s.jsx)(ot,{})})})})]}))}},34667:function(t){t.exports={text:"Text_text__OvD6l","text--success":"Text_text--success__32Ti6","text--error":"Text_text--error__h2FvX","text--underlined":"Text_text--underlined__rYkoY","text--disabled":"Text_text--disabled__Hh0xQ",pulse:"Text_pulse__Pktce","image-pulse":"Text_image-pulse__87T45",shine:"Text_shine__OfNa4"}},74744:function(t){t.exports={"activity-indicator__center":"ActivityIndicator_activity-indicator__center__D5WRb","activity-indicator":"ActivityIndicator_activity-indicator__eVHnw","roller-indicator":"ActivityIndicator_roller-indicator__6W6CO","ellipsis-indicator":"ActivityIndicator_ellipsis-indicator__h0AvU","ellipsis-indicator1":"ActivityIndicator_ellipsis-indicator1__QKE67","ellipsis-indicator2":"ActivityIndicator_ellipsis-indicator2__4na8u","ellipsis-indicator3":"ActivityIndicator_ellipsis-indicator3__3gRYq",pulse:"ActivityIndicator_pulse__otN_Z","image-pulse":"ActivityIndicator_image-pulse__HlV_F",shine:"ActivityIndicator_shine__8z3Bm"}},23303:function(t){t.exports={"my-account-right-content-top":"MyAccountRightContentTop_my-account-right-content-top__ORzeg","my-account-right-content-top__left":"MyAccountRightContentTop_my-account-right-content-top__left__5vkL8","my-account-right-content-top__right":"MyAccountRightContentTop_my-account-right-content-top__right__tMWO3","my-account-right-content-top__button-icon":"MyAccountRightContentTop_my-account-right-content-top__button-icon__zMIBY",pulse:"MyAccountRightContentTop_pulse__RPJCk","image-pulse":"MyAccountRightContentTop_image-pulse__P8Lmo",shine:"MyAccountRightContentTop_shine__Wyxck"}},44515:function(t){t.exports={reload:"Reload_reload__71flE","reload-title":"Reload_reload-title__SuOzf","reload-message":"Reload_reload-message__Zbmv4",pulse:"Reload_pulse__Rb9ha","image-pulse":"Reload_image-pulse__2FPJB",shine:"Reload_shine__1DKut"}},43116:function(t){t.exports={"customer-orders-list__summary":"CustomerOrdersList_customer-orders-list__summary__ryvyu","customer-orders-list__content":"CustomerOrdersList_customer-orders-list__content__kCxi9","customer-orders-list__empty":"CustomerOrdersList_customer-orders-list__empty__ydokW","customer-orders-list__action":"CustomerOrdersList_customer-orders-list__action__cg_oN","customer-orders-list__button-icon":"CustomerOrdersList_customer-orders-list__button-icon__62eIr","customer-orders-list__error":"CustomerOrdersList_customer-orders-list__error__wUtYG",pulse:"CustomerOrdersList_pulse__gzvsN","image-pulse":"CustomerOrdersList_image-pulse__r8HAv",shine:"CustomerOrdersList_shine__NbRUs"}}},function(t){t.O(0,[714,800,178,665,623,182,7,252,766,243,20,97,382,774,888,179],(function(){return e=59425,t(t.s=e);var e}));var e=t.O();_N_E=e}]);
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.