/*
    *
    * Wijmo Library 5.20181.436
    * http://wijmo.com/
    *
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    *
    * Licensed under the GrapeCity Commercial License.
    * sales@wijmo.com
    * wijmo.com/products/wijmo-5/license/
    *
    */
"use strict";function useJSZip(e){JSZip=e}var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function l(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(l.prototype=r.prototype,new l)}}();Object.defineProperty(exports,"__esModule",{value:!0});var wjcCore=require("wijmo/wijmo"),wjcSelfRef=require("wijmo/wijmo.xlsx"),wjcSelf=wjcSelfRef||exports;window.wijmo=window.wijmo||{},window.wijmo.xlsx=wjcSelf;var JSZip=window.JSZip;void 0!==JSZip&&JSZip||"function"!=typeof window.require||(JSZip=window.require("node-zip")),exports.useJSZip=useJSZip;var _xlsx=function(){function e(){}return e.load=function(e){var t=new JSZip;wjcCore.assert(null==t.loadAsync,"Please use JSZip 2.5 to load excel files synchronously.");var r,l=new _JsZipWrapper(t);return this._loadImpl(l,e).then(function(e){return r=e}),r},e.loadAsync=function(e){var t=new JSZip;return wjcCore.assert(null!=t.loadAsync,"Please use JSZip 3.0 to load excel files asynchrounously."),this._loadImpl(t,e)},e.save=function(e){var t=Date.now(),r=this._saveWorkbookToZip(e);t=Date.now()-t;var l="";l=this._macroEnabled?"application/vnd.ms-excel.sheet.macroEnabled.12;":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;";var o=Date.now(),s=r.generate({compression:"DEFLATE"});return{base64:s,zipTime:Date.now()-o,processTime:t,href:function(){return"data:"+l+"base64,"+s}}},e.saveAsync=function(e,t){var r=this._saveWorkbookToZip(e,!0).generateAsync({type:"base64",compression:"DEFLATE"});return t&&r.catch(t),r},e._loadImpl=function(e,t){var r,l=this,o=Date.now(),s={sheets:[]},i=e.loadAsync(t,{base64:!0}).then(function(e){return r=e});t=null;var n=i.constructor;return i=i.then(function(){var e=r.file("xl/theme/theme1.xml");if(e)return e.async("string").then(function(e){l._getTheme(e),s.colorThemes=l._colorThemes}).then(function(){var e=n.resolve();return e=l._getZipStyle(r,e,s),e=l._getZipSharedString(r,e,s)});var t=n.resolve();return t=l._getZipStyle(r,t,s),t=l._getZipSharedString(r,t,s)}),i=i.then(function(){var e=r.file("xl/workbook.xml");if(e)return e.async("string").then(function(e){l._getWorkbook(e,s)})}),i=i.then(function(){l._tables=null;var e=n.resolve();return r.folder("xl/tables").forEach(function(t,r){null==l._tables&&(l._tables=[]),e=e.then(function(){return r.async("string").then(function(e){var t=l._getTable(e);t.fileName=r.name.substring(r.name.lastIndexOf("/")+1),l._tables.push(t)})})}),e}),i=i.then(function(){var e=r.file("docProps/core.xml");if(e)return e.async("string").then(function(e){l._getCoreSetting(e,s)})}),i=i.then(function(){var e=r.file("xl/vbaProject.bin");if(e)return e.async("uint8array").then(function(e){null==s.reservedContent&&(s.reservedContent={}),s.reservedContent.macros=e})}),(i=i.then(function(){var e=n.resolve();return r.folder("xl/worksheets").forEach(function(t,o){if(t&&-1===t.indexOf("/")){var i=l._getSheetIndex(o.name);e=e.then(function(){return o.async("string").then(function(e){if(l._getSheet(e,i-1,s),null!=s.sheets[i-1].tableRIds||null!=s.sheets[i-1].hyperlinkRIds){var t=r.file("xl/worksheets/_rels/sheet"+i+".xml.rels");if(t)return t.async("string").then(function(e){for(var t=e.split("<Relationship "),r=t.length;--r;){var o=t[r],n=l._getAttr(o,"Id");s.sheets[i-1].tableRIds&&-1!==s.sheets[i-1].tableRIds.indexOf(n)?(null==s.sheets[i-1].tables&&(s.sheets[i-1].tables=[]),s.sheets[i-1].tables.push(l._getSheetRelatedTable(o))):s.sheets[i-1].hyperlinkRIds&&l._getSheetRelatedHyperlink(o,n,s.sheets[i-1])}})}})})}}),e})).then(function(){return s.processTime=Date.now()-o,r=null,s})},e._getZipStyle=function(e,t,r){var l=this,o=e.file("xl/styles.xml");return o&&(t=t.then(function(){return o.async("string").then(function(e){l._getStyle(e),r.styles=l._styles,null!=l._tableStyles&&(r.tableStyles=l._tableStyles)})})),t},e._getZipSharedString=function(e,t,r){var l=this,o=e.file("xl/sharedStrings.xml");return o&&t.then(function(){return o.async("string").then(function(e){l._getSharedString(e)})}),t},e._saveWorkbookToZip=function(e,t){void 0===t&&(t=!1);Date.now();var r=new JSZip;t?wjcCore.assert(null!=r.generateAsync,"Please use JSZip 3.0 to save excel files asynchrounously."):wjcCore.assert(null==r.generateAsync,"Please use JSZip 2.5 to save excel files synchronously."),r.folder("_rels").file(".rels",this._xmlDescription+this._generateRelsDoc());var l=r.folder("docProps"),o=r.folder("xl");this._colorThemes=e.colorThemes,o.folder("theme").file("theme1.xml",this._xmlDescription+this._generateThemeDoc()),this._macroEnabled=!(!e.reservedContent||!e.reservedContent.macros),this._macroEnabled&&o.file("vbaProject.bin",e.reservedContent.macros);var s=o.folder("worksheets");l.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=[];for(var i,n=e.sheets.length;n--;)if(this._generateWorkSheet(n,e,s),e.sheets[n]&&(e.sheets[n].tables&&e.sheets[n].tables.length>0||e.sheets[n].externalLinks&&e.sheets[n].externalLinks.length>0)){var a=0,h='<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">';if(e.sheets[n].externalLinks&&e.sheets[n].externalLinks.length>0&&(h+=this._generateHyperlinkRel(e.sheets[n].externalLinks),a=e.sheets[n].externalLinks.length),e.sheets[n].tables&&e.sheets[n].tables.length>0){null==i&&(i=o.folder("tables"));for(var c=0;c<e.sheets[n].tables.length;c++){var u=e.sheets[n].tables[c];this._generateTable(u,i),h+='<Relationship Target="../tables/'+u.fileName+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/table" Id="rId'+(c+1+a)+'"/>'}}h+="</Relationships>",s.folder("_rels").file("sheet"+(n+1)+".xml.rels",this._xmlDescription+h)}o.file("styles.xml",this._xmlDescription+this._generateStyleDoc()),r.file("[Content_Types].xml",this._xmlDescription+this._generateContentTypesDoc()),l.file("app.xml",this._xmlDescription+this._generateAppDoc(e)),o.folder("_rels").file("workbook.xml.rels",this._xmlDescription+this._generateWorkbookRels());var f=this._xmlDescription+this._generateSharedStringsDoc();return this._sharedStrings=[[],0],o.file("sharedStrings.xml",f),f=null,o.file("workbook.xml",this._xmlDescription+this._generateWorkbook(e)),r},e._getSharedString=function(e){var t,r,l,o,s,i,n,a=e.split(/<si.*?>/g),h=a.length;for(this._sharedStrings=[];--h;)for(t=1,o=!1,a[h].search(/<r>/gi)>-1?(o=!0,r=a[h].split(/<r>/g)):(a[h]=a[h].substring(0,a[h].indexOf("</t>")),r=a[h].split(/<t.*?>/g));t<r.length;)i=null,o?(-1!==r[t].indexOf("<rPr>")&&(i=this._getTextRunFont(r[t])),(l=r[t].match(/(<t.*?>)(.*)/))&&3===l.length&&null!=l[2]&&(n=l[2].substring(0,l[2].indexOf("</t>"))),s={font:i,text:Workbook._unescapeXML(n)},null==this._sharedStrings[h-1]?this._sharedStrings[h-1]=[s]:this._sharedStrings[h-1].push(s)):this._sharedStrings[h-1]=Workbook._unescapeXML(r[t]),t++},e._getInlineString=function(e){for(var t=e.split("<t>"),r=t.length,l="";--r;)l+=t[r].substring(0,t[r].indexOf("</t>"));return l},e._getCoreSetting=function(e,t){var r,l;(l=e.indexOf("<dc:creator>"))>=0&&(r=e.substr(l+12),t.creator=r.substring(0,r.indexOf("</dc:creator>"))),(l=e.indexOf("<cp:lastModifiedBy>"))>=0&&(r=e.substr(l+19),t.lastModifiedBy=r.substring(0,r.indexOf("</cp:lastModifiedBy>"))),(l=e.indexOf('<dcterms:created xsi:type="dcterms:W3CDTF">'))>=0&&(r=e.substr(l+43),t.created=new Date(r.substring(0,r.indexOf("</dcterms:created>")))),(l=e.indexOf('<dcterms:modified xsi:type="dcterms:W3CDTF">'))>=0&&(r=e.substr(l+44),t.modified=new Date(r.substring(0,r.indexOf("</dcterms:modified>"))))},e._getWorkbook=function(e,t){var r,l,o,s,i,n,a,h,c=e.substring(e.indexOf("<bookViews>"),e.indexOf("</bookViews>")),u="",f=e.indexOf("<definedNames>");for(c&&(u=this._getAttr(c,"activeTab")),t.activeWorksheet=+u,n=(i=e.split("<sheet ")).length;--n;)a=this._getAttr(i[n],"name"),h="hidden"!==this._getAttr(i[n],"state"),t.sheets.unshift({name:a,visible:h,columns:[],rows:[]});if(f>-1)for(t.definedNames=[],n=(i=e.substring(f,e.indexOf("</definedNames>")).split("<definedName ")).length;--n;)a=this._getAttr(i[n],"name"),(l=i[n].match(/.*>.+(?=<\/definedName>)/))&&(l=l[0].replace(/(.*>)(.+)/,"$2"),l=isNaN(+l)?l:+l),r={name:a,value:l},""!==(o=this._getAttr(i[n],"localSheetId"))&&(s=t.sheets[+o])&&(r.sheetName=s.name),t.definedNames.unshift(r)},e._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"),r=t.length;--r;)this._colorThemes[r+3]=this._getAttr(t[r],"val")},e._getStyle=function(e){var t,r,l,o,s,i=[],n=[],a=[],h=this._numFmts.slice();if(this._styles=[],(l=e.indexOf("<numFmts"))>=0){var c=e.substring(l+8,e.indexOf("</numFmts>")).split("<numFmt");for(t=c.length;--t;)r=c[t],h[+this._getAttr(r,"numFmtId")]=this._getAttr(r,"formatCode")}if((l=e.indexOf("<fonts"))>=0){var u=e.substring(l,e.indexOf("</fonts>")).split("<font>");for(t=u.length;--t;)r=u[t],o=this._getChildNodeValue(r,"sz"),i[t-1]={bold:r.indexOf("<b/>")>=0,italic:r.indexOf("<i/>")>=0,underline:r.indexOf("<u/>")>=0,size:Math.round(o?96*+o/72:14),family:this._getChildNodeValue(r,"name"),color:this._getColor(r,!1)},o=null}if((l=e.indexOf("<fills"))>=0){var f=e.substring(l,e.indexOf("</fills>")).split("<fill>");for(t=f.length;--t;)n[t-1]=this._getColor(f[t],!0)}if((l=e.indexOf("<borders"))>=0){var d=e.substring(l,e.indexOf("</borders>")).split("<border>");for(t=d.length;--t;)r=d[t],a[t-1]={left:this._getEdgeBorder(r,"left"),right:this._getEdgeBorder(r,"right"),top:this._getEdgeBorder(r,"top"),bottom:this._getEdgeBorder(r,"bottom")}}if((l=e.indexOf("<cellXfs"))>=0){var p=e.substring(l,e.indexOf("</cellXfs>")).split("<xf");t=p.length;for(var m,g,y,_,b,v;--t;)r=p[t],g=(m=h[y=+this._getAttr(r,"numFmtId")])?/[hsmy\:]/i.test(m)?"date":m.indexOf("0")>-1?"number":"@"===m?"string":"unknown":"unknown",_=(y=+this._getAttr(r,"fontId"))>0?i[y]:null,b=(y=+this._getAttr(r,"fillId"))>1?n[y]:null,v=(y=+this._getAttr(r,"borderId"))>0?a[y]:null,l=r.indexOf("<alignment"),s=+this._getAttr(r,"quotePrefix"),this._styles.unshift({formatCode:m,type:g,font:_,fillColor:b,borders:v,hAlign:l>=0?Workbook._parseStringToHAlign(this._getAttr(r,"horizontal")):null,vAlign:l>=0?Workbook._parseStringToVAlign(this._getAttr(r,"vertical")):null,wordWrap:l>=0?"1"===this._getAttr(r,"wrapText"):null,quotePrefix:1===s})}if(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>"))}},e._getEdgeBorder=function(e,t){var r,l,o,s,i=e.indexOf("<"+t),n=e.indexOf("</"+t+">");if(i>=0){l=e.substring(i),l=n>=0?l.substring(0,n):l.substring(0,l.indexOf("/>"));var a=this._getAttr(l,"style");a&&(o=Workbook._parseStringToBorderType(a),s=this._getColor(l,!1),o===BorderStyle.Thin&&s&&"#c6c6c6"===s.toLowerCase()||((r={}).style=o,r.color=s))}return r},e._getSheet=function(e,t,r){var l,o=[];if(e.indexOf("<mergeCells")>-1)for(var s=e.substring(e.indexOf("<mergeCells"),e.indexOf("</mergeCells>")).split("<mergeCell "),i=s.length;--i;)2===(l=this._getAttr(s[i],"ref").split(":")).length&&o.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 n=e.split("<row "),a=r.sheets[t];if(n[0].indexOf("<dimension")>=0){var h=this._getAttr(n[0].substr(n[0].indexOf("<dimension")),"ref");h&&(h=h.substr(h.indexOf(":")+1),a.maxCol=this._alphaNum(h.match(/[a-zA-Z]*/g)[0])+1,a.maxRow=+h.match(/\d*/g).join(""))}var c=e.indexOf("<tableParts");if(c>-1){var u=e.substring(c,e.indexOf("</tableParts>")).split("<tablePart "),f=u.length;for(a.tableRIds=[];--f;)a.tableRIds.unshift(this._getAttr(u[f],"r:id"))}var d=[],p=[],m=[],g=null,y=null;if(n.length>0&&n[0].indexOf("<cols>")>-1)for(var _=(d=n[0].substring(n[0].indexOf("<cols>")+6,n[0].indexOf("</cols>")).split("<col ")).length-1;_>0;_--){var b=this._parseCharWidthToPixel(+this._getAttr(d[_],"width"));y=null,d[_].indexOf("style")>-1&&(y=this._styles[+this._getAttr(d[_],"style")]||{type:"General",formatCode:null}),g=null,y&&(y.font||y.fillColor||y.hAlign||y.vAlign||y.wordWrap||y.borders||y.formatCode&&"General"!==y.formatCode)&&(g={format:y.formatCode&&"General"!==y.formatCode?y.formatCode:null,font:y.font,fill:{color:y.fillColor},borders:y.borders,hAlign:y.hAlign,vAlign:y.vAlign,wordWrap:y.wordWrap});for(var v=+this._getAttr(d[_],"min")-1;v<+this._getAttr(d[_],"max");v++)p[v]={visible:"1"!==this._getAttr(d[_],"hidden"),autoWidth:"1"===this._getAttr(d[_],"bestFit"),width:b,style:g}}if(a.columns=p,n.length>0&&n[0].indexOf("<pane")>-1&&"frozen"===this._getAttr(n[0].substr(n[0].indexOf("<pane")),"state")){var S=this._getAttr(n[0].substr(n[0].indexOf("<pane")),"ySplit"),w=this._getAttr(n[0].substr(n[0].indexOf("<pane")),"xSplit");a.frozenPane={rows:S?+S:NaN,columns:w?+w:NaN}}for(a.summaryBelow="0"!==this._getAttr(n[0],"summaryBelow"),i=n.length;--i;){var C=a.rows[+this._getAttr(n[i],"r")-1]={visible:!0,groupLevel:NaN,cells:[]};if(n[i].substring(0,n[i].indexOf(">")).indexOf("hidden")>-1&&"1"===this._getAttr(n[i],"hidden")&&(C.visible=!1),"1"===this._getAttr(n[i],"customHeight")){var x=+this._getAttr(n[i].substring(0,n[i].indexOf(">")).replace("customHeight",""),"ht");C.height=96*x/72}g=null,y=null,"1"===this._getAttr(n[i],"customFormat")&&(g=(y=this._styles[+this._getAttr(n[i].substring(n[i].indexOf(" s=")),"s")]||{type:"General",formatCode:null}).font||y.fillColor||y.hAlign||y.vAlign||y.wordWrap||y.borders||y.formatCode&&"General"!==y.formatCode?{format:y.formatCode&&"General"!==y.formatCode?y.formatCode:null,font:y.font,fill:{color:y.fillColor},borders:y.borders,hAlign:y.hAlign,vAlign:y.vAlign,wordWrap:y.wordWrap}:null),C.style=g;var k=this._getAttr(n[i],"outlineLevel");C.groupLevel=k&&""!==k?+k:NaN,C.collapsed="1"===this._getAttr(n[i],"collapsed");for(var T=n[i].split("<c "),F=T.length;--F;){var A=T[F];g=(y=this._styles[+this._getAttr(A,"s")]||{type:"General",formatCode:null}).font||y.fillColor||y.hAlign||y.vAlign||y.wordWrap||y.borders||y.formatCode&&"General"!==y.formatCode?{format:y.formatCode&&"General"!==y.formatCode?y.formatCode:null,font:y.font,fill:{color:y.fillColor},borders:y.borders,hAlign:y.hAlign,vAlign:y.vAlign,wordWrap:y.wordWrap}:null;var z=this._getAttr(A.substring(0,A.indexOf(">")),"t")||y.type,W=null,O="inlineStr"===z||A.indexOf("<is>")>=0;O?W=this._getInlineString(A):A.indexOf("<v>")>-1&&(W=A.substring(A.indexOf("<v>")+3,A.indexOf("</v>")));var R=null,B=null,D=null;A.indexOf("<f")>-1&&(A.indexOf("</f>")>-1?(R=A.match(/<f.*>.+(?=<\/f>)/))&&(R=R[0].replace(/(\<f.*>)(.+)/,"$2")):(B=this._getAttr(A,"si"))&&(D=this._getAttr(A,"r"),R=this._getSharedFormula(B,D))),null!=R&&(R=R.replace(/\[\#This Row\]\s*,\s*/gi,"@")),"str"===z||"e"===z||O||(W=W?+W:""),v=this._alphaNum(this._getAttr(A,"r").match(/[a-zA-Z]*/g)[0]);var N=null;switch(z){case"s":null!=(W=this._sharedStrings[W])&&(wjcCore.isString(W)?y&&y.quotePrefix&&"'"!==W[0]&&(W="'"+W):(N=W.slice(),W=this._getTextOfTextRuns(N)));break;case"b":W=1===W;break;case"date":W=W?this._convertDate(W):""}wjcCore.isNumber(W)&&(null==g&&(g={format:""}),wjcCore.isInt(W)?g.format=g.format||"#,##0":g.format=g.format||"#,##0.00"),C.cells[v]={value:W,textRuns:N,isDate:"date"===z,formula:Workbook._unescapeXML(R),style:g,visible:-1===m.indexOf(v)}}}var P=e.indexOf("<hyperlinks");if(P>-1)for(var j=e.substring(P,e.indexOf("</hyperlinks>")).split("<hyperlink "),M=j.length;--M;)this._getHyperlink(a,j[M]);if(a.frozenPane){if(!isNaN(a.frozenPane.rows))for(i=0;i<a.rows.length&&i<a.frozenPane.rows;i++)a.rows[i]&&!a.rows[i].visible&&a.frozenPane.rows++;if(!isNaN(a.frozenPane.columns))for(i=0;i<p.length&&i<a.frozenPane.columns;i++)p[i]&&!p[i].visible&&a.frozenPane.columns++}var L;for(F=0;F<o.length;F++)L=o[F],a.rows[L.topRow].cells[L.leftCol].rowSpan=L.bottomRow-L.topRow+1,a.rows[L.topRow].cells[L.leftCol].colSpan=L.rightCol-L.leftCol+1},e._getTable=function(e){var t={};t.name=this._getAttr(e,"name"),t.range=this._getAttr(e,"ref");var r=this._getAttr(e,"headerRowCount");t.showHeaderRow=""==r||"1"===r;var l=this._getAttr(e,"totalsRowCount");t.showTotalRow="1"===l;var o=e.substring(e.indexOf("<tableStyleInfo")),s=this._getAttr(o,"name");this._isBuiltInStyleName(s)?t.style={name:s}:t.style=this._getTableStyleByName(s),t.showBandedColumns="1"===this._getAttr(o,"showColumnStripes"),t.showBandedRows="1"===this._getAttr(o,"showRowStripes"),t.alterFirstColumn="1"===this._getAttr(o,"showFirstColumn"),t.alterLastColumn="1"===this._getAttr(o,"showLastColumn");var i=e.split("<tableColumn ");t.columns=[];for(var n=1;n<i.length;n++){var a=i[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"),c=1;c<h.length;c++){var u=h[c],f=+this._getAttr(u,"colId");t.columns[f].showFilterButton="1"!==this._getAttr(u,"hiddenButton")}return t},e._getTableColumn=function(e){var t={};t.name=this._getAttr(e,"name");var r=this._getAttr(e,"totalsRowLabel");if(r)t.totalRowLabel=r;else{var l=this._getAttr(e,"totalsRowFunction");"custom"===l&&(l=e.substring(e.indexOf("<totalsRowFormula>")+2+"totalsRowFormula".length,e.indexOf("</totalsRowFormula>"))),t.totalRowFunction=l}return t},e._getSheetRelatedTable=function(e){var t=this._getAttr(e,"Target");t=t.substring(t.lastIndexOf("/")+1);for(var r=0;r<this._tables.length;r++){var l=this._tables[r];if(t===l.fileName)return l}return null},e._getSheetRelatedHyperlink=function(e,t,r){for(var l=0;l<r.hyperlinkRIds.length;l++){var o=r.hyperlinkRIds[l];if(o.rId===t){var s=this._getAttr(e,"Target");r.rows[o.ref.row]&&r.rows[o.ref.row].cells[o.ref.col]&&(r.rows[o.ref.row].cells[o.ref.col].link=s)}}},e._getTableStyles=function(e,t){for(var r=e.split("<tableStyle "),l=r.length;--l;){var o={},s=r[l];o.name=this._getAttr(s,"name");for(var i=s.split("<tableStyleElement "),n=i.length;--n;){var a=i[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 c=this._getAttr(a,"dxfId");""!==c&&(o[h]=this._getTableStyleElement(t[+c+1]));var u=this._getAttr(a,"size");u&&(null==o[h]&&(o[h]={}),o[h].size=+u)}this._tableStyles.push(o)}},e._getTableStyleElement=function(e){var t=null,r=null,l=null,o=null,s=e.indexOf("<font>");if(s>=0){t=e.substring(s,e.indexOf("</font>"));var i=this._getChildNodeValue(t,"sz");r={bold:"1"===this._getChildNodeValue(t,"b"),italic:"1"===this._getChildNodeValue(t,"i"),underline:"1"===this._getChildNodeValue(t,"u"),size:Math.round(i?96*+i/72:14),family:this._getChildNodeValue(t,"name"),color:this._getColor(t,!1)}}return t=null,(s=e.indexOf("<fill>"))>=0&&(t=e.substring(s,e.indexOf("</fill>")),l={color:this._getColor(t,!0)}),t=null,(s=e.indexOf("<border>"))>=0&&(t=e.substring(s,e.indexOf("</border>")),o={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")}),{font:r,fill:l,borders:o}},e._getTableStyleByName=function(e){var t,r;if(null==this._tableStyles||0===this._tableStyles.length)return null;for(t=0;t<this._tableStyles.length;t++)if((r=this._tableStyles[t])&&r.name.toLowerCase()===e.toLowerCase())return r;return null},e._getHyperlink=function(e,t){var r,l,o,s,i,n;if(null!=(r=this._getAttr(t,"ref"))){o=r.split(":"),null==(i=this._getAttr(t,"r:id"))&&(n=this._getAttr(t,"location"));for(var a=0;a<o.length;a++)l=o[a],s=Workbook.tableAddress(l),i?(null==e.hyperlinkRIds&&(e.hyperlinkRIds=[]),e.hyperlinkRIds.push({ref:s,rId:i})):n&&e.rows[s.row]&&e.rows[s.row].cells[s.col]&&(e.rows[s.row].cells[s.col].link=n)}},e._getTextRunFont=function(e){var t=this._getChildNodeValue(e,"sz");return{bold:e.indexOf("<b/>")>=0,italic:e.indexOf("<i/>")>=0,underline:e.indexOf("<u/>")>=0,size:Math.round(t?96*+t/72:14),family:this._getChildNodeValue(e,"name"),color:this._getColor(e,!1)}},e._getTextOfTextRuns=function(e){var t,r,l="";for(t=0;t<e.length;t++)(r=e[t])&&(l+=r.text);return l},e._isBuiltInStyleName=function(e){var t;if(0===e.search(/TableStyleLight/i)){if(t=+e.substring(15),!isNaN(t)&&t>=1&&t<=21)return!0}else if(0===e.search(/TableStyleMedium/i)){if(t=+e.substring(16),!isNaN(t)&&t>=1&&t<=28)return!0}else if(0===e.search(/TableStyleDark/i)&&(t=+e.substring(14),!isNaN(t)&&t>=1&&t<=11))return!0;return!1},e._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>'},e._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>"},e._generateClrScheme=function(){return null===this._colorThemes&&(this._colorThemes=[]),'<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>'},e._generateFontScheme=function(){return'<a:fontScheme name="Office"><a:majorFont><a:latin typeface="Cambria"/><a:ea typeface=""/><a:cs typeface=""/><a:font typeface="ＭＳ Ｐゴシック" 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="ＭＳ Ｐゴシック" 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>'},e._generateFmtScheme=function(){return'<a:fmtScheme name="Office">'+this._generateFillScheme()+this._generateLineStyles()+this._generateEffectScheme()+this._generateBgFillScheme()+"</a:fmtScheme>"},e._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>'},e._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>'},e._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>'},e._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>'},e._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">';return e.creator?t+="<dc:creator>"+e.creator+"</dc:creator>":t+="<dc:creator/>",e.lastModifiedBy?t+="<cp:lastModifiedBy>"+e.lastModifiedBy+"</cp:lastModifiedBy>":t+="<cp:lastModifiedBy/>",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>"},e._generateSheetGlobalSetting=function(e,t,r){var l=t.rows&&t.rows[0]&&t.rows[0].cells?t.rows[0].cells.length:0,o=' xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">';return o+='<sheetPr><outlinePr summaryBelow="0"/></sheetPr>',o+='<dimension ref="A1'+(l>0?":"+this._numAlpha(l-1)+t.rows.length:"")+'"/>',o+='<sheetViews><sheetView workbookViewId="0"',e===r.activeWorksheet&&(o+=' tabSelected="1"'),!t.frozenPane||0===t.frozenPane.rows&&0===t.frozenPane.columns?o+="/>":(o+=">",o+='<pane state="frozen" activePane="'+(0!==t.frozenPane.rows&&0!==t.frozenPane.columns?"bottomRight":0!==t.frozenPane.rows?"bottomLeft":"topRight")+'" topLeftCell="'+(this._numAlpha(t.frozenPane.columns)+(t.frozenPane.rows+1))+'" ySplit="'+t.frozenPane.rows.toString()+'" xSplit="'+t.frozenPane.columns.toString()+'"/>',o+="</sheetView>"),o+="</sheetViews>",o+='<sheetFormatPr defaultRowHeight="15" x14ac:dyDescent="0.25"/>'},e._generateCell=function(e,t,r,l,o,s){var i='<c r="'+this._numAlpha(t)+(e+1)+'" s="'+r.toString()+'"';l&&(i+=' t="'+l+'"');var n="";return s&&("="===s[0]&&(s=s.substring(1)),s=s.replace(/\@\s*/gi,"[#This Row], "),n+="<f>"+Workbook._escapeXML(s)+"</f>"),null!=o&&""!==o&&(n+="<v>"+o+"</v>"),i+(n?">"+n+"</c>":"/>")},e._generateMergeSetting=function(e){for(var t='<mergeCells count="'+e.length.toString()+'">',r=0;r<e.length;r++)t+='<mergeCell ref="'+e[r].join(":")+'"/>';return t+"</mergeCells>"},e._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="",r="",l=[],o=0,s=0,i="",n="";n=this._generateFontStyle({},!0);var a="",h="";h+=this._generateFillStyle("none",null),h+=this._generateFillStyle("gray125",null);var c="",u="";u+=this._generateBorderStyle({});var f="",d="";for(d+=this._generateCellXfs(0,0,0,0,{});o<this._styles.length;){var p=this._styles[o];if(p){var m=0;if((p=JSON.parse(p)).format&&"General"!==p.format&&(m=this._numFmts.indexOf(p.format))<0){var g=l.indexOf(p.format);-1===g?(l.push(p.format),r+='<numFmt numFmtId="'+(m=164+s).toString()+'" formatCode="'+p.format+'"/>',s++):m=164+g}var y=0;if(p.borders){var _=JSON.stringify(p.borders);(y=this._borders.indexOf(_))<0&&(y=this._borders.push(_)-1,u+=this._generateBorderStyle(p.borders))}var b=0;if(p.font){var v=JSON.stringify(p.font);(b=this._fonts.indexOf(v))<0&&(b=this._fonts.push(v)-1,n+=this._generateFontStyle(p.font))}var S=0;if(p.fill&&p.fill.color){var w=JSON.stringify(p.fill);(S=this._fills.indexOf(w))<0&&(S=this._fills.push(w)-1,h+=this._generateFillStyle("solid",p.fill.color))}d+=this._generateCellXfs(m,y,b,S,p)}o++}l=null,s>0?(t='<numFmts count="'+s+'">',t+=r,t+="</numFmts>"):t='<numFmts count="0"/>',e+=t,i='<fonts count="'+this._fonts.length+'" x14ac:knownFonts="1">',i+=n,e+=i+="</fonts>",a='<fills count="'+this._fills.length+'">',a+=h,e+=a+="</fills>",c='<borders count="'+this._borders.length+'">',c+=u,e+=c+="</borders>",e+='<cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>',f='<cellXfs count="'+this._styles.length+'">',f+=d,f+="</cellXfs>";var C="",x="";return this._tableStyles.length>0&&(this._getDxfs(),this._dxfs.length>0&&(C=this._generateDxfs()),x=this._generateTableStyles()),e+=f+'<cellStyles count="1"><cellStyle xfId="0" builtinId="0" name="Normal"/></cellStyles>'+(""===C?'<dxfs count="0"/>':C)+(""===x?'<tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleLight16"/>':x)+'<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>'},e._generateBorderStyle=function(e,t){void 0===t&&(t=!1);var r,l,o="<border>";for(var s in{left:0,right:0,top:0,bottom:0,diagonal:0,vertical:0,horizontal:0})(t||"vertical"!==s&&"horizontal"!==s)&&(e[s]?(r="<"+s+' style="'+e[s].style+'">',"",6===(l=(l=e[s].color)?"#"===l[0]?l.substring(1):l:"").length&&(l="FF"+l),l||(l="FF000000"),r+='<color rgb="'+l+'"/>',r+="</"+s+">"):r="<"+s+"/>",o+=r);return o+="</border>"},e._generateFontStyle=function(e,t){void 0===t&&(t=!1);var r="<font>";return 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'+("#"===e.color[0]?e.color.substring(1):e.color)+'"/>':r+='<color theme="1"/>',r+='<name val="'+(e.family||this._defaultFontName)+'"/>',r+='<family val="2"/>',t&&(r+='<scheme val="minor"/>'),r+="</font>"},e._generateFillStyle=function(e,t,r){void 0===r&&(r=!1);var l,o='<fill><patternFill patternType="'+e+'">';return t&&(l=r?"<bgColor ":"<fgColor ",o+=l+='rgb="FF'+("#"===t[0]?t.substring(1):t)+'"/>'),o+="</patternFill></fill>"},e._generateCellXfs=function(e,t,r,l,o){var s='<xf xfId="0" ';if(s+='numFmtId="'+e.toString()+'" ',e>0&&(s+='applyNumberFormat="1" '),s+='borderId="'+t.toString()+'" ',t>0&&(s+='applyBorder="1" '),s+='fontId="'+r.toString()+'" ',r>0&&(s+='applyFont="1" '),s+='fillId="'+l.toString()+'" ',l>0&&(s+='applyFill="1" '),o.quotePrefix&&(s+='quotePrefix="1" '),o.hAlign||o.vAlign||o.indent||o.wordWrap){s+='applyAlignment="1">';var i="<alignment ";o.hAlign&&(i+='horizontal="'+o.hAlign+'" '),o.vAlign&&(i+='vertical="'+o.vAlign+'" '),o.indent&&(i+='indent="'+o.indent+'" '),o.wordWrap&&(i+='wrapText="1"'),s+=i+="/>",s+="</xf>"}else s+="/>";return s},e._generateContentTypesDoc=function(){var e,t='<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">';for(this._macroEnabled&&(t+='<Default ContentType="application/vnd.ms-office.vbaProject" Extension="bin"/>'),t+='<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"/>',e=0;e<this._contentTypes.length;e++)t+=this._contentTypes[e];for(t+='<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"/>',e=0;e<this._tables.length;e++)t+='<Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml" PartName="/xl/tables/'+this._tables[e]+'"/>';return t+="</Types>"},e._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+'">',r=0;r<this._props.length;r++)t+="<vt:lpstr>"+this._props[r]+"</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>"},e._generateWorkbookRels=function(){for(var e='<Relationships xmlns="'+this._relationshipsNS+'">',t=0;t<this._xlRels.length;t++)e+=this._xlRels[t];return 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)+'"/>'),e+="</Relationships>"},e._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>",r=0;r<this._worksheets.length;r++)t+=this._worksheets[r];if(t+="</sheets>",e.definedNames&&e.definedNames.length>0){for(t+="<definedNames>",r=0;r<e.definedNames.length;r++){var l=-1;e.definedNames[r].sheetName&&(l=this._getSheetIndexBySheetName(e,e.definedNames[r].sheetName)),t+='<definedName name="'+e.definedNames[r].name+'" '+(l>-1?'localSheetId="'+l+'"':"")+">"+e.definedNames[r].value+"</definedName>"}t+="</definedNames>"}return t+='<calcPr fullCalcOnLoad="1"/></workbook>'},e._generateWorkSheet=function(e,t,r){var l,o,s,i,n,a,h,c,u,f,d,p,m,g,y,_,b,v,S,w,C,x,k,T=1;if(l=e+1,o=t.sheets[e],s=o.columns,i=this._cloneColumnsStyle(s),!o)throw"Worksheet should not be empty!";var F='<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"';F+=this._generateSheetGlobalSetting(e,o,t);var A="<sheetData>";for(n=o.style?this._cloneStyle(o.style):null,"",[],h=[],c=-1,u=(a=o.rows)?a.length:0;++c<u;){for(f=-1,d=a[c]&&a[c].cells?a[c].cells.length:0,p=null,A+='<row x14ac:dyDescent="0.25" r="'+(c+1).toString()+'"',a[c]&&(a[c].height&&(A+=' customHeight="1" ht="'+(72*+a[c].height/96).toString()+'"'),a[c].groupLevel&&(A+=' outlineLevel="'+a[c].groupLevel.toString()+'"'),(p=a[c].style?this._cloneStyle(a[c].style):null)&&((p=this._resolveStyleInheritance(p)).font&&p.font.color&&(p.font.color=this._parseColor(p.font.color)),p.fill&&p.fill.color&&(p.fill.color=this._parseColor(p.fill.color)),null==p.hAlign||wjcCore.isString(p.hAlign)||(p.hAlign=Workbook._parseHAlignToString(wjcCore.asEnum(p.hAlign,HAlign))),null==p.vAlign||wjcCore.isString(p.vAlign)||(p.vAlign=Workbook._parseVAlignToString(wjcCore.asEnum(p.vAlign,VAlign))),m=JSON.stringify(p),(g=this._styles.indexOf(m))<0&&(g=this._styles.push(m)-1),A+=' customFormat="1" s="'+g.toString()+'"')),a[c]&&!1===a[c].visible&&(A+=' hidden="1"'),a[c]&&!0===a[c].collapsed&&(A+=' collapsed="1"'),A+=">";++f<d;)_=null,b=null,v="",S=-1,k=(y=a[c].cells[f])?y.textRuns:null,_=y&&y.hasOwnProperty("value")?y.value:y,b=y&&y.style?this._cloneStyle(y.style):{},b=this._resolveStyleInheritance(b),(w=i[f])&&(w=this._resolveStyleInheritance(w),b=this._extend(b,w)),p&&(b=this._extend(b,p)),n&&(n=this._resolveStyleInheritance(n),b=this._extend(b,n)),null==b.hAlign||wjcCore.isString(b.hAlign)||(b.hAlign=Workbook._parseHAlignToString(wjcCore.asEnum(b.hAlign,HAlign))),null==b.vAlign||wjcCore.isString(b.vAlign)||(b.vAlign=Workbook._parseVAlignToString(wjcCore.asEnum(b.vAlign,VAlign))),b.font&&b.font.color&&(b.font.color=this._parseColor(b.font.color)),b.fill&&b.fill.color&&(b.fill.color=this._parseColor(b.fill.color)),this._applyDefaultBorder(b),b.borders&&(b.borders=this._extend({},b.borders),this._parseBorder(b.borders,!!b.fill&&!!b.fill.color)),!wjcCore.isNumber(_)||!isNaN(_)&&isFinite(_)||(_=_.toString()),k||_&&wjcCore.isString(_)&&("@"===b.format||(+_).toString()!==_||!isFinite(+_))?(this._sharedStrings[1]++,"'"===(_=k?"{RichTextMark}"+JSON.stringify(k):Workbook._unescapeXML(_))[0]&&(b.quotePrefix=!0,_=_.substring(1)),(S=this._sharedStrings[0].indexOf(_))<0&&(S=this._sharedStrings[0].push(_)-1),_=S,v="s"):"boolean"==typeof _?(_=_?1:0,v="b"):"date"===this._typeOf(_)||y&&y.isDate?(_=this._convertDate(_),b.format=b.format||"mm-dd-yy"):"object"==typeof _&&(_=null),b=JSON.stringify(b),(g=this._styles.indexOf(b))<0&&(g=this._styles.push(b)-1),y&&(null!=y.colSpan&&y.colSpan>1||null!=y.rowSpan&&y.rowSpan>1)&&(y.colSpan=y.colSpan||1,y.rowSpan=y.rowSpan||1,this._checkValidMergeCell(h,c,y.rowSpan,f,y.colSpan)&&h.push([this._numAlpha(f)+(c+1),this._numAlpha(f+y.colSpan-1)+(c+y.rowSpan)])),y&&y.link&&(null==x&&(x=[]),x.push({ref:Workbook.xlsxAddress(c,f),value:_,href:y.link})),b=null,A+=this._generateCell(c,f,g,v,_,y&&y.formula?y.formula:null);A+="</row>"}if(A+="</sheetData>",s&&s.length>0){for(F+="<cols>",c=0;c<s.length;c++)if(g=-1,!this._isEmpty(s[c])){(w=s[c].style)&&((w=this._resolveStyleInheritance(w)).font&&w.font.color&&(w.font.color=this._parseColor(w.font.color)),w.fill&&w.fill.color&&(w.fill.color=this._parseColor(w.fill.color)),null==w.hAlign||wjcCore.isString(w.hAlign)||(w.hAlign=Workbook._parseHAlignToString(wjcCore.asEnum(w.hAlign,HAlign))),null==w.vAlign||wjcCore.isString(w.vAlign)||(w.vAlign=Workbook._parseVAlignToString(wjcCore.asEnum(w.vAlign,VAlign))),w=JSON.stringify(w),(g=this._styles.indexOf(w))<0&&(g=this._styles.push(w)-1)),C=null!=(C=s[c].width)?"string"==typeof C&&C.indexOf("ch")>-1?this._parseCharCountToCharWidth(C.substring(0,C.indexOf("ch"))):this._parsePixelToCharWidth(C):8.43;var z=(c+1).toString();F+='<col min="'+z+'" max="'+z+'"',g>=0&&(F+=' style="'+g.toString()+'"'),C&&(F+=' width="'+C+'" customWidth="1"'),!1!==s[c].autoWidth&&(F+=' bestFit="1"'),!1===s[c].visible&&(F+=' hidden="1"'),F+="/>"}F+="</cols>"}if(A=F+A,F=A,A=null,h.length>0&&(F+=this._generateMergeSetting(h)),x&&x.length>0){for(F+="<hyperlinks>",c=0;c<x.length;c++)/\'?(\w+)\'?\!\$?[A-Za-z]{1,2}\$?\d+(:\$?[A-Za-z]{1,2}\$?\d+)?/.test(x[c].href)||/^\$?[A-Za-z]{1,2}\$?\d+(:\$?[A-Za-z]{1,2}\$?\d+)?$/.test(x[c].href)?F+='<hyperlink ref="'+x[c].ref+'" display="'+x[c].value+'" location="'+x[c].href+'"/>':(null==o.externalLinks&&(o.externalLinks=[]),o.externalLinks.push(x[c].href),F+='<hyperlink ref="'+x[c].ref+'" r:id="rId'+T+'"/>',T++);F+="</hyperlinks>"}if(F+='<pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/>',o.tables&&o.tables.length>0){for(F+='<tableParts count="'+o.tables.length+'">',c=0;c<o.tables.length;c++)F+='<tablePart r:id="rId'+T+'"/>',T++;F+="</tableParts>"}F+="</worksheet>",r.file("sheet"+l+".xml",this._xmlDescription+F),F=null;var W='<Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" PartName="/xl/worksheets/sheet'+l+'.xml"/>';this._contentTypes.unshift(W),this._props.unshift(Workbook._escapeXML(o.name)||"Sheet"+l);var O='<Relationship Target="worksheets/sheet'+l+'.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Id="rId'+l+'"/>';this._xlRels.unshift(O);var R='<sheet r:id="rId'+l+'" sheetId="'+l+'" name="'+(Workbook._escapeXML(o.name)||"Sheet"+l)+'"'+(!1===o.visible?' state="hidden"':"")+"/>";this._worksheets.unshift(R)},e._generateSharedStringsDoc=function(){var e,t='<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="'+this._sharedStrings[1]+'" uniqueCount="'+this._sharedStrings[0].length+'">';for(e=0;e<this._sharedStrings[0].length;e++){t+="<si>";var r=this._sharedStrings[0][e];if(r&&0===r.indexOf("{RichTextMark}"))try{var l=JSON.parse(r.substring(14));if(l&&l.length>0){for(var o=0;o<l.length;o++){t+="<r>";var s=l[o];s.font&&(t+=this._generateFontStyle(s.font,!0).replace(/font/g,"rPr")),t+=this._generatePlainText(s.text),t+="</r>"}t+="</si>"}}catch(e){t+=this._generatePlainText(r)+"</si>"}else t+=this._generatePlainText(r)+"</si>"}return t+"</sst>"},e._generatePlainText=function(e){var t="<t";return(wjcCore.isNullOrWhiteSpace(e)||/^\s+\w*|\w*\s+$/.test(e))&&(t+=' xml:space="preserve"'),t+=">"+Workbook._escapeXML(e)+"</t>"},e._generateTable=function(e,t){var r=this._tables.length+1,l="table"+r+".xml";e.fileName=l,this._tables.push(l);var o='<table ref="'+e.range+'" displayName="'+e.name+'" name="'+e.name+'" id="'+r+'" '+(!1===e.showHeaderRow?'headerRowCount="0" ':"")+(!0===e.showTotalRow?'totalsRowCount="1" ':'totalsRowShown="0" ')+' xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';!1!==e.showHeaderRow&&(o+=this._generateTableFilterSetting(e.range,e.showTotalRow,e.columns)),o+='<tableColumns count="'+e.columns.length+'">';for(var s="",i=0;i<e.columns.length;i++){var n=e.columns[i];s+='<tableColumn name="'+n.name+'" id="'+(i+1)+'" ',n.totalRowFunction?this._tableColumnFunctions.indexOf(n.totalRowFunction)>-1?s+='totalsRowFunction="'+n.totalRowFunction+'"/>':s+='totalsRowFunction="custom"><totalsRowFormula>'+n.totalRowFunction+"</totalsRowFormula></tableColumn>":s+=(n.totalRowLabel?'totalsRowLabel="'+n.totalRowLabel+'"':"")+"/>"}if(o+=s+"</tableColumns>",o+='<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>',!this._isBuiltInStyleName(e.style.name)){var a=JSON.stringify(e.style);-1===this._tableStyles.indexOf(a)&&this._tableStyles.push(a)}t.file(l,this._xmlDescription+o),o=null},e._generateTableFilterSetting=function(e,t,r){var l=e;if(t){var o=l.indexOf(":")+1,s=Workbook.tableAddress(l.substring(l.indexOf(":")+1));s.row-=1,l=l.substring(0,o)+Workbook.xlsxAddress(s.row,s.col)}for(var i='<autoFilter ref="'+l+'"',n="",a=0;a<r.length;a++)!1===r[a].showFilterButton&&(n+='<filterColumn hiddenButton="1" colId="'+a+'"/>');return i+=""===n?"/>":">"+n+"</autoFilter>"},e._generateHyperlinkRel=function(e){for(var t="",r=0;r<e.length;r++)t+='<Relationship TargetMode="External" Target="'+e[r]+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Id="rId'+(r+1)+'"/>';return t},e._getDxfs=function(){for(var e,t=this,r=0;r<this._tableStyles.length;r++)e=JSON.parse(this._tableStyles[r]),Object.keys(e).forEach(function(r){var l,o,s=e[r];s&&!wjcCore.isString(s)&&(t._isEmptyStyleEle(s)||(l=JSON.stringify(s),-1===(o=t._dxfs.indexOf(l))&&(o=t._dxfs.push(l)-1,s.styleIndex=o)))}),this._tableStyles[r]=e},e._generateDxfs=function(){for(var e,t='<dxfs count="'+this._dxfs.length+'">',r=0;r<this._dxfs.length;r++)t+="<dxf>",(e=JSON.parse(this._dxfs[r])).font&&(t+=this._generateFontStyle(e.font)),e.fill&&e.fill.color&&(t+=this._generateFillStyle("solid",e.fill.color,!0)),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>"},e._generateTableStyles=function(){for(var e,t,r,l,o,s,i='<tableStyles count="'+this._tableStyles.length+'" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleLight16">',n=0;n<this._tableStyles.length;n++){e=this._tableStyles[n],t=Object.keys(e),o="",s=0;for(var a=0;a<t.length;a++)if(r=t[a],l=e[r],!wjcCore.isString(l)){switch(s++,o+="<tableStyleElement",null!=l.styleIndex&&(o+=' dxfId="'+l.styleIndex+'"'),r){case"firstBandedColumnStyle":o+=' type="firstColumnStripe"',null!=l.size&&(o+=' size="'+l.size+'"');break;case"secondBandedColumnStyle":o+=' type="secondColumnStripe"',null!=l.size&&(o+=' size="'+l.size+'"');break;case"firstBandedRowStyle":o+=' type="firstRowStripe"',null!=l.size&&(o+=' size="'+l.size+'"');break;case"secondBandedRowStyle":o+=' type="secondRowStripe"',null!=l.size&&(o+=' size="'+l.size+'"');break;default:o+=' type="'+r.substring(0,r.length-5)+'"'}o+="/>"}s>0&&(i+='<tableStyle count="'+s+'" name="'+e.name+'" pivot="0">',i+=o+"</tableStyle>")}return i+="</tableStyles>"},e._isEmptyStyleEle=function(e){return this._isEmpty(e.borders)&&(this._isEmpty(e.fill)||wjcCore.isNullOrWhiteSpace(e.fill.color))&&(this._isEmpty(e.font)||!0!==e.font.bold&&wjcCore.isNullOrWhiteSpace(e.font.color)&&wjcCore.isNullOrWhiteSpace(e.font.family)&&!0!==e.font.italic&&null==e.font.size&&!0!==e.font.underline)},e._getTableFileName=function(e,t){for(var r="",l=0;l<e.length;l++){var o=e[l];if(o.name===t){r=o.fileName;break}}return r},e._getColor=function(e,t){var r,l,o,s,i;return-1===e.search(/fgcolor/i)&&-1===e.search(/bgcolor/i)&&t||-1===e.search(/color/i)&&!t?null:(-1===(r=e.indexOf("<fgColor"))&&(r=e.indexOf("<bgColor")),-1!==(e=t?e.substring(r,e.indexOf("/>")):e.substring(e.indexOf("<color"))).indexOf("rgb=")?(s=this._getAttr(e,"rgb"))&&8===s.length&&(s=s.substring(2)):-1!==e.indexOf("indexed")?(o=+this._getAttr(e,"indexed"),s=this._indexedColors[o]||""):(l=+this._getAttr(e,"theme"),-1!==e.indexOf("tint")&&(i=+this._getAttr(e,"tint")),s=this._getThemeColor(l,i)),s&&"#"===s[0]?s:"#"+s)},e._getThemeColor=function(e,t){var r,l,o=this._colorThemes[e];return null!=t?(r=new wjcCore.Color("#"+o),l=r.getHsl(),l[2]=t<0?l[2]*(1+t):l[2]*(1-t)+(1-1*(1-t)),(r=wjcCore.Color.fromHsl(l[0],l[1],l[2])).toString().substring(1)):o},e._parseColor=function(e){var t=new wjcCore.Color(e);return t.a<1&&(t=wjcCore.Color.toOpaque(t)),t.toString()},e._getsBaseSharedFormulas=function(e){var t,r,l,o=e.match(/\<f[^<]*ref[^<]*>[^<]+(?=\<\/f>)/g);if(this._sharedFormulas=[],o&&o.length>0)for(var s=0;s<o.length;s++)t=o[s],r=this._getAttr(t,"si"),l=(l=this._getAttr(t,"ref"))?l.substring(0,l.indexOf(":")):"",t=t.replace(/(\<f.*>)(.+)/,"$2"),this._sharedFormulas[+r]=this._parseSharedFormulaInfo(l,t)},e._parseSharedFormulaInfo=function(e,t){var r,l,o,s,i,n=t.match(/(\'?\w+\'?\!)?(\$?[A-Za-z]+)(\$?\d+)/g);if(s=Workbook.tableAddress(e),n&&n.length>0){i=[];for(var a=0;a<n.length;a++)r=n[a],t=t.replace(r,"{"+a+"}"),(l=r.indexOf("!"))>0&&(o=r.substring(0,l),r=r.substring(l+1)),i[a]={cellAddress:Workbook.tableAddress(r),sheetRef:o}}return{cellRef:s,formula:t,formulaRefs:i}},e._getSharedFormula=function(e,t){var r,l,o,s,i,n,a,h,c,u,f,d;if(this._sharedFormulas&&this._sharedFormulas.length>0&&(r=this._sharedFormulas[+e])){if(c=r.formula,(u=r.formulaRefs)&&u.length>0){l=Workbook.tableAddress(t),a=r.cellRef?r.cellRef.row:0,h=r.cellRef?r.cellRef.col:0,o=l.row-a,s=l.col-h;for(var p=0;p<u.length;p++)i=(f=u[p]).cellAddress.row+(f.cellAddress.absRow?0:o),n=f.cellAddress.col+(f.cellAddress.absCol?0:s),d=Workbook.xlsxAddress(i,n,f.cellAddress.absRow,f.cellAddress.absCol),null!=f.sheetRef&&""!==f.sheetRef&&(d=f.sheetRef+"!"+d),c=c.replace("{"+p+"}",d)}return c}return""},e._convertDate=function(e){var t,r,l=new Date(1900,0,0),o="[object Date]"===Object.prototype.toString.call(e),s=6e4*((o?e.getTimezoneOffset():(new Date).getTimezoneOffset())-l.getTimezoneOffset());return o?(e.getTime()-l.getTime()-s)/864e5+1:wjcCore.isNumber(e)?(t=e>59?1:0,r=new Date(1e3*Math.round((+l+864e5*(e-t))/1e3)),0!==(s=6e4*(r.getTimezoneOffset()-l.getTimezoneOffset()))?new Date(1e3*Math.round((+l+s+864e5*(e-t))/1e3)):r):null},e._parseBorder=function(e,t){for(var r in{left:0,right:0,top:0,bottom:0,diagonal:0}){var l=e[r];l&&(wjcCore.isString(l.color)&&(l.color=this._parseColor(l.color)),null==l.style||wjcCore.isString(l.style)||(l.style=Workbook._parseBorderTypeToString(wjcCore.asEnum(l.style,BorderStyle,!1))),!t&&l.color&&"#c6c6c6"===l.color.toLowerCase()&&"thin"===l.style&&(e[r]=null))}},e._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"})}},e._resolveStyleInheritance=function(e){var t;if(!e.basedOn)return e;for(var r in e.basedOn)if("basedOn"===r){t=this._resolveStyleInheritance(e.basedOn);for(r in t){l=t[r];e[r]=null==e[r]?l:this._extend(e[r],l)}}else{var l=e.basedOn[r];e[r]=null==e[r]?l:this._extend(e[r],l)}return delete e.basedOn,e},e._parsePixelToCharWidth=function(e){return null==e||isNaN(+e)?null:((+e-5)/7*100+.5)/100},e._parseCharWidthToPixel=function(e){return null==e||isNaN(+e)?null:Math.floor((256*+e+128/7)/256*7)+5},e._parseCharCountToCharWidth=function(e){return null==e||isNaN(+e)?null:(7*+e+5)/7*256/256},e._numAlpha=function(e){var t=Math.floor(e/26)-1;return(t>-1?this._numAlpha(t):"")+this._alphabet.charAt(e%26)},e._alphaNum=function(e){var t=0;return 2===e.length&&(t=this._alphaNum(e.charAt(0))+1),26*t+this._alphabet.indexOf(e.substr(-1))},e._typeOf=function(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()},e._extend=function(e,t){if(wjcCore.isObject(e)&&wjcCore.isObject(t)){for(var r in t){var l=t[r];wjcCore.isObject(l)&&null!=e[r]?this._extend(e[r],l):null!=l&&null==e[r]&&(e[r]=l)}return e}return t},e._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 r in e)if(t.call(e,r))return!1;return!0},e._cloneStyle=function(e){var t;if(null==e||"object"!=typeof e)return e;t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=this._cloneStyle(e[r]));return t},e._cloneColumnsStyle=function(e){for(var t,r=[],l=0;l<e.length;l++)(t=e[l])&&t.style&&(r[l]=this._cloneStyle(t.style));return r},e._getSheetIndex=function(e){return e=e.substring(0,e.lastIndexOf(".xml")),+e.substring(e.lastIndexOf("sheet")+5)},e._checkValidMergeCell=function(e,t,r,l,o){for(var s=0;s<e.length;s++){var i=e[s],n=+i[0].match(/\d*/g).join("")-1,a=this._alphaNum(i[0].match(/[a-zA-Z]*/g)[0]),h=+i[1].match(/\d*/g).join("")-1,c=this._alphaNum(i[1].match(/[a-zA-Z]*/g)[0]);if(!(t>h||t+r-1<n||l>c||l+o-1<a))return!1}return!0},e._getAttr=function(e,t){var r=e.indexOf(t+'="');return r>=0?(e=e.substr(r+t.length+2)).substring(0,e.indexOf('"')):""},e._getChildNodeValue=function(e,t){var r=e.indexOf(t+' val="');return r>=0?(e=e.substr(r+t.length+6)).substring(0,e.indexOf('"')):""},e._getSheetIndexBySheetName=function(e,t){for(var r=0;r<e.sheets.length;r++)if(e.sheets[r].name===t)return r;return-1},e._alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ",e._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"],e._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","@"],e._tableColumnFunctions="average, count, countNums, max, min, stdDev, sum, var",e._xmlDescription='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>',e._workbookNS="http://schemas.openxmlformats.org/spreadsheetml/2006/main",e._relationshipsNS="http://schemas.openxmlformats.org/package/2006/relationships",e._defaultFontName="Calibri",e._defaultFontSize=11,e._macroEnabled=!1,e._defaultColorThemes=["FFFFFF","000000","EEECE1","1F497D","4F818D","C0504D","9BBB59","8064A2","4BACC6","F79646"],e}();exports._xlsx=_xlsx;var _SyncPromise=function(){function e(e){this.value=e}return e.prototype.then=function(t,r){return new e(t?t(this.value):null)},e.prototype.catch=function(e){return this.then(null,e)},e.resolve=function(){return new e},e}(),_JsZipWrapper=function(){function e(e){this._obj=e}return e.prototype.loadAsync=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(l=this._obj).load.apply(l,e);return new _SyncPromise(this._wrapOrNull(r));var l},e.prototype.file=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(l=this._obj).file.apply(l,e);return this._wrapOrNull(r);var l},Object.defineProperty(e.prototype,"name",{get:function(){return this._obj.name},enumerable:!0,configurable:!0}),e.prototype.async=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r;return r=e&&e.length>0&&"uint8array"===e[0].toLowerCase()?this._obj.asUint8Array():this._obj.asText(),new _SyncPromise(r)},e.prototype.folder=function(e){var t=this._obj.folder(e);return this._wrapOrNull(t)},e.prototype.forEach=function(t){var r=this._obj.root,l=r.length,o=this._obj.files;for(var s in o)s.length>l&&s.substr(0,l).toLowerCase()===r&&t(s.substr(l),new e(o[s]))},e.prototype._wrapOrNull=function(t){return null!=t?new e(t):null},e}(),Workbook=function(){function e(){}return Object.defineProperty(e.prototype,"sheets",{get:function(){return null==this._sheets&&(this._sheets=[]),this._sheets},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"styles",{get:function(){return null==this._styles&&(this._styles=[]),this._styles},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"definedNames",{get:function(){return null==this._definedNames&&(this._definedNames=[]),this._definedNames},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorThemes",{get:function(){return null==this._colorThemes&&(this._colorThemes=[]),this._colorThemes},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reservedContent",{get:function(){return null==this._reservedContent&&(this._reservedContent={}),this._reservedContent},set:function(e){this._reservedContent=e},enumerable:!0,configurable:!0}),e.prototype.save=function(e){var t=_xlsx.save(this);return e&&this._saveToFile(t.base64,e),t.base64},e.prototype.saveAsync=function(e,t,r){var l=this;_xlsx.saveAsync(l,r).then(function(r){e&&l._saveToFile(r,e),t&&t(r)})},e.prototype.load=function(e){var t=_xlsx.load(this._getBase64String(e));this._deserialize(t),t=null},e.prototype.loadAsync=function(e,t,r){var l=this;_xlsx.loadAsync(l._getBase64String(e)).then(function(e){l._deserialize(e),e=null,t(l)}).catch(r)},e.prototype._serialize=function(){var e={sheets:[]};return 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()),e},e.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())},e.prototype._addWorkSheet=function(e,t){null==this._sheets&&(this._sheets=[]),null==t||isNaN(t)?this._sheets.push(e):this._sheets[t]=e},e.prototype._saveToFile=function(t,r){var l,o,s,i,n,a,h=window.document,c=this._reservedContent&&this._reservedContent.macros?"xlsm":"xlsx",u="xlsm"===c?"application/vnd.ms-excel.sheet.macroEnabled.12":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";if((o=r.lastIndexOf("."))<0)r+="."+c;else{if(0===o)throw"Invalid file name.";""===(l=r.substring(o+1))?r+="."+c:l!==c&&(r+="."+c)}s=new Blob([e._base64DecToArr(t)],{type:u}),navigator.msSaveBlob?navigator.msSaveBlob(s,r):URL.createObjectURL?(n=h.createElement("a"),a=function(e){var t=h.createEvent("MouseEvents");t.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(t)},n.download=r,n.href=URL.createObjectURL(s),a(n),n=null):(i=new FileReader,n=h.createElement("a"),a=function(e){var t=h.createEvent("MouseEvents");t.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(t)},i.onload=function(){n.download=r,n.href=i.result,a(n),n=null},i.readAsDataURL(s))},e.prototype._getBase64String=function(e){var t;if(null==e||0===e.length)throw"Invalid xlsx file content.";return-1!==(t=e.search(/base64,/i))&&(e=e.substring(t+7)),e},e.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=wjcCore.culture.Globalize.calendar.patterns[e]).replace(/f+k/gi,"000");break;default:t=wjcCore.culture.Globalize.calendar.patterns[e]}return 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"}),/FY|Q/i.test(t)?"General":t},e.toXlsxNumberFormat=function(e){var t,r,l,o,s,i,n=-1,a=e?e.toLowerCase():"",h=[];if(/^[ncpfdg]\d*,*$/.test(a)&&(t=a[0],r=this._formatMap[t]),r){if(l=wjcCore.culture.Globalize.numberFormat.currency.symbol,o=a.split(","),"c"===t&&(r=r.replace(/\{1\}/g,l)),a.length>1?n=parseInt(o[0].substr(1)):"d"!==t&&(n=2),!isNaN(n))for(i=0;i<n;i++)h.push(0);for(i=0;i<o.length-1;i++)h.push(",");s=h.length>0?"d"===t?r.replace(/\{0\}/g,h.join("")):r.replace(/\{0\}/g,(!isNaN(n)&&n>0?".":"")+h.join("")):"d"===t?r.replace(/\{0\}/g,"0"):r.replace(/\{0\}/g,"")}else s=a;return s},e.fromXlsxFormat=function(e){var t,r,l,o,s,i,n,a,h,c=[],u=wjcCore.culture.Globalize.numberFormat.currency.symbol;if(!e||"General"===e)return[""];for(r=(e=e.replace(/;@/g,"").replace(/&quot;?/g,"")).split(";"),o=0;o<r.length;o++){if(l=r[o],/[hsmy\:]/i.test(l))t=l.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"});else if(i=l.lastIndexOf("."),n=l.lastIndexOf("0"),a=l.lastIndexOf(","),t=l.search(/\[\$([^\-\]]+)[^\]]*\]/)>-1||l.indexOf(u)>-1&&-1===l.search(/\[\$([\-\]]+)[^\]]*\]/)?"c":"%"===l[e.length-1]?"p":"n",t+=i>-1&&i<n?l.substring(i,n).length:"0",/^0+,*$/.test(l)&&(t="d"+((n=l.lastIndexOf("0"))+1)),a>-1&&n>-1&&n<a)for(h=l.substring(n+1,a+1).split(""),s=0;s<h.length;s++)t+=",";c.push(t)}return c},e._parseCellFormat=function(e,t){return t?this.toXlsxDateFormat(e):this.toXlsxNumberFormat(e)},e._parseExcelFormat=function(e){if(void 0!==e&&null!==e&&void 0!==e.value&&null!==e.value&&!isNaN(e.value)){var t=e.style&&e.style.format?e.style.format:"";return e.isDate||wjcCore.isDate(e.value)?this.fromXlsxFormat(t)[0]:!wjcCore.isNumber(e.value)||t&&"General"!==t?wjcCore.isNumber(e.value)||""===e.value?this.fromXlsxFormat(t)[0]:t:wjcCore.isInt(e.value)?"d":"f2"}},e.xlsxAddress=function(e,t,r,l){var o=r?"$":"",s=null==l?o:l?"$":"";return(isNaN(t)?"":s+this._numAlpha(t))+(isNaN(e)?"":o+(e+1).toString())},e.tableAddress=function(e){var t=/^((\$?)([A-Za-z]+))?((\$?)(\d+))?$/,r=e&&t.exec(e),l={};return r?(r[3]&&(l.col=this._alphaNum(r[3]),l.absCol=!!r[2]),r[6]&&(l.row=+r[6]-1,l.absRow=!!r[5]),l):null},e._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"}},e._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},e._parseVAlignToString=function(e){switch(e){case VAlign.Bottom:return"bottom";case VAlign.Center:return"center";case VAlign.Top:return"top";default:return null}},e._parseStringToVAlign=function(e){var t=e?e.toLowerCase():"";return"top"===t?VAlign.Top:"center"===t?VAlign.Center:"bottom"===t?VAlign.Bottom:null},e._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"}},e._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},e._escapeXML=function(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):""},e._unescapeXML=function(e){return"string"==typeof e?e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&#x2F;/g,"/"):""},e._numAlpha=function(e){var t=Math.floor(e/26)-1;return(t>-1?this._numAlpha(t):"")+this._alphabet.charAt(e%26)},e._alphaNum=function(e){var t=0;return e&&(e=e.toUpperCase()),2===e.length&&(t=this._alphaNum(e.charAt(0))+1),26*t+this._alphabet.indexOf(e.substr(-1))},e._b64ToUint6=function(e){return e>64&&e<91?e-65:e>96&&e<123?e-71:e>47&&e<58?e+4:43===e?62:47===e?63:0},e._base64DecToArr=function(e,t){for(var r,l,o=e.replace(/[^A-Za-z0-9\+\/]/g,""),s=o.length,i=t?Math.ceil((3*s+1>>2)/t)*t:3*s+1>>2,n=new Uint8Array(i),a=0,h=0,c=0;c<s;c++)if(l=3&c,a|=this._b64ToUint6(o.charCodeAt(c))<<18-6*l,3===l||s-c==1){for(r=0;r<3&&h<i;r++,h++)n[h]=a>>>(16>>>r&24)&255;a=0}return n},e._uint6ToB64=function(e){return e<26?e+65:e<52?e+71:e<62?e-4:62===e?43:63===e?47:65},e._base64EncArr=function(e){for(var t=2,r="",l=e.length,o=0,s=0;s<l;s++)t=s%3,s>0&&4*s/3%76==0&&(r+="\r\n"),o|=e[s]<<(16>>>t&24),2!==t&&e.length-s!=1||(r+=String.fromCharCode(this._uint6ToB64(o>>>18&63),this._uint6ToB64(o>>>12&63),this._uint6ToB64(o>>>6&63),this._uint6ToB64(63&o)),o=0);return r.substr(0,r.length-2+t)+(2===t?"":1===t?"=":"==")},e.prototype._serializeWorkSheets=function(){var e,t,r=[];for(t=0;t<this._sheets.length;t++)(e=this._sheets[t])&&(r[t]=e._serialize());return r},e.prototype._serializeWorkbookStyles=function(){var e,t,r=[];for(t=0;t<this._styles.length;t++)(e=this._styles[t])&&(r[t]=e._serialize());return r},e.prototype._serializeDefinedNames=function(){var e,t,r=[];for(t=0;t<this._definedNames.length;t++)(e=this._definedNames[t])&&(r[t]=e._serialize());return r},e.prototype._serializeTableStyles=function(){var e,t,r=[];for(t=0;t<this._tableStyles.length;t++)(e=this._tableStyles[t])&&(r[t]=e._serialize());return r},e.prototype._deserializeWorkSheets=function(e){var t,r,l;for(this._sheets=[],wjcCore.assert(null!=e,"workSheets should not be null."),l=0;l<e.length;l++)(r=e[l])&&((t=new WorkSheet)._deserialize(r),this._sheets[l]=t)},e.prototype._deserializeWorkbookStyles=function(e){var t,r,l;for(this._styles=[],l=0;l<e.length;l++)(r=e[l])&&((t=new WorkbookStyle)._deserialize(r),this._styles[l]=t)},e.prototype._deserializeDefinedNames=function(e){var t,r,l;for(this._definedNames=[],l=0;l<e.length;l++)(r=e[l])&&((t=new DefinedName)._deserialize(r),this._definedNames[l]=t)},e.prototype._deserializeTableStyles=function(e){var t,r,l;for(this._tableStyles=[],l=0;l<e.length;l++)(r=e[l])&&((t=new WorkbookTableStyle)._deserialize(r),this._tableStyles[l]=t)},e._alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ",e._formatMap={n:"#,##0{0}",c:"{1}#,##0{0}_);({1}#,##0{0})",p:"#,##0{0}%",f:"0{0}",d:"{0}",g:"0{0}"},e}();exports.Workbook=Workbook;var WorkSheet=function(){function e(){}return Object.defineProperty(e.prototype,"columns",{get:function(){return null==this._columns&&(this._columns=[]),this._columns},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return null==this._rows&&(this._rows=[]),this._rows},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tables",{get:function(){return null==this._tables&&(this._tables=[]),this._tables},enumerable:!0,configurable:!0}),e.prototype._serialize=function(){var e;return this._checkEmptyWorkSheet()?null:(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()),e)},e.prototype._deserialize=function(e){var t,r;e.style&&((r=new WorkbookStyle)._deserialize(e.style),this.style=r),e.columns&&e.columns.length>0&&this._deserializeWorkbookColumns(e.columns),e.rows&&e.rows.length>0&&this._deserializeWorkbookRows(e.rows),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)},e.prototype._addWorkbookColumn=function(e,t){null==this._columns&&(this._columns=[]),null==t||isNaN(t)?this._columns.push(e):this._columns[t]=e},e.prototype._addWorkbookRow=function(e,t){null==this._rows&&(this._rows=[]),null==t||isNaN(t)?this._rows.push(e):this._rows[t]=e},e.prototype._serializeWorkbookColumns=function(){var e,t,r=[];for(t=0;t<this._columns.length;t++)(e=this._columns[t])&&(r[t]=e._serialize());return r},e.prototype._serializeWorkbookRows=function(){var e,t,r=[];for(t=0;t<this._rows.length;t++)(e=this._rows[t])&&(r[t]=e._serialize());return r},e.prototype._serializeTables=function(){var e,t,r=[];for(t=0;t<this._tables.length;t++)(e=this._tables[t])&&(r[t]=e._serialize());return r},e.prototype._deserializeWorkbookColumns=function(e){var t,r,l;for(this._columns=[],l=0;l<e.length;l++)(t=e[l])&&((r=new WorkbookColumn)._deserialize(t),this._columns[l]=r)},e.prototype._deserializeWorkbookRows=function(e){var t,r,l;for(this._rows=[],l=0;l<e.length;l++)(t=e[l])&&((r=new WorkbookRow)._deserialize(t),this._rows[l]=r)},e.prototype._deserializeTables=function(e){var t,r,l;for(this._tables=[],l=0;l<e.length;l++)(r=e[l])&&((t=new WorkbookTable)._deserialize(r),this._tables[l]=t)},e.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)},e}();exports.WorkSheet=WorkSheet;var WorkbookColumn=function(){function e(){}return e.prototype._serialize=function(){var e;return this._checkEmptyWorkbookColumn()?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),e)},e.prototype._deserialize=function(e){var t;e.style&&((t=new WorkbookStyle)._deserialize(e.style),this.style=t),this.autoWidth=e.autoWidth,this.visible=e.visible,this.width=e.width},e.prototype._checkEmptyWorkbookColumn=function(){return null==this.style&&null==this.width&&null==this.autoWidth&&null==this.visible},e}();exports.WorkbookColumn=WorkbookColumn;var WorkbookRow=function(){function e(){}return Object.defineProperty(e.prototype,"cells",{get:function(){return null==this._cells&&(this._cells=[]),this._cells},enumerable:!0,configurable:!0}),e.prototype._serialize=function(){var e;return this._checkEmptyWorkbookRow()?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),e)},e.prototype._deserialize=function(e){var t;e.cells&&e.cells.length>0&&this._deserializeWorkbookCells(e.cells),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},e.prototype._addWorkbookCell=function(e,t){null==this._cells&&(this._cells=[]),null==t||isNaN(t)?this._cells.push(e):this._cells[t]=e},e.prototype._serializeWorkbookCells=function(){var e,t,r=[];for(t=0;t<this._cells.length;t++)(e=this._cells[t])&&(r[t]=e._serialize());return r},e.prototype._deserializeWorkbookCells=function(e){var t,r,l;for(this._cells=[],l=0;l<e.length;l++)(t=e[l])&&((r=new WorkbookCell)._deserialize(t),this._cells[l]=r)},e.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))},e}();exports.WorkbookRow=WorkbookRow;var WorkbookCell=function(){function e(){}return e.prototype._serialize=function(){var e;return this._checkEmptyWorkbookCell()?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.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),this.textRuns&&this.textRuns.length>0&&(e.textRuns=this._serializeTextRuns()),e)},e.prototype._deserialize=function(e){var t;e.style&&((t=new WorkbookStyle)._deserialize(e.style),this.style=t),this.value=e.value,this.formula=e.formula,this.isDate=e.isDate,this.colSpan=e.colSpan,this.rowSpan=e.rowSpan,this.link=e.link,e.textRuns&&e.textRuns.length>0&&this._deserializeTextRuns(e.textRuns)},e.prototype._serializeTextRuns=function(){var e,t,r=[];for(t=0;t<this.textRuns.length;t++)e=this.textRuns[t],r.push(e._serialize());return r},e.prototype._deserializeTextRuns=function(e){var t,r,l;for(this.textRuns=[],l=0;l<e.length;l++)r=new WorkbookTextRun,t=e[l],r._deserialize(t),this.textRuns.push(r)},e.prototype._checkEmptyWorkbookCell=function(){return null==this.style&&null==this.value&&null==this.isDate&&(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)},e}();exports.WorkbookCell=WorkbookCell;var WorkbookFrozenPane=function(){function e(){}return e.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},e.prototype._deserialize=function(e){this.columns=e.columns,this.rows=e.rows},e}();exports.WorkbookFrozenPane=WorkbookFrozenPane;var WorkbookStyle=function(){function e(){}return e.prototype._serialize=function(){var e;return this._checkEmptyWorkbookStyle()?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=wjcCore.asEnum(this.hAlign,HAlign,!1)),null!=this.vAlign&&(e.vAlign=wjcCore.asEnum(this.vAlign,VAlign,!1)),null==this.indent||isNaN(this.indent)||(e.indent=this.indent),this.wordWrap&&(e.wordWrap=this.wordWrap),e)},e.prototype._deserialize=function(t){var r,l,o,s;t.basedOn&&((r=new e)._deserialize(t.basedOn),this.basedOn=r),t.fill&&((l=new WorkbookFill)._deserialize(t.fill),this.fill=l),t.font&&((o=new WorkbookFont)._deserialize(t.font),this.font=o),t.borders&&((s=new WorkbookBorder)._deserialize(t.borders),this.borders=s),this.format=t.format,null!=t.hAlign&&(this.hAlign=wjcCore.asEnum(t.hAlign,HAlign,!1)),null!=t.vAlign&&(this.vAlign=wjcCore.asEnum(t.vAlign,VAlign,!1)),null==t.indent||isNaN(t.indent)||(this.indent=t.indent),t.wordWrap&&(this.wordWrap=t.wordWrap)},e.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},e}();exports.WorkbookStyle=WorkbookStyle;var WorkbookFont=function(){function e(){}return e.prototype._serialize=function(){var e;return this._checkEmptyWorkbookFont()?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),e)},e.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},e.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))},e}();exports.WorkbookFont=WorkbookFont;var WorkbookFill=function(){function e(){}return e.prototype._serialize=function(){return this.color?{color:this.color}:null},e.prototype._deserialize=function(e){null!=e.color&&(this.color=e.color)},e}();exports.WorkbookFill=WorkbookFill;var WorkbookBorder=function(){function e(){}return e.prototype._serialize=function(){var e;return this._checkEmptyWorkbookBorder()?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()),e)},e.prototype._deserialize=function(e){var t,r,l,o,s;e.top&&((t=new WorkbookBorderSetting)._deserialize(e.top),this.top=t),e.bottom&&((r=new WorkbookBorderSetting)._deserialize(e.bottom),this.bottom=r),e.left&&((l=new WorkbookBorderSetting)._deserialize(e.left),this.left=l),e.right&&((o=new WorkbookBorderSetting)._deserialize(e.right),this.right=o),e.diagonal&&((s=new WorkbookBorderSetting)._deserialize(e.diagonal),this.diagonal=s)},e.prototype._checkEmptyWorkbookBorder=function(){return null==this.top&&null==this.bottom&&null==this.left&&null==this.right&&null==this.diagonal},e}();exports.WorkbookBorder=WorkbookBorder;var WorkbookBorderSetting=function(){function e(){}return e.prototype._serialize=function(){var e;return null!=this.color&&""!==this.color||null!=this.style?(e={},this.color&&(e.color=this.color),null!=this.style&&(e.style=wjcCore.asEnum(this.style,BorderStyle,!1)),e):null},e.prototype._deserialize=function(e){null!=e.color&&(this.color=e.color,null!=e.style&&(this.style=wjcCore.asEnum(e.style,BorderStyle,!1)))},e}();exports.WorkbookBorderSetting=WorkbookBorderSetting;var DefinedName=function(){function e(){}return e.prototype._serialize=function(){var e;return null==this.name?null:(e={name:this.name,value:this.value},null!=this.sheetName&&(e.sheetName=this.sheetName),e)},e.prototype._deserialize=function(e){this.name=e.name,this.value=e.value,this.sheetName=e.sheetName},e}();exports.DefinedName=DefinedName;var WorkbookTable=function(){function e(){}return Object.defineProperty(e.prototype,"columns",{get:function(){return null==this._columns&&(this._columns=[]),this._columns},enumerable:!0,configurable:!0}),e.prototype._serialize=function(){var e,t;return null==this.name||null==this.range||null==this._columns?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:[]},e.columns=this._serializeTableColumns(),e)},e.prototype._deserialize=function(e){var t;this.name=e.name,this.range=e.range,this.showHeaderRow=e.showHeaderRow,this.showTotalRow=e.showTotalRow,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)},e.prototype._serializeTableColumns=function(){var e,t,r=[];for(t=0;t<this._columns.length;t++)(e=this._columns[t])&&(r[t]=e._serialize());return r},e.prototype._deserializeTableColumns=function(e){var t,r,l;for(wjcCore.assert(null!=e,"table Columns should not be null."),this._columns=[],l=0;l<e.length;l++)(r=e[l])&&((t=new WorkbookTableColumn)._deserialize(r),this._columns[l]=t)},e}();exports.WorkbookTable=WorkbookTable;var WorkbookTableColumn=function(){function e(){}return e.prototype._serialize=function(){return null==this.name?null:{name:this.name,totalRowLabel:this.totalRowLabel,totalRowFunction:this.totalRowFunction,showFilterButton:this.showFilterButton}},e.prototype._deserialize=function(e){this.name=e.name,this.totalRowLabel=e.totalRowLabel,this.totalRowFunction=e.totalRowFunction,this.showFilterButton=e.showFilterButton},e}();exports.WorkbookTableColumn=WorkbookTableColumn;var WorkbookTableStyle=function(){function e(){}return e.prototype._serialize=function(){var e;return this._checkEmptyWorkbookTableStyle()?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()),e)},e.prototype._deserialize=function(e){this.name=e.name,e.wholeTableStyle&&(this.wholeTableStyle=new WorkbookTableCommonStyle,this.wholeTableStyle._deserialize(e.wholeTableStyle)),e.firstBandedColumnStyle&&(this.firstBandedColumnStyle=new WorkbookTableBandedStyle,this.firstBandedColumnStyle._deserialize(e.firstBandedColumnStyle)),e.firstBandedRowStyle&&(this.firstBandedRowStyle=new WorkbookTableBandedStyle,this.firstBandedRowStyle._deserialize(e.firstBandedRowStyle)),e.secondBandedColumnStyle&&(this.secondBandedColumnStyle=new WorkbookTableBandedStyle,this.secondBandedColumnStyle._deserialize(e.secondBandedColumnStyle)),e.secondBandedRowStyle&&(this.secondBandedRowStyle=new WorkbookTableBandedStyle,this.secondBandedRowStyle._deserialize(e.secondBandedRowStyle)),e.headerRowStyle&&(this.headerRowStyle=new WorkbookTableCommonStyle,this.headerRowStyle._deserialize(e.headerRowStyle)),e.totalRowStyle&&(this.totalRowStyle=new WorkbookTableCommonStyle,this.totalRowStyle._deserialize(e.totalRowStyle)),e.firstColumnStyle&&(this.firstColumnStyle=new WorkbookTableCommonStyle,this.firstColumnStyle._deserialize(e.firstColumnStyle)),e.lastColumnStyle&&(this.lastColumnStyle=new WorkbookTableCommonStyle,this.lastColumnStyle._deserialize(e.lastColumnStyle)),e.firstHeaderCellStyle&&(this.firstHeaderCellStyle=new WorkbookTableCommonStyle,this.firstHeaderCellStyle._deserialize(e.firstHeaderCellStyle)),e.lastHeaderCellStyle&&(this.lastHeaderCellStyle=new WorkbookTableCommonStyle,this.lastHeaderCellStyle._deserialize(e.lastHeaderCellStyle)),e.firstTotalCellStyle&&(this.firstTotalCellStyle=new WorkbookTableCommonStyle,this.firstTotalCellStyle._deserialize(e.firstTotalCellStyle)),e.lastTotalCellStyle&&(this.lastTotalCellStyle=new WorkbookTableCommonStyle,this.lastTotalCellStyle._deserialize(e.lastTotalCellStyle))},e.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},e}();exports.WorkbookTableStyle=WorkbookTableStyle;var WorkbookTableCommonStyle=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype._deserialize=function(t){var r;e.prototype._deserialize.call(this,t),t.borders&&((r=new WorkbookTableBorder)._deserialize(t.borders),this.borders=r)},t}(WorkbookStyle);exports.WorkbookTableCommonStyle=WorkbookTableCommonStyle;var WorkbookTableBandedStyle=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype._serialize=function(){var t;return t=e.prototype._serialize.call(this),t.size=this.size,t},t.prototype._deserialize=function(t){e.prototype._deserialize.call(this,t),null!=t.size&&(this.size=t.size)},t}(WorkbookTableCommonStyle);exports.WorkbookTableBandedStyle=WorkbookTableBandedStyle;var WorkbookTableBorder=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype._serialize=function(){var t;return 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()),t},t.prototype._deserialize=function(t){var r,l;e.prototype._deserialize.call(this,t),t.vertical&&((r=new WorkbookBorderSetting)._deserialize(t.vertical),this.vertical=r),t.horizontal&&((l=new WorkbookBorderSetting)._deserialize(t.horizontal),this.horizontal=l)},t}(WorkbookBorder);exports.WorkbookTableBorder=WorkbookTableBorder;var WorkbookTextRun=function(){function e(){}return e.prototype._serialize=function(){var e={text:this.text};return this.font&&(e.font=this.font._serialize()),e},e.prototype._deserialize=function(e){e.font&&(this.font=new WorkbookFont,this.font._deserialize(e.font)),this.text=e.text},e}();exports.WorkbookTextRun=WorkbookTextRun;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=exports.HAlign||(exports.HAlign={}));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=exports.VAlign||(exports.VAlign={}));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=exports.BorderStyle||(exports.BorderStyle={}));