UNPKG

tableexport.jquery.plugin

Version:
101 lines 392 kB
/* xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(t,S,z){t instanceof String&&(t=String(t));for(var E=t.length,fa=0;fa<E;fa++){var ta=t[fa];if(S.call(z,ta,fa,t))return{i:fa,v:ta}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(t,S,z){t!=Array.prototype&&t!=Object.prototype&&(t[S]=z.value)}; $jscomp.getGlobal=function(t){return"undefined"!=typeof window&&window===t?t:"undefined"!=typeof global&&null!=global?global:t};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(t,S,z,E){if(S){z=$jscomp.global;t=t.split(".");for(E=0;E<t.length-1;E++){var fa=t[E];fa in z||(z[fa]={});z=z[fa]}t=t[t.length-1];E=z[t];S=S(E);S!=E&&null!=S&&$jscomp.defineProperty(z,t,{configurable:!0,writable:!0,value:S})}}; $jscomp.polyfill("Array.prototype.find",function(t){return t?t:function(t,z){return $jscomp.findInternal(this,t,z).v}},"es6","es3");$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.Symbol=function(){var t=0;return function(S){return $jscomp.SYMBOL_PREFIX+(S||"")+t++}}(); $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var t=$jscomp.global.Symbol.iterator;t||(t=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[t]&&$jscomp.defineProperty(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(t){var S=0;return $jscomp.iteratorPrototype(function(){return S<t.length?{done:!1,value:t[S++]}:{done:!0}})}; $jscomp.iteratorPrototype=function(t){$jscomp.initSymbolIterator();t={next:t};t[$jscomp.global.Symbol.iterator]=function(){return this};return t};$jscomp.iteratorFromArray=function(t,S){$jscomp.initSymbolIterator();t instanceof String&&(t+="");var z=0,E={next:function(){if(z<t.length){var fa=z++;return{value:S(fa,t[fa]),done:!1}}E.next=function(){return{done:!0,value:void 0}};return E.next()}};E[Symbol.iterator]=function(){return E};return E}; $jscomp.polyfill("Array.prototype.keys",function(t){return t?t:function(){return $jscomp.iteratorFromArray(this,function(t){return t})}},"es6","es3");$jscomp.makeIterator=function(t){$jscomp.initSymbolIterator();var S=t[Symbol.iterator];return S?S.call(t):$jscomp.arrayIterator(t)};$jscomp.owns=function(t,S){return Object.prototype.hasOwnProperty.call(t,S)}; $jscomp.polyfill("WeakMap",function(t){function S(t){$jscomp.owns(t,E)||$jscomp.defineProperty(t,E,{value:{}})}function z(t){var F=Object[t];F&&(Object[t]=function(t){S(t);return F(t)})}if(function(){if(!t||!Object.seal)return!1;try{var z=Object.seal({}),F=Object.seal({}),ub=new t([[z,2],[F,3]]);if(2!=ub.get(z)||3!=ub.get(F))return!1;ub.delete(z);ub.set(F,4);return!ub.has(z)&&4==ub.get(F)}catch(Yb){return!1}}())return t;var E="$jscomp_hidden_"+Math.random().toString().substring(2);z("freeze");z("preventExtensions"); z("seal");var fa=0,ta=function(t){this.id_=(fa+=Math.random()+1).toString();if(t){$jscomp.initSymbol();$jscomp.initSymbolIterator();t=$jscomp.makeIterator(t);for(var F;!(F=t.next()).done;)F=F.value,this.set(F[0],F[1])}};ta.prototype.set=function(t,F){S(t);if(!$jscomp.owns(t,E))throw Error("WeakMap key fail: "+t);t[E][this.id_]=F;return this};ta.prototype.get=function(t){return $jscomp.owns(t,E)?t[E][this.id_]:void 0};ta.prototype.has=function(t){return $jscomp.owns(t,E)&&$jscomp.owns(t[E],this.id_)}; ta.prototype.delete=function(t){return $jscomp.owns(t,E)&&$jscomp.owns(t[E],this.id_)?delete t[E][this.id_]:!1};return ta},"es6","es3");$jscomp.MapEntry=function(){}; $jscomp.polyfill("Map",function(t){if(!$jscomp.ASSUME_NO_NATIVE_MAP&&function(){if(!t||!t.prototype.entries||"function"!=typeof Object.seal)return!1;try{var F=Object.seal({x:4}),z=new t($jscomp.makeIterator([[F,"s"]]));if("s"!=z.get(F)||1!=z.size||z.get({x:4})||z.set({x:4},"t")!=z||2!=z.size)return!1;var Yb=z.entries(),E=Yb.next();if(E.done||E.value[0]!=F||"s"!=E.value[1])return!1;E=Yb.next();return E.done||4!=E.value[0].x||"t"!=E.value[1]||!Yb.next().done?!1:!0}catch(R){return!1}}())return t;$jscomp.initSymbol(); $jscomp.initSymbolIterator();var S=new WeakMap,z=function(t){this.data_={};this.head_=ta();this.size=0;if(t){t=$jscomp.makeIterator(t);for(var F;!(F=t.next()).done;)F=F.value,this.set(F[0],F[1])}};z.prototype.set=function(t,z){var F=E(this,t);F.list||(F.list=this.data_[F.id]=[]);F.entry?F.entry.value=z:(F.entry={next:this.head_,previous:this.head_.previous,head:this.head_,key:t,value:z},F.list.push(F.entry),this.head_.previous.next=F.entry,this.head_.previous=F.entry,this.size++);return this};z.prototype.delete= function(t){t=E(this,t);return t.entry&&t.list?(t.list.splice(t.index,1),t.list.length||delete this.data_[t.id],t.entry.previous.next=t.entry.next,t.entry.next.previous=t.entry.previous,t.entry.head=null,this.size--,!0):!1};z.prototype.clear=function(){this.data_={};this.head_=this.head_.previous=ta();this.size=0};z.prototype.has=function(t){return!!E(this,t).entry};z.prototype.get=function(t){return(t=E(this,t).entry)&&t.value};z.prototype.entries=function(){return fa(this,function(t){return[t.key, t.value]})};z.prototype.keys=function(){return fa(this,function(t){return t.key})};z.prototype.values=function(){return fa(this,function(t){return t.value})};z.prototype.forEach=function(t,z){for(var F=this.entries(),E;!(E=F.next()).done;)E=E.value,t.call(z,E[1],E[0],this)};z.prototype[Symbol.iterator]=z.prototype.entries;var E=function(t,z){var E=z&&typeof z;"object"==E||"function"==E?S.has(z)?E=S.get(z):(E=""+ ++mc,S.set(z,E)):E="p_"+z;var F=t.data_[E];if(F&&$jscomp.owns(t.data_,E))for(t=0;t<F.length;t++){var R= F[t];if(z!==z&&R.key!==R.key||z===R.key)return{id:E,list:F,index:t,entry:R}}return{id:E,list:F,index:-1,entry:void 0}},fa=function(t,z){var E=t.head_;return $jscomp.iteratorPrototype(function(){if(E){for(;E.head!=t.head_;)E=E.previous;for(;E.next!=E.head;)return E=E.next,{done:!1,value:z(E)};E=null}return{done:!0,value:void 0}})},ta=function(){var t={};return t.previous=t.next=t.head=t},mc=0;return z},"es6","es3");var XLSX={}; function make_xlsx_lib(t){function S(a){for(var b=[],c=0,d=a.length;c<d;++c)b[c]=a.charCodeAt(c);return b}function z(a){return ia?Buffer.alloc(a):Array(a)}function E(a){return ia?Buffer.allocUnsafe(a):Array(a)}function fa(a){if("undefined"===typeof ArrayBuffer)return qb(a);for(var b=new ArrayBuffer(a.length),c=new Uint8Array(b),d=0;d!=a.length;++d)c[d]=a.charCodeAt(d)&255;return b}function ta(a){if(Array.isArray(a))return a.map(function(a){return String.fromCharCode(a)}).join("");for(var b=[],c=0;c< a.length;++c)b[c]=String.fromCharCode(a[c]);return b.join("")}function mc(a){if("undefined"==typeof ArrayBuffer)throw Error("Unsupported");if(a instanceof ArrayBuffer)return mc(new Uint8Array(a));for(var b=Array(a.length),c=0;c<a.length;++c)b[c]=a[c];return b}function F(a){a="number"==typeof a?H._table[a]:a;a=a.replace(xe,"(\\d+)");return new RegExp("^"+a+"$")}function ub(a,b,c){var d=-1,e=-1,g=-1,f=-1,h=-1,k=-1;(b.match(xe)||[]).forEach(function(a,b){b=parseInt(c[b+1],10);switch(a.toLowerCase().charAt(0)){case "y":d= b;break;case "d":g=b;break;case "h":f=b;break;case "s":k=b;break;case "m":0<=f?h=b:e=b}});0<=k&&-1==h&&0<=e&&(h=e,e=-1);a=(""+(0<=d?d:(new Date).getFullYear())).slice(-4)+"-"+("00"+(1<=e?e:1)).slice(-2)+"-"+("00"+(1<=g?g:1)).slice(-2);7==a.length&&(a="0"+a);8==a.length&&(a="20"+a);b=("00"+(0<=f?f:0)).slice(-2)+":"+("00"+(0<=h?h:0)).slice(-2)+":"+("00"+(0<=k?k:0)).slice(-2);return-1==f&&-1==h&&-1==k?a:-1==d&&-1==e&&-1==g?b:a+"T"+b}function Yb(a){if("string"===typeof a)return fa(a);if(Array.isArray(a)){if("undefined"=== typeof Uint8Array)throw Error("Unsupported");return new Uint8Array(a)}return a}function nc(a,b,c){if("undefined"!==typeof Db&&Db.writeFileSync)return c?Db.writeFileSync(a,b,c):Db.writeFileSync(a,b);c="utf8"==c?oc(b):b;if("undefined"!==typeof IE_SaveFile)return IE_SaveFile(c,a);if("undefined"!==typeof Blob){c=new Blob([Yb(c)],{type:"application/octet-stream"});if("undefined"!==typeof navigator&&navigator.msSaveBlob)return navigator.msSaveBlob(c,a);if("undefined"!==typeof saveAs)return saveAs(c,a); if("undefined"!==typeof URL&&"undefined"!==typeof document&&document.createElement&&URL.createObjectURL){var d=URL.createObjectURL(c);if("object"===typeof chrome&&"function"==typeof(chrome.downloads||{}).download)return URL.revokeObjectURL&&"undefined"!==typeof setTimeout&&setTimeout(function(){URL.revokeObjectURL(d)},6E4),chrome.downloads.download({url:d,filename:a,saveAs:!0});c=document.createElement("a");if(null!=c.download)return c.download=a,c.href=d,document.body.appendChild(c),c.click(),document.body.removeChild(c), URL.revokeObjectURL&&"undefined"!==typeof setTimeout&&setTimeout(function(){URL.revokeObjectURL(d)},6E4),d}}if("undefined"!==typeof $&&"undefined"!==typeof File&&"undefined"!==typeof Folder)try{var e=File(a);e.open("w");e.encoding="binary";Array.isArray(b)&&(b=ta(b));e.write(b);e.close();return b}catch(g){if(!g.message||!g.message.match(/onstruct/))throw g;}throw Error("cannot save file "+a);}function R(a){for(var b=Object.keys(a),c=[],d=0;d<b.length;++d)a.hasOwnProperty(b[d])&&c.push(b[d]);return c} function Lc(a,b){for(var c=[],d=R(a),e=0;e!==d.length;++e)null==c[a[d[e]][b]]&&(c[a[d[e]][b]]=d[e]);return c}function Mc(a){for(var b=[],c=R(a),d=0;d!==c.length;++d)b[a[c[d]]]=c[d];return b}function Nc(a){for(var b=[],c=R(a),d=0;d!==c.length;++d)b[a[c[d]]]=parseInt(c[d],10);return b}function Ca(a,b){a=a.getTime();b&&(a-=1263168E5);return(a-ye)/864E5}function Ad(a){var b=new Date;b.setTime(864E5*a+ye);return b}function ja(a,b){var c=new Date(a);if(Hg)return 0<b?c.setTime(c.getTime()+6E4*c.getTimezoneOffset()): 0>b&&c.setTime(c.getTime()-6E4*c.getTimezoneOffset()),c;if(a instanceof Date)return a;if(1917==Oc.getFullYear()&&!isNaN(c.getFullYear())){b=c.getFullYear();if(-1<a.indexOf(""+b))return c;c.setFullYear(c.getFullYear()+100);return c}c=a.match(/\d+/g)||"2017 2 19 0 0 0".split(" ");c=new Date(+c[0],+c[1]-1,+c[2],+c[3]||0,+c[4]||0,+c[5]||0);-1<a.indexOf("Z")&&(c=new Date(c.getTime()-6E4*c.getTimezoneOffset()));return c}function Eb(a){for(var b="",c=0;c!=a.length;++c)b+=String.fromCharCode(a[c]);return b} function Na(a){if("undefined"!=typeof JSON&&!Array.isArray(a))return JSON.parse(JSON.stringify(a));if("object"!=typeof a||null==a)return a;if(a instanceof Date)return new Date(a.getTime());var b={},c;for(c in a)a.hasOwnProperty(c)&&(b[c]=Na(a[c]));return b}function vb(a,b){for(var c="";c.length<b;)c+=a;return c}function Za(a){var b=Number(a);if(!isNaN(b))return b;var c=1;a=a.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){c*=100;return""});if(!isNaN(b=Number(a)))return b/ c;a=a.replace(/[(](.*)[)]/,function(a,b){c=-c;return b});return isNaN(b=Number(a))?b:b/c}function Zb(a){var b=new Date(a),c=new Date(NaN),d=b.getYear(),e=b.getMonth(),g=b.getDate();return isNaN(g)||0>d||8099<d?c:(0<e||1<g)&&101!=d||a.toLowerCase().match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)?b:a.match(/[^-0-9:,\/\\]/)?c:b}function ze(a){return a?a.data?Fb(a.data):a.asNodeBuffer&&ia?Fb(a.asNodeBuffer().toString("binary")):a.asBinary?Fb(a.asBinary()):a._data&&a._data.getContent?Fb(Eb(Array.prototype.slice.call(a._data.getContent(), 0))):a.content&&a.type?Fb(Eb(a.content)):null:null}function Ig(a){return a?a.data?S(a.data):a.asNodeBuffer&&ia?a.asNodeBuffer():a._data&&a._data.getContent?(a=a._data.getContent(),"string"==typeof a?S(a):Array.prototype.slice.call(a)):a.content&&a.type?a.content:null:null}function ib(a,b){var c=a.FullPaths||R(a.files);b=b.toLowerCase();for(var d=b.replace(/\//g,"\\"),e=0;e<c.length;++e){var g=c[e].toLowerCase();if(b==g||d==g)return a.files[c[e]]}return null}function Ae(a,b){a=ib(a,b);if(null==a)throw Error("Cannot find file "+ b+" in zip");return a}function Da(a,b,c){if(!c)return(a=Ae(a,b))&&".bin"===a.name.slice(-4)?Ig(a):ze(a);if(!b)return null;try{return Da(a,b)}catch(d){return null}}function fb(a,b,c){if(!c)return ze(Ae(a,b));if(!b)return null;try{return fb(a,b)}catch(d){return null}}function Jg(a){a=a.FullPaths||R(a.files);for(var b=[],c=0;c<a.length;++c)"/"!=a[c].slice(-1)&&b.push(a[c]);return b.sort()}function ka(a,b,c){a.FullPaths?J.utils.cfb_add(a,b,c):a.file(b,c)}function Bd(a,b){var c=b.split("/");"/"!=b.slice(-1)&& c.pop();for(a=a.split("/");0!==a.length;)b=a.shift(),".."===b?c.pop():"."!==b&&c.push(b);return c.join("/")}function U(a,b){for(var c={},d=0,e=0;d!==a.length&&32!==(e=a.charCodeAt(d))&&10!==e&&13!==e;++d);b||(c[0]=a.slice(0,d));if(d===a.length)return c;a=a.match(Kg);var g;if(a)for(b=0;b!=a.length;++b){var f=a[b];for(e=0;e!=f.length&&61!==f.charCodeAt(e);++e);for(g=f.slice(0,e).trim();32==f.charCodeAt(e+1);)++e;var h=34==(d=f.charCodeAt(e+1))||39==d?1:0;f=f.slice(e+1+h,f.length-h);for(e=0;e!=g.length&& 58!==g.charCodeAt(e);++e);e===g.length?(0<g.indexOf("_")&&(g=g.slice(0,g.indexOf("_"))),c[g]=f,c[g.toLowerCase()]=f):(h=(5===e&&"xmlns"===g.slice(0,5)?"xmlns":"")+g.slice(e+1),c[h]&&"ext"==g.slice(e-3,e)||(c[h]=f,c[h.toLowerCase()]=f))}return c}function wb(a){return a.replace(Lg,"<$1")}function da(a){return(a+"").replace(Cd,function(a){return Dd[a]}).replace(Mg,function(a){return"_x"+("000"+a.charCodeAt(0).toString(16)).slice(-4)+"_"})}function Ed(a){return(a+"").replace(Cd,function(a){return Dd[a]}).replace(/\n/g, "<br/>").replace(Be,function(a){return"&#x"+("000"+a.charCodeAt(0).toString(16)).slice(-4)+";"})}function Ng(a){return(a+"").replace(Cd,function(a){return Dd[a]}).replace(Be,function(a){return"&#x"+a.charCodeAt(0).toString(16).toUpperCase()+";"})}function la(a){switch(a){case 1:case !0:case "1":case "true":case "TRUE":return!0;default:return!1}}function Ce(a,b){var c=U(a);a=a.match(Og(c.baseType))||[];var d=[];if(a.length!=c.size){if(b.WTF)throw Error("unexpected vector length "+a.length+" != "+c.size); return d}a.forEach(function(a){(a=a.replace(Pg,"").match(Qg))&&d.push({v:T(a[2]),t:a[1]})});return d}function Oa(a,b){return"<"+a+(b.match(De)?' xml:space="preserve"':"")+">"+b+"</"+a+">"}function pc(a){return R(a).map(function(b){return" "+b+'="'+a[b]+'"'}).join("")}function v(a,b,c){return"<"+a+(null!=c?pc(c):"")+(null!=b?(b.match(De)?' xml:space="preserve"':"")+">"+b+"</"+a:"/")+">"}function Fd(a,b){try{return a.toISOString().replace(/\.\d*/,"")}catch(c){if(b)throw c;}return""}function Rg(a){switch(typeof a){case "string":return v("vt:lpwstr", a);case "number":return v((a|0)==a?"vt:i4":"vt:r8",String(a));case "boolean":return v("vt:bool",a?"true":"false")}if(a instanceof Date)return v("vt:filetime",Fd(a));throw Error("Unable to serialize "+a);}function qc(a,b){var c="";var d=[];switch(b){case "dbcs":var e=this.l;if(ia&&Buffer.isBuffer(this))c=this.slice(this.l,this.l+2*a).toString("utf16le");else for(b=0;b<a;++b)c+=String.fromCharCode($a(this,e)),e+=2;a*=2;break;case "utf8":c=xb(this,this.l,this.l+a);break;case "utf16le":a*=2;c=$b(this, this.l,this.l+a);break;case "wstr":if("undefined"!==typeof cptable)c=cptable.utils.decode(Ua,this.slice(this.l,this.l+2*a));else return qc.call(this,a,"dbcs");a*=2;break;case "lpstr-ansi":c=Pc(this,this.l);a=4+oa(this,this.l);break;case "lpstr-cp":c=Qc(this,this.l);a=4+oa(this,this.l);break;case "lpwstr":c=Rc(this,this.l);a=4+2*oa(this,this.l);break;case "lpp4":a=4+oa(this,this.l);c=Gd(this,this.l);a&2&&(a+=2);break;case "8lpp4":a=4+oa(this,this.l);c=Sc(this,this.l);a&3&&(a+=4-(a&3));break;case "cstr":for(a= 0;0!==(c=Sg(this,this.l+a++));)d.push(rc(c));c=d.join("");break;case "_wstr":for(a=0;0!==(c=$a(this,this.l+a));)d.push(rc(c)),a+=2;a+=2;c=d.join("");break;case "dbcs-cont":e=this.l;for(b=0;b<a;++b){if(this.lens&&-1!==this.lens.indexOf(e))return c=this[e],this.l=e+1,a=qc.call(this,a-b,c?"dbcs-cont":"sbcs-cont"),d.join("")+a;d.push(rc($a(this,e)));e+=2}c=d.join("");a*=2;break;case "cpstr":if("undefined"!==typeof cptable){c=cptable.utils.decode(Ua,this.slice(this.l,this.l+a));break}case "sbcs-cont":e= this.l;for(b=0;b!=a;++b){if(this.lens&&-1!==this.lens.indexOf(e))return c=this[e],this.l=e+1,a=qc.call(this,a-b,c?"dbcs-cont":"sbcs-cont"),d.join("")+a;d.push(rc(this[e]));e+=1}c=d.join("");break;default:switch(a){case 1:return d=this[this.l],this.l++,d;case 2:return d=("i"===b?Tg:$a)(this,this.l),this.l+=2,d;case 4:case -4:if("i"===b||0===(this[this.l+3]&128))return d=(0<a?Gb:Ug)(this,this.l),this.l+=4,d;d=oa(this,this.l);this.l+=4;return d;case 8:case -8:if("f"===b)return d=8==a?Tc(this,this.l): Tc([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,d;a=8;case 16:c=Uc(this,this.l,a)}}this.l+=a;return c}function Vg(a,b,c){var d=0,e=0;if("dbcs"===c){for(e=0;e!=b.length;++e)d=b.charCodeAt(e),a=this.l+2*e,this[a]=d&255,this[a+1]=d>>>8&255;d=2*b.length}else if("sbcs"===c){b=b.replace(/[^\x00-\x7F]/g,"_");for(e=0;e!=b.length;++e)this[this.l+e]=b.charCodeAt(e)&255;d=b.length}else{if("hex"===c){for(;e<a;++e)this[this.l++]= parseInt(b.slice(2*e,2*e+2),16)||0;return this}if("utf16le"===c){d=Math.min(this.l+a,this.length);for(e=0;e<Math.min(b.length,a);++e)c=b.charCodeAt(e),this[this.l++]=c&255,this[this.l++]=c>>8;for(;this.l<d;)this[this.l++]=0;return this}switch(a){case 1:d=1;this[this.l]=b&255;break;case 2:d=2;this[this.l]=b&255;this[this.l+1]=b>>>8&255;break;case 3:d=3;this[this.l]=b&255;b>>>=8;this[this.l+1]=b&255;this[this.l+2]=b>>>8&255;break;case 4:d=4;e=this.l;this[e]=b&255;this[e+1]=b>>>8&255;this[e+2]=b>>>16& 255;this[e+3]=b>>>24&255;break;case 8:if(d=8,"f"===c){c=b;b=this.l;var g=(e=(0>c||-Infinity==1/c?1:0)<<7)?-c:c;isFinite(g)?0==g?a=c=0:(a=Math.floor(Math.log(g)/Math.LN2),c=g*Math.pow(2,52-a),-1023>=a&&(!isFinite(c)||c<Math.pow(2,52))?a=-1022:(c-=Math.pow(2,52),a+=1023)):(a=2047,c=isNaN(c)?26985:0);for(g=0;5>=g;++g,c/=256)this[b+g]=c&255;this[b+6]=(a&15)<<4|c&15;this[b+7]=a>>4|e;break}case 16:break;case -4:d=4,e=this.l,this[e]=b&255,this[e+1]=b>>8&255,this[e+2]=b>>16&255,this[e+3]=b>>24&255}}this.l+= d;return this}function Ee(a,b){var c=Uc(this,this.l,a.length>>1);if(c!==a)throw Error(b+"Expected "+a+" saw "+c);this.l+=a.length>>1}function xa(a,b){a.l=b;a.read_shift=qc;a.chk=Ee;a.write_shift=Vg}function Ha(a,b){a.l+=b}function B(a){a=z(a);xa(a,0);return a}function jb(a,b,c){if(a){var d;xa(a,a.l||0);for(var e=a.length,g;a.l<e;){g=a.read_shift(1);g&128&&(g=(g&127)+((a.read_shift(1)&127)<<7));var f=Vc[g]||Vc[65535];var h=a.read_shift(1);var k=h&127;for(d=1;4>d&&h&128;++d)k+=((h=a.read_shift(1))& 127)<<7*d;h=a.l+k;k=(f.f||Ha)(a,k,c);a.l=h;if(b(k,f.n,g))break}}}function rb(){var a=[],b=ia?256:2048,c=function(a){a=B(a);xa(a,0);return a},d=c(b),e=function(){d&&(d.length>d.l&&(d=d.slice(0,d.l),d.l=d.length),0<d.length&&a.push(d),d=null)},g=function(a){if(d&&a<d.length-d.l)return d;e();return d=c(Math.max(a+1,b))};return{next:g,push:function(a){e();d=a;null==d.l&&(d.l=d.length);g(b)},end:function(){e();return Qb([a])},_bufs:a}}function D(a,b,c,d){b=+Wg[b];if(!isNaN(b)){d||(d=Vc[b].p||(c||[]).length|| 0);var e=(128<=b?1:0)+2;128<=d&&++e;16384<=d&&++e;2097152<=d&&++e;e=a.next(e);127>=b?e.write_shift(1,b):(e.write_shift(1,(b&127)+128),e.write_shift(1,b>>7));for(b=0;4!=b;++b)if(128<=d)e.write_shift(1,(d&127)+128),d>>=7;else{e.write_shift(1,d);break}0<d&&Hd(c)&&a.push(c)}}function sc(a,b,c){a=Na(a);b.s?(a.cRel&&(a.c+=b.s.c),a.rRel&&(a.r+=b.s.r)):(a.cRel&&(a.c+=b.c),a.rRel&&(a.r+=b.r));if(!c||12>c.biff){for(;256<=a.c;)a.c-=256;for(;65536<=a.r;)a.r-=65536}return a}function Fe(a,b,c){a=Na(a);a.s=sc(a.s, b.s,c);a.e=sc(a.e,b.s,c);return a}function tc(a,b){a.cRel&&0>a.c&&(a=Na(a),a.c+=8<b?16384:256);a.rRel&&0>a.r&&(a=Na(a),a.r+=8<b?1048576:5<b?65536:16384);b=I(a);0===a.cRel&&(b=b.replace(/^([A-Z])/,"$$$1"));0===a.rRel&&(b=b.replace(/([A-Z]|^)(\d+)$/,"$1$$$2"));return b}function Id(a,b){return 0!=a.s.r||a.s.rRel||a.e.r!=(12<=b.biff?1048575:8<=b.biff?65536:16384)||a.e.rRel?0!=a.s.c||a.s.cRel||a.e.c!=(12<=b.biff?65535:255)||a.e.cRel?tc(a.s,b.biff)+":"+tc(a.e,b.biff):(a.s.rRel?"":"$")+ya(a.s.r)+":"+(a.e.rRel? "":"$")+ya(a.e.r):(a.s.cRel?"":"$")+pa(a.s.c)+":"+(a.e.cRel?"":"$")+pa(a.e.c)}function Wc(a){return parseInt(a.replace(/\$(\d+)$/,"$1"),10)-1}function ya(a){return""+(a+1)}function Xc(a){a=a.replace(/^\$([A-Z])/,"$1");for(var b=0,c=0;c!==a.length;++c)b=26*b+a.charCodeAt(c)-64;return b-1}function pa(a){var b="";for(++a;a;a=Math.floor((a-1)/26))b=String.fromCharCode((a-1)%26+65)+b;return b}function Ge(a){return a.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")}function Ia(a){a=Ge(a);return{c:Xc(a[0]), r:Wc(a[1])}}function I(a){return pa(a.c)+ya(a.r)}function Ja(a){a=a.split(":").map(Ia);return{s:a[0],e:a[a.length-1]}}function Z(a,b){if("undefined"===typeof b||"number"===typeof b)return Z(a.s,a.e);"string"!==typeof a&&(a=I(a));"string"!==typeof b&&(b=I(b));return a==b?a:a+":"+b}function aa(a){var b={s:{c:0,r:0},e:{c:0,r:0}},c,d=0,e=0,g=a.length;for(c=0;d<g&&!(1>(e=a.charCodeAt(d)-64)||26<e);++d)c=26*c+e;b.s.c=--c;for(c=0;d<g&&!(0>(e=a.charCodeAt(d)-48)||9<e);++d)c=10*c+e;b.s.r=--c;if(d===g||58=== a.charCodeAt(++d))return b.e.c=b.s.c,b.e.r=b.s.r,b;for(c=0;d!=g&&!(1>(e=a.charCodeAt(d)-64)||26<e);++d)c=26*c+e;b.e.c=--c;for(c=0;d!=g&&!(0>(e=a.charCodeAt(d)-48)||9<e);++d)c=10*c+e;b.e.r=--c;return b}function He(a,b){var c="d"==a.t&&b instanceof Date;if(null!=a.z)try{return a.w=H.format(a.z,c?Ca(b):b)}catch(d){}try{return a.w=H.format((a.XF||{}).numFmtId||(c?14:0),c?Ca(b):b)}catch(d){return""+b}}function yb(a,b,c){if(null==a||null==a.t||"z"==a.t)return"";if(void 0!==a.w)return a.w;"d"==a.t&&!a.z&& c&&c.dateNF&&(a.z=c.dateNF);return void 0==b?He(a,a.v):He(a,b)}function zb(a,b){b=b&&b.sheet?b.sheet:"Sheet1";var c={};c[b]=a;return{SheetNames:[b],Sheets:c}}function Ie(a,b,c){c=c||{};var d=a?Array.isArray(a):c.dense;a=a||(d?[]:{});var e=0,g=0;a&&null!=c.origin&&("number"==typeof c.origin?e=c.origin:(g="string"==typeof c.origin?Ia(c.origin):c.origin,e=g.r,g=g.c));var f={s:{c:1E7,r:1E7},e:{c:0,r:0}};if(a["!ref"]){var h=aa(a["!ref"]);f.s.c=h.s.c;f.s.r=h.s.r;f.e.c=Math.max(f.e.c,h.e.c);f.e.r=Math.max(f.e.r, h.e.r);-1==e&&(f.e.r=e=h.e.r+1)}for(h=0;h!=b.length;++h)if(b[h]){if(!Array.isArray(b[h]))throw Error("aoa_to_sheet expects an array of arrays");for(var k=0;k!=b[h].length;++k)if("undefined"!==typeof b[h][k]){var l={v:b[h][k]},m=e+h,n=g+k;f.s.r>m&&(f.s.r=m);f.s.c>n&&(f.s.c=n);f.e.r<m&&(f.e.r=m);f.e.c<n&&(f.e.c=n);if(!b[h][k]||"object"!==typeof b[h][k]||Array.isArray(b[h][k])||b[h][k]instanceof Date)if(Array.isArray(l.v)&&(l.f=b[h][k][1],l.v=l.v[0]),null===l.v)if(l.f)l.t="n";else if(c.sheetStubs)l.t= "z";else continue;else"number"===typeof l.v?l.t="n":"boolean"===typeof l.v?l.t="b":l.v instanceof Date?(l.z=c.dateNF||H._table[14],c.cellDates?(l.t="d",l.w=H.format(l.z,Ca(l.v))):(l.t="n",l.v=Ca(l.v),l.w=H.format(l.z,l.v))):l.t="s";else l=b[h][k];d?(a[m]||(a[m]=[]),a[m][n]=l):(m=I({c:n,r:m}),a[m]=l)}}1E7>f.s.c&&(a["!ref"]=Z(f));return a}function ac(a,b){return Ie(null,a,b)}function Ab(a,b){b||(b=B(4));b.write_shift(4,a);return b}function Ea(a){var b=a.read_shift(4);return 0===b?"":a.read_shift(b, "dbcs")}function Pa(a,b){var c=!1;null==b&&(c=!0,b=B(4+2*a.length));b.write_shift(4,a.length);0<a.length&&b.write_shift(0,a,"dbcs");return c?b.slice(0,b.l):b}function Xg(a){return{ich:a.read_shift(2),ifnt:a.read_shift(2)}}function Je(a,b){var c=a.l,d=a.read_shift(1),e=Ea(a),g=[];e={t:e,h:e};if(0!==(d&1)){d=a.read_shift(4);for(var f=0;f!=d;++f)g.push(Xg(a));e.r=g}else e.r=[{ich:0,ifnt:0}];a.l=c+b;return e}function Va(a){var b=a.read_shift(4),c=a.read_shift(2);c+=a.read_shift(1)<<16;a.l++;return{c:b, iStyleRef:c}}function bc(a,b){null==b&&(b=B(8));b.write_shift(-4,a.c);b.write_shift(3,a.iStyleRef||a.s);b.write_shift(1,0);return b}function uc(a){var b=a.read_shift(4);return 0===b||4294967295===b?"":a.read_shift(b,"dbcs")}function Yc(a,b){var c=!1;null==b&&(c=!0,b=B(127));b.write_shift(4,0<a.length?a.length:4294967295);0<a.length&&b.write_shift(0,a,"dbcs");return c?b.slice(0,b.l):b}function Ke(a){var b=a.slice(a.l,a.l+4),c=b[0]&1,d=b[0]&2;a.l+=4;b[0]&=252;a=0===d?Tc([0,0,0,0,b[0],b[1],b[2],b[3]], 0):Gb(b,0)>>2;return c?a/100:a}function Le(a){var b={s:{},e:{}};b.s.r=a.read_shift(4);b.e.r=a.read_shift(4);b.s.c=a.read_shift(4);b.e.c=a.read_shift(4);return b}function Qa(a){return a.read_shift(8,"f")}function Zc(a,b){return(b||B(8)).write_shift(8,a,"f")}function $c(a,b){b||(b=B(8));if(!a||a.auto)return b.write_shift(4,0),b.write_shift(4,0),b;a.index?(b.write_shift(1,2),b.write_shift(1,a.index)):a.theme?(b.write_shift(1,6),b.write_shift(1,a.theme)):(b.write_shift(1,5),b.write_shift(1,0));var c= a.tint||0;0<c?c*=32767:0>c&&(c*=32768);b.write_shift(2,c);a.rgb?(a=a.rgb||"FFFFFF",b.write_shift(1,parseInt(a.slice(0,2),16)),b.write_shift(1,parseInt(a.slice(2,4),16)),b.write_shift(1,parseInt(a.slice(4,6),16)),b.write_shift(1,255)):(b.write_shift(2,0),b.write_shift(1,0),b.write_shift(1,0));return b}function Me(a,b){var c={2:"BITMAP",3:"METAFILEPICT",8:"DIB",14:"ENHMETAFILE"},d=a.read_shift(4);switch(d){case 0:return"";case 4294967295:case 4294967294:return c[a.read_shift(4)]||""}if(400<d)throw Error("Unsupported Clipboard: "+ d.toString(16));a.l-=4;return a.read_shift(0,1==b?"lpstr":"lpwstr")}function Ne(){return{workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],TODO:[],xmlns:""}}function Yg(a){var b=Ne();if(!a||!a.match)return b;var c={};(a.match(Ka)||[]).forEach(function(a){a=U(a);switch(a[0].replace(Zg,"<")){case "<Types":b.xmlns=a["xmlns"+(a[0].match(/<(\w+):/)||["",""])[1]];break;case "<Default":c[a.Extension]= a.ContentType;break;case "<Override":void 0!==b[ad[a.ContentType]]&&b[ad[a.ContentType]].push(a.PartName)}});if(b.xmlns!==W.CT)throw Error("Unknown Namespace: "+b.xmlns);b.calcchain=0<b.calcchains.length?b.calcchains[0]:"";b.sst=0<b.strs.length?b.strs[0]:"";b.style=0<b.styles.length?b.styles[0]:"";b.defaults=c;delete b.calcchains;return b}function $g(a,b){var c=[],d;c[c.length]='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n';c[c.length]=ah;c=c.concat(bh);var e=function(e){a[e]&&0<a[e].length&& (d=a[e][0],c[c.length]=v("Override",null,{PartName:("/"==d[0]?"":"/")+d,ContentType:Oe[e][b.bookType||"xlsx"]}))},g=function(d){(a[d]||[]).forEach(function(a){c[c.length]=v("Override",null,{PartName:("/"==a[0]?"":"/")+a,ContentType:Oe[d][b.bookType||"xlsx"]})})},f=function(b){(a[b]||[]).forEach(function(a){c[c.length]=v("Override",null,{PartName:("/"==a[0]?"":"/")+a,ContentType:Pe[b][0]})})};e("workbooks");g("sheets");g("charts");f("themes");["strs","styles"].forEach(e);["coreprops","extprops","custprops"].forEach(f); f("vba");f("comments");f("drawings");2<c.length&&(c[c.length]="</Types>",c[1]=c[1].replace("/>",">"));return c.join("")}function Jd(a){var b=a.lastIndexOf("/");return a.slice(0,b+1)+"_rels/"+a.slice(b+1)+".rels"}function bd(a,b){if(!a)return a;"/"!==b.charAt(0)&&(b="/"+b);var c={},d={};(a.match(Ka)||[]).forEach(function(a){a=U(a);if("<Relationship"===a[0]){var e={};e.Type=a.Type;e.Target=a.Target;e.Id=a.Id;e.TargetMode=a.TargetMode;var f="External"===a.TargetMode?a.Target:Bd(a.Target,b);c[f]=e;d[a.Id]= e}});c["!id"]=d;return c}function Kd(a){var b=['<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n',ch];R(a["!id"]).forEach(function(c){b[b.length]=v("Relationship",null,a["!id"][c])});2<b.length&&(b[b.length]="</Relationships>",b[1]=b[1].replace("/>",">"));return b.join("")}function Fa(a,b,c,d,e){e||(e={});a["!id"]||(a["!id"]={});if(0>b)for(b=1;a["!id"]["rId"+b];++b);e.Id="rId"+b;e.Type=d;e.Target=c;e.Type==Q.HLINK&&(e.TargetMode="External");if(a["!id"][e.Id])throw Error("Cannot rewrite rId "+ b);a["!id"][e.Id]=e;a[("/"+e.Target).replace("//","/")]=e;return b}function Qe(a,b,c){return[' <rdf:Description rdf:about="'+a+'">\n',' <rdf:type rdf:resource="http://docs.oasis-open.org/ns/office/1.2/meta/'+(c||"odf")+"#"+b+'"/>\n'," </rdf:Description>\n"].join("")}function Re(a){var b={};a=T(a);for(var c=0;c<Ga.length;++c){var d=Ga[c],e=a.match(dh[c]);null!=e&&0<e.length&&(b[d[1]]=e[1]);"date"===d[2]&&b[d[1]]&&(b[d[1]]=ja(b[d[1]]))}return b}function Ld(a,b,c,d,e){null==e[a]&&null!=b&&""!== b&&(e[a]=b,d[d.length]=c?v(a,b,c):Oa(a,b))}function Se(a,b,c,d){var e=[];if("string"==typeof a)e=Ce(a,d);else for(var g=0;g<a.length;++g)e=e.concat(a[g].map(function(a){return{v:a}}));a="string"==typeof b?Ce(b,d).map(function(a){return a.v}):b;d=b=0;if(0<a.length)for(g=0;g!==e.length;g+=2){d=+e[g+1].v;switch(e[g].v){case "Worksheets":case "\u5de5\u4f5c\u8868":case "\u041b\u0438\u0441\u0442\u044b":case "\u0623\u0648\u0631\u0627\u0642 \u0627\u0644\u0639\u0645\u0644":case "\u30ef\u30fc\u30af\u30b7\u30fc\u30c8":case "\u05d2\u05dc\u05d9\u05d5\u05e0\u05d5\u05ea \u05e2\u05d1\u05d5\u05d3\u05d4":case "Arbeitsbl\u00e4tter":case "\u00c7al\u0131\u015fma Sayfalar\u0131":case "Feuilles de calcul":case "Fogli di lavoro":case "Folhas de c\u00e1lculo":case "Planilhas":case "Regneark":case "Werkbladen":c.Worksheets= d;c.SheetNames=a.slice(b,b+d);break;case "Named Ranges":case "\u540d\u524d\u4ed8\u304d\u4e00\u89a7":case "Benannte Bereiche":case "Navngivne omr\u00e5der":c.NamedRanges=d;c.DefinedNames=a.slice(b,b+d);break;case "Charts":case "Diagramme":c.Chartsheets=d,c.ChartNames=a.slice(b,b+d)}b+=d}}function eh(a,b,c){var d={};b||(b={});a=T(a);gb.forEach(function(c){switch(c[2]){case "string":b[c[1]]=(a.match(cc(c[0]))||[])[1];break;case "bool":b[c[1]]="true"===(a.match(cc(c[0]))||[])[1];break;case "raw":var e= a.match(new RegExp("<"+c[0]+"[^>]*>([\\s\\S]*?)</"+c[0]+">"));e&&0<e.length&&(d[c[1]]=e[1])}});d.HeadingPairs&&d.TitlesOfParts&&Se(d.HeadingPairs,d.TitlesOfParts,b,c);return b}function fh(a){var b=[];a||(a={});a.Application="SheetJS";b[b.length]='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n';b[b.length]=gh;gb.forEach(function(c){if(void 0!==a[c[1]]){switch(c[2]){case "string":var d=String(a[c[1]]);break;case "bool":d=a[c[1]]?"true":"false"}void 0!==d&&(b[b.length]=v(c[0],d))}});b[b.length]= v("HeadingPairs",v("vt:vector",v("vt:variant","<vt:lpstr>Worksheets</vt:lpstr>")+v("vt:variant",v("vt:i4",String(a.Worksheets))),{size:2,baseType:"variant"}));b[b.length]=v("TitlesOfParts",v("vt:vector",a.SheetNames.map(function(a){return"<vt:lpstr>"+da(a)+"</vt:lpstr>"}).join(""),{size:a.Worksheets,baseType:"lpstr"}));2<b.length&&(b[b.length]="</Properties>",b[1]=b[1].replace("/>",">"));return b.join("")}function hh(a,b){var c={},d="";if(a=a.match(ih))for(var e=0;e!=a.length;++e){var g=a[e],f=U(g); switch(f[0]){case "<?xml":break;case "<Properties":break;case "<property":d=f.name;break;case "</property>":d=null;break;default:if(0===g.indexOf("<vt:")){f=g.split(">");var h=f[0].slice(4),k=f[1];switch(h){case "lpstr":case "bstr":case "lpwstr":c[d]=ca(k);break;case "bool":c[d]=la(k);break;case "i1":case "i2":case "i4":case "i8":case "int":case "uint":c[d]=parseInt(k,10);break;case "r4":case "r8":case "decimal":c[d]=parseFloat(k);break;case "filetime":case "date":c[d]=ja(k);break;case "cy":case "error":c[d]= ca(k);break;default:"/"!=h.slice(-1)&&b.WTF&&"undefined"!==typeof console&&console.warn("Unexpected",g,h,f)}}else if("</"!==g.slice(0,2)&&b.WTF)throw Error(g);}}return c}function jh(a){var b=['<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n',kh];if(!a)return b.join("");var c=1;R(a).forEach(function(d){++c;b[b.length]=v("property",Rg(a[d]),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:c,name:d})});2<b.length&&(b[b.length]="</Properties>",b[1]=b[1].replace("/>",">"));return b.join("")} function lh(a,b,c){b=mh[b]||b;a[b]=c}function nh(a,b){var c=[];R(Md).map(function(a){for(var b=0;b<Ga.length;++b)if(Ga[b][1]==a)return Ga[b];for(b=0;b<gb.length;++b)if(gb[b][1]==a)return gb[b];throw a;}).forEach(function(d){if(null!=a[d[1]]){var e=b&&b.Props&&null!=b.Props[d[1]]?b.Props[d[1]]:a[d[1]];switch(d[2]){case "date":e=(new Date(e)).toISOString().replace(/\.\d*Z/,"Z")}"number"==typeof e?e=String(e):!0===e||!1===e?e=e?"1":"0":e instanceof Date&&(e=(new Date(e)).toISOString().replace(/\.\d*Z/, ""));c.push(Oa(Md[d[1]]||d[1],e))}});return v("DocumentProperties",c.join(""),{xmlns:ab.o})}function oh(a,b){var c=["Worksheets","SheetNames"],d=[];a&&R(a).forEach(function(b){if(a.hasOwnProperty(b)){for(var e=0;e<Ga.length;++e)if(b==Ga[e][1])return;for(e=0;e<gb.length;++e)if(b==gb[e][1])return;for(e=0;e<c.length;++e)if(b==c[e])return;e=a[b];var f="string";"number"==typeof e?(f="float",e=String(e)):!0===e||!1===e?(f="boolean",e=e?"1":"0"):e=String(e);d.push(v(da(b).replace(/ /g,"_x0020_"),e,{"dt:dt":f}))}}); b&&R(b).forEach(function(c){if(b.hasOwnProperty(c)&&(!a||!a.hasOwnProperty(c))){var e=b[c],f="string";"number"==typeof e?(f="float",e=String(e)):!0===e||!1===e?(f="boolean",e=e?"1":"0"):e instanceof Date?(f="dateTime.tz",e=e.toISOString()):e=String(e);d.push(v(da(c).replace(/ /g,"_x0020_"),e,{"dt:dt":f}))}});return'<CustomDocumentProperties xmlns="'+ab.o+'">'+d.join("")+"</CustomDocumentProperties>"}function Nd(a){var b=a.read_shift(4);a=a.read_shift(4);return(new Date(1E3*(a/1E7*Math.pow(2,32)+b/ 1E7-11644473600))).toISOString().replace(/\.000/,"")}function Te(a,b,c){b=a.l;var d=a.read_shift(0,"lpstr-cp");if(c)for(;a.l-b&3;)++a.l;return d}function Ue(a,b,c){b=a.read_shift(0,"lpwstr");c&&(a.l+=4-(b.length+1&3)&3);return b}function cd(a,b,c){return 31===b?Ue(a):Te(a,b,c)}function ph(a){var b=dd(a,81);a=dd(a,3);return[b,a]}function Ve(a,b){for(var c=a.read_shift(4),d={},e=0;e!=c;++e){var g=a.read_shift(4),f=a.read_shift(4);d[g]=a.read_shift(f,1200===b?"utf16le":"utf8").replace(na,"").replace(vc, "!");1200===b&&f%2&&(a.l+=2)}a.l&3&&(a.l=a.l>>3<<2);return d}function We(a){var b=a.read_shift(4),c=a.slice(a.l,a.l+b);a.l+=b;0<(b&3)&&(a.l+=4-(b&3)&3);return c}function dd(a,b,c){var d=a.read_shift(2);c=c||{};a.l+=2;if(12!==b&&d!==b&&-1===qh.indexOf(b))throw Error("Expected type "+b+" saw "+d);switch(12===b?d:b){case 2:return b=a.read_shift(2,"i"),c.raw||(a.l+=2),b;case 3:return b=a.read_shift(4,"i");case 11:return 0!==a.read_shift(4);case 19:return b=a.read_shift(4);case 30:return Te(a,d,4).replace(na, "");case 31:return Ue(a);case 64:return Nd(a);case 65:return We(a);case 71:return b={},b.Size=a.read_shift(4),a.l+=b.Size+3-(b.Size-1)%4,b;case 80:return cd(a,d,!1===!c.raw?0:4).replace(na,"");case 81:if(!d)throw Error("VtUnalignedString must have positive length");return cd(a,d,0).replace(na,"");case 4108:b=a.read_shift(4);d=[];for(c=0;c!=b/2;++c)d.push(ph(a));return d;case 4126:b=a.read_shift(4);d=[];for(c=0;c!=b;++c)d[c]=a.read_shift(0,"lpstr-cp").replace(na,"");return d;default:throw Error("TypedPropertyValue unrecognized type "+ b+" "+d);}}function Xe(a,b){var c=B(4),d=B(4);c.write_shift(4,80==a?31:a);switch(a){case 3:d.write_shift(-4,b);break;case 5:d=B(8);d.write_shift(8,b,"f");break;case 11:d.write_shift(4,b?1:0);break;case 64:b=("string"==typeof b?new Date(Date.parse(b)):b).getTime()/1E3+11644473600;a=b%Math.pow(2,32);b=(b-a)/Math.pow(2,32);a*=1E7;b*=1E7;d=a/Math.pow(2,32)|0;0<d&&(a%=Math.pow(2,32),b+=d);d=B(8);d.write_shift(4,a);d.write_shift(4,b);break;case 31:case 80:d=B(4+2*(b.length+1)+(b.length%2?0:2));d.write_shift(4, b.length+1);for(d.write_shift(0,b,"dbcs");d.l!=d.length;)d.write_shift(1,0);break;default:throw Error("TypedPropertyValue unrecognized type "+a+" "+b);}return kb([c,d])}function Ye(a,b){var c=a.l,d=a.read_shift(4),e=a.read_shift(4),g=[],f=0,h=0,k=-1,l={};for(f=0;f!=e;++f){var m=a.read_shift(4),n=a.read_shift(4);g[f]=[m,n+c]}g.sort(function(a,b){return a[1]-b[1]});m={};for(f=0;f!=e;++f){if(a.l!==g[f][1]){n=!0;if(0<f&&b)switch(b[g[f-1][0]].t){case 2:a.l+2===g[f][1]&&(a.l+=2,n=!1);break;case 80:a.l<= g[f][1]&&(a.l=g[f][1],n=!1);break;case 4108:a.l<=g[f][1]&&(a.l=g[f][1],n=!1)}(!b||0==f)&&a.l<=g[f][1]&&(n=!1,a.l=g[f][1]);if(n)throw Error("Read Error: Expected address "+g[f][1]+" at "+a.l+" :"+f);}if(b){if(n=b[g[f][0]],m[n.n]=dd(a,n.t,{raw:!0}),"version"===n.p&&(m[n.n]=String(m[n.n]>>16)+"."+("0000"+String(m[n.n]&65535)).slice(-4)),"CodePage"==n.n)switch(m[n.n]){case 0:m[n.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:Wa(h= m[n.n]>>>0&65535);break;default:throw Error("Unsupported CodePage: "+m[n.n]);}}else if(1===g[f][0])h=m.CodePage=dd(a,2),Wa(h),-1!==k&&(n=a.l,a.l=g[k][1],l=Ve(a,h),a.l=n);else if(0===g[f][0])0===h?(k=f,a.l=g[f+1][1]):l=Ve(a,h);else{n=l[g[f][0]];switch(a[a.l]){case 65:a.l+=4;var q=We(a);break;case 30:a.l+=4;q=cd(a,a[a.l-4],4).replace(/\u0000+$/,"");break;case 31:a.l+=4;q=cd(a,a[a.l-4],4).replace(/\u0000+$/,"");break;case 3:a.l+=4;q=a.read_shift(4,"i");break;case 19:a.l+=4;q=a.read_shift(4);break;case 5:a.l+= 4;q=a.read_shift(8,"f");break;case 11:a.l+=4;q=qa(a,4);break;case 64:a.l+=4;q=ja(Nd(a));break;default:throw Error("unparsed value: "+a[a.l]);}m[n]=q}}a.l=c+d;return m}function rh(a){switch(typeof a){case "boolean":return 11;case "number":return(a|0)==a?3:5;case "string":return 31;case "object":if(a instanceof Date)return 64}return-1}function Ze(a,b,c){var d=B(8),e=[],g=[],f=8,h,k=B(8),l=B(8);k.write_shift(4,2);k.write_shift(4,1200);l.write_shift(4,1);g.push(k);e.push(l);f+=8+k.length;if(!b){l=B(8); l.write_shift(4,0);e.unshift(l);var m=[B(4)];m[0].write_shift(4,a.length);for(h=0;h<a.length;++h){l=a[h][0];k=B(8+2*(l.length+1)+(l.length%2?0:2));k.write_shift(4,h+2);k.write_shift(4,l.length+1);for(k.write_shift(0,l,"dbcs");k.l!=k.length;)k.write_shift(1,0);m.push(k)}k=kb(m);g.unshift(k);f+=8+k.length}for(h=0;h<a.length;++h)b&&!b[a[h][0]]||-1<$e.indexOf(a[h][0])||null==a[h][1]||(k=a[h][1],m=0,b?(m=+b[a[h][0]],l=c[m],"version"==l.p&&"string"==typeof k&&(k=k.split("."),k=(+k[0]<<16)+(+k[1]||0)),k= Xe(l.t,k)):(l=rh(k),-1==l&&(l=31,k=String(k)),k=Xe(l,k)),g.push(k),l=B(8),l.write_shift(4,b?m:2+h),e.push(l),f+=8+k.length);a=8*(g.length+1);for(h=0;h<g.length;++h)e[h].write_shift(4,a),a+=g[h].length;d.write_shift(4,f);d.write_shift(4,g.length);return kb([d].concat(e).concat(g))}function af(a,b,c){a=a.content;if(!a)return{};xa(a,0);var d=0;a.chk("feff","Byte Order: ");a.read_shift(2);var e=a.read_shift(4);var g=a.read_shift(16);if(g!==J.utils.consts.HEADER_CLSID&&g!==c)throw Error("Bad PropertySet CLSID "+ g);c=a.read_shift(4);if(1!==c&&2!==c)throw Error("Unrecognized #Sets: "+c);g=a.read_shift(16);var f=a.read_shift(4);if(1===c&&f!==a.l)throw Error("Length mismatch: "+f+" !== "+a.l);if(2===c){var h=a.read_shift(16);d=a.read_shift(4)}b=Ye(a,b);e={SystemIdentifier:e};for(var k in b)e[k]=b[k];e.FMTID=g;if(1===c)return e;2==d-a.l&&(a.l+=2);if(a.l!==d)throw Error("Length mismatch 2: "+a.l+" !== "+d);try{var l=Ye(a,null)}catch(m){}for(k in l)e[k]=l[k];e.FMTID=[g,h];return e}function bf(a,b,c,d,e,g){var f= B(e?68:48),h=[f];f.write_shift(2,65534);f.write_shift(2,0);f.write_shift(4,842412599);f.write_shift(16,J.utils.consts.HEADER_CLSID,"hex");f.write_shift(4,e?2:1);f.write_shift(16,b,"hex");f.write_shift(4,e?68:48);a=Ze(a,c,d);h.push(a);e&&(e=Ze(e,null,null),f.write_shift(16,g,"hex"),f.write_shift(4,68+a.length),h.push(e));return kb(h)}function Bb(a,b){a.read_shift(b);return null}function qa(a,b){return 1===a.read_shift(b)}function bb(a,b){b||(b=B(2));b.write_shift(2,+!!a);return b}function ea(a){return a.read_shift(2, "u")}function sb(a,b){b||(b=B(2));b.write_shift(2,a);return b}function cf(a,b){var c=[];for(b=a.l+b;a.l<b;)c.push(ea(a,b-a.l));if(b!==a.l)throw Error("Slurp error");return c}function wc(a,b,c){var d=a.read_shift(c&&12<=c.biff?2:1),e="sbcs-cont";b=Ua;c&&8<=c.biff&&(Ua=1200);c&&8!=c.biff?12==c.biff&&(e="wstr"):a.read_shift(1)&&(e="dbcs-cont");2<=c.biff&&5>=c.biff&&(e="cpstr");a=d?a.read_shift(d,e):"";Ua=b;return a}function sh(a){var b=Ua;Ua=1200;var c=a.read_shift(2),d=a.read_shift(1),e=d&4,g=d&8,f= 1+(d&1);d=0;var h,k={};g&&(d=a.read_shift(2));e&&(h=a.read_shift(4));c=0===c?"":a.read_shift(c,2==f?"dbcs-cont":"sbcs-cont");g&&(a.l+=4*d);e&&(a.l+=h);k.t=c;g||(k.raw="<t>"+k.t+"</t>",k.r=k.t);Ua=b;return k}function Hb(a,b,c){if(c){if(2<=c.biff&&5>=c.biff)return a.read_shift(b,"cpstr");if(12<=c.biff)return a.read_shift(b,"dbcs-cont")}return 0===a.read_shift(1)?a.read_shift(b,"sbcs-cont"):a.read_shift(b,"dbcs-cont")}function xc(a,b,c){b=a.read_shift(c&&2==c.biff?1:2);return 0===b?(a.l++,""):Hb(a,b, c)}function Ib(a,b,c){if(5<c.biff)return xc(a,b,c);b=a.read_shift(1);return 0===b?(a.l++,""):a.read_shift(b,4>=c.biff||!a.lens?"cpstr":"sbcs-cont")}function df(a,b,c){c||(c=B(3+2*a.length));c.write_shift(2,a.length);c.write_shift(1,1);c.write_shift(31,a,"utf16le");return c}function ed(a){var b=a.read_shift(4);return 0<b?a.read_shift(b,"utf16le").replace(na,""):""}function ef(a){var b=a.read_shift(1),c=a.read_shift(1),d=a.read_shift(1);a=a.read_shift(1);return[b,c,d,a]}function ff(a,b){a=ef(a,b);a[3]= 0;return a}function lb(a){var b=a.read_shift(2),c=a.read_shift(2);a=a.read_shift(2);return{r:b,c:c,ixfe:a}}function fd(a,b,c,d){d||(d=B(6));d.write_shift(2,a);d.write_shift(2,b);d.write_shift(2,c||0);return d}function th(a,b,c){var d=8<c.biff?4:2;b=a.read_shift(d);c=a.read_shift(d,"i");a=a.read_shift(d,"i");return[b,c,a]}function gf(a){var b=a.read_shift(2);a=Ke(a);return[b,a]}function gd(a){var b=a.read_shift(2),c=a.read_shift(2),d=a.read_shift(2);a=a.read_shift(2);return{s:{c:d,r:b},e:{c:a,r:c}}} function hf(a,b){b||(b=B(8));b.write_shift(2,a.s.r);b.write_shift(2,a.e.r);b.write_shift(2,a.s.c);b.write_shift(2,a.e.c);return b}function jf(a){var b=a.read_shift(2),c=a.read_shift(2),d=a.read_shift(1);a=a.read_shift(1);return{s:{c:d,r:b},e:{c:a,r:c}}}function kf(a){a.l+=4;var b=a.read_shift(2),c=a.read_shift(2),d=a.read_shift(2);a.l+=12;return[c,b,d]}function La(a){a.l+=2;a.l+=a.read_shift(2)}function hd(a,b){var c={BIFFVer:0,dt:0};c.BIFFVer=a.read_shift(2);b-=2;2<=b&&(c.dt=a.read_shift(2),a.l-= 2);switch(c.BIFFVer){case 1536:case 1280:case 1024:case 768:case 512:case 2:case 7:break;default:if(6<b)throw Error("Unexpected BIFF Ver "+c.BIFFVer);}a.read_shift(b);return c}function Od(a,b,c){a=1536;var d=16;switch(c.bookType){case "biff8":break;case "biff5":a=1280;d=8;break;case "biff4":a=4;d=6;break;case "biff3":a=3;d=6;break;case "biff2":a=2;d=4;break;case "xla":break;default:throw Error("unsupported BIFF version");}c=B(d);c.write_shift(2,a);c.write_shift(2,b);4<d&&c.write_shift(2,29282);6< d&&c.write_shift(2,1997);8<d&&(c.write_shift(2,49161),c.write_shift(2,1),c.write_shift(2,1798),c.write_shift(2,0));return c}function lf(a,b,c){b=0;c&&2==c.biff||(b=a.read_shift(2));a=a.read_shift(2);c&&2==c.biff&&(b=1-(a>>15),a&=32767);return[{Unsynced:b&1,DyZero:(b&2)>>1,ExAsc:(b&4)>>2,ExDsc:(b&8)>>3},a]}function mf(a,b,c){b=a.l+b;var d=8!=c.biff&&c.biff?2:4;c=a.read_shift(d);d=a.read_shift(d);var e=a.read_shift(2),g=a.read_shift(2);a.l=b;return{s:{r:c,c:e},e:{r:d,c:g}}}function nf(a,b,c,d){c=c&& 5==c.biff;d||(d=B(c?16:20));d.write_shift(2,0);a.style?(d.write_shift(2,a.numFmtId||0),d.write_shift(2,65524)):(d.write_shift(2,a.numFmtId||0),d.write_shift(2,b<<4));d.write_shift(4,0);d.write_shift(4,0);c||d.write_shift(4,0);d.write_shift(2,0);return d}function of(a,b,c){b=lb(a,6);2==c.biff&&++a.l;c=a.read_shift(1);a=1===a.read_shift(1)?c:1===c;b.val=a;b.t=!0===a||!1===a?"b":"e";return b}function pf(a,b,c){var d=a.read_shift(2);d={fBuiltIn:d&1,fWantAdvise:d>>>1&1,fWantPict:d>>>2&1,fOle:d>>>3&1,fOleLink:d>>> 4&1,cf:d>>>5&1023,fIcon:d>>>15&1};if(14849===c.sbcch){a.l+=4;var e=b-2-4;var g=a.l+e;c=wc(a,e,c);e=a.read_shift(2);g-=a.l;if(e!==g)throw Error("Malformed AddinUdf: padding = "+g+" != "+e);a.l+=e;g=c}d.body=g||a.read_shift(b-2);"string"===typeof g&&(d.Name=g);return d}function qf(a,b,c){var d=a.l+b,e=a.read_shift(2);b=a.read_shift(1);var g=a.read_shift(1),f=a.read_shift(c&&2==c.biff?1:2),h=0;if(!c||5<=c.biff)5!=c.biff&&(a.l+=2),h=a.read_shift(2),5==c.biff&&(a.l+=2),a.l+=4;g=Hb(a,g,c);e&32&&(g=uh[g.charCodeAt(0)]); e=d-a.l;c&&2==c.biff&&--e;if(d==a.l||0===f)a=[];else{d=a.l+e;f=yc(a,f,c);var k;d!==a.l&&(k=zc(a,d-a.l,f,c));a=[f,k]}return{chKey:b,Name:g,itab:h,rgce:a}}function rf(a,b,c){if(8>c.biff)return 3==a[a.l+1]&&a[a.l]++,a=wc(a,b,c),3==a.charCodeAt(0)?a.slice(1):a;var d=[];b=a.l+b;for(var e=a.read_shift(8<c.biff?4:2);0!==e--;)d.push(th(a,8<c.biff?12:6,c));if(a.l!=b)throw Error("Bad ExternSheet: "+a.l+" != "+b);return d}function sf(a,b,c){var d=vh(a,6);switch(c.biff){case 2:a.l++;b-=7;break;case 3:case 4:a.l+= 2;b-=8;break;default:a.l+=6,b-=12}var e=a.l+b,g=2==c.biff?1:2,f,h=a.read_shift(g);if(65535==h)a=[[],Ha(a,b-2)];else{var k=yc(a,h,c);b!==h+g&&(f=zc(a,b-h-g,k,c));a.l=e;a=[k,f]}return[d,a]}function tf(a,b,c){if(c.cellStyles){b=c&&12<=c.biff?4:2;c=a.read_shift(b);var d=a.read_shift(b),e=a.read_shift(b),g=a.read_shift(b),f=a.read_shift(2);2==b&&(a.l+=2);return{s:c,e:d,w:e,ixfe:g,flags:f}}a.l+=b}function Pd(a,b){b=b?b.cellHTML:!0;var c={};if(!a)return null;a.match(/^\s*<(?:\w+:)?t[^>]*>/)?(c.t=ca(T(a.slice(a.indexOf(">")+ 1).split(/<\/(?:\w+:)?t>/)[0]||"")),c.r=T(a),b&&(c.h=Ed(c.t))):a.match(wh)&&(c.r=T(a),c.t=ca(T((a.replace(xh,"").match(yh)||[]).join("").replace(Ka,""))),b&&(c.h=zh(c.r)));return c}function Ah(a,b){if(!b.bookSST)return"";b=['<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n'];b[b.length]=v("sst",null,{xmlns:W.main[0],count:a.Count,uniqueCount:a.Unique});for(var c=0;c!=a.length;++c)if(null!=a[c]){var d=a[c],e="<si>";d.r?e+=d.r:(e+="<t",d.t||(d.t=""),d.t.match(Bh)&&(e+=' xml:space="preserve"'), e+=">"+da(d.t)+"</t>");e+="</si>";b[b.length]=e}2<b.length&&(b[b.length]="</sst>",b[1]=b[1].replace("/>",">"));return b.join("")}function Ch(a,b){var c=[],d=!1;jb(a,function(a,g,f){switch(f){case 159:c.Count=a[0];c.Unique=a[1];break;case 19:c.push(a);break;case 160:return!0;case 35:d=!0;break;case 36:d=!1;break;default:if(0<g.indexOf("Begin")||g.indexOf("End"),!d||b.WTF)throw Error("Unexpected record "+f+" "+g);}});return c}function Dh(a){var b=rb();var c=B(8);c.write_shift(4,a.Count);c.write_shift(4, a.Unique);D(b,"BrtBeginSst",c);for(c=0;c<a.length;++c){var d=a[c];var e=void 0,g=!1;null==e&&(g=!0,e=B(15+4*d.t.length));e.write_shift(1,0);Pa(d.t,e);d=g?e.slice(0,e.l):e;D(b,"BrtSSTItem",d)}D(b,"BrtEndSst");return b.end()}function uf(a){if("undefined"!==typeof cptable)return cptable.utils.encode(Ac,a);var b=[];a=a.split("");for(var c=0;c<a.length;++c)b[c]=a[c].charCodeAt(0);return b}function cb(a,b){var c={};c.Major=a.read_shift(2);c.Minor=a.read_shift(2);4<=b&&(a.l+=b-4);return c}function Eh(a){var b= a.read_shift(4);b=a.l+b-4;for(var c={},d=a.read_shift(4),e=[];0<d--;)e.push({t:a.read_shift(4),v:a.read_shift(0,"lpp4")});c.name=a.read_shift(0,"lpp4");c.comps=e;if(a.l!=b)throw Error("Bad DataSpaceMapEntry: "+a.l+" != "+b);return c}function vf(a,b){b=a.l+b;var c={};c.Flags=a.read_shift(4)&63;a.l+=4;c.AlgID=a.read_shift(4);switch(c.AlgID){case 26126:case 26127:case 26128:var d=36==c.Flags;break;case 26625:d=4==c.Flags;break;case 0:d=16==c.Flags||4==c.Flags||36==c.Flags;break;default:throw"Unrecognized encryption algorithm: "+ c.AlgID;}if(!d)throw Error("Encryption Flags/AlgID mismatch");c.AlgIDHash=a.read_shift(4);c.KeySize=a.read_shift(4);c.ProviderType=a.read_shift(4);a.l+=8;c.CSPName=a.read_shift(b-a.l>>1,"utf16le");a.l=b;return c}function wf(a,b){var c={};b=a.l+b;a.l+=4;c.Salt=a.slice(a.l,a.l+16);a.l+=16;c.Verifier=a.slice(a.l,a.l+16);a.l+=16;a.read_shift(4);c.VerifierHash=a.slice(a.l,b);a.l=b;return c}function Fh(a){var b="saltSize blockSize keyBits hashSize cipherAlgorithm cipherChaining hashAlgorithm saltValue".split(" "); a.l+=4;var c={};a.read_shift(a.length-a.l,"utf8").replace(Ka,function(a){var d=U(a);switch(wb(d[0])){case "<?xml":break;case "<encryption":case "</encryption>":break;case "<keyData":b.forEach(function(a){c[a]=d[a]});break;case "<dataIntegrity":c.encryptedHmacKey=d.encryptedHmacKey;c.encryptedHmacValue=d.encryptedHmacValue;break;case "<keyEncryptors>":case "<keyEncryptors":c.encs=[];break;case "</keyEncryptors>":break;case "<keyEncryptor":c.uri=d.uri;break;case "</keyEncryptor>":break;case "<encryptedKey":c.encs.push(d); break;default:throw d[0];}});return c}function Qd(a){var b=0,c=uf(a),d=c.length+1,e;a=z(d);a[0]=c.length;for(e=1;e!=d;++e)a[e]=c[e-1];for(e=d-1;0<=e;--e)c=a[e],d=0===(b&16384)?0:1,b=b<<1&32767,b|=d,b^=c;return b^52811}function Bc(a){for(var b=0,c=1;3!=b;++b)c=256*c+(255<a[b]?255:0>a[b]?0:a[b]);return c.toString(16).toUpperCase().slice(1)}function id(a,b){if(0===b)return a;a=a.slice("#"===a[0]?1:0).slice(0,6);var c=[parseInt(a.slice(0,2),16),parseInt(a.slice(2,4),16),parseInt(a.slice(4,6),16)];a=c[0]/ 255;var d=c[1]/255;c=c[2]/255;var e=Math.max(a,d,c),g=Math.min(a,d,c),f=e-g;if(0===f)a=[0,0,a];else{var h=0;g=e+g;switch(e){case a:h=((d-c)/f+6)%6;break;case d:h=(c-a)/f+2;break;case c:h=(a-d)/f+4}a=[h/6,f/(1<g?2-g:g),g/2]}a[2]=0>b?a[2]*(1+b):1-(1-a[2])*(1-b);b=a[1];c=a[2];d=2*b*(.5>c?c:1-c);c-=d/2;c=[c,c,c];a=6*a[0];if(0!==b)switch(a|0){case 0:case 6:c[0]+=d;c[1]+=d*a;break;case 1:c[0]+=d*(2-a);c[1]+=d;break;case 2:c[1]+=d;c[2]+=d*(a-2);break;case 3:c[1]+=d*(4-a);c[2]+=d;break;case 4:c[2]+=d;c[0]+= d*(a-4);break;case 5:c[2]+=d*(6-a),c[0]+=d}for(b=0;3!=b;++b)c[b]=Math.round(255*c[b]);return Bc(c)}function Jb(a){return Math.floor((a+Math.round(128/X)/256)*X)}function mb(a){return Math.floor((a-5)/X*100+.5)/100}function dc(a){return Math.round((a*X+5)/X*256)/256}function Rd(a){var b=Math.abs(a-dc(mb(Jb(a)))),c=X;if(.005<b)for(X=1;15>X;++X)Math.abs(a-dc(mb(Jb(a))))<=b&&(b=Math.abs(a-dc(mb(Jb(a)))),c=X);X=c}function Kb(a){a.width?(a.wpx=Jb(a.width),a.wch=mb(a.wpx),a.MDW=X):a.wpx?(a.wch=mb(a.wpx), a.width=dc(a.wch),a.MDW=X):"number"==typeof a.wch&&(a.width=dc(a.wch),a.wpx=Jb(a.width),a.MDW=X);a.customWidth&&delete a.customWidth}function Gh(a,b,c,d){b.Borders=[];var e={},g=!1;a[0].match(Ka).forEach(function(a){a=U(a);switch(wb(a[0])){case "<borders":case "<borders>":case "</borders>":break;