sheetjs/dist/xlsx.mini.min.js

8 lines
176 KiB
JavaScript
Raw Permalink 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.15.1";var r=1200,t=1252;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 o=function(e){r=e;s(e)};function f(){o(1200);l()}function c(e){var r=[];for(var t=0,a=e.length;t<a;++t)r[t]=e.charCodeAt(t);return r}function h(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 u(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 h(e.slice(2));if(r==254&&t==255)return u(e.slice(2));if(r==65279)return e.slice(1);return e};var p=function gl(e){return String.fromCharCode(e)};var v=function bl(e){return String.fromCharCode(e)};var m=null;var g=true;var b=function wl(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return{encode:function(r){var t="";var a=0,n=0,i=0,s=0,l=0,o=0,f=0;for(var c=0;c<r.length;){a=r.charCodeAt(c++);s=a>>2;n=r.charCodeAt(c++);l=(a&3)<<4|n>>4;i=r.charCodeAt(c++);o=(n&15)<<2|i>>6;f=i&63;if(isNaN(n)){o=f=64}else if(isNaN(i)){f=64}t+=e.charAt(s)+e.charAt(l)+e.charAt(o)+e.charAt(f)}return t},decode:function r(t){var a="";var n=0,i=0,s=0,l=0,o=0,f=0,c=0;t=t.replace(/[^\w\+\/\=]/g,"");for(var h=0;h<t.length;){l=e.indexOf(t.charAt(h++));o=e.indexOf(t.charAt(h++));n=l<<2|o>>4;a+=String.fromCharCode(n);f=e.indexOf(t.charAt(h++));i=(o&15)<<4|f>>2;if(f!==64){a+=String.fromCharCode(i)}c=e.indexOf(t.charAt(h++));s=(f&3)<<6|c;if(c!==64){a+=String.fromCharCode(s)}}return a}}}();var w=typeof Buffer!=="undefined"&&typeof process!=="undefined"&&typeof process.versions!=="undefined"&&!!process.versions.node;var k=function(){};if(typeof Buffer!=="undefined"){var y=!Buffer.from;if(!y)try{Buffer.from("foo","utf8")}catch(x){y=true}k=y?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)};if(!Buffer.allocUnsafe)Buffer.allocUnsafe=function(e){return new Buffer(e)}}function S(e){return w?Buffer.alloc(e):new Array(e)}function C(e){return w?Buffer.allocUnsafe(e):new Array(e)}var _=function kl(e){if(w)return k(e,"binary");return e.split("").map(function(e){return e.charCodeAt(0)&255})};function E(e){if(typeof ArrayBuffer==="undefined")return _(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 F(e){if(Array.isArray(e))return e.map(function(e){return String.fromCharCode(e)}).join("");var r=[];for(var t=0;t<e.length;++t)r[t]=String.fromCharCode(e[t]);return r.join("")}function A(e){if(typeof Uint8Array==="undefined")throw new Error("Unsupported");return new Uint8Array(e)}function T(e){if(typeof ArrayBuffer=="undefined")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return T(new Uint8Array(e));var r=new Array(e.length);for(var t=0;t<e.length;++t)r[t]=e[t];return r}var O=function(e){return[].concat.apply([],e)};var D=/\u0000/g,M=/[\u0001-\u0006]/g;var P={};var R=function yl(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("0",r-a.length)+a}function l(e,r){var a=""+e;return a.length>=r?a:t("0",r-a.length)+a}var o=Math.pow(2,32);function f(e,r){if(e>o||e<-o)return s(e,r);var t=Math.round(e);return l(t,r)}function c(e,r){r=r||0;return e.length>=7+r&&(e.charCodeAt(r)|3
if(t&4)s.ctime=e._R(4)}if(s.mtime)s.mt=new Date(s.mtime*1e3)}break;}e.l=i;r[a]=s}return r}var l;function o(){return l||(l=require("fs"))}function f(e,r){if(e[0]==80&&e[1]==75)return Ee(e,r);if(e.length<512)throw new Error("CFB file size "+e.length+" < 512");var t=3;var a=512;var n=0;var i=0;var s=0;var l=0;var o=0;var f=[];var p=e.slice(0,512);Xr(p,0);var m=c(p);t=m[0];switch(t){case 3:a=512;break;case 4:a=4096;break;case 0:if(m[1]==0)return Ee(e,r);default:throw new Error("Major Version: Expected 3 or 4 saw "+t);}if(a!==512){p=e.slice(0,a);Xr(p,28)}var b=e.slice(0,a);h(p,t);var w=p._R(4,"i");if(t===3&&w!==0)throw new Error("# Directory Sectors: Expected 0 saw "+w);p.l+=4;s=p._R(4,"i");p.l+=4;p.chk("00100000","Mini Stream Cutoff Size: ");l=p._R(4,"i");n=p._R(4,"i");o=p._R(4,"i");i=p._R(4,"i");for(var y=-1,x=0;x<109;++x){y=p._R(4,"i");if(y<0)break;f[x]=y}var S=u(e,a);v(o,i,S,a,f);var C=g(S,s,f,a);C[s].name="!Directory";if(n>0&&l!==I)C[l].name="!MiniFAT";C[f[0]].name="!FAT";C.fat_addrs=f;C.ssz=a;var _={},E=[],F=[],A=[];k(s,C,S,E,n,_,F,l);d(F,A,E);E.shift();var T={FileIndex:F,FullPaths:A};if(r&&r.raw)T.raw={header:b,sectors:S};return T}function c(e){if(e[e.l]==80&&e[e.l+1]==75)return[0,0];e.chk(L,"Header Signature: ");e.l+=16;var r=e._R(2,"u");return[e._R(2,"u"),r]}function h(e,r){var t=9;e.l+=2;switch(t=e._R(2)){case 9:if(r!=3)throw new Error("Sector Shift: Expected 9 saw "+t);break;case 12:if(r!=4)throw new Error("Sector Shift: Expected 12 saw "+t);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+t);}e.chk("0600","Mini Sector Shift: ");e.chk("000000000000","Reserved: ")}function u(e,r){var t=Math.ceil(e.length/r)-1;var a=[];for(var n=1;n<t;++n)a[n-1]=e.slice(n*r,(n+1)*r);a[t-1]=e.slice(t*r);return a}function d(e,r,t){var a=0,n=0,i=0,s=0,l=0,o=t.length;var f=[],c=[];for(;a<o;++a){f[a]=c[a]=a;r[a]=t[a]}for(;l<c.length;++l){a=c[l];n=e[a].L;i=e[a].R;s=e[a].C;if(f[a]===a){if(n!==-1&&f[n]!==n)f[a]=f[n];if(i!==-1&&f[i]!==i)f[a]=f[i]}if(s!==-1)f[s]=a;if(n!==-1&&a!=f[a]){f[n]=f[a];if(c.lastIndexOf(n)<l)c.push(n)}if(i!==-1&&a!=f[a]){f[i]=f[a];if(c.lastIndexOf(i)<l)c.push(i)}}for(a=1;a<o;++a)if(f[a]===a){if(i!==-1&&f[i]!==i)f[a]=f[i];else if(n!==-1&&f[n]!==n)f[a]=f[n]}for(a=1;a<o;++a){if(e[a].type===0)continue;l=a;if(l!=f[l])do{l=f[l];r[a]=r[l]+"/"+r[a]}while(l!==0&&-1!==f[l]&&l!=f[l]);f[a]=-1}r[0]+="/";for(a=1;a<o;++a){if(e[a].type!==2)r[a]+="/"}}function p(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*N,s*N+N));n-=N;s=Br(t,s*4)}if(i.length===0)return Yr(0);return O(i).slice(0,e.size)}function v(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 o=0;o<l;++o){if((i=Br(s,o*4))===I)break;n.push(i)}v(Br(s,a-4),r-1,t,a,n)}}function m(e,r,t,a,n){var i=[],s=[];if(!n)n=[];var l=a-1,o=0,f=0;for(o=r;o>=0;){n[o]=true;i[i.length]=o;s.push(e[o]);var c=t[Math.floor(o*4/a)];f=o*4&l;if(a<4+f)throw new Error("FAT boundary crossed: "+o+" 4 "+a);if(!e[c])break;o=Br(e[c],f)}return{nodes:i,data:dr([s])}}function g(e,r,t,a){var n=e.length,i=[];var s=[],l=[],o=[];var f=a-1,c=0,h=0,u=0,d=0;for(c=0;c<n;++c){l=[];u=c+r;if(u>=n)u-=n;if(s[u])continue;o=[];for(h=u;h>=0;){s[h]=true;l[l.length]=h;o.push(e[h]);var p=t[Math.floor(h*4/a)];d=h*4&f;if(a<4+d)throw new Error("FAT boundary crossed: "+h+" 4 "+a);if(!e[p])break;h=Br(e[p],d)}i[u]={nodes:l,data:dr([o])}}return i}function k(e,r,t,a,n,i,s,l){var o=0,f=a.length?2:0;var c=r[e].data;var h=0,u=0,d;for(;h<c.length;h+=128){var v=c.slice(h,h+128);Xr(v,64);u=v._R(2);d=vr(v,0,u-f);a.push(d);var g={name:d,type:v._R(1),color:v._R(1),L:v._R(4,"i"),R:v._R(4,"i"),C:v._R(4,"i"),clsid:v._R(16),state:v._R(4,"i"),start:0,size:0};var b=v._R(2)+v._R(2)+v._R(2)+v._R(2);if(b!==0)g.ct=y(v,v.l-8);var w=v._R(2)+v._R(2)+v._R(2)+v._R(2);if(w!==0)g.mt=y(v,v.l-8);g.start=v._R(4,"i");g.size=v._R(4,"i");if(g.size<0&&g.start<0){g.size=g.type=0;g.start=I;g.name=""}if(g.type===5){o=g.start;if(n>0&&o!==I)r[o].name="!StreamData"}else if(g.size>=4096){g.storage="fat";if(r[g.start]===undefin
for(var n=0;n<e.length;++n)a=a.replace(e[n][0],e[n][1]);return a}}();var Qe=function(){var e={};return function r(t){if(e[t]!==undefined)return e[t];return e[t]=new RegExp("<(?:vt:)?"+t+">([\\s\\S]*?)</(?:vt:)?"+t+">","g")}}();var er=/<\/?(?:vt:)?variant>/g,rr=/<(?:vt:)([^>]*)>([\s\S]*)</;function tr(e,r){var t=De(e);var a=e.match(Qe(t.baseType))||[];var n=[];if(a.length!=t.size){if(r.WTF)throw new Error("unexpected vector length "+a.length+" != "+t.size);return n}a.forEach(function(e){var r=e.replace(er,"").match(rr);if(r)n.push({v:Xe(r[2]),t:r[1]})});return n}var ar=/(^\s|\s$|\n)/;function nr(e,r){return"<"+e+(r.match(ar)?' xml:space="preserve"':"")+">"+r+"</"+e+">"}function ir(e){return Y(e).map(function(r){return" "+r+'="'+e[r]+'"'}).join("")}function sr(e,r,t){return"<"+e+(t!=null?ir(t):"")+(r!=null?(r.match(ar)?' xml:space="preserve"':"")+">"+r+"</"+e:"/")+">"}function lr(e,r){try{return e.toISOString().replace(/\.\d*/,"")}catch(t){if(r)throw t}return""}function or(e){switch(typeof e){case"string":return sr("vt:lpwstr",e);case"number":return sr((e|0)==e?"vt:i4":"vt:r8",String(e));case"boolean":return sr("vt:bool",e?"true":"false");}if(e instanceof Date)return sr("vt:filetime",lr(e));throw new Error("Unable to serialize "+e)}var fr={dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",mx:"http://schemas.microsoft.com/office/mac/excel/2008/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",sjs:"http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"};fr.main=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"];var cr={o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel",ss:"urn:schemas-microsoft-com:office:spreadsheet",dt:"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882",mv:"http://macVmlSchemaUri",v:"urn:schemas-microsoft-com:vml",html:"http://www.w3.org/TR/REC-html40"};function hr(e,r){var t=1-2*(e[r+7]>>>7);var a=((e[r+7]&127)<<4)+(e[r+6]>>>4&15);var n=e[r+6]&15;for(var i=5;i>=0;--i)n=n*256+e[r+i];if(a==2047)return n==0?t*Infinity:NaN;if(a==0)a=-1022;else{a-=1023;n+=Math.pow(2,52)}return t*Math.pow(2,a-52)*n}function ur(e,r,t){var a=(r<0||1/r==-Infinity?1:0)<<7,n=0,i=0;var s=a?-r:r;if(!isFinite(s)){n=2047;i=isNaN(r)?26985:0}else if(s==0)n=i=0;else{n=Math.floor(Math.log(s)/Math.LN2);i=s*Math.pow(2,52-n);if(n<=-1023&&(!isFinite(i)||i<Math.pow(2,52))){n=-1022}else{i-=Math.pow(2,52);n+=1023}}for(var l=0;l<=5;++l,i/=256)e[t+l]=i&255;e[t+6]=(n&15)<<4|i&15;e[t+7]=n>>4|a}var dr=function(e){var r=[],t=10240;for(var a=0;a<e[0].length;++a)if(e[0][a])for(var n=0,i=e[0][a].length;n<i;n+=t)r.push.apply(r,e[0][a].slice(n,n+t));return r};var pr=dr;var vr=function(e,r,t){var a=[];for(var n=r;n<t;n+=2)a.push(String.fromCharCode(Nr(e,n)));return a.join("").replace(D,"")};var mr=vr;var gr=function(e,r,t){var a=[];for(var n=r;n<r+t;++n)a.push(("0"+e[n].toString(16)).slice(-2));return a.join("")};var br=gr;var wr=function(e,r,t){var a=[];for(var n=r;n<t;n++)a.push(String.fromCharCode(Rr(e,n)));return a.join("")};var kr=wr;var yr=function(e,r){var t=Lr(e,r);return t>0?wr(e,r+4,r+4+t-1):""};var xr=yr;var Sr=function(e,r){var t=Lr(e,r);return t>0?wr(e,r+4,r+4+t-1):""};var Cr=Sr;var _r=function(e,r){var t=2*Lr(e,r);return t>0?wr(e,r+4,r+4+t-1):""};var Er=_r;var Fr,Ar;Fr=Ar=function El(e,r){var t=Lr(e,r);return t>0?vr(e,r+4,r+4+t):""};var Tr=function(e,r){var t=Lr(e,r);return t>0?wr(e,r+4,r+4+t):""};var Or=Tr;var Dr,Mr;Dr=Mr=function(e,r){return hr(e,r)};var Pr=function Fl(e){return Array.isArray(e)};if(w){vr=function(e,r,t){if(!Buffer.isBuffer(e))return mr(e,r,t);return e.toString("utf16le",r,t).replace(D,"")};gr=function(e,r,t){return Buffer.isBuffer(e)?e.toString("hex",r,r+t):br(e,r,t)};yr=
var n=e.match(va);if(n)for(var i=0;i!=n.length;++i){var s=n[i],l=De(s);switch(l[0]){case"<?xml":break;case"<Properties":break;case"<property":a=l.name;break;case"</property>":a=null;break;default:if(s.indexOf("<vt:")===0){var o=s.split(">");var f=o[0].slice(4),c=o[1];switch(f){case"lpstr":;case"bstr":;case"lpwstr":t[a]=Ne(c);break;case"bool":t[a]=Ve(c);break;case"i1":;case"i2":;case"i4":;case"i8":;case"int":;case"uint":t[a]=parseInt(c,10);break;case"r4":;case"r8":;case"decimal":t[a]=parseFloat(c);break;case"filetime":;case"date":t[a]=se(c);break;case"cy":;case"error":t[a]=Ne(c);break;default:if(f.slice(-1)=="/")break;if(r.WTF&&typeof console!=="undefined")console.warn("Unexpected",s,f,o);}}else if(s.slice(0,2)==="</"){}else if(r.WTF)throw new Error(s);}}return t}var ga=sr("Properties",null,{xmlns:fr.CUST_PROPS,"xmlns:vt":fr.vt});function ba(e){var r=[Ee,ga];if(!e)return r.join("");var t=1;Y(e).forEach(function a(n){++t;r[r.length]=sr("property",or(e[n]),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:t,name:n})});if(r.length>2){r[r.length]="</Properties>";r[1]=r[1].replace("/>",">")}return r.join("")}var wa=function Il(){var e=qe("t"),r=qe("rPr"),t=/<(?:\w+:)?r>/g,a=/<\/(?:\w+:)?r>/,n=/\r\n/g;var s=function o(e,r,t){var a={},n=65001,s="";var l=false;var o=e.match(Ae),f=0;if(o)for(;f!=o.length;++f){var c=De(o[f]);switch(c[0].replace(/\w*:/g,"")){case"<condense":break;case"<extend":break;case"<shadow":if(!c.val)break;case"<shadow>":;case"<shadow/>":a.shadow=1;break;case"</shadow>":break;case"<charset":if(c.val=="1")break;n=i[parseInt(c.val,10)];break;case"<outline":if(!c.val)break;case"<outline>":;case"<outline/>":a.outline=1;break;case"</outline>":break;case"<rFont":a.name=c.val;break;case"<sz":a.sz=c.val;break;case"<strike":if(!c.val)break;case"<strike>":;case"<strike/>":a.strike=1;break;case"</strike>":break;case"<u":if(!c.val)break;switch(c.val){case"double":a.uval="double";break;case"singleAccounting":a.uval="single-accounting";break;case"doubleAccounting":a.uval="double-accounting";break;};case"<u>":;case"<u/>":a.u=1;break;case"</u>":break;case"<b":if(c.val=="0")break;case"<b>":;case"<b/>":a.b=1;break;case"</b>":break;case"<i":if(c.val=="0")break;case"<i>":;case"<i/>":a.i=1;break;case"</i>":break;case"<color":if(c.rgb)a.color=c.rgb.slice(2,8);break;case"<family":a.family=c.val;break;case"<vertAlign":s=c.val;break;case"<scheme":break;case"<extLst":;case"<extLst>":;case"</extLst>":break;case"<ext":l=true;break;case"</ext>":l=false;break;default:if(c[0].charCodeAt(1)!==47&&!l)throw new Error("Unrecognized rich format "+c[0]);}}var h=[];if(a.u)h.push("text-decoration: underline;");if(a.uval)h.push("text-underline-style:"+a.uval+";");if(a.sz)h.push("font-size:"+a.sz+"pt;");if(a.outline)h.push("text-effect: outline;");if(a.shadow)h.push("text-shadow: auto;");r.push('<span style="'+h.join("")+'">');if(a.b){r.push("<b>");t.push("</b>")}if(a.i){r.push("<i>");t.push("</i>")}if(a.strike){r.push("<s>");t.push("</s>")}if(s=="superscript")s="sup";else if(s=="subscript")s="sub";if(s!=""){r.push("<"+s+">");t.push("</"+s+">")}t.push("</span>");return n};function l(t){var a=[[],"",[]];var i=t.match(e);if(!i)return"";a[1]=i[1];var l=t.match(r);if(l)s(l[1],a[0],a[2]);return a[0].join("")+a[1].replace(n,"<br/>")+a[2].join("")}return function f(e){return e.replace(t,"").split(a).map(l).join("")}}();var ka=/<(?:\w+:)?t[^>]*>([^<]*)<\/(?:\w+:)?t>/g,ya=/<(?:\w+:)?r>/;var xa=/<(?:\w+:)?rPh.*?>([\s\S]*?)<\/(?:\w+:)?rPh>/g;function Sa(e,r){var t=r?r.cellHTML:true;var a={};if(!e)return null;if(e.match(/^\s*<(?:\w+:)?t[^>]*>/)){a.t=Ne(Xe(e.slice(e.indexOf(">")+1).split(/<\/(?:\w+:)?t>/)[0]||""));a.r=Xe(e);if(t)a.h=$e(a.t)}else if(e.match(ya)){a.r=Xe(e);a.t=Ne(Xe((e.replace(xa,"").match(ka)||[]).join("").replace(Ae,"")));if(t)a.h=wa(a.r)}return a}var Ca=/<(?:\w+:)?sst([^>]*)>([\s\S]*)<\/(?:\w+:)?sst>/;var _a=/<(?:\w+:)?(?:si|sstItem)>/g;var Ea=/<\/(?:\w+:)?(?:si|sstItem)>/;function Fa(e,r){var t=[],a="";if(!e)return t;var n=e.match(Ca);if(n){a=n[2].replace(_a,"").split(Ea);for(var i=0;i!=a.length;++i){var s=Sa(a[i].trim(),r);if(s!=null)t[t.le
j.utils.cfb_add(r,n,e.FileIndex[a].content)});return j.write(r)}function Dn(e,r){r.FullPaths.forEach(function(t,a){if(a==0)return;var n=t.replace(/[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");if(n.slice(-1)!=="/")j.utils.cfb_add(e,n,r.FileIndex[a].content)})}var Mn=["xlsb","xlsm","xlam","biff8","xla"];qt.DS="http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet";qt.MS="http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet";function Pn(){return{"!type":"dialog"}}function Rn(){return{"!type":"dialog"}}function Nn(){return{"!type":"macro"}}function In(){return{"!type":"macro"}}var Ln=function(){var e=/(^|[^A-Za-z])R(\[?)(-?\d+|)\]?C(\[?)(-?\d+|)\]?/g;var r={r:0,c:0};function t(e,t,a,n,i,s){var l=n.length>0?parseInt(n,10)|0:0,o=s.length>0?parseInt(s,10)|0:0;if(o<0&&i.length===0)o=0;var f=false,c=false;if(i.length>0||s.length==0)f=true;if(f)o+=r.c;else--o;if(a.length>0||n.length==0)c=true;if(c)l+=r.r;else--l;return t+(f?"":"$")+lt(o)+(c?"":"$")+at(l)}return function a(n,i){r=i;return n.replace(e,t)}}();var Bn=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)([1-9]\d{0,5}|10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6])(?![_.\(A-Za-z0-9])/g;var zn=function(){return function e(r,t){return r.replace(Bn,function(e,r,a,n,i,s){var l=st(n)-(a?0:t.c);var o=tt(s)-(i?0:t.r);var f=o==0?"":!i?"["+o+"]":o+1;var c=l==0?"":!a?"["+l+"]":l+1;return r+"R"+f+"C"+c})}}();function Wn(e,r){return e.replace(Bn,function(e,t,a,n,i,s){return t+(a=="$"?a+n:lt(st(n)+r.c))+(i=="$"?i+s:at(tt(s)+r.r))})}function $n(e,r,t){var a=dt(r),n=a.s,i=ht(t);var s={r:i.r-n.r,c:i.c-n.c};return Wn(e,s)}function Un(e){if(e.length==1)return false;return true}function jn(e){return e.replace(/_xlfn\./g,"")}var Hn={};var Vn={};qt.WS=["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"];var Xn=typeof Map!=="undefined";function Gn(e,r,t){var a=0,n=e.length;if(t){if(Xn?t.has(r):t.hasOwnProperty(r)){var i=Xn?t.get(r):t[r];for(;a<i.length;++a){if(e[i[a]].t===r){e.Count++;return i[a]}}}}else for(;a<n;++a){if(e[a].t===r){e.Count++;return a}}e[n]={t:r};e.Count++;e.Unique++;if(t){if(Xn){if(!t.has(r))t.set(r,[]);t.get(r).push(n)}else{if(!t.hasOwnProperty(r))t[r]=[];t[r].push(n)}}return n}function Yn(e,r){var t={min:e+1,max:e+1};var a=-1;if(r.MDW)Ba=r.MDW;if(r.width!=null)t.customWidth=1;else if(r.wpx!=null)a=Wa(r.wpx);else if(r.wch!=null)a=r.wch;if(a>-1){t.width=$a(a);t.customWidth=1}else if(r.width!=null)t.width=r.width;if(r.hidden)t.hidden=true;return t}function Jn(e,r){if(!e)return;var t=[.7,.7,.75,.75,.3,.3];if(r=="xlml")t=[1,1,1,1,.5,.5];if(e.left==null)e.left=t[0];if(e.right==null)e.right=t[1];if(e.top==null)e.top=t[2];if(e.bottom==null)e.bottom=t[3];if(e.header==null)e.header=t[4];if(e.footer==null)e.footer=t[5]}function Zn(e,r,t){var a=t.revssf[r.z!=null?r.z:"General"];var n=60,i=e.length;if(a==null&&t.ssf){for(;n<392;++n)if(t.ssf[n]==null){P.load(r.z,n);t.ssf[n]=r.z;t.revssf[r.z]=a=n;break}}for(n=0;n!=i;++n)if(e[n].numFmtId===a)return n;e[i]={numFmtId:a,fontId:0,fillId:0,borderId:0,xfId:0,applyNumberFormat:1};return i}function qn(e,r,t,a,n,i){if(e.t==="z")return;if(e.t==="d"&&typeof e.v==="string")e.v=se(e.v);try{if(a.cellNF)e.z=P._table[r]}catch(s){if(a.WTF)throw s}if(!a||a.cellText!==false)try{if(P._table[r]==null)P.load(I[r]||"General",r);if(e.t==="e")e.w=e.w||BErr[e.v];else if(r===0){if(e.t==="n"){if((e.v|0)===e.v)e.w=P._general_int(e.v);else e.w=P._general_num(e.v)}else if(e.t==="d"){var l=re(e.v);if((l|0)===l)e.w=P._general_int(l);else e.w=P._general_num(l)}else if(e.v===undefined)return"";else e.w=P._general(e.v,Vn)}else if(e.t==="d")e.w=P.format(r,re(e.v),Vn);else e.w=P.format(r,e.v,Vn)}catch(s){if(a.WTF)throw s}if(!a.cellStyles)return;if(t!=null)try{e.s=i.Fills[t];if(e.s.fgColor&&e.s.fgColor.theme&&!e.s.fgColor.rgb){e.s.fgColor.rgb=Ra(n.themeElements.clrScheme[e.s.fgColor.theme].rgb,e.s.fgColor.tint||0);if(a.WTF)e.s.fgColor.raw_rgb=n.themeElements.clrScheme[e.s.fgColor.theme].rgb}if(e.s.bgColor&&e.s
return e&&e.length?e:"sheet"}function Ns(e,r){if(!e)return 0;try{e=r.map(function a(r){if(!r.id)r.id=r.strRelID;return[r.name,e["!id"][r.id].Target,Rs(e["!id"][r.id].Type)]})}catch(t){return null}return!e||e.length===0?null:e}function Is(e,r,t,a,n,i,s,l,o,f,c,h){try{i[a]=Qt(ke(e,t,true),r);var u=we(e,r);var d;switch(l){case"sheet":d=Qi(u,r,n,o,i[a],f,c,h);break;case"chart":d=es(u,r,n,o,i[a],f,c,h);if(!d||!d["!chart"])break;var p=_e(d["!chart"].Target,r);var v=Kt(p);var m=yn(ke(e,p,true),Qt(ke(e,v,true),p));var g=_e(m,p);var b=Kt(g);d=Ti(ke(e,g,true),g,o,Qt(ke(e,b,true),g),f,d);break;case"macro":d=rs(u,r,n,o,i[a],f,c,h);break;case"dialog":d=ts(u,r,n,o,i[a],f,c,h);break;}s[a]=d}catch(w){if(o.WTF)throw w}}function Ls(e){return e.charAt(0)=="/"?e.slice(1):e}function Bs(e,r){R(P);r=r||{};Ms(r);if(ge(e,"META-INF/manifest.xml"))return parse_ods(e,r);if(ge(e,"objectdata.xml"))return parse_ods(e,r);if(ge(e,"Index/Document.iwa"))throw new Error("Unsupported NUMBERS file");var t=ye(e);var a=Gt(ke(e,"[Content_Types].xml"));var n=false;var i,s;if(a.workbooks.length===0){s="xl/workbook.xml";if(we(e,s,true))a.workbooks.push(s)}if(a.workbooks.length===0){s="xl/workbook.bin";if(!we(e,s,true))throw new Error("Could not find workbook");a.workbooks.push(s);n=true}if(a.workbooks[0].slice(-3)=="bin")n=true;var l={};var o={};if(!r.bookSheets&&!r.bookProps){Hn=[];if(a.sst)try{Hn=is(we(e,Ls(a.sst)),a.sst,r)}catch(f){if(r.WTF)throw f}if(r.cellStyles&&a.themes.length)l=ns(ke(e,a.themes[0].replace(/^\//,""),true)||"",a.themes[0],r);if(a.style)o=as(we(e,Ls(a.style)),a.style,l,r)}a.links.map(function(t){return os(we(e,Ls(t)),t,r)});var c=Ki(we(e,Ls(a.workbooks[0])),a.workbooks[0],r);var h={},u="";if(a.coreprops.length){u=we(e,Ls(a.coreprops[0]),true);if(u)h=ia(u);if(a.extprops.length!==0){u=we(e,Ls(a.extprops[0]),true);if(u)ua(u,h,r)}}var d={};if(!r.bookSheets||r.bookProps){if(a.custprops.length!==0){u=ke(e,Ls(a.custprops[0]),true);if(u)d=ma(u,r)}}var p={};if(r.bookSheets||r.bookProps){if(c.Sheets)i=c.Sheets.map(function A(e){return e.name});else if(h.Worksheets&&h.SheetNames.length>0)i=h.SheetNames;if(r.bookProps){p.Props=h;p.Custprops=d}if(r.bookSheets&&typeof i!=="undefined")p.SheetNames=i;if(r.bookSheets?p.SheetNames:r.bookProps)return p}i={};var v={};if(r.bookDeps&&a.calcchain)v=ls(we(e,Ls(a.calcchain)),a.calcchain,r);var m=0;var g={};var b,w;{var k=c.Sheets;h.Worksheets=k.length;h.SheetNames=[];for(var y=0;y!=k.length;++y){h.SheetNames[y]=k[y].name}}var x=n?"bin":"xml";var S=a.workbooks[0].lastIndexOf("/");var C=(a.workbooks[0].slice(0,S+1)+"_rels/"+a.workbooks[0].slice(S+1)+".rels").replace(/^\//,"");if(!ge(e,C))C="xl/_rels/workbook."+x+".rels";var _=Qt(ke(e,C,true),C);if(_)_=Ns(_,c.Sheets);var E=we(e,"xl/worksheets/sheet.xml",true)?1:0;for(m=0;m!=h.Worksheets;++m){var F="sheet";if(_&&_[m]){b="xl/"+_[m][1].replace(/[\/]?xl\//,"");if(!ge(e,b))b=_[m][1];if(!ge(e,b))b=C.replace(/_rels\/.*$/,"")+_[m][1];F=_[m][2]}else{b="xl/worksheets/sheet"+(m+1-E)+"."+x;b=b.replace(/sheet0\./,"sheet.")}w=b.replace(/^(.*)(\/)([^\/]*)$/,"$1/_rels/$3.rels");Is(e,b,w,h.SheetNames[m],m,g,i,F,r,c,l,o)}if(a.comments)Cn(e,a.comments,i,g,r);p={Directory:a,Workbook:c,Props:h,Custprops:d,Deps:v,Sheets:i,SheetNames:h.SheetNames,Strings:Hn,Styles:o,Themes:l,SSF:P.get_table()};if(r.bookFiles){p.keys=t;p.files=e.files}if(r.bookVBA){if(a.vba.length>0)p.vbaraw=we(e,Ls(a.vba[0]),true);else if(a.defaults&&a.defaults.bin===Tn)p.vbaraw=we(e,"xl/vbaProject.bin",true)}return p}function zs(e,r){var t=r||{};var a="Workbook",n=j.find(e,a);try{a="/!DataSpaces/Version";n=j.find(e,a);if(!n||!n.content)throw new Error("ECMA-376 Encrypted file missing "+a);parse_DataSpaceVersionInfo(n.content);a="/!DataSpaces/DataSpaceMap";n=j.find(e,a);if(!n||!n.content)throw new Error("ECMA-376 Encrypted file missing "+a);var i=parse_DataSpaceMap(n.content);if(i.length!==1||i[0].comps.length!==1||i[0].comps[0].t!==0||i[0].name!=="StrongEncryptionDataSpace"||i[0].comps[0].v!=="EncryptedPackage")throw new Error("ECMA-376 Encrypted file bad "+a);a="/!DataSpaces/DataSpaceInfo/StrongEncryptionDataSpace";n=j.fin