@mescius/wijmo.xlsx 5.20232.939

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es5-esm.js ADDED
@@ -0,0 +1,14 @@
1
+ /*!
2
+ *
3
+ * Wijmo Library 5.20232.939
4
+ * https://developer.mescius.com/wijmo
5
+ *
6
+ * Copyright(c) MESCIUS inc. All rights reserved.
7
+ *
8
+ * Licensed under the End-User License Agreement For MESCIUS Wijmo Software.
9
+ * us.sales@mescius.com
10
+ * https://developer.mescius.com/wijmo/licensing
11
+ *
12
+ */
13
+
14
+ var __extends=this&&this.__extends||function(){var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)};return function(e,t){extendStatics(e,t);function __(){this.constructor=e}e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}}();import{culture,isDate,isNumber,isInt,isFunction,isString,asEnum,assert,saveFile,Color,isNullOrWhiteSpace,isObject,isBoolean,isIE,_registerModule}from"@mescius/wijmo";import*as selfModule from"@mescius/wijmo.xlsx";import JSZipRef from"jszip";var Workbook=function(){function Workbook(){this._externalCancellation=null}Object.defineProperty(Workbook.prototype,"sheets",{get:function(){null==this._sheets&&(this._sheets=[]);return this._sheets},enumerable:!0,configurable:!0});Object.defineProperty(Workbook.prototype,"styles",{get:function(){null==this._styles&&(this._styles=[]);return this._styles},enumerable:!0,configurable:!0});Object.defineProperty(Workbook.prototype,"definedNames",{get:function(){null==this._definedNames&&(this._definedNames=[]);return this._definedNames},enumerable:!0,configurable:!0});Object.defineProperty(Workbook.prototype,"colorThemes",{get:function(){null==this._colorThemes&&(this._colorThemes=[]);return this._colorThemes},enumerable:!0,configurable:!0});Object.defineProperty(Workbook.prototype,"reservedContent",{get:function(){null==this._reservedContent&&(this._reservedContent={});return this._reservedContent},set:function(e){this._reservedContent=e},enumerable:!0,configurable:!0});Workbook.prototype.save=function(e){var t=_xlsx.save(this),o=!(!this._reservedContent||!this._reservedContent.macros);e&&Workbook._saveToFile(t.base64,e,o);return t.base64};Workbook.prototype.saveAsync=function(e,t,o,r){var l=this;this.cancelAsync((function(){l._cs=isFunction(l._externalCancellation)?l._externalCancellation():new _SyncPromise;_xlsx.saveAsync(l,l._cs,o,r).then((function(o){if(e){var i=!(!l._reservedContent||!l._reservedContent.macros);Workbook._saveToFile(o,e,i)}l._cs=null;isFunction(r)&&r(100);t&&t(o)}),(function(){return l._cs=null}))}))};Workbook.prototype.cancelAsync=function(e){var t=this;if(this._cs){this._cs.cancel();setTimeout((function(){t._cs=null;isFunction(e)&&e()}),100)}else isFunction(e)&&e()};Workbook.prototype.load=function(e,t){void 0===t&&(t=!0);isString(e)&&(e=this._getBase64String(e));var o=_xlsx.load(e,t);this._deserialize(o);e=null;o=null};Workbook.prototype.loadAsync=function(e,t,o,r){var l=this;void 0===r&&(r=!0);isString(e)&&(e=this._getBase64String(e));_xlsx.loadAsync(e,r).then((function(o){l._deserialize(o);e=null;o=null;t(l)})).catch(o)};Workbook.prototype._serialize=function(){var e={sheets:[]};e.sheets=this._serializeWorkSheets();this._styles&&this._styles.length>0&&(e.styles=this._serializeWorkbookStyles());this._reservedContent&&(e.reservedContent=this._reservedContent);null!=this.activeWorksheet&&!isNaN(this.activeWorksheet)&&this.activeWorksheet>=0&&(e.activeWorksheet=this.activeWorksheet);this.application&&(e.application=this.application);this.company&&(e.company=this.company);null!=this.created&&(e.created=this.created);this.creator&&(e.creator=this.creator);this.lastModifiedBy&&(e.lastModifiedBy=this.lastModifiedBy);null!=this.modified&&(e.modified=this.modified);this._definedNames&&this._definedNames.length>0&&(e.definedNames=this._serializeDefinedNames());this._colorThemes&&this._colorThemes.length>0&&(e.colorThemes=this._colorThemes.slice());return e};Workbook.prototype._deserialize=function(e){this._deserializeWorkSheets(e.sheets);e.styles&&e.styles.length>0&&this._deserializeWorkbookStyles(e.styles);this.activeWorksheet=e.activeWorksheet;this.application=e.application;this.company=e.company;this.created=e.created;this.creator=e.creator;this.lastModifiedBy=e.lastModifiedBy;this.modified=e.modified;this.reservedContent=e.reservedContent;e.definedNames&&e.definedNames.length>0&&this._deserializeDefinedNames(e.definedNames);e.colorThemes&&e.colorThemes.length>0&&(this._colorThemes=e.colorThemes.slice())};Workbook.prototype._addWorkSheet=function(e,t){null==this._sheets&&(this._sheets=[]);null==t||isNaN(t)?this._sheets.push(e):this._sheets[t]=e};Workbook._saveToFile=function(e,t,o){var r,l,i=o?"xlsm":"xlsx",s="xlsm"===i?"application/vnd.ms-excel.sheet.macroEnabled.12":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";if((l=t.lastIndexOf("."))<0)t+="."+i;else{if(0===l)throw"Invalid file name.";""===(r=t.substring(l+1))?t+="."+i:r!==i&&(t+="."+i)}saveFile(new Blob([_Base64.toArray(e)],{type:s}),t)};Workbook.prototype._getBase64String=function(e){if(null==e||0===e.length)throw"Invalid xlsx file content.";var t=e.search(/base64,/i);return-1!==t?e.substring(t+7):e};Workbook.toXlsxDateFormat=function(e){var t;if(1===e.length)switch(e){case"r":case"R":return"ddd, dd MMM yyyy HH:mm:ss &quot;GMT&quot;";case"u":return"yyyy-MM-dd&quot;T&quot;HH:mm:ss&quot;Z&quot;";case"o":case"O":t=(t=culture.Globalize.calendar.patterns[e]).replace(/f+k/gi,"000");break;default:t=culture.Globalize.calendar.patterns[e]}t||(t=e);t=t.replace(/"/g,"").replace(/tt/,"AM/PM").replace(/t/,"A/P").replace(/M+/gi,(function(e){return e.toLowerCase()})).replace(/g+y+/gi,(function(e){return e.substring(0,e.indexOf("y"))+"e"}));return/FY|Q/i.test(t)?"General":t};Workbook.toXlsxNumberFormat=function(e){var t,o,r,l=e?e.toLowerCase():"";if(/^[ncpfdgex]\d*.*,*$/.test(l)){t=l[0];o=this._formatMap[t]}if("x"===t)return"";if(o){var i=l.split(",");if("c"===t){var s=culture.Globalize.numberFormat.currency,n=e?e.match(/([a-z])(\d*)(,*)(.*)/i):null,a=n&&n[4]?n[4]:s.symbol;"​"===a&&(a="");var h=this._formatMap.n,f=s.pattern,u=f[0].replace("n",h).replace("$","{1}"),c=f[1].replace("n",h).replace("$","{1}");")"===u[u.length-1]&&(c+="_)");o=(o=c+";"+u).replace(/\{1\}/g,a)}var d=-1;l.length>1?d=parseInt(i[0].substr(1)):"d"!==t&&(d="e"===t?6:2);var m="";if(!isNaN(d))for(var p=0;p<d;p++)m+="0";for(p=0;p<i.length-1;p++)m+=",";r=m.length>0?"d"===t?o.replace(/\{0\}/g,m):o.replace(/\{0\}/g,(!isNaN(d)&&d>0?".":"")+m):"d"===t?o.replace(/\{0\}/g,"0"):o.replace(/\{0\}/g,"")}else r=l;return r};Workbook.fromXlsxFormat=function(e){var t,o,r,l,i,s,n,a,h,f=[],u=culture.Globalize.numberFormat.currency.symbol;if(!e||"General"===e)return[""];o=(e=e.replace(/;@/g,"").replace(/&quot;?/g,"")).split(";");for(l=0;l<o.length;l++){r=o[l];if(/[hsmy\:]/i.test(r))t=this._fromXlsxDateFormat(r);else{s=r.lastIndexOf(".");n=r.lastIndexOf("0");a=r.lastIndexOf(",");if(r.search(/\[\$([^\-\]]+)[^\]]*\]/)>-1||r.indexOf(u)>-1&&-1===r.search(/\[\$([\-\]]+)[^\]]*\]/))t="c";else if("%"===r[e.length-1])t="p";else if(r.search("E+")>0){t="e";n=r.lastIndexOf("E")-1}else t="n";t+=s>-1&&s<n?r.substring(s,n).length:"0";/^0+,*$/.test(r)&&(t="d"+((n=r.lastIndexOf("0"))+1));if(a>-1&&n>-1&&n<a){h=r.substring(n+1,a+1).split("");for(i=0;i<h.length;i++)t+=","}}f.push(t)}return f};Workbook._fromXlsxDateFormat=function(e){return e.replace(/\[\$\-.+\]/g,"").replace(/(\\)(.)/g,"$2").replace(/H+/g,(function(e){return e.toLowerCase()})).replace(/m+/g,(function(e){return e.toUpperCase()})).replace(/S+/g,(function(e){return e.toLowerCase()})).replace(/AM\/PM/gi,"tt").replace(/A\/P/gi,"t").replace(/\.000/g,".fff").replace(/\.00/g,".ff").replace(/\.0/g,".f").replace(/\\[\-\s,]/g,(function(e){return e.substring(1)})).replace(/Y+/g,(function(e){return e.toLowerCase()})).replace(/D+/g,(function(e){return e.toLowerCase()})).replace(/M+:?|:?M+/gi,(function(e){return e.indexOf(":")>-1?e.toLowerCase():e})).replace(/g+e/gi,(function(e){return e.substring(0,e.length-1)+"yy"}))};Workbook._parseCellFormat=function(e,t){return t?this.toXlsxDateFormat(e):this.toXlsxNumberFormat(e)};Workbook._parseExcelFormat=function(e){if(null!=e){var t=e&&e.style&&e.style.format;if((null!=e.value||t)&&!isNaN(e.value)){var o=isNumber(e.value);return!o||t&&"General"!==t?e.isDate||isDate(e.value)||o||""===e.value||e.isNumber?this.fromXlsxFormat(t)[0]:t:isInt(e.value)?"d":"f2"}}};Workbook.xlsxAddress=function(e,t,o,r,l){var i=o?"$":"",s=null==r?i:r?"$":"";return!0===l?"":(isNaN(t)?"":s+this._numAlpha(t))+(!1===l?"":isNaN(e)?"":i+(e+1).toString())};Workbook.tableAddress=function(e){var t=e&&/^((\$?)([A-Za-z]+))?((\$?)(\d+))?$/.exec(e),o={};if(!t)return null;if(t[3]){o.col=this._alphaNum(t[3]);o.absCol=!!t[2]}if(t[6]){o.row=+t[6]-1;o.absRow=!!t[5]}return o};Workbook._parseHAlignToString=function(e){switch(e){case HAlign.Left:return"left";case HAlign.Center:return"center";case HAlign.Right:return"right";case HAlign.Justify:return"justify";default:return"general"}};Workbook._parseStringToHAlign=function(e){var t=e?e.toLowerCase():"";return"left"===t?HAlign.Left:"center"===t?HAlign.Center:"right"===t?HAlign.Right:"justify"===t?HAlign.Justify:HAlign.General};Workbook._parseVAlignToString=function(e){switch(e){case VAlign.Bottom:return"bottom";case VAlign.Center:return"center";case VAlign.Top:return"top";default:return null}};Workbook._parseStringToVAlign=function(e){var t=e?e.toLowerCase():"";return"top"===t?VAlign.Top:"center"===t||"middle"===t?VAlign.Center:"bottom"===t?VAlign.Bottom:null};Workbook._parseBorderTypeToString=function(e){switch(e){case BorderStyle.Dashed:return"dashed";case BorderStyle.Dotted:return"dotted";case BorderStyle.Double:return"double";case BorderStyle.Hair:return"hair";case BorderStyle.Medium:return"medium";case BorderStyle.MediumDashDotDotted:return"mediumDashDotDot";case BorderStyle.MediumDashDotted:return"mediumDashDot";case BorderStyle.MediumDashed:return"mediumDashed";case BorderStyle.SlantedMediumDashDotted:return"slantDashDot";case BorderStyle.Thick:return"thick";case BorderStyle.Thin:return"thin";case BorderStyle.ThinDashDotDotted:return"dashDotDot";case BorderStyle.ThinDashDotted:return"dashDot";case BorderStyle.None:default:return"none"}};Workbook._parseStringToBorderType=function(e){return"dashed"===e?BorderStyle.Dashed:"dotted"===e?BorderStyle.Dotted:"double"===e?BorderStyle.Double:"hair"===e?BorderStyle.Hair:"medium"===e?BorderStyle.Medium:"mediumDashDotDot"===e?BorderStyle.MediumDashDotDotted:"mediumDashDot"===e?BorderStyle.MediumDashDotted:"mediumDashed"===e?BorderStyle.MediumDashed:"slantDashDot"===e?BorderStyle.SlantedMediumDashDotted:"thick"===e?BorderStyle.Thick:"thin"===e?BorderStyle.Thin:"dashDotDot"===e?BorderStyle.ThinDashDotDotted:"dashDot"===e?BorderStyle.ThinDashDotted:null};Workbook._escapeXML=function(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):""};Workbook._unescapeXML=function(e){return"string"==typeof e?e.indexOf("&")>=0?e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&#x2F;/g,"/").replace(/&amp;/g,"&"):e:""};Workbook._numAlpha=function(e){var t=Math.floor(e/26)-1;return(t>-1?this._numAlpha(t):"")+this._alphabet.charAt(e%26)};Workbook._alphaNum=function(e){var t=0;e&&(e=e.toUpperCase());2===e.length&&(t=this._alphaNum(e.charAt(0))+1);return 26*t+this._alphabet.indexOf(e.substr(-1))};Workbook.prototype._serializeWorkSheets=function(){var e,t,o=[];for(t=0;t<this._sheets.length;t++)(e=this._sheets[t])&&(o[t]=e._serialize());return o};Workbook.prototype._serializeWorkbookStyles=function(){var e,t,o=[];for(t=0;t<this._styles.length;t++)(e=this._styles[t])&&(o[t]=e._serialize());return o};Workbook.prototype._serializeDefinedNames=function(){var e,t,o=[];for(t=0;t<this._definedNames.length;t++)(e=this._definedNames[t])&&(o[t]=e._serialize());return o};Workbook.prototype._serializeTableStyles=function(){var e,t,o=[];for(t=0;t<this._tableStyles.length;t++)(e=this._tableStyles[t])&&(o[t]=e._serialize());return o};Workbook.prototype._deserializeWorkSheets=function(e){var t,o,r;this._sheets=[];assert(null!=e,"workSheets should not be null.");for(r=0;r<e.length;r++)if(o=e[r]){(t=new WorkSheet)._deserialize(o);this._sheets[r]=t}};Workbook.prototype._deserializeWorkbookStyles=function(e){var t,o,r;this._styles=[];for(r=0;r<e.length;r++)if(o=e[r]){(t=new WorkbookStyle)._deserialize(o);this._styles[r]=t}};Workbook.prototype._deserializeDefinedNames=function(e){var t,o,r;this._definedNames=[];for(r=0;r<e.length;r++)if(o=e[r]){(t=new DefinedName)._deserialize(o);this._definedNames[r]=t}};Workbook.prototype._deserializeTableStyles=function(e){var t,o,r;this._tableStyles=[];for(r=0;r<e.length;r++)if(o=e[r]){(t=new WorkbookTableStyle)._deserialize(o);this._tableStyles[r]=t}};Workbook._alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ";Workbook._formatMap={n:"#,##0{0}",c:"{1}#,##0{0}_);({1}#,##0{0})",e:"0{0}E+0",p:"#,##0{0}%",f:"0{0}",d:"{0}",g:"0{0}"};return Workbook}();export{Workbook};var WorkSheet=function(){function WorkSheet(){}Object.defineProperty(WorkSheet.prototype,"columns",{get:function(){null==this._columns&&(this._columns=[]);return this._columns},enumerable:!0,configurable:!0});Object.defineProperty(WorkSheet.prototype,"rows",{get:function(){null==this._rows&&(this._rows=[]);return this._rows},enumerable:!0,configurable:!0});Object.defineProperty(WorkSheet.prototype,"tables",{get:function(){null==this._tables&&(this._tables=[]);return this._tables},enumerable:!0,configurable:!0});WorkSheet.prototype._serialize=function(){if(this._checkEmptyWorkSheet())return null;var e={};this.style&&(e.style=this.style._serialize());this._columns&&this._columns.length>0&&(e.columns=this._serializeWorkbookColumns());this._rows&&this._rows.length>0&&(e.rows=this._serializeWorkbookRows());this.frozenPane&&(e.frozenPane=this.frozenPane._serialize());this.name&&(e.name=this.name);null!=this.summaryBelow&&(e.summaryBelow=this.summaryBelow);null!=this.visible&&(e.visible=this.visible);this._tables&&this._tables.length>0&&(e.tables=this._serializeTables());this._extraColumn&&(e._extraColumn=this._extraColumn._serialize());e.rightToLeft=this.rightToLeft;return e};WorkSheet.prototype._deserialize=function(e){var t,o;if(e.style){(o=new WorkbookStyle)._deserialize(e.style);this.style=o}e.columns&&e.columns.length>0&&this._deserializeWorkbookColumns(e.columns);e.rows&&e.rows.length>0&&this._deserializeWorkbookRows(e.rows);if(e.frozenPane){(t=new WorkbookFrozenPane)._deserialize(e.frozenPane);this.frozenPane=t}this.name=e.name;this.summaryBelow=e.summaryBelow;this.visible=e.visible;e.tables&&e.tables.length>0&&this._deserializeTables(e.tables);if(e._extraColumn){this._extraColumn=new _WorkbookExtraColumn;this._extraColumn._deserialize(e._extraColumn)}this.rightToLeft=e.rightToLeft};WorkSheet.prototype._addWorkbookColumn=function(e,t){null==this._columns&&(this._columns=[]);null==t||isNaN(t)?this._columns.push(e):this._columns[t]=e};WorkSheet.prototype._addWorkbookRow=function(e,t){null==this._rows&&(this._rows=[]);null==t||isNaN(t)?this._rows.push(e):this._rows[t]=e};WorkSheet.prototype._serializeWorkbookColumns=function(){var e,t,o=[];for(t=0;t<this._columns.length;t++)(e=this._columns[t])&&(o[t]=e._serialize());return o};WorkSheet.prototype._serializeWorkbookRows=function(){var e,t,o=[];for(t=0;t<this._rows.length;t++)(e=this._rows[t])&&(o[t]=e._serialize());return o};WorkSheet.prototype._serializeTables=function(){var e,t,o=[];for(t=0;t<this._tables.length;t++)(e=this._tables[t])&&(o[t]=e._serialize());return o};WorkSheet.prototype._deserializeWorkbookColumns=function(e){var t,o,r;this._columns=[];for(r=0;r<e.length;r++)if(t=e[r]){(o=new WorkbookColumn)._deserialize(t);this._columns[r]=o}};WorkSheet.prototype._deserializeWorkbookRows=function(e){var t,o,r;this._rows=[];for(r=0;r<e.length;r++)if(t=e[r]){(o=new WorkbookRow)._deserialize(t);this._rows[r]=o}};WorkSheet.prototype._deserializeTables=function(e){var t,o,r;this._tables=[];for(r=0;r<e.length;r++)if(o=e[r]){(t=new WorkbookTable)._deserialize(o);this._tables[r]=t}};WorkSheet.prototype._checkEmptyWorkSheet=function(){return!(null!=this._rows||null!=this._columns||null!=this.visible||null!=this.summaryBelow||null!=this.frozenPane||null!=this.style||null!=this.name&&""!==this.name||null!=this._tables&&0!=this._tables.length)};return WorkSheet}();export{WorkSheet};var WorkbookColumn=function(){function WorkbookColumn(){}WorkbookColumn.prototype._serialize=function(){var e;if(this._checkEmptyWorkbookColumn())return null;e={};this.style&&(e.style=this.style._serialize());null!=this.autoWidth&&(e.autoWidth=this.autoWidth);null!=this.width&&(e.width=this.width);null!=this.visible&&(e.visible=this.visible);return e};WorkbookColumn.prototype._deserialize=function(e){var t;if(e.style){(t=new WorkbookStyle)._deserialize(e.style);this.style=t}this.autoWidth=e.autoWidth;this.visible=e.visible;this.width=e.width};WorkbookColumn.prototype._checkEmptyWorkbookColumn=function(){return null==this.style&&null==this.width&&null==this.autoWidth&&null==this.visible};return WorkbookColumn}();export{WorkbookColumn};var _WorkbookExtraColumn=function(e){__extends(_WorkbookExtraColumn,e);function _WorkbookExtraColumn(){return e.call(this)||this}_WorkbookExtraColumn.prototype._serialize=function(){var t=e.prototype._serialize.call(this);t.min=this.min;t.max=this.max;return t};_WorkbookExtraColumn.prototype._deserialize=function(t){e.prototype._deserialize.call(this,t);this.min=t.min;this.max=t.max};return _WorkbookExtraColumn}(WorkbookColumn);export{_WorkbookExtraColumn};var WorkbookRow=function(){function WorkbookRow(){}Object.defineProperty(WorkbookRow.prototype,"cells",{get:function(){null==this._cells&&(this._cells=[]);return this._cells},enumerable:!0,configurable:!0});WorkbookRow.prototype._serialize=function(){var e;if(this._checkEmptyWorkbookRow())return null;e={};this._cells&&this._cells.length>0&&(e.cells=this._serializeWorkbookCells());this.style&&(e.style=this.style._serialize());null!=this.collapsed&&(e.collapsed=this.collapsed);null==this.groupLevel||isNaN(this.groupLevel)||(e.groupLevel=this.groupLevel);null==this.height||isNaN(this.height)||(e.height=this.height);null!=this.visible&&(e.visible=this.visible);return e};WorkbookRow.prototype._deserialize=function(e){var t;e.cells&&e.cells.length>0&&this._deserializeWorkbookCells(e.cells);if(e.style){(t=new WorkbookStyle)._deserialize(e.style);this.style=t}this.collapsed=e.collapsed;this.groupLevel=e.groupLevel;this.height=e.height;this.visible=e.visible};WorkbookRow.prototype._addWorkbookCell=function(e,t){null==this._cells&&(this._cells=[]);null==t||isNaN(t)?this._cells.push(e):this._cells[t]=e};WorkbookRow.prototype._serializeWorkbookCells=function(){var e,t,o=[];for(t=0;t<this._cells.length;t++)(e=this._cells[t])&&(o[t]=e._serialize());return o};WorkbookRow.prototype._deserializeWorkbookCells=function(e){var t,o,r;this._cells=[];for(r=0;r<e.length;r++)if(t=e[r]){(o=new WorkbookCell)._deserialize(t);this._cells[r]=o}};WorkbookRow.prototype._checkEmptyWorkbookRow=function(){return null==this._cells&&null==this.style&&null==this.collapsed&&null==this.visible&&(null==this.height||isNaN(this.height))&&(null==this.groupLevel||isNaN(this.groupLevel))};return WorkbookRow}();export{WorkbookRow};var WorkbookCell=function(){function WorkbookCell(){}WorkbookCell.prototype._serialize=function(){var e;if(this._checkEmptyWorkbookCell())return null;e={};this.style&&(e.style=this.style._serialize());null!=this.value&&(e.value=this.value);this.formula&&(e.formula=this.formula);null!=this.isDate&&(e.isDate=this.isDate);null!=this.isNumber&&(e.isNumber=this.isNumber);null!=this.colSpan&&!isNaN(this.colSpan)&&this.colSpan>1&&(e.colSpan=this.colSpan);null!=this.rowSpan&&!isNaN(this.rowSpan)&&this.rowSpan>1&&(e.rowSpan=this.rowSpan);this.link&&(e.link=this.link);e.textRuns=_TextRunsSerializer.serialize(this.textRuns);this.note&&(e.note=this.note._serialize());return e};WorkbookCell.prototype._deserialize=function(e){var t;if(e.style){(t=new WorkbookStyle)._deserialize(e.style);this.style=t}this.value=e.value;this.formula=e.formula;this.isDate=e.isDate;this.isNumber=e.isNumber;this.colSpan=e.colSpan;this.rowSpan=e.rowSpan;this.link=e.link;this.textRuns=_TextRunsSerializer.deserialize(e.textRuns);if(e.note){this.note=new WorkbookNote;this.note._deserialize(e.note)}};WorkbookCell.prototype._checkEmptyWorkbookCell=function(){return null==this.style&&null==this.value&&null==this.isDate&&null==this.isNumber&&(null==this.formula||""===this.formula)&&(null==this.colSpan||isNaN(this.colSpan)||this.colSpan<=1)&&(null==this.rowSpan||isNaN(this.rowSpan)||this.rowSpan<=1)&&(null==this.link||""===this.link)};return WorkbookCell}();export{WorkbookCell};var WorkbookNote=function(){function WorkbookNote(){}WorkbookNote.prototype._serialize=function(){if(!(null!=this.text||this.textRuns&&this.textRuns.length))return null;var e={};null!=this.author&&(e.author=this.author);null!=this.text&&(e.text=this.text);e.textRuns=_TextRunsSerializer.serialize(this.textRuns);null!=this.visible&&(e.visible=this.visible);null!=this.offsetX&&(e.offsetX=this.offsetX);null!=this.offsetY&&(e.offsetY=this.offsetY);null!=this.width&&(e.width=this.width);null!=this.height&&(e.height=this.height);return e};WorkbookNote.prototype._deserialize=function(e){this.author=e.author;this.text=e.text;this.textRuns=_TextRunsSerializer.deserialize(e.textRuns);this.visible=e.visible;this.offsetX=e.offsetX;this.offsetY=e.offsetY;this.width=e.width;this.height=e.height};return WorkbookNote}();export{WorkbookNote};var WorkbookFrozenPane=function(){function WorkbookFrozenPane(){}WorkbookFrozenPane.prototype._serialize=function(){return null!=this.columns&&!isNaN(this.columns)&&0!==this.columns||null!=this.rows&&!isNaN(this.rows)&&0!==this.rows?{columns:this.columns,rows:this.rows}:null};WorkbookFrozenPane.prototype._deserialize=function(e){this.columns=e.columns;this.rows=e.rows};return WorkbookFrozenPane}();export{WorkbookFrozenPane};var WorkbookStyle=function(){function WorkbookStyle(){}WorkbookStyle.prototype._serialize=function(){var e;if(this._checkEmptyWorkbookStyle())return null;e={};this.basedOn&&(e.basedOn=this.basedOn._serialize());this.fill&&(e.fill=this.fill._serialize());this.font&&(e.font=this.font._serialize());this.borders&&(e.borders=this.borders._serialize());this.format&&(e.format=this.format);null!=this.hAlign&&(e.hAlign=asEnum(this.hAlign,HAlign,!1));null!=this.vAlign&&(e.vAlign=asEnum(this.vAlign,VAlign,!1));null==this.indent||isNaN(this.indent)||(e.indent=this.indent);this.wordWrap&&(e.wordWrap=this.wordWrap);return e};WorkbookStyle.prototype._deserialize=function(e){var t,o,r,l;if(e.basedOn){(t=new WorkbookStyle)._deserialize(e.basedOn);this.basedOn=t}if(e.fill){(o=new WorkbookFill)._deserialize(e.fill);this.fill=o}if(e.font){(r=new WorkbookFont)._deserialize(e.font);this.font=r}if(e.borders){(l=new WorkbookBorder)._deserialize(e.borders);this.borders=l}this.format=e.format;null!=e.hAlign&&(this.hAlign=asEnum(e.hAlign,HAlign,!1));null!=e.vAlign&&(this.vAlign=asEnum(e.vAlign,VAlign,!1));null==e.indent||isNaN(e.indent)||(this.indent=e.indent);e.wordWrap&&(this.wordWrap=e.wordWrap)};WorkbookStyle.prototype._checkEmptyWorkbookStyle=function(){return null==this.basedOn&&null==this.fill&&null==this.font&&null==this.borders&&(null==this.format||""===this.format)&&null==this.hAlign&&null==this.vAlign&&null==this.wordWrap};return WorkbookStyle}();export{WorkbookStyle};var WorkbookFont=function(){function WorkbookFont(){}WorkbookFont.prototype._serialize=function(){var e;if(this._checkEmptyWorkbookFont())return null;e={};null!=this.bold&&(e.bold=this.bold);null!=this.italic&&(e.italic=this.italic);null!=this.underline&&(e.underline=this.underline);this.color&&(e.color=this.color);this.family&&(e.family=this.family);null==this.size||isNaN(this.size)||(e.size=this.size);return e};WorkbookFont.prototype._deserialize=function(e){this.bold=e.bold;null!=e.color&&(this.color=e.color);this.family=e.family;this.italic=e.italic;this.size=e.size;this.underline=e.underline};WorkbookFont.prototype._checkEmptyWorkbookFont=function(){return null==this.bold&&null==this.italic&&null==this.underline&&(null==this.color||""===this.color)&&(null==this.family||""===this.family)&&(null==this.size||isNaN(this.size))};return WorkbookFont}();export{WorkbookFont};var WorkbookFill=function(){function WorkbookFill(){}WorkbookFill.prototype._serialize=function(){return this.color?{color:this.color}:null};WorkbookFill.prototype._deserialize=function(e){null!=e.color&&(this.color=e.color)};return WorkbookFill}();export{WorkbookFill};var WorkbookBorder=function(){function WorkbookBorder(){}WorkbookBorder.prototype._serialize=function(){var e;if(this._checkEmptyWorkbookBorder())return null;e={};this.top&&(e.top=this.top._serialize());this.bottom&&(e.bottom=this.bottom._serialize());this.left&&(e.left=this.left._serialize());this.right&&(e.right=this.right._serialize());this.diagonal&&(e.diagonal=this.diagonal._serialize());return e};WorkbookBorder.prototype._deserialize=function(e){var t,o,r,l,i;if(e.top){(t=new WorkbookBorderSetting)._deserialize(e.top);this.top=t}if(e.bottom){(o=new WorkbookBorderSetting)._deserialize(e.bottom);this.bottom=o}if(e.left){(r=new WorkbookBorderSetting)._deserialize(e.left);this.left=r}if(e.right){(l=new WorkbookBorderSetting)._deserialize(e.right);this.right=l}if(e.diagonal){(i=new WorkbookBorderSetting)._deserialize(e.diagonal);this.diagonal=i}};WorkbookBorder.prototype._checkEmptyWorkbookBorder=function(){return null==this.top&&null==this.bottom&&null==this.left&&null==this.right&&null==this.diagonal};return WorkbookBorder}();export{WorkbookBorder};var WorkbookBorderSetting=function(){function WorkbookBorderSetting(){}WorkbookBorderSetting.prototype._serialize=function(){var e;if((null==this.color||""===this.color)&&null==this.style)return null;e={};this.color&&(e.color=this.color);null!=this.style&&(e.style=asEnum(this.style,BorderStyle,!1));return e};WorkbookBorderSetting.prototype._deserialize=function(e){if(null!=e.color||null!=e.style){this.color=e.color;null!=e.style&&(this.style=asEnum(e.style,BorderStyle,!1))}};return WorkbookBorderSetting}();export{WorkbookBorderSetting};var DefinedName=function(){function DefinedName(){}DefinedName.prototype._serialize=function(){var e;if(null==this.name)return null;e={name:this.name,value:this.value};null!=this.sheetName&&(e.sheetName=this.sheetName);return e};DefinedName.prototype._deserialize=function(e){this.name=e.name;this.value=e.value;this.sheetName=e.sheetName};return DefinedName}();export{DefinedName};var WorkbookTable=function(){function WorkbookTable(){}Object.defineProperty(WorkbookTable.prototype,"columns",{get:function(){null==this._columns&&(this._columns=[]);return this._columns},enumerable:!0,configurable:!0});WorkbookTable.prototype._serialize=function(){var e,t;if(null==this.name||null==this.range||null==this._columns)return null;null!=this.style&&(t=this.style._serialize());(e={name:this.name,range:this.range,showHeaderRow:this.showHeaderRow,showTotalRow:this.showTotalRow,style:t,showBandedColumns:this.showBandedColumns,showBandedRows:this.showBandedRows,alterFirstColumn:this.alterFirstColumn,alterLastColumn:this.alterLastColumn,columns:[]}).columns=this._serializeTableColumns();return e};WorkbookTable.prototype._deserialize=function(e){var t;this.name=e.name;this.range=e.range;this.showHeaderRow=e.showHeaderRow;this.showTotalRow=e.showTotalRow;if(null!=e.style){(t=new WorkbookTableStyle)._deserialize(e.style);this.style=t}this.showBandedColumns=e.showBandedColumns;this.showBandedRows=e.showBandedRows;this.alterFirstColumn=e.alterFirstColumn;this.alterLastColumn=e.alterLastColumn;this._deserializeTableColumns(e.columns)};WorkbookTable.prototype._serializeTableColumns=function(){var e,t,o=[];for(t=0;t<this._columns.length;t++)(e=this._columns[t])&&(o[t]=e._serialize());return o};WorkbookTable.prototype._deserializeTableColumns=function(e){var t,o,r;assert(null!=e,"table Columns should not be null.");this._columns=[];for(r=0;r<e.length;r++)if(o=e[r]){(t=new WorkbookTableColumn)._deserialize(o);this._columns[r]=t}};return WorkbookTable}();export{WorkbookTable};var WorkbookTableColumn=function(){function WorkbookTableColumn(){}WorkbookTableColumn.prototype._serialize=function(){return null==this.name?null:{name:this.name,totalRowLabel:this.totalRowLabel,totalRowFunction:this.totalRowFunction,showFilterButton:this.showFilterButton}};WorkbookTableColumn.prototype._deserialize=function(e){this.name=e.name;this.totalRowLabel=e.totalRowLabel;this.totalRowFunction=e.totalRowFunction;this.showFilterButton=e.showFilterButton};return WorkbookTableColumn}();export{WorkbookTableColumn};var WorkbookTableStyle=function(){function WorkbookTableStyle(){}WorkbookTableStyle.prototype._serialize=function(){var e;if(this._checkEmptyWorkbookTableStyle())return null;e={name:this.name};this.wholeTableStyle&&(e.wholeTableStyle=this.wholeTableStyle._serialize());this.firstBandedColumnStyle&&(e.firstBandedColumnStyle=this.firstBandedColumnStyle._serialize());this.firstBandedRowStyle&&(e.firstBandedRowStyle=this.firstBandedRowStyle._serialize());this.secondBandedColumnStyle&&(e.secondBandedColumnStyle=this.secondBandedColumnStyle._serialize());this.secondBandedRowStyle&&(e.secondBandedRowStyle=this.secondBandedRowStyle._serialize());this.headerRowStyle&&(e.headerRowStyle=this.headerRowStyle._serialize());this.totalRowStyle&&(e.totalRowStyle=this.totalRowStyle._serialize());this.firstColumnStyle&&(e.firstColumnStyle=this.firstColumnStyle._serialize());this.lastColumnStyle&&(e.lastColumnStyle=this.lastColumnStyle._serialize());this.firstHeaderCellStyle&&(e.firstHeaderCellStyle=this.firstHeaderCellStyle._serialize());this.lastHeaderCellStyle&&(e.lastHeaderCellStyle=this.lastHeaderCellStyle._serialize());this.firstTotalCellStyle&&(e.firstTotalCellStyle=this.firstTotalCellStyle._serialize());this.lastTotalCellStyle&&(e.lastTotalCellStyle=this.lastTotalCellStyle._serialize());return e};WorkbookTableStyle.prototype._deserialize=function(e){this.name=e.name;if(e.wholeTableStyle){this.wholeTableStyle=new WorkbookTableCommonStyle;this.wholeTableStyle._deserialize(e.wholeTableStyle)}if(e.firstBandedColumnStyle){this.firstBandedColumnStyle=new WorkbookTableBandedStyle;this.firstBandedColumnStyle._deserialize(e.firstBandedColumnStyle)}if(e.firstBandedRowStyle){this.firstBandedRowStyle=new WorkbookTableBandedStyle;this.firstBandedRowStyle._deserialize(e.firstBandedRowStyle)}if(e.secondBandedColumnStyle){this.secondBandedColumnStyle=new WorkbookTableBandedStyle;this.secondBandedColumnStyle._deserialize(e.secondBandedColumnStyle)}if(e.secondBandedRowStyle){this.secondBandedRowStyle=new WorkbookTableBandedStyle;this.secondBandedRowStyle._deserialize(e.secondBandedRowStyle)}if(e.headerRowStyle){this.headerRowStyle=new WorkbookTableCommonStyle;this.headerRowStyle._deserialize(e.headerRowStyle)}if(e.totalRowStyle){this.totalRowStyle=new WorkbookTableCommonStyle;this.totalRowStyle._deserialize(e.totalRowStyle)}if(e.firstColumnStyle){this.firstColumnStyle=new WorkbookTableCommonStyle;this.firstColumnStyle._deserialize(e.firstColumnStyle)}if(e.lastColumnStyle){this.lastColumnStyle=new WorkbookTableCommonStyle;this.lastColumnStyle._deserialize(e.lastColumnStyle)}if(e.firstHeaderCellStyle){this.firstHeaderCellStyle=new WorkbookTableCommonStyle;this.firstHeaderCellStyle._deserialize(e.firstHeaderCellStyle)}if(e.lastHeaderCellStyle){this.lastHeaderCellStyle=new WorkbookTableCommonStyle;this.lastHeaderCellStyle._deserialize(e.lastHeaderCellStyle)}if(e.firstTotalCellStyle){this.firstTotalCellStyle=new WorkbookTableCommonStyle;this.firstTotalCellStyle._deserialize(e.firstTotalCellStyle)}if(e.lastTotalCellStyle){this.lastTotalCellStyle=new WorkbookTableCommonStyle;this.lastTotalCellStyle._deserialize(e.lastTotalCellStyle)}};WorkbookTableStyle.prototype._checkEmptyWorkbookTableStyle=function(){return null==this.name||null==this.wholeTableStyle&&null==this.firstBandedColumnStyle&&null==this.firstBandedRowStyle&&null==this.secondBandedColumnStyle&&null==this.secondBandedRowStyle&&null==this.headerRowStyle&&null==this.totalRowStyle&&null==this.firstColumnStyle&&null==this.lastColumnStyle&&null==this.firstHeaderCellStyle&&null==this.lastHeaderCellStyle&&null==this.firstTotalCellStyle&&null==this.lastTotalCellStyle};return WorkbookTableStyle}();export{WorkbookTableStyle};var WorkbookTableCommonStyle=function(e){__extends(WorkbookTableCommonStyle,e);function WorkbookTableCommonStyle(){return e.call(this)||this}WorkbookTableCommonStyle.prototype._deserialize=function(t){var o;e.prototype._deserialize.call(this,t);if(t.borders){(o=new WorkbookTableBorder)._deserialize(t.borders);this.borders=o}};return WorkbookTableCommonStyle}(WorkbookStyle);export{WorkbookTableCommonStyle};var WorkbookTableBandedStyle=function(e){__extends(WorkbookTableBandedStyle,e);function WorkbookTableBandedStyle(){return e.call(this)||this}WorkbookTableBandedStyle.prototype._serialize=function(){var t;(t=e.prototype._serialize.call(this)).size=this.size;return t};WorkbookTableBandedStyle.prototype._deserialize=function(t){e.prototype._deserialize.call(this,t);null!=t.size&&(this.size=t.size)};return WorkbookTableBandedStyle}(WorkbookTableCommonStyle);export{WorkbookTableBandedStyle};var WorkbookTableBorder=function(e){__extends(WorkbookTableBorder,e);function WorkbookTableBorder(){return e.call(this)||this}WorkbookTableBorder.prototype._serialize=function(){var t;null!=(t=e.prototype._serialize.call(this))||this.vertical&&this.horizontal||(t={});this.vertical&&(t.vertical=this.vertical._serialize());this.horizontal&&(t.horizontal=this.horizontal._serialize());return t};WorkbookTableBorder.prototype._deserialize=function(t){var o,r;e.prototype._deserialize.call(this,t);if(t.vertical){(o=new WorkbookBorderSetting)._deserialize(t.vertical);this.vertical=o}if(t.horizontal){(r=new WorkbookBorderSetting)._deserialize(t.horizontal);this.horizontal=r}};return WorkbookTableBorder}(WorkbookBorder);export{WorkbookTableBorder};var WorkbookTextRun=function(){function WorkbookTextRun(){}WorkbookTextRun.prototype._serialize=function(){var e={text:this.text};this.font&&(e.font=this.font._serialize());return e};WorkbookTextRun.prototype._deserialize=function(e){if(e.font){this.font=new WorkbookFont;this.font._deserialize(e.font)}this.text=e.text};return WorkbookTextRun}();export{WorkbookTextRun};var _Base64=function(){function _Base64(){}_Base64.toArray=function(e){for(var t=atob(e),o=t.length,r=new Uint8Array(o),l=0;l<o;l++)r[l]=t.charCodeAt(l);return r};return _Base64}(),_TextRunsSerializer=function(){function _TextRunsSerializer(){}_TextRunsSerializer.deserialize=function(e){return e&&e.length?e.map((function(e){var t=new WorkbookTextRun;t._deserialize(e);return t})):null};_TextRunsSerializer.serialize=function(e){return e&&e.length?e.map((function(e){return e._serialize()})):null};return _TextRunsSerializer}();export var HAlign;!function(e){e[e.General=0]="General";e[e.Left=1]="Left";e[e.Center=2]="Center";e[e.Right=3]="Right";e[e.Fill=4]="Fill";e[e.Justify=5]="Justify"}(HAlign||(HAlign={}));export var VAlign;!function(e){e[e.Top=0]="Top";e[e.Center=1]="Center";e[e.Bottom=2]="Bottom";e[e.Justify=3]="Justify"}(VAlign||(VAlign={}));export var TextDirection;!function(e){e[e.Context=0]="Context";e[e.LeftToRight=1]="LeftToRight";e[e.RightToLeft=2]="RightToLeft"}(TextDirection||(TextDirection={}));export var TextOrientation;!function(e){e[e.Horizontal=0]="Horizontal";e[e.Vertical=1]="Vertical";e[e.RotateUp=2]="RotateUp";e[e.RotateDown=3]="RotateDown"}(TextOrientation||(TextOrientation={}));export var BorderStyle;!function(e){e[e.None=0]="None";e[e.Thin=1]="Thin";e[e.Medium=2]="Medium";e[e.Dashed=3]="Dashed";e[e.Dotted=4]="Dotted";e[e.Thick=5]="Thick";e[e.Double=6]="Double";e[e.Hair=7]="Hair";e[e.MediumDashed=8]="MediumDashed";e[e.ThinDashDotted=9]="ThinDashDotted";e[e.MediumDashDotted=10]="MediumDashDotted";e[e.ThinDashDotDotted=11]="ThinDashDotDotted";e[e.MediumDashDotDotted=12]="MediumDashDotDotted";e[e.SlantedMediumDashDotted=13]="SlantedMediumDashDotted"}(BorderStyle||(BorderStyle={}));var JSZip=JSZipRef;export function useJSZip(e){JSZip=e}var _xlsx=function(){function _xlsx(){}_xlsx.load=function(e,t){void 0===t&&(t=!0);var o=new JSZip;assert(null==o.loadAsync,"Please use JSZip 2.5 to load excel files synchronously.");var r,l=new _JsZipWrapper(o);this._loadImpl(l,e,t).then((function(e){return r=e}));return r};_xlsx.loadAsync=function(e,t){void 0===t&&(t=!0);var o=new JSZip;assert(null!=o.loadAsync,"Please use JSZip 3.0 to load excel files asynchrounously.");return this._loadImpl(o,e,t)};_xlsx.save=function(e){var t,o=Date.now();this._saveWorkbookToZip(e,null,!1).then((function(e){return t=e}));o=Date.now()-o;var r="";r=this._macroEnabled?"application/vnd.ms-excel.sheet.macroEnabled.12;":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;";var l=Date.now(),i=t.generate({compression:"DEFLATE"});return{base64:i,zipTime:Date.now()-l,processTime:o,href:function(){return"data:"+r+"base64,"+i}}};_xlsx.saveAsync=function(e,t,o,r){var l=new _SyncPromise(t);isFunction(r)&&r(0);this._saveWorkbookToZip(e,t,!0,(function(e){isFunction(r)&&r(Math.round(_map(e,0,100,0,90)))})).then((function(e){isFunction(r)&&r(91);var i=e.generateAsync({type:"base64",compression:"DEFLATE"});i.catch((function(e){o&&o(e);l.reject(e)}));i.then((function(e){if(t&&t.cancelled)l.cancel();else{isFunction(r)&&r(100);l.resolve(e)}}))}),(function(e){l.reject(e)}));return l};_xlsx._loadImpl=function(e,t,o){var r,l=this,i=this,s=Date.now(),n={sheets:[]},a=e.loadAsync(t,{base64:isString(t)}).then((function(e){return r=e}));t=null;var h=a.constructor;return(a=(a=(a=(a=(a=(a=(a=(a=a.then((function(){var e=r.file("xl/theme/theme1.xml");if(e)return e.async("string").then((function(e){i._getTheme(e);n.colorThemes=i._colorThemes}))}))).then((function(){var e=r.file("xl/styles.xml");if(e)return e.async("string").then((function(e){i._getStyle(e,o);if(o){n.styles=i._styles;null!=i._tableStyles&&(n.tableStyles=i._tableStyles)}}))}))).then((function(){var e=r.file("xl/sharedStrings.xml");if(e)return e.async("string").then((function(e){i._getSharedString(e)}))}))).then((function(){var e=r.file("xl/workbook.xml");if(e)return e.async("string").then((function(e){i._getWorkbook(e,n)}))}))).then((function(){i._tables=null;var e=h.resolve();r.folder("xl/tables").forEach((function(t,o){null==i._tables&&(i._tables=[]);e=e.then((function(){return o.async("string").then((function(e){var t=i._getTable(e);t.fileName=o.name.substring(o.name.lastIndexOf("/")+1);i._tables.push(t)}))}))}));return e}))).then((function(){var e=r.file("docProps/core.xml");if(e)return e.async("string").then((function(e){i._getCoreSetting(e,n)}))}))).then((function(){var e=r.file("xl/vbaProject.bin");if(e)return e.async("uint8array").then((function(e){null==n.reservedContent&&(n.reservedContent={});n.reservedContent.macros=e}))}))).then((function(){var e=h.resolve();r.folder("xl/worksheets").forEach((function(t,l){if(t&&-1===t.indexOf("/")){var s=i._getSheetIndex(l.name);isNaN(s)||(e=e.then((function(){return l.async("string").then((function(e){i._getSheet(e,s-1,n,o);var t=r.file("xl/worksheets/_rels/sheet"+s+".xml.rels");if(t)return t.async("string").then((function(e){for(var t,o,l=e.split("<Relationship "),a=l.length;--a;){var f=l[a],u=i._getAttr(f,"Id");if(n.sheets[s-1].tableRIds&&-1!==n.sheets[s-1].tableRIds.indexOf(u)){null==n.sheets[s-1].tables&&(n.sheets[s-1].tables=[]);n.sheets[s-1].tables.push(i._getSheetRelatedTable(f))}else if(n.sheets[s-1].hyperlinkRIds)i._getSheetRelatedHyperlink(f,u,n.sheets[s-1]);else{var c=i._getAttr(f,"Type");/\/comments$/.test(c)?t={id:i._getAttr(f,"Id"),target:i._getAttr(f,"Target")}:/\/vmlDrawing$/.test(c)&&(o={id:i._getAttr(f,"Id"),target:i._getAttr(f,"Target")})}}if(t&&o)return function(e){var l=h.resolve();return i._readNotes(e,t,o,r,l).then((function(){}))}(n.sheets[s-1])}))}))})))}}));return e}))).then((function(){n.processTime=Date.now()-s;r=null;l._sharedStrings=null;l._colorThemes=null;l._styles=null;l._sharedFormulas=null;l._borders=null;l._fonts=null;l._fills=null;l._contentTypes=null;l._props=null;l._xlRels=null;l._worksheets=null;l._tableStyles=null;l._dxfs=null;l._tables=null;l._notes=null;return n}))};_xlsx._readNotes=function(e,t,o,r,l){var i=this,absPath=function(e){return e&&e.replace(/^..\//,"xl/")},s=r.file(absPath(t.target));s&&(l=l.then((function(){return s.async("string").then((function(t){for(var l=t.substring(t.indexOf("<authors>"),t.indexOf("</authors>")).split("<author>"),s=[],n=1;n<l.length;n++)s.push(l[n].substring(0,l[n].indexOf("</author>")));l=t.substring(t.indexOf("<commentList>"),t.indexOf("</commentList>")).split("<comment ");for(n=1;n<l.length;n++){var a=_xlsx._getAttr(l[n],"ref"),h=i._alphaNum(a.match(/[a-zA-Z]*/g)[0]),f=+a.match(/\d*/g).join("")-1,u=l[n],c=u.substring(u.indexOf("<text>")+"<text>".length,u.lastIndexOf("</text>")),d=i._extractTextRuns(c),m=e.rows[f].cells[h];null==m&&(e.rows[f].cells[h]=m={});m.note={author:s[_xlsx._getAttr(u,"authorId")],textRuns:d,text:i._getTextOfTextRuns(d)}}var p=r.file(absPath(o.target));if(p)return p.async("string").then((function(t){var o={};t.substring(0,t.indexOf(">")).split("xmlns:").forEach((function(e){e.indexOf("vml")>=0?o.vml=e.substring(0,e.indexOf("=")):e.indexOf("office:office")>=0?o.office=e.substring(0,e.indexOf("=")):e.indexOf("office:excel")>=0&&(o.excel=e.substring(0,e.indexOf("=")))}));for(var r=t.split("<"+o.vml+":shape "),l=new _NotePositionConverter(e),s=1;s<r.length;s++){var n=r[s],a=o.excel+":ClientData",h=n.indexOf(a);if(h>0){h+=a.length+1;var f=n.substring(h,n.indexOf("</"+a,h));if("Note"===i._getAttr(f,"ObjectType")){var u=+i._getElementValue(f,o.excel+":Row",null,null),c=+i._getElementValue(f,o.excel+":Column",null,null),d=e.rows[u].cells[c].note;assert(null!=d,"No related note was found, row=${row}, col=${col}.");d.visible=i._getElementValue(f,o.excel+":Visible",!1,!0);var m=i._getElementValue(f,o.excel+":Anchor",null,null).split(",").map((function(e){return parseFloat(e)}));l.fromAnchor(m,d,u,c)}}}o=null}))}))})));return l};_xlsx._saveWorkbookToZip=function(e,t,o,r){var l=this,i=new JSZip;o?assert(null!=i.generateAsync,"Please use JSZip 3.0 to save excel files asynchrounously."):assert(null==i.generateAsync,"Please use JSZip 2.5 to save excel files synchronously.");isFunction(r)&&r(0);i.folder("_rels").file(".rels",this._xmlDescription+this._generateRelsDoc());var s=i.folder("docProps"),n=i.folder("xl");this._colorThemes=e.colorThemes;n.folder("theme").file("theme1.xml",this._xmlDescription+this._generateThemeDoc());this._macroEnabled=!(!e.reservedContent||!e.reservedContent.macros);this._macroEnabled&&n.file("vbaProject.bin",e.reservedContent.macros);s.file("core.xml",this._xmlDescription+this._generateCoreDoc(e));this._sharedStrings=[[],0];this._styles=new Array(1);this._borders=new Array(1);this._fonts=new Array(1);this._fills=new Array(2);this._tableStyles=new Array;this._dxfs=new Array;this._contentTypes=[];this._props=[];this._xlRels=[];this._worksheets=[];this._tables=[];this._tableStyles=[];this._notes={};var a=new _SyncPromise(t);this._generateWorksheets(e,n,t,o,r).then((function(){l._writeNotes(e.sheets,n);n.file("styles.xml",l._xmlDescription+l._generateStyleDoc());i.file("[Content_Types].xml",l._xmlDescription+l._generateContentTypesDoc(e));s.file("app.xml",l._xmlDescription+l._generateAppDoc(e));n.folder("_rels").file("workbook.xml.rels",l._xmlDescription+l._generateWorkbookRels());var t=l._xmlDescription+l._generateSharedStringsDoc();l._sharedStrings=[[],0];n.file("sharedStrings.xml",t);t=null;n.file("workbook.xml",l._xmlDescription+l._generateWorkbook(e));isFunction(r)&&r(100);a.resolve(i)}));return a};_xlsx._writeNotes=function(e,t){var o=this;e.forEach((function(e,r){var l=o._notes[r];if(l){t.folder("drawings").file("vmlDrawing"+(r+1)+".vml",function(e){var t='<xml xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel">\r\n';t+='<o:shapelayout v:ext="edit">\r\n';t+='<o:idmap v:ext="edit" data="1"/>\r\n';t+="</o:shapelayout>\r\n";t+='<v:shapetype id="_x0000_t202" coordsize="21600,21600" o:spt="202" path="m,l,21600r21600,l21600,xe">\r\n';t+='<v:stroke joinstyle="miter"/>\r\n';t+='<v:path gradientshapeok="t" o:connecttype="rect"/>\r\n';t+="</v:shapetype>\r\n";var o=1e3*(r+1)+50,i=new _NotePositionConverter(e);l.forEach((function(e,r){assert(e._row>=0&&e._col>=0,"Invalid cell's indicies.");var l=null==e.visible||!0===e.visible;t+='<v:shape id="_x0000_s'+o+++'" type="#_x0000_t202" style=\''+("position:absolute; visibility:"+(l?"visible":"hidden")+"; z-index:"+(r+1)+";")+'\' fillcolor="infoBackground [80]" o:insetmode="auto">\r\n';t+='<v:fill color2="infoBackground [80]"/>\r\n';t+='<v:shadow color="none [81]" obscured="t"/>\r\n';t+='<v:path o:connecttype="none"/>\r\n';"text-align:left;";"mso-direction-alt:auto;";t+='<v:textbox style="mso-direction-alt:auto;" ';t+=">\r\n";t+='<div style="text-align:left;"></div>\r\n';t+="</v:textbox>\r\n";t+='<x:ClientData ObjectType="Note">\r\n';t+="<x:MoveWithCells/>\r\n";t+="<x:SizeWithCells/>\r\n";null==e.width&&(e.width=144);null==e.height&&(e.height=79);null==e.offsetX&&(e.offsetX=15);null==e.offsetY&&(e.offsetY=0==e._row?2:15);var s=i.toAnchor(e,e._row,e._col);t+="<x:Anchor>"+s.toString()+"</x:Anchor>\r\n";t+="<x:AutoFill>False</x:AutoFill>\r\n";t+="<x:Row>"+e._row+"</x:Row>\r\n";t+="<x:Column>"+e._col+"</x:Column>\r\n";l&&(t+="<x:Visible/>\r\n");t+="</x:ClientData>\r\n";t+="</v:shape>\r\n"}));return t+"</xml>"}(e));t.file("comments"+(r+1)+".xml",function(e){var t='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n';t+='<comments xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="xr" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision">\r\n';var r={},i=[],s={family:"Tahoma",size:12};l.forEach((function(e){var t=e.author||"";if(null==r[t]){r[t]=i.length;i.push(t)}}));t+="<authors>\r\n";i.forEach((function(e){return t+="<author>"+e+"</author>\r\n"}));t+="</authors>\r\n";t+="<commentList>\r\n";l.forEach((function(e){var l=o._numAlpha(e._col)+(e._row+1);t+='<comment ref="'+l+'" authorId="'+r[e.author||""]+'" shapeId="0" xr:uid="'+_guid()+'">\r\n';t+="<text>\r\n";var i=e.textRuns&&e.textRuns.length?e.textRuns:[{text:e.text}];i=i.map((function(e){e.font=e.font||s;return e}));t+=o._generateTextRuns(i,o._defaultFontName.toLowerCase());t+="</text>";t+="</comment>\r\n"}));return(t+="</commentList>\r\n")+"</comments>"}())}}))};_xlsx._generateWorksheets=function(e,t,o,r,l){for(var i,s=this,n=t.folder("worksheets"),a=e.sheets.length,h=[],f=e.sheets.map((function(e){return e.rows.length})).reduce((function(e,t){return e+t})),u=e.sheets.map((function(e){return e.rows.length/f})),c=a-1,d=0,m=0,_loop_1=function(){var f=a;h.push((function(){var a=new _SyncPromise(o);s._generateWorkSheet(f,e,n,o,r,(function(e){if(isFunction(l)){e=Math.round(e*u[f]);if(c!==f){c=f;m+=d}d=e;l(m+e)}})).then((function(){var o=e.sheets[f],r=o&&o.externalLinks,l=s._sheetHasNotes(f);if(o&&(o.tables&&o.tables.length>0||r&&r.length>0||l)){var h=1,u='<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">';if(l){u+='<Relationship Id="rId'+h+++'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing" Target="../drawings/vmlDrawing'+(f+1)+'.vml" />';u+='<Relationship Id="rId'+h+++'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments" Target="../comments'+(f+1)+'.xml" />'}if(r&&r.length>0){u+=s._generateHyperlinkRel(r,h);h+=r.length}if(o.tables&&o.tables.length>0){null==i&&(i=t.folder("tables"));for(var c=0;c<o.tables.length;c++){var d=o.tables[c];s._generateTable(d,i);u+='<Relationship Target="../tables/'+d.fileName+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/table" Id="rId'+(c+h)+'"/>'}}u+="</Relationships>";n.folder("_rels").file("sheet"+(f+1)+".xml.rels",s._xmlDescription+u)}a.resolve()}));return a}))};a--;)_loop_1();return _SyncPromise.serial(o,h).then((function(){isFunction(l)&&l(100)}))};_xlsx._getSharedString=function(e){var t=e.split(/<si.*?>/g),o=t.length;this._sharedStrings=[];for(;--o;)if(t[o].search(/<r>/gi)>-1)this._sharedStrings[o-1]=this._extractTextRuns(t[o]);else{var r=this._getElementValue(t[o],"t","","");this._sharedStrings[o-1]=this._unescape(r)}};_xlsx._extractTextRuns=function(e){for(var t=[],o=e.split(/<r>/g),r=1;r<o.length;r++){var l=void 0;-1!==o[r].indexOf("<rPr>")&&(l=this._getTextRunFont(o[r]));var i=this._getElementValue(o[r],"t","","");t.push({font:l,text:this._unescape(i)})}return t};_xlsx._getInlineString=function(e){for(var t=e.split("<t"),o=t.length,r="";--o;){var l=t[o];if(" "===l[0]||">"===l[0]){var i=l.indexOf("</t>");i>0&&(r=l.substring(l.indexOf(">")+1,i)+r)}}return r};_xlsx._escape=function(e){var t=this;return"string"==typeof e?(e=e.replace(/[\u0000-\u001F]/g,(function(e){return t._asciiCtrlReplacements[e.charCodeAt(0)]}))).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):""};_xlsx._unescape=function(e){if(!e)return e;-1!==e.indexOf("&#")&&(e=this._unescapeNumericEntities(e));-1!==e.indexOf("&")&&(e=e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&amp;/g,"&"));-1!==e.indexOf("_x")&&(e=e.replace(/_x([0-9A-F]{4})_/gi,(function(e,t){return fromCodePointImpl(parseInt(t,16))})));return e};_xlsx._unescapeNumericEntities=function(e){if(isIE())return e.replace(/&#(x?)([0-9A-F]{1,6});/gi,(function(e,t,o){o=t?parseInt(o,16):+o;return fromCodePointImpl(o)}));for(var t,o=0,r="";(t=e.indexOf("&#",o))>=0;){var l="x"===e[t+2],i=l?3:2,s=e.indexOf(";",t+i);if(-1===s)break;var n=s-t-i,a=void 0,h=n>0&&n<8;if(h){var f=e.substr(t+i,n);h=l?(a=parseInt(f,16))==a:(a=+f)==f}if(h){r+=e.substring(o,t);r+=fromCodePointImpl(a);o=s+1}else{r+=e.substr(o,i);o+=i}}o!==e.length&&(r+=e.substr(o));return r||e};_xlsx._getCoreSetting=function(e,t){var o,r;if((r=e.indexOf("<dc:creator>"))>=0){o=e.substr(r+12);t.creator=o.substring(0,o.indexOf("</dc:creator>"))}if((r=e.indexOf("<cp:lastModifiedBy>"))>=0){o=e.substr(r+19);t.lastModifiedBy=o.substring(0,o.indexOf("</cp:lastModifiedBy>"))}if((r=e.indexOf('<dcterms:created xsi:type="dcterms:W3CDTF">'))>=0){o=e.substr(r+43);t.created=new Date(o.substring(0,o.indexOf("</dcterms:created>")))}if((r=e.indexOf('<dcterms:modified xsi:type="dcterms:W3CDTF">'))>=0){o=e.substr(r+44);t.modified=new Date(o.substring(0,o.indexOf("</dcterms:modified>")))}};_xlsx._getWorkbook=function(e,t){var o,r,l,i,s,n,a,h,f=e.substring(e.indexOf("<bookViews>"),e.indexOf("</bookViews>")),u="",c=e.indexOf("<definedNames>");f&&(u=this._getAttr(f,"activeTab"));t.activeWorksheet=+u;n=(s=e.split("<sheet ")).length;for(;--n;){a=this._getAttr(s[n],"name");h="hidden"!==this._getAttr(s[n],"state");t.sheets.unshift({name:a,visible:h,columns:[],rows:[]})}if(c>-1){t.definedNames=[];n=(s=e.substring(c,e.indexOf("</definedNames>")).split("<definedName ")).length;for(;--n;){a=this._getAttr(s[n],"name");if(r=s[n].match(/.*>.+(?=<\/definedName>)/)){r=r[0].replace(/(.*>)(.+)/,"$2");r=isNaN(+r)?r:+r}o={name:a,value:r};""!==(l=this._getAttr(s[n],"localSheetId"))&&(i=t.sheets[+l])&&(o.sheetName=i.name);t.definedNames.unshift(o)}}};_xlsx._getTheme=function(e){e=e.substring(e.indexOf("<a:clrScheme"),e.indexOf("</a:clrScheme>"));this._colorThemes=this._defaultColorThemes.slice();this._colorThemes[0]=this._getAttr(e.substring(e.indexOf("a:lt1"),e.indexOf("</a:lt1>")),"lastClr")||this._getAttr(e.substring(e.indexOf("a:lt1"),e.indexOf("</a:lt1>")),"val");this._colorThemes[1]=this._getAttr(e.substring(e.indexOf("a:dk1"),e.indexOf("</a:dk1>")),"lastClr")||this._getAttr(e.substring(e.indexOf("a:dk1"),e.indexOf("</a:dk1>")),"val");this._colorThemes[2]=this._getAttr(e.substring(e.indexOf("a:lt2"),e.indexOf("</a:lt2>")),"val");this._colorThemes[3]=this._getAttr(e.substring(e.indexOf("a:dk2"),e.indexOf("</a:dk2>")),"val");for(var t=e.substring(e.indexOf("<a:accent1"),e.indexOf("</a:accent6>")).split("<a:accent"),o=t.length;--o;)this._colorThemes[o+3]=this._getAttr(t[o],"val")};_xlsx._getStyle=function(e,t){var o=[],r=[],l=[],i=this._numFmts.slice();this._styles=[];var s=e.indexOf("<numFmts");if(s>=0)for(var n=e.substring(s+8,e.indexOf("</numFmts>")).split("<numFmt"),a=n.length;--a;){var h=n[a];i[+this._getAttr(h,"numFmtId")]=this._getAttr(h,"formatCode")}if(t){if((s=e.indexOf("<fonts"))>=0){var f=e.substring(s,e.indexOf("</fonts>")).split("<font>");for(a=f.length;--a;){h=f[a];var u=this._getChildNodeValue(h,"sz"),c=void 0;o[a-1]={bold:/<b\s*\/>/.test(h)||"true"===this._getChildNodeValue(h,"b"),italic:/<i\s*\/>/.test(h)||"true"===this._getChildNodeValue(h,"i"),underline:/<u\s*\/>/.test(h)||!!(c=this._getChildNodeValue(h,"u"))&&"none"!==c,size:Math.round(u?96*+u/72:14),family:this._getChildNodeValue(h,"name"),color:this._getColor(h,!1)};u=null}}if((s=e.indexOf("<fills"))>=0){var d=e.substring(s,e.indexOf("</fills>")).split("<fill>");for(a=d.length;--a;)r[a-1]=this._getColor(d[a],!0)}if((s=e.indexOf("<borders"))>=0){var m=e.substring(s+8,e.indexOf("</borders>")).split("<border");for(a=m.length;--a;){h=m[a];l[a-1]={left:this._getEdgeBorder(h,"left"),right:this._getEdgeBorder(h,"right"),top:this._getEdgeBorder(h,"top"),bottom:this._getEdgeBorder(h,"bottom")}}}}if((s=e.indexOf("<cellXfs"))>=0){var p=e.substring(s,e.indexOf("</cellXfs>")).split("<xf");for(a=p.length;--a;){h=p[a];var _=+this._getAttr(h,"numFmtId"),g=i[_],b="unknown";g&&(/[hsmy\:]/i.test(g)?b="date":g.indexOf("0")>-1?b="number":"@"===g&&(b="string"));var y={formatCode:g,type:b,quotePrefix:1==+this._getAttr(h,"quotePrefix")};if(t){var x=(_=+this._getAttr(h,"fontId"))>0?o[_]:null,v=(_=+this._getAttr(h,"fillId"))>1?r[_]:null,k=(_=+this._getAttr(h,"borderId"))>0?l[_]:null;s=h.indexOf("<alignment");y.font=x;y.fillColor=v;y.borders=k;y.hAlign=s>=0?Workbook._parseStringToHAlign(this._getAttr(h,"horizontal")):null;y.vAlign=s>=0?Workbook._parseStringToVAlign(this._getAttr(h,"vertical")):null;y.wordWrap=s>=0?"1"===this._getAttr(h,"wrapText"):null}this._styles.unshift(y)}}if(t&&e.indexOf("<tableStyle ")>-1){this._tableStyles=[];var S=e.substring(e.indexOf("<tableStyles "),e.indexOf("</tableStyles>")),w=e.substring(e.indexOf("<dxfs "),e.indexOf("</dxfs>"));this._getTableStyles(S,w.split("<dxf>"))}};_xlsx._getEdgeBorder=function(e,t){var o,r,l,i,s=e.indexOf("<"+t),n=e.indexOf("</"+t+">");if(s>=0){r=e.substring(s);r=n>=0?r.substring(0,n):r.substring(0,r.indexOf("/>"));var a=this._getAttr(r,"style");if(a){l=Workbook._parseStringToBorderType(a);i=this._getColor(r,!1);if(l!==BorderStyle.Thin||!i||"#c6c6c6"!==i.toLowerCase()){(o={}).style=l;o.color=i}}}return o};_xlsx._getSheet=function(e,t,o,r){var l,i=[];if(e.indexOf("<mergeCells")>-1)for(var s=e.substring(e.indexOf("<mergeCells"),e.indexOf("</mergeCells>")).split("<mergeCell "),n=s.length;--n;)2===(l=this._getAttr(s[n],"ref").split(":")).length&&i.unshift({topRow:+l[0].match(/\d*/g).join("")-1,leftCol:this._alphaNum(l[0].match(/[a-zA-Z]*/g)[0]),bottomRow:+l[1].match(/\d*/g).join("")-1,rightCol:this._alphaNum(l[1].match(/[a-zA-Z]*/g)[0])});this._getsBaseSharedFormulas(e);var a=e.split("<row "),h=o.sheets[t];if(a[0].indexOf("<dimension")>=0){var f=this._getAttr(a[0].substr(a[0].indexOf("<dimension")),"ref");if(f){f=f.substr(f.indexOf(":")+1);h.maxCol=this._alphaNum(f.match(/[a-zA-Z]*/g)[0])+1;h.maxRow=+f.match(/\d*/g).join("")}}var u=this._getElementValue(e,"sheetView",null,null);h.rightToLeft=u&&"1"===this._getAttr(u,"rightToLeft");var c,d=e.indexOf("<tableParts");if(d>-1){var m=e.substring(d,e.indexOf("</tableParts>")).split("<tablePart "),p=m.length;h.tableRIds=[];for(;--p;)h.tableRIds.unshift(this._getAttr(m[p],"r:id"))}if(a.length>0&&a[0].indexOf("<pane")>-1&&"frozen"===this._getAttr(a[0].substr(a[0].indexOf("<pane")),"state")){var _=this._getAttr(a[0].substr(a[0].indexOf("<pane")),"ySplit"),g=this._getAttr(a[0].substr(a[0].indexOf("<pane")),"xSplit");h.frozenPane={rows:_?+_:NaN,columns:g?+g:NaN}}h.summaryBelow="0"!==this._getAttr(a[0],"summaryBelow");n=a.length;if(a.length<=1){h.maxCol=20;h.maxRow=200}else(null==h.maxRow||h.maxRow<n-1)&&(h.maxRow=n-1);for(;--n;){var b=h.rows[+this._getAttr(a[n],"r")-1]={visible:!0,groupLevel:NaN,cells:[]};a[n].substring(0,a[n].indexOf(">")).indexOf("hidden")>-1&&"1"===this._getAttr(a[n],"hidden")&&(b.visible=!1);if("1"===this._getAttr(a[n],"customHeight")){var y=+this._getAttr(a[n].substring(0,a[n].indexOf(">")).replace("customHeight",""),"ht");b.height=96*y/72}var x=null;if("1"===this._getAttr(a[n],"customFormat")){(E=this._styles[+this._getAttr(a[n].substring(a[n].indexOf(" s=")),"s")]||{type:"General",formatCode:null}).formatCode&&"General"!==E.formatCode&&(x={format:E.formatCode&&"General"!==E.formatCode?E.formatCode:null});if(r&&(E.font||E.fillColor||E.hAlign||E.vAlign||E.wordWrap||E.borders)){(x=x||{}).font=E.font;x.fill={color:E.fillColor};x.borders=E.borders;x.hAlign=E.hAlign;x.vAlign=E.vAlign;x.wordWrap=E.wordWrap}}b.style=x;var v=this._getAttr(a[n],"outlineLevel");b.groupLevel=v&&""!==v?+v:NaN;b.collapsed="1"===this._getAttr(a[n],"collapsed");var k=a[n].split("<c "),S=k.length;(null==h.maxCol||h.maxCol<S-1)&&(h.maxCol=S-1);for(;--S;){var w=k[S],C=null;(E=this._styles[+this._getAttr(w,"s")]||{type:"General",formatCode:null}).formatCode&&"General"!==E.formatCode&&(C={format:E.formatCode&&"General"!==E.formatCode?E.formatCode:null});if(r&&(E.font||E.fillColor||E.hAlign||E.vAlign||E.wordWrap||E.borders)){(C=C||{}).font=E.font;C.fill={color:E.fillColor};C.borders=E.borders;C.hAlign=E.hAlign;C.vAlign=E.vAlign;C.wordWrap=E.wordWrap}var W=this._getAttr(w.substring(0,w.indexOf(">")),"t")||E.type,T=null,F="inlineStr"===W||w.indexOf("<is>")>=0;T=F?this._getInlineString(w):this._getElementValue(w,"v",null,null);T=this._unescape(T);var A=null,R=null,z=null;if(w.indexOf("<f")>-1)if(w.indexOf("</f>")>-1)(A=w.match(/<f.*>.+(?=<\/f>)/))&&(A=A[0].replace(/(\<f.*>)(.+)/,"$2"));else if(R=this._getAttr(w,"si")){z=this._getAttr(w,"r");A=this._getSharedFormula(R,z)}null!=A&&(A=A.replace(/\[\#This Row\]\s*,\s*/gi,"@"));"str"===W||"e"===W||F||(T=T?+T:T);c=this._alphaNum(this._getAttr(w,"r").match(/[a-zA-Z]*/g)[0]);var N=null;switch(W){case"s":if(null!=(T=this._sharedStrings[T]))if(isString(T))E&&E.quotePrefix&&(T="'"+T);else{N=T.slice();T=this._getTextOfTextRuns(N)}break;case"b":T=1===T;break;case"date":T=null!=T?this._convertDate(T):null}if(isNumber(T)){null==C&&(C={format:""});isInt(T)?C.format=C.format||"#,##0":C.format=C.format||"#,##0.00"}b.cells[c]={value:T,textRuns:N,isDate:"date"===W,isNumber:"number"===W,formula:Workbook._unescapeXML(A),style:C}}}var O=[],D=[];if(a.length>0&&a[0].indexOf("<cols>")>-1)for(var B=(O=a[0].substring(a[0].indexOf("<cols>")+6,a[0].indexOf("</cols>")).split("<col ")).length-1;B>0;B--){var P=this._parseCharWidthToPixel(+this._getAttr(O[B],"width")),E=null,I=null;O[B].indexOf("style")>-1&&(E=this._styles[+this._getAttr(O[B],"style")]||{type:"General",formatCode:null});E&&E.formatCode&&"General"!==E.formatCode&&(I={format:E.formatCode&&"General"!==E.formatCode?E.formatCode:null});if(r&&E&&(E.font||E.fillColor||E.hAlign||E.vAlign||E.wordWrap||E.borders)){(I=I||{}).font=E.font;I.fill={color:E.fillColor};I.borders=E.borders;I.hAlign=E.hAlign;I.vAlign=E.vAlign;I.wordWrap=E.wordWrap}var L=+this._getAttr(O[B],"min"),M=+this._getAttr(O[B],"max");if(M>h.maxCol)h._extraColumn={min:L,max:M,width:P,style:I};else for(c=L-1;c<M&&c<h.maxCol;c++)D[c]={visible:"1"!==this._getAttr(O[B],"hidden"),autoWidth:"1"===this._getAttr(O[B],"bestFit"),width:P,style:I}}h.columns=D;var H,V=e.indexOf("<hyperlinks");if(V>-1)for(var j=e.substring(V,e.indexOf("</hyperlinks>")).split("<hyperlink "),J=j.length;--J;)this._getHyperlink(h,j[J]);if(h.frozenPane){if(!isNaN(h.frozenPane.rows))for(n=0;n<h.rows.length&&n<h.frozenPane.rows;n++)h.rows[n]&&!h.rows[n].visible&&h.frozenPane.rows++;if(!isNaN(h.frozenPane.columns))for(n=0;n<D.length&&n<h.frozenPane.columns;n++)D[n]&&!D[n].visible&&h.frozenPane.columns++}for(S=0;S<i.length;S++){H=i[S];h.rows[H.topRow]||(h.rows[H.topRow]={cells:[]});h.rows[H.topRow].cells||(h.rows[H.topRow].cells=[]);h.rows[H.topRow].cells[H.leftCol]||(h.rows[H.topRow].cells[H.leftCol]={});h.rows[H.topRow].cells[H.leftCol].rowSpan=H.bottomRow<h.maxRow?H.bottomRow-H.topRow+1:200;h.rows[H.topRow].cells[H.leftCol].colSpan=H.rightCol<h.maxCol?H.rightCol-H.leftCol+1:20}};_xlsx._getTable=function(e){var t={};t.name=this._getAttr(e,"name");t.range=this._getAttr(e,"ref");var o=this._getAttr(e,"headerRowCount");t.showHeaderRow=""==o||"1"===o;var r=this._getAttr(e,"totalsRowCount");t.showTotalRow="1"===r;var l=e.substring(e.indexOf("<tableStyleInfo")),i=this._getAttr(l,"name");this._isBuiltInStyleName(i)?t.style={name:i}:t.style=this._getTableStyleByName(i);t.showBandedColumns="1"===this._getAttr(l,"showColumnStripes");t.showBandedRows="1"===this._getAttr(l,"showRowStripes");t.alterFirstColumn="1"===this._getAttr(l,"showFirstColumn");t.alterLastColumn="1"===this._getAttr(l,"showLastColumn");var s=e.split("<tableColumn ");t.columns=[];for(var n=1;n<s.length;n++){var a=s[n];t.columns.push(this._getTableColumn(a))}if(e.indexOf("filterColumn")>-1)for(var h=e.substring(e.indexOf("<autoFilter"),e.indexOf("</autoFilter>")).split("<filterColumn"),f=1;f<h.length;f++){var u=h[f],c=+this._getAttr(u,"colId");t.columns[c].showFilterButton="1"!==this._getAttr(u,"hiddenButton")}return t};_xlsx._getTableColumn=function(e){var t={};t.name=this._getAttr(e,"name");var o=this._getAttr(e,"totalsRowLabel");if(o)t.totalRowLabel=o;else{var r=this._getAttr(e,"totalsRowFunction");"custom"===r&&(r=e.substring(e.indexOf("<totalsRowFormula>")+2+"totalsRowFormula".length,e.indexOf("</totalsRowFormula>")));t.totalRowFunction=r}return t};_xlsx._getSheetRelatedTable=function(e){var t=this._getAttr(e,"Target");t=t.substring(t.lastIndexOf("/")+1);for(var o=0;o<this._tables.length;o++){var r=this._tables[o];if(t===r.fileName)return r}return null};_xlsx._getSheetRelatedHyperlink=function(e,t,o){for(var r=0;r<o.hyperlinkRIds.length;r++){var l=o.hyperlinkRIds[r];if(l.rId===t){var i=this._getAttr(e,"Target");o.rows[l.ref.row]&&o.rows[l.ref.row].cells[l.ref.col]&&(o.rows[l.ref.row].cells[l.ref.col].link=i)}}};_xlsx._getTableStyles=function(e,t){for(var o=e.split("<tableStyle "),r=o.length;--r;){var l={},i=o[r];l.name=this._getAttr(i,"name");for(var s=i.split("<tableStyleElement "),n=s.length;--n;){var a=s[n],h=this._getAttr(a,"type");switch(h){case"firstRowStripe":h="firstBandedRowStyle";break;case"secondRowStripe":h="secondBandedRowStyle";break;case"firstColumnStripe":h="firstBandedColumnStyle";break;case"secondColumnStripe":h="secondBandedColumnStyle";break;default:h+="Style"}var f=this._getAttr(a,"dxfId");""!==f&&(l[h]=this._getTableStyleElement(t[+f+1]));var u=this._getAttr(a,"size");if(u){null==l[h]&&(l[h]={});l[h].size=+u}}this._tableStyles.push(l)}};_xlsx._getTableStyleElement=function(e){var t=null,o=null,r=null,l=null,i=e.indexOf("<font>");if(i>=0){t=e.substring(i,e.indexOf("</font>"));var s=this._getChildNodeValue(t,"sz");o={bold:"1"===this._getChildNodeValue(t,"b"),italic:"1"===this._getChildNodeValue(t,"i"),underline:"1"===this._getChildNodeValue(t,"u"),size:Math.round(s?96*+s/72:14),family:this._getChildNodeValue(t,"name"),color:this._getColor(t,!1)}}t=null;if((i=e.indexOf("<fill>"))>=0){t=e.substring(i,e.indexOf("</fill>"));r={color:this._getColor(t,!0)}}t=null;if((i=e.indexOf("<border>"))>=0){t=e.substring(i,e.indexOf("</border>"));l={left:this._getEdgeBorder(t,"left"),right:this._getEdgeBorder(t,"right"),top:this._getEdgeBorder(t,"top"),bottom:this._getEdgeBorder(t,"bottom"),vertical:this._getEdgeBorder(t,"vertical"),horizontal:this._getEdgeBorder(t,"horizontal")}}return{font:o,fill:r,borders:l}};_xlsx._getTableStyleByName=function(e){var t,o;if(null==this._tableStyles||0===this._tableStyles.length)return null;for(t=0;t<this._tableStyles.length;t++)if((o=this._tableStyles[t])&&o.name.toLowerCase()===e.toLowerCase())return o;return null};_xlsx._getHyperlink=function(e,t){var o,r,l,i,s,n;if(null!=(o=this._getAttr(t,"ref"))){l=o.split(":");null==(s=this._getAttr(t,"r:id"))&&(n=this._getAttr(t,"location"));for(var a=0;a<l.length;a++){r=l[a];i=Workbook.tableAddress(r);if(s){null==e.hyperlinkRIds&&(e.hyperlinkRIds=[]);e.hyperlinkRIds.push({ref:i,rId:s})}else n&&e.rows[i.row]&&e.rows[i.row].cells[i.col]&&(e.rows[i.row].cells[i.col].link=n)}}};_xlsx._getTextRunFont=function(e){var t,o=this._getChildNodeValue(e,"sz");return{bold:e.indexOf("<b/>")>=0||"true"===this._getChildNodeValue(e,"b"),italic:e.indexOf("<i/>")>=0||"true"===this._getChildNodeValue(e,"i"),underline:e.indexOf("<u/>")>=0||(t=this._getChildNodeValue(e,"u"))&&"none"!==t,size:Math.round(o?96*+o/72:14),family:this._getChildNodeValue(e,"rFont"),color:this._getColor(e,!1)}};_xlsx._getTextOfTextRuns=function(e){var t,o,r="";for(t=0;t<e.length;t++)(o=e[t])&&(r+=o.text);return r};_xlsx._isBuiltInStyleName=function(e){var t;if(0===e.search(/TableStyleLight/i)){t=+e.substring(15);if(!isNaN(t)&&t>=1&&t<=21)return!0}else if(0===e.search(/TableStyleMedium/i)){t=+e.substring(16);if(!isNaN(t)&&t>=1&&t<=28)return!0}else if(0===e.search(/TableStyleDark/i)){t=+e.substring(14);if(!isNaN(t)&&t>=1&&t<=11)return!0}return!1};_xlsx._generateRelsDoc=function(){return'<Relationships xmlns="'+this._relationshipsNS+'"><Relationship Target="docProps/app.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Id="rId3"/><Relationship Target="docProps/core.xml" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Id="rId2"/><Relationship Target="xl/workbook.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Id="rId1"/></Relationships>'};_xlsx._generateThemeDoc=function(){return'<a:theme name="Office Theme" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><a:themeElements>'+this._generateClrScheme()+this._generateFontScheme()+this._generateFmtScheme()+"</a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/></a:theme>"};_xlsx._generateClrScheme=function(){null===this._colorThemes&&(this._colorThemes=[]);return'<a:clrScheme name="Office"><a:dk1><a:sysClr lastClr="'+(this._colorThemes[1]||"000000")+'" val="windowText"/></a:dk1><a:lt1><a:sysClr lastClr="'+(this._colorThemes[0]||"FFFFFF")+'" val="window"/></a:lt1><a:dk2><a:srgbClr val="'+(this._colorThemes[3]||"1F497D")+'"/></a:dk2><a:lt2><a:srgbClr val="'+(this._colorThemes[2]||"EEECE1")+'"/></a:lt2><a:accent1><a:srgbClr val="'+(this._colorThemes[4]||"4F81BD")+'"/></a:accent1><a:accent2><a:srgbClr val="'+(this._colorThemes[5]||"C0504D")+'"/></a:accent2><a:accent3><a:srgbClr val="'+(this._colorThemes[6]||"9BBB59")+'"/></a:accent3><a:accent4><a:srgbClr val="'+(this._colorThemes[7]||"8064A2")+'"/></a:accent4><a:accent5><a:srgbClr val="'+(this._colorThemes[8]||"4BACC6")+'"/></a:accent5><a:accent6><a:srgbClr val="'+(this._colorThemes[9]||"F79646")+'"/></a:accent6><a:hlink><a:srgbClr val="0000FF"/></a:hlink><a:folHlink><a:srgbClr val="800080"/></a:folHlink></a:clrScheme>'};_xlsx._generateFontScheme=function(){return'<a:fontScheme name="Office"><a:majorFont><a:latin typeface="Cambria"/><a:ea typeface=""/><a:cs typeface=""/><a:font typeface="MS Pゴシック" script="Jpan"/><a:font typeface="맑은 고딕" script="Hang"/><a:font typeface="宋体" script="Hans"/><a:font typeface="新細明體" script="Hant"/><a:font typeface="Times New Roman" script="Arab"/><a:font typeface="Times New Roman" script="Hebr"/><a:font typeface="Tahoma" script="Thai"/><a:font typeface="Nyala" script="Ethi"/><a:font typeface="Vrinda" script="Beng"/><a:font typeface="Shruti" script="Gujr"/><a:font typeface="MoolBoran" script="Khmr"/><a:font typeface="Tunga" script="Knda"/><a:font typeface="Raavi" script="Guru"/><a:font typeface="Euphemia" script="Cans"/><a:font typeface="Plantagenet Cherokee" script="Cher"/><a:font typeface="Microsoft Yi Baiti" script="Yiii"/><a:font typeface="Microsoft Himalaya" script="Tibt"/><a:font typeface="MV Boli" script="Thaa"/><a:font typeface="Mangal" script="Deva"/><a:font typeface="Gautami" script="Telu"/><a:font typeface="Latha" script="Taml"/><a:font typeface="Estrangelo Edessa" script="Syrc"/><a:font typeface="Kalinga" script="Orya"/><a:font typeface="Kartika" script="Mlym"/><a:font typeface="DokChampa" script="Laoo"/><a:font typeface="Iskoola Pota" script="Sinh"/><a:font typeface="Mongolian Baiti" script="Mong"/><a:font typeface="Times New Roman" script="Viet"/><a:font typeface="Microsoft Uighur" script="Uigh"/><a:font typeface="Sylfaen" script="Geor"/></a:majorFont><a:minorFont><a:latin typeface="Calibri"/><a:ea typeface=""/><a:cs typeface=""/><a:font typeface="MS Pゴシック" script="Jpan"/><a:font typeface="맑은 고딕" script="Hang"/><a:font typeface="宋体" script="Hans"/><a:font typeface="新細明體" script="Hant"/><a:font typeface="Arial" script="Arab"/><a:font typeface="Arial" script="Hebr"/><a:font typeface="Tahoma" script="Thai"/><a:font typeface="Nyala" script="Ethi"/><a:font typeface="Vrinda" script="Beng"/><a:font typeface="Shruti" script="Gujr"/><a:font typeface="DaunPenh" script="Khmr"/><a:font typeface="Tunga" script="Knda"/><a:font typeface="Raavi" script="Guru"/><a:font typeface="Euphemia" script="Cans"/><a:font typeface="Plantagenet Cherokee" script="Cher"/><a:font typeface="Microsoft Yi Baiti" script="Yiii"/><a:font typeface="Microsoft Himalaya" script="Tibt"/><a:font typeface="MV Boli" script="Thaa"/><a:font typeface="Mangal" script="Deva"/><a:font typeface="Gautami" script="Telu"/><a:font typeface="Latha" script="Taml"/><a:font typeface="Estrangelo Edessa" script="Syrc"/><a:font typeface="Kalinga" script="Orya"/><a:font typeface="Kartika" script="Mlym"/><a:font typeface="DokChampa" script="Laoo"/><a:font typeface="Iskoola Pota" script="Sinh"/><a:font typeface="Mongolian Baiti" script="Mong"/><a:font typeface="Arial" script="Viet"/><a:font typeface="Microsoft Uighur" script="Uigh"/><a:font typeface="Sylfaen" script="Geor"/></a:minorFont></a:fontScheme>'};_xlsx._generateFmtScheme=function(){return'<a:fmtScheme name="Office">'+this._generateFillScheme()+this._generateLineStyles()+this._generateEffectScheme()+this._generateBgFillScheme()+"</a:fmtScheme>"};_xlsx._generateFillScheme=function(){return'<a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:satMod val="350000"/></a:schemeClr></a:gs></a:gsLst><a:lin scaled="1" ang="16200000"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="51000"/><a:satMod val="130000"/></a:schemeClr></a:gs><a:gs pos="80000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="130000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="94000"/><a:satMod val="135000"/></a:schemeClr></a:gs></a:gsLst><a:lin scaled="1" ang="16200000"/></a:gradFill></a:fillStyleLst>'};_xlsx._generateLineStyles=function(){return'<a:lnStyleLst><a:ln algn="ctr" cmpd="sng" cap="flat" w="9525"><a:solidFill><a:schemeClr val="phClr"><a:shade val="9500"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln><a:ln algn="ctr" cmpd="sng" cap="flat" w="25400"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln><a:ln algn="ctr" cmpd="sng" cap="flat" w="38100"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln></a:lnStyleLst>'};_xlsx._generateEffectScheme=function(){return'<a:effectStyleLst><a:effectStyle><a:effectLst><a:outerShdw dir="5400000" rotWithShape="0" dist="23000" blurRad="40000"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw dir="5400000" rotWithShape="0" dist="23000" blurRad="40000"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw dir="5400000" rotWithShape="0" dist="23000" blurRad="40000"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw></a:effectLst><a:scene3d><a:camera prst="orthographicFront"><a:rot rev="0" lon="0" lat="0"/></a:camera><a:lightRig dir="t" rig="threePt"><a:rot rev="1200000" lon="0" lat="0"/></a:lightRig></a:scene3d><a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d></a:effectStyle></a:effectStyleLst>'};_xlsx._generateBgFillScheme=function(){return'<a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs><a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs></a:gsLst><a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="200000"/></a:schemeClr></a:gs></a:gsLst><a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path></a:gradFill></a:bgFillStyleLst>'};_xlsx._generateCoreDoc=function(e){var t='<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">';e.creator?t+="<dc:creator>"+e.creator+"</dc:creator>":t+="<dc:creator/>";e.lastModifiedBy?t+="<cp:lastModifiedBy>"+e.lastModifiedBy+"</cp:lastModifiedBy>":t+="<cp:lastModifiedBy/>";return t+='<dcterms:created xsi:type="dcterms:W3CDTF">'+(e.created||new Date).toISOString()+'</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">'+(e.modified||new Date).toISOString()+"</dcterms:modified></cp:coreProperties>"};_xlsx._generateSheetGlobalSetting=function(e,t,o){var r=t.rows&&t.rows[0]&&t.rows[0].cells?t.rows[0].cells.length:0,l=' xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"';this._sheetHasNotes(e)&&(l+=' xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"');l+=' xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">';l+='<sheetPr><outlinePr summaryBelow="0"/></sheetPr>';l+='<dimension ref="A1'+(r>0?":"+this._numAlpha(r-1)+t.rows.length:"")+'"/>';l+='<sheetViews><sheetView workbookViewId="0"';e===o.activeWorksheet&&(l+=' tabSelected="1"');t.rightToLeft&&(l+=' rightToLeft="1"');var i=0,s=0;if(t.frozenPane){i=t.frozenPane.rows;s=t.frozenPane.columns}if(i||s){l+=">";l+='<pane state="frozen" activePane="'+(0!==i&&0!==s?"bottomRight":0!==i?"bottomLeft":"topRight")+'" topLeftCell="'+(this._numAlpha(s)+(i+1))+'" ySplit="'+i.toString()+'" xSplit="'+s.toString()+'"/>';l+="</sheetView>"}else l+="/>";l+="</sheetViews>";return l+='<sheetFormatPr defaultRowHeight="15" x14ac:dyDescent="0.25"/>'};_xlsx._generateCell=function(e,t,o,r,l,i){var s='<c r="'+this._numAlpha(t)+(e+1)+'" s="'+o.toString()+'"';r&&(s+=' t="'+r+'"');var n="";if(i){"="===i[0]&&(i=i.substring(1));i=i.replace(/\@\s*/gi,"[#This Row], ");n+="<f>"+Workbook._escapeXML(i)+"</f>"}null!=l&&""!==l&&(n+="<v>"+l+"</v>");return s+(n?">"+n+"</c>":"/>")};_xlsx._generateMergeSetting=function(e){for(var t='<mergeCells count="'+e.length.toString()+'">',o=0;o<e.length;o++)t+='<mergeCell ref="'+e[o].join(":")+'"/>';return t+"</mergeCells>"};_xlsx._generateStyleDoc=function(){var e='<styleSheet xmlns="'+this._workbookNS+'" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac">',t="",o="",r=[],l=0,i=0,s="",n="";n=this._generateFontStyle({},!0);var a="",h="";h+=this._generateFillStyle("none",null);h+=this._generateFillStyle("gray125",null);var f="",u="";u+=this._generateBorderStyle({});var c="",d="";d+=this._generateCellXfs(0,0,0,0,{});for(;l<this._styles.length;){var m=this._styles[l];if(m){var p=0;if((m=JSON.parse(m)).format&&"General"!==m.format&&(p=this._numFmts.indexOf(m.format))<0){var _=r.indexOf(m.format);if(-1===_){r.push(m.format);o+='<numFmt numFmtId="'+(p=164+i).toString()+'" formatCode="'+Workbook._escapeXML(m.format)+'"/>';i++}else p=164+_}var g=0;if(m.borders){var b=JSON.stringify(m.borders);if((g=this._borders.indexOf(b))<0){g=this._borders.push(b)-1;u+=this._generateBorderStyle(m.borders)}}var y=0;if(m.font){var x=JSON.stringify(m.font);if((y=this._fonts.indexOf(x))<0){y=this._fonts.push(x)-1;n+=this._generateFontStyle(m.font)}}var v=0;if(m.fill&&m.fill.color){var k=JSON.stringify(m.fill);if((v=this._fills.indexOf(k))<0){v=this._fills.push(k)-1;h+=this._generateFillStyle("solid",m.fill.color)}}d+=this._generateCellXfs(p,g,y,v,m)}l++}r=null;if(i>0){t='<numFmts count="'+i+'">';t+=o;t+="</numFmts>"}else t='<numFmts count="0"/>';e+=t;s='<fonts count="'+this._fonts.length+'" x14ac:knownFonts="1">';s+=n;e+=s+="</fonts>";a='<fills count="'+this._fills.length+'">';a+=h;e+=a+="</fills>";f='<borders count="'+this._borders.length+'">';f+=u;e+=f+="</borders>";e+='<cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>';c='<cellXfs count="'+this._styles.length+'">';c+=d;c+="</cellXfs>";var S="",w="";if(this._tableStyles.length>0){this._getDxfs();this._dxfs.length>0&&(S=this._generateDxfs());w=this._generateTableStyles()}return e+=c+'<cellStyles count="1"><cellStyle xfId="0" builtinId="0" name="Normal"/></cellStyles>'+(""===S?'<dxfs count="0"/>':S)+(""===w?'<tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleLight16"/>':w)+'<extLst><ext uri="{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}"><x14ac:slicerStyles defaultSlicerStyle="SlicerStyleLight1" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"/></ext></extLst></styleSheet>'};_xlsx._generateBorderStyle=function(e,t){void 0===t&&(t=!1);var o,r,l="<border>";for(var i in{left:0,right:0,top:0,bottom:0,diagonal:0,vertical:0,horizontal:0})if(t||"vertical"!==i&&"horizontal"!==i){if(e[i]){o="<"+i+' style="'+e[i].style+'">';"";6===(r=(r=e[i].color)?"#"===r[0]?r.substring(1):r:"").length&&(r="FF"+r);r||(r="FF000000");o+='<color rgb="'+r+'"/>';o+="</"+i+">"}else o="<"+i+"/>";l+=o}return l+="</border>"};_xlsx._generateFontStyle=function(e,t,o){void 0===t&&(t=!1);void 0===o&&(o=!1);var r=o?"<rPr>":"<font>";e.bold&&(r+="<b/>");e.italic&&(r+="<i/>");e.underline&&(r+="<u/>");r+='<sz val="'+(e.size?Math.round(72*e.size/96):this._defaultFontSize)+'"/>';e.color?r+='<color rgb="FF'+this._parseColor(e.color).substring(1)+'"/>':r+='<color theme="1"/>';r+="<"+(o?"rFont":"name")+' val="'+(e.family||this._defaultFontName)+'" />';r+='<family val="2"/>';t&&(r+='<scheme val="minor"/>');return r+=o?"</rPr>":"</font>"};_xlsx._generateFillStyle=function(e,t,o){void 0===o&&(o=!1);var r,l='<fill><patternFill patternType="'+e+'">';if(t){r=o?"<bgColor ":"<fgColor ";l+=r+='rgb="FF'+("#"===t[0]?t.substring(1):t)+'"/>'}return l+="</patternFill></fill>"};_xlsx._generateCellXfs=function(e,t,o,r,l){var i='<xf xfId="0" ';i+='numFmtId="'+e.toString()+'" ';e>0&&(i+='applyNumberFormat="1" ');i+='borderId="'+t.toString()+'" ';t>0&&(i+='applyBorder="1" ');i+='fontId="'+o.toString()+'" ';o>0&&(i+='applyFont="1" ');i+='fillId="'+r.toString()+'" ';r>0&&(i+='applyFill="1" ');l.quotePrefix&&(i+='quotePrefix="1" ');if(l.hAlign||l.vAlign||l.indent||l.wordWrap){i+='applyAlignment="1">';var s="<alignment ";l.hAlign&&(s+='horizontal="'+l.hAlign+'" ');l.vAlign&&(s+='vertical="'+l.vAlign+'" ');l.indent&&(s+='indent="'+l.indent+'" ');l.wordWrap&&(s+='wrapText="1"');i+=s+="/>";i+="</xf>"}else i+="/>";return i};_xlsx._generateContentTypesDoc=function(e){var t=this,o='<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">',r=e.sheets,l=r.reduce((function(e,o,r){return e||t._sheetHasNotes(r)}),this._sheetHasNotes(0));this._macroEnabled&&(o+='<Default ContentType="application/vnd.ms-office.vbaProject" Extension="bin"/>');l&&(o+='<Default Extension="vml" ContentType = "application/vnd.openxmlformats-officedocument.vmlDrawing" />');o+='<Default ContentType="application/vnd.openxmlformats-package.relationships+xml" Extension="rels"/><Default ContentType="application/xml" Extension="xml"/><Override ContentType="'+(this._macroEnabled?"application/vnd.ms-excel.sheet.macroEnabled.main+xml":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml")+'" PartName="/xl/workbook.xml"/>';for(var i=0;i<this._contentTypes.length;i++)o+=this._contentTypes[i];o+='<Override ContentType="application/vnd.openxmlformats-officedocument.theme+xml" PartName="/xl/theme/theme1.xml"/><Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" PartName="/xl/styles.xml"/><Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" PartName="/xl/sharedStrings.xml"/><Override ContentType="application/vnd.openxmlformats-package.core-properties+xml" PartName="/docProps/core.xml"/><Override ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" PartName="/docProps/app.xml"/>';if(l)for(i=0;i<r.length;i++)this._sheetHasNotes(i)&&(o+='<Override PartName="/xl/comments'+(i+1)+'.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"/>');for(i=0;i<this._tables.length;i++)o+='<Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml" PartName="/xl/tables/'+this._tables[i]+'"/>';return o+="</Types>"};_xlsx._generateAppDoc=function(e){for(var t='<Properties xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes" xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"><Application>'+(e.application||"wijmo.xlsx")+'</Application><DocSecurity>0</DocSecurity><ScaleCrop>false</ScaleCrop><HeadingPairs><vt:vector baseType="variant" size="2"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>'+this._props.length+'</vt:i4></vt:variant></vt:vector></HeadingPairs><TitlesOfParts><vt:vector baseType="lpstr" size="'+this._props.length+'">',o=0;o<this._props.length;o++)t+="<vt:lpstr>"+this._props[o]+"</vt:lpstr>";return t+="</vt:vector></TitlesOfParts><Manager/><Company>"+(e.company||"GrapeCity, Inc.")+"</Company><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>1.0</AppVersion></Properties>"};_xlsx._generateWorkbookRels=function(){for(var e='<Relationships xmlns="'+this._relationshipsNS+'">',t=0;t<this._xlRels.length;t++)e+=this._xlRels[t];e+='<Relationship Target="sharedStrings.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Id="rId'+(this._xlRels.length+1)+'"/><Relationship Target="styles.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Id="rId'+(this._xlRels.length+2)+'"/><Relationship Target="theme/theme1.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Id="rId'+(this._xlRels.length+3)+'"/>';this._macroEnabled&&(e+='<Relationship Target="vbaProject.bin" Type="http://schemas.microsoft.com/office/2006/relationships/vbaProject" Id="rId'+(this._xlRels.length+4)+'"/>');return e+="</Relationships>"};_xlsx._generateWorkbook=function(e){for(var t='<workbook xmlns="'+this._workbookNS+'" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><fileVersion rupBuild="9303" lowestEdited="5" lastEdited="5" appName="xl"/><workbookPr/><bookViews><workbookView xWindow="480" yWindow="60" windowWidth="18195" windowHeight="8505"'+(null!=e.activeWorksheet?' activeTab="'+e.activeWorksheet.toString()+'"':"")+"/></bookViews><sheets>",o=0;o<this._worksheets.length;o++)t+=this._worksheets[o];t+="</sheets>";if(e.definedNames&&e.definedNames.length>0){t+="<definedNames>";for(o=0;o<e.definedNames.length;o++){var r=-1;e.definedNames[o].sheetName&&(r=this._getSheetIndexBySheetName(e,e.definedNames[o].sheetName));t+='<definedName name="'+e.definedNames[o].name+'" '+(r>-1?'localSheetId="'+r+'"':"")+">"+e.definedNames[o].value+"</definedName>"}t+="</definedNames>"}return t+='<calcPr fullCalcOnLoad="1"/></workbook>'};_xlsx._generateWorksheetRows=function(e,t,o,r,l,i,s,n,a,h){for(var f,u=this,c=o.rows,_loop_2=function(m,p){if(s&&s.cancelled)return{value:void 0};if(n&&m-t>100&&Date.now()-e>100){setTimeout((function(){if(!s||!s.cancelled){a(Math.round((m+1)/c.length*100));u._generateWorksheetRows(Date.now(),m,o,r,l,i,s,n,a,h)}}),0);return{value:void 0}}var _=-1,g=c[m]&&c[m].cells?c[m].cells.length:0,b=null;i.sheetData+='<row x14ac:dyDescent="0.25" r="'+(m+1).toString()+'"';if(c[m]){c[m].height&&(i.sheetData+=' customHeight="1" ht="'+(72*+c[m].height/96).toString()+'"');c[m].groupLevel&&(i.sheetData+=' outlineLevel="'+c[m].groupLevel.toString()+'"');if(b=c[m].style?d._cloneStyle(c[m].style):null){(b=d._resolveStyleInheritance(b)).font&&b.font.color&&(b.font.color=d._parseColor(b.font.color));b.fill&&b.fill.color&&(b.fill.color=d._parseColor(b.fill.color));null==b.hAlign||isString(b.hAlign)||(b.hAlign=Workbook._parseHAlignToString(asEnum(b.hAlign,HAlign)));null==b.vAlign||isString(b.vAlign)||(b.vAlign=Workbook._parseVAlignToString(asEnum(b.vAlign,VAlign)));var y=JSON.stringify(b);(T=d._styles.indexOf(y))<0&&(T=d._styles.push(y)-1);i.sheetData+=' customFormat="1" s="'+T.toString()+'"'}}c[m]&&!1===c[m].visible&&(i.sheetData+=' hidden="1"');c[m]&&!0===c[m].collapsed&&(i.sheetData+=' collapsed="1"');i.sheetData+=">";for(;++_<g;){var x=c[m].cells[_];if(null!=x){var v="",k=-1,S=x?x.textRuns:null,w=x&&x.hasOwnProperty("value")?x.value:x,C=x&&x.style?d._cloneStyle(x.style):{};C=d._resolveStyleInheritance(C);var W=l[_];if(W){W=d._resolveStyleInheritance(W);C=d._extend(C,W)}b&&(C=d._extend(C,b));if(r){r=d._resolveStyleInheritance(r);C=d._extend(C,r)}null==C.hAlign||isString(C.hAlign)||(C.hAlign=Workbook._parseHAlignToString(asEnum(C.hAlign,HAlign)));null==C.vAlign||isString(C.vAlign)||(C.vAlign=Workbook._parseVAlignToString(asEnum(C.vAlign,VAlign)));C.font&&C.font.color&&(C.font.color=d._parseColor(C.font.color));C.fill&&C.fill.color&&(C.fill.color=d._parseColor(C.fill.color));d._applyDefaultBorder(C);if(C.borders){C.borders=d._extend({},C.borders);d._parseBorder(C.borders,!!C.fill&&!!C.fill.color)}if(x&&x.isDate&&!isDate(w)){f=new Date(w);isDate(f)&&(w=f)}!isNumber(w)||!isNaN(w)&&isFinite(w)||(w=w.toString());if(S||w&&isString(w)&&("@"===C.format||"General"===C.format||(+w).toString()!==w||!isFinite(+w))){d._sharedStrings[1]++;if("'"===(w=S?"{RichTextMark}"+JSON.stringify(S):w)[0]){C.quotePrefix=!0;w=w.substring(1)}(k=d._sharedStrings[0].indexOf(w))<0&&(k=d._sharedStrings[0].push(w)-1);w=k;v="s"}else if(isBoolean(w)){w=w?1:0;v="b"}else if(isDate(w)){w=d._convertDate(w);C.format=C.format||"mm-dd-yy"}else isObject(w)&&(w=null);var T;y=JSON.stringify(C);(T=d._styles.indexOf(y))<0&&(T=d._styles.push(y)-1);if(x&&(x.colSpan>1||x.rowSpan>1)){x.colSpan=x.colSpan||1;x.rowSpan=x.rowSpan||1;d._checkRangeForIntersections(i.merges,m,x.rowSpan,_,x.colSpan)&&i.merges.push([m,x.rowSpan,_,x.colSpan])}if(x&&x.link){null==i.hyperlinks&&(i.hyperlinks=[]);i.hyperlinks.push({ref:Workbook.xlsxAddress(m,_),value:w,href:x.link})}C=null;i.sheetData+=d._generateCell(m,_,T,v,w,x&&x.formula?x.formula:null)}}i.sheetData+="</row>"},d=this,m=t,p=c.length;m<p;m++){var _=_loop_2(m);if("object"==typeof _)return _.value}i.merges&&(i.merges=i.merges.map((function(e){var t=e[0],o=e[1],r=e[2],l=e[3];return[u._numAlpha(r)+(t+1),u._numAlpha(r+l-1)+(t+o)]})));isFunction(h)&&h()};_xlsx._generateWorkSheet=function(e,t,o,r,l,i){var s=this,n=t.sheets[e];if(!n)throw"Worksheet should not be empty!";i(0);this._collectNotes(n,e);var a=new _SyncPromise(r),h=n.columns,f=this._cloneColumnsStyle(h),u=n.style?this._cloneStyle(n.style):null,c='<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"'+this._generateSheetGlobalSetting(e,n,t),d={hyperlinks:[],merges:[],sheetData:"<sheetData>"};this._generateWorksheetRows(Date.now(),0,n,u,f,d,r,l,i,(function(){var t=e+1;d.sheetData+="</sheetData>";if(h&&h.length>0){c+="<cols>";for(var r=0;r<h.length;r++)c+=s._generateWorksheetColumn(f[r],h[r],r);var l=n._extraColumn;if(l){l.min=Math.max(h.length,l.min);l.min<=l.max&&(c+=s._generateWorksheetColumn(l.style,l,-1))}c+="</cols>"}d.sheetData=c+d.sheetData;c=d.sheetData;d.sheetData=null;d.merges.length>0&&(c+=s._generateMergeSetting(d.merges));var u=1,m=0;s._sheetHasNotes(e)&&(m=u++);var p=d.hyperlinks;if(p&&p.length>0){c+="<hyperlinks>";for(r=0;r<p.length;r++)if(/\'?(\w+)\'?\!\$?[A-Za-z]{1,2}\$?\d+(:\$?[A-Za-z]{1,2}\$?\d+)?/.test(p[r].href)||/^\$?[A-Za-z]{1,2}\$?\d+(:\$?[A-Za-z]{1,2}\$?\d+)?$/.test(p[r].href))c+='<hyperlink ref="'+p[r].ref+'" display="'+p[r].value+'" location="'+p[r].href+'"/>';else{null==n.externalLinks&&(n.externalLinks=[]);n.externalLinks.push(p[r].href);c+='<hyperlink ref="'+p[r].ref+'" r:id="rId'+u+'"/>';u++}c+="</hyperlinks>"}c+='<pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/>';if(n.tables&&n.tables.length>0){c+='<tableParts count="'+n.tables.length+'">';for(r=0;r<n.tables.length;r++){c+='<tablePart r:id="rId'+u+'"/>';u++}c+="</tableParts>"}m>0&&(c+='<legacyDrawing r:id="rId'+m+'"/>');c+="</worksheet>";o.file("sheet"+t+".xml",s._xmlDescription+c);c=null;var _='<Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" PartName="/xl/worksheets/sheet'+t+'.xml"/>';s._contentTypes.unshift(_);s._props.unshift(s._escape(n.name)||"Sheet"+t);var g='<Relationship Target="worksheets/sheet'+t+'.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Id="rId'+t+'"/>';s._xlRels.unshift(g);var b='<sheet r:id="rId'+t+'" sheetId="'+t+'" name="'+(s._escape(n.name)||"Sheet"+t)+'"'+(!1===n.visible?' state="hidden"':"")+"/>";s._worksheets.unshift(b);i(100);a.resolve()}));return a};_xlsx._generateWorksheetColumn=function(e,t,o){var r=-1,l="";if(!this._isEmpty(e)){(e=this._resolveStyleInheritance(e)).font&&e.font.color&&(e.font.color=this._parseColor(e.font.color));e.fill&&e.fill.color&&(e.fill.color=this._parseColor(e.fill.color));null==e.hAlign||isString(e.hAlign)||(e.hAlign=Workbook._parseHAlignToString(asEnum(e.hAlign,HAlign)));null==e.vAlign||isString(e.vAlign)||(e.vAlign=Workbook._parseVAlignToString(asEnum(e.vAlign,VAlign)));var i=JSON.stringify(e);(r=this._styles.indexOf(i))<0&&(r=this._styles.push(i)-1)}if(!this._isEmpty(t)){var s=t.width;s=null!=s?"string"==typeof s&&s.indexOf("ch")>-1?this._parseCharCountToCharWidth(s.substring(0,s.indexOf("ch"))):this._parsePixelToCharWidth(s):8.43;if(-1==o)l+='<col min="'+t.min+'" max="'+t.max+'"';else{var n=(o+1).toString();l+='<col min="'+n+'" max="'+n+'"'}r>=0&&(l+=' style="'+r.toString()+'"');s&&(l+=' width="'+s+'" customWidth="1"');!1!==t.autoWidth&&(l+=' bestFit="1"');!1===t.visible&&(l+=' hidden="1"');l+="/>"}return l};_xlsx._generateSharedStringsDoc=function(){for(var e='<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="'+this._sharedStrings[1]+'" uniqueCount="'+this._sharedStrings[0].length+'">',t=0;t<this._sharedStrings[0].length;t++){e+="<si>";var o=this._sharedStrings[0][t];if(o&&0===o.indexOf("{RichTextMark}"))try{var r=JSON.parse(o.substring(14));e+=this._generateTextRuns(r,this._defaultFontName.toLowerCase())+"</si>"}catch(t){e+=this._generatePlainText(o)+"</si>"}else e+=this._generatePlainText(o)+"</si>"}return e+"</sst>"};_xlsx._generateTextRuns=function(e,t){var o="";if(e&&e.length>0)for(var r=0;r<e.length;r++){o+="<r>";var l=e[r];if(l.font){var i=!l.font.family||l.font.family.toLowerCase()===t;o+=this._generateFontStyle(l.font,i,!0)}o+=this._generatePlainText(l.text);o+="</r>"}return o};_xlsx._generatePlainText=function(e){if(""===e)return"<t/>";var t="<t";(isNullOrWhiteSpace(e)||/^\s+\w*|\w*\s+$/.test(e))&&(t+=' xml:space="preserve"');return t+=">"+this._escape(e)+"</t>"};_xlsx._generateTable=function(e,t){var o=this._tables.length+1,r="table"+o+".xml";e.fileName=r;this._tables.push(r);var l='<table ref="'+e.range+'" displayName="'+e.name+'" name="'+e.name+'" id="'+o+'" '+(!1===e.showHeaderRow?'headerRowCount="0" ':"")+(!0===e.showTotalRow?'totalsRowCount="1" ':'totalsRowShown="0" ')+' xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';!1!==e.showHeaderRow&&(l+=this._generateTableFilterSetting(e.range,e.showTotalRow,e.columns));l+='<tableColumns count="'+e.columns.length+'">';for(var i="",s=0;s<e.columns.length;s++){var n=e.columns[s];i+='<tableColumn name="'+n.name+'" id="'+(s+1)+'" ';n.totalRowFunction?this._tableColumnFunctions.indexOf(n.totalRowFunction)>-1?i+='totalsRowFunction="'+n.totalRowFunction+'"/>':i+='totalsRowFunction="custom"><totalsRowFormula>'+n.totalRowFunction+"</totalsRowFormula></tableColumn>":i+=(n.totalRowLabel?'totalsRowLabel="'+n.totalRowLabel+'"':"")+"/>"}l+=i+"</tableColumns>";l+='<tableStyleInfo name="'+e.style.name+'" showColumnStripes="'+(e.showBandedColumns?"1":"0")+'" showRowStripes="'+(e.showBandedRows?"1":"0")+'" showLastColumn="'+(e.alterLastColumn?"1":"0")+'" showFirstColumn="'+(e.alterFirstColumn?"1":"0")+'"/></table>';if(!this._isBuiltInStyleName(e.style.name)){var a=JSON.stringify(e.style);-1===this._tableStyles.indexOf(a)&&this._tableStyles.push(a)}t.file(r,this._xmlDescription+l);l=null};_xlsx._generateTableFilterSetting=function(e,t,o){var r=e;if(t){var l=r.indexOf(":")+1,i=Workbook.tableAddress(r.substring(r.indexOf(":")+1));i.row-=1;r=r.substring(0,l)+Workbook.xlsxAddress(i.row,i.col)}for(var s='<autoFilter ref="'+r+'"',n="",a=0;a<o.length;a++)!1===o[a].showFilterButton&&(n+='<filterColumn hiddenButton="1" colId="'+a+'"/>');return s+=""===n?"/>":">"+n+"</autoFilter>"};_xlsx._generateHyperlinkRel=function(e,t){for(var o="",r=0;r<e.length;r++)o+='<Relationship TargetMode="External" Target="'+e[r]+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Id="rId'+(t+r)+'"/>';return o};_xlsx._getDxfs=function(){for(var e,t=this,o=0;o<this._tableStyles.length;o++){e=JSON.parse(this._tableStyles[o]);Object.keys(e).forEach((function(o){var r,l,i=e[o];if(i&&!isString(i)&&!t._isEmptyStyleEle(i)){r=JSON.stringify(i);if(-1===(l=t._dxfs.indexOf(r))){l=t._dxfs.push(r)-1;i.styleIndex=l}}}));this._tableStyles[o]=e}};_xlsx._generateDxfs=function(){for(var e,t='<dxfs count="'+this._dxfs.length+'">',o=0;o<this._dxfs.length;o++){t+="<dxf>";(e=JSON.parse(this._dxfs[o])).font&&(t+=this._generateFontStyle(e.font));e.fill&&e.fill.color&&(t+=this._generateFillStyle("solid",e.fill.color,!0));if(e.borders&&!this._isEmpty(e.borders)){e.borders=this._extend({},e.borders);this._parseBorder(e.borders,!1);t+=this._generateBorderStyle(e.borders,!0)}t+="</dxf>"}return t+="</dxfs>"};_xlsx._generateTableStyles=function(){for(var e,t,o,r,l,i,s='<tableStyles count="'+this._tableStyles.length+'" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleLight16">',n=0;n<this._tableStyles.length;n++){e=this._tableStyles[n];t=Object.keys(e);l="";i=0;for(var a=0;a<t.length;a++){r=e[o=t[a]];if(!isString(r)){i++;l+="<tableStyleElement";null!=r.styleIndex&&(l+=' dxfId="'+r.styleIndex+'"');switch(o){case"firstBandedColumnStyle":l+=' type="firstColumnStripe"';null!=r.size&&(l+=' size="'+r.size+'"');break;case"secondBandedColumnStyle":l+=' type="secondColumnStripe"';null!=r.size&&(l+=' size="'+r.size+'"');break;case"firstBandedRowStyle":l+=' type="firstRowStripe"';null!=r.size&&(l+=' size="'+r.size+'"');break;case"secondBandedRowStyle":l+=' type="secondRowStripe"';null!=r.size&&(l+=' size="'+r.size+'"');break;default:l+=' type="'+o.substring(0,o.length-5)+'"'}l+="/>"}}if(i>0){s+='<tableStyle count="'+i+'" name="'+e.name+'" pivot="0">';s+=l+"</tableStyle>"}}return s+="</tableStyles>"};_xlsx._isEmptyStyleEle=function(e){return this._isEmpty(e.borders)&&(this._isEmpty(e.fill)||isNullOrWhiteSpace(e.fill.color))&&(this._isEmpty(e.font)||!0!==e.font.bold&&isNullOrWhiteSpace(e.font.color)&&isNullOrWhiteSpace(e.font.family)&&!0!==e.font.italic&&null==e.font.size&&!0!==e.font.underline)};_xlsx._getTableFileName=function(e,t){for(var o="",r=0;r<e.length;r++){var l=e[r];if(l.name===t){o=l.fileName;break}}return o};_xlsx._getColor=function(e,t){var o,r=-1,l=-1,i=-1;if(t&&-1===(r=e.search(/<fgcolor/i))&&-1===(l=e.search(/<bgcolor/i))||!t&&-1===(i=e.search(/<color/i)))return null;if(t){var s=r>=0?r:l,n=s>=0?e.search(/<\/fgc/i):e.indexOf(/<\/bgc/i);n=n>0?n:e.indexOf("/>");e=e.substring(s,n)}else e=e.substring(i);if(-1!==e.indexOf("rgb="))(o=this._getAttr(e,"rgb"))&&8===o.length&&(o=o.substring(2));else if(-1!==e.indexOf("indexed")){var a=+this._getAttr(e,"indexed");o=this._indexedColors[a]||""}else if(-1!==e.indexOf("auto")&&"1"===this._getAttr(e,"auto"))o="#000000";else{var h,f=+this._getAttr(e,"theme");-1!==e.indexOf("tint")&&(h=+this._getAttr(e,"tint"));o=this._getThemeColor(f,h)}return o&&"#"===o[0]?o:"#"+o};_xlsx._getThemeColor=function(e,t){if(!this._colorThemes)return"#000000";var o=this._colorThemes[e];if(null!=t){var r=new Color("#"+o),l=r.getHsl();l[2]=t<0?l[2]*(1+t):l[2]*(1-t)+(1-1*(1-t));return(r=Color.fromHsl(l[0],l[1],l[2])).toString().substring(1)}return o};_xlsx._parseColor=function(e){var t=this._parsedColors[e];if(!t){var o=new Color(e);o.a<1&&(o=Color.toOpaque(o));this._parsedColors[e]=t=o.toString()}return t};_xlsx._getsBaseSharedFormulas=function(e){var t,o,r,l=e.match(/\<f[^<]*ref[^<]*>[^<]+(?=\<\/f>)/g);this._sharedFormulas=[];if(l&&l.length>0)for(var i=0;i<l.length;i++){t=l[i];o=this._getAttr(t,"si");r=(r=this._getAttr(t,"ref"))?r.substring(0,r.indexOf(":")):"";t=t.replace(/(\<f.*>)(.+)/,"$2");this._sharedFormulas[+o]=this._parseSharedFormulaInfo(r,t)}};_xlsx._parseSharedFormulaInfo=function(e,t){var o,r,l,i,s,n=t.match(/(\'?\w+\'?\!)?(\$?[A-Za-z]+)(\$?\d+)/g);i=Workbook.tableAddress(e);if(n&&n.length>0){s=[];for(var a=0;a<n.length;a++){o=n[a];t=t.replace(o,"{"+a+"}");if((r=o.indexOf("!"))>0){l=o.substring(0,r);o=o.substring(r+1)}s[a]={cellAddress:Workbook.tableAddress(o),sheetRef:l}}}return{cellRef:i,formula:t,formulaRefs:s}};_xlsx._getSharedFormula=function(e,t){var o,r,l,i,s,n,a,h,f,u,c,d;if(this._sharedFormulas&&this._sharedFormulas.length>0&&(o=this._sharedFormulas[+e])){f=o.formula;if((u=o.formulaRefs)&&u.length>0){r=Workbook.tableAddress(t);a=o.cellRef?o.cellRef.row:0;h=o.cellRef?o.cellRef.col:0;l=r.row-a;i=r.col-h;for(var m=0;m<u.length;m++){s=(c=u[m]).cellAddress.row+(c.cellAddress.absRow?0:l);n=c.cellAddress.col+(c.cellAddress.absCol?0:i);d=Workbook.xlsxAddress(s,n,c.cellAddress.absRow,c.cellAddress.absCol);null!=c.sheetRef&&""!==c.sheetRef&&(d=c.sheetRef+"!"+d);f=f.replace("{"+m+"}",d)}}return f}return""};_xlsx._convertDate=function(e){var t,o,r=new Date(1900,0,0),l=Date.UTC(1900,0,0),i="[object Date]"===Object.prototype.toString.call(e),s=6e4*((i?e.getTimezoneOffset():(new Date).getTimezoneOffset())-r.getTimezoneOffset()),n=r.getTime()-l-6e4*r.getTimezoneOffset();if(i)return(e.getTime()-r.getTime()-s+n)/864e5+1;if(isNumber(e)){t=e>59?1:0;return 0!==(s=6e4*((o=new Date(1e3*Math.round((+r+864e5*(e-t))/1e3))).getTimezoneOffset()-r.getTimezoneOffset()))?new Date(1e3*Math.round((+r+s-n+864e5*(e-t))/1e3)):o}return null};_xlsx._parseBorder=function(e,t){for(var o in{left:0,right:0,top:0,bottom:0,diagonal:0}){var r=e[o];if(r){isString(r.color)&&(r.color=this._parseColor(r.color));null==r.style||isString(r.style)||(r.style=Workbook._parseBorderTypeToString(asEnum(r.style,BorderStyle,!1)));!t&&r.color&&"#c6c6c6"===r.color.toLowerCase()&&"thin"===r.style&&(e[o]=null)}}};_xlsx._applyDefaultBorder=function(e){if(e.fill&&e.fill.color){null==e.borders&&(e.borders={});for(var t in{left:0,right:0,top:0,bottom:0})null==e.borders[t]&&(e.borders[t]={style:BorderStyle.Thin,color:"#C6C6C6"})}};_xlsx._resolveStyleInheritance=function(e){var t;if(!e.basedOn)return e;for(var o in e.basedOn)if("basedOn"===o){t=this._resolveStyleInheritance(e.basedOn);for(o in t){var r=t[o];e[o]=null==e[o]?r:this._extend(e[o],r)}}else{r=e.basedOn[o];e[o]=null==e[o]?r:this._extend(e[o],r)}delete e.basedOn;return e};_xlsx._parsePixelToCharWidth=function(e){return null==e||isNaN(+e)?null:e<5?0:((+e-5)/7*100+.5)/100};_xlsx._parseCharWidthToPixel=function(e){return null==e||isNaN(+e)?null:Math.floor((256*+e+128/7)/256*7)+5};_xlsx._parseCharCountToCharWidth=function(e){return null==e||isNaN(+e)?null:(7*+e+5)/7*256/256};_xlsx._numAlpha=function(e){for(var t="",o=this._alphabet;e>=0;){t=o[e%26]+t;e=Math.floor(e/26)-1}return t};_xlsx._alphaNum=function(e){for(var t=0,o=e.length,r=this._alphabetMap,l=0;l<o-1;l++)t+=(r[e[l]]+1)*Math.pow(26,o-(l+1));return t+=r[e[o-1]]};_xlsx._typeOf=function(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()};_xlsx._extend=function(e,t){if(isObject(e)&&isObject(t)){for(var o in t){var r=t[o];isObject(r)&&null!=e[o]?this._extend(e[o],r):null!=r&&null==e[o]&&(e[o]=r)}return e}return t};_xlsx._isEmpty=function(e){var t=Object.prototype.hasOwnProperty;if(null==e)return!0;if(e.length>0)return!1;if(0===e.length)return!0;for(var o in e)if(t.call(e,o))return!1;return!0};_xlsx._cloneStyle=function(e){var t;if(null==e||"object"!=typeof e)return e;t={};for(var o in e)e.hasOwnProperty(o)&&(t[o]=this._cloneStyle(e[o]));return t};_xlsx._cloneColumnsStyle=function(e){for(var t,o=[],r=0;r<e.length;r++)(t=e[r])&&t.style&&(o[r]=this._cloneStyle(t.style));return o};_xlsx._getSheetIndex=function(e){return+(e=e.substring(0,e.lastIndexOf(".xml"))).substring(e.lastIndexOf("sheet")+5)};_xlsx._checkRangeForIntersections=function(e,t,o,r,l){for(var i=0;i<e.length;i++){var s=e[i],n=s[0],a=n+s[1]-1,h=s[2],f=h+s[3]-1;if(!(t>a||t+o-1<n||r>f||r+l-1<h))return!1}return!0};_xlsx._getAttr=function(e,t){var o=e.indexOf(t+'="');if(o>=0){o+=t.length+2;return e.substring(o,e.indexOf('"',o))}return""};_xlsx._getChildNodeValue=function(e,t){var o=e.indexOf(t+' val="');if(o>=0){o+=t.length+6;return e.substring(o,e.indexOf('"',o))}return""};_xlsx._getElementValue=function(e,t,o,r){var l=e.indexOf("<"+t);if(l>=0){var i=void 0;(l=e.indexOf(">",l+1+t.length))>0&&"/"!==e[l-1]&&(i=e.substring(l+1,e.indexOf("</",l+1)));return i||r}return o};_xlsx._getSubElement=function(e,t){if(e){var o=e.indexOf("<"+t);if(o>=0){var r=o+1+t.length,l=e.indexOf("</"+t,r);l<0&&(l=e.indexOf("/>",r));return e.substring(r,l)}}};_xlsx._getSheetIndexBySheetName=function(e,t){for(var o=0;o<e.sheets.length;o++)if(e.sheets[o].name===t)return o;return-1};_xlsx._sheetHasNotes=function(e){return!!this._notes[e]};_xlsx._collectNotes=function(e,t){for(var o,r=e.rows,l=0,i=r.length;l<i;l++){var s=r[l];if(s)for(var n=0,a=s.cells.length;n<a;n++){var h=s.cells[n];if(h){var f=h.note;if(f&&(null!=f.text||f.textRuns&&f.textRuns.length>0)){o||(o=this._notes[t])||(this._notes[t]=o=[]);f._row=l;f._col=n;o.push(f)}}}}};_xlsx._alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ";_xlsx._alphabetMap="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").reduce((function(e,t,o){return e[t]=o,e}),{});_xlsx._indexedColors=["000000","FFFFFF","FF0000","00FF00","0000FF","FFFF00","FF00FF","00FFFF","000000","FFFFFF","FF0000","00FF00","0000FF","FFFF00","FF00FF","00FFFF","800000","008000","000080","808000","800080","008080","C0C0C0","808080","9999FF","993366","FFFFCC","CCFFFF","660066","FF8080","0066CC","CCCCFF","000080","FF00FF","FFFF00","00FFFF","800080","800000","008080","0000FF","00CCFF","CCFFFF","CCFFCC","FFFF99","99CCFF","FF99CC","CC99FF","FFCC99","3366FF","33CCCC","99CC00","FFCC00","FF9900","FF6600","666699","969696","003366","339966","003300","333300","993300","993366","333399","333333","000000","FFFFFF"];_xlsx._numFmts=["General","0","0.00","#,##0","#,##0.00",,,"$#,##0.00_);($#,##0.00)",,"0%","0.00%","0.00E+00","# ?/?","# ??/??","m/d/yyyy","d-mmm-yy","d-mmm","mmm-yy","h:mm AM/PM","h:mm:ss AM/PM","h:mm","h:mm:ss","m/d/yy h:mm",,,,,,,,,,,,,,,"#,##0 ;(#,##0)","#,##0 ;[Red](#,##0)","#,##0.00;(#,##0.00)","#,##0.00;[Red](#,##0.00)",,,,,"mm:ss","[h]:mm:ss","mmss.0","##0.0E+0","@"];_xlsx._tableColumnFunctions="average, count, countNums, max, min, stdDev, sum, var";_xlsx._xmlDescription='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';_xlsx._workbookNS="http://schemas.openxmlformats.org/spreadsheetml/2006/main";_xlsx._relationshipsNS="http://schemas.openxmlformats.org/package/2006/relationships";_xlsx._defaultFontName="Calibri";_xlsx._defaultFontSize=11;_xlsx._macroEnabled=!1;_xlsx._defaultColorThemes=["FFFFFF","000000","EEECE1","1F497D","4F818D","C0504D","9BBB59","8064A2","4BACC6","F79646"];_xlsx._asciiCtrlReplacements=["_x0000_","_x0001_","_x0002_","_x0003_","_x0004_","_x0005_","_x0006_","_x0007_","_x0008_","\t","\n","_x000B_","_x000C_","\r","_x000E_","_x000F_","_x0010_","_x0011_","_x0012_","_x0013_","_x0014_","_x0015_","_x0016_","_x0017_","_x0018_","_x0019_","_x001A_","_x001B_","_x001C_","_x001D_","_x001E_","_x001F_"];_xlsx._parsedColors={};return _xlsx}();export{_xlsx};var _JSZipSyncPromise=function(){function _JSZipSyncPromise(e){this.value=e}_JSZipSyncPromise.prototype.then=function(e,t){return new _JSZipSyncPromise(e?e(this.value):null)};_JSZipSyncPromise.prototype.catch=function(e){return this.then(null,e)};_JSZipSyncPromise.resolve=function(){return new _JSZipSyncPromise};return _JSZipSyncPromise}(),_JsZipWrapper=function(){function _JsZipWrapper(e){this._obj=e}_JsZipWrapper.prototype.loadAsync=function(){for(var e,t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];var r=(e=this._obj).load.apply(e,t);return new _JSZipSyncPromise(this._wrapOrNull(r))};_JsZipWrapper.prototype.file=function(){for(var e,t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];var r=(e=this._obj).file.apply(e,t);return this._wrapOrNull(r)};Object.defineProperty(_JsZipWrapper.prototype,"name",{get:function(){return this._obj.name},enumerable:!0,configurable:!0});_JsZipWrapper.prototype.async=function(){for(var e,t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];e=t&&t.length>0&&"uint8array"===t[0].toLowerCase()?this._obj.asUint8Array():this._obj.asText();return new _JSZipSyncPromise(e)};_JsZipWrapper.prototype.folder=function(e){var t=this._obj.folder(e);return this._wrapOrNull(t)};_JsZipWrapper.prototype.forEach=function(e){var t=this._obj.root,o=t.length,r=this._obj.files;for(var l in r)l.length>o&&l.substr(0,o).toLowerCase()===t&&e(l.substr(o),new _JsZipWrapper(r[l]))};_JsZipWrapper.prototype._wrapOrNull=function(e){return null!=e?new _JsZipWrapper(e):null};return _JsZipWrapper}(),_SyncPromise=function(){function _SyncPromise(e,t){this._callbacks=[];this._cs=e;this._onCancel=t}_SyncPromise.serial=function(e,t){t=t.slice();var o=new _SyncPromise(e),r=[],drain=function(){o.cancelled?t=[]:t.length?t.shift()().then((function(e){r.push(e);drain()}),(function(e){t=[];o.reject(e)})):o.resolve(r)};drain();return o};_SyncPromise.prototype.cancel=function(e){void 0===e&&(e=!0);this._cancelled=!0;e&&this._onCancel&&this._onCancel()};Object.defineProperty(_SyncPromise.prototype,"cancelled",{get:function(){return this._cancelled||this._cs&&this._cs.cancelled},enumerable:!0,configurable:!0});_SyncPromise.prototype.then=function(e,t){this._callbacks.push({onFulfilled:e,onRejected:t});this._resolved&&this.resolve(this._resolved.value);return this};_SyncPromise.prototype.catch=function(e){return this.then(null,e)};_SyncPromise.prototype.resolve=function(e){if(this.cancelled)return this;this._resolved={value:e};try{this.onFulfilled(e)}catch(e){this.onRejected(e)}return this};_SyncPromise.prototype.reject=function(e){if(this.cancelled)return this;this.onRejected(e);return this};_SyncPromise.prototype.onFulfilled=function(e){for(;this._callbacks.length;){var t=this._callbacks[0];t.onFulfilled&&t.onFulfilled(e);this._callbacks.shift()}};_SyncPromise.prototype.onRejected=function(e){for(var t;t=this._callbacks.shift();)t.onRejected&&t.onRejected(e)};return _SyncPromise}();export{_SyncPromise};var _NotePositionConverter=function(){function _NotePositionConverter(e){this._colsWidthCnt=0;this._colsWidth=[];this._rowsHeightCnt=0;this._rowsHeight=[];this._cols=e.columns;this._rows=e.rows}_NotePositionConverter.prototype.toAnchor=function(e,t,o){var r,l,i,s,n,a,h,f,u=e.offsetX,c=e.offsetY;if(u<0){var d=void 0;for(r=o,l=-u;r>=0&&!(l<=(d=this._getColWidth(r)));r--)l-=d;l=d-l}else for(r=o+1,l=u;l>=0;r++){if(l<=(d=this._getColWidth(r)))break;l-=d}if(c<0)for(i=t-1,s=-c;i>=0;i--){if(s<=(m=this._getRowHeight(i)))break;s-=m}else for(i=t,s=c;s>=0;i++){var m;if(s<=(m=this._getRowHeight(i)))break;s-=m}for(n=r,a=l+e.width;a>=0;n++){if(a<=(d=this._getColWidth(n)))break;a-=d}for(h=i,f=s+e.height;f>=0;h++){var p=this._getRowHeight(h);if(f<=p)break;f-=p}return[r,l,i,s,n,a,h,f]};_NotePositionConverter.prototype.fromAnchor=function(e,t,o,r){var l=e[0],i=e[1],s=e[2],n=e[3],a=e[4],h=e[5],f=e[6],u=e[7],c=0;if(r===l)c=-(this._getColWidth(r)-i);else if(l>r){c+=i;for(var d=r+1,m=l-1;d<=m;d++)c+=this._getColWidth(d)}else{for(d=l+1,m=r;d<=m;d++)c-=this._getColWidth(d);c-=this._getColWidth(l)-i}var p=0;if(o===s)p=n;else if(s>o){for(var _=o,g=s-1;_<=g;_++)p+=this._getRowHeight(_);p+=n}else{var b=s+1;for(g=o;b<g;b++)p-=this._getRowHeight(b);p-=this._getRowHeight(s)-n}var y=0;if(l===a)y=h-i;else{for(d=l+1,m=a-1;d<=m;d++)y+=this._getColWidth(d);y+=this._getColWidth(l)-i;y+=h}var x=0;if(s===f)x=u-n;else{var v=s+1;for(g=f-1;v<=g;v++)x+=this._getRowHeight(v);x+=this._getRowHeight(s)-n;x+=u}t.offsetX=c;t.offsetY=p;t.width=y;t.height=x};_NotePositionConverter.prototype._getColWidth=function(e){var t=this._colsWidth[e];if(null==t){if(this._colsWidthCnt>1e3){this._colsWidth=[];this._colsWidthCnt=0}var o=this._cols[e];t=!o||null==o.visible||o.visible?o&&null!=o.width?Math.max(o.width-5,0):64:0;this._colsWidth[e]=t;this._colsWidthCnt++}return t};_NotePositionConverter.prototype._getRowHeight=function(e){var t=this._rowsHeight[e];if(null==t){if(this._rowsHeightCnt>1e3){this._rowsHeight=[];this._rowsHeightCnt=0}var o=this._rows[e];t=!o||null==o.visible||o.visible?o&&null!=o.height?o.height:20:0;this._rowsHeight[e]=t;this._rowsHeightCnt++}return t};return _NotePositionConverter}();export function _map(e,t,o,r,l){var i=o-t;0==i&&(i=1);return(e-t)*((l-r)/i)+r}var fromCodePointImpl=String.fromCodePoint||function(e){if(e<=65535)return String.fromCharCode(e);e-=65536;return String.fromCharCode(55296+(e>>10),e%1024+56320)},_uid=0;function _guid(){_uid>4294967295&&(_uid=0);var e=(65535&_uid|65536).toString(16).substr(1),t=(_uid>>16&65535|65536).toString(16).substr(1);_uid++;return"{00000000-0000-0000-0000"+t+e+"}"}_registerModule("wijmo.xlsx",selfModule);