PageSourceSearch

https://loja.nissan.com.br/_next/static/chunks/4101-ca928399ad073f30.js

js nissan.com.br collected 2026-10-02 10:49:54 UTC 14,637 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4101],{85615:function(e,t,n){var r=n(85893);t.Z=function(e){var t=e.children;return(0,r.jsx)("tbody",{children:t})}},23309:function(e,t,n){n.d(t,{Z:function(){return r.Z}});var r=n(85615)},7282:function(e,t,n){var r=n(59499),i=n(85893);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=e.children,n=e.styles;return(0,i.jsx)("td",{style:o({width:null===n||void 0===n?void 0:n.width,minWidth:null!==n&&void 0!==n&&n.minWidth?n.minWidth:0,position:null!==n&&void 0!==n&&n.position?n.position:"static",verticalAlign:"middle",padding:"1.5rem 2rem 1.5rem 0rem",color:"#5C5C5C",textAlign:"left"},n),children:t})}},72735:function(e,t,n){n.d(t,{Z:function(){return r.Z}});var r=n(7282)},66714:function(e,t,n){var r=n(50029),i=n(87794),s=n.n(i),o=n(3712),c=n(90092),a=n(70647),l=n(38488),d=n(73636),u=n(67294),p=n(83461),h=n(20930),x=n(85893);t.Z=function(e){var t=e.thItemProp,n=e.add,i=e.modal,f=e.handleAdd,m=e.sortConfig,j=e.onHeaderClick,g=e.exportCsv,v=e.data,y=e.slicedData,w=e.onOpenInfos,b=e.activatedFilter,O=e.dontShowStatus,C=e.dontShowEdit,S=(0,u.useRef)(),E=(0,u.useState)([]),Z=E[0],k=E[1],A=function(){var e=(0,r.Z)(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!b){e.next=6;break}return w(),e.next=4,k(y);case 4:e.next=8;break;case 6:return e.next=8,k(v);case 8:S.current.link.click();case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),W=function(e,t){return(Number(e.replace("px",""))+50)/t+"px"};return(0,u.useEffect)((function(){k(v)}),[]),(0,x.jsx)("thead",{children:(0,x.jsxs)("tr",{style:{height:"65px",verticalAlign:"middle"},children:[t.map((function(e,t){return("text"===e.type||i)&&(0,x.jsx)("th",{style:{width:e.width,minWidth:W(e.width,2),textAlign:"left",paddingRight:"2rem",fontSize:"0.875rem",fontWeight:"700",color:"#636363"},children:e.name},t)||"icon"===e.type&&(0,x.jsx)("th",{style:{width:e.width,minWidth:W(e.width,2),textAlign:e.textAlign,paddingRight:"2rem",fontSize:"0.875rem",fontWeight:"700",color:"#636363"},children:e.name&&(0,x.jsxs)(o.K,{direction:"row",alignItems:"center",children:[(0,x.jsx)(c.x,{children:e.name}),(0,x.jsx)(a.E,{width:"10px",height:"max-content",ml:"4px",src:e.url,alt:e.altTitle,title:e.altTitle})]})||(0,x.jsxs)(l.z,{background:"none!important",p:"0",minW:"0",h:"15px",fontSize:"0.875rem",fontWeight:"700",color:"#636363",children:[e.name,(0,x.jsx)(a.E,{ml:"4px",src:e.url,alt:e.altTitle,title:e.altTitle})]})},t)||"filter"===e.type&&!i&&(0,x.jsx)("th",{style:{width:e.width,minWidth:W(e.width,2),textAlign:"left",paddingRight:"2rem",fontSize:"0.875rem",fontWeight:"700",color:"#636363"},onClick:function(){return j(e.filterName)},children:(0,x.jsxs)(l.z,{background:"none!important",p:"0",fontSize:"0.875rem",fontWeight:"700",color:"#636363",_hover:{"&>Img":{opacity:1}},children:[(0,x.jsx)(c.x,{children:e.name}),(0,x.jsx)(a.E,{mt:"-2px",ml:"4px",src:e.url,alt:e.altTitle,title:e.altTitle,opacity:"0",transform:(null===m||void 0===m?void 0:m.column)===e.filterName&&"ascending"===(null===m||void 0===m?void 0:m.direction)?"rotate(180deg)":"rotate(0deg)"})]})},t)})),!O&&(0,x.jsx)("th",{style:{width:"100px",textAlign:"left",paddingRight:"2rem",fontSize:"0.875rem",fontWeight:"700",color:"#636363"},children:"Status"}),!i&&!C&&(0,x.jsx)("th",{style:{width:"150px",textAlign:"left",paddingRight:"2rem",fontSize:"0.875rem",fontWeight:"700",color:"#636363"},children:"Editar"}),n&&(0,x.jsx)("th",{style:{width:"50px",textAlign:"right",minWidth:"50px"},children:(0,x.jsx)(l.z,{onClick:f,background:"none!important",p:"0",minW:"15px",h:"15px",children:(0,x.jsx)(a.E,{src:"/assets/icons/add.png"})})}),g&&(0,x.jsxs)("th",{style:{width:"200px",textAlign:"right",minWidth:"100px",paddingTop:"2px",paddingLeft:"15px"},children:[(0,x.jsx)(p.CSVLink,{asyncOnClick:!0,data:(0,h.xb)(Z)?v:Z,headers:t,ref:S}),(0,x.jsx)(l.z,{variant:"unstyled",onClick:A,children:(0,x.jsxs)(d.U,{fontSize:"12px",children:[(0,x.jsx)(c.x,{children:"Exportar"}),(0,x.jsx)(a.E,{width:"10px",src:"/assets/icons/exportCsv.svg"})]})})]})]})})}},36031:function(e,t,n){n.d(t,{Z:function(){return r.Z}});var r=n(66714)},71159:function(e,t,n){var r=n(67294),i=n(72735),s=n(59860),o=n(3712),c=n(43413),a=n(90092),l=n(38488),d=n(70647),u=n(68029),p=n(85893);t.Z=function(e){var t=e.children,n=e.rowIndex,h=e.data,x=e.exclude,f=e.add,m=e.modal,j=e.handleEdit,g=e.onOpenConfirmDelete,v=e.getStatusValue,y=e.isEdit,w=e.exportCsv,b=e.dontShowStatus,O=e.dontShowEdit,C=Boolean(null===h||void 0===h?void 0:h.status)?"1":"2",S=y?C:"2",E=(0,r.useState)(S),Z=E[0],k=E[1];return(0,r.useEffect)((function(){m&&v(Z)}),[Z]),(0,p.jsx)(p.Fragment,{children:(0,p.jsxs)("tr",{style:{borderTop:"2px solid",borderColor:0===n?"#636363":"#efefef"},children:[t,m?!b&&(0,p.jsx)(i.Z,{styles:{width:"100px"},children:(0,p.jsx)(s.E,{onChange:k,value:Z,children:(0,p.jsxs)(o.K,{direction:"column",children:[(0,p.jsx)(c.Y,{value:"1",children:"Ativo"}),(0,p.jsx)(c.Y,{value:"2",children:"Inativo"})]})})}):!b&&(0,p.jsx)(i.Z,{styles:{width:"100px"},children:(0,p.jsx)(a.x,{children:null!==h&&void 0!==h&&h.status?"Ativo":"Inativo"})}),(0,p.jsx)(i.Z,{styles:{width:"200px",display:m?"none":"table-cell"},children:(0,p.jsxs)(o.K,{direction:"row",children:[!m&&!O&&(0,p.jsx)(l.z,{onClick:function(){return j(h)},width:"17px",height:"17px",background:"none!important",p:"0",minW:"0",border:"1px solid",borderColor:"#000",borderRadius:"50%",children:(0,p.jsx)(d.E,{src:"/assets/icons/edit.png"})}),x&&!h.excludeException&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(u.x,{w:"8px"}),(0,p.jsx)(l.z,{onClick:function(){return g(h.id)},width:"17px",height:"17px",background:"none!important",p:"0",minW:"0",border:"1px solid",borderColor:"#000",borderRadius:"50%",marginLeft:"8px",children:(0,p.jsx)(d.E,{src:"/assets/icons/deleteCross.png"})})]})]})}),f&&(0,p.jsx)(i.Z,{style:{width:"50px",minWidth:"50px",textAlign:"right"}}),w&&(0,p.jsx)(i.Z,{style:{width:"200px",minWidth:"200px",textAlign:"right"}})]})})}},23895:function(e,t,n){n.d(t,{Z:function(){return r.Z}});var r=n(71159)},81326:function(e,t,n){n.d(t,{Z:function(){return p}});n(67294);var r=n(5490),i=n(34614),s=n(61571),o=n(70010),c=n(3712),a=n(38488),l=n(58267),d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200;return"".concat((e.reduce((function(e,t){var n;return e+Number(null===t||void 0===t||null===(n=t.width)||void 0===n?void 0:n.replace("px",""))}),0)+t)/16,"rem")},u=n(85893);var p=function(e){var t=e.isOpenActions,n=e.onCloseActions,p=e.children,h=e.handleSave,x=e.thItemProp,f=e.extra,m=e.width;return(0,u.jsxs)(r.u_,{isOpen:t,onClose:n,closeOnOverlayClick:!1,isCentered:!0,children:[(0,u.jsx)(i.Z,{}),(0,u.jsx)(s.h,{maxW:d(x,f),background:"#fff",ml:"2rem",mr:"2rem",p:"1rem",w:m,children:(0,u.jsxs)(o.f,{children:[(0,u.jsx)(l.Z,{children:p}),(0,u.jsxs)(c.K,{direction:["column","row","row","row"],justifyContent:"flex-end",borderTop:"2px solid",borderColor:"#efefef",paddingTop:"1rem",children:[(0,u.jsx)(a.z,{onClick:h,w:["100%","100%","115px","115px"],variant:"mini-filled-btn",children:"Salvar"}),(0,u.jsx)(a.z,{w:["100%","100%","115px","115px"],variant:"mini-empty-btn",mt:"10px",onClick:n,children:"Cancelar"})]})]})})]})}},41739:function(e,t,n){n.d(t,{Z:function(){return f}});var r=n(83658),i=n(5490),s=n(34614),o=n(61571),c=n(57391),a=n(70010),l=n(90092),d=n(45443),u=n(38488),p=n(67294),h=n(85893);var x=function(){return(0,h.jsx)("img",{src:"/assets/images/loading.svg"})};var f=function(e){var t=e.loading,n=e.error,f=(0,r.q)(),m=f.isOpen,j=f.onOpen,g=f.onClose,v=(0,p.useState)(!0),y=v[0],w=v[1],b=(0,p.useState)(""),O=b[0],C=b[1],S=(0,p.useState)(""),E=S[0],Z=S[1];return(0,p.useEffect)((function(){t?(Z("Carregando"),C("Essa a\xe7\xe3o pode levar alguns instantes, por favor aguarde"),w(!0),j()):(w(!1),g())}),[t]),(0,p.useEffect)((function(){n&&(w(!1),Z("Erro"),C("N\xe3o foi poss\xedvel carregar a p\xe1gina. Por favor tente mais tarde"))}),[n]),(0,h.jsxs)(i.u_,{isCentered:!0,isOpen:m,onClose:g,closeOnOverlayClick:!1,children:[(0,h.jsx)(s.Z,{}),(0,h.jsxs)(o.h,{children:[(0,h.jsx)(c.x,{textAlign:"center",children:E}),(0,h.jsxs)(a.f,{justifyContent:"center",alignItems:"center",display:"flex",flexDirection:"column",gap:"1rem",children:[y&&(0,h.jsx)(x,{}),(0,h.jsx)(l.x,{w:"100%",textAlign:"center",children:O})]}),!y&&(0,h.jsx)(d.m,{justifyContent:"center",children:(0,h.jsx)(u.z,{onClick:g,variant:"primary",children:"OK"})})]})]})}},14101:function(e,t,n){n.r(t),n.d(t,{default:function(){return D}});var r=n(83658),i=n(90092),s=n(66714),o=n(85615),c=n(71159),a=n(7282),l=n(59499),d=n(50029),u=n(87794),p=n.n(u),h=n(67294),x=n(87536),f=n(92706),m=n(23309),j=n(72735),g=n(36031),v=n(23895),y=n(81326),w=n(3712),b=n(43049),O=n(54506),C=n(54795),S=n(42811),E=n(47533),Z=n(24130),k=n(85893);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?A(Object(n),!0).forEach((function(t){(0,l.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var I=function(e){var t=e.isOpenActions,n=e.onCloseActions,r=e.data,s=e.isEdit,o=e.thItemProp,c=e.onOpenSuccess,a=e.onOpenError,l=(0,h.useRef)(null),u=(0,x.cI)({resolver:(0,E.X)(Z.vC),defaultValues:{payment_days:r.expire_days}}),A=u.handleSubmit,I=u.register,P=u.reset,_=u.formState,z=_.errors,D=(_.isSubmitting,(0,h.useState)("2")),T=D[0],N=D[1],R=function(){var e=(0,d.Z)(p().mark((function e(t){var n,i,s;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.id,i=localStorage.getItem("atk"),s={expire_days:t.payment_days,status:t.status},(0,f.A)(n,s,i).then((function(){c()})).catch((function(e){a()}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),F=[{type:"text",name:"Forma de Pagamento",width:"250px",minWidth:"180px"},{type:"text",name:"Dias",width:"150px",textAlign:"left"}];return(0,h.useEffect)((function(){P({payment_days:r.expire_days})}),[r]),(0,k.jsx)("form",{noValidate:!0,onSubmit:A((function(e){var t=W(W({},e),{},{status:"1"===T});R(t)})),ref:l,children:(0,k.jsxs)(y.Z,{thItemProp:F,isOpenActions:t,onCloseActions:n,handleSave:function(){null===l||void 0===l||l.current.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))},children:[(0,k.jsx)(g.Z,{modal:!0,thItemProp:F}),(0,k.jsxs)(m.Z,{children:[(0,k.jsxs)(v.Z,{isEdit:s,getStatusValue:function(e){N(e)},modal:!0,rowIndex:0,data:r,children:[(0,k.jsx)(j.Z,{styles:{width:o[0]},children:(0,k.jsx)(w.K,{direction:"row",alignItems:"center",gap:"4px",children:(0,k.jsx)(i.x,{children:r.name_billet})})}),(0,k.jsx)(j.Z,{styles:{width:o[1]},children:(0,k.jsx)(w.K,{direction:"row",alignItems:"center",gap:"4px",children:(0,k.jsxs)(b.Y2,{min:1,max:99,children:[(0,k.jsx)(b.zu,W({},I("payment_days"))),(0,k.jsxs)(b.Fi,{children:[(0,k.jsx)(b.WQ,{}),(0,k.jsx)(b.Y_,{})]})]})})})]}),(0,k.jsx)("tr",{children:(0,k.jsx)("td",{colSpan:o.length+1,children:(0,k.jsx)(O.NI,{isInvalid:z.payment_type,children:(0,k.jsxs)(C.J1,{children:[(0,k.jsx)(S.E,{mb:"-2px",mr:"2px",src:"/assets/icons/attentionIcon.svg"}),z.payment_type&&z.payment_type.message]})})})}),(0,k.jsx)("tr",{children:(0,k.jsx)("td",{colSpan:o.length+1,children:(0,k.jsx)(O.NI,{isInvalid:z.payment_days,children:(0,k.jsxs)(C.J1,{children:[(0,k.jsx)(S.E,{mb:"-2px",mr:"2px",src:"/assets/icons/attentionIcon.svg"}),z.payment_days&&z.payment_days.message]})})})})]})]})})},P=n(41739),_=function(e){var t=e.onOpenSuccess,n=e.onOpenError,l=e.onOpenConfirmDelete,d=(0,h.useState)({}),u=d[0],p=d[1],x=(0,h.useState)(!1),m=x[0],j=x[1],g=(0,h.useState)([]),v=g[0],y=g[1],w=(0,h.useState)(!1),b=w[0],O=w[1],C=(0,h.useState)(!1),S=C[0],E=C[1],Z=(0,r.q)(),A=Z.isOpen,W=Z.onOpen,_=Z.onClose,z=[{type:"text",name:"Forma de Pagamento",width:"250px",minWidth:"180px"},{type:"text",name:"Validade (Dias)",width:"150px",textAlign:"left"}];return(0,h.useEffect)((function(){O(!0),(0,f.M)().then((function(e){O(!1),E(!1),y(e.data)})).catch((function(e){O(!1),E(!0)}))}),[]),(0,h.useEffect)((function(){console.log(v)}),[v]),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(s.Z,{thItemProp:z}),(0,k.jsx)(o.Z,{children:v.map((function(e,t){return(0,k.jsxs)(c.Z,{onOpenConfirmDelete:l,handleEdit:function(){return p(e),j(!0),void W()},data:e,rowIndex:t,children:[(0,k.jsx)(a.Z,{styles:{width:z[0].width,minWidth:z[0].minWidth},children:(0,k.jsx)(i.x,{children:e.name_billet})}),(0,k.jsx)(a.Z,{styles:{width:z[1].width},children:(0,k.jsx)(i.x,{children:e.expire_days})})]},t)}))}),(0,k.jsx)(I,{thItemProp:z,onOpenSuccess:t,onOpenError:n,isEdit:m,data:u,isOpenActions:A,onCloseActions:_}),(0,k.jsx)(P.Z,{loading:b,error:S})]})},z=n(79398);var D=function(){return(0,k.jsx)(z.default,{children:(0,k.jsx)(_,{})})}},92706:function(e,t,n){n.d(t,{A:function(){return l},M:function(){return c}});var r=n(50029),i=n(87794),s=n.n(i),o=n(63679);function c(){return a.apply(this,arguments)}function a(){return(a=(0,r.Z)(s().mark((function e(){var t,n,r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://loja.nissan.com.br/api/env");case 2:return t=e.sent,e.next=5,t.json();case 5:return n=e.sent,r={headers:{Authorization:"Bearer ".concat(null===n||void 0===n?void 0:n.jwt)}},e.abrupt("return",o.h.get("boleto-admin",r));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e,t,n){return d.apply(this,arguments)}function d(){return(d=(0,r.Z)(s().mark((function e(t,n,r){var i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={headers:{Authorization:"Bearer ".concat(r)}},e.abrupt("return",o.h.put("boleto-admin/".concat(t,"/update"),n,i));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}}}]);

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.