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