Your Name
2022-11-30 f0cd5a4fe3b366fa753b8da5e387673c30c4d0f7
1
(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-5aa0"],{227:function(e,t){},228:function(e,t){},84:function(e,t){},"S/jZ":function(e,t,n){"use strict";n.r(t),n.d(t,"export_table_to_excel",function(){return u}),n.d(t,"export_json_to_excel",function(){return f});var r=n("m1cH"),o=n.n(r),a=n("EUZL"),c=n.n(a);function s(e,t){return t&&(e+=1462),(Date.parse(e)-new Date(Date.UTC(1899,11,30)))/864e5}function i(e,t){for(var n={},r={s:{c:1e7,r:1e7},e:{c:0,r:0}},o=0;o!=e.length;++o)for(var a=0;a!=e[o].length;++a){r.s.r>o&&(r.s.r=o),r.s.c>a&&(r.s.c=a),r.e.r<o&&(r.e.r=o),r.e.c<a&&(r.e.c=a);var i={v:e[o][a]};if(null!=i.v){var h=c.a.utils.encode_cell({c:a,r:o});"number"==typeof i.v?i.t="n":"boolean"==typeof i.v?i.t="b":i.v instanceof Date?(i.t="n",i.z=c.a.SSF._table[14],i.v=s(i.v)):i.t="s",n[h]=i}}return r.s.c<1e7&&(n["!ref"]=c.a.utils.encode_range(r)),n}function h(){if(!(this instanceof h))return new h;this.SheetNames=[],this.Sheets={}}function l(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r!=e.length;++r)n[r]=255&e.charCodeAt(r);return t}function u(e){var t=function(e){for(var t=[],n=e.querySelectorAll("tr"),r=[],o=0;o<n.length;++o){for(var a=[],c=n[o].querySelectorAll("td"),s=0;s<c.length;++s){var i=c[s],h=i.getAttribute("colspan"),l=i.getAttribute("rowspan"),u=i.innerText;if(""!==u&&u==+u&&(u=+u),r.forEach(function(e){if(o>=e.s.r&&o<=e.e.r&&a.length>=e.s.c&&a.length<=e.e.c)for(var t=0;t<=e.e.c-e.s.c;++t)a.push(null)}),(l||h)&&(l=l||1,h=h||1,r.push({s:{r:o,c:a.length},e:{r:o+l-1,c:a.length+h-1}})),a.push(""!==u?u:null),h)for(var f=0;f<h-1;++f)a.push(null)}t.push(a)}return[t,r]}(document.getElementById(e)),n=t[1],r=t[0],o=new h,a=i(r);a["!merges"]=n,o.SheetNames.push("SheetJS"),o.Sheets.SheetJS=a;var s=c.a.write(o,{bookType:"xlsx",bookSST:!1,type:"binary"});saveAs(new Blob([l(s)],{type:"application/octet-stream"}),"test.xlsx")}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.multiHeader,n=void 0===t?[]:t,r=e.header,a=e.data,s=e.filename,u=e.merges,f=void 0===u?[]:u,p=e.autoWidth,v=void 0===p||p,g=e.bookType,S=void 0===g?"xlsx":g;s=s||"excel-list",(a=[].concat(o()(a))).unshift(r);for(var d=n.length-1;d>-1;d--)a.unshift(n[d]);var w=new h,b=i(a);if(f.length>0&&(b["!merges"]||(b["!merges"]=[]),f.forEach(function(e){b["!merges"].push(c.a.utils.decode_range(e))})),v){for(var m=a.map(function(e){return e.map(function(e){return null==e?{wch:10}:e.toString().charCodeAt(0)>255?{wch:2*e.toString().length}:{wch:e.toString().length}})}),y=m[0],x=1;x<m.length;x++)for(var A=0;A<m[x].length;A++)y[A].wch<m[x][A].wch&&(y[A].wch=m[x][A].wch);b["!cols"]=y}w.SheetNames.push("SheetJS"),w.Sheets.SheetJS=b;var _=c.a.write(w,{bookType:S,bookSST:!1,type:"binary"});saveAs(new Blob([l(_)],{type:"application/octet-stream"}),s+"."+S)}n("MnM9")}}]);