var N=(l,r,i)=>new Promise((m,f)=>{var o=t=>{try{s(i.next(t))}catch(e){f(e)}},a=t=>{try{s(i.throw(t))}catch(e){f(e)}},s=t=>t.done?m(t.value):Promise.resolve(t.value).then(o,a);s((i=i.apply(l,r)).next())});import{x as O,__tla as j}from"./index-3f7f661e.js";let u,_,d,S,k=Promise.all([(()=>{try{return j}catch(l){}})()]).then(()=>N(void 0,null,function*(){const{utils:l,writeFile:r}=O,i="excel-list.xlsx",m="sheet";function f(o,a,s=3){const t={};a["!cols"]=[],o.forEach(e=>{Object.keys(e).forEach(n=>{var c,p,x;const h=(p=(c=e[n])==null?void 0:c.length)!=null?p:s;t[n]=Math.max(h,(x=t[n])!=null?x:s)})}),Object.keys(t).forEach(e=>{a["!cols"].push({wch:t[e]})})}S=function({data:o,header:a,filename:s=i,sheetName:t=m,json2sheetOpts:e={},write2excelOpts:n={bookType:"xlsx"}}){const h=[...o];a&&(h.unshift(a),e.skipHeader=!0);const c=l.json_to_sheet(h,e);f(h,c);const p={SheetNames:[t],Sheets:{[t]:c}};r(p,s,n)},_=function({data:o,header:a,filename:s=i,write2excelOpts:t={bookType:"xlsx"}}){const e=[...o];a&&e.unshift(a);const n=l.aoa_to_sheet(e),h={SheetNames:[s],Sheets:{[s]:n}};r(h,s,t)},u=function({sheetList:o,filename:a=i,write2excelOpts:s={bookType:"xlsx"}}){const t={SheetNames:[],Sheets:{}};o.forEach((e,n)=>{const h=[...e.data];e.header&&(h.unshift(e.header),e.json2sheetOpts=e.json2sheetOpts||{},e.json2sheetOpts.skipHeader=!0);const c=l.json_to_sheet(h,e.json2sheetOpts);f(h,c),e.sheetName=e.sheetName||`${m}${n}`,t.SheetNames.push(e.sheetName),t.Sheets[e.sheetName]=c}),r(t,a,s)},d=function({sheetList:o,filename:a=i,write2excelOpts:s={bookType:"xlsx"}}){const t={SheetNames:[],Sheets:{}};o.forEach((e,n)=>{const h=[...e.data];e.header&&h.unshift(e.header);const c=l.aoa_to_sheet(h);e.sheetName=e.sheetName||`${m}${n}`,t.SheetNames.push(e.sheetName),t.Sheets[e.sheetName]=c}),r(t,a,s)}}));export{k as __tla,u as a,_ as b,d as c,S as j};
|