1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2223],{2223:(e,t,o)=>{o.d(t,{exportProductsToExcel:()=>c});var l=o(74495);let a='"R$" #,##0.00',r="FF052D2B",n={style:"thin",color:{argb:"FFE5E5EA"}},i=e=>null===e?null:e/100,d=[{header:"Produto",width:46,value:e=>e.title},{header:"Tipo",width:12,value:e=>e.type},{header:"SKU",width:18,value:e=>e.sku},{header:"Varia\xe7\xe3o",width:14,value:e=>e.variation},{header:"An\xfancios",width:26,value:e=>e.mlbIds},{header:"Distribui\xe7\xe3o",width:18,value:e=>e.distribution},{header:"Fornecedor",width:24,value:e=>e.suppliers},{header:"Estoque",width:10,value:e=>e.stockUnits},{header:"Custo unit\xe1rio",width:16,numFmt:a,value:e=>i(e.unitCostCentavos)},{header:"Valor do estoque",width:18,numFmt:a,value:e=>i(e.stockValueCentavos)},{header:"Curva ABC",width:11,value:e=>e.curve}],u=e=>String(e).padStart(2,"0"),h=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,o=new l.Workbook;o.creator="Cargoos",o.created=t;let a=o.addWorksheet("Produtos",{views:[{state:"frozen",ySplit:4}]}),i=d.length;d.forEach((e,t)=>{a.getColumn(t+1).width=e.width}),a.mergeCells(1,1,1,i);let h=a.getCell(1,1);h.value="Cargoos \xb7 Produtos",h.font={name:"Calibri",size:14,bold:!0,color:{argb:"FFFFFFFF"}},h.alignment={vertical:"middle",horizontal:"left",indent:1},h.fill={type:"pattern",pattern:"solid",fgColor:{argb:r}},a.getRow(1).height=30,a.mergeCells(2,1,2,i);let c=a.getCell(2,1);c.value="Exportado em ".concat("".concat(u(t.getDate()),"/").concat(u(t.getMonth()+1),"/").concat(t.getFullYear()," ").concat(u(t.getHours()),":").concat(u(t.getMinutes()))),c.font={name:"Calibri",size:10,color:{argb:"FF6B7280"}},c.alignment={vertical:"middle",horizontal:"left",indent:1},a.getRow(2).height=18,a.getRow(3).height=6;let s=a.getRow(4);return d.forEach((e,t)=>{let o=s.getCell(t+1);o.value=e.header,o.font={name:"Calibri",size:11,bold:!0,color:{argb:r}},o.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFB1FE7B"}},o.alignment={vertical:"middle",horizontal:"left"},o.border={top:n,bottom:n,left:n,right:n}}),s.height=22,e.forEach((e,t)=>{let o=a.getRow(5+t),l=t%2==1;d.forEach((t,a)=>{let i=o.getCell(a+1),d=t.value(e);i.value=""===d?null:d,"number"==typeof d&&t.numFmt&&(i.numFmt=t.numFmt),i.font={name:"Calibri",size:11,color:{argb:r}},i.alignment={vertical:"middle",horizontal:"left"},l&&(i.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFF7F8FA"}}),i.border={bottom:n,left:n,right:n}}),o.height=18}),a.autoFilter={from:{row:4,column:1},to:{row:4+e.length,column:i}},o},c=async e=>{let t=new Date,o=new Blob([await h(e,t).xlsx.writeBuffer()],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),l=URL.createObjectURL(o),a=document.createElement("a");a.href=l,a.download=(e=>"Cargoos-Produtos-".concat(u(e.getDate()),"-").concat(u(e.getMonth()+1),"-").concat(e.getFullYear(),".xlsx"))(t),a.rel="noopener",a.style.display="none",document.body.appendChild(a),a.click(),a.remove(),window.setTimeout(()=>URL.revokeObjectURL(l),0)}}}]);
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.