sheetjs/dist/xlsx.min.js

15 lines
377 KiB
JavaScript
Raw Normal View History

/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
var DO_NOT_EXPORT_CODEPAGE=true;var DO_NOT_EXPORT_JSZIP=true;var XLSX={};function make_xlsx_lib(e){e.version="0.13.3";var r=1200,t=1252;if(typeof module!=="undefined"&&typeof require!=="undefined"){if(typeof cptable==="undefined"){if(typeof global!=="undefined")global.cptable=undefined;else if(typeof window!=="undefined")window.cptable=undefined}}var a=[874,932,936,949,950];for(var n=0;n<=8;++n)a.push(1250+n);var i={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969};var s=function(e){if(a.indexOf(e)==-1)return;t=i[0]=e};function l(){s(1252)}var f=function(e){r=e;s(e)};function c(){f(1200);l()}function o(e){var r=[];for(var t=0,a=e.length;t<a;++t)r[t]=e.charCodeAt(t);return r}function u(e){var r=[];for(var t=0;t<e.length>>1;++t)r[t]=String.fromCharCode(e.charCodeAt(2*t)+(e.charCodeAt(2*t+1)<<8));return r.join("")}function h(e){var r=[];for(var t=0;t<e.length>>1;++t)r[t]=String.fromCharCode(e.charCodeAt(2*t+1)+(e.charCodeAt(2*t)<<8));return r.join("")}var d=function(e){var r=e.charCodeAt(0),t=e.charCodeAt(1);if(r==255&&t==254)return u(e.slice(2));if(r==254&&t==255)return h(e.slice(2));if(r==65279)return e.slice(1);return e};var v=function Lm(e){return String.fromCharCode(e)};if(typeof cptable!=="undefined"){f=function(e){r=e};d=function(e){if(e.charCodeAt(0)===255&&e.charCodeAt(1)===254){return cptable.utils.decode(1200,o(e.slice(2)))}return e};v=function Um(e){if(r===1200)return String.fromCharCode(e);return cptable.utils.decode(r,[e&255,e>>8])[0]}}var p=null;var m=true;var b=function Wm(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return{encode:function(r){var t="";var a=0,n=0,i=0,s=0,l=0,f=0,c=0;for(var o=0;o<r.length;){a=r.charCodeAt(o++);s=a>>2;n=r.charCodeAt(o++);l=(a&3)<<4|n>>4;i=r.charCodeAt(o++);f=(n&15)<<2|i>>6;c=i&63;if(isNaN(n)){f=c=64}else if(isNaN(i)){c=64}t+=e.charAt(s)+e.charAt(l)+e.charAt(f)+e.charAt(c)}return t},decode:function r(t){var a="";var n=0,i=0,s=0,l=0,f=0,c=0,o=0;t=t.replace(/[^\w\+\/\=]/g,"");for(var u=0;u<t.length;){l=e.indexOf(t.charAt(u++));f=e.indexOf(t.charAt(u++));n=l<<2|f>>4;a+=String.fromCharCode(n);c=e.indexOf(t.charAt(u++));i=(f&15)<<4|c>>2;if(c!==64){a+=String.fromCharCode(i)}o=e.indexOf(t.charAt(u++));s=(c&3)<<6|o;if(o!==64){a+=String.fromCharCode(s)}}return a}}}();var g=typeof Buffer!=="undefined"&&typeof process!=="undefined"&&typeof process.versions!=="undefined"&&process.versions.node;var E=function(){};if(typeof Buffer!=="undefined"){var S=!Buffer.from;if(!S)try{Buffer.from("foo","utf8")}catch(k){S=true}E=S?function(e,r){return r?new Buffer(e,r):new Buffer(e)}:Buffer.from.bind(Buffer);if(!Buffer.alloc)Buffer.alloc=function(e){return new Buffer(e)}}function w(e){return g?Buffer.alloc(e):new Array(e)}var B=function Vm(e){if(g)return E(e,"binary");return e.split("").map(function(e){return e.charCodeAt(0)&255})};function C(e){if(typeof ArrayBuffer==="undefined")return B(e);var r=new ArrayBuffer(e.length),t=new Uint8Array(r);for(var a=0;a!=e.length;++a)t[a]=e.charCodeAt(a)&255;return r}function T(e){if(Array.isArray(e))return e.map(Iv).join("");var r=[];for(var t=0;t<e.length;++t)r[t]=Iv(e[t]);return r.join("")}function x(e){if(typeof Uint8Array==="undefined")throw new Error("Unsupported");return new Uint8Array(e)}function I(e){if(typeof ArrayBuffer=="undefined")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return I(new Uint8Array(e));var r=new Array(e.length);for(var t=0;t<e.length;++t)r[t]=e[t];return r}var A=function(e){return[].concat.apply([],e)};var R=/\u0000/g,_=/[\u0001-\u0006]/g;var y={};var F=function Hm(e){e.version="0.10.2";function r(e){var r="",t=e.length-1;while(t>=0)r+=e.charAt(t--);return r}function t(e,r){var t="";while(t.length<r)t+=e;return t}function a(e,r){var a=""+e;return a.length>=r?a:t("0",r-a.length)+a}function n(e,r){var a=""+e;return a.length>=r?a:t(" ",r-a.length)+a}function i(e,r){var a=""+e;return a.length>=r?a:a+t(" ",r-a.length)}function s(e,r){var a=""+Math.round(e);return a.length>=r?a:t
}r[0]+="/";for(a=1;a<f;++a){if(e[a].type!==2)r[a]+="/"}}function u(e,r,t){var a=e.start,n=e.size;var i=[];var s=a;while(t&&n>0&&s>=0){i.push(r.slice(s*x,s*x+x));n-=x;s=Dr(t,s*4)}if(i.length===0)return Xr(0);return A(i).slice(0,e.size)}function h(e,r,t,a,n){var i=I;if(e===I){if(r!==0)throw new Error("DIFAT chain shorter than expected")}else if(e!==-1){var s=t[e],l=(a>>>2)-1;if(!s)return;for(var f=0;f<l;++f){if((i=Dr(s,f*4))===I)break;n.push(i)}h(Dr(s,a-4),r-1,t,a,n)}}function d(e,r,t,a,n){var i=[],s=[];if(!n)n=[];var l=a-1,f=0,c=0;for(f=r;f>=0;){n[f]=true;i[i.length]=f;s.push(e[f]);var o=t[Math.floor(f*4/a)];c=f*4&l;if(a<4+c)throw new Error("FAT boundary crossed: "+f+" 4 "+a);if(!e[o])break;f=Dr(e[o],c)}return{nodes:i,data:fr([s])}}function v(e,r,t,a){var n=e.length,i=[];var s=[],l=[],f=[];var c=a-1,o=0,u=0,h=0,d=0;for(o=0;o<n;++o){l=[];h=o+r;if(h>=n)h-=n;if(s[h])continue;f=[];for(u=h;u>=0;){s[u]=true;l[l.length]=u;f.push(e[u]);var v=t[Math.floor(u*4/a)];d=u*4&c;if(a<4+d)throw new Error("FAT boundary crossed: "+u+" 4 "+a);if(!e[v])break;u=Dr(e[v],d)}i[h]={nodes:l,data:fr([f])}}return i}function p(e,r,t,a,n,i,s,l){var f=0,c=a.length?2:0;var o=r[e].data;var h=0,v=0,p;for(;h<o.length;h+=128){var b=o.slice(h,h+128);Vr(b,64);v=b._R(2);p=or(b,0,v-c);a.push(p);var g={name:p,type:b._R(1),color:b._R(1),L:b._R(4,"i"),R:b._R(4,"i"),C:b._R(4,"i"),clsid:b._R(16),state:b._R(4,"i"),start:0,size:0};var E=b._R(2)+b._R(2)+b._R(2)+b._R(2);if(E!==0)g.ct=m(b,b.l-8);var S=b._R(2)+b._R(2)+b._R(2)+b._R(2);if(S!==0)g.mt=m(b,b.l-8);g.start=b._R(4,"i");g.size=b._R(4,"i");if(g.size<0&&g.start<0){g.size=g.type=0;g.start=I;g.name=""}if(g.type===5){f=g.start;if(n>0&&f!==I)r[f].name="!StreamData"}else if(g.size>=4096){g.storage="fat";if(r[g.start]===undefined)r[g.start]=d(t,g.start,r.fat_addrs,r.ssz);r[g.start].name=g.name;g.content=r[g.start].data.slice(0,g.size)}else{g.storage="minifat";if(g.size<0)g.size=0;else if(f!==I&&g.start!==I&&r[f]){g.content=u(g,r[f].data,(r[l]||{}).data)}}if(g.content)Vr(g.content,0);i[p]=g;s.push(g)}}function m(e,r){return new Date((Fr(e,r+4)/1e7*Math.pow(2,32)+Fr(e,r)/1e7-11644473600)*1e3)}function g(e,r){i();return s(n.readFileSync(e),r)}function E(e,r){switch(r&&r.type||"base64"){case"file":return g(e,r);case"base64":return s(B(b.decode(e)),r);case"binary":return s(B(e),r);}return s(e,r)}function S(e,r){var t=r||{},a=t.root||"Root Entry";if(!e.FullPaths)e.FullPaths=[];if(!e.FileIndex)e.FileIndex=[];if(e.FullPaths.length!==e.FileIndex.length)throw new Error("inconsistent CFB structure");if(e.FullPaths.length===0){e.FullPaths[0]=a+"/";e.FileIndex[0]={name:a,type:5}}if(t.CLSID)e.FileIndex[0].clsid=t.CLSID;k(e)}function k(e){var r="Sh33tJ5";if(U.find(e,"/"+r))return;var t=Xr(4);t[0]=55;t[1]=t[3]=50;t[2]=54;e.FileIndex.push({name:r,type:2,content:t,size:4,L:69,R:69,C:69});e.FullPaths.push(e.FullPaths[0]+r);w(e)}function w(e,n){S(e);var i=false,s=false;for(var l=e.FullPaths.length-1;l>=0;--l){var f=e.FileIndex[l];switch(f.type){case 0:if(s)i=true;else{e.FileIndex.pop();e.FullPaths.pop()}break;case 1:;case 2:;case 5:s=true;if(isNaN(f.R*f.L*f.C))i=true;if(f.R>-1&&f.L>-1&&f.R==f.L)i=true;break;default:i=true;break;}}if(!i&&!n)return;var c=new Date(1987,1,19),o=0;var u=[];for(l=0;l<e.FullPaths.length;++l){if(e.FileIndex[l].type===0)continue;u.push([e.FullPaths[l],e.FileIndex[l]])}for(l=0;l<u.length;++l){var h=t(u[l][0]);s=false;for(o=0;o<u.length;++o)if(u[o][0]===h)s=true;if(!s)u.push([h,{name:a(h).replace("/",""),type:1,clsid:D,ct:c,mt:c,content:null}])}u.sort(function(e,t){return r(e[0],t[0])});e.FullPaths=[];e.FileIndex=[];for(l=0;l<u.length;++l){e.FullPaths[l]=u[l][0];e.FileIndex[l]=u[l][1]}for(l=0;l<u.length;++l){var d=e.FileIndex[l];var v=e.FullPaths[l];d.name=a(v).replace("/","");d.L=d.R=d.C=-(d.color=1);d.size=d.content?d.content.length:0;d.start=0;d.clsid=d.clsid||D;if(l===0){d.C=u.length>1?1:-1;d.size=0;d.type=5}else if(v.slice(-1)=="/"){for(o=l+1;o<u.length;++o)if(t(e.FullPaths[o])==v)break;d.C=o>=u.length?-1:o;for(o=l+1;o<u.length;++o)if(t(e.FullPaths[o])==t(v))break;d.R=o>=u.length?-1:o;d.type=1}else{if(t(e.FullPath
}var t=ct(e);if(e.cRel===0)t=it(t);if(e.rRel===0)t=rt(t);return t}function Qr(e,r){if(e.s.r==0&&!e.s.rRel){if(e.e.r==(r.biff>=12?1048575:r.biff>=8?65536:16384)&&!e.e.rRel){return(e.s.cRel?"":"$")+nt(e.s.c)+":"+(e.e.cRel?"":"$")+nt(e.e.c)}}if(e.s.c==0&&!e.s.cRel){if(e.e.c==(r.biff>=12?65535:255)&&!e.e.cRel){return(e.s.rRel?"":"$")+et(e.s.r)+":"+(e.e.rRel?"":"$")+et(e.e.r)}}return Yr(e.s,r.biff)+":"+Yr(e.e,r.biff)}var Jr={};var Zr=function(e,r){var t;if(typeof r!=="undefined")t=r;else if(typeof require!=="undefined"){try{t=undefined}catch(a){t=null}}e.rc4=function(e,r){var t=new Array(256);var a=0,n=0,i=0,s=0;for(n=0;n!=256;++n)t[n]=n;for(n=0;n!=256;++n){i=i+t[n]+e[n%e.length].charCodeAt(0)&255;s=t[n];t[n]=t[i];t[i]=s}n=i=0;var l=Buffer(r.length);for(a=0;a!=r.length;++a){n=n+1&255;i=(i+t[n])%256;s=t[n];t[n]=t[i];t[i]=s;l[a]=r[a]^t[t[n]+t[i]&255]}return l};e.md5=function(e){if(!t)throw new Error("Unsupported crypto");return t.createHash("md5").update(e).digest("hex")}};Zr(Jr,typeof crypto!=="undefined"?crypto:undefined);function qr(e){return parseInt(tt(e),10)-1}function et(e){return""+(e+1)}function rt(e){return e.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}function tt(e){return e.replace(/\$(\d+)$/,"$1")}function at(e){var r=st(e),t=0,a=0;for(;a!==r.length;++a)t=26*t+r.charCodeAt(a)-64;return t-1}function nt(e){var r="";for(++e;e;e=Math.floor((e-1)/26))r=String.fromCharCode((e-1)%26+65)+r;return r}function it(e){return e.replace(/^([A-Z])/,"$$$1")}function st(e){return e.replace(/^\$([A-Z])/,"$1")}function lt(e){return e.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")}function ft(e){var r=lt(e);return{c:at(r[0]),r:qr(r[1])}}function ct(e){return nt(e.c)+et(e.r)}function ot(e){var r=e.split(":").map(ft);return{s:r[0],e:r[r.length-1]}}function ut(e,r){if(typeof r==="undefined"||typeof r==="number"){return ut(e.s,e.e)}if(typeof e!=="string")e=ct(e);if(typeof r!=="string")r=ct(r);return e==r?e:e+":"+r}function ht(e){var r={s:{c:0,r:0},e:{c:0,r:0}};var t=0,a=0,n=0;var i=e.length;for(t=0;a<i;++a){if((n=e.charCodeAt(a)-64)<1||n>26)break;t=26*t+n}r.s.c=--t;for(t=0;a<i;++a){if((n=e.charCodeAt(a)-48)<0||n>9)break;t=10*t+n}r.s.r=--t;if(a===i||e.charCodeAt(++a)===58){r.e.c=r.s.c;r.e.r=r.s.r;return r}for(t=0;a!=i;++a){if((n=e.charCodeAt(a)-64)<1||n>26)break;t=26*t+n}r.e.c=--t;for(t=0;a!=i;++a){if((n=e.charCodeAt(a)-48)<0||n>9)break;t=10*t+n}r.e.r=--t;return r}function dt(e,r){var t=e.t=="d"&&r instanceof Date;if(e.z!=null)try{return e.w=y.format(e.z,t?Z(r):r)}catch(a){}try{return e.w=y.format((e.XF||{}).numFmtId||(t?14:0),t?Z(r):r)}catch(a){return""+r}}function vt(e,r,t){if(e==null||e.t==null||e.t=="z")return"";if(e.w!==undefined)return e.w;if(e.t=="d"&&!e.z&&t&&t.dateNF)e.z=t.dateNF;if(r==undefined)return dt(e,e.v);return dt(e,r)}function pt(e,r){var t=r&&r.sheet?r.sheet:"Sheet1";var a={};a[t]=e;return{SheetNames:[t],Sheets:a}}function mt(e,r,t){var a=t||{};var n=e?Array.isArray(e):a.dense;if(p!=null&&n==null)n=p;var i=e||(n?[]:{});var s=0,l=0;if(i&&a.origin!=null){if(typeof a.origin=="number")s=a.origin;else{var f=typeof a.origin=="string"?ft(a.origin):a.origin;s=f.r;l=f.c}}var c={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(i["!ref"]){var o=ht(i["!ref"]);c.s.c=o.s.c;c.s.r=o.s.r;c.e.c=Math.max(c.e.c,o.e.c);c.e.r=Math.max(c.e.r,o.e.r);if(s==-1)c.e.r=s=o.e.r+1}for(var u=0;u!=r.length;++u){for(var h=0;h!=r[u].length;++h){if(typeof r[u][h]==="undefined")continue;var d={v:r[u][h]};if(Array.isArray(d.v)){d.f=r[u][h][1];d.v=d.v[0]}var v=s+u,m=l+h;if(c.s.r>v)c.s.r=v;if(c.s.c>m)c.s.c=m;if(c.e.r<v)c.e.r=v;if(c.e.c<m)c.e.c=m;if(d.v===null){if(d.f)d.t="n";else if(!a.cellStubs)continue;else d.t="z"}else if(typeof d.v==="number")d.t="n";else if(typeof d.v==="boolean")d.t="b";else if(d.v instanceof Date){d.z=a.dateNF||y._table[14];if(a.cellDates){d.t="d";d.w=y.format(d.z,Z(d.v))}else{d.t="n";d.v=Z(d.v);d.w=y.format(d.z,d.v)}}else d.t="s";if(n){if(!i[v])i[v]=[];i[v][m]=d}else{var b=ct({c:m,r:v});i[b]=d}}}if(c.s.c<1e7)i["!ref"]=ut(c);return i}function bt(e,r){return mt(null,e,r)}function gt(e,r){if(!r)r=Xr(4);r._W(4,e);return r}function Et(e){var r=e._R(4);return r==
e.l+=2;if(r!==ta)if(a!==r&&ua.indexOf(r)===-1)throw new Error("Expected type "+r+" saw "+a);switch(r===ta?a:r){case 2:n=e._R(2,"i");if(!i.raw)e.l+=2;return n;case 3:n=e._R(4,"i");return n;case 11:return e._R(4)!==0;case 19:n=e._R(4);return n;case 30:return hn(e,a,4).replace(R,"");case 31:return dn(e);case 64:return on(e);case 65:return Bn(e);case 71:return Cn(e);case 80:return pn(e,a,!i.raw).replace(R,"");case 81:return mn(e,a).replace(R,"");case 4108:return kn(e);case 4126:return gn(e);default:throw new Error("TypedPropertyValue unrecognized type "+r+" "+a);}}function xn(e,r){var t=Xr(4),a=Xr(4);t._W(4,e==80?31:e);switch(e){case 3:a._W(-4,r);break;case 5:a=Xr(8);a._W(8,r,"f");break;case 11:a._W(4,r?1:0);break;case 64:a=un(r);break;case 31:;case 80:a=Xr(4+2*(r.length+1)+(r.length%2?0:2));a._W(4,r.length+1);a._W(0,r,"dbcs");while(a.l!=a.length)a._W(1,0);break;default:throw new Error("TypedPropertyValue unrecognized type "+e+" "+r);}return A([t,a])}function In(e,r){var t=e.l;var a=e._R(4);var n=e._R(4);var i=[],s=0;var l=0;var c=-1,o={};for(s=0;s!=n;++s){var u=e._R(4);var h=e._R(4);i[s]=[u,h+t]}i.sort(function(e,r){return e[1]-r[1]});var d={};for(s=0;s!=n;++s){if(e.l!==i[s][1]){var v=true;if(s>0&&r)switch(r[i[s-1][0]].t){case 2:if(e.l+2===i[s][1]){e.l+=2;v=false}break;case 80:if(e.l<=i[s][1]){e.l=i[s][1];v=false}break;case 4108:if(e.l<=i[s][1]){e.l=i[s][1];v=false}break;}if((!r||s==0)&&e.l<=i[s][1]){v=false;e.l=i[s][1]}if(v)throw new Error("Read Error: Expected address "+i[s][1]+" at "+e.l+" :"+s)}if(r){var p=r[i[s][0]];d[p.n]=Tn(e,p.t,{raw:true});if(p.p==="version")d[p.n]=String(d[p.n]>>16)+"."+("0000"+String(d[p.n]&65535)).slice(-4);if(p.n=="CodePage")switch(d[p.n]){case 0:d[p.n]=1252;case 874:;case 932:;case 936:;case 949:;case 950:;case 1250:;case 1251:;case 1253:;case 1254:;case 1255:;case 1256:;case 1257:;case 1258:;case 1e4:;case 1200:;case 1201:;case 1252:;case 65e3:;case-536:;case 65001:;case-535:f(l=d[p.n]>>>0&65535);break;default:throw new Error("Unsupported CodePage: "+d[p.n]);}}else{if(i[s][0]===1){l=d.CodePage=Tn(e,qt);f(l);if(c!==-1){var m=e.l;e.l=i[c][1];o=wn(e,l);e.l=m}}else if(i[s][0]===0){if(l===0){c=s;e.l=i[s+1][1];continue}o=wn(e,l)}else{var b=o[i[s][0]];var g;switch(e[e.l]){case 65:e.l+=4;g=Bn(e);break;case 30:e.l+=4;g=pn(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 31:e.l+=4;g=pn(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 3:e.l+=4;g=e._R(4,"i");break;case 19:e.l+=4;g=e._R(4);break;case 5:e.l+=4;g=e._R(8,"f");break;case 11:e.l+=4;g=Nn(e,4);break;case 64:e.l+=4;g=ae(on(e));break;default:throw new Error("unparsed value: "+e[e.l]);}d[b]=g}}}e.l=t+a;return d}var An=["CodePage","Thumbnail","_PID_LINKBASE","_PID_HLINKS","SystemIdentifier","FMTID"].concat(Ya);function Rn(e){switch(typeof e){case"boolean":return 11;case"number":return(e|0)==e?3:5;case"string":return 31;case"object":if(e instanceof Date)return 64;break;}return-1}function _n(e,r,t){var a=Xr(8),n=[],i=[];var s=8,l=0;var f=Xr(8),c=Xr(8);f._W(4,2);f._W(4,1200);c._W(4,1);i.push(f);n.push(c);s+=8+f.length;if(!r){c=Xr(8);c._W(4,0);n.unshift(c);var o=[Xr(4)];o[0]._W(4,e.length);for(l=0;l<e.length;++l){var u=e[l][0];f=Xr(4+4+2*(u.length+1)+(u.length%2?0:2));f._W(4,l+2);f._W(4,u.length+1);f._W(0,u,"dbcs");while(f.l!=f.length)f._W(1,0);o.push(f)}f=A(o);i.unshift(f);s+=8+f.length}for(l=0;l<e.length;++l){if(r&&!r[e[l][0]])continue;if(An.indexOf(e[l][0])>-1)continue;if(e[l][1]==null)continue;var h=e[l][1],d=0;if(r){d=+r[e[l][0]];var v=t[d];if(v.p=="version"&&typeof h=="string"){var p=h.split(".");h=(+p[0]<<16)+(+p[1]||0)}f=xn(v.t,h)}else{var m=Rn(h);if(m==-1){m=31;h=String(h)}f=xn(m,h)}i.push(f);c=Xr(8);c._W(4,!r?2+l:d);n.push(c);s+=8+f.length}var b=8*(i.length+1);for(l=0;l<i.length;++l){n[l]._W(4,b);b+=i[l].length}a._W(4,s);a._W(4,i.length);return A([a].concat(n).concat(i))}function yn(e,r,t){var a=e.content;if(!a)return{};Vr(a,0);var n,i,s,l,f=0;a.chk("feff","Byte Order: ");a._R(2);var c=a._R(4);var o=a._R(16);if(o!==U.utils.consts.HEADER_CLSID&&o!==t)throw new Error("Bad PropertySet CLSID "+o);n=a._R(4);if(n!==1&&n!==2)throw new Error("Unrecognized
c:n});l[a][n]=[l[a][n],w];break;default:if(r&&r.WTF)throw new Error("SYLK bad record "+m);}if(S){l[a][n]=E;c=null}break;case"F":var B=0;for(s=1;s<b.length;++s)switch(b[s].charAt(0)){case"X":n=parseInt(b[s].slice(1))-1;++B;break;case"Y":a=parseInt(b[s].slice(1))-1;for(p=l.length;p<=a;++p)l[p]=[];break;case"M":v=parseInt(b[s].slice(1))/20;break;case"F":break;case"G":break;case"P":c=f[parseInt(b[s].slice(1))];break;case"S":break;case"D":break;case"N":break;case"W":d=b[s].slice(1).split(" ");for(p=parseInt(d[0],10);p<=parseInt(d[1],10);++p){v=parseInt(d[2],10);h[p-1]=v===0?{hidden:true}:{wch:v};nf(h[p-1])}break;case"C":n=parseInt(b[s].slice(1))-1;if(!h[n])h[n]={};break;case"R":a=parseInt(b[s].slice(1))-1;if(!u[a])u[a]={};if(v>0){u[a].hpt=v;u[a].hpx=cf(v)}else if(v===0)u[a].hidden=true;break;default:if(r&&r.WTF)throw new Error("SYLK bad record "+m);}if(B<1)c=null;break;default:if(r&&r.WTF)throw new Error("SYLK bad record "+m);}}if(u.length>0)o["!rows"]=u;if(h.length>0)o["!cols"]=h;if(r&&r.sheetRows)l=l.slice(0,r.sheetRows);return[l,o]}function t(r,t){var a=e(r,t);var n=a[0],i=a[1];var s=bt(n,t);G(i).forEach(function(e){s[e]=i[e]});return s}function a(e,r){return pt(t(e,r),r)}function n(e,r,t,a){var n="C;Y"+(t+1)+";X"+(a+1)+";K";switch(e.t){case"n":n+=e.v||0;if(e.f&&!e.F)n+=";E"+Xc(e.f,{r:t,c:a});break;case"b":n+=e.v?"TRUE":"FALSE";break;case"e":n+=e.w||e.v;break;case"d":n+='"'+(e.w||e.v)+'"';break;case"s":n+='"'+e.v.replace(/"/g,"")+'"';break;}return n}function i(e,r){r.forEach(function(r,t){var a="F;W"+(t+1)+" "+(t+1)+" ";if(r.hidden)a+="0";else{if(typeof r.width=="number")r.wpx=ql(r.width);if(typeof r.wpx=="number")r.wch=ef(r.wpx);if(typeof r.wch=="number")a+=Math.round(r.wch)}if(a.charAt(a.length-1)!=" ")e.push(a)})}function s(e,r){r.forEach(function(r,t){var a="F;";if(r.hidden)a+="M0;";else if(r.hpt)a+="M"+20*r.hpt+";";else if(r.hpx)a+="M"+20*ff(r.hpx)+";";if(a.length>2)e.push(a+"R"+(t+1))})}function l(e,r){var t=["ID;PWXL;N;E"],a=[];var l=ht(e["!ref"]),f;var c=Array.isArray(e);var o="\r\n";t.push("P;PGeneral");t.push("F;P0;DG0G8;M255");if(e["!cols"])i(t,e["!cols"]);if(e["!rows"])s(t,e["!rows"]);t.push("B;Y"+(l.e.r-l.s.r+1)+";X"+(l.e.c-l.s.c+1)+";D"+[l.s.c,l.s.r,l.e.c,l.e.r].join(" "));for(var u=l.s.r;u<=l.e.r;++u){for(var h=l.s.c;h<=l.e.c;++h){var d=ct({r:u,c:h});f=c?(e[u]||[])[h]:e[d];if(!f||f.v==null&&(!f.f||f.F))continue;a.push(n(f,e,u,h,r))}}return t.join(o)+o+a.join(o)+o+"E"+o}return{to_workbook:a,to_sheet:t,from_sheet:l}}();var qs=function(){function e(e,t){switch(t.type){case"base64":return r(b.decode(e),t);case"binary":return r(e,t);case"buffer":return r(e.toString("binary"),t);case"array":return r(ne(e),t);}throw new Error("Unrecognized type "+t.type)}function r(e,r){var t=e.split("\n"),a=-1,n=-1,i=0,s=[];for(;i!==t.length;++i){if(t[i].trim()==="BOT"){s[++a]=[];n=0;continue}if(a<0)continue;var l=t[i].trim().split(",");var f=l[0],c=l[1];++i;var o=t[i].trim();switch(+f){case-1:if(o==="BOT"){s[++a]=[];n=0;continue}else if(o!=="EOD")throw new Error("Unrecognized DIF special command "+o);break;case 0:if(o==="TRUE")s[a][n]=true;else if(o==="FALSE")s[a][n]=false;else if(!isNaN(le(c)))s[a][n]=le(c);else if(!isNaN(fe(c).getDate()))s[a][n]=ae(c);else s[a][n]=c;++n;break;case 1:o=o.slice(1,o.length-1);s[a][n++]=o!==""?o:null;break;}if(o==="EOD")break}if(r&&r.sheetRows)s=s.slice(0,r.sheetRows);return s}function t(r,t){return bt(e(r,t),t)}function a(e,r){return pt(t(e,r),r)}var n=function(){var e=function t(e,r,a,n,i){e.push(r);e.push(a+","+n);e.push('"'+i.replace(/"/g,'""')+'"')};var r=function a(e,r,t,n){e.push(r+","+t);e.push(r==1?'"'+n.replace(/"/g,'""')+'"':n)};return function n(t){var a=[];var n=ht(t["!ref"]),i;var s=Array.isArray(t);e(a,"TABLE",0,1,"sheetjs");e(a,"VECTORS",0,n.e.r-n.s.r+1,"");e(a,"TUPLES",0,n.e.c-n.s.c+1,"");e(a,"DATA",0,0,"");for(var l=n.s.r;l<=n.e.r;++l){r(a,-1,0,"BOT");for(var f=n.s.c;f<=n.e.c;++f){var c=ct({r:l,c:f});i=s?(t[l]||[])[f]:t[c];if(!i){r(a,1,0,"");continue}switch(i.t){case"n":var o=m?i.w:i.v;if(!o&&i.v!=null)o=i.v;if(o==null){if(m&&i.f&&!i.F)r(a,1,0,"="+i.f);else r(a,1,0,"")}else r(a,0
n.condense=1;break;case"<extend":n.extend=l.val?We(l.val):1;break;case"<extend/>":n.extend=1;break;case"<sz":if(l.val)n.sz=+l.val;break;case"<sz/>":;case"</sz>":break;case"<vertAlign":if(l.val)n.vertAlign=l.val;break;case"<vertAlign/>":;case"</vertAlign>":break;case"<family":if(l.val)n.family=parseInt(l.val,10);break;case"<family/>":;case"</family>":break;case"<scheme":if(l.val)n.scheme=l.val;break;case"<scheme/>":;case"</scheme>":break;case"<charset":if(l.val=="1")break;l.codepage=i[parseInt(l.val,10)];break;case"<color":if(!n.color)n.color={};if(l.auto)n.color.auto=We(l.auto);if(l.rgb)n.color.rgb=l.rgb.slice(-6);else if(l.indexed){n.color.index=parseInt(l.indexed,10);var f=Sa[n.color.index];if(n.color.index==81)f=Sa[1];if(!f)throw new Error(e);n.color.rgb=f[0].toString(16)+f[1].toString(16)+f[2].toString(16)}else if(l.theme){n.color.theme=parseInt(l.theme,10);if(l.tint)n.color.tint=parseFloat(l.tint);if(l.theme&&t.themeElements&&t.themeElements.clrScheme){n.color.rgb=Kl(t.themeElements.clrScheme[n.color.theme].rgb,n.color.tint||0)}}break;case"<color/>":;case"</color>":break;case"<extLst":;case"<extLst>":;case"</extLst>":break;case"<ext":s=true;break;case"</ext>":s=false;break;default:if(a&&a.WTF){if(!s)throw new Error("unrecognized "+l[0]+" in fonts")};}})}function vf(e,r,t){r.NumberFmt=[];var a=G(y._table);for(var n=0;n<a.length;++n)r.NumberFmt[a[n]]=y._table[a[n]];var i=e[0].match(Be);if(!i)return;for(n=0;n<i.length;++n){var s=xe(i[n]);switch(Ie(s[0])){case"<numFmts":;case"</numFmts>":;case"<numFmts/>":;case"<numFmts>":break;case"<numFmt":{var l=_e(Ve(s.formatCode)),f=parseInt(s.numFmtId,10);r.NumberFmt[f]=l;if(f>0){if(f>392){for(f=392;f>60;--f)if(r.NumberFmt[f]==null)break;r.NumberFmt[f]=l}y.load(l,f)}}break;case"</numFmt>":break;default:if(t.WTF)throw new Error("unrecognized "+s[0]+" in numFmts");}}}function pf(e){var r=["<numFmts>"];[[5,8],[23,26],[41,44],[50,392]].forEach(function(t){for(var a=t[0];a<=t[1];++a)if(e[a]!=null)r[r.length]=rr("numFmt",null,{numFmtId:a,formatCode:De(e[a])})});if(r.length===1)return"";r[r.length]="</numFmts>";r[0]=rr("numFmts",null,{count:r.length-2}).replace("/>",">");return r.join("")}var mf=["numFmtId","fillId","fontId","borderId","xfId"];var bf=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","pivotButton","quotePrefix"];function gf(e,r,t){r.CellXf=[];var a;var n=false;e[0].match(Be).forEach(function(e){var i=xe(e),s=0;switch(Ie(i[0])){case"<cellXfs":;case"<cellXfs>":;case"<cellXfs/>":;case"</cellXfs>":break;case"<xf":;case"<xf/>":a=i;delete a[0];for(s=0;s<mf.length;++s)if(a[mf[s]])a[mf[s]]=parseInt(a[mf[s]],10);for(s=0;s<bf.length;++s)if(a[bf[s]])a[bf[s]]=We(a[bf[s]]);if(a.numFmtId>392){for(s=392;s>60;--s)if(r.NumberFmt[a.numFmtId]==r.NumberFmt[s]){a.numFmtId=s;break}}r.CellXf.push(a);break;case"</xf>":break;case"<alignment":;case"<alignment/>":var l={};if(i.vertical)l.vertical=i.vertical;if(i.horizontal)l.horizontal=i.horizontal;if(i.textRotation!=null)l.textRotation=i.textRotation;if(i.indent)l.indent=i.indent;if(i.wrapText)l.wrapText=i.wrapText;a.alignment=l;break;case"</alignment>":break;case"<protection":;case"</protection>":;case"<protection/>":break;case"<extLst":;case"<extLst>":;case"</extLst>":break;case"<ext":n=true;break;case"</ext>":n=false;break;default:if(t&&t.WTF){if(!n)throw new Error("unrecognized "+i[0]+" in cellXfs")};}})}function Ef(e){var r=[];r[r.length]=rr("cellXfs",null);e.forEach(function(e){r[r.length]=rr("xf",null,e)});r[r.length]="</cellXfs>";if(r.length===2)return"";r[0]=rr("cellXfs",null,{count:r.length-2}).replace("/>",">");return r.join("")}var Sf=function nb(){var e=/<(?:\w+:)?numFmts([^>]*)>[\S\s]*?<\/(?:\w+:)?numFmts>/;var r=/<(?:\w+:)?cellXfs([^>]*)>[\S\s]*?<\/(?:\w+:)?cellXfs>/;var t=/<(?:\w+:)?fills([^>]*)>[\S\s]*?<\/(?:\w+:)?fills>/;var a=/<(?:\w+:)?fonts([^>]*)>[\S\s]*?<\/(?:\w+:)?fonts>/;var n=/<(?:\w+:)?borders([^>]*)>[\S\s]*?<\/(?:\w+:)?borders>/;return function i(s,l,f){var c={};if(!s)return c;s=s.replace(/<!--([\s\S]*?)-->/gm,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");var o;if(o=s.match(
}function Kc(e){e.l+=1;return}function Yc(e,r){var t=e._R(r==1?1:2);return[t&16383,t>>14&1,t>>15&1]}function Qc(e,r,t){var a=2;if(t){if(t.biff>=2&&t.biff<=5)return Jc(e,r,t);else if(t.biff==12)a=4}var n=e._R(a),i=e._R(a);var s=Yc(e,2);var l=Yc(e,2);return{s:{r:n,c:s[0],cRel:s[1],rRel:s[2]},e:{r:i,c:l[0],cRel:l[1],rRel:l[2]}}}function Jc(e){var r=Yc(e,2),t=Yc(e,2);var a=e._R(1);var n=e._R(1);return{s:{r:r[0],c:a,cRel:r[1],rRel:r[2]},e:{r:t[0],c:n,cRel:t[1],rRel:t[2]}}}function Zc(e,r,t){if(t.biff<8)return Jc(e,r,t);var a=e._R(t.biff==12?4:2),n=e._R(t.biff==12?4:2);var i=Yc(e,2);var s=Yc(e,2);return{s:{r:a,c:i[0],cRel:i[1],rRel:i[2]},e:{r:n,c:s[0],cRel:s[1],rRel:s[2]}}}function qc(e,r,t){if(t&&t.biff>=2&&t.biff<=5)return eo(e,r,t);var a=e._R(t&&t.biff==12?4:2);var n=Yc(e,2);return{r:a,c:n[0],cRel:n[1],rRel:n[2]}}function eo(e){var r=Yc(e,2);var t=e._R(1);return{r:r[0],c:t,cRel:r[1],rRel:r[2]}}function ro(e){var r=e._R(2);var t=e._R(2);return{r:r,c:t&255,fQuoted:!!(t&16384),cRel:t>>15,rRel:t>>15}}function to(e,r,t){var a=t&&t.biff?t.biff:8;if(a>=2&&a<=5)return ao(e,r,t);var n=e._R(a>=12?4:2);var i=e._R(2);var s=(i&16384)>>14,l=(i&32768)>>15;i&=16383;if(l==1)while(n>524287)n-=1048576;if(s==1)while(i>8191)i=i-16384;return{r:n,c:i,cRel:s,rRel:l}}function ao(e){var r=e._R(2);var t=e._R(1);var a=(r&32768)>>15,n=(r&16384)>>14;r&=16383;if(a==1&&r>=8192)r=r-16384;if(n==1&&t>=128)t=t-256;return{r:r,c:t,cRel:n,rRel:a}}function no(e,r,t){var a=(e[e.l++]&96)>>5;var n=Qc(e,t.biff>=2&&t.biff<=5?6:8,t);return[a,n]}function io(e,r,t){var a=(e[e.l++]&96)>>5;var n=e._R(2,"i");var i=8;if(t)switch(t.biff){case 5:e.l+=12;i=6;break;case 12:i=12;break;}var s=Qc(e,i,t);return[a,n,s]}function so(e,r,t){var a=(e[e.l++]&96)>>5;e.l+=t&&t.biff>8?12:t.biff<8?6:8;return[a]}function lo(e,r,t){var a=(e[e.l++]&96)>>5;var n=e._R(2);var i=8;if(t)switch(t.biff){case 5:e.l+=12;i=6;break;case 12:i=12;break;}e.l+=i;return[a,n]}function fo(e,r,t){var a=(e[e.l++]&96)>>5;var n=Zc(e,r-1,t);return[a,n]}function co(e,r,t){var a=(e[e.l++]&96)>>5;e.l+=t.biff==2?6:t.biff==12?14:7;return[a]}function oo(e){var r=e[e.l+1]&1;var t=1;e.l+=4;return[r,t]}function uo(e,r,t){e.l+=2;var a=e._R(t&&t.biff==2?1:2);var n=[];for(var i=0;i<=a;++i)n.push(e._R(t&&t.biff==2?1:2));return n}function ho(e,r,t){var a=e[e.l+1]&255?1:0;e.l+=2;return[a,e._R(t&&t.biff==2?1:2)]}function vo(e,r,t){var a=e[e.l+1]&255?1:0;e.l+=2;return[a,e._R(t&&t.biff==2?1:2)]}function po(e){var r=e[e.l+1]&255?1:0;e.l+=2;return[r,e._R(2)]}function mo(e,r,t){var a=e[e.l+1]&255?1:0;e.l+=t&&t.biff==2?3:4;return[a]}function bo(e){var r=e._R(1),t=e._R(1);return[r,t]}function go(e){e._R(2);return bo(e,2)}function Eo(e){e._R(2);return bo(e,2)}function So(e,r,t){var a=(e[e.l]&96)>>5;e.l+=1;var n=qc(e,0,t);return[a,n]}function ko(e,r,t){var a=(e[e.l]&96)>>5;e.l+=1;var n=to(e,0,t);return[a,n]}function wo(e,r,t){var a=(e[e.l]&96)>>5;e.l+=1;var n=e._R(2);if(t&&t.biff==5)e.l+=12;var i=qc(e,0,t);return[a,n,i]}function Bo(e,r,t){var a=(e[e.l]&96)>>5;e.l+=1;var n=e._R(t&&t.biff<=3?1:2);return[Mu[n],Nu[n],a]}function Co(e,r,t){var a=e[e.l++];var n=e._R(1),i=t&&t.biff<=3?[a==88?-1:0,e._R(1)]:To(e);return[n,(i[0]===0?Nu:Pu)[i[1]]]}function To(e){return[e[e.l+1]>>7,e._R(2)&32767]}function xo(e,r,t){e.l+=t&&t.biff==2?3:4;return}function Io(e,r,t){e.l++;if(t&&t.biff==12)return[e._R(4,"i"),0];var a=e._R(2);var n=e._R(t&&t.biff==2?1:2);return[a,n]}function Ao(e){e.l++;return Gt[e._R(1)]}function Ro(e){e.l++;return e._R(2)}function _o(e){e.l++;return e._R(1)!==0}function yo(e){e.l++;return Ht(e,8)}function Fo(e,r,t){e.l++;return Xn(e,r-1,t)}function Do(e,r){var t=[e._R(1)];if(r==12)switch(t[0]){case 2:t[0]=4;break;case 4:t[0]=16;break;case 0:t[0]=1;break;case 1:t[0]=2;break;}switch(t[0]){case 4:t[1]=Nn(e,1)?"TRUE":"FALSE";if(r!=12)e.l+=7;break;case 37:;case 16:t[1]=Gt[e[e.l]];e.l+=r==12?4:8;break;case 0:e.l+=8;break;case 1:t[1]=Ht(e,8);break;case 2:t[1]=$n(e,0,{biff:r>0&&r<8?2:r});break;default:throw new Error("Bad SerAr: "+t[0]);}return t}function Oo(e,r,t){var a=e._R(t.biff==12?4:2);var n=[];for(var i=0;i!=a;++i)n.push((t.biff==12?Wt:ui)(e
"_xlfn.BINOM.INV":"BINOM.INV","_xlfn.BITAND":"BITAND","_xlfn.BITLSHIFT":"BITLSHIFT","_xlfn.BITOR":"BITOR","_xlfn.BITRSHIFT":"BITRSHIFT","_xlfn.BITXOR":"BITXOR","_xlfn.CEILING.MATH":"CEILING.MATH","_xlfn.CEILING.PRECISE":"CEILING.PRECISE","_xlfn.CHISQ.DIST":"CHISQ.DIST","_xlfn.CHISQ.DIST.RT":"CHISQ.DIST.RT","_xlfn.CHISQ.INV":"CHISQ.INV","_xlfn.CHISQ.INV.RT":"CHISQ.INV.RT","_xlfn.CHISQ.TEST":"CHISQ.TEST","_xlfn.COMBINA":"COMBINA","_xlfn.CONCAT":"CONCAT","_xlfn.CONFIDENCE.NORM":"CONFIDENCE.NORM","_xlfn.CONFIDENCE.T":"CONFIDENCE.T","_xlfn.COT":"COT","_xlfn.COTH":"COTH","_xlfn.COUNTIFS":"COUNTIFS","_xlfn.COVARIANCE.P":"COVARIANCE.P","_xlfn.COVARIANCE.S":"COVARIANCE.S","_xlfn.CSC":"CSC","_xlfn.CSCH":"CSCH","_xlfn.DAYS":"DAYS","_xlfn.DECIMAL":"DECIMAL","_xlfn.ECMA.CEILING":"ECMA.CEILING","_xlfn.ERF.PRECISE":"ERF.PRECISE","_xlfn.ERFC.PRECISE":"ERFC.PRECISE","_xlfn.EXPON.DIST":"EXPON.DIST","_xlfn.F.DIST":"F.DIST","_xlfn.F.DIST.RT":"F.DIST.RT","_xlfn.F.INV":"F.INV","_xlfn.F.INV.RT":"F.INV.RT","_xlfn.F.TEST":"F.TEST","_xlfn.FILTERXML":"FILTERXML","_xlfn.FLOOR.MATH":"FLOOR.MATH","_xlfn.FLOOR.PRECISE":"FLOOR.PRECISE","_xlfn.FORECAST.ETS":"FORECAST.ETS","_xlfn.FORECAST.ETS.CONFINT":"FORECAST.ETS.CONFINT","_xlfn.FORECAST.ETS.SEASONALITY":"FORECAST.ETS.SEASONALITY","_xlfn.FORECAST.ETS.STAT":"FORECAST.ETS.STAT","_xlfn.FORECAST.LINEAR":"FORECAST.LINEAR","_xlfn.FORMULATEXT":"FORMULATEXT","_xlfn.GAMMA":"GAMMA","_xlfn.GAMMA.DIST":"GAMMA.DIST","_xlfn.GAMMA.INV":"GAMMA.INV","_xlfn.GAMMALN.PRECISE":"GAMMALN.PRECISE","_xlfn.GAUSS":"GAUSS","_xlfn.HYPGEOM.DIST":"HYPGEOM.DIST","_xlfn.IFERROR":"IFERROR","_xlfn.IFNA":"IFNA","_xlfn.IFS":"IFS","_xlfn.IMCOSH":"IMCOSH","_xlfn.IMCOT":"IMCOT","_xlfn.IMCSC":"IMCSC","_xlfn.IMCSCH":"IMCSCH","_xlfn.IMSEC":"IMSEC","_xlfn.IMSECH":"IMSECH","_xlfn.IMSINH":"IMSINH","_xlfn.IMTAN":"IMTAN","_xlfn.ISFORMULA":"ISFORMULA","_xlfn.ISO.CEILING":"ISO.CEILING","_xlfn.ISOWEEKNUM":"ISOWEEKNUM","_xlfn.LOGNORM.DIST":"LOGNORM.DIST","_xlfn.LOGNORM.INV":"LOGNORM.INV","_xlfn.MAXIFS":"MAXIFS","_xlfn.MINIFS":"MINIFS","_xlfn.MODE.MULT":"MODE.MULT","_xlfn.MODE.SNGL":"MODE.SNGL","_xlfn.MUNIT":"MUNIT","_xlfn.NEGBINOM.DIST":"NEGBINOM.DIST","_xlfn.NETWORKDAYS.INTL":"NETWORKDAYS.INTL","_xlfn.NIGBINOM":"NIGBINOM","_xlfn.NORM.DIST":"NORM.DIST","_xlfn.NORM.INV":"NORM.INV","_xlfn.NORM.S.DIST":"NORM.S.DIST","_xlfn.NORM.S.INV":"NORM.S.INV","_xlfn.NUMBERVALUE":"NUMBERVALUE","_xlfn.PDURATION":"PDURATION","_xlfn.PERCENTILE.EXC":"PERCENTILE.EXC","_xlfn.PERCENTILE.INC":"PERCENTILE.INC","_xlfn.PERCENTRANK.EXC":"PERCENTRANK.EXC","_xlfn.PERCENTRANK.INC":"PERCENTRANK.INC","_xlfn.PERMUTATIONA":"PERMUTATIONA","_xlfn.PHI":"PHI","_xlfn.POISSON.DIST":"POISSON.DIST","_xlfn.QUARTILE.EXC":"QUARTILE.EXC","_xlfn.QUARTILE.INC":"QUARTILE.INC","_xlfn.QUERYSTRING":"QUERYSTRING","_xlfn.RANK.AVG":"RANK.AVG","_xlfn.RANK.EQ":"RANK.EQ","_xlfn.RRI":"RRI","_xlfn.SEC":"SEC","_xlfn.SECH":"SECH","_xlfn.SHEET":"SHEET","_xlfn.SHEETS":"SHEETS","_xlfn.SKEW.P":"SKEW.P","_xlfn.STDEV.P":"STDEV.P","_xlfn.STDEV.S":"STDEV.S","_xlfn.SUMIFS":"SUMIFS","_xlfn.SWITCH":"SWITCH","_xlfn.T.DIST":"T.DIST","_xlfn.T.DIST.2T":"T.DIST.2T","_xlfn.T.DIST.RT":"T.DIST.RT","_xlfn.T.INV":"T.INV","_xlfn.T.INV.2T":"T.INV.2T","_xlfn.T.TEST":"T.TEST","_xlfn.TEXTJOIN":"TEXTJOIN","_xlfn.UNICHAR":"UNICHAR","_xlfn.UNICODE":"UNICODE","_xlfn.VAR.P":"VAR.P","_xlfn.VAR.S":"VAR.S","_xlfn.WEBSERVICE":"WEBSERVICE","_xlfn.WEIBULL.DIST":"WEIBULL.DIST","_xlfn.WORKDAY.INTL":"WORKDAY.INTL","_xlfn.XOR":"XOR","_xlfn.Z.TEST":"Z.TEST"};function Uu(e){if(e.slice(0,3)=="of:")e=e.slice(3);if(e.charCodeAt(0)==61){e=e.slice(1);if(e.charCodeAt(0)==61)e=e.slice(1)}e=e.replace(/COM\.MICROSOFT\./g,"");e=e.replace(/\[((?:\.[A-Z]+[0-9]+)(?::\.[A-Z]+[0-9]+)?)\]/g,function(e,r){return r.replace(/\./g,"")});e=e.replace(/\[.(#[A-Z]*[?!])\]/g,"$1");return e.replace(/[;~]/g,",").replace(/\|/g,";")}function Wu(e){var r="of:="+e.replace(Hc,"$1[.$2$3$4$5]").replace(/\]:\[/g,":");return r.replace(/;/g,"|").replace(/,/g,";")}function Vu(e){var r=e.split(":");var t=r[0].split(".")[0];return[t,r[0].split(".")[1]+(r.length>1?":"+(r[1].split(".")[1]||r[1].sp
var Pd=[["activeTab",0,"int"],["autoFilterDateGrouping",true,"bool"],["firstSheet",0,"int"],["minimized",false,"bool"],["showHorizontalScroll",true,"bool"],["showSheetTabs",true,"bool"],["showVerticalScroll",true,"bool"],["tabRatio",600,"int"],["visibility","visible"]];var Nd=[];var Md=[["calcCompleted","true"],["calcMode","auto"],["calcOnSave","true"],["concurrentCalc","true"],["fullCalcOnLoad","false"],["fullPrecision","true"],["iterate","false"],["iterateCount","100"],["iterateDelta","0.001"],["refMode","A1"]];function Ld(e,r){for(var t=0;t!=e.length;++t){var a=e[t];for(var n=0;n!=r.length;++n){var i=r[n];if(a[i[0]]==null)a[i[0]]=i[1];else switch(i[2]){case"bool":if(typeof a[i[0]]=="string")a[i[0]]=We(a[i[0]]);break;case"int":if(typeof a[i[0]]=="string")a[i[0]]=parseInt(a[i[0]],10);break;}}}}function Ud(e,r){for(var t=0;t!=r.length;++t){var a=r[t];if(e[a[0]]==null)e[a[0]]=a[1];else switch(a[2]){case"bool":if(typeof e[a[0]]=="string")e[a[0]]=We(e[a[0]]);break;case"int":if(typeof e[a[0]]=="string")e[a[0]]=parseInt(e[a[0]],10);break;}}}function Wd(e){Ud(e.WBProps,Od);Ud(e.CalcPr,Md);Ld(e.WBView,Pd);Ld(e.Sheets,Nd);Gu.date1904=We(e.WBProps.date1904)}function Vd(e){if(!e.Workbook)return"false";if(!e.Workbook.WBProps)return"false";return We(e.Workbook.WBProps.date1904)?"true":"false"}var Hd="][*?/\\".split("");function Xd(e,r){if(e.length>31){if(r)return false;throw new Error("Sheet names cannot exceed 31 chars")}var t=true;Hd.forEach(function(a){if(e.indexOf(a)==-1)return;if(!r)throw new Error("Sheet name cannot contain : \\ / ? * [ ]");t=false});return t}function Gd(e,r,t){e.forEach(function(a,n){Xd(a);for(var i=0;i<n;++i)if(a==e[i])throw new Error("Duplicate Sheet Name: "+a);if(t){var s=r&&r[n]&&r[n].CodeName||a;if(s.charCodeAt(0)==95&&s.length>22)throw new Error("Bad Code Name: Worksheet"+s)}})}function zd(e){if(!e||!e.SheetNames||!e.Sheets)throw new Error("Invalid Workbook");if(!e.SheetNames.length)throw new Error("Workbook is empty");var r=e.Workbook&&e.Workbook.Sheets||[];Gd(e.SheetNames,r,!!e.vbaraw);for(var t=0;t<e.SheetNames.length;++t)Ju(e.Sheets[e.SheetNames[t]],e.SheetNames[t],t)}var jd=/<\w+:workbook/;function $d(e,r){if(!e)throw new Error("Could not find file");var t={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},Names:[],xmlns:""};var a=false,n="xmlns";var i={},s=0;e.replace(Be,function l(f,c){var o=xe(f);switch(Ie(o[0])){case"<?xml":break;case"<workbook":if(f.match(jd))n="xmlns"+f.match(/<(\w+):/)[1];t.xmlns=o[n];break;case"</workbook>":break;case"<fileVersion":delete o[0];t.AppVersion=o;break;case"<fileVersion/>":;case"</fileVersion>":break;case"<fileSharing":;case"<fileSharing/>":break;case"<workbookPr":;case"<workbookPr/>":Od.forEach(function(e){if(o[e[0]]==null)return;switch(e[2]){case"bool":t.WBProps[e[0]]=We(o[e[0]]);break;case"int":t.WBProps[e[0]]=parseInt(o[e[0]],10);break;default:t.WBProps[e[0]]=o[e[0]];}});if(o.codeName)t.WBProps.CodeName=o.codeName;break;case"</workbookPr>":break;case"<workbookProtection":break;case"<workbookProtection/>":break;case"<bookViews":;case"<bookViews>":;case"</bookViews>":break;case"<workbookView":;case"<workbookView/>":delete o[0];t.WBView.push(o);break;case"</workbookView>":break;case"<sheets":;case"<sheets>":;case"</sheets>":break;case"<sheet":switch(o.state){case"hidden":o.Hidden=1;break;case"veryHidden":o.Hidden=2;break;default:o.Hidden=0;}delete o.state;o.name=_e(Ve(o.name));delete o[0];t.Sheets.push(o);break;case"</sheet>":break;case"<functionGroups":;case"<functionGroups/>":break;case"<functionGroup":break;case"<externalReferences":;case"</externalReferences>":;case"<externalReferences>":break;case"<externalReference":break;case"<definedNames/>":break;case"<definedNames>":;case"<definedNames":a=true;break;case"</definedNames>":a=false;break;case"<definedName":{i={};i.Name=o.name;if(o.comment)i.Comment=o.comment;if(o.localSheetId)i.Sheet=+o.localSheetId;s=c+f.length}break;case"</definedName>":{i.Ref=e.slice(s,c);t.Names.push(i)}break;case"<definedName/>":break;case"<calcPr":delete o[0];t.CalcPr=o;break;case"<calcPr/>":delete o[0];t.CalcPr=o;break;case"
xmlns:"http://www.w3.org/TR/REC-html40"});return rr("Comment",t,{"ss:Author":e.a})}).join("")}function Kv(e,r,t,a,n,i,s){if(!e||e.v==undefined&&e.f==undefined)return"";var l={};if(e.f)l["ss:Formula"]="="+De(Xc(e.f,s));if(e.F&&e.F.slice(0,r.length)==r){var f=ft(e.F.slice(r.length+1));l["ss:ArrayRange"]="RC:R"+(f.r==s.r?"":"["+(f.r-s.r)+"]")+"C"+(f.c==s.c?"":"["+(f.c-s.c)+"]")}if(e.l&&e.l.Target){l["ss:HRef"]=De(e.l.Target);if(e.l.Tooltip)l["x:HRefScreenTip"]=De(e.l.Tooltip)}if(t["!merges"]){var c=t["!merges"];for(var o=0;o!=c.length;++o){if(c[o].s.c!=s.c||c[o].s.r!=s.r)continue;if(c[o].e.c>c[o].s.c)l["ss:MergeAcross"]=c[o].e.c-c[o].s.c;if(c[o].e.r>c[o].s.r)l["ss:MergeDown"]=c[o].e.r-c[o].s.r}}var u="",h="";switch(e.t){case"z":return"";case"n":u="Number";h=String(e.v);break;case"b":u="Boolean";h=e.v?"1":"0";break;case"e":u="Error";h=Gt[e.v];break;case"d":u="DateTime";h=new Date(e.v).toISOString();if(e.z==null)e.z=e.z||y._table[14];break;case"s":u="String";h=Me(e.v||"");break;}var d=Yu(a.cellXfs,e,a);l["ss:StyleID"]="s"+(21+d);l["ss:Index"]=s.c+1;var v=e.v!=null?h:"";var p='<Data ss:Type="'+u+'">'+v+"</Data>";if((e.c||[]).length>0)p+=$v(e.c);return rr("Cell",p,l)}function Yv(e,r){var t='<Row ss:Index="'+(e+1)+'"';if(r){if(r.hpt&&!r.hpx)r.hpx=cf(r.hpt);if(r.hpx)t+=' ss:AutoFitHeight="0" ss:Height="'+r.hpx+'"';if(r.hidden)t+=' ss:Hidden="1"'}return t+">"}function Qv(e,r,t,a){if(!e["!ref"])return"";var n=ht(e["!ref"]);var i=e["!merges"]||[],s=0;var l=[];if(e["!cols"])e["!cols"].forEach(function(e,r){nf(e);var t=!!e.width;var a=$u(r,e);var n={"ss:Index":r+1};if(t)n["ss:Width"]=ql(a.width);if(e.hidden)n["ss:Hidden"]="1";l.push(rr("Column",null,n))});var f=Array.isArray(e);for(var c=n.s.r;c<=n.e.r;++c){var o=[Yv(c,(e["!rows"]||[])[c])];for(var u=n.s.c;u<=n.e.c;++u){var h=false;for(s=0;s!=i.length;++s){if(i[s].s.c>u)continue;if(i[s].s.r>c)continue;if(i[s].e.c<u)continue;if(i[s].e.r<c)continue;if(i[s].s.c!=u||i[s].s.r!=c)h=true;break}if(h)continue;var d={r:c,c:u};var v=ct(d),p=f?(e[c]||[])[u]:e[v];o.push(Kv(p,v,e,r,t,a,d))}o.push("</Row>");if(o.length>2)l.push(o.join(""))}return l.join("")}function Jv(e,r,t){var a=[];var n=t.SheetNames[e];var i=t.Sheets[n];var s=i?zv(i,r,e,t):"";if(s.length>0)a.push("<Names>"+s+"</Names>");s=i?Qv(i,r,e,t):"";if(s.length>0)a.push("<Table>"+s+"</Table>");a.push(jv(i,r,e,t));return a.join("")}function Zv(e,r){if(!r)r={};if(!e.SSF)e.SSF=y.get_table();if(e.SSF){F(y);y.load_table(e.SSF);r.revssf=K(e.SSF);r.revssf[e.SSF[65535]]=0;r.ssf=e.SSF;r.cellXfs=[];Yu(r.cellXfs,{},{revssf:{General:0}})}var t=[];t.push(Wv(e,r));t.push(Vv(e,r));t.push("");t.push("");for(var a=0;a<e.SheetNames.length;++a)t.push(rr("Worksheet",Jv(a,r,e),{"ss:Name":De(e.SheetNames[a])}));t[2]=Hv(e,r);t[3]=Gv(e,r);return ke+rr("Workbook",t.join(""),{xmlns:ir.ss,"xmlns:o":ir.o,"xmlns:x":ir.x,"xmlns:ss":ir.ss,"xmlns:dt":ir.dt,"xmlns:html":ir.html})}function qv(e){var r={};var t=e.content;t.l=28;r.AnsiUserType=t._R(0,"lpstr-ansi");r.AnsiClipboardFormat=Jt(t);if(t.length-t.l<=4)return r;var a=t._R(4);if(a==0||a>40)return r;t.l-=4;r.Reserved1=t._R(0,"lpstr-ansi");if(t.length-t.l<=4)return r;a=t._R(4);if(a!==1907505652)return r;r.UnicodeClipboardFormat=Zt(t);a=t._R(4);if(a==0||a>40)return r;t.l-=4;r.Reserved2=t._R(0,"lpwstr")}function ep(e,r,t,a){var n=t;var i=[];var s=r.slice(r.l,r.l+n);if(a&&a.enc&&a.enc.insitu)switch(e.n){case"BOF":;case"FilePass":;case"FileLock":;case"InterfaceHdr":;case"RRDInfo":;case"RRDHead":;case"UsrExcl":break;default:if(s.length===0)break;a.enc.insitu(s);}i.push(s);r.l+=n;var l=up[_r(r,r.l)];var f=0;while(l!=null&&l.n.slice(0,8)==="Continue"){n=_r(r,r.l+2);f=r.l+4;if(l.n=="ContinueFrt")f+=4;else if(l.n.slice(0,11)=="ContinueFrt")f+=12;i.push(r.slice(f,r.l+4+n));r.l+=4+n;l=up[_r(r,r.l)]}var c=A(i);Vr(c,0);var o=0;c.lens=[];for(var u=0;u<i.length;++u){c.lens.push(o);o+=i[u].length}return e.f(c,c.length,a)}function rp(e,r,t){if(e.t==="z")return;if(!e.XF)return;var a=0;try{a=e.z||e.XF.numFmtId||0;if(r.cellNF)e.z=y._table[a]}catch(n){if(r.WTF)throw n}if(!r||r.cellText!==false)try{if(e.t==="e"){e.w=e.w||Gt[e.v]}else if(a==
},472:{n:"BrtExternValueMeta"},473:{n:"BrtBeginColorPalette"},474:{n:"BrtEndColorPalette"},475:{n:"BrtIndexedColor"},476:{n:"BrtMargins",f:ld},477:{n:"BrtPrintOptions"},478:{n:"BrtPageSetup"},479:{n:"BrtBeginHeaderFooter"},480:{n:"BrtEndHeaderFooter"},481:{n:"BrtBeginSXCrtFormat"},482:{n:"BrtEndSXCrtFormat"},483:{n:"BrtBeginSXCrtFormats"},484:{n:"BrtEndSXCrtFormats"},485:{n:"BrtWsFmtInfo",f:Fh},486:{n:"BrtBeginMgs"},487:{n:"BrtEndMGs"},488:{n:"BrtBeginMGMaps"},489:{n:"BrtEndMGMaps"},490:{n:"BrtBeginMG"},491:{n:"BrtEndMG"},492:{n:"BrtBeginMap"},493:{n:"BrtEndMap"},494:{n:"BrtHLink",f:rd},495:{n:"BrtBeginDCon"},496:{n:"BrtEndDCon"},497:{n:"BrtBeginDRefs"},498:{n:"BrtEndDRefs"},499:{n:"BrtDRef"},500:{n:"BrtBeginScenMan"},501:{n:"BrtEndScenMan"},502:{n:"BrtBeginSct"},503:{n:"BrtEndSct"},504:{n:"BrtSlc"},505:{n:"BrtBeginDXFs"},506:{n:"BrtEndDXFs"},507:{n:"BrtDXF"},508:{n:"BrtBeginTableStyles"},509:{n:"BrtEndTableStyles"},510:{n:"BrtBeginTableStyle"},511:{n:"BrtEndTableStyle"},512:{n:"BrtTableStyleElement"},513:{n:"BrtTableStyleClient"},514:{n:"BrtBeginVolDeps"},515:{n:"BrtEndVolDeps"},516:{n:"BrtBeginVolType"},517:{n:"BrtEndVolType"},518:{n:"BrtBeginVolMain"},519:{n:"BrtEndVolMain"},520:{n:"BrtBeginVolTopic"},521:{n:"BrtEndVolTopic"},522:{n:"BrtVolSubtopic"},523:{n:"BrtVolRef"},524:{n:"BrtVolNum"},525:{n:"BrtVolErr"},526:{n:"BrtVolStr"},527:{n:"BrtVolBool"},528:{n:"BrtBeginCalcChain$"},529:{n:"BrtEndCalcChain$"},530:{n:"BrtBeginSortState"},531:{n:"BrtEndSortState"},532:{n:"BrtBeginSortCond"},533:{n:"BrtEndSortCond"},534:{n:"BrtBookProtection"},535:{n:"BrtSheetProtection"},536:{n:"BrtRangeProtection"},537:{n:"BrtPhoneticInfo"},538:{n:"BrtBeginECTxtWiz"},539:{n:"BrtEndECTxtWiz"},540:{n:"BrtBeginECTWFldInfoLst"},541:{n:"BrtEndECTWFldInfoLst"},542:{n:"BrtBeginECTwFldInfo"},548:{n:"BrtFileSharing"},549:{n:"BrtOleSize"},550:{n:"BrtDrawing",f:Ot},551:{n:"BrtLegacyDrawing"},552:{n:"BrtLegacyDrawingHF"},553:{n:"BrtWebOpt"},554:{n:"BrtBeginWebPubItems"},555:{n:"BrtEndWebPubItems"},556:{n:"BrtBeginWebPubItem"},557:{n:"BrtEndWebPubItem"},558:{n:"BrtBeginSXCondFmt"},559:{n:"BrtEndSXCondFmt"},560:{n:"BrtBeginSXCondFmts"},561:{n:"BrtEndSXCondFmts"},562:{n:"BrtBkHim"},564:{n:"BrtColor"},565:{n:"BrtBeginIndexedColors"},566:{n:"BrtEndIndexedColors"},569:{n:"BrtBeginMRUColors"},570:{n:"BrtEndMRUColors"},572:{n:"BrtMRUColor"},573:{n:"BrtBeginDVals"},574:{n:"BrtEndDVals"},577:{n:"BrtSupNameStart"},578:{n:"BrtSupNameValueStart"},579:{n:"BrtSupNameValueEnd"},580:{n:"BrtSupNameNum"},581:{n:"BrtSupNameErr"},582:{n:"BrtSupNameSt"},583:{n:"BrtSupNameNil"},584:{n:"BrtSupNameBool"},585:{n:"BrtSupNameFmla"},586:{n:"BrtSupNameBits"},587:{n:"BrtSupNameEnd"},588:{n:"BrtEndSupBook"},589:{n:"BrtCellSmartTagProperty"},590:{n:"BrtBeginCellSmartTag"},591:{n:"BrtEndCellSmartTag"},592:{n:"BrtBeginCellSmartTags"},593:{n:"BrtEndCellSmartTags"},594:{n:"BrtBeginSmartTags"},595:{n:"BrtEndSmartTags"},596:{n:"BrtSmartTagType"},597:{n:"BrtBeginSmartTagTypes"},598:{n:"BrtEndSmartTagTypes"},599:{n:"BrtBeginSXFilters"},600:{n:"BrtEndSXFilters"},601:{n:"BrtBeginSXFILTER"},602:{n:"BrtEndSXFilter"},603:{n:"BrtBeginFills"},604:{n:"BrtEndFills"},605:{n:"BrtBeginCellWatches"},606:{n:"BrtEndCellWatches"},607:{n:"BrtCellWatch"},608:{n:"BrtBeginCRErrs"},609:{n:"BrtEndCRErrs"},610:{n:"BrtCrashRecErr"},611:{n:"BrtBeginFonts"},612:{n:"BrtEndFonts"},613:{n:"BrtBeginBorders"},614:{n:"BrtEndBorders"},615:{n:"BrtBeginFmts"},616:{n:"BrtEndFmts"},617:{n:"BrtBeginCellXFs"},618:{n:"BrtEndCellXFs"},619:{n:"BrtBeginStyles"},620:{n:"BrtEndStyles"},625:{n:"BrtBigName"},626:{n:"BrtBeginCellStyleXFs"},627:{n:"BrtEndCellStyleXFs"},628:{n:"BrtBeginComments"},629:{n:"BrtEndComments"},630:{n:"BrtBeginCommentAuthors"},631:{n:"BrtEndCommentAuthors"},632:{n:"BrtCommentAuthor",f:Rc},633:{n:"BrtBeginCommentList"},634:{n:"BrtEndCommentList"},635:{n:"BrtBeginComment",f:Ic},636:{n:"BrtEndComment"},637:{n:"BrtCommentText",f:Tt},638:{n:"BrtBeginOleObjects"},639:{n:"BrtOleObject"},640:{n:"BrtEndOleObjects"},641:{n:"BrtBeginSxrules"},642:{n:"BrtEndSxRules"},643:{n:"BrtBeginActiveXControls"},644:{n:"BrtActiveX"},645:
var T=-1,x=-1,I={s:{r:1e6,c:1e7},e:{r:0,c:0}};var A=0;var R={};var _=[],y={},F=0,D=0;var O=[],P=1,N=1;var M=[];var L={Names:[]};var U={};var W=["",""];var V=[],H={};var X="",G=0;var z=false,j=false;var $=0;Mv.lastIndex=0;s=s.replace(/<!--([\s\S]*?)-->/gm,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");while(E=Mv.exec(s))switch(E[3]=E[3].replace(/_.*$/,"")){case"table":;case"工作表":if(E[1]==="/"){if(I.e.c>=I.s.c&&I.e.r>=I.s.r)g["!ref"]=ut(I);if(i.sheetRows>0&&i.sheetRows<=I.e.r){g["!fullref"]=g["!ref"];I.e.r=i.sheetRows-1;g["!ref"]=ut(I)}if(_.length)g["!merges"]=_;if(O.length)g["!rows"]=O;d.name=Ve(d["名称"]||d.name);if(typeof JSON!=="undefined")JSON.stringify(d);b.push(d.name);m[d.name]=g;j=false}else if(E[0].charAt(E[0].length-2)!=="/"){d=xe(E[0],false);T=x=-1;I.s.r=I.s.c=1e7;I.e.r=I.e.c=0;g=i.dense?[]:{};_=[];O=[];j=true}break;case"table-row-group":if(E[1]==="/")--A;else++A;break;case"table-row":;case"行":if(E[1]==="/"){T+=P;P=1;break}v=xe(E[0],false);if(v["行号"])T=v["行号"]-1;else if(T==-1)T=0;P=+v["number-rows-repeated"]||1;if(P<10)for($=0;$<P;++$)if(A>0)O[T+$]={level:A};x=-1;break;case"covered-table-cell":++x;if(i.sheetStubs){if(i.dense){if(!g[T])g[T]=[];g[T][x]={t:"z"}}else g[ct({r:T,c:x})]={t:"z"}}break;case"table-cell":;case"数据":if(E[0].charAt(E[0].length-2)==="/"){++x;k=xe(E[0],false);N=parseInt(k["number-columns-repeated"]||"1",10);S={t:"z",v:null};if(k.formula&&i.cellFormula!=false)S.f=Uu(_e(k.formula));if((k["数据类型"]||k["value-type"])=="string"){S.t="s";S.v=_e(k["string-value"]||"");if(i.dense){if(!g[T])g[T]=[];g[T][x]=S}else{g[ct({r:T,c:x})]=S}}x+=N-1}else if(E[1]!=="/"){++x;N=1;var K=P?T+P-1:T;if(x>I.e.c)I.e.c=x;if(x<I.s.c)I.s.c=x;if(T<I.s.r)I.s.r=T;if(K>I.e.r)I.e.r=K;k=xe(E[0],false);V=[];H={};S={t:k["数据类型"]||k["value-type"],v:null};if(i.cellFormula){if(k.formula)k.formula=_e(k.formula);if(k["number-matrix-columns-spanned"]&&k["number-matrix-rows-spanned"]){F=parseInt(k["number-matrix-rows-spanned"],10)||0;D=parseInt(k["number-matrix-columns-spanned"],10)||0;y={s:{r:T,c:x},e:{r:T+F-1,c:x+D-1}};S.F=ut(y);M.push([y,S.F])}if(k.formula)S.f=Uu(k.formula);else for($=0;$<M.length;++$)if(T>=M[$][0].s.r&&T<=M[$][0].e.r)if(x>=M[$][0].s.c&&x<=M[$][0].e.c)S.F=M[$][1]}if(k["number-columns-spanned"]||k["number-rows-spanned"]){F=parseInt(k["number-rows-spanned"],10)||0;D=parseInt(k["number-columns-spanned"],10)||0;y={s:{r:T,c:x},e:{r:T+F-1,c:x+D-1}};_.push(y)}if(k["number-columns-repeated"])N=parseInt(k["number-columns-repeated"],10);switch(S.t){case"boolean":S.t="b";S.v=We(k["boolean-value"]);break;case"float":S.t="n";S.v=parseFloat(k.value);break;case"percentage":S.t="n";S.v=parseFloat(k.value);break;case"currency":S.t="n";S.v=parseFloat(k.value);break;case"date":S.t="d";S.v=ae(k["date-value"]);if(!i.cellDates){S.t="n";S.v=Z(S.v)}S.z="m/d/yy";break;case"time":S.t="n";S.v=ee(k["time-value"])/86400;break;case"number":S.t="n";S.v=parseFloat(k["数据数值"]);break;default:if(S.t==="string"||S.t==="text"||!S.t){S.t="s";if(k["string-value"]!=null)w=_e(k["string-value"])}else throw new Error("Unsupported value type "+S.t);}}else{z=false;if(S.t==="s"){S.v=w||"";z=B==0}if(U.Target)S.l=U;if(V.length>0){S.c=V;V=[]}if(w&&i.cellText!==false)S.w=w;if(!z||i.sheetStubs){if(!(i.sheetRows&&i.sheetRows<=T)){for(var Y=0;Y<P;++Y){N=parseInt(k["number-columns-repeated"]||"1",10);if(i.dense){if(!g[T+Y])g[T+Y]=[];g[T+Y][x]=Y==0?S:ie(S);while(--N>0)g[T+Y][x+N]=ie(S)}else{g[ct({r:T+Y,c:x})]=S;while(--N>0)g[ct({r:T+Y,c:x+N})]=ie(S)}if(I.e.c<=x)I.e.c=x}}}N=parseInt(k["number-columns-repeated"]||"1",10);x+=N-1;N=0;S={};w=""}U={};break;case"document":;case"document-content":;case"电子表格文档":;case"spreadsheet":;case"主体":;case"scripts":;case"styles":;case"font-face-decls":if(E[1]==="/"){if((f=l.pop())[0]!==E[3])throw"Bad state: "+f}else if(E[0].charAt(E[0].length-2)!=="/")l.push([E[3],true]);break;case"annotation":if(E[1]==="/"){if((f=l.pop())[0]!==E[3])throw"Bad state: "+f;H.t=w;H.a=X;V.push(H)}else if(E[0].charAt(E[0].length-2)!=="/"){l.push([E[3],false])}X="";G=0;w="";B=0;break;case"creator":if(E[1]===
var t={t:"n",v:0},a=0,n=1,i=[],s=0,l="";var f={s:{r:0,c:0},e:{r:0,c:0}};var c=r||{};var o=c.range!=null?c.range:e["!ref"];if(c.header===1)a=1;else if(c.header==="A")a=2;else if(Array.isArray(c.header))a=3;switch(typeof o){case"string":f=ht(o);break;case"number":f=ht(e["!ref"]);f.s.r=o;break;default:f=o;}if(a>0)n=0;var u=et(f.s.r);var h=[];var d=[];var v=0,p=0;var m=Array.isArray(e);var b=f.s.r,g=0,E=0;if(m&&!e[b])e[b]=[];for(g=f.s.c;g<=f.e.c;++g){h[g]=nt(g);t=m?e[b][g]:e[h[g]+u];switch(a){case 1:i[g]=g-f.s.c;break;case 2:i[g]=h[g];break;case 3:i[g]=c.header[g-f.s.c];break;default:if(t==null)t={w:"__EMPTY",t:"s"};l=s=vt(t,null,c);p=0;for(E=0;E<i.length;++E)if(i[E]==l)l=s+"_"+ ++p;i[g]=l;}}for(b=f.s.r+n;b<=f.e.r;++b){var S=Am(e,f,b,h,a,i,m,c);if(S.isempty===false||(a===1?c.blankrows!==false:!!c.blankrows))d[v++]=S.row}d.length=v;return d}var _m=/"/g;function ym(e,r,t,a,n,i,s,l){var f=true;var c=[],o="",u=et(t);for(var h=r.s.c;h<=r.e.c;++h){if(!a[h])continue;var d=l.dense?(e[t]||[])[h]:e[a[h]+u];if(d==null)o="";else if(d.v!=null){f=false;o=""+vt(d,null,l);for(var v=0,p=0;v!==o.length;++v)if((p=o.charCodeAt(v))===n||p===i||p===34){o='"'+o.replace(_m,'""')+'"';break}if(o=="ID")o='"ID"'}else if(d.f!=null&&!d.F){f=false;o="="+d.f;if(o.indexOf(",")>=0)o='"'+o.replace(_m,'""')+'"'}else o="";c.push(o)}if(l.blankrows===false&&f)return null;return c.join(s)}function Fm(e,r){var t=[];var a=r==null?{}:r;if(e==null||e["!ref"]==null)return"";var n=ht(e["!ref"]);var i=a.FS!==undefined?a.FS:",",s=i.charCodeAt(0);var l=a.RS!==undefined?a.RS:"\n",f=l.charCodeAt(0);var c=new RegExp((i=="|"?"\\|":i)+"+$");var o="",u=[];a.dense=Array.isArray(e);var h=a.skipHidden&&e["!cols"]||[];var d=a.skipHidden&&e["!rows"]||[];for(var v=n.s.c;v<=n.e.c;++v)if(!(h[v]||{}).hidden)u[v]=nt(v);for(var p=n.s.r;p<=n.e.r;++p){if((d[p]||{}).hidden)continue;o=ym(e,n,p,u,s,f,i,a);if(o==null){continue}if(a.strip)o=o.replace(c,"");t.push(o+l)}delete a.dense;return t.join("")}function Dm(e,r){if(!r)r={};r.FS="\t";r.RS="\n";var t=Fm(e,r);if(typeof cptable=="undefined"||r.type=="string")return t;var a=cptable.utils.encode(1200,t,"str");return String.fromCharCode(255)+String.fromCharCode(254)+a}function Om(e){var r="",t,a="";if(e==null||e["!ref"]==null)return[];var n=ht(e["!ref"]),i="",s=[],l;var f=[];var c=Array.isArray(e);for(l=n.s.c;l<=n.e.c;++l)s[l]=nt(l);for(var o=n.s.r;o<=n.e.r;++o){i=et(o);for(l=n.s.c;l<=n.e.c;++l){r=s[l]+i;t=c?(e[o]||[])[l]:e[r];a="";if(t===undefined)continue;else if(t.F!=null){r=t.F;if(!t.f)continue;a=t.f;if(r.indexOf(":")==-1)r=r+":"+r}if(t.f!=null)a=t.f;else if(t.t=="z")continue;else if(t.t=="n"&&t.v!=null)a=""+t.v;else if(t.t=="b")a=t.v?"TRUE":"FALSE";else if(t.w!==undefined)a="'"+t.w;else if(t.v===undefined)continue;else if(t.t=="s")a="'"+t.v;else a=""+t.v;f[f.length]=r+"="+a}}return f}function Pm(e,r,t){var a=t||{};var n=+!a.skipHeader;var i=e||{};var s=0,l=0;if(i&&a.origin!=null){if(typeof a.origin=="number")s=a.origin;else{var f=typeof a.origin=="string"?ft(a.origin):a.origin;s=f.r;l=f.c}}var c;var o={s:{c:0,r:0},e:{c:l,r:s+r.length-1+n}};if(i["!ref"]){var u=ht(i["!ref"]);o.e.c=Math.max(o.e.c,u.e.c);o.e.r=Math.max(o.e.r,u.e.r);if(s==-1){s=o.e.r+1;o.e.r=s+r.length-1+n}}var h=a.header||[],d=0;r.forEach(function(e,r){G(e).forEach(function(t){if((d=h.indexOf(t))==-1)h[d=h.length]=t;var f=e[t];var o="z";var u="";if(f&&typeof f==="object"&&!(f instanceof Date)){i[ct({c:l+d,r:s+r+n})]=f}else{if(typeof f=="number")o="n";else if(typeof f=="boolean")o="b";else if(typeof f=="string")o="s";else if(f instanceof Date){o="d";if(!a.cellDates){o="n";f=Z(f)}u=a.dateNF||y._table[14]}i[ct({c:l+d,r:s+r+n})]=c={t:o,v:f};if(u)c.z=u}})});o.e.c=Math.max(o.e.c,l+h.length-1);var v=et(s);if(n)for(d=0;d<h.length;++d)i[nt(d+l)+v]={t:"s",v:h[d]};i["!ref"]=ut(o);return i}function Nm(e,r){return Pm(null,e,r)}var Mm={encode_col:nt,encode_row:et,encode_cell:ct,encode_range:ut,decode_col:at,decode_row:qr,split_cell:lt,decode_cell:ft,decode_range:ot,format_cell:vt,get_formulae:Om,make_csv:Fm,make_json:Rm,make_formulae:Om,sheet_add_aoa:mt,sheet_add_json:Pm,aoa_to_sheet:bt,json_t